0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

21
web/node_modules/css-blank-pseudo/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,21 @@
# Changes to CSS Blank Pseudo
### 0.1.4 (November 17, 2018)
- Update documentation
### 0.1.3 (November 17, 2018)
- Improve CLI usage
### 0.1.2 (November 17, 2018)
- Provide a version specifically for Internet Explorer 11
### 0.1.1 (November 17, 2018)
- Update documentation
### 0.1.0 (November 17, 2018)
- Initial version

108
web/node_modules/css-blank-pseudo/LICENSE.md generated vendored Normal file
View file

@ -0,0 +1,108 @@
# CC0 1.0 Universal
## Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an “owner”) of an original work of
authorship and/or a database (each, a “Work”).
Certain owners wish to permanently relinquish those rights to a Work for the
purpose of contributing to a commons of creative, cultural and scientific works
(“Commons”) that the public can reliably and without fear of later claims of
infringement build upon, modify, incorporate in other works, reuse and
redistribute as freely as possible in any form whatsoever and for any purposes,
including without limitation commercial purposes. These owners may contribute
to the Commons to promote the ideal of a free culture and the further
production of creative, cultural and scientific works, or to gain reputation or
greater distribution for their Work in part through the use and efforts of
others.
For these and/or other purposes and motivations, and without any expectation of
additional consideration or compensation, the person associating CC0 with a
Work (the “Affirmer”), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and
publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.
1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights (“Copyright and
Related Rights”). Copyright and Related Rights include, but are not limited
to, the following:
1. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;
2. moral rights retained by the original author(s) and/or performer(s);
3. publicity and privacy rights pertaining to a persons image or likeness
depicted in a Work;
4. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(i), below;
5. rights protecting the extraction, dissemination, use and reuse of data in
a Work;
6. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and
7. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations
thereof.
2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmers Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the “Waiver”). Affirmer
makes the Waiver for the benefit of each member of the public at large and
to the detriment of Affirmers heirs and successors, fully intending that
such Waiver shall not be subject to revocation, rescission, cancellation,
termination, or any other legal or equitable action to disrupt the quiet
enjoyment of the Work by the public as contemplated by Affirmers express
Statement of Purpose.
3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmers express Statement of Purpose. In addition, to the extent the
Waiver is so judged Affirmer hereby grants to each affected person a
royalty-free, non transferable, non sublicensable, non exclusive,
irrevocable and unconditional license to exercise Affirmers Copyright and
Related Rights in the Work (i) in all territories worldwide, (ii) for the
maximum duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the “License”). The License
shall be deemed effective as of the date CC0 was applied by Affirmer to the
Work. Should any part of the License for any reason be judged legally
invalid or ineffective under applicable law, such partial invalidity or
ineffectiveness shall not invalidate the remainder of the License, and in
such case Affirmer hereby affirms that he or she will not (i) exercise any
of his or her remaining Copyright and Related Rights in the Work or (ii)
assert any associated claims and causes of action with respect to the Work,
in either case contrary to Affirmers express Statement of Purpose.
4. Limitations and Disclaimers.
1. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.
2. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or
otherwise, including without limitation warranties of title,
merchantability, fitness for a particular purpose, non infringement, or
the absence of latent or other defects, accuracy, or the present or
absence of errors, whether or not discoverable, all to the greatest
extent permissible under applicable law.
3. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without
limitation any persons Copyright and Related Rights in the Work.
Further, Affirmer disclaims responsibility for obtaining any necessary
consents, permissions or other rights required for any use of the Work.
4. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.
For more information, please see
http://creativecommons.org/publicdomain/zero/1.0/.

87
web/node_modules/css-blank-pseudo/README.md generated vendored Normal file
View file

@ -0,0 +1,87 @@
# CSS Blank Pseudo [<img src="http://jonathantneal.github.io/js-logo.svg" alt="" width="90" height="90" align="right">][CSS Blank Pseudo]
[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]
[CSS Blank Pseudo] lets you style form elements when they are empty, following
the [Selectors Level 4] specification.
```css
input {
/* style an input */
}
input:blank {
/* style an input without a value */
}
```
## Usage
From the command line, transform CSS files that use `:blank` selectors:
```bash
npx css-blank-pseudo SOURCE.css TRANSFORMED.css
```
Next, use your transformed CSS with this script:
```html
<link rel="stylesheet" href="TRANSFORMED.css">
<script src="https://unpkg.com/css-blank-pseudo/browser"></script>
<script>cssBlankPseudo(document)</script>
```
Thats it. The script is 509 bytes and works in all browsers.
---
If you support Internet Explorer 11, use the **browser legacy** script, which
is 671 bytes:
```html
<link rel="stylesheet" href="TRANSFORMED.css">
<script src="https://unpkg.com/css-blank-pseudo/browser-legacy"></script>
<script>cssBlankPseudo(document)</script>
```
## How it works
The [PostCSS plugin](README-POSTCSS.md) clones rules containing `:blank`,
replacing them with an alternative `[blank]` selector.
```css
input:blank {
background-color: yellow;
}
/* becomes */
input[blank] {
background-color: yellow;
}
input:blank {
background-color: yellow;
}
```
Next, the [JavaScript library](README-BROWSER.md) adds a `blank` attribute to
elements otherwise matching `:blank` natively.
```html
<input value="" blank>
<input value="This element has a value">
```
[cli-img]: https://img.shields.io/travis/csstools/css-blank-pseudo/master.svg
[cli-url]: https://travis-ci.org/csstools/css-blank-pseudo
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/css-blank-pseudo.svg
[npm-url]: https://www.npmjs.com/package/css-blank-pseudo
[CSS Blank Pseudo]: https://github.com/csstools/css-blank-pseudo
[PostCSS Preset Env]: https://preset-env.cssdb.org/
[Selectors Level 4]: https://drafts.csswg.org/selectors-4/#blank

1
web/node_modules/css-blank-pseudo/browser-legacy.js generated vendored Normal file
View file

@ -0,0 +1 @@
function cssBlankPseudo(e,t){var n=Object(t).className,r=Object(t).attr||"blank",o=Object(t).force;try{if(e.querySelector(":blank"),!o)return}catch(e){}var a,i,s,c=(e.ownerDocument||e).defaultView;d(c.HTMLInputElement),d(c.HTMLSelectElement),d(c.HTMLTextAreaElement),a=c.HTMLOptionElement,i=Object.getOwnPropertyDescriptor(a.prototype,"selected"),s=i.set,i.set=function(t){s.apply(this,arguments);var n=e.createEvent("Event");n.initEvent("change",!0,!0),this.dispatchEvent(n)},Object.defineProperty(a.prototype,"selected",i);var l=/^(INPUT|SELECT|TEXTAREA)$/;function p(){this.value||"SELECT"===this.nodeName&&this.options[this.selectedIndex].value?(r&&this.removeAttribute(r),n&&this.classList.remove(n),this.removeAttribute("blank")):(r&&this.setAttribute("blank",r),n&&this.classList.add(n))}function d(e){var t=Object.getOwnPropertyDescriptor(e.prototype,"value"),n=t.set;t.set=function(e){n.apply(this,arguments),p.apply(this)},Object.defineProperty(e.prototype,"value",t)}Array.prototype.forEach.call(e.querySelectorAll("INPUT,SELECT,TEXTAREA"),function(e){"SELECT"===e.nodeName?e.addEventListener("change",p):e.addEventListener("input",p),p.call(e)}),new MutationObserver(function(e){e.forEach(function(e){Array.prototype.forEach.call(e.addedNodes||[],function(e){1===e.nodeType&&l.test(e.nodeName)&&("SELECT"===e.nodeName?e.addEventListener("change",p):e.addEventListener("input",p),p.call(e))}),Array.prototype.forEach.call(e.removedNodes||[],function(e){1===e.nodeType&&l.test(e.nodeName)&&("SELECT"===e.nodeName?e.removeEventListener("change",p):e.removeEventListener("input",p))})})}).observe(e,{childList:!0,subtree:!0})}

1
web/node_modules/css-blank-pseudo/browser.js generated vendored Normal file
View file

@ -0,0 +1 @@
function cssBlankPseudo(e,t){var r=Object(t).className,n=Object(t).attr||"blank",o=Object(t).force;try{if(e.querySelector(":blank"),!o)return}catch(e){}var a=(e.ownerDocument||e).defaultView;i(a.HTMLInputElement),i(a.HTMLSelectElement),i(a.HTMLTextAreaElement);var c="input,select,textarea";function s(){this.value?(n&&this.removeAttribute(n),r&&this.classList.remove(r),this.removeAttribute("blank")):(n&&this.setAttribute("blank",n),r&&this.classList.add(r))}function i(e){var t=Object.getOwnPropertyDescriptor(e.prototype,"value"),r=t.set;t.set=function(e){r.apply(this,arguments),s.apply(this)},Object.defineProperty(e.prototype,"value",t)}Array.prototype.forEach.call(e.querySelectorAll(c),function(e){e.addEventListener("input",s),s.call(e)}),new MutationObserver(function(e){e.forEach(function(e){e.addedNodes&&e.addedNodes.forEach(function(e){1===e.nodeType&&e.matches(c)&&(e.addEventListener("input",s),s.call(e))}),e.removedNodes&&e.removedNodes.forEach(function(e){1===e.nodeType&&e.matches(c)&&e.removeEventListener("input",s)})})}).observe(e,{childList:!0,subtree:!0})}

128
web/node_modules/css-blank-pseudo/cli.js generated vendored Executable file
View file

@ -0,0 +1,128 @@
#!/usr/bin/env node
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var fs = _interopDefault(require('fs'));
var postcss = _interopDefault(require('postcss'));
const selectorRegExp = /:blank([^\w-]|$)/gi;
var plugin = postcss.plugin('css-blank-pseudo', opts => {
const replaceWith = String(Object(opts).replaceWith || '[blank]');
const preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);
return root => {
root.walkRules(selectorRegExp, rule => {
const selector = rule.selector.replace(selectorRegExp, ($0, $1) => {
return `${replaceWith}${$1}`;
});
const clone = rule.clone({
selector
});
if (preserve) {
rule.before(clone);
} else {
rule.replaceWith(clone);
}
});
};
});
if (process.argv.length < 3) {
console.log(['CSS Blank Pseudo\n', ' Transforms CSS with :blank {}\n', 'Usage:\n', ' css-blank-pseudo source.css transformed.css', ' css-blank-pseudo --in=source.css --out=transformed.css --opts={}', ' echo "@media (prefers-color-scheme: dark) {}" | css-blank-pseudo\n'].join('\n'));
process.exit(0);
} // get process and plugin options from the command line
const fileRegExp = /^[\w\/.]+$/;
const argRegExp = /^--(\w+)=("|')?(.+)\2$/;
const relaxedJsonPropRegExp = /(['"])?([a-z0-9A-Z_]+)(['"])?:/g;
const relaxedJsonValueRegExp = /("[a-z0-9A-Z_]+":\s*)'?([A-z0-9]+)'?([,}])/g;
const argo = process.argv.slice(2).reduce((object, arg) => {
const argMatch = arg.match(argRegExp);
const fileMatch = arg.match(fileRegExp);
if (argMatch) {
object[argMatch[1]] = argMatch[3];
} else if (fileMatch) {
if (object.from === '<stdin>') {
object.from = arg;
} else if (object.to === '<stdout>') {
object.to = arg;
}
}
return object;
}, {
from: '<stdin>',
to: '<stdout>',
opts: 'null'
}); // get css from command line arguments or stdin
(argo.from === '<stdin>' ? getStdin() : readFile(argo.from)).then(css => {
const pluginOpts = JSON.parse(argo.opts.replace(relaxedJsonPropRegExp, '"$2": ').replace(relaxedJsonValueRegExp, '$1"$2"$3'));
const processOptions = Object.assign({
from: argo.from,
to: argo.to || argo.from
}, argo.map ? {
map: JSON.parse(argo.map)
} : {});
const result = plugin.process(css, processOptions, pluginOpts);
if (argo.to === '<stdout>') {
return result.css;
} else {
return writeFile(argo.to, result.css).then(() => `CSS was written to "${argo.to}"`);
}
}).then(result => {
console.log(result);
process.exit(0);
}, error => {
console.error(error);
process.exit(1);
});
function readFile(pathname) {
return new Promise((resolve, reject) => {
fs.readFile(pathname, 'utf8', (error, data) => {
if (error) {
reject(error);
} else {
resolve(data);
}
});
});
}
function writeFile(pathname, data) {
return new Promise((resolve, reject) => {
fs.writeFile(pathname, data, (error, content) => {
if (error) {
reject(error);
} else {
resolve(content);
}
});
});
}
function getStdin() {
return new Promise(resolve => {
let data = '';
if (process.stdin.isTTY) {
resolve(data);
} else {
process.stdin.setEncoding('utf8');
process.stdin.on('readable', () => {
let chunk;
while (chunk = process.stdin.read()) {
data += chunk;
}
});
process.stdin.on('end', () => {
resolve(data);
});
}
});
}

94
web/node_modules/css-blank-pseudo/index.js generated vendored Normal file
View file

@ -0,0 +1,94 @@
'use strict';
function cssBlankPseudo(document, opts) {
// configuration
const className = Object(opts).className;
const attr = Object(opts).attr || 'blank';
const force = Object(opts).force;
try {
document.querySelector(':blank');
if (!force) {
return;
}
} catch (ignoredError) {}
/* do nothing and continue */
// observe value changes on <input>, <select>, and <textarea>
const window = (document.ownerDocument || document).defaultView;
observeValueOfHTMLElement(window.HTMLInputElement);
observeValueOfHTMLElement(window.HTMLSelectElement);
observeValueOfHTMLElement(window.HTMLTextAreaElement); // form control elements selector
const selector = 'input,select,textarea'; // conditionally update all form control elements
Array.prototype.forEach.call(document.querySelectorAll(selector), node => {
node.addEventListener('input', configureCssBlankAttribute);
configureCssBlankAttribute.call(node);
}); // conditionally observe added or unobserve removed form control elements
new MutationObserver(mutationsList => {
mutationsList.forEach(mutation => {
if (mutation.addedNodes) {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1 && node.matches(selector)) {
node.addEventListener('input', configureCssBlankAttribute);
configureCssBlankAttribute.call(node);
}
});
}
if (mutation.removedNodes) {
mutation.removedNodes.forEach(node => {
if (node.nodeType === 1 && node.matches(selector)) {
node.removeEventListener('input', configureCssBlankAttribute);
}
});
}
});
}).observe(document, {
childList: true,
subtree: true
}); // update a form control elements css-blank attribute
function configureCssBlankAttribute() {
if (this.value) {
if (attr) {
this.removeAttribute(attr);
}
if (className) {
this.classList.remove(className);
}
this.removeAttribute('blank');
} else {
if (attr) {
this.setAttribute('blank', attr);
}
if (className) {
this.classList.add(className);
}
}
} // observe changes to the "value" property on an HTML Element
function observeValueOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'value');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
configureCssBlankAttribute.apply(this);
};
Object.defineProperty(HTMLElement.prototype, 'value', descriptor);
}
}
module.exports = cssBlankPseudo;
//# sourceMappingURL=index.js.map

1
web/node_modules/css-blank-pseudo/index.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

92
web/node_modules/css-blank-pseudo/index.mjs generated vendored Normal file
View file

@ -0,0 +1,92 @@
function cssBlankPseudo(document, opts) {
// configuration
const className = Object(opts).className;
const attr = Object(opts).attr || 'blank';
const force = Object(opts).force;
try {
document.querySelector(':blank');
if (!force) {
return;
}
} catch (ignoredError) {}
/* do nothing and continue */
// observe value changes on <input>, <select>, and <textarea>
const window = (document.ownerDocument || document).defaultView;
observeValueOfHTMLElement(window.HTMLInputElement);
observeValueOfHTMLElement(window.HTMLSelectElement);
observeValueOfHTMLElement(window.HTMLTextAreaElement); // form control elements selector
const selector = 'input,select,textarea'; // conditionally update all form control elements
Array.prototype.forEach.call(document.querySelectorAll(selector), node => {
node.addEventListener('input', configureCssBlankAttribute);
configureCssBlankAttribute.call(node);
}); // conditionally observe added or unobserve removed form control elements
new MutationObserver(mutationsList => {
mutationsList.forEach(mutation => {
if (mutation.addedNodes) {
mutation.addedNodes.forEach(node => {
if (node.nodeType === 1 && node.matches(selector)) {
node.addEventListener('input', configureCssBlankAttribute);
configureCssBlankAttribute.call(node);
}
});
}
if (mutation.removedNodes) {
mutation.removedNodes.forEach(node => {
if (node.nodeType === 1 && node.matches(selector)) {
node.removeEventListener('input', configureCssBlankAttribute);
}
});
}
});
}).observe(document, {
childList: true,
subtree: true
}); // update a form control elements css-blank attribute
function configureCssBlankAttribute() {
if (this.value) {
if (attr) {
this.removeAttribute(attr);
}
if (className) {
this.classList.remove(className);
}
this.removeAttribute('blank');
} else {
if (attr) {
this.setAttribute('blank', attr);
}
if (className) {
this.classList.add(className);
}
}
} // observe changes to the "value" property on an HTML Element
function observeValueOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'value');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
configureCssBlankAttribute.apply(this);
};
Object.defineProperty(HTMLElement.prototype, 'value', descriptor);
}
}
export default cssBlankPseudo;
//# sourceMappingURL=index.mjs.map

1
web/node_modules/css-blank-pseudo/index.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

121
web/node_modules/css-blank-pseudo/legacy.js generated vendored Normal file
View file

@ -0,0 +1,121 @@
'use strict';
function cssBlankPseudo(document, opts) {
// configuration
const className = Object(opts).className;
const attr = Object(opts).attr || 'blank';
const force = Object(opts).force;
try {
document.querySelector(':blank');
if (!force) {
return;
}
} catch (ignoredError) {}
/* do nothing and continue */
// observe value changes on <input>, <select>, and <textarea>
const window = (document.ownerDocument || document).defaultView;
observeValueOfHTMLElement(window.HTMLInputElement);
observeValueOfHTMLElement(window.HTMLSelectElement);
observeValueOfHTMLElement(window.HTMLTextAreaElement);
observeSelectedOfHTMLElement(window.HTMLOptionElement); // form control elements selector
const selector = 'INPUT,SELECT,TEXTAREA';
const selectorRegExp = /^(INPUT|SELECT|TEXTAREA)$/; // conditionally update all form control elements
Array.prototype.forEach.call(document.querySelectorAll(selector), node => {
if (node.nodeName === 'SELECT') {
node.addEventListener('change', configureCssBlankAttribute);
} else {
node.addEventListener('input', configureCssBlankAttribute);
}
configureCssBlankAttribute.call(node);
}); // conditionally observe added or unobserve removed form control elements
new MutationObserver(mutationsList => {
mutationsList.forEach(mutation => {
Array.prototype.forEach.call(mutation.addedNodes || [], node => {
if (node.nodeType === 1 && selectorRegExp.test(node.nodeName)) {
if (node.nodeName === 'SELECT') {
node.addEventListener('change', configureCssBlankAttribute);
} else {
node.addEventListener('input', configureCssBlankAttribute);
}
configureCssBlankAttribute.call(node);
}
});
Array.prototype.forEach.call(mutation.removedNodes || [], node => {
if (node.nodeType === 1 && selectorRegExp.test(node.nodeName)) {
if (node.nodeName === 'SELECT') {
node.removeEventListener('change', configureCssBlankAttribute);
} else {
node.removeEventListener('input', configureCssBlankAttribute);
}
}
});
});
}).observe(document, {
childList: true,
subtree: true
}); // update a form control elements css-blank attribute
function configureCssBlankAttribute() {
if (this.value || this.nodeName === 'SELECT' && this.options[this.selectedIndex].value) {
if (attr) {
this.removeAttribute(attr);
}
if (className) {
this.classList.remove(className);
}
this.removeAttribute('blank');
} else {
if (attr) {
this.setAttribute('blank', attr);
}
if (className) {
this.classList.add(className);
}
}
} // observe changes to the "value" property on an HTML Element
function observeValueOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'value');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
configureCssBlankAttribute.apply(this);
};
Object.defineProperty(HTMLElement.prototype, 'value', descriptor);
} // observe changes to the "selected" property on an HTML Element
function observeSelectedOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'selected');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
const event = document.createEvent('Event');
event.initEvent('change', true, true);
this.dispatchEvent(event);
};
Object.defineProperty(HTMLElement.prototype, 'selected', descriptor);
}
}
module.exports = cssBlankPseudo;
//# sourceMappingURL=legacy.js.map

1
web/node_modules/css-blank-pseudo/legacy.js.map generated vendored Normal file

File diff suppressed because one or more lines are too long

119
web/node_modules/css-blank-pseudo/legacy.mjs generated vendored Normal file
View file

@ -0,0 +1,119 @@
function cssBlankPseudo(document, opts) {
// configuration
const className = Object(opts).className;
const attr = Object(opts).attr || 'blank';
const force = Object(opts).force;
try {
document.querySelector(':blank');
if (!force) {
return;
}
} catch (ignoredError) {}
/* do nothing and continue */
// observe value changes on <input>, <select>, and <textarea>
const window = (document.ownerDocument || document).defaultView;
observeValueOfHTMLElement(window.HTMLInputElement);
observeValueOfHTMLElement(window.HTMLSelectElement);
observeValueOfHTMLElement(window.HTMLTextAreaElement);
observeSelectedOfHTMLElement(window.HTMLOptionElement); // form control elements selector
const selector = 'INPUT,SELECT,TEXTAREA';
const selectorRegExp = /^(INPUT|SELECT|TEXTAREA)$/; // conditionally update all form control elements
Array.prototype.forEach.call(document.querySelectorAll(selector), node => {
if (node.nodeName === 'SELECT') {
node.addEventListener('change', configureCssBlankAttribute);
} else {
node.addEventListener('input', configureCssBlankAttribute);
}
configureCssBlankAttribute.call(node);
}); // conditionally observe added or unobserve removed form control elements
new MutationObserver(mutationsList => {
mutationsList.forEach(mutation => {
Array.prototype.forEach.call(mutation.addedNodes || [], node => {
if (node.nodeType === 1 && selectorRegExp.test(node.nodeName)) {
if (node.nodeName === 'SELECT') {
node.addEventListener('change', configureCssBlankAttribute);
} else {
node.addEventListener('input', configureCssBlankAttribute);
}
configureCssBlankAttribute.call(node);
}
});
Array.prototype.forEach.call(mutation.removedNodes || [], node => {
if (node.nodeType === 1 && selectorRegExp.test(node.nodeName)) {
if (node.nodeName === 'SELECT') {
node.removeEventListener('change', configureCssBlankAttribute);
} else {
node.removeEventListener('input', configureCssBlankAttribute);
}
}
});
});
}).observe(document, {
childList: true,
subtree: true
}); // update a form control elements css-blank attribute
function configureCssBlankAttribute() {
if (this.value || this.nodeName === 'SELECT' && this.options[this.selectedIndex].value) {
if (attr) {
this.removeAttribute(attr);
}
if (className) {
this.classList.remove(className);
}
this.removeAttribute('blank');
} else {
if (attr) {
this.setAttribute('blank', attr);
}
if (className) {
this.classList.add(className);
}
}
} // observe changes to the "value" property on an HTML Element
function observeValueOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'value');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
configureCssBlankAttribute.apply(this);
};
Object.defineProperty(HTMLElement.prototype, 'value', descriptor);
} // observe changes to the "selected" property on an HTML Element
function observeSelectedOfHTMLElement(HTMLElement) {
const descriptor = Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'selected');
const nativeSet = descriptor.set;
descriptor.set = function set(value) {
// eslint-disable-line no-unused-vars
nativeSet.apply(this, arguments);
const event = document.createEvent('Event');
event.initEvent('change', true, true);
this.dispatchEvent(event);
};
Object.defineProperty(HTMLElement.prototype, 'selected', descriptor);
}
}
export default cssBlankPseudo;
//# sourceMappingURL=legacy.mjs.map

1
web/node_modules/css-blank-pseudo/legacy.mjs.map generated vendored Normal file

File diff suppressed because one or more lines are too long

85
web/node_modules/css-blank-pseudo/package.json generated vendored Normal file
View file

@ -0,0 +1,85 @@
{
"name": "css-blank-pseudo",
"version": "0.1.4",
"description": "Style form elements when they are empty",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"repository": "csstools/css-blank-pseudo",
"homepage": "https://github.com/csstools/css-blank-pseudo#readme",
"bugs": "https://github.com/csstools/css-blank-pseudo/issues",
"main": "index.js",
"module": "index.mjs",
"bin": {
"css-blank-pseudo": "cli.js"
},
"files": [
"browser.js",
"browser-legacy.js",
"cli.js",
"index.js",
"index.js.map",
"index.mjs",
"index.mjs.map",
"legacy.js",
"legacy.js.map",
"legacy.mjs",
"legacy.mjs.map",
"postcss.js",
"postcss.js.map",
"postcss.mjs",
"postcss.mjs.map"
],
"scripts": {
"build": "npm run build:browser && npm run build:cli && npm run build:node && npm run build:postcss",
"build:browser": "cross-env NODE_ENV=browser rollup -c .rollup.js --silent && cross-env NODE_ENV=browser:legacy rollup -c .rollup.js --silent",
"build:cli": "cross-env NODE_ENV=cli rollup -c .rollup.js --silent",
"build:postcss": "cross-env NODE_ENV=postcss rollup -c .rollup.js --silent",
"build:node": "rollup -c .rollup.js --silent && cross-env NODE_ENV=legacy rollup -c .rollup.js --silent",
"prepublishOnly": "npm run build && npm test",
"pretest": "npm run build:postcss",
"pretest:postcss": "npm run build:postcss",
"test": "npm run test:js && npm run test:postcss",
"test:js": "eslint src/*.js --cache --ignore-path .gitignore --quiet",
"test:postcss": "postcss-tape --plugin=postcss.js"
},
"engines": {
"node": ">=6.0.0"
},
"dependencies": {
"postcss": "^7.0.5"
},
"devDependencies": {
"@babel/core": "^7.1.6",
"@babel/preset-env": "^7.1.6",
"babel-eslint": "^10.0.1",
"cross-env": "^5.2.0",
"eslint": "^5.9.0",
"eslint-config-dev": "2.0.0",
"postcss-tape": "^2.2.0",
"pre-commit": "^1.2.2",
"rollup": "^0.67.3",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-terser": "^3.0.0"
},
"eslintConfig": {
"extends": "dev",
"parser": "babel-eslint"
},
"keywords": [
"postcss",
"css",
"postcss-plugin",
"javascript",
"js",
"polyfill",
"blank",
"empty",
"pseudo",
"selectors",
"accessibility",
"a11y",
"input",
"select",
"textarea"
]
}

30
web/node_modules/css-blank-pseudo/postcss.js generated vendored Normal file
View file

@ -0,0 +1,30 @@
'use strict';
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var postcss = _interopDefault(require('postcss'));
const selectorRegExp = /:blank([^\w-]|$)/gi;
var postcss$1 = postcss.plugin('css-blank-pseudo', opts => {
const replaceWith = String(Object(opts).replaceWith || '[blank]');
const preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);
return root => {
root.walkRules(selectorRegExp, rule => {
const selector = rule.selector.replace(selectorRegExp, ($0, $1) => {
return `${replaceWith}${$1}`;
});
const clone = rule.clone({
selector
});
if (preserve) {
rule.before(clone);
} else {
rule.replaceWith(clone);
}
});
};
});
module.exports = postcss$1;
//# sourceMappingURL=postcss.js.map

1
web/node_modules/css-blank-pseudo/postcss.js.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"postcss.js","sources":["src/postcss.js"],"sourcesContent":["import postcss from 'postcss';\n\nconst selectorRegExp = /:blank([^\\w-]|$)/gi;\n\nexport default postcss.plugin('css-blank-pseudo', opts => {\n\tconst replaceWith = String(Object(opts).replaceWith || '[blank]');\n\tconst preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);\n\n\treturn root => {\n\t\troot.walkRules(selectorRegExp, rule => {\n\t\t\tconst selector = rule.selector.replace(selectorRegExp, ($0, $1) => {\n\t\t\t\treturn `${replaceWith}${$1}`;\n\t\t\t});\n\n\t\t\tconst clone = rule.clone({ selector });\n\n\t\t\tif (preserve) {\n\t\t\t\trule.before(clone);\n\t\t\t} else {\n\t\t\t\trule.replaceWith(clone);\n\t\t\t}\n\t\t});\n\t};\n});\n"],"names":["selectorRegExp","postcss","plugin","opts","replaceWith","String","Object","preserve","Boolean","root","walkRules","rule","selector","replace","$0","$1","clone","before"],"mappings":";;;;;;AAEA,MAAMA,cAAc,GAAG,oBAAvB;AAEA,gBAAeC,OAAO,CAACC,MAAR,CAAe,kBAAf,EAAmCC,IAAI,IAAI;QACnDC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACH,IAAD,CAAN,CAAaC,WAAb,IAA4B,SAA7B,CAA1B;QACMG,QAAQ,GAAGC,OAAO,CAAC,cAAcF,MAAM,CAACH,IAAD,CAApB,GAA6BA,IAAI,CAACI,QAAlC,GAA6C,IAA9C,CAAxB;SAEOE,IAAI,IAAI;IACdA,IAAI,CAACC,SAAL,CAAeV,cAAf,EAA+BW,IAAI,IAAI;YAChCC,QAAQ,GAAGD,IAAI,CAACC,QAAL,CAAcC,OAAd,CAAsBb,cAAtB,EAAsC,CAACc,EAAD,EAAKC,EAAL,KAAY;eAC1D,GAAEX,WAAY,GAAEW,EAAG,EAA3B;OADgB,CAAjB;YAIMC,KAAK,GAAGL,IAAI,CAACK,KAAL,CAAW;QAAEJ;OAAb,CAAd;;UAEIL,QAAJ,EAAc;QACbI,IAAI,CAACM,MAAL,CAAYD,KAAZ;OADD,MAEO;QACNL,IAAI,CAACP,WAAL,CAAiBY,KAAjB;;KAVF;GADD;CAJc,CAAf;;;;"}

