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

45
web/node_modules/@emotion/cache/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,45 @@
# @emotion/cache
## 10.0.29
### Patch Changes
- Updated dependencies [[`446e756`](https://github.com/emotion-js/emotion/commit/446e75661c4aa01e51d1466472a212940c19cd82)]:
- @emotion/hash@0.8.0
## 10.0.27
### Patch Changes
- [`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968) [#1698](https://github.com/emotion-js/emotion/pull/1698) Thanks [@Andarist](https://github.com/Andarist)! - Add LICENSE file
- Updated dependencies [[`4c62ae9`](https://github.com/emotion-js/emotion/commit/4c62ae9447959d438928e1a26f76f1487983c968)]:
- @emotion/hash@0.7.4
- @emotion/sheet@0.9.4
- @emotion/stylis@0.8.5
- @emotion/utils@0.11.3
- @emotion/weak-memoize@0.2.5
## 10.0.19
- Updated dependencies [c81c0033]:
- @emotion/hash@0.7.3
- @emotion/weak-memoize@0.2.4
## 10.0.17
### Patch Changes
- [10514a86](https://github.com/emotion-js/emotion/commit/10514a8635dcaa55b85c7bff90e2a9e14d1ba61f) [#1482](https://github.com/emotion-js/emotion/pull/1482) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Remove react native bundles in favour of different isBrowser detection
- [16ff2330](https://github.com/emotion-js/emotion/commit/16ff233061e35fe71bfb1671da54ac12d6fc9eeb) [#1483](https://github.com/emotion-js/emotion/pull/1483) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - nth selector will no longer warn when using extract critical
## 10.0.15
### Patch Changes
- [61e61edc](https://github.com/emotion-js/emotion/commit/61e61edc) [#1412](https://github.com/emotion-js/emotion/pull/1412) Thanks [@donysukardi](https://github.com/donysukardi)! - Add explicit entries for react-native and sketch environments
## 10.0.14
### Patch Changes
- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool

21
web/node_modules/@emotion/cache/LICENSE generated vendored Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) Emotion team and other contributors
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.

58
web/node_modules/@emotion/cache/README.md generated vendored Normal file
View file

@ -0,0 +1,58 @@
# @emotion/cache
### createCache
`createCache` allows for low level customization of how styles get inserted by emotion. It's intended to be used with the [`<CacheProvider/>`](https://emotion.sh/docs/cache-provider) component to override the default cache, which is created with sensible defaults for most applications.
```javascript
import createCache from '@emotion/cache'
export const myCache = createCache({
key: 'my-prefix-key',
stylisPlugins: [
/* your plugins here */
]
})
```
### Primary use cases
- Using emotion in embedded contexts such as an `<iframe/>`
- Setting a [nonce](#nonce-string) on any `<style/>` tag emotion creates for security purposes
- Using emotion with a developer defined `<style/>` tag
- Using emotion with custom Stylis plugins
## Options
### `nonce`
`string`
A nonce that will be set on each style tag that emotion inserts for [Content Security Policies](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
### `stylisPlugins`
`Function` | `Array<Function>`
A Stylis plugin or plugins that will be run by Stylis during preprocessing. [Read the Stylis docs to find out more](https://github.com/thysultan/stylis.js#plugins). This can be used for many purposes such as RTL.
### `prefix`
`boolean` | `Function`, defaults to `true`
Allows changing Stylis's vendor prefixing settings. It can be a boolean or a function to dynamically set which properties are prefixed. [More information can be found in the Stylis docs](https://github.com/thysultan/stylis.js#vendor-prefixing).
### `key`
`string`, defaults to `"css"`
The prefix before class names. It will also be set as the value of the `data-emotion` attribute on the style tags that emotion inserts and it's used in the attribute name that marks style elements in `renderStylesToString` and `renderStylesToNodeStream`. This is **required if using multiple emotion caches in the same app**.
### `container`
`HTMLElement`
A DOM node that emotion will insert all of its style tags into. This is useful for inserting styles into iframes.

View file

@ -0,0 +1,216 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var sheet = require('@emotion/sheet');
var Stylis = _interopDefault(require('@emotion/stylis'));
require('@emotion/weak-memoize');
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
// since we use stylis after closure compiler
var delimiter = '/*|*/';
var needle = delimiter + '}';
function toSheet(block) {
if (block) {
Sheet.current.insert(block + '}');
}
}
var Sheet = {
current: null
};
var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
// property
case 1:
{
switch (content.charCodeAt(0)) {
case 64:
{
// @import
Sheet.current.insert(content + ';');
return '';
}
// charcode for l
case 108:
{
// charcode for b
// this ignores label
if (content.charCodeAt(2) === 98) {
return '';
}
}
}
break;
}
// selector
case 2:
{
if (ns === 0) return content + delimiter;
break;
}
// at-rule
case 3:
{
switch (ns) {
// @font-face, @page
case 102:
case 112:
{
Sheet.current.insert(selectors[0] + content);
return '';
}
default:
{
return content + (at === 0 ? delimiter : '');
}
}
}
case -2:
{
content.split(needle).forEach(toSheet);
}
}
};
var createCache = function createCache(options) {
if (options === undefined) options = {};
var key = options.key || 'css';
var stylisOptions;
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
};
}
var stylis = new Stylis(stylisOptions);
if (process.env.NODE_ENV !== 'production') {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {}; // $FlowFixMe
var container;
{
container = options.container || document.head;
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
Array.prototype.forEach.call(nodes, function (node) {
var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe
attrib.split(' ').forEach(function (id) {
inserted[id] = true;
});
if (node.parentNode !== container) {
container.appendChild(node);
}
});
}
var _insert;
{
stylis.use(options.stylisPlugins)(ruleSheet);
_insert = function insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
Sheet.current = sheet;
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
var map = serialized.map;
Sheet.current = {
insert: function insert(rule) {
sheet.insert(rule + map);
}
};
}
stylis(selector, serialized.styles);
if (shouldCache) {
cache.inserted[name] = true;
}
};
}
if (process.env.NODE_ENV !== 'production') {
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
var commentStart = /\/\*/g;
var commentEnd = /\*\//g;
stylis.use(function (context, content) {
switch (context) {
case -1:
{
while (commentStart.test(content)) {
commentEnd.lastIndex = commentStart.lastIndex;
if (commentEnd.test(content)) {
commentStart.lastIndex = commentEnd.lastIndex;
continue;
}
throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');
}
commentStart.lastIndex = 0;
break;
}
}
});
stylis.use(function (context, content, selectors) {
switch (context) {
case -1:
{
var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses && cache.compat !== true) {
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
var ignoreRegExp = new RegExp(unsafePseudoClass + ".*\\/\\* " + flag + " \\*\\/");
var ignore = ignoreRegExp.test(content);
if (unsafePseudoClass && !ignore) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
}
});
}
break;
}
}
});
}
var cache = {
key: key,
sheet: new sheet.StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
return cache;
};
exports.default = createCache;

View file

@ -0,0 +1,210 @@
import { StyleSheet } from '@emotion/sheet';
import Stylis from '@emotion/stylis';
import '@emotion/weak-memoize';
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
// since we use stylis after closure compiler
var delimiter = '/*|*/';
var needle = delimiter + '}';
function toSheet(block) {
if (block) {
Sheet.current.insert(block + '}');
}
}
var Sheet = {
current: null
};
var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
// property
case 1:
{
switch (content.charCodeAt(0)) {
case 64:
{
// @import
Sheet.current.insert(content + ';');
return '';
}
// charcode for l
case 108:
{
// charcode for b
// this ignores label
if (content.charCodeAt(2) === 98) {
return '';
}
}
}
break;
}
// selector
case 2:
{
if (ns === 0) return content + delimiter;
break;
}
// at-rule
case 3:
{
switch (ns) {
// @font-face, @page
case 102:
case 112:
{
Sheet.current.insert(selectors[0] + content);
return '';
}
default:
{
return content + (at === 0 ? delimiter : '');
}
}
}
case -2:
{
content.split(needle).forEach(toSheet);
}
}
};
var createCache = function createCache(options) {
if (options === undefined) options = {};
var key = options.key || 'css';
var stylisOptions;
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
};
}
var stylis = new Stylis(stylisOptions);
if (process.env.NODE_ENV !== 'production') {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {}; // $FlowFixMe
var container;
{
container = options.container || document.head;
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
Array.prototype.forEach.call(nodes, function (node) {
var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe
attrib.split(' ').forEach(function (id) {
inserted[id] = true;
});
if (node.parentNode !== container) {
container.appendChild(node);
}
});
}
var _insert;
{
stylis.use(options.stylisPlugins)(ruleSheet);
_insert = function insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
Sheet.current = sheet;
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
var map = serialized.map;
Sheet.current = {
insert: function insert(rule) {
sheet.insert(rule + map);
}
};
}
stylis(selector, serialized.styles);
if (shouldCache) {
cache.inserted[name] = true;
}
};
}
if (process.env.NODE_ENV !== 'production') {
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
var commentStart = /\/\*/g;
var commentEnd = /\*\//g;
stylis.use(function (context, content) {
switch (context) {
case -1:
{
while (commentStart.test(content)) {
commentEnd.lastIndex = commentStart.lastIndex;
if (commentEnd.test(content)) {
commentStart.lastIndex = commentEnd.lastIndex;
continue;
}
throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');
}
commentStart.lastIndex = 0;
break;
}
}
});
stylis.use(function (context, content, selectors) {
switch (context) {
case -1:
{
var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses && cache.compat !== true) {
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
var ignoreRegExp = new RegExp(unsafePseudoClass + ".*\\/\\* " + flag + " \\*\\/");
var ignore = ignoreRegExp.test(content);
if (unsafePseudoClass && !ignore) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
}
});
}
break;
}
}
});
}
var cache = {
key: key,
sheet: new StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
return cache;
};
export default createCache;

299
web/node_modules/@emotion/cache/dist/cache.cjs.dev.js generated vendored Normal file
View file

@ -0,0 +1,299 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var sheet = require('@emotion/sheet');
var Stylis = _interopDefault(require('@emotion/stylis'));
var weakMemoize = _interopDefault(require('@emotion/weak-memoize'));
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
// since we use stylis after closure compiler
var delimiter = '/*|*/';
var needle = delimiter + '}';
function toSheet(block) {
if (block) {
Sheet.current.insert(block + '}');
}
}
var Sheet = {
current: null
};
var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
// property
case 1:
{
switch (content.charCodeAt(0)) {
case 64:
{
// @import
Sheet.current.insert(content + ';');
return '';
}
// charcode for l
case 108:
{
// charcode for b
// this ignores label
if (content.charCodeAt(2) === 98) {
return '';
}
}
}
break;
}
// selector
case 2:
{
if (ns === 0) return content + delimiter;
break;
}
// at-rule
case 3:
{
switch (ns) {
// @font-face, @page
case 102:
case 112:
{
Sheet.current.insert(selectors[0] + content);
return '';
}
default:
{
return content + (at === 0 ? delimiter : '');
}
}
}
case -2:
{
content.split(needle).forEach(toSheet);
}
}
};
var removeLabel = function removeLabel(context, content) {
if (context === 1 && // charcode for l
content.charCodeAt(0) === 108 && // charcode for b
content.charCodeAt(2) === 98 // this ignores label
) {
return '';
}
};
var isBrowser = typeof document !== 'undefined';
var rootServerStylisCache = {};
var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
var getCache = weakMemoize(function () {
return {};
});
var prefixTrueCache = {};
var prefixFalseCache = {};
return function (prefix) {
if (prefix === undefined || prefix === true) {
return prefixTrueCache;
}
if (prefix === false) {
return prefixFalseCache;
}
return getCache(prefix);
};
});
var createCache = function createCache(options) {
if (options === undefined) options = {};
var key = options.key || 'css';
var stylisOptions;
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
};
}
var stylis = new Stylis(stylisOptions);
if (process.env.NODE_ENV !== 'production') {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {}; // $FlowFixMe
var container;
if (isBrowser) {
container = options.container || document.head;
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
Array.prototype.forEach.call(nodes, function (node) {
var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe
attrib.split(' ').forEach(function (id) {
inserted[id] = true;
});
if (node.parentNode !== container) {
container.appendChild(node);
}
});
}
var _insert;
if (isBrowser) {
stylis.use(options.stylisPlugins)(ruleSheet);
_insert = function insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
Sheet.current = sheet;
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
var map = serialized.map;
Sheet.current = {
insert: function insert(rule) {
sheet.insert(rule + map);
}
};
}
stylis(selector, serialized.styles);
if (shouldCache) {
cache.inserted[name] = true;
}
};
} else {
stylis.use(removeLabel);
var serverStylisCache = rootServerStylisCache;
if (options.stylisPlugins || options.prefix !== undefined) {
stylis.use(options.stylisPlugins); // $FlowFixMe
serverStylisCache = getServerStylisCache(options.stylisPlugins || rootServerStylisCache)(options.prefix);
}
var getRules = function getRules(selector, serialized) {
var name = serialized.name;
if (serverStylisCache[name] === undefined) {
serverStylisCache[name] = stylis(selector, serialized.styles);
}
return serverStylisCache[name];
};
_insert = function _insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
var rules = getRules(selector, serialized);
if (cache.compat === undefined) {
// in regular mode, we don't set the styles on the inserted cache
// since we don't need to and that would be wasting memory
// we return them so that they are rendered in a style tag
if (shouldCache) {
cache.inserted[name] = true;
}
if ( // using === development instead of !== production
// because if people do ssr in tests, the source maps showing up would be annoying
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
return rules + serialized.map;
}
return rules;
} else {
// in compat mode, we put the styles on the inserted cache so
// that emotion-server can pull out the styles
// except when we don't want to cache it which was in Global but now
// is nowhere but we don't want to do a major right now
// and just in case we're going to leave the case here
// it's also not affecting client side bundle size
// so it's really not a big deal
if (shouldCache) {
cache.inserted[name] = rules;
} else {
return rules;
}
}
};
}
if (process.env.NODE_ENV !== 'production') {
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
var commentStart = /\/\*/g;
var commentEnd = /\*\//g;
stylis.use(function (context, content) {
switch (context) {
case -1:
{
while (commentStart.test(content)) {
commentEnd.lastIndex = commentStart.lastIndex;
if (commentEnd.test(content)) {
commentStart.lastIndex = commentEnd.lastIndex;
continue;
}
throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');
}
commentStart.lastIndex = 0;
break;
}
}
});
stylis.use(function (context, content, selectors) {
switch (context) {
case -1:
{
var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses && cache.compat !== true) {
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
var ignoreRegExp = new RegExp(unsafePseudoClass + ".*\\/\\* " + flag + " \\*\\/");
var ignore = ignoreRegExp.test(content);
if (unsafePseudoClass && !ignore) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
}
});
}
break;
}
}
});
}
var cache = {
key: key,
sheet: new sheet.StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
return cache;
};
exports.default = createCache;

7
web/node_modules/@emotion/cache/dist/cache.cjs.js generated vendored Normal file
View file

@ -0,0 +1,7 @@
'use strict';
if (process.env.NODE_ENV === "production") {
module.exports = require("./cache.cjs.prod.js");
} else {
module.exports = require("./cache.cjs.dev.js");
}

View file

@ -0,0 +1,3 @@
// @flow
export * from "../src/index.js";
export { default } from "../src/index.js";

106
web/node_modules/@emotion/cache/dist/cache.cjs.prod.js generated vendored Normal file
View file

@ -0,0 +1,106 @@
"use strict";
function _interopDefault(ex) {
return ex && "object" == typeof ex && "default" in ex ? ex.default : ex;
}
Object.defineProperty(exports, "__esModule", {
value: !0
});
var sheet = require("@emotion/sheet"), Stylis = _interopDefault(require("@emotion/stylis")), weakMemoize = _interopDefault(require("@emotion/weak-memoize")), delimiter = "/*|*/", needle = delimiter + "}";
function toSheet(block) {
block && Sheet.current.insert(block + "}");
}
var Sheet = {
current: null
}, ruleSheet = function(context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
case 1:
switch (content.charCodeAt(0)) {
case 64:
return Sheet.current.insert(content + ";"), "";
case 108:
if (98 === content.charCodeAt(2)) return "";
}
break;
case 2:
if (0 === ns) return content + delimiter;
break;
case 3:
switch (ns) {
case 102:
case 112:
return Sheet.current.insert(selectors[0] + content), "";
default:
return content + (0 === at ? delimiter : "");
}
case -2:
content.split(needle).forEach(toSheet);
}
}, removeLabel = function(context, content) {
if (1 === context && 108 === content.charCodeAt(0) && 98 === content.charCodeAt(2)) return "";
}, isBrowser = "undefined" != typeof document, rootServerStylisCache = {}, getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
var getCache = weakMemoize(function() {
return {};
}), prefixTrueCache = {}, prefixFalseCache = {};
return function(prefix) {
return void 0 === prefix || !0 === prefix ? prefixTrueCache : !1 === prefix ? prefixFalseCache : getCache(prefix);
};
}), createCache = function(options) {
void 0 === options && (options = {});
var stylisOptions, key = options.key || "css";
void 0 !== options.prefix && (stylisOptions = {
prefix: options.prefix
});
var container, _insert, stylis = new Stylis(stylisOptions), inserted = {};
if (isBrowser) {
container = options.container || document.head;
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
Array.prototype.forEach.call(nodes, function(node) {
node.getAttribute("data-emotion-" + key).split(" ").forEach(function(id) {
inserted[id] = !0;
}), node.parentNode !== container && container.appendChild(node);
});
}
if (isBrowser) stylis.use(options.stylisPlugins)(ruleSheet), _insert = function(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
Sheet.current = sheet, stylis(selector, serialized.styles), shouldCache && (cache.inserted[name] = !0);
}; else {
stylis.use(removeLabel);
var serverStylisCache = rootServerStylisCache;
(options.stylisPlugins || void 0 !== options.prefix) && (stylis.use(options.stylisPlugins),
serverStylisCache = getServerStylisCache(options.stylisPlugins || rootServerStylisCache)(options.prefix));
_insert = function(selector, serialized, sheet, shouldCache) {
var name = serialized.name, rules = function(selector, serialized) {
var name = serialized.name;
return void 0 === serverStylisCache[name] && (serverStylisCache[name] = stylis(selector, serialized.styles)),
serverStylisCache[name];
}(selector, serialized);
return void 0 === cache.compat ? (shouldCache && (cache.inserted[name] = !0), rules) : shouldCache ? void (cache.inserted[name] = rules) : rules;
};
}
var cache = {
key: key,
sheet: new sheet.StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
return cache;
};
exports.default = createCache;

293
web/node_modules/@emotion/cache/dist/cache.esm.js generated vendored Normal file
View file

@ -0,0 +1,293 @@
import { StyleSheet } from '@emotion/sheet';
import Stylis from '@emotion/stylis';
import weakMemoize from '@emotion/weak-memoize';
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
// since we use stylis after closure compiler
var delimiter = '/*|*/';
var needle = delimiter + '}';
function toSheet(block) {
if (block) {
Sheet.current.insert(block + '}');
}
}
var Sheet = {
current: null
};
var ruleSheet = function ruleSheet(context, content, selectors, parents, line, column, length, ns, depth, at) {
switch (context) {
// property
case 1:
{
switch (content.charCodeAt(0)) {
case 64:
{
// @import
Sheet.current.insert(content + ';');
return '';
}
// charcode for l
case 108:
{
// charcode for b
// this ignores label
if (content.charCodeAt(2) === 98) {
return '';
}
}
}
break;
}
// selector
case 2:
{
if (ns === 0) return content + delimiter;
break;
}
// at-rule
case 3:
{
switch (ns) {
// @font-face, @page
case 102:
case 112:
{
Sheet.current.insert(selectors[0] + content);
return '';
}
default:
{
return content + (at === 0 ? delimiter : '');
}
}
}
case -2:
{
content.split(needle).forEach(toSheet);
}
}
};
var removeLabel = function removeLabel(context, content) {
if (context === 1 && // charcode for l
content.charCodeAt(0) === 108 && // charcode for b
content.charCodeAt(2) === 98 // this ignores label
) {
return '';
}
};
var isBrowser = typeof document !== 'undefined';
var rootServerStylisCache = {};
var getServerStylisCache = isBrowser ? undefined : weakMemoize(function () {
var getCache = weakMemoize(function () {
return {};
});
var prefixTrueCache = {};
var prefixFalseCache = {};
return function (prefix) {
if (prefix === undefined || prefix === true) {
return prefixTrueCache;
}
if (prefix === false) {
return prefixFalseCache;
}
return getCache(prefix);
};
});
var createCache = function createCache(options) {
if (options === undefined) options = {};
var key = options.key || 'css';
var stylisOptions;
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
};
}
var stylis = new Stylis(stylisOptions);
if (process.env.NODE_ENV !== 'production') {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error("Emotion key must only contain lower case alphabetical characters and - but \"" + key + "\" was passed");
}
}
var inserted = {}; // $FlowFixMe
var container;
if (isBrowser) {
container = options.container || document.head;
var nodes = document.querySelectorAll("style[data-emotion-" + key + "]");
Array.prototype.forEach.call(nodes, function (node) {
var attrib = node.getAttribute("data-emotion-" + key); // $FlowFixMe
attrib.split(' ').forEach(function (id) {
inserted[id] = true;
});
if (node.parentNode !== container) {
container.appendChild(node);
}
});
}
var _insert;
if (isBrowser) {
stylis.use(options.stylisPlugins)(ruleSheet);
_insert = function insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
Sheet.current = sheet;
if (process.env.NODE_ENV !== 'production' && serialized.map !== undefined) {
var map = serialized.map;
Sheet.current = {
insert: function insert(rule) {
sheet.insert(rule + map);
}
};
}
stylis(selector, serialized.styles);
if (shouldCache) {
cache.inserted[name] = true;
}
};
} else {
stylis.use(removeLabel);
var serverStylisCache = rootServerStylisCache;
if (options.stylisPlugins || options.prefix !== undefined) {
stylis.use(options.stylisPlugins); // $FlowFixMe
serverStylisCache = getServerStylisCache(options.stylisPlugins || rootServerStylisCache)(options.prefix);
}
var getRules = function getRules(selector, serialized) {
var name = serialized.name;
if (serverStylisCache[name] === undefined) {
serverStylisCache[name] = stylis(selector, serialized.styles);
}
return serverStylisCache[name];
};
_insert = function _insert(selector, serialized, sheet, shouldCache) {
var name = serialized.name;
var rules = getRules(selector, serialized);
if (cache.compat === undefined) {
// in regular mode, we don't set the styles on the inserted cache
// since we don't need to and that would be wasting memory
// we return them so that they are rendered in a style tag
if (shouldCache) {
cache.inserted[name] = true;
}
if ( // using === development instead of !== production
// because if people do ssr in tests, the source maps showing up would be annoying
process.env.NODE_ENV === 'development' && serialized.map !== undefined) {
return rules + serialized.map;
}
return rules;
} else {
// in compat mode, we put the styles on the inserted cache so
// that emotion-server can pull out the styles
// except when we don't want to cache it which was in Global but now
// is nowhere but we don't want to do a major right now
// and just in case we're going to leave the case here
// it's also not affecting client side bundle size
// so it's really not a big deal
if (shouldCache) {
cache.inserted[name] = rules;
} else {
return rules;
}
}
};
}
if (process.env.NODE_ENV !== 'production') {
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
var commentStart = /\/\*/g;
var commentEnd = /\*\//g;
stylis.use(function (context, content) {
switch (context) {
case -1:
{
while (commentStart.test(content)) {
commentEnd.lastIndex = commentStart.lastIndex;
if (commentEnd.test(content)) {
commentStart.lastIndex = commentEnd.lastIndex;
continue;
}
throw new Error('Your styles have an unterminated comment ("/*" without corresponding "*/").');
}
commentStart.lastIndex = 0;
break;
}
}
});
stylis.use(function (context, content, selectors) {
switch (context) {
case -1:
{
var flag = 'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason';
var unsafePseudoClasses = content.match(/(:first|:nth|:nth-last)-child/g);
if (unsafePseudoClasses && cache.compat !== true) {
unsafePseudoClasses.forEach(function (unsafePseudoClass) {
var ignoreRegExp = new RegExp(unsafePseudoClass + ".*\\/\\* " + flag + " \\*\\/");
var ignore = ignoreRegExp.test(content);
if (unsafePseudoClass && !ignore) {
console.error("The pseudo class \"" + unsafePseudoClass + "\" is potentially unsafe when doing server-side rendering. Try changing it to \"" + unsafePseudoClass.split('-child')[0] + "-of-type\".");
}
});
}
break;
}
}
});
}
var cache = {
key: key,
sheet: new StyleSheet({
key: key,
container: container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted: inserted,
registered: {},
insert: _insert
};
return cache;
};
export default createCache;

35
web/node_modules/@emotion/cache/package.json generated vendored Normal file
View file

@ -0,0 +1,35 @@
{
"name": "@emotion/cache",
"version": "10.0.29",
"description": "emotion's cache",
"main": "dist/cache.cjs.js",
"module": "dist/cache.esm.js",
"browser": {
"./dist/cache.cjs.js": "./dist/cache.browser.cjs.js",
"./dist/cache.esm.js": "./dist/cache.browser.esm.js"
},
"types": "types/index.d.ts",
"license": "MIT",
"repository": "https://github.com/emotion-js/emotion/tree/master/packages/cache",
"scripts": {
"test:typescript": "dtslint types"
},
"dependencies": {
"@emotion/sheet": "0.9.4",
"@emotion/stylis": "0.8.5",
"@emotion/utils": "0.11.3",
"@emotion/weak-memoize": "0.2.5"
},
"devDependencies": {
"@emotion/hash": "0.8.0",
"dtslint": "^0.3.0"
},
"publishConfig": {
"access": "public"
},
"files": [
"src",
"dist",
"types"
]
}

253
web/node_modules/@emotion/cache/src/index.js generated vendored Normal file
View file

@ -0,0 +1,253 @@
// @flow
import { StyleSheet } from '@emotion/sheet'
import { type EmotionCache, type SerializedStyles } from '@emotion/utils'
import Stylis from '@emotion/stylis'
import weakMemoize from '@emotion/weak-memoize'
import { Sheet, removeLabel, ruleSheet } from './stylis-plugins'
import type { StylisPlugin } from './types'
let isBrowser = typeof document !== 'undefined'
export type PrefixOption =
| boolean
| ((key: string, value: string, context: 1 | 2 | 3) => boolean)
type StylisPlugins = StylisPlugin[] | StylisPlugin
export type Options = {
nonce?: string,
stylisPlugins?: StylisPlugins,
prefix?: PrefixOption,
key?: string,
container?: HTMLElement,
speedy?: boolean
}
let rootServerStylisCache = {}
let getServerStylisCache = isBrowser
? undefined
: weakMemoize(() => {
let getCache = weakMemoize(() => ({}))
let prefixTrueCache = {}
let prefixFalseCache = {}
return prefix => {
if (prefix === undefined || prefix === true) {
return prefixTrueCache
}
if (prefix === false) {
return prefixFalseCache
}
return getCache(prefix)
}
})
let createCache = (options?: Options): EmotionCache => {
if (options === undefined) options = {}
let key = options.key || 'css'
let stylisOptions
if (options.prefix !== undefined) {
stylisOptions = {
prefix: options.prefix
}
}
let stylis = new Stylis(stylisOptions)
if (process.env.NODE_ENV !== 'production') {
// $FlowFixMe
if (/[^a-z-]/.test(key)) {
throw new Error(
`Emotion key must only contain lower case alphabetical characters and - but "${key}" was passed`
)
}
}
let inserted = {}
// $FlowFixMe
let container: HTMLElement
if (isBrowser) {
container = options.container || document.head
const nodes = document.querySelectorAll(`style[data-emotion-${key}]`)
Array.prototype.forEach.call(nodes, (node: HTMLStyleElement) => {
const attrib = node.getAttribute(`data-emotion-${key}`)
// $FlowFixMe
attrib.split(' ').forEach(id => {
inserted[id] = true
})
if (node.parentNode !== container) {
container.appendChild(node)
}
})
}
let insert: (
selector: string,
serialized: SerializedStyles,
sheet: StyleSheet,
shouldCache: boolean
) => string | void
if (isBrowser) {
stylis.use(options.stylisPlugins)(ruleSheet)
insert = (
selector: string,
serialized: SerializedStyles,
sheet: StyleSheet,
shouldCache: boolean
): void => {
let name = serialized.name
Sheet.current = sheet
if (
process.env.NODE_ENV !== 'production' &&
serialized.map !== undefined
) {
let map = serialized.map
Sheet.current = {
insert: (rule: string) => {
sheet.insert(rule + map)
}
}
}
stylis(selector, serialized.styles)
if (shouldCache) {
cache.inserted[name] = true
}
}
} else {
stylis.use(removeLabel)
let serverStylisCache = rootServerStylisCache
if (options.stylisPlugins || options.prefix !== undefined) {
stylis.use(options.stylisPlugins)
// $FlowFixMe
serverStylisCache = getServerStylisCache(
options.stylisPlugins || rootServerStylisCache
)(options.prefix)
}
let getRules = (selector: string, serialized: SerializedStyles): string => {
let name = serialized.name
if (serverStylisCache[name] === undefined) {
serverStylisCache[name] = stylis(selector, serialized.styles)
}
return serverStylisCache[name]
}
insert = (
selector: string,
serialized: SerializedStyles,
sheet: StyleSheet,
shouldCache: boolean
): string | void => {
let name = serialized.name
let rules = getRules(selector, serialized)
if (cache.compat === undefined) {
// in regular mode, we don't set the styles on the inserted cache
// since we don't need to and that would be wasting memory
// we return them so that they are rendered in a style tag
if (shouldCache) {
cache.inserted[name] = true
}
if (
// using === development instead of !== production
// because if people do ssr in tests, the source maps showing up would be annoying
process.env.NODE_ENV === 'development' &&
serialized.map !== undefined
) {
return rules + serialized.map
}
return rules
} else {
// in compat mode, we put the styles on the inserted cache so
// that emotion-server can pull out the styles
// except when we don't want to cache it which was in Global but now
// is nowhere but we don't want to do a major right now
// and just in case we're going to leave the case here
// it's also not affecting client side bundle size
// so it's really not a big deal
if (shouldCache) {
cache.inserted[name] = rules
} else {
return rules
}
}
}
}
if (process.env.NODE_ENV !== 'production') {
// https://esbench.com/bench/5bf7371a4cd7e6009ef61d0a
const commentStart = /\/\*/g
const commentEnd = /\*\//g
stylis.use((context, content) => {
switch (context) {
case -1: {
while (commentStart.test(content)) {
commentEnd.lastIndex = commentStart.lastIndex
if (commentEnd.test(content)) {
commentStart.lastIndex = commentEnd.lastIndex
continue
}
throw new Error(
'Your styles have an unterminated comment ("/*" without corresponding "*/").'
)
}
commentStart.lastIndex = 0
break
}
}
})
stylis.use((context, content, selectors) => {
switch (context) {
case -1: {
const flag =
'emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason'
const unsafePseudoClasses = content.match(
/(:first|:nth|:nth-last)-child/g
)
if (unsafePseudoClasses && cache.compat !== true) {
unsafePseudoClasses.forEach(unsafePseudoClass => {
const ignoreRegExp = new RegExp(
`${unsafePseudoClass}.*\\/\\* ${flag} \\*\\/`
)
const ignore = ignoreRegExp.test(content)
if (unsafePseudoClass && !ignore) {
console.error(
`The pseudo class "${unsafePseudoClass}" is potentially unsafe when doing server-side rendering. Try changing it to "${
unsafePseudoClass.split('-child')[0]
}-of-type".`
)
}
})
}
break
}
}
})
}
const cache: EmotionCache = {
key,
sheet: new StyleSheet({
key,
container,
nonce: options.nonce,
speedy: options.speedy
}),
nonce: options.nonce,
inserted,
registered: {},
insert
}
return cache
}
export default createCache

89
web/node_modules/@emotion/cache/src/stylis-plugins.js generated vendored Normal file
View file

@ -0,0 +1,89 @@
// @flow
// https://github.com/thysultan/stylis.js/tree/master/plugins/rule-sheet
// inlined to avoid umd wrapper and peerDep warnings/installing stylis
// since we use stylis after closure compiler
import type { StylisPlugin } from './types'
const delimiter = '/*|*/'
const needle = delimiter + '}'
function toSheet(block) {
if (block) {
Sheet.current.insert(block + '}')
}
}
export let Sheet: { current: { +insert: string => void } } = {
current: (null: any)
}
export let ruleSheet: StylisPlugin = (
context,
content,
selectors,
parents,
line,
column,
length,
ns,
depth,
at
) => {
switch (context) {
// property
case 1: {
switch (content.charCodeAt(0)) {
case 64: {
// @import
Sheet.current.insert(content + ';')
return ''
}
// charcode for l
case 108: {
// charcode for b
// this ignores label
if (content.charCodeAt(2) === 98) {
return ''
}
}
}
break
}
// selector
case 2: {
if (ns === 0) return content + delimiter
break
}
// at-rule
case 3: {
switch (ns) {
// @font-face, @page
case 102:
case 112: {
Sheet.current.insert(selectors[0] + content)
return ''
}
default: {
return content + (at === 0 ? delimiter : '')
}
}
}
case -2: {
content.split(needle).forEach(toSheet)
}
}
}
export let removeLabel: StylisPlugin = (context, content) => {
if (
context === 1 &&
// charcode for l
content.charCodeAt(0) === 108 &&
// charcode for b
content.charCodeAt(2) === 98
// this ignores label
) {
return ''
}
}

13
web/node_modules/@emotion/cache/src/types.js generated vendored Normal file
View file

@ -0,0 +1,13 @@
// @flow
export type StylisPlugin = (
context: -2 | -1 | 0 | 1 | 2 | 3,
content: string,
selectors: Array<string>,
parents: Array<string>,
line: number,
column: number,
length: number,
at: number,
depth: number
) => mixed

17
web/node_modules/@emotion/cache/types/index.d.ts generated vendored Normal file
View file

@ -0,0 +1,17 @@
// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
// TypeScript Version: 2.2
import { Plugin as StylisPlugin, Prefix } from '@emotion/stylis'
import { EmotionCache } from '@emotion/utils'
export { StylisPlugin, Prefix, EmotionCache }
export interface Options {
nonce?: string
stylisPlugins?: StylisPlugin | Array<StylisPlugin>
prefix?: Prefix
key?: string
container?: HTMLElement
speedy?: boolean
}
export default function createCache(options?: Options): EmotionCache

8
web/node_modules/@emotion/cache/types/tests.ts generated vendored Normal file
View file

@ -0,0 +1,8 @@
import createCache, { Options } from '@emotion/cache'
declare const testOptions: Options
// $ExpectType EmotionCache
createCache()
// $ExpectType EmotionCache
createCache(testOptions)

27
web/node_modules/@emotion/cache/types/tsconfig.json generated vendored Normal file
View file

@ -0,0 +1,27 @@
{
"compilerOptions": {
"baseUrl": "../",
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": [
"es6",
"dom"
],
"module": "commonjs",
"noEmit": true,
"noImplicitAny": true,
"noImplicitThis": true,
"strict": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"target": "es5",
"typeRoots": [
"../"
],
"types": []
},
"include": [
"./*.ts",
"./*.tsx"
]
}

10
web/node_modules/@emotion/cache/types/tslint.json generated vendored Normal file
View file

@ -0,0 +1,10 @@
{
"extends": "dtslint/dtslint.json",
"rules": {
"array-type": [
true,
"generic"
],
"semicolon": false
}
}