Conexio amb la api
This commit is contained in:
parent
207c0ba819
commit
b12369cb47
48513 changed files with 7391639 additions and 7 deletions
77
node_modules/postcss-normalize-repeat-style/CHANGELOG.md
generated
vendored
Executable file
77
node_modules/postcss-normalize-repeat-style/CHANGELOG.md
generated
vendored
Executable file
|
|
@ -0,0 +1,77 @@
|
|||
# Change Log
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [5.0.1](https://github.com/cssnano/cssnano/compare/postcss-normalize-repeat-style@5.0.0...postcss-normalize-repeat-style@5.0.1) (2021-05-19)
|
||||
|
||||
**Note:** Version bump only for package postcss-normalize-repeat-style
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.0.0](https://github.com/cssnano/cssnano/compare/postcss-normalize-repeat-style@5.0.0-rc.2...postcss-normalize-repeat-style@5.0.0) (2021-04-06)
|
||||
|
||||
**Note:** Version bump only for package postcss-normalize-repeat-style
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-normalize-repeat-style@5.0.0-rc.1...postcss-normalize-repeat-style@5.0.0-rc.2) (2021-03-15)
|
||||
|
||||
**Note:** Version bump only for package postcss-normalize-repeat-style
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# [5.0.0-rc.1](https://github.com/cssnano/cssnano/compare/postcss-normalize-repeat-style@5.0.0-rc.0...postcss-normalize-repeat-style@5.0.0-rc.1) (2021-03-04)
|
||||
|
||||
**Note:** Version bump only for package postcss-normalize-repeat-style
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# 5.0.0-rc.0 (2021-02-19)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **postcss-normalize-repeat-style:** better handle css variables ([#753](https://github.com/cssnano/cssnano/issues/753)) ([7e18b0c](https://github.com/cssnano/cssnano/commit/7e18b0cbcd7cb5de58e60ab4ef1900a4d8eeefec))
|
||||
|
||||
|
||||
### chore
|
||||
|
||||
* minimum require version of node is 10.13 ([#871](https://github.com/cssnano/cssnano/issues/871)) ([28bda24](https://github.com/cssnano/cssnano/commit/28bda243e32ce3ba89b3c358a5f78727b3732f11))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* migarete to PostCSS 8 ([#975](https://github.com/cssnano/cssnano/issues/975)) ([40b82dc](https://github.com/cssnano/cssnano/commit/40b82dca7f53ac02cd4fe62846dec79b898ccb49))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* minimum supported `postcss` version is `8.2.1`
|
||||
* minimum require version of node is 10.13
|
||||
|
||||
|
||||
|
||||
## 4.1.9 (2019-02-12)
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* **postcss-normalize-repeat-style:** increase perf ([#690](https://github.com/cssnano/cssnano/issues/690)) ([2c900e4](https://github.com/cssnano/cssnano/commit/2c900e4176e4aabd484e468b32b1ed1011c00ef4))
|
||||
|
||||
|
||||
|
||||
## 4.1.1 (2018-09-24)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **postcss-merge-longhand:** not mangle border output ([#555](https://github.com/cssnano/cssnano/issues/555)) ([9a70605](https://github.com/cssnano/cssnano/commit/9a706050b621e7795a9bf74eb7110b5c81804ffe)), closes [#553](https://github.com/cssnano/cssnano/issues/553) [#554](https://github.com/cssnano/cssnano/issues/554)
|
||||
22
node_modules/postcss-normalize-repeat-style/LICENSE-MIT
generated
vendored
Executable file
22
node_modules/postcss-normalize-repeat-style/LICENSE-MIT
generated
vendored
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
Copyright (c) Ben Briggs <beneb.info@gmail.com> (http://beneb.info)
|
||||
|
||||
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.
|
||||
44
node_modules/postcss-normalize-repeat-style/README.md
generated
vendored
Executable file
44
node_modules/postcss-normalize-repeat-style/README.md
generated
vendored
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
# [postcss][postcss]-normalize-repeat-style
|
||||
|
||||
> Normalize repeat styles with PostCSS.
|
||||
|
||||
## Install
|
||||
|
||||
With [npm](https://npmjs.org/package/postcss-normalize-repeat-style) do:
|
||||
|
||||
```
|
||||
npm install postcss-normalize-repeat-style --save
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
### Input
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url(image.jpg) repeat no-repeat
|
||||
}
|
||||
```
|
||||
|
||||
### Output
|
||||
|
||||
```css
|
||||
h1 {
|
||||
background: url(image.jpg) repeat-x
|
||||
}
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
|
||||
examples for your environment.
|
||||
|
||||
## Contributors
|
||||
|
||||
See [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Ben Briggs](http://beneb.info)
|
||||
|
||||
[postcss]: https://github.com/postcss/postcss
|
||||
155
node_modules/postcss-normalize-repeat-style/dist/index.js
generated
vendored
Executable file
155
node_modules/postcss-normalize-repeat-style/dist/index.js
generated
vendored
Executable file
|
|
@ -0,0 +1,155 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
|
||||
|
||||
var _cssnanoUtils = require("cssnano-utils");
|
||||
|
||||
var _map = _interopRequireDefault(require("./lib/map"));
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
function evenValues(list, index) {
|
||||
return index % 2 === 0;
|
||||
}
|
||||
|
||||
const repeatKeywords = _map.default.map(mapping => mapping[0]);
|
||||
|
||||
const getMatch = (0, _cssnanoUtils.getMatch)(_map.default);
|
||||
|
||||
function isCommaNode(node) {
|
||||
return node.type === 'div' && node.value === ',';
|
||||
}
|
||||
|
||||
function isVariableFunctionNode(node) {
|
||||
if (node.type !== 'function') {
|
||||
return false;
|
||||
}
|
||||
|
||||
return ['var', 'env'].includes(node.value.toLowerCase());
|
||||
}
|
||||
|
||||
function transform(value) {
|
||||
const parsed = (0, _postcssValueParser.default)(value);
|
||||
|
||||
if (parsed.nodes.length === 1) {
|
||||
return value;
|
||||
}
|
||||
|
||||
const ranges = [];
|
||||
let rangeIndex = 0;
|
||||
let shouldContinue = true;
|
||||
parsed.nodes.forEach((node, index) => {
|
||||
// After comma (`,`) follows next background
|
||||
if (isCommaNode(node)) {
|
||||
rangeIndex += 1;
|
||||
shouldContinue = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!shouldContinue) {
|
||||
return;
|
||||
} // After separator (`/`) follows `background-size` values
|
||||
// Avoid them
|
||||
|
||||
|
||||
if (node.type === 'div' && node.value === '/') {
|
||||
shouldContinue = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!ranges[rangeIndex]) {
|
||||
ranges[rangeIndex] = {
|
||||
start: null,
|
||||
end: null
|
||||
};
|
||||
} // Do not try to be processed `var and `env` function inside background
|
||||
|
||||
|
||||
if (isVariableFunctionNode(node)) {
|
||||
shouldContinue = false;
|
||||
ranges[rangeIndex].start = null;
|
||||
ranges[rangeIndex].end = null;
|
||||
return;
|
||||
}
|
||||
|
||||
const isRepeatKeyword = node.type === 'word' && repeatKeywords.includes(node.value.toLowerCase());
|
||||
|
||||
if (ranges[rangeIndex].start === null && isRepeatKeyword) {
|
||||
ranges[rangeIndex].start = index;
|
||||
ranges[rangeIndex].end = index;
|
||||
return;
|
||||
}
|
||||
|
||||
if (ranges[rangeIndex].start !== null) {
|
||||
if (node.type === 'space') {
|
||||
return;
|
||||
} else if (isRepeatKeyword) {
|
||||
ranges[rangeIndex].end = index;
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
});
|
||||
ranges.forEach(range => {
|
||||
if (range.start === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nodes = parsed.nodes.slice(range.start, range.end + 1);
|
||||
|
||||
if (nodes.length !== 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
const match = getMatch(nodes.filter(evenValues).map(n => n.value.toLowerCase()));
|
||||
|
||||
if (match) {
|
||||
nodes[0].value = match;
|
||||
nodes[1].value = nodes[2].value = '';
|
||||
}
|
||||
});
|
||||
return parsed.toString();
|
||||
}
|
||||
|
||||
function pluginCreator() {
|
||||
return {
|
||||
postcssPlugin: 'postcss-normalize-repeat-style',
|
||||
|
||||
prepare() {
|
||||
const cache = {};
|
||||
return {
|
||||
OnceExit(css) {
|
||||
css.walkDecls(/^(background(-repeat)?|(-\w+-)?mask-repeat)$/i, decl => {
|
||||
const value = decl.value;
|
||||
|
||||
if (!value) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (cache[value]) {
|
||||
decl.value = cache[value];
|
||||
return;
|
||||
}
|
||||
|
||||
const result = transform(value);
|
||||
decl.value = result;
|
||||
cache[value] = result;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
pluginCreator.postcss = true;
|
||||
var _default = pluginCreator;
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
9
node_modules/postcss-normalize-repeat-style/dist/lib/map.js
generated
vendored
Executable file
9
node_modules/postcss-normalize-repeat-style/dist/lib/map.js
generated
vendored
Executable file
|
|
@ -0,0 +1,9 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
var _default = [['repeat-x', ['repeat', 'no-repeat']], ['repeat-y', ['no-repeat', 'repeat']], ['repeat', ['repeat', 'repeat']], ['space', ['space', 'space']], ['round', ['round', 'round']], ['no-repeat', ['no-repeat', 'no-repeat']]];
|
||||
exports.default = _default;
|
||||
module.exports = exports.default;
|
||||
68
node_modules/postcss-normalize-repeat-style/package.json
generated
vendored
Executable file
68
node_modules/postcss-normalize-repeat-style/package.json
generated
vendored
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"_from": "postcss-normalize-repeat-style@^5.0.1",
|
||||
"_id": "postcss-normalize-repeat-style@5.0.1",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-syZ2itq0HTQjj4QtXZOeefomckiV5TaUO6ReIEabCh3wgDs4Mr01pkif0MeVwKyU/LHEkPJnpwFKRxqWA/7O3w==",
|
||||
"_location": "/postcss-normalize-repeat-style",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "postcss-normalize-repeat-style@^5.0.1",
|
||||
"name": "postcss-normalize-repeat-style",
|
||||
"escapedName": "postcss-normalize-repeat-style",
|
||||
"rawSpec": "^5.0.1",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^5.0.1"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cssnano-preset-default"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.0.1.tgz",
|
||||
"_shasum": "cbc0de1383b57f5bb61ddd6a84653b5e8665b2b5",
|
||||
"_spec": "postcss-normalize-repeat-style@^5.0.1",
|
||||
"_where": "/home/jack/Documents/JDA/m14/projecte_janmaroto/node_modules/cssnano-preset-default",
|
||||
"author": {
|
||||
"name": "Ben Briggs",
|
||||
"email": "beneb.info@gmail.com",
|
||||
"url": "http://beneb.info"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/cssnano/cssnano/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"cssnano-utils": "^2.0.1",
|
||||
"postcss-value-parser": "^4.1.0"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Convert two value syntax for repeat-style into one value.",
|
||||
"devDependencies": {
|
||||
"postcss": "^8.2.15"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^10 || ^12 || >=14.0"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE-MIT",
|
||||
"dist"
|
||||
],
|
||||
"gitHead": "28c247175032fa03f04911cde56ad82d74d211cc",
|
||||
"homepage": "https://github.com/cssnano/cssnano",
|
||||
"license": "MIT",
|
||||
"main": "dist/index.js",
|
||||
"name": "postcss-normalize-repeat-style",
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.2.15"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/cssnano/cssnano.git"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"",
|
||||
"prebuild": "del-cli dist",
|
||||
"prepublish": "yarn build"
|
||||
},
|
||||
"version": "5.0.1"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue