MinsoftK

deleting

Showing 1000 changed files with 0 additions and 4927 deletions

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -
7 -var _postcss = require('postcss');
8 -
9 -var _postcss2 = _interopRequireDefault(_postcss);
10 -
11 -var _postcssValueParser = require('postcss-value-parser');
12 -
13 -var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
14 -
15 -var _animation = require('./rules/animation');
16 -
17 -var _animation2 = _interopRequireDefault(_animation);
18 -
19 -var _border = require('./rules/border');
20 -
21 -var _border2 = _interopRequireDefault(_border);
22 -
23 -var _boxShadow = require('./rules/boxShadow');
24 -
25 -var _boxShadow2 = _interopRequireDefault(_boxShadow);
26 -
27 -var _flexFlow = require('./rules/flexFlow');
28 -
29 -var _flexFlow2 = _interopRequireDefault(_flexFlow);
30 -
31 -var _transition = require('./rules/transition');
32 -
33 -var _transition2 = _interopRequireDefault(_transition);
34 -
35 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
36 -
37 -/* eslint-disable quote-props */
38 -
39 -const rules = {
40 - 'animation': _animation2.default,
41 - '-webkit-animation': _animation2.default,
42 - 'border': _border2.default,
43 - 'border-top': _border2.default,
44 - 'border-right': _border2.default,
45 - 'border-bottom': _border2.default,
46 - 'border-left': _border2.default,
47 - 'outline': _border2.default,
48 - 'box-shadow': _boxShadow2.default,
49 - 'flex-flow': _flexFlow2.default,
50 - 'transition': _transition2.default,
51 - '-webkit-transition': _transition2.default
52 -};
53 -
54 -/* eslint-enable */
55 -
56 -// rules
57 -function shouldAbort(parsed) {
58 - let abort = false;
59 -
60 - parsed.walk(({ type, value }) => {
61 - if (type === 'comment' || type === 'function' && value.toLowerCase() === 'var' || type === 'word' && ~value.indexOf(`___CSS_LOADER_IMPORT___`)) {
62 - abort = true;
63 -
64 - return false;
65 - }
66 - });
67 -
68 - return abort;
69 -}
70 -
71 -function getValue(decl) {
72 - let { value, raws } = decl;
73 -
74 - if (raws && raws.value && raws.value.raw) {
75 - value = raws.value.raw;
76 - }
77 -
78 - return value;
79 -}
80 -
81 -exports.default = _postcss2.default.plugin('postcss-ordered-values', () => {
82 - return css => {
83 - const cache = {};
84 -
85 - css.walkDecls(decl => {
86 - const lowerCasedProp = decl.prop.toLowerCase();
87 - const processor = rules[lowerCasedProp];
88 -
89 - if (!processor) {
90 - return;
91 - }
92 -
93 - const value = getValue(decl);
94 -
95 - if (cache[value]) {
96 - decl.value = cache[value];
97 -
98 - return;
99 - }
100 -
101 - const parsed = (0, _postcssValueParser2.default)(value);
102 -
103 - if (parsed.nodes.length < 2 || shouldAbort(parsed)) {
104 - cache[value] = value;
105 -
106 - return;
107 - }
108 -
109 - const result = processor(parsed);
110 -
111 - decl.value = result;
112 - cache[value] = result;
113 - });
114 - };
115 -});
116 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = addSpace;
7 -function addSpace() {
8 - return { type: 'space', value: ' ' };
9 -}
10 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = getParsed;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -var _postcssValueParser2 = _interopRequireDefault(_postcssValueParser);
11 -
12 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13 -
14 -function getParsed(decl) {
15 - let { value, raws } = decl;
16 - if (raws && raws.value && raws.value.raw) {
17 - value = raws.value.raw;
18 - }
19 - return (0, _postcssValueParser2.default)(value);
20 -}
21 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = getValue;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -function getValue(values) {
11 - return (0, _postcssValueParser.stringify)({
12 - nodes: values.reduce((nodes, arg, index) => {
13 - arg.forEach((val, idx) => {
14 - if (idx === arg.length - 1 && index === values.length - 1 && val.type === 'space') {
15 - return;
16 - }
17 - nodes.push(val);
18 - });
19 -
20 - if (index !== values.length - 1) {
21 - nodes[nodes.length - 1].type = 'div';
22 - nodes[nodes.length - 1].value = ',';
23 - }
24 -
25 - return nodes;
26 - }, [])
27 - });
28 -}
29 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = normalizeAnimation;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -var _cssnanoUtilGetArguments = require('cssnano-util-get-arguments');
11 -
12 -var _cssnanoUtilGetArguments2 = _interopRequireDefault(_cssnanoUtilGetArguments);
13 -
14 -var _addSpace = require('../lib/addSpace');
15 -
16 -var _addSpace2 = _interopRequireDefault(_addSpace);
17 -
18 -var _getValue = require('../lib/getValue');
19 -
20 -var _getValue2 = _interopRequireDefault(_getValue);
21 -
22 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23 -
24 -// animation: [ none | <keyframes-name> ] || <time> || <single-timing-function> || <time> || <single-animation-iteration-count> || <single-animation-direction> || <single-animation-fill-mode> || <single-animation-play-state>
25 -
26 -const isTimingFunction = (value, type) => {
27 - const functions = ['steps', 'cubic-bezier', 'frames'];
28 - const keywords = ['ease', 'ease-in', 'ease-in-out', 'ease-out', 'linear', 'step-end', 'step-start'];
29 -
30 - return type === 'function' && functions.includes(value) || keywords.includes(value);
31 -};
32 -
33 -const isDirection = value => {
34 - return ['normal', 'reverse', 'alternate', 'alternate-reverse'].includes(value);
35 -};
36 -
37 -const isFillMode = value => {
38 - return ['none', 'forwards', 'backwards', 'both'].includes(value);
39 -};
40 -
41 -const isPlayState = value => {
42 - return ['running', 'paused'].includes(value);
43 -};
44 -
45 -const isTime = value => {
46 - const quantity = (0, _postcssValueParser.unit)(value);
47 -
48 - return quantity && ['ms', 's'].includes(quantity.unit);
49 -};
50 -
51 -const isIterationCount = value => {
52 - const quantity = (0, _postcssValueParser.unit)(value);
53 -
54 - return value === 'infinite' || quantity && !quantity.unit;
55 -};
56 -
57 -function normalizeAnimation(parsed) {
58 - const args = (0, _cssnanoUtilGetArguments2.default)(parsed);
59 -
60 - const values = args.reduce((list, arg) => {
61 - const state = {
62 - name: [],
63 - duration: [],
64 - timingFunction: [],
65 - delay: [],
66 - iterationCount: [],
67 - direction: [],
68 - fillMode: [],
69 - playState: []
70 - };
71 - const stateConditions = [{ property: 'duration', delegate: isTime }, { property: 'timingFunction', delegate: isTimingFunction }, { property: 'delay', delegate: isTime }, { property: 'iterationCount', delegate: isIterationCount }, { property: 'direction', delegate: isDirection }, { property: 'fillMode', delegate: isFillMode }, { property: 'playState', delegate: isPlayState }];
72 -
73 - arg.forEach(node => {
74 - let { type, value } = node;
75 -
76 - if (type === 'space') {
77 - return;
78 - }
79 -
80 - value = value.toLowerCase();
81 -
82 - const hasMatch = stateConditions.some(({ property, delegate }) => {
83 - if (delegate(value, type) && !state[property].length) {
84 - state[property] = [node, (0, _addSpace2.default)()];
85 - return true;
86 - }
87 - });
88 -
89 - if (!hasMatch) {
90 - state.name = [...state.name, node, (0, _addSpace2.default)()];
91 - }
92 - });
93 - return [...list, [...state.name, ...state.duration, ...state.timingFunction, ...state.delay, ...state.iterationCount, ...state.direction, ...state.fillMode, ...state.playState]];
94 - }, []);
95 -
96 - return (0, _getValue2.default)(values);
97 -};
98 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = normalizeBorder;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -// border: <line-width> || <line-style> || <color>
11 -// outline: <outline-color> || <outline-style> || <outline-width>
12 -
13 -const borderWidths = ['thin', 'medium', 'thick'];
14 -
15 -const borderStyles = ['none', 'auto', // only in outline-style
16 -'hidden', 'dotted', 'dashed', 'solid', 'double', 'groove', 'ridge', 'inset', 'outset'];
17 -
18 -function normalizeBorder(border) {
19 - const order = { width: '', style: '', color: '' };
20 -
21 - border.walk(node => {
22 - const { type, value } = node;
23 - if (type === 'word') {
24 - if (~borderStyles.indexOf(value.toLowerCase())) {
25 - order.style = value;
26 - return false;
27 - }
28 - if (~borderWidths.indexOf(value.toLowerCase()) || (0, _postcssValueParser.unit)(value.toLowerCase())) {
29 - if (order.width !== '') {
30 - order.width = `${order.width} ${value}`;
31 - return false;
32 - }
33 - order.width = value;
34 - return false;
35 - }
36 - order.color = value;
37 - return false;
38 - }
39 - if (type === 'function') {
40 - if (value.toLowerCase() === 'calc') {
41 - order.width = (0, _postcssValueParser.stringify)(node);
42 - } else {
43 - order.color = (0, _postcssValueParser.stringify)(node);
44 - }
45 - return false;
46 - }
47 - });
48 -
49 - return `${order.width} ${order.style} ${order.color}`.trim();
50 -};
51 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = normalizeBoxShadow;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -var _cssnanoUtilGetArguments = require('cssnano-util-get-arguments');
11 -
12 -var _cssnanoUtilGetArguments2 = _interopRequireDefault(_cssnanoUtilGetArguments);
13 -
14 -var _addSpace = require('../lib/addSpace');
15 -
16 -var _addSpace2 = _interopRequireDefault(_addSpace);
17 -
18 -var _getValue = require('../lib/getValue');
19 -
20 -var _getValue2 = _interopRequireDefault(_getValue);
21 -
22 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23 -
24 -// box-shadow: inset? && <length>{2,4} && <color>?
25 -
26 -function normalizeBoxShadow(parsed) {
27 - let args = (0, _cssnanoUtilGetArguments2.default)(parsed);
28 - let abort = false;
29 -
30 - let values = args.reduce((list, arg) => {
31 - let val = [];
32 - let state = {
33 - inset: [],
34 - color: []
35 - };
36 -
37 - arg.forEach(node => {
38 - const { type, value } = node;
39 -
40 - if (type === 'function' && ~value.toLowerCase().indexOf('calc')) {
41 - abort = true;
42 - return;
43 - }
44 -
45 - if (type === 'space') {
46 - return;
47 - }
48 -
49 - if ((0, _postcssValueParser.unit)(value)) {
50 - val = [...val, node, (0, _addSpace2.default)()];
51 - } else if (value.toLowerCase() === 'inset') {
52 - state.inset = [...state.inset, node, (0, _addSpace2.default)()];
53 - } else {
54 - state.color = [...state.color, node, (0, _addSpace2.default)()];
55 - }
56 - });
57 -
58 - return [...list, [...state.inset, ...val, ...state.color]];
59 - }, []);
60 -
61 - if (abort) {
62 - return parsed.toString();
63 - }
64 -
65 - return (0, _getValue2.default)(values);
66 -}
67 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = normalizeFlexFlow;
7 -// flex-flow: <flex-direction> || <flex-wrap>
8 -
9 -const flexDirection = ['row', 'row-reverse', 'column', 'column-reverse'];
10 -
11 -const flexWrap = ['nowrap', 'wrap', 'wrap-reverse'];
12 -
13 -function normalizeFlexFlow(flexFlow) {
14 - let order = {
15 - direction: '',
16 - wrap: ''
17 - };
18 -
19 - flexFlow.walk(({ value }) => {
20 - if (~flexDirection.indexOf(value.toLowerCase())) {
21 - order.direction = value;
22 - return;
23 - }
24 -
25 - if (~flexWrap.indexOf(value.toLowerCase())) {
26 - order.wrap = value;
27 -
28 - return;
29 - }
30 - });
31 -
32 - return `${order.direction} ${order.wrap}`.trim();
33 -};
34 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -Object.defineProperty(exports, "__esModule", {
4 - value: true
5 -});
6 -exports.default = normalizeTransition;
7 -
8 -var _postcssValueParser = require('postcss-value-parser');
9 -
10 -var _cssnanoUtilGetArguments = require('cssnano-util-get-arguments');
11 -
12 -var _cssnanoUtilGetArguments2 = _interopRequireDefault(_cssnanoUtilGetArguments);
13 -
14 -var _addSpace = require('../lib/addSpace');
15 -
16 -var _addSpace2 = _interopRequireDefault(_addSpace);
17 -
18 -var _getValue = require('../lib/getValue');
19 -
20 -var _getValue2 = _interopRequireDefault(_getValue);
21 -
22 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23 -
24 -// transition: [ none | <single-transition-property> ] || <time> || <single-transition-timing-function> || <time>
25 -
26 -const timingFunctions = ['ease', 'linear', 'ease-in', 'ease-out', 'ease-in-out', 'step-start', 'step-end'];
27 -
28 -function normalizeTransition(parsed) {
29 - let args = (0, _cssnanoUtilGetArguments2.default)(parsed);
30 -
31 - let values = args.reduce((list, arg) => {
32 - let state = {
33 - timingFunction: [],
34 - property: [],
35 - time1: [],
36 - time2: []
37 - };
38 -
39 - arg.forEach(node => {
40 - const { type, value } = node;
41 -
42 - if (type === 'space') {
43 - return;
44 - }
45 -
46 - if (type === 'function' && ~['steps', 'cubic-bezier'].indexOf(value.toLowerCase())) {
47 - state.timingFunction = [...state.timingFunction, node, (0, _addSpace2.default)()];
48 - } else if ((0, _postcssValueParser.unit)(value)) {
49 - if (!state.time1.length) {
50 - state.time1 = [...state.time1, node, (0, _addSpace2.default)()];
51 - } else {
52 - state.time2 = [...state.time2, node, (0, _addSpace2.default)()];
53 - }
54 - } else if (~timingFunctions.indexOf(value.toLowerCase())) {
55 - state.timingFunction = [...state.timingFunction, node, (0, _addSpace2.default)()];
56 - } else {
57 - state.property = [...state.property, node, (0, _addSpace2.default)()];
58 - }
59 - });
60 -
61 - return [...list, [...state.property, ...state.time1, ...state.timingFunction, ...state.time2]];
62 - }, []);
63 -
64 - return (0, _getValue2.default)(values);
65 -}
66 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -Copyright (c) Bogdan Chadkin <trysound@yandex.ru>
2 -
3 -Permission is hereby granted, free of charge, to any person
4 -obtaining a copy of this software and associated documentation
5 -files (the "Software"), to deal in the Software without
6 -restriction, including without limitation the rights to use,
7 -copy, modify, merge, publish, distribute, sublicense, and/or sell
8 -copies of the Software, and to permit persons to whom the
9 -Software is furnished to do so, subject to the following
10 -conditions:
11 -
12 -The above copyright notice and this permission notice shall be
13 -included in all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 -OTHER DEALINGS IN THE SOFTWARE.
1 -# postcss-value-parser
2 -
3 -[![Travis CI](https://travis-ci.org/TrySound/postcss-value-parser.svg)](https://travis-ci.org/TrySound/postcss-value-parser)
4 -
5 -Transforms CSS declaration values and at-rule parameters into a tree of nodes, and provides a simple traversal API.
6 -
7 -## Usage
8 -
9 -```js
10 -var valueParser = require('postcss-value-parser');
11 -var cssBackgroundValue = 'url(foo.png) no-repeat 40px 73%';
12 -var parsedValue = valueParser(cssBackgroundValue);
13 -// parsedValue exposes an API described below,
14 -// e.g. parsedValue.walk(..), parsedValue.toString(), etc.
15 -```
16 -
17 -For example, parsing the value `rgba(233, 45, 66, .5)` will return the following:
18 -
19 -```js
20 -{
21 - nodes: [
22 - {
23 - type: 'function',
24 - value: 'rgba',
25 - before: '',
26 - after: '',
27 - nodes: [
28 - { type: 'word', value: '233' },
29 - { type: 'div', value: ',', before: '', after: ' ' },
30 - { type: 'word', value: '45' },
31 - { type: 'div', value: ',', before: '', after: ' ' },
32 - { type: 'word', value: '66' },
33 - { type: 'div', value: ',', before: ' ', after: '' },
34 - { type: 'word', value: '.5' }
35 - ]
36 - }
37 - ]
38 -}
39 -```
40 -
41 -If you wanted to convert each `rgba()` value in `sourceCSS` to a hex value, you could do so like this:
42 -
43 -```js
44 -var valueParser = require('postcss-value-parser');
45 -
46 -var parsed = valueParser(sourceCSS);
47 -
48 -// walk() will visit all the of the nodes in the tree,
49 -// invoking the callback for each.
50 -parsed.walk(function (node) {
51 -
52 - // Since we only want to transform rgba() values,
53 - // we can ignore anything else.
54 - if (node.type !== 'function' && node.value !== 'rgba') return;
55 -
56 - // We can make an array of the rgba() arguments to feed to a
57 - // convertToHex() function
58 - var color = node.nodes.filter(function (node) {
59 - return node.type === 'word';
60 - }).map(function (node) {
61 - return Number(node.value);
62 - }); // [233, 45, 66, .5]
63 -
64 - // Now we will transform the existing rgba() function node
65 - // into a word node with the hex value
66 - node.type = 'word';
67 - node.value = convertToHex(color);
68 -})
69 -
70 -parsed.toString(); // #E92D42
71 -```
72 -
73 -## Nodes
74 -
75 -Each node is an object with these common properties:
76 -
77 -- **type**: The type of node (`word`, `string`, `div`, `space`, `comment`, or `function`).
78 - Each type is documented below.
79 -- **value**: Each node has a `value` property; but what exactly `value` means
80 - is specific to the node type. Details are documented for each type below.
81 -- **sourceIndex**: The starting index of the node within the original source
82 - string. For example, given the source string `10px 20px`, the `word` node
83 - whose value is `20px` will have a `sourceIndex` of `5`.
84 -
85 -### word
86 -
87 -The catch-all node type that includes keywords (e.g. `no-repeat`),
88 -quantities (e.g. `20px`, `75%`, `1.5`), and hex colors (e.g. `#e6e6e6`).
89 -
90 -Node-specific properties:
91 -
92 -- **value**: The "word" itself.
93 -
94 -### string
95 -
96 -A quoted string value, e.g. `"something"` in `content: "something";`.
97 -
98 -Node-specific properties:
99 -
100 -- **value**: The text content of the string.
101 -- **quote**: The quotation mark surrounding the string, either `"` or `'`.
102 -- **unclosed**: `true` if the string was not closed properly. e.g. `"unclosed string `.
103 -
104 -### div
105 -
106 -A divider, for example
107 -
108 -- `,` in `animation-duration: 1s, 2s, 3s`
109 -- `/` in `border-radius: 10px / 23px`
110 -- `:` in `(min-width: 700px)`
111 -
112 -Node-specific properties:
113 -
114 -- **value**: The divider character. Either `,`, `/`, or `:` (see examples above).
115 -- **before**: Whitespace before the divider.
116 -- **after**: Whitespace after the divider.
117 -
118 -### space
119 -
120 -Whitespace used as a separator, e.g. ` ` occurring twice in `border: 1px solid black;`.
121 -
122 -Node-specific properties:
123 -
124 -- **value**: The whitespace itself.
125 -
126 -### comment
127 -
128 -A CSS comment starts with `/*` and ends with `*/`
129 -
130 -Node-specific properties:
131 -
132 -- **value**: The comment value without `/*` and `*/`
133 -- **unclosed**: `true` if the comment was not closed properly. e.g. `/* comment without an end `.
134 -
135 -### function
136 -
137 -A CSS function, e.g. `rgb(0,0,0)` or `url(foo.bar)`.
138 -
139 -Function nodes have nodes nested within them: the function arguments.
140 -
141 -Additional properties:
142 -
143 -- **value**: The name of the function, e.g. `rgb` in `rgb(0,0,0)`.
144 -- **before**: Whitespace after the opening parenthesis and before the first argument,
145 - e.g. ` ` in `rgb( 0,0,0)`.
146 -- **after**: Whitespace before the closing parenthesis and after the last argument,
147 - e.g. ` ` in `rgb(0,0,0 )`.
148 -- **nodes**: More nodes representing the arguments to the function.
149 -- **unclosed**: `true` if the parentheses was not closed properly. e.g. `( unclosed-function `.
150 -
151 -Media features surrounded by parentheses are considered functions with an
152 -empty value. For example, `(min-width: 700px)` parses to these nodes:
153 -
154 -```js
155 -[
156 - {
157 - type: 'function', value: '', before: '', after: '',
158 - nodes: [
159 - { type: 'word', value: 'min-width' },
160 - { type: 'div', value: ':', before: '', after: ' ' },
161 - { type: 'word', value: '700px' }
162 - ]
163 - }
164 -]
165 -```
166 -
167 -`url()` functions can be parsed a little bit differently depending on
168 -whether the first character in the argument is a quotation mark.
169 -
170 -`url( /gfx/img/bg.jpg )` parses to:
171 -
172 -```js
173 -{ type: 'function', sourceIndex: 0, value: 'url', before: ' ', after: ' ', nodes: [
174 - { type: 'word', sourceIndex: 5, value: '/gfx/img/bg.jpg' }
175 -] }
176 -```
177 -
178 -`url( "/gfx/img/bg.jpg" )`, on the other hand, parses to:
179 -
180 -```js
181 -{ type: 'function', sourceIndex: 0, value: 'url', before: ' ', after: ' ', nodes: [
182 - type: 'string', sourceIndex: 5, quote: '"', value: '/gfx/img/bg.jpg' },
183 -] }
184 -```
185 -
186 -## API
187 -
188 -```
189 -var valueParser = require('postcss-value-parser');
190 -```
191 -
192 -### valueParser.unit(quantity)
193 -
194 -Parses `quantity`, distinguishing the number from the unit. Returns an object like the following:
195 -
196 -```js
197 -// Given 2rem
198 -{
199 - number: '2',
200 - unit: 'rem'
201 -}
202 -```
203 -
204 -If the `quantity` argument cannot be parsed as a number, returns `false`.
205 -
206 -*This function does not parse complete values*: you cannot pass it `1px solid black` and expect `px` as
207 -the unit. Instead, you should pass it single quantities only. Parse `1px solid black`, then pass it
208 -the stringified `1px` node (a `word` node) to parse the number and unit.
209 -
210 -### valueParser.stringify(nodes[, custom])
211 -
212 -Stringifies a node or array of nodes.
213 -
214 -The `custom` function is called for each `node`; return a string to override the default behaviour.
215 -
216 -### valueParser.walk(nodes, callback[, bubble])
217 -
218 -Walks each provided node, recursively walking all descendent nodes within functions.
219 -
220 -Returning `false` in the `callback` will prevent traversal of descendent nodes (within functions).
221 -You can use this feature to for shallow iteration, walking over only the *immediate* children.
222 -*Note: This only applies if `bubble` is `false` (which is the default).*
223 -
224 -By default, the tree is walked from the outermost node inwards.
225 -To reverse the direction, pass `true` for the `bubble` argument.
226 -
227 -The `callback` is invoked with three arguments: `callback(node, index, nodes)`.
228 -
229 -- `node`: The current node.
230 -- `index`: The index of the current node.
231 -- `nodes`: The complete nodes array passed to `walk()`.
232 -
233 -Returns the `valueParser` instance.
234 -
235 -### var parsed = valueParser(value)
236 -
237 -Returns the parsed node tree.
238 -
239 -### parsed.nodes
240 -
241 -The array of nodes.
242 -
243 -### parsed.toString()
244 -
245 -Stringifies the node tree.
246 -
247 -### parsed.walk(callback[, bubble])
248 -
249 -Walks each node inside `parsed.nodes`. See the documentation for `valueParser.walk()` above.
250 -
251 -# License
252 -
253 -MIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)
1 -var parse = require("./parse");
2 -var walk = require("./walk");
3 -var stringify = require("./stringify");
4 -
5 -function ValueParser(value) {
6 - if (this instanceof ValueParser) {
7 - this.nodes = parse(value);
8 - return this;
9 - }
10 - return new ValueParser(value);
11 -}
12 -
13 -ValueParser.prototype.toString = function() {
14 - return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
15 -};
16 -
17 -ValueParser.prototype.walk = function(cb, bubble) {
18 - walk(this.nodes, cb, bubble);
19 - return this;
20 -};
21 -
22 -ValueParser.unit = require("./unit");
23 -
24 -ValueParser.walk = walk;
25 -
26 -ValueParser.stringify = stringify;
27 -
28 -module.exports = ValueParser;
1 -var openParentheses = "(".charCodeAt(0);
2 -var closeParentheses = ")".charCodeAt(0);
3 -var singleQuote = "'".charCodeAt(0);
4 -var doubleQuote = '"'.charCodeAt(0);
5 -var backslash = "\\".charCodeAt(0);
6 -var slash = "/".charCodeAt(0);
7 -var comma = ",".charCodeAt(0);
8 -var colon = ":".charCodeAt(0);
9 -var star = "*".charCodeAt(0);
10 -
11 -module.exports = function(input) {
12 - var tokens = [];
13 - var value = input;
14 -
15 - var next, quote, prev, token, escape, escapePos, whitespacePos;
16 - var pos = 0;
17 - var code = value.charCodeAt(pos);
18 - var max = value.length;
19 - var stack = [{ nodes: tokens }];
20 - var balanced = 0;
21 - var parent;
22 -
23 - var name = "";
24 - var before = "";
25 - var after = "";
26 -
27 - while (pos < max) {
28 - // Whitespaces
29 - if (code <= 32) {
30 - next = pos;
31 - do {
32 - next += 1;
33 - code = value.charCodeAt(next);
34 - } while (code <= 32);
35 - token = value.slice(pos, next);
36 -
37 - prev = tokens[tokens.length - 1];
38 - if (code === closeParentheses && balanced) {
39 - after = token;
40 - } else if (prev && prev.type === "div") {
41 - prev.after = token;
42 - } else if (
43 - code === comma ||
44 - code === colon ||
45 - (code === slash && value.charCodeAt(next + 1) !== star)
46 - ) {
47 - before = token;
48 - } else {
49 - tokens.push({
50 - type: "space",
51 - sourceIndex: pos,
52 - value: token
53 - });
54 - }
55 -
56 - pos = next;
57 -
58 - // Quotes
59 - } else if (code === singleQuote || code === doubleQuote) {
60 - next = pos;
61 - quote = code === singleQuote ? "'" : '"';
62 - token = {
63 - type: "string",
64 - sourceIndex: pos,
65 - quote: quote
66 - };
67 - do {
68 - escape = false;
69 - next = value.indexOf(quote, next + 1);
70 - if (~next) {
71 - escapePos = next;
72 - while (value.charCodeAt(escapePos - 1) === backslash) {
73 - escapePos -= 1;
74 - escape = !escape;
75 - }
76 - } else {
77 - value += quote;
78 - next = value.length - 1;
79 - token.unclosed = true;
80 - }
81 - } while (escape);
82 - token.value = value.slice(pos + 1, next);
83 -
84 - tokens.push(token);
85 - pos = next + 1;
86 - code = value.charCodeAt(pos);
87 -
88 - // Comments
89 - } else if (code === slash && value.charCodeAt(pos + 1) === star) {
90 - token = {
91 - type: "comment",
92 - sourceIndex: pos
93 - };
94 -
95 - next = value.indexOf("*/", pos);
96 - if (next === -1) {
97 - token.unclosed = true;
98 - next = value.length;
99 - }
100 -
101 - token.value = value.slice(pos + 2, next);
102 - tokens.push(token);
103 -
104 - pos = next + 2;
105 - code = value.charCodeAt(pos);
106 -
107 - // Dividers
108 - } else if (code === slash || code === comma || code === colon) {
109 - token = value[pos];
110 -
111 - tokens.push({
112 - type: "div",
113 - sourceIndex: pos - before.length,
114 - value: token,
115 - before: before,
116 - after: ""
117 - });
118 - before = "";
119 -
120 - pos += 1;
121 - code = value.charCodeAt(pos);
122 -
123 - // Open parentheses
124 - } else if (openParentheses === code) {
125 - // Whitespaces after open parentheses
126 - next = pos;
127 - do {
128 - next += 1;
129 - code = value.charCodeAt(next);
130 - } while (code <= 32);
131 - token = {
132 - type: "function",
133 - sourceIndex: pos - name.length,
134 - value: name,
135 - before: value.slice(pos + 1, next)
136 - };
137 - pos = next;
138 -
139 - if (name === "url" && code !== singleQuote && code !== doubleQuote) {
140 - next -= 1;
141 - do {
142 - escape = false;
143 - next = value.indexOf(")", next + 1);
144 - if (~next) {
145 - escapePos = next;
146 - while (value.charCodeAt(escapePos - 1) === backslash) {
147 - escapePos -= 1;
148 - escape = !escape;
149 - }
150 - } else {
151 - value += ")";
152 - next = value.length - 1;
153 - token.unclosed = true;
154 - }
155 - } while (escape);
156 - // Whitespaces before closed
157 - whitespacePos = next;
158 - do {
159 - whitespacePos -= 1;
160 - code = value.charCodeAt(whitespacePos);
161 - } while (code <= 32);
162 - if (pos !== whitespacePos + 1) {
163 - token.nodes = [
164 - {
165 - type: "word",
166 - sourceIndex: pos,
167 - value: value.slice(pos, whitespacePos + 1)
168 - }
169 - ];
170 - } else {
171 - token.nodes = [];
172 - }
173 - if (token.unclosed && whitespacePos + 1 !== next) {
174 - token.after = "";
175 - token.nodes.push({
176 - type: "space",
177 - sourceIndex: whitespacePos + 1,
178 - value: value.slice(whitespacePos + 1, next)
179 - });
180 - } else {
181 - token.after = value.slice(whitespacePos + 1, next);
182 - }
183 - pos = next + 1;
184 - code = value.charCodeAt(pos);
185 - tokens.push(token);
186 - } else {
187 - balanced += 1;
188 - token.after = "";
189 - tokens.push(token);
190 - stack.push(token);
191 - tokens = token.nodes = [];
192 - parent = token;
193 - }
194 - name = "";
195 -
196 - // Close parentheses
197 - } else if (closeParentheses === code && balanced) {
198 - pos += 1;
199 - code = value.charCodeAt(pos);
200 -
201 - parent.after = after;
202 - after = "";
203 - balanced -= 1;
204 - stack.pop();
205 - parent = stack[balanced];
206 - tokens = parent.nodes;
207 -
208 - // Words
209 - } else {
210 - next = pos;
211 - do {
212 - if (code === backslash) {
213 - next += 1;
214 - }
215 - next += 1;
216 - code = value.charCodeAt(next);
217 - } while (
218 - next < max &&
219 - !(
220 - code <= 32 ||
221 - code === singleQuote ||
222 - code === doubleQuote ||
223 - code === comma ||
224 - code === colon ||
225 - code === slash ||
226 - code === openParentheses ||
227 - (code === closeParentheses && balanced)
228 - )
229 - );
230 - token = value.slice(pos, next);
231 -
232 - if (openParentheses === code) {
233 - name = token;
234 - } else {
235 - tokens.push({
236 - type: "word",
237 - sourceIndex: pos,
238 - value: token
239 - });
240 - }
241 -
242 - pos = next;
243 - }
244 - }
245 -
246 - for (pos = stack.length - 1; pos; pos -= 1) {
247 - stack[pos].unclosed = true;
248 - }
249 -
250 - return stack[0].nodes;
251 -};
1 -function stringifyNode(node, custom) {
2 - var type = node.type;
3 - var value = node.value;
4 - var buf;
5 - var customResult;
6 -
7 - if (custom && (customResult = custom(node)) !== undefined) {
8 - return customResult;
9 - } else if (type === "word" || type === "space") {
10 - return value;
11 - } else if (type === "string") {
12 - buf = node.quote || "";
13 - return buf + value + (node.unclosed ? "" : buf);
14 - } else if (type === "comment") {
15 - return "/*" + value + (node.unclosed ? "" : "*/");
16 - } else if (type === "div") {
17 - return (node.before || "") + value + (node.after || "");
18 - } else if (Array.isArray(node.nodes)) {
19 - buf = stringify(node.nodes);
20 - if (type !== "function") {
21 - return buf;
22 - }
23 - return (
24 - value +
25 - "(" +
26 - (node.before || "") +
27 - buf +
28 - (node.after || "") +
29 - (node.unclosed ? "" : ")")
30 - );
31 - }
32 - return value;
33 -}
34 -
35 -function stringify(nodes, custom) {
36 - var result, i;
37 -
38 - if (Array.isArray(nodes)) {
39 - result = "";
40 - for (i = nodes.length - 1; ~i; i -= 1) {
41 - result = stringifyNode(nodes[i], custom) + result;
42 - }
43 - return result;
44 - }
45 - return stringifyNode(nodes, custom);
46 -}
47 -
48 -module.exports = stringify;
1 -var minus = "-".charCodeAt(0);
2 -var plus = "+".charCodeAt(0);
3 -var dot = ".".charCodeAt(0);
4 -var exp = "e".charCodeAt(0);
5 -var EXP = "E".charCodeAt(0);
6 -
7 -module.exports = function(value) {
8 - var pos = 0;
9 - var length = value.length;
10 - var dotted = false;
11 - var sciPos = -1;
12 - var containsNumber = false;
13 - var code;
14 -
15 - while (pos < length) {
16 - code = value.charCodeAt(pos);
17 -
18 - if (code >= 48 && code <= 57) {
19 - containsNumber = true;
20 - } else if (code === exp || code === EXP) {
21 - if (sciPos > -1) {
22 - break;
23 - }
24 - sciPos = pos;
25 - } else if (code === dot) {
26 - if (dotted) {
27 - break;
28 - }
29 - dotted = true;
30 - } else if (code === plus || code === minus) {
31 - if (pos !== 0) {
32 - break;
33 - }
34 - } else {
35 - break;
36 - }
37 -
38 - pos += 1;
39 - }
40 -
41 - if (sciPos + 1 === pos) pos--;
42 -
43 - return containsNumber
44 - ? {
45 - number: value.slice(0, pos),
46 - unit: value.slice(pos)
47 - }
48 - : false;
49 -};
1 -module.exports = function walk(nodes, cb, bubble) {
2 - var i, max, node, result;
3 -
4 - for (i = 0, max = nodes.length; i < max; i += 1) {
5 - node = nodes[i];
6 - if (!bubble) {
7 - result = cb(node, i, nodes);
8 - }
9 -
10 - if (
11 - result !== false &&
12 - node.type === "function" &&
13 - Array.isArray(node.nodes)
14 - ) {
15 - walk(node.nodes, cb, bubble);
16 - }
17 -
18 - if (bubble) {
19 - cb(node, i, nodes);
20 - }
21 - }
22 -};
1 -{
2 - "_from": "postcss-value-parser@^3.0.0",
3 - "_id": "postcss-value-parser@3.3.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==",
6 - "_location": "/postcss-ordered-values/postcss-value-parser",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "postcss-value-parser@^3.0.0",
12 - "name": "postcss-value-parser",
13 - "escapedName": "postcss-value-parser",
14 - "rawSpec": "^3.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^3.0.0"
17 - },
18 - "_requiredBy": [
19 - "/postcss-ordered-values"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz",
22 - "_shasum": "9ff822547e2893213cf1c30efa51ac5fd1ba8281",
23 - "_spec": "postcss-value-parser@^3.0.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\postcss-ordered-values",
25 - "author": {
26 - "name": "Bogdan Chadkin",
27 - "email": "trysound@yandex.ru"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/TrySound/postcss-value-parser/issues"
31 - },
32 - "bundleDependencies": false,
33 - "deprecated": false,
34 - "description": "Transforms css values and at-rule params into the tree",
35 - "devDependencies": {
36 - "eslint": "^5.6.1",
37 - "husky": "^1.0.0",
38 - "lint-staged": "^7.3.0",
39 - "prettier": "^1.4.4",
40 - "tap-spec": "^5.0.0",
41 - "tape": "^4.2.0"
42 - },
43 - "eslintConfig": {
44 - "env": {
45 - "es6": true,
46 - "node": true
47 - },
48 - "extends": "eslint:recommended"
49 - },
50 - "files": [
51 - "lib"
52 - ],
53 - "homepage": "https://github.com/TrySound/postcss-value-parser",
54 - "husky": {
55 - "hooks": {
56 - "pre-commit": "lint-staged"
57 - }
58 - },
59 - "keywords": [
60 - "postcss",
61 - "value",
62 - "parser"
63 - ],
64 - "license": "MIT",
65 - "lint-staged": {
66 - "*.js": [
67 - "eslint",
68 - "prettier --write",
69 - "git add"
70 - ]
71 - },
72 - "main": "lib/index.js",
73 - "name": "postcss-value-parser",
74 - "repository": {
75 - "type": "git",
76 - "url": "git+https://github.com/TrySound/postcss-value-parser.git"
77 - },
78 - "scripts": {
79 - "lint": "yarn lint:js && yarn lint:prettier",
80 - "lint:js": "eslint . --cache",
81 - "lint:prettier": "prettier '**/*.js' --list-different",
82 - "pretest": "yarn lint",
83 - "test": "tape test/*.js | tap-spec"
84 - },
85 - "version": "3.3.1"
86 -}
1 -{
2 - "_from": "postcss-ordered-values@^4.1.2",
3 - "_id": "postcss-ordered-values@4.1.2",
4 - "_inBundle": false,
5 - "_integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==",
6 - "_location": "/postcss-ordered-values",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "postcss-ordered-values@^4.1.2",
12 - "name": "postcss-ordered-values",
13 - "escapedName": "postcss-ordered-values",
14 - "rawSpec": "^4.1.2",
15 - "saveSpec": null,
16 - "fetchSpec": "^4.1.2"
17 - },
18 - "_requiredBy": [
19 - "/cssnano-preset-default"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz",
22 - "_shasum": "0cf75c820ec7d5c4d280189559e0b571ebac0eee",
23 - "_spec": "postcss-ordered-values@^4.1.2",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\cssnano-preset-default",
25 - "author": {
26 - "name": "Ben Briggs",
27 - "email": "beneb.info@gmail.com",
28 - "url": "http://beneb.info"
29 - },
30 - "bugs": {
31 - "url": "https://github.com/cssnano/cssnano/issues"
32 - },
33 - "bundleDependencies": false,
34 - "dependencies": {
35 - "cssnano-util-get-arguments": "^4.0.0",
36 - "postcss": "^7.0.0",
37 - "postcss-value-parser": "^3.0.0"
38 - },
39 - "deprecated": false,
40 - "description": "Ensure values are ordered consistently in your CSS.",
41 - "devDependencies": {
42 - "babel-cli": "^6.0.0",
43 - "cross-env": "^5.0.0"
44 - },
45 - "engines": {
46 - "node": ">=6.9.0"
47 - },
48 - "files": [
49 - "dist",
50 - "LICENSE-MIT"
51 - ],
52 - "homepage": "https://github.com/cssnano/cssnano",
53 - "keywords": [
54 - "css",
55 - "postcss",
56 - "postcss-plugin"
57 - ],
58 - "license": "MIT",
59 - "main": "dist/index.js",
60 - "name": "postcss-ordered-values",
61 - "repository": {
62 - "type": "git",
63 - "url": "git+https://github.com/cssnano/cssnano.git"
64 - },
65 - "scripts": {
66 - "prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/"
67 - },
68 - "version": "4.1.2"
69 -}
1 -# Changes to PostCSS Overflow Shorthand
2 -
3 -### 2.0.0 (September 17, 2018)
4 -
5 -- Updated: Support for PostCSS v7+
6 -- Updated: Support for Node v6+
7 -
8 -### 1.0.1 (May 8, 2018)
9 -
10 -- Fixed: Single `overflow` values previously being parsed
11 -
12 -### 1.0.0 (April 30, 2018)
13 -
14 -- Initial version
1 -# CC0 1.0 Universal
2 -
3 -## Statement of Purpose
4 -
5 -The laws of most jurisdictions throughout the world automatically confer
6 -exclusive Copyright and Related Rights (defined below) upon the creator and
7 -subsequent owner(s) (each and all, an “owner”) of an original work of
8 -authorship and/or a database (each, a “Work”).
9 -
10 -Certain owners wish to permanently relinquish those rights to a Work for the
11 -purpose of contributing to a commons of creative, cultural and scientific works
12 -(“Commons”) that the public can reliably and without fear of later claims of
13 -infringement build upon, modify, incorporate in other works, reuse and
14 -redistribute as freely as possible in any form whatsoever and for any purposes,
15 -including without limitation commercial purposes. These owners may contribute
16 -to the Commons to promote the ideal of a free culture and the further
17 -production of creative, cultural and scientific works, or to gain reputation or
18 -greater distribution for their Work in part through the use and efforts of
19 -others.
20 -
21 -For these and/or other purposes and motivations, and without any expectation of
22 -additional consideration or compensation, the person associating CC0 with a
23 -Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24 -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25 -publicly distribute the Work under its terms, with knowledge of his or her
26 -Copyright and Related Rights in the Work and the meaning and intended legal
27 -effect of CC0 on those rights.
28 -
29 -1. Copyright and Related Rights. A Work made available under CC0 may be
30 - protected by copyright and related or neighboring rights (“Copyright and
31 - Related Rights”). Copyright and Related Rights include, but are not limited
32 - to, the following:
33 - 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34 - and translate a Work;
35 - 2. moral rights retained by the original author(s) and/or performer(s);
36 - 3. publicity and privacy rights pertaining to a person’s image or likeness
37 - depicted in a Work;
38 - 4. rights protecting against unfair competition in regards to a Work,
39 - subject to the limitations in paragraph 4(i), below;
40 - 5. rights protecting the extraction, dissemination, use and reuse of data in
41 - a Work;
42 - 6. database rights (such as those arising under Directive 96/9/EC of the
43 - European Parliament and of the Council of 11 March 1996 on the legal
44 - protection of databases, and under any national implementation thereof,
45 - including any amended or successor version of such directive); and
46 - 7. other similar, equivalent or corresponding rights throughout the world
47 - based on applicable law or treaty, and any national implementations
48 - thereof.
49 -
50 -2. Waiver. To the greatest extent permitted by, but not in contravention of,
51 - applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52 - unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53 - and Related Rights and associated claims and causes of action, whether now
54 - known or unknown (including existing as well as future claims and causes of
55 - action), in the Work (i) in all territories worldwide, (ii) for the maximum
56 - duration provided by applicable law or treaty (including future time
57 - extensions), (iii) in any current or future medium and for any number of
58 - copies, and (iv) for any purpose whatsoever, including without limitation
59 - commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60 - makes the Waiver for the benefit of each member of the public at large and
61 - to the detriment of Affirmer’s heirs and successors, fully intending that
62 - such Waiver shall not be subject to revocation, rescission, cancellation,
63 - termination, or any other legal or equitable action to disrupt the quiet
64 - enjoyment of the Work by the public as contemplated by Affirmer’s express
65 - Statement of Purpose.
66 -
67 -3. Public License Fallback. Should any part of the Waiver for any reason be
68 - judged legally invalid or ineffective under applicable law, then the Waiver
69 - shall be preserved to the maximum extent permitted taking into account
70 - Affirmer’s express Statement of Purpose. In addition, to the extent the
71 - Waiver is so judged Affirmer hereby grants to each affected person a
72 - royalty-free, non transferable, non sublicensable, non exclusive,
73 - irrevocable and unconditional license to exercise Affirmer’s Copyright and
74 - Related Rights in the Work (i) in all territories worldwide, (ii) for the
75 - maximum duration provided by applicable law or treaty (including future time
76 - extensions), (iii) in any current or future medium and for any number of
77 - copies, and (iv) for any purpose whatsoever, including without limitation
78 - commercial, advertising or promotional purposes (the “License”). The License
79 - shall be deemed effective as of the date CC0 was applied by Affirmer to the
80 - Work. Should any part of the License for any reason be judged legally
81 - invalid or ineffective under applicable law, such partial invalidity or
82 - ineffectiveness shall not invalidate the remainder of the License, and in
83 - such case Affirmer hereby affirms that he or she will not (i) exercise any
84 - of his or her remaining Copyright and Related Rights in the Work or (ii)
85 - assert any associated claims and causes of action with respect to the Work,
86 - in either case contrary to Affirmer’s express Statement of Purpose.
87 -
88 -4. Limitations and Disclaimers.
89 - 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90 - surrendered, licensed or otherwise affected by this document.
91 - 2. Affirmer offers the Work as-is and makes no representations or warranties
92 - of any kind concerning the Work, express, implied, statutory or
93 - otherwise, including without limitation warranties of title,
94 - merchantability, fitness for a particular purpose, non infringement, or
95 - the absence of latent or other defects, accuracy, or the present or
96 - absence of errors, whether or not discoverable, all to the greatest
97 - extent permissible under applicable law.
98 - 3. Affirmer disclaims responsibility for clearing rights of other persons
99 - that may apply to the Work or any use thereof, including without
100 - limitation any person’s Copyright and Related Rights in the Work.
101 - Further, Affirmer disclaims responsibility for obtaining any necessary
102 - consents, permissions or other rights required for any use of the Work.
103 - 4. Affirmer understands and acknowledges that Creative Commons is not a
104 - party to this document and has no duty or obligation with respect to this
105 - CC0 or use of the Work.
106 -
107 -For more information, please see
108 -http://creativecommons.org/publicdomain/zero/1.0/.
1 -# PostCSS Overflow Shorthand [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2 -
3 -[![NPM Version][npm-img]][npm-url]
4 -[![CSS Standard Status][css-img]][css-url]
5 -[![Build Status][cli-img]][cli-url]
6 -[![Support Chat][git-img]][git-url]
7 -
8 -[PostCSS Overflow Shorthand] lets you use the `overflow` shorthand in CSS,
9 -following the [CSS Overflow] specification.
10 -
11 -```pcss
12 -html {
13 - overflow: hidden auto;
14 -}
15 -
16 -/* becomes */
17 -
18 -html {
19 - overflow-x: hidden;
20 - overflow-y: auto;
21 - overflow: hidden auto;
22 -}
23 -```
24 -
25 -## Usage
26 -
27 -Add [PostCSS Overflow Shorthand] to your project:
28 -
29 -```bash
30 -npm install postcss-overflow-shorthand --save-dev
31 -```
32 -
33 -Use [PostCSS Overflow Shorthand] to process your CSS:
34 -
35 -```js
36 -const postcssOverflowShorthand = require('postcss-overflow-shorthand');
37 -
38 -postcssOverflowShorthand.process(YOUR_CSS /*, processOptions, pluginOptions */);
39 -```
40 -
41 -Or use it as a [PostCSS] plugin:
42 -
43 -```js
44 -const postcss = require('postcss');
45 -const postcssOverflowShorthand = require('postcss-overflow-shorthand');
46 -
47 -postcss([
48 - postcssOverflowShorthand(/* pluginOptions */)
49 -]).process(YOUR_CSS /*, processOptions */);
50 -```
51 -
52 -[PostCSS Overflow Shorthand] runs in all Node environments, with special
53 -instructions for:
54 -
55 -| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
56 -| --- | --- | --- | --- | --- | --- |
57 -
58 -## Options
59 -
60 -### preserve
61 -
62 -The `preserve` option determines whether the original `overflow` declaration is
63 -preserved. By default, it is preserved.
64 -
65 -```js
66 -postcssOverflowShorthand({ preserve: false })
67 -```
68 -
69 -```pcss
70 -html {
71 - overflow: hidden auto;
72 -}
73 -
74 -/* becomes */
75 -
76 -html {
77 - overflow-x: hidden;
78 - overflow-y: auto;
79 -}
80 -```
81 -
82 -[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-overflow-shorthand.svg
83 -[cli-url]: https://travis-ci.org/jonathantneal/postcss-overflow-shorthand
84 -[css-img]: https://cssdb.org/badge/overflow-property.svg
85 -[css-url]: https://cssdb.org/#overflow-property
86 -[git-img]: https://img.shields.io/badge/support-chat-blue.svg
87 -[git-url]: https://gitter.im/postcss/postcss
88 -[npm-img]: https://img.shields.io/npm/v/postcss-overflow-shorthand.svg
89 -[npm-url]: https://www.npmjs.com/package/postcss-overflow-shorthand
90 -
91 -[CSS Overflow]: https://drafts.csswg.org/css-overflow/#propdef-overflow
92 -[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
93 -[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
94 -[PostCSS]: https://github.com/postcss/postcss
95 -[PostCSS Loader]: https://github.com/postcss/postcss-loader
96 -[PostCSS Overflow Shorthand]: https://github.com/jonathantneal/postcss-overflow-shorthand
1 -'use strict';
2 -
3 -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4 -
5 -var postcss = _interopDefault(require('postcss'));
6 -
7 -function _toArray(arr) {
8 - return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
9 -}
10 -
11 -function _arrayWithHoles(arr) {
12 - if (Array.isArray(arr)) return arr;
13 -}
14 -
15 -function _iterableToArray(iter) {
16 - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
17 -}
18 -
19 -function _nonIterableRest() {
20 - throw new TypeError("Invalid attempt to destructure non-iterable instance");
21 -}
22 -
23 -const space = postcss.list.space; // overflow shorthand property matcher
24 -
25 -const overflowPropertyRegExp = /^overflow$/i;
26 -var index = postcss.plugin('postcss-overflow-shorthand', opts => {
27 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;
28 - return root => {
29 - // for each overflow declaration
30 - root.walkDecls(overflowPropertyRegExp, decl => {
31 - // split the declaration values
32 - const _space = space(decl.value),
33 - _space2 = _toArray(_space),
34 - overflowX = _space2[0],
35 - overflowY = _space2[1],
36 - invalidatingValues = _space2.slice(2); // if there are two values, but no invalidating values
37 -
38 -
39 - if (overflowY && !invalidatingValues.length) {
40 - // insert the overflow-* longhand declarations
41 - decl.cloneBefore({
42 - prop: `${decl.prop}-x`,
43 - value: overflowX
44 - });
45 - decl.cloneBefore({
46 - prop: `${decl.prop}-y`,
47 - value: overflowY
48 - }); // conditionally remove the original declaration
49 -
50 - if (!preserve) {
51 - decl.remove();
52 - }
53 - }
54 - });
55 - };
56 -});
57 -
58 -module.exports = index;
59 -//# sourceMappingURL=index.cjs.js.map
1 -{"version":3,"file":"index.cjs.js","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\n\n// space-separated values splitter\nconst { list: { space } } = postcss\n\n// overflow shorthand property matcher\nconst overflowPropertyRegExp = /^overflow$/i;\n\nexport default postcss.plugin('postcss-overflow-shorthand', opts => {\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;\n\n\treturn root => {\n\t\t// for each overflow declaration\n\t\troot.walkDecls(overflowPropertyRegExp, decl => {\n\t\t\t// split the declaration values\n\t\t\tconst [overflowX, overflowY, ...invalidatingValues] = space(decl.value);\n\n\t\t\t// if there are two values, but no invalidating values\n\t\t\tif (overflowY && !invalidatingValues.length) {\n\t\t\t\t// insert the overflow-* longhand declarations\n\t\t\t\tdecl.cloneBefore({\n\t\t\t\t\tprop: `${decl.prop}-x`,\n\t\t\t\t\tvalue: overflowX\n\t\t\t\t});\n\n\t\t\t\tdecl.cloneBefore({\n\t\t\t\t\tprop: `${decl.prop}-y`,\n\t\t\t\t\tvalue: overflowY\n\t\t\t\t});\n\n\t\t\t\t// conditionally remove the original declaration\n\t\t\t\tif (!preserve) {\n\t\t\t\t\tdecl.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t};\n});\n"],"names":["space","postcss","list","overflowPropertyRegExp","plugin","opts","preserve","Object","Boolean","root","walkDecls","decl","value","overflowX","overflowY","invalidatingValues","length","cloneBefore","prop","remove"],"mappings":";;;;;;;;;;;;;;;;;;;;;;MAGgBA,QAAYC,QAApBC,KAAQF;;AAGhB,MAAMG,sBAAsB,GAAG,aAA/B;AAEA,YAAeF,OAAO,CAACG,MAAR,CAAe,4BAAf,EAA6CC,IAAI,IAAI;QAC7DC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACC,QAAN,CAApC,GAAsD,IAAvE;SAEOG,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeP,sBAAf,EAAuCQ,IAAI,IAAI;;qBAEQX,KAAK,CAACW,IAAI,CAACC,KAAN,CAFb;;YAEvCC,SAFuC;YAE5BC,SAF4B;YAEdC,kBAFc;;;UAK1CD,SAAS,IAAI,CAACC,kBAAkB,CAACC,MAArC,EAA6C;;QAE5CL,IAAI,CAACM,WAAL,CAAiB;UAChBC,IAAI,EAAG,GAAEP,IAAI,CAACO,IAAK,IADH;UAEhBN,KAAK,EAAEC;SAFR;QAKAF,IAAI,CAACM,WAAL,CAAiB;UAChBC,IAAI,EAAG,GAAEP,IAAI,CAACO,IAAK,IADH;UAEhBN,KAAK,EAAEE;SAFR,EAP4C;;YAaxC,CAACR,QAAL,EAAe;UACdK,IAAI,CAACQ,MAAL;;;KAnBH;GAFD;CAHc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -import postcss from 'postcss';
2 -
3 -function _toArray(arr) {
4 - return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();
5 -}
6 -
7 -function _arrayWithHoles(arr) {
8 - if (Array.isArray(arr)) return arr;
9 -}
10 -
11 -function _iterableToArray(iter) {
12 - if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter);
13 -}
14 -
15 -function _nonIterableRest() {
16 - throw new TypeError("Invalid attempt to destructure non-iterable instance");
17 -}
18 -
19 -const space = postcss.list.space; // overflow shorthand property matcher
20 -
21 -const overflowPropertyRegExp = /^overflow$/i;
22 -var index = postcss.plugin('postcss-overflow-shorthand', opts => {
23 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;
24 - return root => {
25 - // for each overflow declaration
26 - root.walkDecls(overflowPropertyRegExp, decl => {
27 - // split the declaration values
28 - const _space = space(decl.value),
29 - _space2 = _toArray(_space),
30 - overflowX = _space2[0],
31 - overflowY = _space2[1],
32 - invalidatingValues = _space2.slice(2); // if there are two values, but no invalidating values
33 -
34 -
35 - if (overflowY && !invalidatingValues.length) {
36 - // insert the overflow-* longhand declarations
37 - decl.cloneBefore({
38 - prop: `${decl.prop}-x`,
39 - value: overflowX
40 - });
41 - decl.cloneBefore({
42 - prop: `${decl.prop}-y`,
43 - value: overflowY
44 - }); // conditionally remove the original declaration
45 -
46 - if (!preserve) {
47 - decl.remove();
48 - }
49 - }
50 - });
51 - };
52 -});
53 -
54 -export default index;
55 -//# sourceMappingURL=index.es.mjs.map
1 -{"version":3,"file":"index.es.mjs","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\n\n// space-separated values splitter\nconst { list: { space } } = postcss\n\n// overflow shorthand property matcher\nconst overflowPropertyRegExp = /^overflow$/i;\n\nexport default postcss.plugin('postcss-overflow-shorthand', opts => {\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;\n\n\treturn root => {\n\t\t// for each overflow declaration\n\t\troot.walkDecls(overflowPropertyRegExp, decl => {\n\t\t\t// split the declaration values\n\t\t\tconst [overflowX, overflowY, ...invalidatingValues] = space(decl.value);\n\n\t\t\t// if there are two values, but no invalidating values\n\t\t\tif (overflowY && !invalidatingValues.length) {\n\t\t\t\t// insert the overflow-* longhand declarations\n\t\t\t\tdecl.cloneBefore({\n\t\t\t\t\tprop: `${decl.prop}-x`,\n\t\t\t\t\tvalue: overflowX\n\t\t\t\t});\n\n\t\t\t\tdecl.cloneBefore({\n\t\t\t\t\tprop: `${decl.prop}-y`,\n\t\t\t\t\tvalue: overflowY\n\t\t\t\t});\n\n\t\t\t\t// conditionally remove the original declaration\n\t\t\t\tif (!preserve) {\n\t\t\t\t\tdecl.remove();\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t};\n});\n"],"names":["space","postcss","list","overflowPropertyRegExp","plugin","opts","preserve","Object","Boolean","root","walkDecls","decl","value","overflowX","overflowY","invalidatingValues","length","cloneBefore","prop","remove"],"mappings":";;;;;;;;;;;;;;;;;;MAGgBA,QAAYC,QAApBC,KAAQF;;AAGhB,MAAMG,sBAAsB,GAAG,aAA/B;AAEA,YAAeF,OAAO,CAACG,MAAR,CAAe,4BAAf,EAA6CC,IAAI,IAAI;QAC7DC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACC,QAAN,CAApC,GAAsD,IAAvE;SAEOG,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeP,sBAAf,EAAuCQ,IAAI,IAAI;;qBAEQX,KAAK,CAACW,IAAI,CAACC,KAAN,CAFb;;YAEvCC,SAFuC;YAE5BC,SAF4B;YAEdC,kBAFc;;;UAK1CD,SAAS,IAAI,CAACC,kBAAkB,CAACC,MAArC,EAA6C;;QAE5CL,IAAI,CAACM,WAAL,CAAiB;UAChBC,IAAI,EAAG,GAAEP,IAAI,CAACO,IAAK,IADH;UAEhBN,KAAK,EAAEC;SAFR;QAKAF,IAAI,CAACM,WAAL,CAAiB;UAChBC,IAAI,EAAG,GAAEP,IAAI,CAACO,IAAK,IADH;UAEhBN,KAAK,EAAEE;SAFR,EAP4C;;YAaxC,CAACR,QAAL,EAAe;UACdK,IAAI,CAACQ,MAAL;;;KAnBH;GAFD;CAHc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "_from": "postcss-overflow-shorthand@^2.0.0",
3 - "_id": "postcss-overflow-shorthand@2.0.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-aK0fHc9CBNx8jbzMYhshZcEv8LtYnBIRYQD5i7w/K/wS9c2+0NSR6B3OVMu5y0hBHYLcMGjfU+dmWYNKH0I85g==",
6 - "_location": "/postcss-overflow-shorthand",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "postcss-overflow-shorthand@^2.0.0",
12 - "name": "postcss-overflow-shorthand",
13 - "escapedName": "postcss-overflow-shorthand",
14 - "rawSpec": "^2.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^2.0.0"
17 - },
18 - "_requiredBy": [
19 - "/postcss-preset-env"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-overflow-shorthand/-/postcss-overflow-shorthand-2.0.0.tgz",
22 - "_shasum": "31ecf350e9c6f6ddc250a78f0c3e111f32dd4c30",
23 - "_spec": "postcss-overflow-shorthand@^2.0.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\postcss-preset-env",
25 - "author": {
26 - "name": "Jonathan Neal",
27 - "email": "jonathantneal@hotmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/jonathantneal/postcss-overflow-shorthand/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "postcss": "^7.0.2"
35 - },
36 - "deprecated": false,
37 - "description": "Use the overflow shorthand in CSS",
38 - "devDependencies": {
39 - "@babel/core": "^7.0.0",
40 - "@babel/preset-env": "^7.0.0",
41 - "babel-eslint": "^9.0.0",
42 - "eslint": "^5.6.0",
43 - "eslint-config-dev": "^2.0.0",
44 - "postcss-tape": "^2.2.0",
45 - "pre-commit": "^1.2.2",
46 - "rollup": "^0.66.0",
47 - "rollup-plugin-babel": "^4.0.1"
48 - },
49 - "engines": {
50 - "node": ">=6.0.0"
51 - },
52 - "eslintConfig": {
53 - "extends": "dev",
54 - "parser": "babel-eslint"
55 - },
56 - "files": [
57 - "index.cjs.js",
58 - "index.cjs.js.map",
59 - "index.es.mjs",
60 - "index.es.mjs.map"
61 - ],
62 - "homepage": "https://github.com/jonathantneal/postcss-overflow-shorthand#readme",
63 - "keywords": [
64 - "postcss",
65 - "css",
66 - "postcss-plugin",
67 - "overflow",
68 - "properties",
69 - "shorthands",
70 - "values"
71 - ],
72 - "license": "CC0-1.0",
73 - "main": "index.cjs.js",
74 - "module": "index.es.mjs",
75 - "name": "postcss-overflow-shorthand",
76 - "repository": {
77 - "type": "git",
78 - "url": "git+https://github.com/jonathantneal/postcss-overflow-shorthand.git"
79 - },
80 - "scripts": {
81 - "prepublishOnly": "npm test",
82 - "pretest": "rollup -c .rollup.js --silent",
83 - "test": "echo 'Running tests...'; npm run test:js && npm run test:tape",
84 - "test:ec": "echint --ignore index.*.js test",
85 - "test:js": "eslint *.js --cache --ignore-path .gitignore --quiet",
86 - "test:tape": "postcss-tape"
87 - },
88 - "version": "2.0.0"
89 -}
1 -# Change Log
2 -This project adheres to [Semantic Versioning](http://semver.org/).
3 -
4 -## 2.0
5 -* Updated: Support for PostCSS v7+
6 -* Updated: Support for Node v6+
7 -
8 -## 1.0
9 -* Initial release
1 -The MIT License (MIT)
2 -
3 -Copyright 2017 AUTHOR_NAME <AUTHOR_EMAIL>
4 -
5 -Permission is hereby granted, free of charge, to any person obtaining a copy of
6 -this software and associated documentation files (the "Software"), to deal in
7 -the Software without restriction, including without limitation the rights to
8 -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 -the Software, and to permit persons to whom the Software is furnished to do so,
10 -subject to the following conditions:
11 -
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -# postcss-page-break [![Build Status][ci-img]][ci]
2 -
3 -[PostCSS] plugin to fallback `break-` properties with `page-break-` alias.
4 -
5 -[PostCSS]: https://github.com/postcss/postcss
6 -[ci-img]: https://travis-ci.org/shrpne/postcss-page-break.svg
7 -[ci]: https://travis-ci.org/shrpne/postcss-page-break
8 -
9 -```css
10 -/* before */
11 -.foo {
12 - break-inside: avoid;
13 - break-after: page;
14 -}
15 -
16 -/* after */
17 -.foo {
18 - page-break-inside: avoid;
19 - break-inside: avoid;
20 - page-break-after: always;
21 - break-after: page;
22 -}
23 -```
24 -
25 -Available fallbacks:
26 -```
27 -break-inside: auto => page-break-inside: auto
28 -break-inside: avoid => page-break-inside: avoid
29 -break-inside: avoid-page => page-break-inside: avoid
30 -break-inside: inherit => page-break-inside: inherit
31 -break-inside: initial => page-break-inside: initial
32 -break-inside: unset => page-break-inside: unset
33 -
34 -break-before: auto => page-break-before: auto;
35 -break-before: avoid => page-break-before: avoid;
36 -break-before: avoid-page => page-break-before: avoid;
37 -break-before: page => page-break-before: always;
38 -break-before: always => page-break-before: always;
39 -break-before: left => page-break-before: left;
40 -break-before: right => page-break-before: right;
41 -break-before: recto => page-break-before: recto;
42 -break-before: verso => page-break-before: verso;
43 -break-before: inherit => page-break-before: inherit;
44 -break-before: initial => page-break-before: initial;
45 -break-before: unset => page-break-before: unset;
46 -
47 -break-after: auto => page-break-after: auto;
48 -break-after: avoid => page-break-after: avoid;
49 -break-after: avoid-page => page-break-after: avoid;
50 -break-after: page => page-break-after: always;
51 -break-after: always => page-break-after: always;
52 -break-after: left => page-break-after: left;
53 -break-after: right => page-break-after: right;
54 -break-after: recto => page-break-after: recto;
55 -break-after: verso => page-break-after: verso;
56 -break-after: inherit => page-break-after: inherit;
57 -break-after: initial => page-break-after: initial;
58 -break-after: unset => page-break-after: unset;
59 -```
60 -
61 -
62 -## Usage
63 -
64 -```js
65 -postcss([ require('postcss-page-break') ])
66 -```
67 -
68 -See [PostCSS] docs for examples for your environment (webpack, gulp, grunt).
1 -var postcss = require('postcss');
2 -
3 -module.exports = postcss.plugin('postcss-page-break', function () {
4 -
5 - return function (root) {
6 -
7 - root.walkDecls(/^break-(inside|before|after)/, function (decl) {
8 - // do not process column|region related properties
9 - if (decl.value.search(/column|region/) >= 0) {
10 - return;
11 - }
12 -
13 - var newValue;
14 - switch (decl.value) {
15 - case 'page':
16 - newValue = 'always';
17 - break;
18 - case 'avoid-page':
19 - newValue = 'avoid';
20 - break;
21 - default:
22 - newValue = decl.value;
23 - }
24 -
25 - decl.cloneBefore({
26 - prop: 'page-' + decl.prop,
27 - value: newValue
28 - });
29 - });
30 -
31 - };
32 -});
1 -{
2 - "_from": "postcss-page-break@^2.0.0",
3 - "_id": "postcss-page-break@2.0.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-tkpTSrLpfLfD9HvgOlJuigLuk39wVTbbd8RKcy8/ugV2bNBUW3xU+AIqyxhDrQr1VUj1RmyJrBn1YWrqUm9zAQ==",
6 - "_location": "/postcss-page-break",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "postcss-page-break@^2.0.0",
12 - "name": "postcss-page-break",
13 - "escapedName": "postcss-page-break",
14 - "rawSpec": "^2.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^2.0.0"
17 - },
18 - "_requiredBy": [
19 - "/postcss-preset-env"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-2.0.0.tgz",
22 - "_shasum": "add52d0e0a528cabe6afee8b46e2abb277df46bf",
23 - "_spec": "postcss-page-break@^2.0.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\postcss-preset-env",
25 - "author": {
26 - "name": "shrpne",
27 - "email": "shrpne@gmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/shrpne/postcss-page-break/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "postcss": "^7.0.2"
35 - },
36 - "deprecated": false,
37 - "description": "PostCSS plugin postcss-page-break to fallback `break-` properties with `page-break-` alias",
38 - "devDependencies": {
39 - "eslint": "^4.15.0",
40 - "eslint-config-postcss": "^2.0.2",
41 - "jest": "^21.0.0"
42 - },
43 - "eslintConfig": {
44 - "extends": "eslint-config-postcss/es5",
45 - "rules": {
46 - "indent": [
47 - "error",
48 - 4,
49 - {
50 - "SwitchCase": 1
51 - }
52 - ],
53 - "max-len": [
54 - "off"
55 - ]
56 - },
57 - "env": {
58 - "jest": true
59 - }
60 - },
61 - "homepage": "https://github.com/shrpne/postcss-page-break",
62 - "keywords": [
63 - "postcss",
64 - "css",
65 - "postcss-plugin",
66 - "break",
67 - "break-inside",
68 - "page-break-inside",
69 - "avoid"
70 - ],
71 - "license": "MIT",
72 - "name": "postcss-page-break",
73 - "repository": {
74 - "type": "git",
75 - "url": "git+https://github.com/shrpne/postcss-page-break.git"
76 - },
77 - "scripts": {
78 - "test": "jest && eslint *.js"
79 - },
80 - "version": "2.0.0"
81 -}
1 -# Changes to PostCSS Place Properties
2 -
3 -### 4.0.1 (September 18, 2018)
4 -
5 -- Updated: PostCSS Values Parser 2 (patch for this project)
6 -
7 -### 4.0.0 (September 17, 2018)
8 -
9 -- Updated: Support for PostCSS v7+
10 -- Updated: Support for Node v6+
11 -
12 -### 3.0.1 (May 8, 2018)
13 -
14 -- Updated: `postcss-values-parser` to v1.5.0 (major)
15 -- Updated: `postcss` to v6.0.22 (patch)
16 -
17 -### 2.0.0 (June 30, 2017)
18 -
19 -- Added: Node 4+ compatibility
20 -- Added: PostCSS 6+ compatibility
21 -
22 -### 1.0.2 (December 8, 2016)
23 -
24 -- Updated: Use destructing assignment on plugin options
25 -- Updated: Use template literals
26 -
27 -### 1.0.1 (December 6, 2016)
28 -
29 -- Updated: boilerplate conventions (`postcss-tape`)
30 -
31 -### 1.0.0 (November 25, 2016)
32 -
33 -- Initial version
1 -# CC0 1.0 Universal
2 -
3 -## Statement of Purpose
4 -
5 -The laws of most jurisdictions throughout the world automatically confer
6 -exclusive Copyright and Related Rights (defined below) upon the creator and
7 -subsequent owner(s) (each and all, an “owner”) of an original work of
8 -authorship and/or a database (each, a “Work”).
9 -
10 -Certain owners wish to permanently relinquish those rights to a Work for the
11 -purpose of contributing to a commons of creative, cultural and scientific works
12 -(“Commons”) that the public can reliably and without fear of later claims of
13 -infringement build upon, modify, incorporate in other works, reuse and
14 -redistribute as freely as possible in any form whatsoever and for any purposes,
15 -including without limitation commercial purposes. These owners may contribute
16 -to the Commons to promote the ideal of a free culture and the further
17 -production of creative, cultural and scientific works, or to gain reputation or
18 -greater distribution for their Work in part through the use and efforts of
19 -others.
20 -
21 -For these and/or other purposes and motivations, and without any expectation of
22 -additional consideration or compensation, the person associating CC0 with a
23 -Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24 -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25 -publicly distribute the Work under its terms, with knowledge of his or her
26 -Copyright and Related Rights in the Work and the meaning and intended legal
27 -effect of CC0 on those rights.
28 -
29 -1. Copyright and Related Rights. A Work made available under CC0 may be
30 - protected by copyright and related or neighboring rights (“Copyright and
31 - Related Rights”). Copyright and Related Rights include, but are not limited
32 - to, the following:
33 - 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34 - and translate a Work;
35 - 2. moral rights retained by the original author(s) and/or performer(s);
36 - 3. publicity and privacy rights pertaining to a person’s image or likeness
37 - depicted in a Work;
38 - 4. rights protecting against unfair competition in regards to a Work,
39 - subject to the limitations in paragraph 4(i), below;
40 - 5. rights protecting the extraction, dissemination, use and reuse of data in
41 - a Work;
42 - 6. database rights (such as those arising under Directive 96/9/EC of the
43 - European Parliament and of the Council of 11 March 1996 on the legal
44 - protection of databases, and under any national implementation thereof,
45 - including any amended or successor version of such directive); and
46 - 7. other similar, equivalent or corresponding rights throughout the world
47 - based on applicable law or treaty, and any national implementations
48 - thereof.
49 -
50 -2. Waiver. To the greatest extent permitted by, but not in contravention of,
51 - applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52 - unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53 - and Related Rights and associated claims and causes of action, whether now
54 - known or unknown (including existing as well as future claims and causes of
55 - action), in the Work (i) in all territories worldwide, (ii) for the maximum
56 - duration provided by applicable law or treaty (including future time
57 - extensions), (iii) in any current or future medium and for any number of
58 - copies, and (iv) for any purpose whatsoever, including without limitation
59 - commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60 - makes the Waiver for the benefit of each member of the public at large and
61 - to the detriment of Affirmer’s heirs and successors, fully intending that
62 - such Waiver shall not be subject to revocation, rescission, cancellation,
63 - termination, or any other legal or equitable action to disrupt the quiet
64 - enjoyment of the Work by the public as contemplated by Affirmer’s express
65 - Statement of Purpose.
66 -
67 -3. Public License Fallback. Should any part of the Waiver for any reason be
68 - judged legally invalid or ineffective under applicable law, then the Waiver
69 - shall be preserved to the maximum extent permitted taking into account
70 - Affirmer’s express Statement of Purpose. In addition, to the extent the
71 - Waiver is so judged Affirmer hereby grants to each affected person a
72 - royalty-free, non transferable, non sublicensable, non exclusive,
73 - irrevocable and unconditional license to exercise Affirmer’s Copyright and
74 - Related Rights in the Work (i) in all territories worldwide, (ii) for the
75 - maximum duration provided by applicable law or treaty (including future time
76 - extensions), (iii) in any current or future medium and for any number of
77 - copies, and (iv) for any purpose whatsoever, including without limitation
78 - commercial, advertising or promotional purposes (the “License”). The License
79 - shall be deemed effective as of the date CC0 was applied by Affirmer to the
80 - Work. Should any part of the License for any reason be judged legally
81 - invalid or ineffective under applicable law, such partial invalidity or
82 - ineffectiveness shall not invalidate the remainder of the License, and in
83 - such case Affirmer hereby affirms that he or she will not (i) exercise any
84 - of his or her remaining Copyright and Related Rights in the Work or (ii)
85 - assert any associated claims and causes of action with respect to the Work,
86 - in either case contrary to Affirmer’s express Statement of Purpose.
87 -
88 -4. Limitations and Disclaimers.
89 - 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90 - surrendered, licensed or otherwise affected by this document.
91 - 2. Affirmer offers the Work as-is and makes no representations or warranties
92 - of any kind concerning the Work, express, implied, statutory or
93 - otherwise, including without limitation warranties of title,
94 - merchantability, fitness for a particular purpose, non infringement, or
95 - the absence of latent or other defects, accuracy, or the present or
96 - absence of errors, whether or not discoverable, all to the greatest
97 - extent permissible under applicable law.
98 - 3. Affirmer disclaims responsibility for clearing rights of other persons
99 - that may apply to the Work or any use thereof, including without
100 - limitation any person’s Copyright and Related Rights in the Work.
101 - Further, Affirmer disclaims responsibility for obtaining any necessary
102 - consents, permissions or other rights required for any use of the Work.
103 - 4. Affirmer understands and acknowledges that Creative Commons is not a
104 - party to this document and has no duty or obligation with respect to this
105 - CC0 or use of the Work.
106 -
107 -For more information, please see
108 -http://creativecommons.org/publicdomain/zero/1.0/.
1 -# PostCSS Place Properties [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2 -
3 -[![NPM Version][npm-img]][npm-url]
4 -[![CSS Standard Status][css-img]][css-url]
5 -[![Build Status][cli-img]][cli-url]
6 -[![Support Chat][git-img]][git-url]
7 -
8 -[PostCSS Place Properties] lets you use `place-*` properties as shorthands for `align-*`
9 -and `justify-*`, following the [CSS Box Alignment] specification.
10 -
11 -```pcss
12 -.example {
13 - place-self: center;
14 - place-content: space-between center;
15 -}
16 -
17 -/* becomes */
18 -
19 -.example {
20 - align-self: center;
21 - justify-self: center;
22 - place-self: center;
23 - align-content: space-between;
24 - justify-content: center;
25 - place-content: space-between center;
26 -}
27 -```
28 -
29 -## Usage
30 -
31 -Add [PostCSS Place Properties] to your project:
32 -
33 -```bash
34 -npm install postcss-place --save-dev
35 -```
36 -
37 -Use [PostCSS Place Properties] to process your CSS:
38 -
39 -```js
40 -import postcssPlace from 'postcss-place';
41 -
42 -postcssPlace.process(YOUR_CSS /*, processOptions, pluginOptions */);
43 -```
44 -
45 -Or use it as a [PostCSS] plugin:
46 -
47 -```js
48 -import postcss from 'postcss';
49 -import postcssPlace from 'postcss-place';
50 -
51 -postcss([
52 - postcssPlace(/* pluginOptions */)
53 -]).process(YOUR_CSS /*, processOptions */);
54 -```
55 -
56 -[PostCSS Place Properties] runs in all Node environments, with special instructions for:
57 -
58 -| [Node](INSTALL.md#node) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
59 -| --- | --- | --- | --- | --- |
60 -
61 -## Options
62 -
63 -### preserve
64 -
65 -The `preserve` option determines whether the original place declaration is
66 -preserved. By default, it is preserved.
67 -
68 -```js
69 -postcssPlace({ preserve: false })
70 -```
71 -
72 -```pcss
73 -.example {
74 - place-self: center;
75 - place-content: space-between center;
76 -}
77 -
78 -/* becomes */
79 -
80 -.example {
81 - align-self: center;
82 - justify-self: center;
83 - align-content: space-between;
84 - justify-content: center;
85 -}
86 -```
87 -
88 -[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-place.svg
89 -[cli-url]: https://travis-ci.org/jonathantneal/postcss-place
90 -[css-img]: https://cssdb.org/badge/place-properties.svg
91 -[css-url]: https://cssdb.org/#place-properties
92 -[git-img]: https://img.shields.io/badge/support-chat-blue.svg
93 -[git-url]: https://gitter.im/postcss/postcss
94 -[npm-img]: https://img.shields.io/npm/v/postcss-place.svg
95 -[npm-url]: https://www.npmjs.com/package/postcss-place
96 -
97 -[CSS Box Alignment]: https://www.w3.org/TR/css-align-3/#place-content
98 -[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
99 -[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
100 -[PostCSS]: https://github.com/postcss/postcss
101 -[PostCSS Loader]: https://github.com/postcss/postcss-loader
102 -[PostCSS Place Properties]: https://github.com/jonathantneal/postcss-place
1 -'use strict';
2 -
3 -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4 -
5 -var postcss = _interopDefault(require('postcss'));
6 -var parser = _interopDefault(require('postcss-values-parser'));
7 -
8 -const placeMatch = /^place-(content|items|self)/;
9 -var index = postcss.plugin('postcss-place', opts => {
10 - // prepare options
11 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.prefix) : true;
12 - return root => {
13 - // walk each matching declaration
14 - root.walkDecls(placeMatch, decl => {
15 - // alignment
16 - const alignment = decl.prop.match(placeMatch)[1]; // value ast and child nodes
17 -
18 - const value = parser(decl.value).parse();
19 - const children = value.nodes[0].nodes; // new justify-[alignment] and align-[alignment] declarations
20 -
21 - const alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();
22 - const justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();
23 - decl.cloneBefore({
24 - prop: `align-${alignment}`,
25 - value: alignValue
26 - });
27 - decl.cloneBefore({
28 - prop: `justify-${alignment}`,
29 - value: justifyValue
30 - }); // conditionally remove place-[alignment]
31 -
32 - if (!preserve) {
33 - decl.remove();
34 - }
35 - });
36 - };
37 -});
38 -
39 -module.exports = index;
40 -//# sourceMappingURL=index.cjs.js.map
1 -{"version":3,"file":"index.cjs.js","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\nimport parser from 'postcss-values-parser';\n\nconst placeMatch = /^place-(content|items|self)/;\n\nexport default postcss.plugin('postcss-place', opts => {\n\t// prepare options\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.prefix) : true;\n\n\treturn root => {\n\t\t// walk each matching declaration\n\t\troot.walkDecls(placeMatch, decl => {\n\t\t\t// alignment\n\t\t\tconst alignment = decl.prop.match(placeMatch)[1];\n\n\t\t\t// value ast and child nodes\n\t\t\tconst value = parser(decl.value).parse();\n\t\t\tconst children = value.nodes[0].nodes;\n\n\t\t\t// new justify-[alignment] and align-[alignment] declarations\n\t\t\tconst alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();\n\t\t\tconst justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();\n\n\t\t\tdecl.cloneBefore({\n\t\t\t\tprop: `align-${alignment}`,\n\t\t\t\tvalue: alignValue\n\t\t\t});\n\n\t\t\tdecl.cloneBefore({\n\t\t\t\tprop: `justify-${alignment}`,\n\t\t\t\tvalue: justifyValue\n\t\t\t});\n\n\t\t\t// conditionally remove place-[alignment]\n\t\t\tif (!preserve) {\n\t\t\t\tdecl.remove();\n\t\t\t}\n\t\t});\n\t};\n});\n"],"names":["placeMatch","postcss","plugin","opts","preserve","Object","Boolean","prefix","root","walkDecls","decl","alignment","prop","match","value","parser","parse","children","nodes","alignValue","length","String","slice","trim","justifyValue","cloneBefore","remove"],"mappings":";;;;;;;AAGA,MAAMA,UAAU,GAAG,6BAAnB;AAEA,YAAeC,OAAO,CAACC,MAAR,CAAe,eAAf,EAAgCC,IAAI,IAAI;;QAEhDC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACI,MAAN,CAApC,GAAoD,IAArE;SAEOC,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeT,UAAf,EAA2BU,IAAI,IAAI;;YAE5BC,SAAS,GAAGD,IAAI,CAACE,IAAL,CAAUC,KAAV,CAAgBb,UAAhB,EAA4B,CAA5B,CAAlB,CAFkC;;YAK5Bc,KAAK,GAAGC,MAAM,CAACL,IAAI,CAACI,KAAN,CAAN,CAAmBE,KAAnB,EAAd;YACMC,QAAQ,GAAGH,KAAK,CAACI,KAAN,CAAY,CAAZ,EAAeA,KAAhC,CANkC;;YAS5BC,UAAU,GAAGF,QAAQ,CAACG,MAAT,KAAoB,CAApB,GAAwBV,IAAI,CAACI,KAA7B,GAAqCO,MAAM,CAACJ,QAAQ,CAACK,KAAT,CAAe,CAAf,EAAkB,CAAlB,CAAD,CAAN,CAA6BC,IAA7B,EAAxD;YACMC,YAAY,GAAGP,QAAQ,CAACG,MAAT,KAAoB,CAApB,GAAwBV,IAAI,CAACI,KAA7B,GAAqCO,MAAM,CAACJ,QAAQ,CAACK,KAAT,CAAe,CAAf,CAAD,CAAN,CAA0BC,IAA1B,EAA1D;MAEAb,IAAI,CAACe,WAAL,CAAiB;QAChBb,IAAI,EAAG,SAAQD,SAAU,EADT;QAEhBG,KAAK,EAAEK;OAFR;MAKAT,IAAI,CAACe,WAAL,CAAiB;QAChBb,IAAI,EAAG,WAAUD,SAAU,EADX;QAEhBG,KAAK,EAAEU;OAFR,EAjBkC;;UAuB9B,CAACpB,QAAL,EAAe;QACdM,IAAI,CAACgB,MAAL;;KAxBF;GAFD;CAJc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -import postcss from 'postcss';
2 -import parser from 'postcss-values-parser';
3 -
4 -const placeMatch = /^place-(content|items|self)/;
5 -var index = postcss.plugin('postcss-place', opts => {
6 - // prepare options
7 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.prefix) : true;
8 - return root => {
9 - // walk each matching declaration
10 - root.walkDecls(placeMatch, decl => {
11 - // alignment
12 - const alignment = decl.prop.match(placeMatch)[1]; // value ast and child nodes
13 -
14 - const value = parser(decl.value).parse();
15 - const children = value.nodes[0].nodes; // new justify-[alignment] and align-[alignment] declarations
16 -
17 - const alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();
18 - const justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();
19 - decl.cloneBefore({
20 - prop: `align-${alignment}`,
21 - value: alignValue
22 - });
23 - decl.cloneBefore({
24 - prop: `justify-${alignment}`,
25 - value: justifyValue
26 - }); // conditionally remove place-[alignment]
27 -
28 - if (!preserve) {
29 - decl.remove();
30 - }
31 - });
32 - };
33 -});
34 -
35 -export default index;
36 -//# sourceMappingURL=index.es.mjs.map
1 -{"version":3,"file":"index.es.mjs","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\nimport parser from 'postcss-values-parser';\n\nconst placeMatch = /^place-(content|items|self)/;\n\nexport default postcss.plugin('postcss-place', opts => {\n\t// prepare options\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.prefix) : true;\n\n\treturn root => {\n\t\t// walk each matching declaration\n\t\troot.walkDecls(placeMatch, decl => {\n\t\t\t// alignment\n\t\t\tconst alignment = decl.prop.match(placeMatch)[1];\n\n\t\t\t// value ast and child nodes\n\t\t\tconst value = parser(decl.value).parse();\n\t\t\tconst children = value.nodes[0].nodes;\n\n\t\t\t// new justify-[alignment] and align-[alignment] declarations\n\t\t\tconst alignValue = children.length === 1 ? decl.value : String(children.slice(0, 1)).trim();\n\t\t\tconst justifyValue = children.length === 1 ? decl.value : String(children.slice(1)).trim();\n\n\t\t\tdecl.cloneBefore({\n\t\t\t\tprop: `align-${alignment}`,\n\t\t\t\tvalue: alignValue\n\t\t\t});\n\n\t\t\tdecl.cloneBefore({\n\t\t\t\tprop: `justify-${alignment}`,\n\t\t\t\tvalue: justifyValue\n\t\t\t});\n\n\t\t\t// conditionally remove place-[alignment]\n\t\t\tif (!preserve) {\n\t\t\t\tdecl.remove();\n\t\t\t}\n\t\t});\n\t};\n});\n"],"names":["placeMatch","postcss","plugin","opts","preserve","Object","Boolean","prefix","root","walkDecls","decl","alignment","prop","match","value","parser","parse","children","nodes","alignValue","length","String","slice","trim","justifyValue","cloneBefore","remove"],"mappings":";;;AAGA,MAAMA,UAAU,GAAG,6BAAnB;AAEA,YAAeC,OAAO,CAACC,MAAR,CAAe,eAAf,EAAgCC,IAAI,IAAI;;QAEhDC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACI,MAAN,CAApC,GAAoD,IAArE;SAEOC,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeT,UAAf,EAA2BU,IAAI,IAAI;;YAE5BC,SAAS,GAAGD,IAAI,CAACE,IAAL,CAAUC,KAAV,CAAgBb,UAAhB,EAA4B,CAA5B,CAAlB,CAFkC;;YAK5Bc,KAAK,GAAGC,MAAM,CAACL,IAAI,CAACI,KAAN,CAAN,CAAmBE,KAAnB,EAAd;YACMC,QAAQ,GAAGH,KAAK,CAACI,KAAN,CAAY,CAAZ,EAAeA,KAAhC,CANkC;;YAS5BC,UAAU,GAAGF,QAAQ,CAACG,MAAT,KAAoB,CAApB,GAAwBV,IAAI,CAACI,KAA7B,GAAqCO,MAAM,CAACJ,QAAQ,CAACK,KAAT,CAAe,CAAf,EAAkB,CAAlB,CAAD,CAAN,CAA6BC,IAA7B,EAAxD;YACMC,YAAY,GAAGP,QAAQ,CAACG,MAAT,KAAoB,CAApB,GAAwBV,IAAI,CAACI,KAA7B,GAAqCO,MAAM,CAACJ,QAAQ,CAACK,KAAT,CAAe,CAAf,CAAD,CAAN,CAA0BC,IAA1B,EAA1D;MAEAb,IAAI,CAACe,WAAL,CAAiB;QAChBb,IAAI,EAAG,SAAQD,SAAU,EADT;QAEhBG,KAAK,EAAEK;OAFR;MAKAT,IAAI,CAACe,WAAL,CAAiB;QAChBb,IAAI,EAAG,WAAUD,SAAU,EADX;QAEhBG,KAAK,EAAEU;OAFR,EAjBkC;;UAuB9B,CAACpB,QAAL,EAAe;QACdM,IAAI,CAACgB,MAAL;;KAxBF;GAFD;CAJc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -{
2 - "_from": "postcss-place@^4.0.1",
3 - "_id": "postcss-place@4.0.1",
4 - "_inBundle": false,
5 - "_integrity": "sha512-Zb6byCSLkgRKLODj/5mQugyuj9bvAAw9LqJJjgwz5cYryGeXfFZfSXoP1UfveccFmeq0b/2xxwcTEVScnqGxBg==",
6 - "_location": "/postcss-place",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "postcss-place@^4.0.1",
12 - "name": "postcss-place",
13 - "escapedName": "postcss-place",
14 - "rawSpec": "^4.0.1",
15 - "saveSpec": null,
16 - "fetchSpec": "^4.0.1"
17 - },
18 - "_requiredBy": [
19 - "/postcss-preset-env"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-place/-/postcss-place-4.0.1.tgz",
22 - "_shasum": "e9f39d33d2dc584e46ee1db45adb77ca9d1dcc62",
23 - "_spec": "postcss-place@^4.0.1",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\postcss-preset-env",
25 - "author": {
26 - "name": "Jonathan Neal",
27 - "email": "jonathantneal@hotmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/jonathantneal/postcss-place/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "postcss": "^7.0.2",
35 - "postcss-values-parser": "^2.0.0"
36 - },
37 - "deprecated": false,
38 - "description": "Use a place-* shorthand for align-* and justify-* in CSS",
39 - "devDependencies": {
40 - "@babel/core": "^7.1.0",
41 - "@babel/preset-env": "^7.1.0",
42 - "babel-eslint": "^9.0.0",
43 - "eslint": "^5.6.0",
44 - "eslint-config-dev": "^2.0.0",
45 - "postcss-tape": "^2.2.0",
46 - "pre-commit": "^1.2.2",
47 - "rollup": "^0.66.0",
48 - "rollup-plugin-babel": "^4.0.3"
49 - },
50 - "engines": {
51 - "node": ">=6.0.0"
52 - },
53 - "eslintConfig": {
54 - "extends": "dev",
55 - "parser": "babel-eslint"
56 - },
57 - "files": [
58 - "index.cjs.js",
59 - "index.cjs.js.map",
60 - "index.es.mjs",
61 - "index.es.mjs.map"
62 - ],
63 - "homepage": "https://github.com/jonathantneal/postcss-place#readme",
64 - "keywords": [
65 - "postcss",
66 - "css",
67 - "postcss-plugin",
68 - "shorthands",
69 - "alignments",
70 - "justifies",
71 - "justify",
72 - "aligns",
73 - "contents",
74 - "selfs"
75 - ],
76 - "license": "CC0-1.0",
77 - "main": "index.cjs.js",
78 - "module": "index.es.mjs",
79 - "name": "postcss-place",
80 - "repository": {
81 - "type": "git",
82 - "url": "git+https://github.com/jonathantneal/postcss-place.git"
83 - },
84 - "scripts": {
85 - "prepublishOnly": "npm test",
86 - "pretest": "rollup -c .rollup.js --silent",
87 - "test": "echo 'Running tests...'; npm run test:js && npm run test:tape",
88 - "test:ec": "echint --ignore index.*.js test",
89 - "test:js": "eslint *.js --cache --ignore-path .gitignore --quiet",
90 - "test:tape": "postcss-tape"
91 - },
92 - "version": "4.0.1"
93 -}
1 -# Changes to PostCSS Preset Env
2 -
3 -### 6.7.0 (July 8, 2019)
4 -
5 -- Fixed the issue of autoprefixer alerting an upcoming change to the API
6 -- Updated `autoprefixer` to 9.6.1 (minor)
7 -- Updated `browserslist` to 4.6.4 (minor)
8 -- Updated `cssdb` to 4.4.0 (minor)
9 -- Updated `caniuse-lite` to 1.0.30000981 (patch)
10 -- Updated `postcss` to 7.0.17 (patch)
11 -- Updated `postcss-color-hex-alpha` to 5.0.3 (patch)
12 -- Updated `postcss-custom-media` to 7.0.8 (patch)
13 -- Updated `postcss-custom-properties` to 8.0.11 (patch)
14 -
15 -### 6.6.0 (February 28, 2019)
16 -
17 -- Moved browserslist detection from using each input file per process to using
18 - the working directory on intialization, as was implied by the documentation.
19 - If fixing this previously undocumented behavior causes any harm to existing
20 - projects, it can be easily rolled back in a subsequent patch. For the
21 - majority of projects — those with a singular browserslist configuration and
22 - potentially many individually processed CSS files — we should expect reported
23 - build times around 35 seconds to drop to less than 2 seconds.
24 -- Updated `browserslist` to 4.4.2 (minor)
25 -- Updated `autoprefixer` to 9.4.9 (patch)
26 -- Updated `caniuse-lite` to 1.0.30000939 (patch)
27 -- Updated `postcss` to 7.0.14 (patch)
28 -- Updated `postcss-attribute-case-insensitive` to 4.0.1 (patch)
29 -
30 -### 6.5.0 (December 12, 2018)
31 -
32 -- Added `css-blank-pseudo` polyfill
33 -- Added `css-has-pseudo` polyfill
34 -- Updated `autoprefixer` to 9.4.2 (minor)
35 -- Updated `browserslist` to 4.3.5 (minor)
36 -- Updated `caniuse-lite` to 1.0.30000918 (patch)
37 -- Updated `css-prefers-color-scheme` to 3.1.1 (minor, patch for this project)
38 -- Updated `cssdb` to 4.3.0 (minor)
39 -- Updated `postcss` to 7.0.6 (patch)
40 -
41 -### 6.4.0 (November 6, 2018)
42 -
43 -- Fixed `exportTo` option to export Custom Media, Custom Properties, and Custom
44 - Selectors all to the same function, object, or file
45 -- Added `css-prefers-color-scheme` 3.0.0 (major, non-breaking for this project)
46 -- Updated `cssdb` to 4.2.0 (minor)
47 -
48 -### 6.3.1 (November 5, 2018)
49 -
50 -- Updated `caniuse-lite` to 1.0.30000905 (patch)
51 -- Updated `postcss-custom-properties` to 8.0.9 (patch)
52 -
53 -### 6.3.0 (October 28, 2018)
54 -
55 -- Added `postcss-double-position-gradients` 1.0.0 (major, non-breaking for this project)
56 -- Updated `autoprefixer` to 9.3.1 (minor)
57 -- Updated `browserslist` to 4.3.4 (patch)
58 -- Updated `caniuse-lite` to 1.0.30000899 (patch)
59 -- Updated `cssdb` to 4.1.0 (major, non-breaking for this project)
60 -
61 -### 6.2.0 (October 22, 2018)
62 -
63 -- Updated `autoprefixer` to 9.2.1 (minor)
64 -- Updated `browserslist` to 4.3.1 (minor)
65 -
66 -### 6.1.2 (October 19, 2018)
67 -
68 -- Updated `browserslist` to 4.2.1 (patch)
69 -- Updated `caniuse-lite` to 1.0.30000893 (patch)
70 -- Updated `postcss-custom-media` to 7.0.7 (patch)
71 -
72 -### 6.1.1 (October 12, 2018)
73 -
74 -- Updated: `postcss-custom-media` to 7.0.6 (patch)
75 -
76 -### 6.1.0 (October 10, 2018)
77 -
78 -- Added: `postcss-color-gray`
79 -- Added: Passing `autoprefixer: false` disables autoprefixer
80 -- Updated: `browserslist` to 4.2.0 (minor)
81 -- Updated: `caniuse-lite` to 1.0.30000890 (patch)
82 -
83 -### 6.0.10 (October 2, 2018)
84 -
85 -- Updated: `postcss-custom-properties` to 8.0.8 (patch)
86 -
87 -### 6.0.9 (October 2, 2018)
88 -
89 -- Updated: `browserslist` to 4.1.2 (patch)
90 -- Updated: `postcss` to 7.0.5 (patch)
91 -- Updated: `postcss-custom-properties` to 8.0.7 (patch)
92 -
93 -### 6.0.8 (October 1, 2018)
94 -
95 -- Updated: `caniuse-lite` to 1.0.30000888 (patch)
96 -- Updated: `postcss` to 7.0.4 (patch)
97 -
98 -**Did you hear? PostCSS Preset Env is now part of Create React App!** 🎉
99 -
100 -### 6.0.7 (September 23, 2018)
101 -
102 -- Updated: `postcss` to 7.0.3 (patch)
103 -- Updated: `postcss-custom-properties` to 8.0.6 (patch)
104 -
105 -### 6.0.6 (September 23, 2018)
106 -
107 -- Updated: `postcss-custom-media` to 7.0.4 (patch)
108 -
109 -### 6.0.5 (September 23, 2018)
110 -
111 -- Updated: `postcss-color-mod-function` to 3.0.3 (patch)
112 -
113 -### 6.0.4 (September 23, 2018)
114 -
115 -- Updated: `caniuse-lite` to 1.0.30000887 (patch)
116 -- Updated: `postcss-color-mod-function` to 3.0.2 (patch)
117 -
118 -### 6.0.3 (September 21, 2018)
119 -
120 -- Updated: `caniuse-lite` to 1.0.30000885 (patch)
121 -- Updated: `postcss-custom-properties` to 8.0.5 (patch)
122 -
123 -### 6.0.2 (September 20, 2018)
124 -
125 -- Fixed: Do not break on an empty `importFrom` object
126 -- Fixed: Actually run `postcss-env-function`
127 -
128 -### 6.0.1 (September 20, 2018)
129 -
130 -- Fixed: Issue with the `system-ui` font family polyfill by replacing
131 - `postcss-font-family-system-ui` with an internal polyfill, at least until the
132 - problem with the original plugin is resolved.
133 -
134 -### 6.0.0 (September 20, 2018)
135 -
136 -- Added: Support for PostCSS 7+
137 -- Added: Support for PostCSS Values Parser 2+
138 -- Added: Support for PostCSS Selector Parser 5+
139 -- Added: Support for Node 6+
140 -- Updated: All 28 plugins
141 -
142 -### 5.4.0 (July 25, 2018)
143 -
144 -- Added: `toggle` option to override which features are enabled or disabled
145 -- Deprecated: toggle features with `toggle`, not `features`
146 -
147 -### 5.3.0 (July 24, 2018)
148 -
149 -- Updated: `postcss-lab-function` to v1.1.0 (minor update)
150 -
151 -### 5.2.3 (July 21, 2018)
152 -
153 -- Updated: `postcss-color-mod-function` to v2.4.3 (patch update)
154 -
155 -### 5.2.2 (July 13, 2018)
156 -
157 -- Updated: `autoprefixer` to v8.6.5 (patch update)
158 -- Updated: `caniuse-lite` to v1.0.30000865 (patch update)
159 -- Updated: `postcss-color-functional-notation` to v1.0.2 (patch update)
160 -
161 -### 5.2.1 (June 26, 2018)
162 -
163 -- Updated: `caniuse-lite` to v1.0.30000859 (patch update)
164 -- Updated: `postcss-attribute-case-insensitive` to v3.0.1 (patch update)
165 -
166 -### 5.2.0 (June 25, 2018)
167 -
168 -- Updated: `autoprefixer` to v8.6.3 (minor update)
169 -- Updated: `caniuse-lite` to v1.0.30000858 (patch update)
170 -- Updated: `postcss` to 6.0.23 (patch update)
171 -- Updated: `postcss-nesting` to v6.0.0 (major internal update, non-breaking for this project)
172 -
173 -### 5.1.0 (May 21, 2018)
174 -
175 -- Added: `autoprefixer` option to pass options into autoprefixer
176 -- Updated: `autoprefixer` to v8.5.0 (minor update)
177 -- Updated: `browserslist` to v3.2.8 (patch update)
178 -- Updated: `caniuse-lite` to v1.0.30000844 (patch update)
179 -- Updated: `postcss-color-functional-notation` to v1.0.1 (patch update)
180 -
181 -### 5.0.0 (May 11, 2018)
182 -
183 -- Added: `autoprefixer`
184 -- Added: `postcss-color-functional-notation`
185 -- Added: `postcss-env-function`
186 -- Added: `postcss-lab-function`
187 -- Added: `postcss-place`
188 -- Added: `postcss-gap-properties`
189 -- Added: `postcss-overflow-shorthand`
190 -- Updated: `cssdb` to v3.1.0 (major update)
191 -- Updated: In conformance with cssdb v3, the default stage is now 2
192 -- Updated: `postcss-attribute-case-insensitive` to v3.0.0 (major update)
193 -- Updated: `postcss-pseudo-class-any-link` to v5.0.0 (major update)
194 -- Updated: `postcss-image-set-function` to v2.0.0 (major update)
195 -- Updated: `postcss-dir-pseudo-class` to v4.0.0 (major update)
196 -- Updated: `postcss-color-rebeccapurple` to v3.1.0 (minor update)
197 -- Updated: `postcss` to v6.0.22 (patch update)
198 -- Updated: `browserslist` to v3.2.7 (patch update)
199 -- Updated: `caniuse-lite` to v1.0.30000839 (patch update)
200 -
201 -All plugins now conform to the latest stable releases of `postcss-value-parser`
202 -v1.5.0 and `postcss-selector-parser` v4.0.0.
203 -
204 -### 4.1.0 (April 23, 2018)
205 -
206 -- Updated: `browserslist` to v3.2.5 (patch update)
207 -- Updated: `caniuse-lite` to v1.0.30000830 (patch update)
208 -- Updated: `postcss-apply` to v0.10.0 (minor update)
209 -- Updated: `postcss-nesting` to v5.0.0 (major update, non-breaking for this project)
210 -
211 -### 4.0.0 (April 7, 2018)
212 -
213 -- Added: `postcss-focus-within`
214 -- Updated: `postcss-focus-visible` to v3.0.0 (major update)
215 -- Updated: `caniuse-lite` to v1.0.30000824 (patch update)
216 -- Updated: `cssdb` to v2.0.0 (major update)
217 -- Changed: All `specificationId` names to new `id` names for the `cssdb` update.
218 -
219 -### 3.5.0 (April 5, 2018)
220 -
221 -- Fixed: `selectors-matches-pseudo` mapping to allow `:matches` polyfilling
222 -- Updated: `postcss-dir-pseudo-class` to v3.0.0 (major update, non-breaking for this project)
223 -- Updated: `postcss-logical` to v1.1.1 (minor update)
224 -- Updated: `postcss` to v6.0.21 (patch update)
225 -- Updated: `browserslist` to v3.2.4 (patch update)
226 -- Updated: `caniuse-lite` to v1.0.30000823 (patch update)
227 -
228 -### 3.4.0 (March 18, 2018)
229 -
230 -- Updated: `browserslist` to v3.2.0 (minor update)
231 -- Updated: `postcss` to v6.0.20 (patch update)
232 -- Updated: `postcss-image-set-polyfill` to `@csstools/postcss-image-set-function` (hopefully temporarily)
233 -
234 -### 3.3.0 (March 16, 2018)
235 -
236 -- Updated: `postcss-apply` to v0.9.0 (minor update)
237 -- Updated: `browserslist` to v3.1.2 (patch update)
238 -- Updated: `caniuse-lite` to v1.0.30000815 (patch update)
239 -- Updated: distribution to cjs and es bundles
240 -
241 -### 3.2.2 (February 27, 2018)
242 -
243 -- Updated: `postcss-color-mod-function` to v2.4.2 (patch update)
244 -
245 -### 3.2.1 (February 21, 2018)
246 -
247 -- Updated: Use the latest tested version of all dependencies
248 -
249 -### 3.2.0 (February 18, 2018)
250 -
251 -- Added: `postcss-page-break` which has moved here from Autoprefixer
252 -
253 -### 3.1.0 (February 17, 2018)
254 -
255 -- Added: `postcss-focus-visible`
256 -
257 -### 3.0.0 (February 16, 2018)
258 -
259 -- Updated: `postcss-color-mod-function` to v2.4 (minor update)
260 -- Updated: `postcss-custom-properties` to v7.0 (major update)
261 -
262 -### 2.2.0 (February 14, 2018)
263 -
264 -- Updated: `browserslist` to v3.1 (major update)
265 -- Updated: `postcss-color-mod-function` to v2.3 (minor update)
266 -- Improved: cleaned up one reusable variable and added a few tests
267 -
268 -### 2.1.0 (January 22, 2018)
269 -
270 -- Updated: `cssdb` to v1.5 (minor update)
271 -- Updated: `postcss-color-mod-function` to v2.2 (major update)
272 -- Updated: `postcss-font-family-system-ui` to v3.0 (repo update)
273 -
274 -### 2.0.0 (January 16, 2018)
275 -
276 -- Initial version
277 -
278 -### 1.0.0 (December 20, 2017)
279 -
280 -- Unsupported version accidentally published by a member of the community
1 -# CC0 1.0 Universal
2 -
3 -## Statement of Purpose
4 -
5 -The laws of most jurisdictions throughout the world automatically confer
6 -exclusive Copyright and Related Rights (defined below) upon the creator and
7 -subsequent owner(s) (each and all, an “owner”) of an original work of
8 -authorship and/or a database (each, a “Work”).
9 -
10 -Certain owners wish to permanently relinquish those rights to a Work for the
11 -purpose of contributing to a commons of creative, cultural and scientific works
12 -(“Commons”) that the public can reliably and without fear of later claims of
13 -infringement build upon, modify, incorporate in other works, reuse and
14 -redistribute as freely as possible in any form whatsoever and for any purposes,
15 -including without limitation commercial purposes. These owners may contribute
16 -to the Commons to promote the ideal of a free culture and the further
17 -production of creative, cultural and scientific works, or to gain reputation or
18 -greater distribution for their Work in part through the use and efforts of
19 -others.
20 -
21 -For these and/or other purposes and motivations, and without any expectation of
22 -additional consideration or compensation, the person associating CC0 with a
23 -Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24 -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25 -publicly distribute the Work under its terms, with knowledge of his or her
26 -Copyright and Related Rights in the Work and the meaning and intended legal
27 -effect of CC0 on those rights.
28 -
29 -1. Copyright and Related Rights. A Work made available under CC0 may be
30 - protected by copyright and related or neighboring rights (“Copyright and
31 - Related Rights”). Copyright and Related Rights include, but are not limited
32 - to, the following:
33 - 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34 - and translate a Work;
35 - 2. moral rights retained by the original author(s) and/or performer(s);
36 - 3. publicity and privacy rights pertaining to a person’s image or likeness
37 - depicted in a Work;
38 - 4. rights protecting against unfair competition in regards to a Work,
39 - subject to the limitations in paragraph 4(i), below;
40 - 5. rights protecting the extraction, dissemination, use and reuse of data in
41 - a Work;
42 - 6. database rights (such as those arising under Directive 96/9/EC of the
43 - European Parliament and of the Council of 11 March 1996 on the legal
44 - protection of databases, and under any national implementation thereof,
45 - including any amended or successor version of such directive); and
46 - 7. other similar, equivalent or corresponding rights throughout the world
47 - based on applicable law or treaty, and any national implementations
48 - thereof.
49 -
50 -2. Waiver. To the greatest extent permitted by, but not in contravention of,
51 - applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52 - unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53 - and Related Rights and associated claims and causes of action, whether now
54 - known or unknown (including existing as well as future claims and causes of
55 - action), in the Work (i) in all territories worldwide, (ii) for the maximum
56 - duration provided by applicable law or treaty (including future time
57 - extensions), (iii) in any current or future medium and for any number of
58 - copies, and (iv) for any purpose whatsoever, including without limitation
59 - commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60 - makes the Waiver for the benefit of each member of the public at large and
61 - to the detriment of Affirmer’s heirs and successors, fully intending that
62 - such Waiver shall not be subject to revocation, rescission, cancellation,
63 - termination, or any other legal or equitable action to disrupt the quiet
64 - enjoyment of the Work by the public as contemplated by Affirmer’s express
65 - Statement of Purpose.
66 -
67 -3. Public License Fallback. Should any part of the Waiver for any reason be
68 - judged legally invalid or ineffective under applicable law, then the Waiver
69 - shall be preserved to the maximum extent permitted taking into account
70 - Affirmer’s express Statement of Purpose. In addition, to the extent the
71 - Waiver is so judged Affirmer hereby grants to each affected person a
72 - royalty-free, non transferable, non sublicensable, non exclusive,
73 - irrevocable and unconditional license to exercise Affirmer’s Copyright and
74 - Related Rights in the Work (i) in all territories worldwide, (ii) for the
75 - maximum duration provided by applicable law or treaty (including future time
76 - extensions), (iii) in any current or future medium and for any number of
77 - copies, and (iv) for any purpose whatsoever, including without limitation
78 - commercial, advertising or promotional purposes (the “License”). The License
79 - shall be deemed effective as of the date CC0 was applied by Affirmer to the
80 - Work. Should any part of the License for any reason be judged legally
81 - invalid or ineffective under applicable law, such partial invalidity or
82 - ineffectiveness shall not invalidate the remainder of the License, and in
83 - such case Affirmer hereby affirms that he or she will not (i) exercise any
84 - of his or her remaining Copyright and Related Rights in the Work or (ii)
85 - assert any associated claims and causes of action with respect to the Work,
86 - in either case contrary to Affirmer’s express Statement of Purpose.
87 -
88 -4. Limitations and Disclaimers.
89 - 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90 - surrendered, licensed or otherwise affected by this document.
91 - 2. Affirmer offers the Work as-is and makes no representations or warranties
92 - of any kind concerning the Work, express, implied, statutory or
93 - otherwise, including without limitation warranties of title,
94 - merchantability, fitness for a particular purpose, non infringement, or
95 - the absence of latent or other defects, accuracy, or the present or
96 - absence of errors, whether or not discoverable, all to the greatest
97 - extent permissible under applicable law.
98 - 3. Affirmer disclaims responsibility for clearing rights of other persons
99 - that may apply to the Work or any use thereof, including without
100 - limitation any person’s Copyright and Related Rights in the Work.
101 - Further, Affirmer disclaims responsibility for obtaining any necessary
102 - consents, permissions or other rights required for any use of the Work.
103 - 4. Affirmer understands and acknowledges that Creative Commons is not a
104 - party to this document and has no duty or obligation with respect to this
105 - CC0 or use of the Work.
106 -
107 -For more information, please see
108 -http://creativecommons.org/publicdomain/zero/1.0/.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
1 -{
2 - "_from": "postcss-preset-env@6.7.0",
3 - "_id": "postcss-preset-env@6.7.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg==",
6 - "_location": "/postcss-preset-env",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "version",
10 - "registry": true,
11 - "raw": "postcss-preset-env@6.7.0",
12 - "name": "postcss-preset-env",
13 - "escapedName": "postcss-preset-env",
14 - "rawSpec": "6.7.0",
15 - "saveSpec": null,
16 - "fetchSpec": "6.7.0"
17 - },
18 - "_requiredBy": [
19 - "/react-scripts"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz",
22 - "_shasum": "c34ddacf8f902383b35ad1e030f178f4cdf118a5",
23 - "_spec": "postcss-preset-env@6.7.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\react-scripts",
25 - "author": {
26 - "name": "Jonathan Neal",
27 - "email": "jonathantneal@hotmail.com"
28 - },
29 - "bugs": {
30 - "url": "https://github.com/csstools/postcss-preset-env/issues"
31 - },
32 - "bundleDependencies": false,
33 - "dependencies": {
34 - "autoprefixer": "^9.6.1",
35 - "browserslist": "^4.6.4",
36 - "caniuse-lite": "^1.0.30000981",
37 - "css-blank-pseudo": "^0.1.4",
38 - "css-has-pseudo": "^0.10.0",
39 - "css-prefers-color-scheme": "^3.1.1",
40 - "cssdb": "^4.4.0",
41 - "postcss": "^7.0.17",
42 - "postcss-attribute-case-insensitive": "^4.0.1",
43 - "postcss-color-functional-notation": "^2.0.1",
44 - "postcss-color-gray": "^5.0.0",
45 - "postcss-color-hex-alpha": "^5.0.3",
46 - "postcss-color-mod-function": "^3.0.3",
47 - "postcss-color-rebeccapurple": "^4.0.1",
48 - "postcss-custom-media": "^7.0.8",
49 - "postcss-custom-properties": "^8.0.11",
50 - "postcss-custom-selectors": "^5.1.2",
51 - "postcss-dir-pseudo-class": "^5.0.0",
52 - "postcss-double-position-gradients": "^1.0.0",
53 - "postcss-env-function": "^2.0.2",
54 - "postcss-focus-visible": "^4.0.0",
55 - "postcss-focus-within": "^3.0.0",
56 - "postcss-font-variant": "^4.0.0",
57 - "postcss-gap-properties": "^2.0.0",
58 - "postcss-image-set-function": "^3.0.1",
59 - "postcss-initial": "^3.0.0",
60 - "postcss-lab-function": "^2.0.1",
61 - "postcss-logical": "^3.0.0",
62 - "postcss-media-minmax": "^4.0.0",
63 - "postcss-nesting": "^7.0.0",
64 - "postcss-overflow-shorthand": "^2.0.0",
65 - "postcss-page-break": "^2.0.0",
66 - "postcss-place": "^4.0.1",
67 - "postcss-pseudo-class-any-link": "^6.0.0",
68 - "postcss-replace-overflow-wrap": "^3.0.0",
69 - "postcss-selector-matches": "^4.0.0",
70 - "postcss-selector-not": "^4.0.0"
71 - },
72 - "deprecated": false,
73 - "description": "Convert modern CSS into something browsers understand",
74 - "devDependencies": {
75 - "@babel/core": "^7.5.0",
76 - "@babel/preset-env": "^7.5.2",
77 - "babel-eslint": "^10.0.2",
78 - "eslint": "^5.16.0",
79 - "eslint-config-dev": "^2.0.0",
80 - "postcss-simple-vars": "^5.0.2",
81 - "postcss-tape": "^4.0.0",
82 - "pre-commit": "^1.2.2",
83 - "rollup": "^1.16.6",
84 - "rollup-plugin-babel": "^4.3.3"
85 - },
86 - "engines": {
87 - "node": ">=6.0.0"
88 - },
89 - "eslintConfig": {
90 - "extends": "dev",
91 - "parser": "babel-eslint"
92 - },
93 - "files": [
94 - "index.js",
95 - "index.js.map",
96 - "index.mjs",
97 - "index.mjs.map"
98 - ],
99 - "homepage": "https://github.com/csstools/postcss-preset-env#readme",
100 - "keywords": [
101 - "postcss",
102 - "css",
103 - "postcss-plugin",
104 - "specifications",
105 - "specs",
106 - "features",
107 - "lists",
108 - "stages",
109 - "w3c",
110 - "csswg",
111 - "future",
112 - "next"
113 - ],
114 - "license": "CC0-1.0",
115 - "main": "index.js",
116 - "module": "index.mjs",
117 - "name": "postcss-preset-env",
118 - "repository": {
119 - "type": "git",
120 - "url": "git+https://github.com/csstools/postcss-preset-env.git"
121 - },
122 - "scripts": {
123 - "build": "rollup -c .rollup.js --silent",
124 - "prepublishOnly": "npm test",
125 - "pretest:tape": "npm run build",
126 - "test": "npm run test:js && npm run test:tape",
127 - "test:js": "eslint src/*.js src/lib/*.js src/patch/*.js --cache --ignore-path .gitignore --quiet",
128 - "test:tape": "postcss-tape"
129 - },
130 - "version": "6.7.0"
131 -}
1 -# Changes to PostCSS Pseudo Class Any Link
2 -
3 -### 6.0.0 (September 17, 2018)
4 -
5 -- Updated: Support for PostCSS v7+
6 -- Updated: Support for Node v6+
7 -- Updated: PostCSS Selector Parser 5.0.0-rc.3 (major)
8 -
9 -### 5.0.0 (May 7, 2018)
10 -
11 -- Updated: `postcss-selector-parser` to v4.0.0 (major)
12 -- Updated: `postcss` to v6.0.22 (patch)
13 -- Changed: Preserves `:any-link` by default
14 -
15 -### 4.0.0 (May 10, 2017)
16 -
17 -- Added: Support for PostCSS v6
18 -- Added: Support for Node v4
19 -- Removed: `prefix` option, as that would be non-spec
20 -
21 -### 3.0.1 (December 8, 2016)
22 -
23 -- Updated: Use destructing assignment on plugin options
24 -- Updated: Use template literals
25 -
26 -### 3.0.0 (December 5, 2016)
27 -
28 -- Updated: boilerplate conventions (Node v6.9.1 LTS)
29 -
30 -### 1.0.0 (September 1, 2015)
31 -
32 -- Updated: PostCSS 5
33 -- Updated: Develop dependencies
34 -- Updated: ESLint configuration
35 -
36 -### 0.3.0 (June 16, 2015)
37 -
38 -- Added: Support for complex uses
39 -- Added: Code documentation
40 -- Changed: Coding conventions
41 -
42 -### 0.2.1 (June 16, 2015)
43 -
44 -- Fixed: postcss-selector-parser is included as a dependency
45 -
46 -### 0.2.0 (June 15, 2015)
47 -
48 -- Changed: use postcss-selector-parser
49 -
50 -### 0.1.1 (June 14, 2015)
51 -
52 -Initial release
1 -# CC0 1.0 Universal
2 -
3 -## Statement of Purpose
4 -
5 -The laws of most jurisdictions throughout the world automatically confer
6 -exclusive Copyright and Related Rights (defined below) upon the creator and
7 -subsequent owner(s) (each and all, an “owner”) of an original work of
8 -authorship and/or a database (each, a “Work”).
9 -
10 -Certain owners wish to permanently relinquish those rights to a Work for the
11 -purpose of contributing to a commons of creative, cultural and scientific works
12 -(“Commons”) that the public can reliably and without fear of later claims of
13 -infringement build upon, modify, incorporate in other works, reuse and
14 -redistribute as freely as possible in any form whatsoever and for any purposes,
15 -including without limitation commercial purposes. These owners may contribute
16 -to the Commons to promote the ideal of a free culture and the further
17 -production of creative, cultural and scientific works, or to gain reputation or
18 -greater distribution for their Work in part through the use and efforts of
19 -others.
20 -
21 -For these and/or other purposes and motivations, and without any expectation of
22 -additional consideration or compensation, the person associating CC0 with a
23 -Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
24 -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
25 -publicly distribute the Work under its terms, with knowledge of his or her
26 -Copyright and Related Rights in the Work and the meaning and intended legal
27 -effect of CC0 on those rights.
28 -
29 -1. Copyright and Related Rights. A Work made available under CC0 may be
30 - protected by copyright and related or neighboring rights (“Copyright and
31 - Related Rights”). Copyright and Related Rights include, but are not limited
32 - to, the following:
33 - 1. the right to reproduce, adapt, distribute, perform, display, communicate,
34 - and translate a Work;
35 - 2. moral rights retained by the original author(s) and/or performer(s);
36 - 3. publicity and privacy rights pertaining to a person’s image or likeness
37 - depicted in a Work;
38 - 4. rights protecting against unfair competition in regards to a Work,
39 - subject to the limitations in paragraph 4(i), below;
40 - 5. rights protecting the extraction, dissemination, use and reuse of data in
41 - a Work;
42 - 6. database rights (such as those arising under Directive 96/9/EC of the
43 - European Parliament and of the Council of 11 March 1996 on the legal
44 - protection of databases, and under any national implementation thereof,
45 - including any amended or successor version of such directive); and
46 - 7. other similar, equivalent or corresponding rights throughout the world
47 - based on applicable law or treaty, and any national implementations
48 - thereof.
49 -
50 -2. Waiver. To the greatest extent permitted by, but not in contravention of,
51 - applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
52 - unconditionally waives, abandons, and surrenders all of Affirmer’s Copyright
53 - and Related Rights and associated claims and causes of action, whether now
54 - known or unknown (including existing as well as future claims and causes of
55 - action), in the Work (i) in all territories worldwide, (ii) for the maximum
56 - duration provided by applicable law or treaty (including future time
57 - extensions), (iii) in any current or future medium and for any number of
58 - copies, and (iv) for any purpose whatsoever, including without limitation
59 - commercial, advertising or promotional purposes (the “Waiver”). Affirmer
60 - makes the Waiver for the benefit of each member of the public at large and
61 - to the detriment of Affirmer’s heirs and successors, fully intending that
62 - such Waiver shall not be subject to revocation, rescission, cancellation,
63 - termination, or any other legal or equitable action to disrupt the quiet
64 - enjoyment of the Work by the public as contemplated by Affirmer’s express
65 - Statement of Purpose.
66 -
67 -3. Public License Fallback. Should any part of the Waiver for any reason be
68 - judged legally invalid or ineffective under applicable law, then the Waiver
69 - shall be preserved to the maximum extent permitted taking into account
70 - Affirmer’s express Statement of Purpose. In addition, to the extent the
71 - Waiver is so judged Affirmer hereby grants to each affected person a
72 - royalty-free, non transferable, non sublicensable, non exclusive,
73 - irrevocable and unconditional license to exercise Affirmer’s Copyright and
74 - Related Rights in the Work (i) in all territories worldwide, (ii) for the
75 - maximum duration provided by applicable law or treaty (including future time
76 - extensions), (iii) in any current or future medium and for any number of
77 - copies, and (iv) for any purpose whatsoever, including without limitation
78 - commercial, advertising or promotional purposes (the “License”). The License
79 - shall be deemed effective as of the date CC0 was applied by Affirmer to the
80 - Work. Should any part of the License for any reason be judged legally
81 - invalid or ineffective under applicable law, such partial invalidity or
82 - ineffectiveness shall not invalidate the remainder of the License, and in
83 - such case Affirmer hereby affirms that he or she will not (i) exercise any
84 - of his or her remaining Copyright and Related Rights in the Work or (ii)
85 - assert any associated claims and causes of action with respect to the Work,
86 - in either case contrary to Affirmer’s express Statement of Purpose.
87 -
88 -4. Limitations and Disclaimers.
89 - 1. No trademark or patent rights held by Affirmer are waived, abandoned,
90 - surrendered, licensed or otherwise affected by this document.
91 - 2. Affirmer offers the Work as-is and makes no representations or warranties
92 - of any kind concerning the Work, express, implied, statutory or
93 - otherwise, including without limitation warranties of title,
94 - merchantability, fitness for a particular purpose, non infringement, or
95 - the absence of latent or other defects, accuracy, or the present or
96 - absence of errors, whether or not discoverable, all to the greatest
97 - extent permissible under applicable law.
98 - 3. Affirmer disclaims responsibility for clearing rights of other persons
99 - that may apply to the Work or any use thereof, including without
100 - limitation any person’s Copyright and Related Rights in the Work.
101 - Further, Affirmer disclaims responsibility for obtaining any necessary
102 - consents, permissions or other rights required for any use of the Work.
103 - 4. Affirmer understands and acknowledges that Creative Commons is not a
104 - party to this document and has no duty or obligation with respect to this
105 - CC0 or use of the Work.
106 -
107 -For more information, please see
108 -http://creativecommons.org/publicdomain/zero/1.0/.
1 -# PostCSS Pseudo Class Any Link [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][postcss]
2 -
3 -[![NPM Version][npm-img]][npm-url]
4 -[![CSS Standard Status][css-img]][css-url]
5 -[![Build Status][cli-img]][cli-url]
6 -[![Support Chat][git-img]][git-url]
7 -
8 -[PostCSS Pseudo Class Any Link] lets you `:any-link` pseudo-class in CSS,
9 -following the [Selectors] specification.
10 -
11 -```pcss
12 -nav :any-link > span {
13 - background-color: yellow;
14 -}
15 -
16 -/* becomes */
17 -
18 -nav :link > span, nav :visited > span {
19 - background-color: yellow;
20 -}
21 -
22 -nav :any-link > span {
23 - background-color: yellow;
24 -}
25 -```
26 -
27 -From the [proposal][Selectors]:
28 -
29 -> The `:any-link` pseudo-class represents an element that acts as the source
30 - anchor of a hyperlink. It matches an element if the element would match
31 - `:link` or `:visited`.
32 -
33 -## Usage
34 -
35 -Add [PostCSS Pseudo Class Any Link] to your project:
36 -
37 -```bash
38 -npm install postcss-pseudo-class-any-link --save-dev
39 -```
40 -
41 -Use [PostCSS Pseudo Class Any Link] to process your CSS:
42 -
43 -```js
44 -const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
45 -
46 -postcssPseudoClassAnyLink.process(YOUR_CSS /*, processOptions, pluginOptions */);
47 -```
48 -
49 -Or use it as a [PostCSS] plugin:
50 -
51 -```js
52 -const postcss = require('postcss');
53 -const postcssPseudoClassAnyLink = require('postcss-pseudo-class-any-link');
54 -
55 -postcss([
56 - postcssPseudoClassAnyLink(/* pluginOptions */)
57 -]).process(YOUR_CSS /*, processOptions */);
58 -```
59 -
60 -[PostCSS Pseudo Class Any Link] runs in all Node environments, with special
61 -instructions for:
62 -
63 -| [Node](INSTALL.md#node) | [PostCSS CLI](INSTALL.md#postcss-cli) | [Webpack](INSTALL.md#webpack) | [Create React App](INSTALL.md#create-react-app) | [Gulp](INSTALL.md#gulp) | [Grunt](INSTALL.md#grunt) |
64 -| --- | --- | --- | --- | --- | --- |
65 -
66 -## Options
67 -
68 -### preserve
69 -
70 -The `preserve` option determines whether the original `:any-link` rule is
71 -preserved. By default, it is preserved.
72 -
73 -```js
74 -postcssPseudoClassAnyLink({ preserve: false })
75 -```
76 -
77 -```pcss
78 -nav :any-link > span {
79 - background-color: yellow;
80 -}
81 -
82 -/* becomes */
83 -
84 -nav :link > span, nav :visited > span {
85 - background-color: yellow;
86 -}
87 -```
88 -
89 -[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-pseudo-class-any-link.svg
90 -[cli-url]: https://travis-ci.org/jonathantneal/postcss-pseudo-class-any-link
91 -[css-img]: https://cssdb.org/badge/any-link-pseudo-class.svg
92 -[css-url]: https://cssdb.org/#any-link-pseudo-class
93 -[git-img]: https://img.shields.io/badge/support-chat-blue.svg
94 -[git-url]: https://gitter.im/postcss/postcss
95 -[npm-img]: https://img.shields.io/npm/v/postcss-pseudo-class-any-link.svg
96 -[npm-url]: https://www.npmjs.com/package/postcss-pseudo-class-any-link
97 -
98 -[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
99 -[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
100 -[PostCSS]: https://github.com/postcss/postcss
101 -[PostCSS Loader]: https://github.com/postcss/postcss-loader
102 -[PostCSS Pseudo Class Any Link]: https://github.com/jonathantneal/postcss-pseudo-class-any-link
103 -[Selectors]: https://www.w3.org/TR/selectors-4/#the-any-link-pseudo
1 -'use strict';
2 -
3 -function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4 -
5 -var postcss = _interopDefault(require('postcss'));
6 -var parser = _interopDefault(require('postcss-selector-parser'));
7 -
8 -const anyAnyLinkMatch = /:any-link/;
9 -var index = postcss.plugin('postcss-pseudo-class-any-link', opts => {
10 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;
11 - return root => {
12 - // walk each matching rule
13 - root.walkRules(anyAnyLinkMatch, rule => {
14 - const rawSelector = rule.raws.selector && rule.raws.selector.raw || rule.selector; // workaround for https://github.com/postcss/postcss-selector-parser/issues/28#issuecomment-171910556
15 -
16 - if (rawSelector[rawSelector.length - 1] !== ':') {
17 - // update the selector
18 - const updatedSelector = parser(selectors => {
19 - // cache variables
20 - let node;
21 - let nodeIndex;
22 - let selector;
23 - let selectorLink;
24 - let selectorVisited; // cache the selector index
25 -
26 - let selectorIndex = -1; // for each selector
27 -
28 - while (selector = selectors.nodes[++selectorIndex]) {
29 - // reset the node index
30 - nodeIndex = -1; // for each node
31 -
32 - while (node = selector.nodes[++nodeIndex]) {
33 - // if the node value matches the any-link value
34 - if (node.value === ':any-link') {
35 - // clone the selector
36 - selectorLink = selector.clone();
37 - selectorVisited = selector.clone(); // update the matching clone values
38 -
39 - selectorLink.nodes[nodeIndex].value = ':link';
40 - selectorVisited.nodes[nodeIndex].value = ':visited'; // replace the selector with the clones and roll back the selector index
41 -
42 - selectors.nodes.splice(selectorIndex--, 1, selectorLink, selectorVisited); // stop updating the selector
43 -
44 - break;
45 - }
46 - }
47 - }
48 - }).processSync(rawSelector);
49 -
50 - if (updatedSelector !== rawSelector) {
51 - if (preserve) {
52 - rule.cloneBefore({
53 - selector: updatedSelector
54 - });
55 - } else {
56 - rule.selector = updatedSelector;
57 - }
58 - }
59 - }
60 - });
61 - };
62 -});
63 -
64 -module.exports = index;
65 -//# sourceMappingURL=index.cjs.js.map
1 -{"version":3,"file":"index.cjs.js","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\nimport parser from 'postcss-selector-parser';\n\nconst anyAnyLinkMatch = /:any-link/;\n\nexport default postcss.plugin('postcss-pseudo-class-any-link', opts => {\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;\n\n\treturn root => {\n\t\t// walk each matching rule\n\t\troot.walkRules(anyAnyLinkMatch, rule => {\n\t\t\tconst rawSelector = rule.raws.selector && rule.raws.selector.raw || rule.selector;\n\n\t\t\t// workaround for https://github.com/postcss/postcss-selector-parser/issues/28#issuecomment-171910556\n\t\t\tif (rawSelector[rawSelector.length - 1] !== ':') {\n\t\t\t\t// update the selector\n\t\t\t\tconst updatedSelector = parser(selectors => {\n\t\t\t\t\t// cache variables\n\t\t\t\t\tlet node;\n\t\t\t\t\tlet nodeIndex;\n\t\t\t\t\tlet selector;\n\t\t\t\t\tlet selectorLink;\n\t\t\t\t\tlet selectorVisited;\n\n\t\t\t\t\t// cache the selector index\n\t\t\t\t\tlet selectorIndex = -1;\n\n\t\t\t\t\t// for each selector\n\t\t\t\t\twhile (selector = selectors.nodes[++selectorIndex]) {\n\t\t\t\t\t\t// reset the node index\n\t\t\t\t\t\tnodeIndex = -1;\n\n\t\t\t\t\t\t// for each node\n\t\t\t\t\t\twhile (node = selector.nodes[++nodeIndex]) {\n\t\t\t\t\t\t\t// if the node value matches the any-link value\n\t\t\t\t\t\t\tif (node.value === ':any-link') {\n\t\t\t\t\t\t\t\t// clone the selector\n\t\t\t\t\t\t\t\tselectorLink = selector.clone();\n\t\t\t\t\t\t\t\tselectorVisited = selector.clone();\n\n\t\t\t\t\t\t\t\t// update the matching clone values\n\t\t\t\t\t\t\t\tselectorLink.nodes[nodeIndex].value = ':link';\n\t\t\t\t\t\t\t\tselectorVisited.nodes[nodeIndex].value = ':visited';\n\n\t\t\t\t\t\t\t\t// replace the selector with the clones and roll back the selector index\n\t\t\t\t\t\t\t\tselectors.nodes.splice(selectorIndex--, 1, selectorLink, selectorVisited);\n\n\t\t\t\t\t\t\t\t// stop updating the selector\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).processSync(rawSelector);\n\n\t\t\t\tif (updatedSelector !== rawSelector) {\n\t\t\t\t\tif (preserve) {\n\t\t\t\t\t\trule.cloneBefore({\n\t\t\t\t\t\t\tselector: updatedSelector\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\trule.selector = updatedSelector;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t};\n});\n"],"names":["anyAnyLinkMatch","postcss","plugin","opts","preserve","Object","Boolean","root","walkRules","rule","rawSelector","raws","selector","raw","length","updatedSelector","parser","selectors","node","nodeIndex","selectorLink","selectorVisited","selectorIndex","nodes","value","clone","splice","processSync","cloneBefore"],"mappings":";;;;;;;AAGA,MAAMA,eAAe,GAAG,WAAxB;AAEA,YAAeC,OAAO,CAACC,MAAR,CAAe,+BAAf,EAAgDC,IAAI,IAAI;QAChEC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACC,QAAN,CAApC,GAAsD,IAAvE;SAEOG,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeR,eAAf,EAAgCS,IAAI,IAAI;YACjCC,WAAW,GAAGD,IAAI,CAACE,IAAL,CAAUC,QAAV,IAAsBH,IAAI,CAACE,IAAL,CAAUC,QAAV,CAAmBC,GAAzC,IAAgDJ,IAAI,CAACG,QAAzE,CADuC;;UAInCF,WAAW,CAACA,WAAW,CAACI,MAAZ,GAAqB,CAAtB,CAAX,KAAwC,GAA5C,EAAiD;;cAE1CC,eAAe,GAAGC,MAAM,CAACC,SAAS,IAAI;;cAEvCC,IAAJ;cACIC,SAAJ;cACIP,QAAJ;cACIQ,YAAJ;cACIC,eAAJ,CAN2C;;cASvCC,aAAa,GAAG,CAAC,CAArB,CAT2C;;iBAYpCV,QAAQ,GAAGK,SAAS,CAACM,KAAV,CAAgB,EAAED,aAAlB,CAAlB,EAAoD;;YAEnDH,SAAS,GAAG,CAAC,CAAb,CAFmD;;mBAK5CD,IAAI,GAAGN,QAAQ,CAACW,KAAT,CAAe,EAAEJ,SAAjB,CAAd,EAA2C;;kBAEtCD,IAAI,CAACM,KAAL,KAAe,WAAnB,EAAgC;;gBAE/BJ,YAAY,GAAGR,QAAQ,CAACa,KAAT,EAAf;gBACAJ,eAAe,GAAGT,QAAQ,CAACa,KAAT,EAAlB,CAH+B;;gBAM/BL,YAAY,CAACG,KAAb,CAAmBJ,SAAnB,EAA8BK,KAA9B,GAAsC,OAAtC;gBACAH,eAAe,CAACE,KAAhB,CAAsBJ,SAAtB,EAAiCK,KAAjC,GAAyC,UAAzC,CAP+B;;gBAU/BP,SAAS,CAACM,KAAV,CAAgBG,MAAhB,CAAuBJ,aAAa,EAApC,EAAwC,CAAxC,EAA2CF,YAA3C,EAAyDC,eAAzD,EAV+B;;;;;;SAnBL,CAAN,CAoCrBM,WApCqB,CAoCTjB,WApCS,CAAxB;;YAsCIK,eAAe,KAAKL,WAAxB,EAAqC;cAChCN,QAAJ,EAAc;YACbK,IAAI,CAACmB,WAAL,CAAiB;cAChBhB,QAAQ,EAAEG;aADX;WADD,MAIO;YACNN,IAAI,CAACG,QAAL,GAAgBG,eAAhB;;;;KAlDJ;GAFD;CAHc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -import postcss from 'postcss';
2 -import parser from 'postcss-selector-parser';
3 -
4 -const anyAnyLinkMatch = /:any-link/;
5 -var index = postcss.plugin('postcss-pseudo-class-any-link', opts => {
6 - const preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;
7 - return root => {
8 - // walk each matching rule
9 - root.walkRules(anyAnyLinkMatch, rule => {
10 - const rawSelector = rule.raws.selector && rule.raws.selector.raw || rule.selector; // workaround for https://github.com/postcss/postcss-selector-parser/issues/28#issuecomment-171910556
11 -
12 - if (rawSelector[rawSelector.length - 1] !== ':') {
13 - // update the selector
14 - const updatedSelector = parser(selectors => {
15 - // cache variables
16 - let node;
17 - let nodeIndex;
18 - let selector;
19 - let selectorLink;
20 - let selectorVisited; // cache the selector index
21 -
22 - let selectorIndex = -1; // for each selector
23 -
24 - while (selector = selectors.nodes[++selectorIndex]) {
25 - // reset the node index
26 - nodeIndex = -1; // for each node
27 -
28 - while (node = selector.nodes[++nodeIndex]) {
29 - // if the node value matches the any-link value
30 - if (node.value === ':any-link') {
31 - // clone the selector
32 - selectorLink = selector.clone();
33 - selectorVisited = selector.clone(); // update the matching clone values
34 -
35 - selectorLink.nodes[nodeIndex].value = ':link';
36 - selectorVisited.nodes[nodeIndex].value = ':visited'; // replace the selector with the clones and roll back the selector index
37 -
38 - selectors.nodes.splice(selectorIndex--, 1, selectorLink, selectorVisited); // stop updating the selector
39 -
40 - break;
41 - }
42 - }
43 - }
44 - }).processSync(rawSelector);
45 -
46 - if (updatedSelector !== rawSelector) {
47 - if (preserve) {
48 - rule.cloneBefore({
49 - selector: updatedSelector
50 - });
51 - } else {
52 - rule.selector = updatedSelector;
53 - }
54 - }
55 - }
56 - });
57 - };
58 -});
59 -
60 -export default index;
61 -//# sourceMappingURL=index.es.mjs.map
1 -{"version":3,"file":"index.es.mjs","sources":["index.js"],"sourcesContent":["import postcss from 'postcss';\nimport parser from 'postcss-selector-parser';\n\nconst anyAnyLinkMatch = /:any-link/;\n\nexport default postcss.plugin('postcss-pseudo-class-any-link', opts => {\n\tconst preserve = 'preserve' in Object(opts) ? Boolean(opts.preserve) : true;\n\n\treturn root => {\n\t\t// walk each matching rule\n\t\troot.walkRules(anyAnyLinkMatch, rule => {\n\t\t\tconst rawSelector = rule.raws.selector && rule.raws.selector.raw || rule.selector;\n\n\t\t\t// workaround for https://github.com/postcss/postcss-selector-parser/issues/28#issuecomment-171910556\n\t\t\tif (rawSelector[rawSelector.length - 1] !== ':') {\n\t\t\t\t// update the selector\n\t\t\t\tconst updatedSelector = parser(selectors => {\n\t\t\t\t\t// cache variables\n\t\t\t\t\tlet node;\n\t\t\t\t\tlet nodeIndex;\n\t\t\t\t\tlet selector;\n\t\t\t\t\tlet selectorLink;\n\t\t\t\t\tlet selectorVisited;\n\n\t\t\t\t\t// cache the selector index\n\t\t\t\t\tlet selectorIndex = -1;\n\n\t\t\t\t\t// for each selector\n\t\t\t\t\twhile (selector = selectors.nodes[++selectorIndex]) {\n\t\t\t\t\t\t// reset the node index\n\t\t\t\t\t\tnodeIndex = -1;\n\n\t\t\t\t\t\t// for each node\n\t\t\t\t\t\twhile (node = selector.nodes[++nodeIndex]) {\n\t\t\t\t\t\t\t// if the node value matches the any-link value\n\t\t\t\t\t\t\tif (node.value === ':any-link') {\n\t\t\t\t\t\t\t\t// clone the selector\n\t\t\t\t\t\t\t\tselectorLink = selector.clone();\n\t\t\t\t\t\t\t\tselectorVisited = selector.clone();\n\n\t\t\t\t\t\t\t\t// update the matching clone values\n\t\t\t\t\t\t\t\tselectorLink.nodes[nodeIndex].value = ':link';\n\t\t\t\t\t\t\t\tselectorVisited.nodes[nodeIndex].value = ':visited';\n\n\t\t\t\t\t\t\t\t// replace the selector with the clones and roll back the selector index\n\t\t\t\t\t\t\t\tselectors.nodes.splice(selectorIndex--, 1, selectorLink, selectorVisited);\n\n\t\t\t\t\t\t\t\t// stop updating the selector\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}).processSync(rawSelector);\n\n\t\t\t\tif (updatedSelector !== rawSelector) {\n\t\t\t\t\tif (preserve) {\n\t\t\t\t\t\trule.cloneBefore({\n\t\t\t\t\t\t\tselector: updatedSelector\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\trule.selector = updatedSelector;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\t};\n});\n"],"names":["anyAnyLinkMatch","postcss","plugin","opts","preserve","Object","Boolean","root","walkRules","rule","rawSelector","raws","selector","raw","length","updatedSelector","parser","selectors","node","nodeIndex","selectorLink","selectorVisited","selectorIndex","nodes","value","clone","splice","processSync","cloneBefore"],"mappings":";;;AAGA,MAAMA,eAAe,GAAG,WAAxB;AAEA,YAAeC,OAAO,CAACC,MAAR,CAAe,+BAAf,EAAgDC,IAAI,IAAI;QAChEC,QAAQ,GAAG,cAAcC,MAAM,CAACF,IAAD,CAApB,GAA6BG,OAAO,CAACH,IAAI,CAACC,QAAN,CAApC,GAAsD,IAAvE;SAEOG,IAAI,IAAI;;IAEdA,IAAI,CAACC,SAAL,CAAeR,eAAf,EAAgCS,IAAI,IAAI;YACjCC,WAAW,GAAGD,IAAI,CAACE,IAAL,CAAUC,QAAV,IAAsBH,IAAI,CAACE,IAAL,CAAUC,QAAV,CAAmBC,GAAzC,IAAgDJ,IAAI,CAACG,QAAzE,CADuC;;UAInCF,WAAW,CAACA,WAAW,CAACI,MAAZ,GAAqB,CAAtB,CAAX,KAAwC,GAA5C,EAAiD;;cAE1CC,eAAe,GAAGC,MAAM,CAACC,SAAS,IAAI;;cAEvCC,IAAJ;cACIC,SAAJ;cACIP,QAAJ;cACIQ,YAAJ;cACIC,eAAJ,CAN2C;;cASvCC,aAAa,GAAG,CAAC,CAArB,CAT2C;;iBAYpCV,QAAQ,GAAGK,SAAS,CAACM,KAAV,CAAgB,EAAED,aAAlB,CAAlB,EAAoD;;YAEnDH,SAAS,GAAG,CAAC,CAAb,CAFmD;;mBAK5CD,IAAI,GAAGN,QAAQ,CAACW,KAAT,CAAe,EAAEJ,SAAjB,CAAd,EAA2C;;kBAEtCD,IAAI,CAACM,KAAL,KAAe,WAAnB,EAAgC;;gBAE/BJ,YAAY,GAAGR,QAAQ,CAACa,KAAT,EAAf;gBACAJ,eAAe,GAAGT,QAAQ,CAACa,KAAT,EAAlB,CAH+B;;gBAM/BL,YAAY,CAACG,KAAb,CAAmBJ,SAAnB,EAA8BK,KAA9B,GAAsC,OAAtC;gBACAH,eAAe,CAACE,KAAhB,CAAsBJ,SAAtB,EAAiCK,KAAjC,GAAyC,UAAzC,CAP+B;;gBAU/BP,SAAS,CAACM,KAAV,CAAgBG,MAAhB,CAAuBJ,aAAa,EAApC,EAAwC,CAAxC,EAA2CF,YAA3C,EAAyDC,eAAzD,EAV+B;;;;;;SAnBL,CAAN,CAoCrBM,WApCqB,CAoCTjB,WApCS,CAAxB;;YAsCIK,eAAe,KAAKL,WAAxB,EAAqC;cAChCN,QAAJ,EAAc;YACbK,IAAI,CAACmB,WAAL,CAAiB;cAChBhB,QAAQ,EAAEG;aADX;WADD,MAIO;YACNN,IAAI,CAACG,QAAL,GAAgBG,eAAhB;;;;KAlDJ;GAFD;CAHc,CAAf;;;;"}
...\ No newline at end of file ...\ No newline at end of file
1 -#!/bin/sh
2 -basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
3 -
4 -case `uname` in
5 - *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
6 -esac
7 -
8 -if [ -x "$basedir/node" ]; then
9 - "$basedir/node" "$basedir/../cssesc/bin/cssesc" "$@"
10 - ret=$?
11 -else
12 - node "$basedir/../cssesc/bin/cssesc" "$@"
13 - ret=$?
14 -fi
15 -exit $ret
1 -@ECHO off
2 -SETLOCAL
3 -CALL :find_dp0
4 -
5 -IF EXIST "%dp0%\node.exe" (
6 - SET "_prog=%dp0%\node.exe"
7 -) ELSE (
8 - SET "_prog=node"
9 - SET PATHEXT=%PATHEXT:;.JS;=;%
10 -)
11 -
12 -"%_prog%" "%dp0%\..\cssesc\bin\cssesc" %*
13 -ENDLOCAL
14 -EXIT /b %errorlevel%
15 -:find_dp0
16 -SET dp0=%~dp0
17 -EXIT /b
1 -#!/usr/bin/env pwsh
2 -$basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent
3 -
4 -$exe=""
5 -if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) {
6 - # Fix case when both the Windows and Linux builds of Node
7 - # are installed in the same directory
8 - $exe=".exe"
9 -}
10 -$ret=0
11 -if (Test-Path "$basedir/node$exe") {
12 - & "$basedir/node$exe" "$basedir/../cssesc/bin/cssesc" $args
13 - $ret=$LASTEXITCODE
14 -} else {
15 - & "node$exe" "$basedir/../cssesc/bin/cssesc" $args
16 - $ret=$LASTEXITCODE
17 -}
18 -exit $ret
1 -Copyright Mathias Bynens <https://mathiasbynens.be/>
2 -
3 -Permission is hereby granted, free of charge, to any person obtaining
4 -a copy of this software and associated documentation files (the
5 -"Software"), to deal in the Software without restriction, including
6 -without limitation the rights to use, copy, modify, merge, publish,
7 -distribute, sublicense, and/or sell copies of the Software, and to
8 -permit persons to whom the Software is furnished to do so, subject to
9 -the following conditions:
10 -
11 -The above copyright notice and this permission notice shall be
12 -included in all copies or substantial portions of the Software.
13 -
14 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 -# cssesc [![Build status](https://travis-ci.org/mathiasbynens/cssesc.svg?branch=master)](https://travis-ci.org/mathiasbynens/cssesc) [![Code coverage status](https://img.shields.io/codecov/c/github/mathiasbynens/cssesc.svg)](https://codecov.io/gh/mathiasbynens/cssesc)
2 -
3 -A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.
4 -
5 -This is a JavaScript library for [escaping text for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes) while generating the shortest possible valid ASCII-only output. [Here’s an online demo.](https://mothereff.in/css-escapes)
6 -
7 -[A polyfill for the CSSOM `CSS.escape()` method is available in a separate repository.](https://mths.be/cssescape) (In comparison, _cssesc_ is much more powerful.)
8 -
9 -Feel free to fork if you see possible improvements!
10 -
11 -## Installation
12 -
13 -Via [npm](https://www.npmjs.com/):
14 -
15 -```bash
16 -npm install cssesc
17 -```
18 -
19 -In a browser:
20 -
21 -```html
22 -<script src="cssesc.js"></script>
23 -```
24 -
25 -In [Node.js](https://nodejs.org/):
26 -
27 -```js
28 -const cssesc = require('cssesc');
29 -```
30 -
31 -In Ruby using [the `ruby-cssesc` wrapper gem](https://github.com/borodean/ruby-cssesc):
32 -
33 -```bash
34 -gem install ruby-cssesc
35 -```
36 -
37 -```ruby
38 -require 'ruby-cssesc'
39 -CSSEsc.escape('I ♥ Ruby', is_identifier: true)
40 -```
41 -
42 -In Sass using [`sassy-escape`](https://github.com/borodean/sassy-escape):
43 -
44 -```bash
45 -gem install sassy-escape
46 -```
47 -
48 -```scss
49 -body {
50 - content: escape('I ♥ Sass', $is-identifier: true);
51 -}
52 -```
53 -
54 -## API
55 -
56 -### `cssesc(value, options)`
57 -
58 -This function takes a value and returns an escaped version of the value where any characters that are not printable ASCII symbols are escaped using the shortest possible (but valid) [escape sequences for use in CSS strings or identifiers](https://mathiasbynens.be/notes/css-escapes).
59 -
60 -```js
61 -cssesc('Ich ♥ Bücher');
62 -// → 'Ich \\2665 B\\FC cher'
63 -
64 -cssesc('foo 𝌆 bar');
65 -// → 'foo \\1D306 bar'
66 -```
67 -
68 -By default, `cssesc` returns a string that can be used as part of a CSS string. If the target is a CSS identifier rather than a CSS string, use the `isIdentifier: true` setting (see below).
69 -
70 -The optional `options` argument accepts an object with the following options:
71 -
72 -#### `isIdentifier`
73 -
74 -The default value for the `isIdentifier` option is `false`. This means that the input text will be escaped for use in a CSS string literal. If you want to use the result as a CSS identifier instead (in a selector, for example), set this option to `true`.
75 -
76 -```js
77 -cssesc('123a2b');
78 -// → '123a2b'
79 -
80 -cssesc('123a2b', {
81 - 'isIdentifier': true
82 -});
83 -// → '\\31 23a2b'
84 -```
85 -
86 -#### `quotes`
87 -
88 -The default value for the `quotes` option is `'single'`. This means that any occurences of `'` in the input text will be escaped as `\'`, so that the output can be used in a CSS string literal wrapped in single quotes.
89 -
90 -```js
91 -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.');
92 -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.'
93 -// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc."
94 -
95 -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
96 - 'quotes': 'single'
97 -});
98 -// → 'Lorem ipsum "dolor" sit \\\'amet\\\' etc.'
99 -// → "Lorem ipsum \"dolor\" sit \\'amet\\' etc."
100 -```
101 -
102 -If you want to use the output as part of a CSS string literal wrapped in double quotes, set the `quotes` option to `'double'`.
103 -
104 -```js
105 -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
106 - 'quotes': 'double'
107 -});
108 -// → 'Lorem ipsum \\"dolor\\" sit \'amet\' etc.'
109 -// → "Lorem ipsum \\\"dolor\\\" sit 'amet' etc."
110 -```
111 -
112 -#### `wrap`
113 -
114 -The `wrap` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, the output will be a valid CSS string literal wrapped in quotes. The type of quotes can be specified through the `quotes` setting.
115 -
116 -```js
117 -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
118 - 'quotes': 'single',
119 - 'wrap': true
120 -});
121 -// → '\'Lorem ipsum "dolor" sit \\\'amet\\\' etc.\''
122 -// → "\'Lorem ipsum \"dolor\" sit \\\'amet\\\' etc.\'"
123 -
124 -cssesc('Lorem ipsum "dolor" sit \'amet\' etc.', {
125 - 'quotes': 'double',
126 - 'wrap': true
127 -});
128 -// → '"Lorem ipsum \\"dolor\\" sit \'amet\' etc."'
129 -// → "\"Lorem ipsum \\\"dolor\\\" sit \'amet\' etc.\""
130 -```
131 -
132 -#### `escapeEverything`
133 -
134 -The `escapeEverything` option takes a boolean value (`true` or `false`), and defaults to `false` (disabled). When enabled, all the symbols in the output will be escaped, even printable ASCII symbols.
135 -
136 -```js
137 -cssesc('lolwat"foo\'bar', {
138 - 'escapeEverything': true
139 -});
140 -// → '\\6C\\6F\\6C\\77\\61\\74\\"\\66\\6F\\6F\\\'\\62\\61\\72'
141 -// → "\\6C\\6F\\6C\\77\\61\\74\\\"\\66\\6F\\6F\\'\\62\\61\\72"
142 -```
143 -
144 -#### Overriding the default options globally
145 -
146 -The global default settings can be overridden by modifying the `css.options` object. This saves you from passing in an `options` object for every call to `encode` if you want to use the non-default setting.
147 -
148 -```js
149 -// Read the global default setting for `escapeEverything`:
150 -cssesc.options.escapeEverything;
151 -// → `false` by default
152 -
153 -// Override the global default setting for `escapeEverything`:
154 -cssesc.options.escapeEverything = true;
155 -
156 -// Using the global default setting for `escapeEverything`, which is now `true`:
157 -cssesc('foo © bar ≠ baz 𝌆 qux');
158 -// → '\\66\\6F\\6F\\ \\A9\\ \\62\\61\\72\\ \\2260\\ \\62\\61\\7A\\ \\1D306\\ \\71\\75\\78'
159 -```
160 -
161 -### `cssesc.version`
162 -
163 -A string representing the semantic version number.
164 -
165 -### Using the `cssesc` binary
166 -
167 -To use the `cssesc` binary in your shell, simply install cssesc globally using npm:
168 -
169 -```bash
170 -npm install -g cssesc
171 -```
172 -
173 -After that you will be able to escape text for use in CSS strings or identifiers from the command line:
174 -
175 -```bash
176 -$ cssesc 'föo ♥ bår 𝌆 baz'
177 -f\F6o \2665 b\E5r \1D306 baz
178 -```
179 -
180 -If the output needs to be a CSS identifier rather than part of a string literal, use the `-i`/`--identifier` option:
181 -
182 -```bash
183 -$ cssesc --identifier 'föo ♥ bår 𝌆 baz'
184 -f\F6o\ \2665\ b\E5r\ \1D306\ baz
185 -```
186 -
187 -See `cssesc --help` for the full list of options.
188 -
189 -## Support
190 -
191 -This library supports the Node.js and browser versions mentioned in [`.babelrc`](https://github.com/mathiasbynens/cssesc/blob/master/.babelrc). For a version that supports a wider variety of legacy browsers and environments out-of-the-box, [see v0.1.0](https://github.com/mathiasbynens/cssesc/releases/tag/v0.1.0).
192 -
193 -## Author
194 -
195 -| [![twitter/mathias](https://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter") |
196 -|---|
197 -| [Mathias Bynens](https://mathiasbynens.be/) |
198 -
199 -## License
200 -
201 -This library is available under the [MIT](https://mths.be/mit) license.
1 -#!/usr/bin/env node
2 -const fs = require('fs');
3 -const cssesc = require('../cssesc.js');
4 -const strings = process.argv.splice(2);
5 -const stdin = process.stdin;
6 -const options = {};
7 -const log = console.log;
8 -
9 -const main = function() {
10 - const option = strings[0];
11 -
12 - if (/^(?:-h|--help|undefined)$/.test(option)) {
13 - log(
14 - 'cssesc v%s - https://mths.be/cssesc',
15 - cssesc.version
16 - );
17 - log([
18 - '\nUsage:\n',
19 - '\tcssesc [string]',
20 - '\tcssesc [-i | --identifier] [string]',
21 - '\tcssesc [-s | --single-quotes] [string]',
22 - '\tcssesc [-d | --double-quotes] [string]',
23 - '\tcssesc [-w | --wrap] [string]',
24 - '\tcssesc [-e | --escape-everything] [string]',
25 - '\tcssesc [-v | --version]',
26 - '\tcssesc [-h | --help]',
27 - '\nExamples:\n',
28 - '\tcssesc \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
29 - '\tcssesc --identifier \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
30 - '\tcssesc --escape-everything \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
31 - '\tcssesc --double-quotes --wrap \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\'',
32 - '\techo \'f\xF6o \u2665 b\xE5r \uD834\uDF06 baz\' | cssesc'
33 - ].join('\n'));
34 - return process.exit(1);
35 - }
36 -
37 - if (/^(?:-v|--version)$/.test(option)) {
38 - log('v%s', cssesc.version);
39 - return process.exit(1);
40 - }
41 -
42 - strings.forEach(function(string) {
43 - // Process options
44 - if (/^(?:-i|--identifier)$/.test(string)) {
45 - options.isIdentifier = true;
46 - return;
47 - }
48 - if (/^(?:-s|--single-quotes)$/.test(string)) {
49 - options.quotes = 'single';
50 - return;
51 - }
52 - if (/^(?:-d|--double-quotes)$/.test(string)) {
53 - options.quotes = 'double';
54 - return;
55 - }
56 - if (/^(?:-w|--wrap)$/.test(string)) {
57 - options.wrap = true;
58 - return;
59 - }
60 - if (/^(?:-e|--escape-everything)$/.test(string)) {
61 - options.escapeEverything = true;
62 - return;
63 - }
64 -
65 - // Process string(s)
66 - let result;
67 - try {
68 - result = cssesc(string, options);
69 - log(result);
70 - } catch (exception) {
71 - log(exception.message + '\n');
72 - log('Error: failed to escape.');
73 - log('If you think this is a bug in cssesc, please report it:');
74 - log('https://github.com/mathiasbynens/cssesc/issues/new');
75 - log(
76 - '\nStack trace using cssesc@%s:\n',
77 - cssesc.version
78 - );
79 - log(exception.stack);
80 - return process.exit(1);
81 - }
82 - });
83 - // Return with exit status 0 outside of the `forEach` loop, in case
84 - // multiple strings were passed in.
85 - return process.exit(0);
86 -
87 -};
88 -
89 -if (stdin.isTTY) {
90 - // handle shell arguments
91 - main();
92 -} else {
93 - let timeout;
94 - // Either the script is called from within a non-TTY context, or `stdin`
95 - // content is being piped in.
96 - if (!process.stdout.isTTY) {
97 - // The script was called from a non-TTY context. This is a rather uncommon
98 - // use case we don’t actively support. However, we don’t want the script
99 - // to wait forever in such cases, so…
100 - timeout = setTimeout(function() {
101 - // …if no piped data arrived after a whole minute, handle shell
102 - // arguments instead.
103 - main();
104 - }, 60000);
105 - }
106 - let data = '';
107 - stdin.on('data', function(chunk) {
108 - clearTimeout(timeout);
109 - data += chunk;
110 - });
111 - stdin.on('end', function() {
112 - strings.push(data.trim());
113 - main();
114 - });
115 - stdin.resume();
116 -}
1 -/*! https://mths.be/cssesc v1.0.1 by @mathias */
2 -'use strict';
3 -
4 -var object = {};
5 -var hasOwnProperty = object.hasOwnProperty;
6 -var merge = function merge(options, defaults) {
7 - if (!options) {
8 - return defaults;
9 - }
10 - var result = {};
11 - for (var key in defaults) {
12 - // `if (defaults.hasOwnProperty(key) { … }` is not needed here, since
13 - // only recognized option names are used.
14 - result[key] = hasOwnProperty.call(options, key) ? options[key] : defaults[key];
15 - }
16 - return result;
17 -};
18 -
19 -var regexAnySingleEscape = /[ -,\.\/;-@\[-\^`\{-~]/;
20 -var regexSingleEscape = /[ -,\.\/;-@\[\]\^`\{-~]/;
21 -var regexAlwaysEscape = /['"\\]/;
22 -var regexExcessiveSpaces = /(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g;
23 -
24 -// https://mathiasbynens.be/notes/css-escapes#css
25 -var cssesc = function cssesc(string, options) {
26 - options = merge(options, cssesc.options);
27 - if (options.quotes != 'single' && options.quotes != 'double') {
28 - options.quotes = 'single';
29 - }
30 - var quote = options.quotes == 'double' ? '"' : '\'';
31 - var isIdentifier = options.isIdentifier;
32 -
33 - var firstChar = string.charAt(0);
34 - var output = '';
35 - var counter = 0;
36 - var length = string.length;
37 - while (counter < length) {
38 - var character = string.charAt(counter++);
39 - var codePoint = character.charCodeAt();
40 - var value = void 0;
41 - // If it’s not a printable ASCII character…
42 - if (codePoint < 0x20 || codePoint > 0x7E) {
43 - if (codePoint >= 0xD800 && codePoint <= 0xDBFF && counter < length) {
44 - // It’s a high surrogate, and there is a next character.
45 - var extra = string.charCodeAt(counter++);
46 - if ((extra & 0xFC00) == 0xDC00) {
47 - // next character is low surrogate
48 - codePoint = ((codePoint & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
49 - } else {
50 - // It’s an unmatched surrogate; only append this code unit, in case
51 - // the next code unit is the high surrogate of a surrogate pair.
52 - counter--;
53 - }
54 - }
55 - value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
56 - } else {
57 - if (options.escapeEverything) {
58 - if (regexAnySingleEscape.test(character)) {
59 - value = '\\' + character;
60 - } else {
61 - value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
62 - }
63 - // Note: `:` could be escaped as `\:`, but that fails in IE < 8.
64 - } else if (/[\t\n\f\r\x0B:]/.test(character)) {
65 - if (!isIdentifier && character == ':') {
66 - value = character;
67 - } else {
68 - value = '\\' + codePoint.toString(16).toUpperCase() + ' ';
69 - }
70 - } else if (character == '\\' || !isIdentifier && (character == '"' && quote == character || character == '\'' && quote == character) || isIdentifier && regexSingleEscape.test(character)) {
71 - value = '\\' + character;
72 - } else {
73 - value = character;
74 - }
75 - }
76 - output += value;
77 - }
78 -
79 - if (isIdentifier) {
80 - if (/^_/.test(output)) {
81 - // Prevent IE6 from ignoring the rule altogether (in case this is for an
82 - // identifier used as a selector)
83 - output = '\\_' + output.slice(1);
84 - } else if (/^-[-\d]/.test(output)) {
85 - output = '\\-' + output.slice(1);
86 - } else if (/\d/.test(firstChar)) {
87 - output = '\\3' + firstChar + ' ' + output.slice(1);
88 - }
89 - }
90 -
91 - // Remove spaces after `\HEX` escapes that are not followed by a hex digit,
92 - // since they’re redundant. Note that this is only possible if the escape
93 - // sequence isn’t preceded by an odd number of backslashes.
94 - output = output.replace(regexExcessiveSpaces, function ($0, $1, $2) {
95 - if ($1 && $1.length % 2) {
96 - // It’s not safe to remove the space, so don’t.
97 - return $0;
98 - }
99 - // Strip the space.
100 - return ($1 || '') + $2;
101 - });
102 -
103 - if (!isIdentifier && options.wrap) {
104 - return quote + output + quote;
105 - }
106 - return output;
107 -};
108 -
109 -// Expose default options (so they can be overridden globally).
110 -cssesc.options = {
111 - 'escapeEverything': false,
112 - 'isIdentifier': false,
113 - 'quotes': 'single',
114 - 'wrap': false
115 -};
116 -
117 -cssesc.version = '1.0.1';
118 -
119 -module.exports = cssesc;
1 -.Dd August 9, 2013
2 -.Dt cssesc 1
3 -.Sh NAME
4 -.Nm cssesc
5 -.Nd escape text for use in CSS string literals or identifiers
6 -.Sh SYNOPSIS
7 -.Nm
8 -.Op Fl i | -identifier Ar string
9 -.br
10 -.Op Fl s | -single-quotes Ar string
11 -.br
12 -.Op Fl d | -double-quotes Ar string
13 -.br
14 -.Op Fl w | -wrap Ar string
15 -.br
16 -.Op Fl e | -escape-everything Ar string
17 -.br
18 -.Op Fl v | -version
19 -.br
20 -.Op Fl h | -help
21 -.Sh DESCRIPTION
22 -.Nm
23 -escapes strings for use in CSS string literals or identifiers while generating the shortest possible valid ASCII-only output.
24 -.Sh OPTIONS
25 -.Bl -ohang -offset
26 -.It Sy "-s, --single-quotes"
27 -Escape any occurences of ' in the input string as \\', so that the output can be used in a CSS string literal wrapped in single quotes.
28 -.It Sy "-d, --double-quotes"
29 -Escape any occurences of " in the input string as \\", so that the output can be used in a CSS string literal wrapped in double quotes.
30 -.It Sy "-w, --wrap"
31 -Make sure the output is a valid CSS string literal wrapped in quotes. The type of quotes can be specified using the
32 -.Ar -s | --single-quotes
33 -or
34 -.Ar -d | --double-quotes
35 -settings.
36 -.It Sy "-e, --escape-everything"
37 -Escape all the symbols in the output, even printable ASCII symbols.
38 -.It Sy "-v, --version"
39 -Print cssesc's version.
40 -.It Sy "-h, --help"
41 -Show the help screen.
42 -.El
43 -.Sh EXIT STATUS
44 -The
45 -.Nm cssesc
46 -utility exits with one of the following values:
47 -.Pp
48 -.Bl -tag -width flag -compact
49 -.It Li 0
50 -.Nm
51 -successfully escaped the given text and printed the result.
52 -.It Li 1
53 -.Nm
54 -wasn't instructed to escape anything (for example, the
55 -.Ar --help
56 -flag was set); or, an error occurred.
57 -.El
58 -.Sh EXAMPLES
59 -.Bl -ohang -offset
60 -.It Sy "cssesc 'foo bar baz'"
61 -Print an escaped version of the given text.
62 -.It Sy echo\ 'foo bar baz'\ |\ cssesc
63 -Print an escaped version of the text that gets piped in.
64 -.El
65 -.Sh BUGS
66 -cssesc's bug tracker is located at <https://github.com/mathiasbynens/cssesc/issues>.
67 -.Sh AUTHOR
68 -Mathias Bynens <https://mathiasbynens.be/>
69 -.Sh WWW
70 -<https://mths.be/cssesc>
1 -{
2 - "_from": "cssesc@^2.0.0",
3 - "_id": "cssesc@2.0.0",
4 - "_inBundle": false,
5 - "_integrity": "sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg==",
6 - "_location": "/postcss-pseudo-class-any-link/cssesc",
7 - "_phantomChildren": {},
8 - "_requested": {
9 - "type": "range",
10 - "registry": true,
11 - "raw": "cssesc@^2.0.0",
12 - "name": "cssesc",
13 - "escapedName": "cssesc",
14 - "rawSpec": "^2.0.0",
15 - "saveSpec": null,
16 - "fetchSpec": "^2.0.0"
17 - },
18 - "_requiredBy": [
19 - "/postcss-pseudo-class-any-link/postcss-selector-parser"
20 - ],
21 - "_resolved": "https://registry.npmjs.org/cssesc/-/cssesc-2.0.0.tgz",
22 - "_shasum": "3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703",
23 - "_spec": "cssesc@^2.0.0",
24 - "_where": "C:\\Users\\kkwan_000\\Desktop\\git\\2017110269\\minsung\\node_modules\\postcss-pseudo-class-any-link\\node_modules\\postcss-selector-parser",
25 - "author": {
26 - "name": "Mathias Bynens",
27 - "url": "https://mathiasbynens.be/"
28 - },
29 - "bin": {
30 - "cssesc": "bin/cssesc"
31 - },
32 - "bugs": {
33 - "url": "https://github.com/mathiasbynens/cssesc/issues"
34 - },
35 - "bundleDependencies": false,
36 - "deprecated": false,
37 - "description": "A JavaScript library for escaping CSS strings and identifiers while generating the shortest possible ASCII-only output.",
38 - "devDependencies": {
39 - "babel-cli": "^6.26.0",
40 - "babel-preset-env": "^1.6.1",
41 - "codecov": "^1.0.1",
42 - "grunt": "^1.0.1",
43 - "grunt-template": "^1.0.0",
44 - "istanbul": "^0.4.4",
45 - "mocha": "^2.5.3",
46 - "regenerate": "^1.2.1",
47 - "requirejs": "^2.1.16"
48 - },
49 - "engines": {
50 - "node": ">=4"
51 - },
52 - "files": [
53 - "LICENSE-MIT.txt",
54 - "cssesc.js",
55 - "bin/",
56 - "man/"
57 - ],
58 - "homepage": "https://mths.be/cssesc",
59 - "keywords": [
60 - "css",
61 - "escape",
62 - "identifier",
63 - "string",
64 - "tool"
65 - ],
66 - "license": "MIT",
67 - "main": "cssesc.js",
68 - "man": [
69 - "man/cssesc.1"
70 - ],
71 - "name": "cssesc",
72 - "repository": {
73 - "type": "git",
74 - "url": "git+https://github.com/mathiasbynens/cssesc.git"
75 - },
76 - "scripts": {
77 - "build": "grunt template && babel cssesc.js -o cssesc.js",
78 - "cover": "istanbul cover --report html node_modules/.bin/_mocha tests -- -u exports -R spec",
79 - "test": "mocha tests"
80 - },
81 - "version": "2.0.0"
82 -}
1 -Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
2 -
3 -Permission is hereby granted, free of charge, to any person
4 -obtaining a copy of this software and associated documentation
5 -files (the "Software"), to deal in the Software without
6 -restriction, including without limitation the rights to use,
7 -copy, modify, merge, publish, distribute, sublicense, and/or sell
8 -copies of the Software, and to permit persons to whom the
9 -Software is furnished to do so, subject to the following
10 -conditions:
11 -
12 -The above copyright notice and this permission notice shall be
13 -included in all copies or substantial portions of the Software.
14 -
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17 -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19 -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20 -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 -OTHER DEALINGS IN THE SOFTWARE.
1 -# postcss-selector-parser [![Build Status](https://travis-ci.org/postcss/postcss-selector-parser.svg?branch=master)](https://travis-ci.org/postcss/postcss-selector-parser)
2 -
3 -> Selector parser with built in methods for working with selector strings.
4 -
5 -## Install
6 -
7 -With [npm](https://npmjs.com/package/postcss-selector-parser) do:
8 -
9 -```
10 -npm install postcss-selector-parser
11 -```
12 -
13 -## Quick Start
14 -
15 -```js
16 -const parser = require('postcss-selector-parser');
17 -const transform = selectors => {
18 - selectors.walk(selector => {
19 - // do something with the selector
20 - console.log(String(selector))
21 - });
22 -};
23 -
24 -const transformed = parser(transform).processSync('h1, h2, h3');
25 -```
26 -
27 -To normalize selector whitespace:
28 -
29 -```js
30 -const parser = require('postcss-selector-parser');
31 -const normalized = parser().processSync('h1, h2, h3', {lossless: false});
32 -// -> h1,h2,h3
33 -```
34 -
35 -Async support is provided through `parser.process` and will resolve a Promise
36 -with the resulting selector string.
37 -
38 -## API
39 -
40 -Please see [API.md](API.md).
41 -
42 -## Credits
43 -
44 -* Huge thanks to Andrey Sitnik (@ai) for work on PostCSS which helped
45 - accelerate this module's development.
46 -
47 -## License
48 -
49 -MIT
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _processor = require('./processor');
6 -
7 -var _processor2 = _interopRequireDefault(_processor);
8 -
9 -var _selectors = require('./selectors');
10 -
11 -var selectors = _interopRequireWildcard(_selectors);
12 -
13 -function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }
14 -
15 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16 -
17 -var parser = function parser(processor) {
18 - return new _processor2.default(processor);
19 -};
20 -
21 -Object.assign(parser, selectors);
22 -
23 -delete parser.__esModule;
24 -
25 -exports.default = parser;
26 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -exports.__esModule = true;
4 -
5 -var _parser = require("./parser");
6 -
7 -var _parser2 = _interopRequireDefault(_parser);
8 -
9 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10 -
11 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12 -
13 -var Processor = function () {
14 - function Processor(func, options) {
15 - _classCallCheck(this, Processor);
16 -
17 - this.func = func || function noop() {};
18 - this.funcRes = null;
19 - this.options = options;
20 - }
21 -
22 - Processor.prototype._shouldUpdateSelector = function _shouldUpdateSelector(rule) {
23 - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24 -
25 - var merged = Object.assign({}, this.options, options);
26 - if (merged.updateSelector === false) {
27 - return false;
28 - } else {
29 - return typeof rule !== "string";
30 - }
31 - };
32 -
33 - Processor.prototype._isLossy = function _isLossy() {
34 - var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35 -
36 - var merged = Object.assign({}, this.options, options);
37 - if (merged.lossless === false) {
38 - return true;
39 - } else {
40 - return false;
41 - }
42 - };
43 -
44 - Processor.prototype._root = function _root(rule) {
45 - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
46 -
47 - var parser = new _parser2.default(rule, this._parseOptions(options));
48 - return parser.root;
49 - };
50 -
51 - Processor.prototype._parseOptions = function _parseOptions(options) {
52 - return {
53 - lossy: this._isLossy(options)
54 - };
55 - };
56 -
57 - Processor.prototype._run = function _run(rule) {
58 - var _this = this;
59 -
60 - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
61 -
62 - return new Promise(function (resolve, reject) {
63 - try {
64 - var root = _this._root(rule, options);
65 - Promise.resolve(_this.func(root)).then(function (transform) {
66 - var string = undefined;
67 - if (_this._shouldUpdateSelector(rule, options)) {
68 - string = root.toString();
69 - rule.selector = string;
70 - }
71 - return { transform: transform, root: root, string: string };
72 - }).then(resolve, reject);
73 - } catch (e) {
74 - reject(e);
75 - return;
76 - }
77 - });
78 - };
79 -
80 - Processor.prototype._runSync = function _runSync(rule) {
81 - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
82 -
83 - var root = this._root(rule, options);
84 - var transform = this.func(root);
85 - if (transform && typeof transform.then === "function") {
86 - throw new Error("Selector processor returned a promise to a synchronous call.");
87 - }
88 - var string = undefined;
89 - if (options.updateSelector && typeof rule !== "string") {
90 - string = root.toString();
91 - rule.selector = string;
92 - }
93 - return { transform: transform, root: root, string: string };
94 - };
95 -
96 - /**
97 - * Process rule into a selector AST.
98 - *
99 - * @param rule {postcss.Rule | string} The css selector to be processed
100 - * @param options The options for processing
101 - * @returns {Promise<parser.Root>} The AST of the selector after processing it.
102 - */
103 -
104 -
105 - Processor.prototype.ast = function ast(rule, options) {
106 - return this._run(rule, options).then(function (result) {
107 - return result.root;
108 - });
109 - };
110 -
111 - /**
112 - * Process rule into a selector AST synchronously.
113 - *
114 - * @param rule {postcss.Rule | string} The css selector to be processed
115 - * @param options The options for processing
116 - * @returns {parser.Root} The AST of the selector after processing it.
117 - */
118 -
119 -
120 - Processor.prototype.astSync = function astSync(rule, options) {
121 - return this._runSync(rule, options).root;
122 - };
123 -
124 - /**
125 - * Process a selector into a transformed value asynchronously
126 - *
127 - * @param rule {postcss.Rule | string} The css selector to be processed
128 - * @param options The options for processing
129 - * @returns {Promise<any>} The value returned by the processor.
130 - */
131 -
132 -
133 - Processor.prototype.transform = function transform(rule, options) {
134 - return this._run(rule, options).then(function (result) {
135 - return result.transform;
136 - });
137 - };
138 -
139 - /**
140 - * Process a selector into a transformed value synchronously.
141 - *
142 - * @param rule {postcss.Rule | string} The css selector to be processed
143 - * @param options The options for processing
144 - * @returns {any} The value returned by the processor.
145 - */
146 -
147 -
148 - Processor.prototype.transformSync = function transformSync(rule, options) {
149 - return this._runSync(rule, options).transform;
150 - };
151 -
152 - /**
153 - * Process a selector into a new selector string asynchronously.
154 - *
155 - * @param rule {postcss.Rule | string} The css selector to be processed
156 - * @param options The options for processing
157 - * @returns {string} the selector after processing.
158 - */
159 -
160 -
161 - Processor.prototype.process = function process(rule, options) {
162 - return this._run(rule, options).then(function (result) {
163 - return result.string || result.root.toString();
164 - });
165 - };
166 -
167 - /**
168 - * Process a selector into a new selector string synchronously.
169 - *
170 - * @param rule {postcss.Rule | string} The css selector to be processed
171 - * @param options The options for processing
172 - * @returns {string} the selector after processing.
173 - */
174 -
175 -
176 - Processor.prototype.processSync = function processSync(rule, options) {
177 - var result = this._runSync(rule, options);
178 - return result.string || result.root.toString();
179 - };
180 -
181 - return Processor;
182 -}();
183 -
184 -exports.default = Processor;
185 -module.exports = exports["default"];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6 -
7 -var _cssesc = require('cssesc');
8 -
9 -var _cssesc2 = _interopRequireDefault(_cssesc);
10 -
11 -var _util = require('../util');
12 -
13 -var _node = require('./node');
14 -
15 -var _node2 = _interopRequireDefault(_node);
16 -
17 -var _types = require('./types');
18 -
19 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20 -
21 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
22 -
23 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
24 -
25 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
26 -
27 -var ClassName = function (_Node) {
28 - _inherits(ClassName, _Node);
29 -
30 - function ClassName(opts) {
31 - _classCallCheck(this, ClassName);
32 -
33 - var _this = _possibleConstructorReturn(this, _Node.call(this, opts));
34 -
35 - _this.type = _types.CLASS;
36 - _this._constructed = true;
37 - return _this;
38 - }
39 -
40 - ClassName.prototype.toString = function toString() {
41 - return [this.rawSpaceBefore, String('.' + this.stringifyProperty("value")), this.rawSpaceAfter].join('');
42 - };
43 -
44 - _createClass(ClassName, [{
45 - key: 'value',
46 - set: function set(v) {
47 - if (this._constructed) {
48 - var escaped = (0, _cssesc2.default)(v, { isIdentifier: true });
49 - if (escaped !== v) {
50 - (0, _util.ensureObject)(this, "raws");
51 - this.raws.value = escaped;
52 - } else if (this.raws) {
53 - delete this.raws.value;
54 - }
55 - }
56 - this._value = v;
57 - },
58 - get: function get() {
59 - return this._value;
60 - }
61 - }]);
62 -
63 - return ClassName;
64 -}(_node2.default);
65 -
66 -exports.default = ClassName;
67 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _node = require('./node');
6 -
7 -var _node2 = _interopRequireDefault(_node);
8 -
9 -var _types = require('./types');
10 -
11 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12 -
13 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14 -
15 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
16 -
17 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
18 -
19 -var Combinator = function (_Node) {
20 - _inherits(Combinator, _Node);
21 -
22 - function Combinator(opts) {
23 - _classCallCheck(this, Combinator);
24 -
25 - var _this = _possibleConstructorReturn(this, _Node.call(this, opts));
26 -
27 - _this.type = _types.COMBINATOR;
28 - return _this;
29 - }
30 -
31 - return Combinator;
32 -}(_node2.default);
33 -
34 -exports.default = Combinator;
35 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _node = require('./node');
6 -
7 -var _node2 = _interopRequireDefault(_node);
8 -
9 -var _types = require('./types');
10 -
11 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12 -
13 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14 -
15 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
16 -
17 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
18 -
19 -var Comment = function (_Node) {
20 - _inherits(Comment, _Node);
21 -
22 - function Comment(opts) {
23 - _classCallCheck(this, Comment);
24 -
25 - var _this = _possibleConstructorReturn(this, _Node.call(this, opts));
26 -
27 - _this.type = _types.COMMENT;
28 - return _this;
29 - }
30 -
31 - return Comment;
32 -}(_node2.default);
33 -
34 -exports.default = Comment;
35 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -exports.universal = exports.tag = exports.string = exports.selector = exports.root = exports.pseudo = exports.nesting = exports.id = exports.comment = exports.combinator = exports.className = exports.attribute = undefined;
5 -
6 -var _attribute = require('./attribute');
7 -
8 -var _attribute2 = _interopRequireDefault(_attribute);
9 -
10 -var _className = require('./className');
11 -
12 -var _className2 = _interopRequireDefault(_className);
13 -
14 -var _combinator = require('./combinator');
15 -
16 -var _combinator2 = _interopRequireDefault(_combinator);
17 -
18 -var _comment = require('./comment');
19 -
20 -var _comment2 = _interopRequireDefault(_comment);
21 -
22 -var _id = require('./id');
23 -
24 -var _id2 = _interopRequireDefault(_id);
25 -
26 -var _nesting = require('./nesting');
27 -
28 -var _nesting2 = _interopRequireDefault(_nesting);
29 -
30 -var _pseudo = require('./pseudo');
31 -
32 -var _pseudo2 = _interopRequireDefault(_pseudo);
33 -
34 -var _root = require('./root');
35 -
36 -var _root2 = _interopRequireDefault(_root);
37 -
38 -var _selector = require('./selector');
39 -
40 -var _selector2 = _interopRequireDefault(_selector);
41 -
42 -var _string = require('./string');
43 -
44 -var _string2 = _interopRequireDefault(_string);
45 -
46 -var _tag = require('./tag');
47 -
48 -var _tag2 = _interopRequireDefault(_tag);
49 -
50 -var _universal = require('./universal');
51 -
52 -var _universal2 = _interopRequireDefault(_universal);
53 -
54 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
55 -
56 -var attribute = exports.attribute = function attribute(opts) {
57 - return new _attribute2.default(opts);
58 -};
59 -var className = exports.className = function className(opts) {
60 - return new _className2.default(opts);
61 -};
62 -var combinator = exports.combinator = function combinator(opts) {
63 - return new _combinator2.default(opts);
64 -};
65 -var comment = exports.comment = function comment(opts) {
66 - return new _comment2.default(opts);
67 -};
68 -var id = exports.id = function id(opts) {
69 - return new _id2.default(opts);
70 -};
71 -var nesting = exports.nesting = function nesting(opts) {
72 - return new _nesting2.default(opts);
73 -};
74 -var pseudo = exports.pseudo = function pseudo(opts) {
75 - return new _pseudo2.default(opts);
76 -};
77 -var root = exports.root = function root(opts) {
78 - return new _root2.default(opts);
79 -};
80 -var selector = exports.selector = function selector(opts) {
81 - return new _selector2.default(opts);
82 -};
83 -var string = exports.string = function string(opts) {
84 - return new _string2.default(opts);
85 -};
86 -var tag = exports.tag = function tag(opts) {
87 - return new _tag2.default(opts);
88 -};
89 -var universal = exports.universal = function universal(opts) {
90 - return new _universal2.default(opts);
91 -};
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -exports.__esModule = true;
4 -exports.isUniversal = exports.isTag = exports.isString = exports.isSelector = exports.isRoot = exports.isPseudo = exports.isNesting = exports.isIdentifier = exports.isComment = exports.isCombinator = exports.isClassName = exports.isAttribute = undefined;
5 -
6 -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
7 -
8 -var _IS_TYPE;
9 -
10 -exports.isNode = isNode;
11 -exports.isPseudoElement = isPseudoElement;
12 -exports.isPseudoClass = isPseudoClass;
13 -exports.isContainer = isContainer;
14 -exports.isNamespace = isNamespace;
15 -
16 -var _types = require("./types");
17 -
18 -var IS_TYPE = (_IS_TYPE = {}, _IS_TYPE[_types.ATTRIBUTE] = true, _IS_TYPE[_types.CLASS] = true, _IS_TYPE[_types.COMBINATOR] = true, _IS_TYPE[_types.COMMENT] = true, _IS_TYPE[_types.ID] = true, _IS_TYPE[_types.NESTING] = true, _IS_TYPE[_types.PSEUDO] = true, _IS_TYPE[_types.ROOT] = true, _IS_TYPE[_types.SELECTOR] = true, _IS_TYPE[_types.STRING] = true, _IS_TYPE[_types.TAG] = true, _IS_TYPE[_types.UNIVERSAL] = true, _IS_TYPE);
19 -
20 -function isNode(node) {
21 - return (typeof node === "undefined" ? "undefined" : _typeof(node)) === "object" && IS_TYPE[node.type];
22 -}
23 -
24 -function isNodeType(type, node) {
25 - return isNode(node) && node.type === type;
26 -}
27 -
28 -var isAttribute = exports.isAttribute = isNodeType.bind(null, _types.ATTRIBUTE);
29 -var isClassName = exports.isClassName = isNodeType.bind(null, _types.CLASS);
30 -var isCombinator = exports.isCombinator = isNodeType.bind(null, _types.COMBINATOR);
31 -var isComment = exports.isComment = isNodeType.bind(null, _types.COMMENT);
32 -var isIdentifier = exports.isIdentifier = isNodeType.bind(null, _types.ID);
33 -var isNesting = exports.isNesting = isNodeType.bind(null, _types.NESTING);
34 -var isPseudo = exports.isPseudo = isNodeType.bind(null, _types.PSEUDO);
35 -var isRoot = exports.isRoot = isNodeType.bind(null, _types.ROOT);
36 -var isSelector = exports.isSelector = isNodeType.bind(null, _types.SELECTOR);
37 -var isString = exports.isString = isNodeType.bind(null, _types.STRING);
38 -var isTag = exports.isTag = isNodeType.bind(null, _types.TAG);
39 -var isUniversal = exports.isUniversal = isNodeType.bind(null, _types.UNIVERSAL);
40 -
41 -function isPseudoElement(node) {
42 - return isPseudo(node) && node.value && (node.value.startsWith("::") || node.value === ":before" || node.value === ":after");
43 -}
44 -function isPseudoClass(node) {
45 - return isPseudo(node) && !isPseudoElement(node);
46 -}
47 -
48 -function isContainer(node) {
49 - return !!(isNode(node) && node.walk);
50 -}
51 -
52 -function isNamespace(node) {
53 - return isAttribute(node) || isTag(node);
54 -}
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _node = require('./node');
6 -
7 -var _node2 = _interopRequireDefault(_node);
8 -
9 -var _types = require('./types');
10 -
11 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12 -
13 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14 -
15 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
16 -
17 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
18 -
19 -var ID = function (_Node) {
20 - _inherits(ID, _Node);
21 -
22 - function ID(opts) {
23 - _classCallCheck(this, ID);
24 -
25 - var _this = _possibleConstructorReturn(this, _Node.call(this, opts));
26 -
27 - _this.type = _types.ID;
28 - return _this;
29 - }
30 -
31 - ID.prototype.toString = function toString() {
32 - return [this.rawSpaceBefore, String('#' + this.stringifyProperty("value")), this.rawSpaceAfter].join('');
33 - };
34 -
35 - return ID;
36 -}(_node2.default);
37 -
38 -exports.default = ID;
39 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -"use strict";
2 -
3 -exports.__esModule = true;
4 -
5 -var _types = require("./types");
6 -
7 -Object.keys(_types).forEach(function (key) {
8 - if (key === "default" || key === "__esModule") return;
9 - Object.defineProperty(exports, key, {
10 - enumerable: true,
11 - get: function get() {
12 - return _types[key];
13 - }
14 - });
15 -});
16 -
17 -var _constructors = require("./constructors");
18 -
19 -Object.keys(_constructors).forEach(function (key) {
20 - if (key === "default" || key === "__esModule") return;
21 - Object.defineProperty(exports, key, {
22 - enumerable: true,
23 - get: function get() {
24 - return _constructors[key];
25 - }
26 - });
27 -});
28 -
29 -var _guards = require("./guards");
30 -
31 -Object.keys(_guards).forEach(function (key) {
32 - if (key === "default" || key === "__esModule") return;
33 - Object.defineProperty(exports, key, {
34 - enumerable: true,
35 - get: function get() {
36 - return _guards[key];
37 - }
38 - });
39 -});
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6 -
7 -var _cssesc = require('cssesc');
8 -
9 -var _cssesc2 = _interopRequireDefault(_cssesc);
10 -
11 -var _util = require('../util');
12 -
13 -var _node = require('./node');
14 -
15 -var _node2 = _interopRequireDefault(_node);
16 -
17 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18 -
19 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
20 -
21 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
22 -
23 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
24 -
25 -var Namespace = function (_Node) {
26 - _inherits(Namespace, _Node);
27 -
28 - function Namespace() {
29 - _classCallCheck(this, Namespace);
30 -
31 - return _possibleConstructorReturn(this, _Node.apply(this, arguments));
32 - }
33 -
34 - Namespace.prototype.qualifiedName = function qualifiedName(value) {
35 - if (this.namespace) {
36 - return this.namespaceString + '|' + value;
37 - } else {
38 - return value;
39 - }
40 - };
41 -
42 - Namespace.prototype.toString = function toString() {
43 - return [this.rawSpaceBefore, this.qualifiedName(this.stringifyProperty("value")), this.rawSpaceAfter].join('');
44 - };
45 -
46 - _createClass(Namespace, [{
47 - key: 'namespace',
48 - get: function get() {
49 - return this._namespace;
50 - },
51 - set: function set(namespace) {
52 - if (namespace === true || namespace === "*" || namespace === "&") {
53 - this._namespace = namespace;
54 - if (this.raws) {
55 - delete this.raws.namespace;
56 - }
57 - return;
58 - }
59 -
60 - var escaped = (0, _cssesc2.default)(namespace, { isIdentifier: true });
61 - this._namespace = namespace;
62 - if (escaped !== namespace) {
63 - (0, _util.ensureObject)(this, "raws");
64 - this.raws.namespace = escaped;
65 - } else if (this.raws) {
66 - delete this.raws.namespace;
67 - }
68 - }
69 - }, {
70 - key: 'ns',
71 - get: function get() {
72 - return this._namespace;
73 - },
74 - set: function set(namespace) {
75 - this.namespace = namespace;
76 - }
77 - }, {
78 - key: 'namespaceString',
79 - get: function get() {
80 - if (this.namespace) {
81 - var ns = this.stringifyProperty("namespace");
82 - if (ns === true) {
83 - return '';
84 - } else {
85 - return ns;
86 - }
87 - } else {
88 - return '';
89 - }
90 - }
91 - }]);
92 -
93 - return Namespace;
94 -}(_node2.default);
95 -
96 -exports.default = Namespace;
97 -;
98 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _node = require('./node');
6 -
7 -var _node2 = _interopRequireDefault(_node);
8 -
9 -var _types = require('./types');
10 -
11 -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12 -
13 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14 -
15 -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
16 -
17 -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
18 -
19 -var Nesting = function (_Node) {
20 - _inherits(Nesting, _Node);
21 -
22 - function Nesting(opts) {
23 - _classCallCheck(this, Nesting);
24 -
25 - var _this = _possibleConstructorReturn(this, _Node.call(this, opts));
26 -
27 - _this.type = _types.NESTING;
28 - _this.value = '&';
29 - return _this;
30 - }
31 -
32 - return Nesting;
33 -}(_node2.default);
34 -
35 -exports.default = Nesting;
36 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
1 -'use strict';
2 -
3 -exports.__esModule = true;
4 -
5 -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
6 -
7 -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
8 -
9 -var _util = require('../util');
10 -
11 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
12 -
13 -var cloneNode = function cloneNode(obj, parent) {
14 - if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' || obj === null) {
15 - return obj;
16 - }
17 -
18 - var cloned = new obj.constructor();
19 -
20 - for (var i in obj) {
21 - if (!obj.hasOwnProperty(i)) {
22 - continue;
23 - }
24 - var value = obj[i];
25 - var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);
26 -
27 - if (i === 'parent' && type === 'object') {
28 - if (parent) {
29 - cloned[i] = parent;
30 - }
31 - } else if (value instanceof Array) {
32 - cloned[i] = value.map(function (j) {
33 - return cloneNode(j, cloned);
34 - });
35 - } else {
36 - cloned[i] = cloneNode(value, cloned);
37 - }
38 - }
39 -
40 - return cloned;
41 -};
42 -
43 -var Node = function () {
44 - function Node() {
45 - var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
46 -
47 - _classCallCheck(this, Node);
48 -
49 - Object.assign(this, opts);
50 - this.spaces = this.spaces || {};
51 - this.spaces.before = this.spaces.before || '';
52 - this.spaces.after = this.spaces.after || '';
53 - }
54 -
55 - Node.prototype.remove = function remove() {
56 - if (this.parent) {
57 - this.parent.removeChild(this);
58 - }
59 - this.parent = undefined;
60 - return this;
61 - };
62 -
63 - Node.prototype.replaceWith = function replaceWith() {
64 - if (this.parent) {
65 - for (var index in arguments) {
66 - this.parent.insertBefore(this, arguments[index]);
67 - }
68 - this.remove();
69 - }
70 - return this;
71 - };
72 -
73 - Node.prototype.next = function next() {
74 - return this.parent.at(this.parent.index(this) + 1);
75 - };
76 -
77 - Node.prototype.prev = function prev() {
78 - return this.parent.at(this.parent.index(this) - 1);
79 - };
80 -
81 - Node.prototype.clone = function clone() {
82 - var overrides = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
83 -
84 - var cloned = cloneNode(this);
85 - for (var name in overrides) {
86 - cloned[name] = overrides[name];
87 - }
88 - return cloned;
89 - };
90 -
91 - /**
92 - * Some non-standard syntax doesn't follow normal escaping rules for css.
93 - * This allows non standard syntax to be appended to an existing property
94 - * by specifying the escaped value. By specifying the escaped value,
95 - * illegal characters are allowed to be directly inserted into css output.
96 - * @param {string} name the property to set
97 - * @param {any} value the unescaped value of the property
98 - * @param {string} valueEscaped optional. the escaped value of the property.
99 - */
100 -
101 -
102 - Node.prototype.appendToPropertyAndEscape = function appendToPropertyAndEscape(name, value, valueEscaped) {
103 - if (!this.raws) {
104 - this.raws = {};
105 - }
106 - var originalValue = this[name];
107 - var originalEscaped = this.raws[name];
108 - this[name] = originalValue + value; // this may trigger a setter that updates raws, so it has to be set first.
109 - if (originalEscaped || valueEscaped !== value) {
110 - this.raws[name] = (originalEscaped || originalValue) + valueEscaped;
111 - } else {
112 - delete this.raws[name]; // delete any escaped value that was created by the setter.
113 - }
114 - };
115 -
116 - /**
117 - * Some non-standard syntax doesn't follow normal escaping rules for css.
118 - * This allows the escaped value to be specified directly, allowing illegal
119 - * characters to be directly inserted into css output.
120 - * @param {string} name the property to set
121 - * @param {any} value the unescaped value of the property
122 - * @param {string} valueEscaped the escaped value of the property.
123 - */
124 -
125 -
126 - Node.prototype.setPropertyAndEscape = function setPropertyAndEscape(name, value, valueEscaped) {
127 - if (!this.raws) {
128 - this.raws = {};
129 - }
130 - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
131 - this.raws[name] = valueEscaped;
132 - };
133 -
134 - /**
135 - * When you want a value to passed through to CSS directly. This method
136 - * deletes the corresponding raw value causing the stringifier to fallback
137 - * to the unescaped value.
138 - * @param {string} name the property to set.
139 - * @param {any} value The value that is both escaped and unescaped.
140 - */
141 -
142 -
143 - Node.prototype.setPropertyWithoutEscape = function setPropertyWithoutEscape(name, value) {
144 - this[name] = value; // this may trigger a setter that updates raws, so it has to be set first.
145 - if (this.raws) {
146 - delete this.raws[name];
147 - }
148 - };
149 -
150 - /**
151 - *
152 - * @param {number} line The number (starting with 1)
153 - * @param {number} column The column number (starting with 1)
154 - */
155 -
156 -
157 - Node.prototype.isAtPosition = function isAtPosition(line, column) {
158 - if (this.source && this.source.start && this.source.end) {
159 - if (this.source.start.line > line) {
160 - return false;
161 - }
162 - if (this.source.end.line < line) {
163 - return false;
164 - }
165 - if (this.source.start.line === line && this.source.start.column > column) {
166 - return false;
167 - }
168 - if (this.source.end.line === line && this.source.end.column < column) {
169 - return false;
170 - }
171 - return true;
172 - }
173 - return undefined;
174 - };
175 -
176 - Node.prototype.stringifyProperty = function stringifyProperty(name) {
177 - return this.raws && this.raws[name] || this[name];
178 - };
179 -
180 - Node.prototype.toString = function toString() {
181 - return [this.rawSpaceBefore, String(this.stringifyProperty("value")), this.rawSpaceAfter].join('');
182 - };
183 -
184 - _createClass(Node, [{
185 - key: 'rawSpaceBefore',
186 - get: function get() {
187 - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.before;
188 - if (rawSpace === undefined) {
189 - rawSpace = this.spaces && this.spaces.before;
190 - }
191 - return rawSpace || "";
192 - },
193 - set: function set(raw) {
194 - (0, _util.ensureObject)(this, "raws", "spaces");
195 - this.raws.spaces.before = raw;
196 - }
197 - }, {
198 - key: 'rawSpaceAfter',
199 - get: function get() {
200 - var rawSpace = this.raws && this.raws.spaces && this.raws.spaces.after;
201 - if (rawSpace === undefined) {
202 - rawSpace = this.spaces.after;
203 - }
204 - return rawSpace || "";
205 - },
206 - set: function set(raw) {
207 - (0, _util.ensureObject)(this, "raws", "spaces");
208 - this.raws.spaces.after = raw;
209 - }
210 - }]);
211 -
212 - return Node;
213 -}();
214 -
215 -exports.default = Node;
216 -module.exports = exports['default'];
...\ No newline at end of file ...\ No newline at end of file
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.
This diff is collapsed. Click to expand it.