applying transfer to react app

This commit is contained in:
Tyler Koenig
2021-09-20 16:54:47 -04:00
parent 8819f31dd0
commit c612b7d702
37373 changed files with 3775588 additions and 2871 deletions
+48
View File
@@ -0,0 +1,48 @@
# 4.0.1 - 2020-12-18
- Fixed: error when attribute selector containing :not ([#17](https://github.com/postcss/postcss-selector-not/pull/17))
# 4.0.0 - 2018-09-17
- Added: compatibility with postcss v7.x
- Added: compatibility with node v6.x
# 3.0.1 - 2017-05-15
- Fixed: incorrect export ([#8](https://github.com/postcss/postcss-selector-not/issues/8))
# 3.0.0 - 2017-05-11
- Added: compatibility with postcss v6.x
# 2.0.0 - 2015-08-25
- Removed: compatibility with postcss v4.x
- Added: compatibility with postcss v5.x
# 1.2.1 - 2015-06-16
- Fixed: selector was updated as an array, which is wrong.
# 1.2.0 - 2015-06-16
- Fixed: spec has been previously misinterpreted and now transform correctly
`:not()` level 4 to collapsed level 3
([#1](https://github.com/postcss/postcss-selector-not/issues/1))
- Removed: `lineBreak` option (useless now)
# 1.1.0 - 2015-06-13
- Added: `lineBreak` option
# 1.0.2 - 2015-06-13
- Fixed: support of pseudo classes that use parenthesis
# 1.0.1 - 2015-04-30
- Fixed: the module now works in non babel environments
# 1.0.0 - 2015-04-30
✨ First release
Generated Vendored Executable
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 Maxime Thirouin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+46
View File
@@ -0,0 +1,46 @@
# postcss-selector-not [![CSS Standard Status](https://cssdb.org/badge/not-pseudo-class.svg)](https://cssdb.org/#not-pseudo-class) [![Build Status](https://travis-ci.org/postcss/postcss-selector-not.svg?branch=master)](https://travis-ci.org/postcss/postcss-selector-not)
> PostCSS plugin to transform `:not()` W3C CSS level 4 pseudo class to :not() CSS level 3 selectors
http://dev.w3.org/csswg/selectors-4/#negation
[!['Can I use' table](https://caniuse.bitsofco.de/image/css-not-sel-list.png)](https://caniuse.com/#feat=css-not-sel-list)
## Installation
```console
$ npm install postcss-selector-not
```
## Usage
```js
var postcss = require("postcss")
var output = postcss()
.use(require("postcss-selector-not"))
.process(require("fs").readFileSync("input.css", "utf8"))
.css
```
Using this `input.css`:
```css
p:not(:first-child, .special) {
color: red;
}
```
you will get:
```css
p:not(:first-child):not(.special) {
color: red;
}
```
---
## [Changelog](CHANGELOG.md)
## [License](LICENSE)
+75
View File
@@ -0,0 +1,75 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _postcss = require("postcss");
var _postcss2 = _interopRequireDefault(_postcss);
var _list = require("postcss/lib/list");
var _list2 = _interopRequireDefault(_list);
var _balancedMatch = require("balanced-match");
var _balancedMatch2 = _interopRequireDefault(_balancedMatch);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function explodeSelector(pseudoClass, selector) {
var position = locatePseudoClass(selector, pseudoClass);
if (selector && position > -1) {
var pre = selector.slice(0, position);
var matches = (0, _balancedMatch2.default)("(", ")", selector.slice(position));
if (!matches) {
return selector;
}
var bodySelectors = matches.body ? _list2.default.comma(matches.body).map(function (s) {
return explodeSelector(pseudoClass, s);
}).join(`)${pseudoClass}(`) : "";
var postSelectors = matches.post ? explodeSelector(pseudoClass, matches.post) : "";
return `${pre}${pseudoClass}(${bodySelectors})${postSelectors}`;
}
return selector;
}
var patternCache = {};
function locatePseudoClass(selector, pseudoClass) {
patternCache[pseudoClass] = patternCache[pseudoClass] || new RegExp(`([^\\\\]|^)${pseudoClass}`);
// The regex is used to ensure that selectors with
// escaped colons in them are treated properly
// Ex: .foo\:not-bar is a valid CSS selector
// But it is not a reference to a pseudo selector
var pattern = patternCache[pseudoClass];
var position = selector.search(pattern);
if (position === -1) {
return -1;
}
// The offset returned by the regex may be off by one because
// of it including the negated character match in the position
return position + selector.slice(position).indexOf(pseudoClass);
}
function explodeSelectors(pseudoClass) {
return function () {
return function (css) {
css.walkRules(function (rule) {
if (rule.selector && rule.selector.indexOf(pseudoClass) > -1) {
rule.selector = explodeSelector(pseudoClass, rule.selector);
}
});
};
};
}
exports.default = _postcss2.default.plugin("postcss-selector-not", explodeSelectors(":not"));
module.exports = exports.default;
+72
View File
@@ -0,0 +1,72 @@
{
"_from": "postcss-selector-not@^4.0.0",
"_id": "postcss-selector-not@4.0.1",
"_inBundle": false,
"_integrity": "sha512-YolvBgInEK5/79C+bdFMyzqTg6pkYqDbzZIST/PDMqa/o3qtXenD05apBG2jLgT0/BQ77d4U2UK12jWpilqMAQ==",
"_location": "/postcss-selector-not",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "postcss-selector-not@^4.0.0",
"name": "postcss-selector-not",
"escapedName": "postcss-selector-not",
"rawSpec": "^4.0.0",
"saveSpec": null,
"fetchSpec": "^4.0.0"
},
"_requiredBy": [
"/postcss-preset-env"
],
"_resolved": "https://registry.npmjs.org/postcss-selector-not/-/postcss-selector-not-4.0.1.tgz",
"_shasum": "263016eef1cf219e0ade9a913780fc1f48204cbf",
"_spec": "postcss-selector-not@^4.0.0",
"_where": "/Users/tylerkoenig/Code/personal/react-scss2/node_modules/postcss-preset-env",
"author": {
"name": "Maxime Thirouin"
},
"bugs": {
"url": "https://github.com/postcss/postcss-selector-not/issues"
},
"bundleDependencies": false,
"dependencies": {
"balanced-match": "^1.0.0",
"postcss": "^7.0.2"
},
"deprecated": false,
"description": "PostCSS plugin to transform :not() W3C CSS level 4 pseudo class to :not() CSS level 3 selectors",
"devDependencies": {
"babel-cli": "^6.26.0",
"babel-plugin-add-module-exports": "^1.0.0",
"babel-preset-env": "^1.7.0",
"babel-register": "^6.26.0",
"eslint": "^5.6.0",
"tape": "^4.9.1"
},
"files": [
"dist"
],
"homepage": "https://github.com/postcss/postcss-selector-not#readme",
"keywords": [
"postcss",
"postcss-plugin",
"selectors",
"selector",
"Not"
],
"license": "MIT",
"main": "dist/index.js",
"name": "postcss-selector-not",
"repository": {
"type": "git",
"url": "git+https://github.com/postcss/postcss-selector-not.git"
},
"scripts": {
"babelify": "babel src --out-dir dist",
"lint": "eslint ./src/*.js ./test/*.js",
"prepublish": "npm run babelify",
"tape": "tape -r babel-register test/*.js",
"test": "npm run lint && npm run babelify && npm run tape"
},
"version": "4.0.1"
}