Conexio amb la api

This commit is contained in:
janmaroto 2022-02-09 18:30:03 +01:00
commit b12369cb47
48513 changed files with 7391639 additions and 7 deletions

77
node_modules/postcss-normalize-string/CHANGELOG.md generated vendored Executable file
View 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-string@5.0.0...postcss-normalize-string@5.0.1) (2021-05-19)
**Note:** Version bump only for package postcss-normalize-string
# [5.0.0](https://github.com/cssnano/cssnano/compare/postcss-normalize-string@5.0.0-rc.2...postcss-normalize-string@5.0.0) (2021-04-06)
**Note:** Version bump only for package postcss-normalize-string
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-normalize-string@5.0.0-rc.1...postcss-normalize-string@5.0.0-rc.2) (2021-03-15)
**Note:** Version bump only for package postcss-normalize-string
# [5.0.0-rc.1](https://github.com/cssnano/cssnano/compare/postcss-normalize-string@5.0.0-rc.0...postcss-normalize-string@5.0.0-rc.1) (2021-03-04)
**Note:** Version bump only for package postcss-normalize-string
# 5.0.0-rc.0 (2021-02-19)
### Bug Fixes
* **postcss-ordered-values:** columns transform returning string instead of the AST ([#928](https://github.com/cssnano/cssnano/issues/928)) ([a5d6d36](https://github.com/cssnano/cssnano/commit/a5d6d364e0815ecb198a95de301f3554ccce4f78))
### 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-string:** increase perf ([#689](https://github.com/cssnano/cssnano/issues/689)) ([07948cb](https://github.com/cssnano/cssnano/commit/07948cb3ff433825682c499516640abeeec7383a))
## 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-string/LICENSE-MIT generated vendored Executable file
View 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.

59
node_modules/postcss-normalize-string/README.md generated vendored Executable file
View file

@ -0,0 +1,59 @@
# [postcss][postcss]-normalize-string
> Normalize strings with PostCSS.
## Install
With [npm](https://npmjs.org/package/postcss-normalize-string) do:
```
npm install postcss-normalize-string --save
```
## Example
### Input
```css
p:after{ content: '\\'string\\' is intact' }
```
### Output
```css
p:after{ content:"'string' is intact" }
```
## Usage
See the [PostCSS documentation](https://github.com/postcss/postcss#usage) for
examples for your environment.
## API
### normalize([options])
#### options
##### preferredQuote
Type: `string`
Default: `double`
Sets what type of quote to prefer. Possible values are `single` and `double`.
```js
var css = 'p:after{content:""}';
console.log(postcss(normalize({preferredQuote: 'single'})).process(css).css);
//=> p:after{content:''}
```
## 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

277
node_modules/postcss-normalize-string/dist/index.js generated vendored Executable file
View file

@ -0,0 +1,277 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _postcssValueParser = _interopRequireDefault(require("postcss-value-parser"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/*
* Constants (parser usage)
*/
const SINGLE_QUOTE = "'".charCodeAt(0);
const DOUBLE_QUOTE = '"'.charCodeAt(0);
const BACKSLASH = '\\'.charCodeAt(0);
const NEWLINE = '\n'.charCodeAt(0);
const SPACE = ' '.charCodeAt(0);
const FEED = '\f'.charCodeAt(0);
const TAB = '\t'.charCodeAt(0);
const CR = '\r'.charCodeAt(0);
const WORD_END = /[ \n\t\r\f'"\\]/g;
/*
* Constants (node type strings)
*/
const C_STRING = 'string';
const C_ESCAPED_SINGLE_QUOTE = 'escapedSingleQuote';
const C_ESCAPED_DOUBLE_QUOTE = 'escapedDoubleQuote';
const C_SINGLE_QUOTE = 'singleQuote';
const C_DOUBLE_QUOTE = 'doubleQuote';
const C_NEWLINE = 'newline';
const C_SINGLE = 'single';
/*
* Literals
*/
const L_SINGLE_QUOTE = `'`;
const L_DOUBLE_QUOTE = `"`;
const L_NEWLINE = `\\\n`;
/*
* Parser nodes
*/
const T_ESCAPED_SINGLE_QUOTE = {
type: C_ESCAPED_SINGLE_QUOTE,
value: `\\'`
};
const T_ESCAPED_DOUBLE_QUOTE = {
type: C_ESCAPED_DOUBLE_QUOTE,
value: `\\"`
};
const T_SINGLE_QUOTE = {
type: C_SINGLE_QUOTE,
value: L_SINGLE_QUOTE
};
const T_DOUBLE_QUOTE = {
type: C_DOUBLE_QUOTE,
value: L_DOUBLE_QUOTE
};
const T_NEWLINE = {
type: C_NEWLINE,
value: L_NEWLINE
};
function stringify(ast) {
return ast.nodes.reduce((str, {
value
}) => {
// Collapse multiple line strings automatically
if (value === L_NEWLINE) {
return str;
}
return str + value;
}, '');
}
function parse(str) {
let code, next, value;
let pos = 0;
let len = str.length;
const ast = {
nodes: [],
types: {
escapedSingleQuote: 0,
escapedDoubleQuote: 0,
singleQuote: 0,
doubleQuote: 0
},
quotes: false
};
while (pos < len) {
code = str.charCodeAt(pos);
switch (code) {
case SPACE:
case TAB:
case CR:
case FEED:
next = pos;
do {
next += 1;
code = str.charCodeAt(next);
} while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);
ast.nodes.push({
type: 'space',
value: str.slice(pos, next)
});
pos = next - 1;
break;
case SINGLE_QUOTE:
ast.nodes.push(T_SINGLE_QUOTE);
ast.types[C_SINGLE_QUOTE]++;
ast.quotes = true;
break;
case DOUBLE_QUOTE:
ast.nodes.push(T_DOUBLE_QUOTE);
ast.types[C_DOUBLE_QUOTE]++;
ast.quotes = true;
break;
case BACKSLASH:
next = pos + 1;
if (str.charCodeAt(next) === SINGLE_QUOTE) {
ast.nodes.push(T_ESCAPED_SINGLE_QUOTE);
ast.types[C_ESCAPED_SINGLE_QUOTE]++;
ast.quotes = true;
pos = next;
break;
} else if (str.charCodeAt(next) === DOUBLE_QUOTE) {
ast.nodes.push(T_ESCAPED_DOUBLE_QUOTE);
ast.types[C_ESCAPED_DOUBLE_QUOTE]++;
ast.quotes = true;
pos = next;
break;
} else if (str.charCodeAt(next) === NEWLINE) {
ast.nodes.push(T_NEWLINE);
pos = next;
break;
}
/*
* We need to fall through here to handle the token as
* a whole word. The missing 'break' is intentional.
*/
default:
WORD_END.lastIndex = pos + 1;
WORD_END.test(str);
if (WORD_END.lastIndex === 0) {
next = len - 1;
} else {
next = WORD_END.lastIndex - 2;
}
value = str.slice(pos, next + 1);
ast.nodes.push({
type: C_STRING,
value
});
pos = next;
}
pos++;
}
return ast;
}
function changeWrappingQuotes(node, ast) {
const {
types
} = ast;
if (types[C_SINGLE_QUOTE] || types[C_DOUBLE_QUOTE]) {
return;
}
if (node.quote === L_SINGLE_QUOTE && types[C_ESCAPED_SINGLE_QUOTE] > 0 && !types[C_ESCAPED_DOUBLE_QUOTE]) {
node.quote = L_DOUBLE_QUOTE;
}
if (node.quote === L_DOUBLE_QUOTE && types[C_ESCAPED_DOUBLE_QUOTE] > 0 && !types[C_ESCAPED_SINGLE_QUOTE]) {
node.quote = L_SINGLE_QUOTE;
}
ast.nodes = ast.nodes.reduce((newAst, child) => {
if (child.type === C_ESCAPED_DOUBLE_QUOTE && node.quote === L_SINGLE_QUOTE) {
return [...newAst, T_DOUBLE_QUOTE];
}
if (child.type === C_ESCAPED_SINGLE_QUOTE && node.quote === L_DOUBLE_QUOTE) {
return [...newAst, T_SINGLE_QUOTE];
}
return [...newAst, child];
}, []);
}
function normalize(value, preferredQuote) {
if (!value || !value.length) {
return value;
}
return (0, _postcssValueParser.default)(value).walk(child => {
if (child.type !== C_STRING) {
return;
}
const ast = parse(child.value);
if (ast.quotes) {
changeWrappingQuotes(child, ast);
} else if (preferredQuote === C_SINGLE) {
child.quote = L_SINGLE_QUOTE;
} else {
child.quote = L_DOUBLE_QUOTE;
}
child.value = stringify(ast);
}).toString();
}
const params = {
rule: 'selector',
decl: 'value',
atrule: 'params'
};
function pluginCreator(opts) {
const {
preferredQuote
} = Object.assign({}, {
preferredQuote: 'double'
}, opts);
return {
postcssPlugin: 'postcss-normalize-string',
OnceExit(css) {
const cache = {};
css.walk(node => {
const {
type
} = node;
if (Object.prototype.hasOwnProperty.call(params, type)) {
const param = params[type];
const key = node[param] + '|' + preferredQuote;
if (cache[key]) {
node[param] = cache[key];
return;
}
const newValue = normalize(node[param], preferredQuote);
node[param] = newValue;
cache[key] = newValue;
}
});
}
};
}
pluginCreator.postcss = true;
var _default = pluginCreator;
exports.default = _default;
module.exports = exports.default;

72
node_modules/postcss-normalize-string/package.json generated vendored Executable file
View file

@ -0,0 +1,72 @@
{
"_from": "postcss-normalize-string@^5.0.1",
"_id": "postcss-normalize-string@5.0.1",
"_inBundle": false,
"_integrity": "sha512-Ic8GaQ3jPMVl1OEn2U//2pm93AXUcF3wz+OriskdZ1AOuYV25OdgS7w9Xu2LO5cGyhHCgn8dMXh9bO7vi3i9pA==",
"_location": "/postcss-normalize-string",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "postcss-normalize-string@^5.0.1",
"name": "postcss-normalize-string",
"escapedName": "postcss-normalize-string",
"rawSpec": "^5.0.1",
"saveSpec": null,
"fetchSpec": "^5.0.1"
},
"_requiredBy": [
"/cssnano-preset-default"
],
"_resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.0.1.tgz",
"_shasum": "d9eafaa4df78c7a3b973ae346ef0e47c554985b0",
"_spec": "postcss-normalize-string@^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": {
"postcss-value-parser": "^4.1.0"
},
"deprecated": false,
"description": "Normalize wrapping quotes for CSS string literals.",
"devDependencies": {
"postcss": "^8.2.15"
},
"engines": {
"node": "^10 || ^12 || >=14.0"
},
"files": [
"dist",
"LICENSE-MIT"
],
"gitHead": "28c247175032fa03f04911cde56ad82d74d211cc",
"homepage": "https://github.com/cssnano/cssnano",
"keywords": [
"css",
"postcss",
"postcss-plugin"
],
"license": "MIT",
"main": "dist/index.js",
"name": "postcss-normalize-string",
"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"
}