26
web/node_modules/css-blank-pseudo/postcss.mjs generated vendored Normal file
View file

@ -0,0 +1,26 @@
import postcss from 'postcss';
const selectorRegExp = /:blank([^\w-]|$)/gi;
var postcss$1 = postcss.plugin('css-blank-pseudo', opts => {
const replaceWith = String(Object(opts).replaceWith || '[blank]');
const preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);
return root => {
root.walkRules(selectorRegExp, rule => {
const selector = rule.selector.replace(selectorRegExp, ($0, $1) => {
return `${replaceWith}${$1}`;
});
const clone = rule.clone({
selector
});
if (preserve) {
rule.before(clone);
} else {
rule.replaceWith(clone);
}
});
};
});
export default postcss$1;
//# sourceMappingURL=postcss.mjs.map

1
web/node_modules/css-blank-pseudo/postcss.mjs.map generated vendored Normal file
View file

@ -0,0 +1 @@
{"version":3,"file":"postcss.mjs","sources":["src/postcss.js"],"sourcesContent":["import postcss from 'postcss';\n\nconst selectorRegExp = /:blank([^\\w-]|$)/gi;\n\nexport default postcss.plugin('css-blank-pseudo', opts => {\n\tconst replaceWith = String(Object(opts).replaceWith || '[blank]');\n\tconst preserve = Boolean('preserve' in Object(opts) ? opts.preserve : true);\n\n\treturn root => {\n\t\troot.walkRules(selectorRegExp, rule => {\n\t\t\tconst selector = rule.selector.replace(selectorRegExp, ($0, $1) => {\n\t\t\t\treturn `${replaceWith}${$1}`;\n\t\t\t});\n\n\t\t\tconst clone = rule.clone({ selector });\n\n\t\t\tif (preserve) {\n\t\t\t\trule.before(clone);\n\t\t\t} else {\n\t\t\t\trule.replaceWith(clone);\n\t\t\t}\n\t\t});\n\t};\n});\n"],"names":["selectorRegExp","postcss","plugin","opts","replaceWith","String","Object","preserve","Boolean","root","walkRules","rule","selector","replace","$0","$1","clone","before"],"mappings":";;AAEA,MAAMA,cAAc,GAAG,oBAAvB;AAEA,gBAAeC,OAAO,CAACC,MAAR,CAAe,kBAAf,EAAmCC,IAAI,IAAI;QACnDC,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACH,IAAD,CAAN,CAAaC,WAAb,IAA4B,SAA7B,CAA1B;QACMG,QAAQ,GAAGC,OAAO,CAAC,cAAcF,MAAM,CAACH,IAAD,CAApB,GAA6BA,IAAI,CAACI,QAAlC,GAA6C,IAA9C,CAAxB;SAEOE,IAAI,IAAI;IACdA,IAAI,CAACC,SAAL,CAAeV,cAAf,EAA+BW,IAAI,IAAI;YAChCC,QAAQ,GAAGD,IAAI,CAACC,QAAL,CAAcC,OAAd,CAAsBb,cAAtB,EAAsC,CAACc,EAAD,EAAKC,EAAL,KAAY;eAC1D,GAAEX,WAAY,GAAEW,EAAG,EAA3B;OADgB,CAAjB;YAIMC,KAAK,GAAGL,IAAI,CAACK,KAAL,CAAW;QAAEJ;OAAb,CAAd;;UAEIL,QAAJ,EAAc;QACbI,IAAI,CAACM,MAAL,CAAYD,KAAZ;OADD,MAEO;QACNL,IAAI,CAACP,WAAL,CAAiBY,KAAjB;;KAVF;GADD;CAJc,CAAf;;;;"}