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

267
web/node_modules/@emotion/core/dist/core.browser.cjs.js generated vendored Normal file
View file

@ -0,0 +1,267 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _inheritsLoose = require('@babel/runtime/helpers/inheritsLoose');
var React = require('react');
require('@emotion/cache');
var emotionElement = require('./emotion-element-8aec08a7.browser.cjs.js');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
var sheet = require('@emotion/sheet');
var css = require('@emotion/css');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
var _inheritsLoose__default = /*#__PURE__*/_interopDefault(_inheritsLoose);
var css__default = /*#__PURE__*/_interopDefault(css);
var jsx = function jsx(type, props) {
var args = arguments;
if (props == null || !emotionElement.hasOwnProperty.call(props, 'css')) {
// $FlowFixMe
return React.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = emotionElement.Emotion;
createElementArgArray[1] = emotionElement.createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
} // $FlowFixMe
return React.createElement.apply(null, createElementArgArray);
};
var warnedAboutCssPropForGlobal = false;
var Global = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
props.className || props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
if (typeof styles === 'function') {
return /*#__PURE__*/React.createElement(emotionElement.ThemeContext.Consumer, null, function (theme) {
var serialized = serialize.serializeStyles([styles(theme)]);
return /*#__PURE__*/React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
}
var serialized = serialize.serializeStyles([styles]);
return /*#__PURE__*/React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
// maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var InnerGlobal = /*#__PURE__*/function (_React$Component) {
_inheritsLoose__default['default'](InnerGlobal, _React$Component);
function InnerGlobal(props, context, updater) {
return _React$Component.call(this, props, context, updater) || this;
}
var _proto = InnerGlobal.prototype;
_proto.componentDidMount = function componentDidMount() {
this.sheet = new sheet.StyleSheet({
key: this.props.cache.key + "-global",
nonce: this.props.cache.sheet.nonce,
container: this.props.cache.sheet.container
}); // $FlowFixMe
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]");
if (node !== null) {
this.sheet.tags.push(node);
}
if (this.props.cache.sheet.tags.length) {
this.sheet.before = this.props.cache.sheet.tags[0];
}
this.insertStyles();
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
if (prevProps.serialized.name !== this.props.serialized.name) {
this.insertStyles();
}
};
_proto.insertStyles = function insertStyles() {
if (this.props.serialized.next !== undefined) {
// insert keyframes
utils.insertStyles(this.props.cache, this.props.serialized.next, true);
}
if (this.sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
this.sheet.before = element;
this.sheet.flush();
}
this.props.cache.insert("", this.props.serialized, this.sheet, false);
};
_proto.componentWillUnmount = function componentWillUnmount() {
this.sheet.flush();
};
_proto.render = function render() {
return null;
};
return InnerGlobal;
}(React.Component);
var keyframes = function keyframes() {
var insertable = css__default['default'].apply(void 0, arguments);
var name = "animation-" + insertable.name; // $FlowFixMe
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
};
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = utils.getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var ClassNames = emotionElement.withEmotionCache(function (props, context) {
return /*#__PURE__*/React.createElement(emotionElement.ThemeContext.Consumer, null, function (theme) {
var hasRendered = false;
var css = function css() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serialize.serializeStyles(args, context.registered);
{
utils.insertStyles(context, serialized, false);
}
return context.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(context.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: theme
};
var ele = props.children(content);
hasRendered = true;
return ele;
});
});
exports.CacheProvider = emotionElement.CacheProvider;
exports.ThemeContext = emotionElement.ThemeContext;
exports.withEmotionCache = emotionElement.withEmotionCache;
Object.defineProperty(exports, 'css', {
enumerable: true,
get: function () {
return css__default['default'];
}
});
exports.ClassNames = ClassNames;
exports.Global = Global;
exports.createElement = jsx;
exports.jsx = jsx;
exports.keyframes = keyframes;

247
web/node_modules/@emotion/core/dist/core.browser.esm.js generated vendored Normal file
View file

@ -0,0 +1,247 @@
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
import { createElement, Component } from 'react';
import '@emotion/cache';
import { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext } from './emotion-element-57a3a7a3.browser.esm.js';
export { C as CacheProvider, T as ThemeContext, w as withEmotionCache } from './emotion-element-57a3a7a3.browser.esm.js';
import { insertStyles, getRegisteredStyles } from '@emotion/utils';
import { serializeStyles } from '@emotion/serialize';
import { StyleSheet } from '@emotion/sheet';
import css from '@emotion/css';
export { default as css } from '@emotion/css';
var jsx = function jsx(type, props) {
var args = arguments;
if (props == null || !hasOwnProperty.call(props, 'css')) {
// $FlowFixMe
return createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = Emotion;
createElementArgArray[1] = createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
} // $FlowFixMe
return createElement.apply(null, createElementArgArray);
};
var warnedAboutCssPropForGlobal = false;
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
props.className || props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
if (typeof styles === 'function') {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
var serialized = serializeStyles([styles(theme)]);
return /*#__PURE__*/createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
}
var serialized = serializeStyles([styles]);
return /*#__PURE__*/createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
// maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var InnerGlobal = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(InnerGlobal, _React$Component);
function InnerGlobal(props, context, updater) {
return _React$Component.call(this, props, context, updater) || this;
}
var _proto = InnerGlobal.prototype;
_proto.componentDidMount = function componentDidMount() {
this.sheet = new StyleSheet({
key: this.props.cache.key + "-global",
nonce: this.props.cache.sheet.nonce,
container: this.props.cache.sheet.container
}); // $FlowFixMe
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]");
if (node !== null) {
this.sheet.tags.push(node);
}
if (this.props.cache.sheet.tags.length) {
this.sheet.before = this.props.cache.sheet.tags[0];
}
this.insertStyles();
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
if (prevProps.serialized.name !== this.props.serialized.name) {
this.insertStyles();
}
};
_proto.insertStyles = function insertStyles$1() {
if (this.props.serialized.next !== undefined) {
// insert keyframes
insertStyles(this.props.cache, this.props.serialized.next, true);
}
if (this.sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
this.sheet.before = element;
this.sheet.flush();
}
this.props.cache.insert("", this.props.serialized, this.sheet, false);
};
_proto.componentWillUnmount = function componentWillUnmount() {
this.sheet.flush();
};
_proto.render = function render() {
return null;
};
return InnerGlobal;
}(Component);
var keyframes = function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name; // $FlowFixMe
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
};
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var ClassNames = withEmotionCache(function (props, context) {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
var hasRendered = false;
var css = function css() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serializeStyles(args, context.registered);
{
insertStyles(context, serialized, false);
}
return context.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(context.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: theme
};
var ele = props.children(content);
hasRendered = true;
return ele;
});
});
export { ClassNames, Global, jsx as createElement, jsx, keyframes };

318
web/node_modules/@emotion/core/dist/core.cjs.dev.js generated vendored Normal file
View file

@ -0,0 +1,318 @@
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var _inheritsLoose = require('@babel/runtime/helpers/inheritsLoose');
var React = require('react');
require('@emotion/cache');
var emotionElement = require('./emotion-element-49eeaaac.cjs.dev.js');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
var sheet = require('@emotion/sheet');
var css = require('@emotion/css');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
var _inheritsLoose__default = /*#__PURE__*/_interopDefault(_inheritsLoose);
var css__default = /*#__PURE__*/_interopDefault(css);
var jsx = function jsx(type, props) {
var args = arguments;
if (props == null || !emotionElement.hasOwnProperty.call(props, 'css')) {
// $FlowFixMe
return React.createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = emotionElement.Emotion;
createElementArgArray[1] = emotionElement.createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
} // $FlowFixMe
return React.createElement.apply(null, createElementArgArray);
};
var warnedAboutCssPropForGlobal = false;
var Global = /* #__PURE__ */emotionElement.withEmotionCache(function (props, cache) {
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
props.className || props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
if (typeof styles === 'function') {
return /*#__PURE__*/React.createElement(emotionElement.ThemeContext.Consumer, null, function (theme) {
var serialized = serialize.serializeStyles([styles(theme)]);
return /*#__PURE__*/React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
}
var serialized = serialize.serializeStyles([styles]);
return /*#__PURE__*/React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
// maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var InnerGlobal = /*#__PURE__*/function (_React$Component) {
_inheritsLoose__default['default'](InnerGlobal, _React$Component);
function InnerGlobal(props, context, updater) {
return _React$Component.call(this, props, context, updater) || this;
}
var _proto = InnerGlobal.prototype;
_proto.componentDidMount = function componentDidMount() {
this.sheet = new sheet.StyleSheet({
key: this.props.cache.key + "-global",
nonce: this.props.cache.sheet.nonce,
container: this.props.cache.sheet.container
}); // $FlowFixMe
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]");
if (node !== null) {
this.sheet.tags.push(node);
}
if (this.props.cache.sheet.tags.length) {
this.sheet.before = this.props.cache.sheet.tags[0];
}
this.insertStyles();
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
if (prevProps.serialized.name !== this.props.serialized.name) {
this.insertStyles();
}
};
_proto.insertStyles = function insertStyles() {
if (this.props.serialized.next !== undefined) {
// insert keyframes
utils.insertStyles(this.props.cache, this.props.serialized.next, true);
}
if (this.sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
this.sheet.before = element;
this.sheet.flush();
}
this.props.cache.insert("", this.props.serialized, this.sheet, false);
};
_proto.componentWillUnmount = function componentWillUnmount() {
this.sheet.flush();
};
_proto.render = function render() {
if (!emotionElement.isBrowser) {
var serialized = this.props.serialized;
var serializedNames = serialized.name;
var serializedStyles = serialized.styles;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
serializedStyles += next.styles;
next = next.next;
}
var shouldCache = this.props.cache.compat === true;
var rules = this.props.cache.insert("", {
name: serializedNames,
styles: serializedStyles
}, this.sheet, shouldCache);
if (!shouldCache) {
var _ref;
return /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + this.props.cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = this.props.cache.sheet.nonce, _ref));
}
}
return null;
};
return InnerGlobal;
}(React.Component);
var keyframes = function keyframes() {
var insertable = css__default['default'].apply(void 0, arguments);
var name = "animation-" + insertable.name; // $FlowFixMe
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
};
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = utils.getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var ClassNames = emotionElement.withEmotionCache(function (props, context) {
return /*#__PURE__*/React.createElement(emotionElement.ThemeContext.Consumer, null, function (theme) {
var rules = '';
var serializedHashes = '';
var hasRendered = false;
var css = function css() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serialize.serializeStyles(args, context.registered);
if (emotionElement.isBrowser) {
utils.insertStyles(context, serialized, false);
} else {
var res = utils.insertStyles(context, serialized, false);
if (res !== undefined) {
rules += res;
}
}
if (!emotionElement.isBrowser) {
serializedHashes += " " + serialized.name;
}
return context.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(context.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: theme
};
var ele = props.children(content);
hasRendered = true;
if (!emotionElement.isBrowser && rules.length !== 0) {
var _ref;
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + context.key] = serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = context.sheet.nonce, _ref)), ele);
}
return ele;
});
});
exports.CacheProvider = emotionElement.CacheProvider;
exports.ThemeContext = emotionElement.ThemeContext;
Object.defineProperty(exports, 'withEmotionCache', {
enumerable: true,
get: function () {
return emotionElement.withEmotionCache;
}
});
Object.defineProperty(exports, 'css', {
enumerable: true,
get: function () {
return css__default['default'];
}
});
exports.ClassNames = ClassNames;
exports.Global = Global;
exports.createElement = jsx;
exports.jsx = jsx;
exports.keyframes = keyframes;

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

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

2
web/node_modules/@emotion/core/dist/core.cjs.js.flow generated vendored Normal file
View file

@ -0,0 +1,2 @@
// @flow
export * from "../src/index.js";

157
web/node_modules/@emotion/core/dist/core.cjs.prod.js generated vendored Normal file
View file

@ -0,0 +1,157 @@
"use strict";
Object.defineProperty(exports, "__esModule", {
value: !0
});
var _inheritsLoose = require("@babel/runtime/helpers/inheritsLoose"), React = require("react");
require("@emotion/cache");
var emotionElement = require("./emotion-element-0e1e5002.cjs.prod.js"), utils = require("@emotion/utils"), serialize = require("@emotion/serialize"), sheet = require("@emotion/sheet"), css = require("@emotion/css");
function _interopDefault(e) {
return e && e.__esModule ? e : {
default: e
};
}
var _inheritsLoose__default = _interopDefault(_inheritsLoose), css__default = _interopDefault(css), jsx = function(type, props) {
var args = arguments;
if (null == props || !emotionElement.hasOwnProperty.call(props, "css")) return React.createElement.apply(void 0, args);
var argsLength = args.length, createElementArgArray = new Array(argsLength);
createElementArgArray[0] = emotionElement.Emotion, createElementArgArray[1] = emotionElement.createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) createElementArgArray[i] = args[i];
return React.createElement.apply(null, createElementArgArray);
}, warnedAboutCssPropForGlobal = !1, Global = emotionElement.withEmotionCache((function(props, cache) {
var styles = props.styles;
if ("function" == typeof styles) return React.createElement(emotionElement.ThemeContext.Consumer, null, (function(theme) {
var serialized = serialize.serializeStyles([ styles(theme) ]);
return React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
}));
var serialized = serialize.serializeStyles([ styles ]);
return React.createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
})), InnerGlobal = function(_React$Component) {
function InnerGlobal(props, context, updater) {
return _React$Component.call(this, props, context, updater) || this;
}
_inheritsLoose__default.default(InnerGlobal, _React$Component);
var _proto = InnerGlobal.prototype;
return _proto.componentDidMount = function() {
this.sheet = new sheet.StyleSheet({
key: this.props.cache.key + "-global",
nonce: this.props.cache.sheet.nonce,
container: this.props.cache.sheet.container
});
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + '="' + this.props.serialized.name + '"]');
null !== node && this.sheet.tags.push(node), this.props.cache.sheet.tags.length && (this.sheet.before = this.props.cache.sheet.tags[0]),
this.insertStyles();
}, _proto.componentDidUpdate = function(prevProps) {
prevProps.serialized.name !== this.props.serialized.name && this.insertStyles();
}, _proto.insertStyles = function() {
if (void 0 !== this.props.serialized.next && utils.insertStyles(this.props.cache, this.props.serialized.next, !0),
this.sheet.tags.length) {
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
this.sheet.before = element, this.sheet.flush();
}
this.props.cache.insert("", this.props.serialized, this.sheet, !1);
}, _proto.componentWillUnmount = function() {
this.sheet.flush();
}, _proto.render = function() {
if (!emotionElement.isBrowser) {
for (var serialized = this.props.serialized, serializedNames = serialized.name, serializedStyles = serialized.styles, next = serialized.next; void 0 !== next; ) serializedNames += " " + next.name,
serializedStyles += next.styles, next = next.next;
var _ref, shouldCache = !0 === this.props.cache.compat, rules = this.props.cache.insert("", {
name: serializedNames,
styles: serializedStyles
}, this.sheet, shouldCache);
if (!shouldCache) return React.createElement("style", ((_ref = {})["data-emotion-" + this.props.cache.key] = serializedNames,
_ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = this.props.cache.sheet.nonce, _ref));
}
return null;
}, InnerGlobal;
}(React.Component), keyframes = function() {
var insertable = css__default.default.apply(void 0, arguments), name = "animation-" + insertable.name;
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
}, classnames = function classnames(args) {
for (var len = args.length, i = 0, cls = ""; i < len; i++) {
var arg = args[i];
if (null != arg) {
var toAdd = void 0;
switch (typeof arg) {
case "boolean":
break;
case "object":
if (Array.isArray(arg)) toAdd = classnames(arg); else for (var k in toAdd = "",
arg) arg[k] && k && (toAdd && (toAdd += " "), toAdd += k);
break;
default:
toAdd = arg;
}
toAdd && (cls && (cls += " "), cls += toAdd);
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [], rawClassName = utils.getRegisteredStyles(registered, registeredStyles, className);
return registeredStyles.length < 2 ? className : rawClassName + css(registeredStyles);
}
var ClassNames = emotionElement.withEmotionCache((function(props, context) {
return React.createElement(emotionElement.ThemeContext.Consumer, null, (function(theme) {
var _ref, rules = "", serializedHashes = "", css = function() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
var serialized = serialize.serializeStyles(args, context.registered);
if (emotionElement.isBrowser) utils.insertStyles(context, serialized, !1); else {
var res = utils.insertStyles(context, serialized, !1);
void 0 !== res && (rules += res);
}
return emotionElement.isBrowser || (serializedHashes += " " + serialized.name),
context.key + "-" + serialized.name;
}, content = {
css: css,
cx: function() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) args[_key2] = arguments[_key2];
return merge(context.registered, css, classnames(args));
},
theme: theme
}, ele = props.children(content);
return !0, emotionElement.isBrowser || 0 === rules.length ? ele : React.createElement(React.Fragment, null, React.createElement("style", ((_ref = {})["data-emotion-" + context.key] = serializedHashes.substring(1),
_ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = context.sheet.nonce, _ref)), ele);
}));
}));
exports.CacheProvider = emotionElement.CacheProvider, exports.ThemeContext = emotionElement.ThemeContext,
Object.defineProperty(exports, "withEmotionCache", {
enumerable: !0,
get: function() {
return emotionElement.withEmotionCache;
}
}), Object.defineProperty(exports, "css", {
enumerable: !0,
get: function() {
return css__default.default;
}
}), exports.ClassNames = ClassNames, exports.Global = Global, exports.createElement = jsx,
exports.jsx = jsx, exports.keyframes = keyframes;

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

@ -0,0 +1,293 @@
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
import { createElement, Component, Fragment } from 'react';
import '@emotion/cache';
import { h as hasOwnProperty, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isBrowser } from './emotion-element-cfcfecf4.esm.js';
export { C as CacheProvider, T as ThemeContext, w as withEmotionCache } from './emotion-element-cfcfecf4.esm.js';
import { insertStyles, getRegisteredStyles } from '@emotion/utils';
import { serializeStyles } from '@emotion/serialize';
import { StyleSheet } from '@emotion/sheet';
import css from '@emotion/css';
export { default as css } from '@emotion/css';
var jsx = function jsx(type, props) {
var args = arguments;
if (props == null || !hasOwnProperty.call(props, 'css')) {
// $FlowFixMe
return createElement.apply(undefined, args);
}
var argsLength = args.length;
var createElementArgArray = new Array(argsLength);
createElementArgArray[0] = Emotion;
createElementArgArray[1] = createEmotionProps(type, props);
for (var i = 2; i < argsLength; i++) {
createElementArgArray[i] = args[i];
} // $FlowFixMe
return createElement.apply(null, createElementArgArray);
};
var warnedAboutCssPropForGlobal = false;
var Global = /* #__PURE__ */withEmotionCache(function (props, cache) {
if (process.env.NODE_ENV !== 'production' && !warnedAboutCssPropForGlobal && ( // check for className as well since the user is
// probably using the custom createElement which
// means it will be turned into a className prop
// $FlowFixMe I don't really want to add it to the type since it shouldn't be used
props.className || props.css)) {
console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?");
warnedAboutCssPropForGlobal = true;
}
var styles = props.styles;
if (typeof styles === 'function') {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
var serialized = serializeStyles([styles(theme)]);
return /*#__PURE__*/createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
}
var serialized = serializeStyles([styles]);
return /*#__PURE__*/createElement(InnerGlobal, {
serialized: serialized,
cache: cache
});
});
// maintain place over rerenders.
// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild
// initial client-side render from SSR, use place of hydrating tag
var InnerGlobal = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(InnerGlobal, _React$Component);
function InnerGlobal(props, context, updater) {
return _React$Component.call(this, props, context, updater) || this;
}
var _proto = InnerGlobal.prototype;
_proto.componentDidMount = function componentDidMount() {
this.sheet = new StyleSheet({
key: this.props.cache.key + "-global",
nonce: this.props.cache.sheet.nonce,
container: this.props.cache.sheet.container
}); // $FlowFixMe
var node = document.querySelector("style[data-emotion-" + this.props.cache.key + "=\"" + this.props.serialized.name + "\"]");
if (node !== null) {
this.sheet.tags.push(node);
}
if (this.props.cache.sheet.tags.length) {
this.sheet.before = this.props.cache.sheet.tags[0];
}
this.insertStyles();
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
if (prevProps.serialized.name !== this.props.serialized.name) {
this.insertStyles();
}
};
_proto.insertStyles = function insertStyles$1() {
if (this.props.serialized.next !== undefined) {
// insert keyframes
insertStyles(this.props.cache, this.props.serialized.next, true);
}
if (this.sheet.tags.length) {
// if this doesn't exist then it will be null so the style element will be appended
var element = this.sheet.tags[this.sheet.tags.length - 1].nextElementSibling;
this.sheet.before = element;
this.sheet.flush();
}
this.props.cache.insert("", this.props.serialized, this.sheet, false);
};
_proto.componentWillUnmount = function componentWillUnmount() {
this.sheet.flush();
};
_proto.render = function render() {
if (!isBrowser) {
var serialized = this.props.serialized;
var serializedNames = serialized.name;
var serializedStyles = serialized.styles;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
serializedStyles += next.styles;
next = next.next;
}
var shouldCache = this.props.cache.compat === true;
var rules = this.props.cache.insert("", {
name: serializedNames,
styles: serializedStyles
}, this.sheet, shouldCache);
if (!shouldCache) {
var _ref;
return /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion-" + this.props.cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = this.props.cache.sheet.nonce, _ref));
}
}
return null;
};
return InnerGlobal;
}(Component);
var keyframes = function keyframes() {
var insertable = css.apply(void 0, arguments);
var name = "animation-" + insertable.name; // $FlowFixMe
return {
name: name,
styles: "@keyframes " + name + "{" + insertable.styles + "}",
anim: 1,
toString: function toString() {
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
}
};
};
var classnames = function classnames(args) {
var len = args.length;
var i = 0;
var cls = '';
for (; i < len; i++) {
var arg = args[i];
if (arg == null) continue;
var toAdd = void 0;
switch (typeof arg) {
case 'boolean':
break;
case 'object':
{
if (Array.isArray(arg)) {
toAdd = classnames(arg);
} else {
toAdd = '';
for (var k in arg) {
if (arg[k] && k) {
toAdd && (toAdd += ' ');
toAdd += k;
}
}
}
break;
}
default:
{
toAdd = arg;
}
}
if (toAdd) {
cls && (cls += ' ');
cls += toAdd;
}
}
return cls;
};
function merge(registered, css, className) {
var registeredStyles = [];
var rawClassName = getRegisteredStyles(registered, registeredStyles, className);
if (registeredStyles.length < 2) {
return className;
}
return rawClassName + css(registeredStyles);
}
var ClassNames = withEmotionCache(function (props, context) {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
var rules = '';
var serializedHashes = '';
var hasRendered = false;
var css = function css() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('css can only be used during render');
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var serialized = serializeStyles(args, context.registered);
if (isBrowser) {
insertStyles(context, serialized, false);
} else {
var res = insertStyles(context, serialized, false);
if (res !== undefined) {
rules += res;
}
}
if (!isBrowser) {
serializedHashes += " " + serialized.name;
}
return context.key + "-" + serialized.name;
};
var cx = function cx() {
if (hasRendered && process.env.NODE_ENV !== 'production') {
throw new Error('cx can only be used during render');
}
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return merge(context.registered, css, classnames(args));
};
var content = {
css: css,
cx: cx,
theme: theme
};
var ele = props.children(content);
hasRendered = true;
if (!isBrowser && rules.length !== 0) {
var _ref;
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion-" + context.key] = serializedHashes.substring(1), _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = context.sheet.nonce, _ref)), ele);
}
return ele;
});
});
export { ClassNames, Global, jsx as createElement, jsx, keyframes };

2
web/node_modules/@emotion/core/dist/core.umd.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,77 @@
"use strict";
var _inheritsLoose = require("@babel/runtime/helpers/inheritsLoose"), React = require("react"), createCache = require("@emotion/cache"), utils = require("@emotion/utils"), serialize = require("@emotion/serialize");
function _interopDefault(e) {
return e && e.__esModule ? e : {
default: e
};
}
var _inheritsLoose__default = _interopDefault(_inheritsLoose), createCache__default = _interopDefault(createCache), isBrowser = "undefined" != typeof document, hasOwnProperty = Object.prototype.hasOwnProperty, EmotionCacheContext = React.createContext("undefined" != typeof HTMLElement ? createCache__default.default() : null), ThemeContext = React.createContext({}), CacheProvider = EmotionCacheContext.Provider;
if (exports.withEmotionCache = function(func) {
var render = function(props, ref) {
return React.createElement(EmotionCacheContext.Consumer, null, (function(cache) {
return func(props, cache, ref);
}));
};
return React.forwardRef(render);
}, !isBrowser) {
var BasicProvider = function(_React$Component) {
function BasicProvider(props, context, updater) {
var _this;
return (_this = _React$Component.call(this, props, context, updater) || this).state = {
value: createCache__default.default()
}, _this;
}
return _inheritsLoose__default.default(BasicProvider, _React$Component), BasicProvider.prototype.render = function() {
return React.createElement(EmotionCacheContext.Provider, this.state, this.props.children(this.state.value));
}, BasicProvider;
}(React.Component);
exports.withEmotionCache = function(func) {
return function(props) {
return React.createElement(EmotionCacheContext.Consumer, null, (function(context) {
return null === context ? React.createElement(BasicProvider, null, (function(newContext) {
return func(props, newContext);
})) : func(props, context);
}));
};
};
}
var sanitizeIdentifier = function(identifier) {
return identifier.replace(/\$/g, "-");
}, typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", labelPropName = "__EMOTION_LABEL_PLEASE_DO_NOT_USE__", createEmotionProps = function(type, props) {
var newProps = {};
for (var key in props) hasOwnProperty.call(props, key) && (newProps[key] = props[key]);
return newProps[typePropName] = type, newProps;
}, render = function(cache, props, theme, ref) {
var cssProp = null === theme ? props.css : props.css(theme);
"string" == typeof cssProp && void 0 !== cache.registered[cssProp] && (cssProp = cache.registered[cssProp]);
var type = props[typePropName], registeredStyles = [ cssProp ], className = "";
"string" == typeof props.className ? className = utils.getRegisteredStyles(cache.registered, registeredStyles, props.className) : null != props.className && (className = props.className + " ");
var serialized = serialize.serializeStyles(registeredStyles), rules = utils.insertStyles(cache, serialized, "string" == typeof type);
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) hasOwnProperty.call(props, key) && "css" !== key && key !== typePropName && (newProps[key] = props[key]);
newProps.ref = ref, newProps.className = className;
var ele = React.createElement(type, newProps);
if (!isBrowser && void 0 !== rules) {
for (var _ref, serializedNames = serialized.name, next = serialized.next; void 0 !== next; ) serializedNames += " " + next.name,
next = next.next;
return React.createElement(React.Fragment, null, React.createElement("style", ((_ref = {})["data-emotion-" + cache.key] = serializedNames,
_ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref)), ele);
}
return ele;
}, Emotion = exports.withEmotionCache((function(props, cache, ref) {
return "function" == typeof props.css ? React.createElement(ThemeContext.Consumer, null, (function(theme) {
return render(cache, props, theme, ref);
})) : render(cache, props, null, ref);
}));
exports.CacheProvider = CacheProvider, exports.Emotion = Emotion, exports.ThemeContext = ThemeContext,
exports.createEmotionProps = createEmotionProps, exports.hasOwnProperty = hasOwnProperty,
exports.isBrowser = isBrowser;

View file

@ -0,0 +1,203 @@
'use strict';
var _inheritsLoose = require('@babel/runtime/helpers/inheritsLoose');
var React = require('react');
var createCache = require('@emotion/cache');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
var _inheritsLoose__default = /*#__PURE__*/_interopDefault(_inheritsLoose);
var createCache__default = /*#__PURE__*/_interopDefault(createCache);
var isBrowser = typeof document !== 'undefined';
var hasOwnProperty = Object.prototype.hasOwnProperty;
var EmotionCacheContext = /*#__PURE__*/React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? createCache__default['default']() : null);
var ThemeContext = /*#__PURE__*/React.createContext({});
var CacheProvider = EmotionCacheContext.Provider;
exports.withEmotionCache = function withEmotionCache(func) {
var render = function render(props, ref) {
return /*#__PURE__*/React.createElement(EmotionCacheContext.Consumer, null, function (cache) {
return func(props, cache, ref);
});
}; // $FlowFixMe
return /*#__PURE__*/React.forwardRef(render);
};
if (!isBrowser) {
var BasicProvider = /*#__PURE__*/function (_React$Component) {
_inheritsLoose__default['default'](BasicProvider, _React$Component);
function BasicProvider(props, context, updater) {
var _this;
_this = _React$Component.call(this, props, context, updater) || this;
_this.state = {
value: createCache__default['default']()
};
return _this;
}
var _proto = BasicProvider.prototype;
_proto.render = function render() {
return /*#__PURE__*/React.createElement(EmotionCacheContext.Provider, this.state, this.props.children(this.state.value));
};
return BasicProvider;
}(React.Component);
exports.withEmotionCache = function withEmotionCache(func) {
return function (props) {
return /*#__PURE__*/React.createElement(EmotionCacheContext.Consumer, null, function (context) {
if (context === null) {
return /*#__PURE__*/React.createElement(BasicProvider, null, function (newContext) {
return func(props, newContext);
});
} else {
return func(props, context);
}
});
};
};
}
// thus we only need to replace what is a valid character for JS, but not for CSS
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`" + props.css + "`");
}
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions
if (process.env.NODE_ENV !== 'production') {
var error = new Error();
if (error.stack) {
// chrome
var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z$]+) /);
if (!match) {
// safari and firefox
match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/);
}
if (match) {
newProps[labelPropName] = sanitizeIdentifier(match[1]);
}
}
}
return newProps;
};
var render = function render(cache, props, theme, ref) {
var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var type = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = utils.getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serialize.serializeStyles(registeredStyles);
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serialize.serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
var rules = utils.insertStyles(cache, serialized, typeof type === 'string');
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
newProps[key] = props[key];
}
}
newProps.ref = ref;
newProps.className = className;
var ele = /*#__PURE__*/React.createElement(type, newProps);
if (!isBrowser && rules !== undefined) {
var _ref;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", (_ref = {}, _ref["data-emotion-" + cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref)), ele);
}
return ele;
}; // eslint-disable-next-line no-undef
var Emotion = /* #__PURE__ */exports.withEmotionCache(function (props, cache, ref) {
if (typeof props.css === 'function') {
return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
return render(cache, props, theme, ref);
});
}
return render(cache, props, null, ref);
});
if (process.env.NODE_ENV !== 'production') {
Emotion.displayName = 'EmotionCssPropInternal';
}
exports.CacheProvider = CacheProvider;
exports.Emotion = Emotion;
exports.ThemeContext = ThemeContext;
exports.createEmotionProps = createEmotionProps;
exports.hasOwnProperty = hasOwnProperty;
exports.isBrowser = isBrowser;

View file

@ -0,0 +1,136 @@
import '@babel/runtime/helpers/inheritsLoose';
import { createContext, forwardRef, createElement } from 'react';
import createCache from '@emotion/cache';
import { getRegisteredStyles, insertStyles } from '@emotion/utils';
import { serializeStyles } from '@emotion/serialize';
var hasOwnProperty = Object.prototype.hasOwnProperty;
var EmotionCacheContext = /*#__PURE__*/createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? createCache() : null);
var ThemeContext = /*#__PURE__*/createContext({});
var CacheProvider = EmotionCacheContext.Provider;
var withEmotionCache = function withEmotionCache(func) {
var render = function render(props, ref) {
return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {
return func(props, cache, ref);
});
}; // $FlowFixMe
return /*#__PURE__*/forwardRef(render);
};
// thus we only need to replace what is a valid character for JS, but not for CSS
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`" + props.css + "`");
}
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions
if (process.env.NODE_ENV !== 'production') {
var error = new Error();
if (error.stack) {
// chrome
var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z$]+) /);
if (!match) {
// safari and firefox
match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/);
}
if (match) {
newProps[labelPropName] = sanitizeIdentifier(match[1]);
}
}
}
return newProps;
};
var render = function render(cache, props, theme, ref) {
var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var type = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serializeStyles(registeredStyles);
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
var rules = insertStyles(cache, serialized, typeof type === 'string');
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
newProps[key] = props[key];
}
}
newProps.ref = ref;
newProps.className = className;
var ele = /*#__PURE__*/createElement(type, newProps);
return ele;
}; // eslint-disable-next-line no-undef
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
if (typeof props.css === 'function') {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
return render(cache, props, theme, ref);
});
}
return render(cache, props, null, ref);
});
if (process.env.NODE_ENV !== 'production') {
Emotion.displayName = 'EmotionCssPropInternal';
}
export { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, withEmotionCache as w };

View file

@ -0,0 +1,147 @@
'use strict';
require('@babel/runtime/helpers/inheritsLoose');
var React = require('react');
var createCache = require('@emotion/cache');
var utils = require('@emotion/utils');
var serialize = require('@emotion/serialize');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
var createCache__default = /*#__PURE__*/_interopDefault(createCache);
var hasOwnProperty = Object.prototype.hasOwnProperty;
var EmotionCacheContext = /*#__PURE__*/React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? createCache__default['default']() : null);
var ThemeContext = /*#__PURE__*/React.createContext({});
var CacheProvider = EmotionCacheContext.Provider;
var withEmotionCache = function withEmotionCache(func) {
var render = function render(props, ref) {
return /*#__PURE__*/React.createElement(EmotionCacheContext.Consumer, null, function (cache) {
return func(props, cache, ref);
});
}; // $FlowFixMe
return /*#__PURE__*/React.forwardRef(render);
};
// thus we only need to replace what is a valid character for JS, but not for CSS
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`" + props.css + "`");
}
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions
if (process.env.NODE_ENV !== 'production') {
var error = new Error();
if (error.stack) {
// chrome
var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z$]+) /);
if (!match) {
// safari and firefox
match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/);
}
if (match) {
newProps[labelPropName] = sanitizeIdentifier(match[1]);
}
}
}
return newProps;
};
var render = function render(cache, props, theme, ref) {
var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var type = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = utils.getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serialize.serializeStyles(registeredStyles);
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serialize.serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
var rules = utils.insertStyles(cache, serialized, typeof type === 'string');
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
newProps[key] = props[key];
}
}
newProps.ref = ref;
newProps.className = className;
var ele = /*#__PURE__*/React.createElement(type, newProps);
return ele;
}; // eslint-disable-next-line no-undef
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
if (typeof props.css === 'function') {
return /*#__PURE__*/React.createElement(ThemeContext.Consumer, null, function (theme) {
return render(cache, props, theme, ref);
});
}
return render(cache, props, null, ref);
});
if (process.env.NODE_ENV !== 'production') {
Emotion.displayName = 'EmotionCssPropInternal';
}
exports.CacheProvider = CacheProvider;
exports.Emotion = Emotion;
exports.ThemeContext = ThemeContext;
exports.createEmotionProps = createEmotionProps;
exports.hasOwnProperty = hasOwnProperty;
exports.withEmotionCache = withEmotionCache;

View file

@ -0,0 +1,191 @@
import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';
import { createContext, forwardRef, createElement, Component, Fragment } from 'react';
import createCache from '@emotion/cache';
import { getRegisteredStyles, insertStyles } from '@emotion/utils';
import { serializeStyles } from '@emotion/serialize';
var isBrowser = typeof document !== 'undefined';
var hasOwnProperty = Object.prototype.hasOwnProperty;
var EmotionCacheContext = /*#__PURE__*/createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case
// because this module is primarily intended for the browser and node
// but it's also required in react native and similar environments sometimes
// and we could have a special build just for that
// but this is much easier and the native packages
// might use a different theme context in the future anyway
typeof HTMLElement !== 'undefined' ? createCache() : null);
var ThemeContext = /*#__PURE__*/createContext({});
var CacheProvider = EmotionCacheContext.Provider;
var withEmotionCache = function withEmotionCache(func) {
var render = function render(props, ref) {
return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (cache) {
return func(props, cache, ref);
});
}; // $FlowFixMe
return /*#__PURE__*/forwardRef(render);
};
if (!isBrowser) {
var BasicProvider = /*#__PURE__*/function (_React$Component) {
_inheritsLoose(BasicProvider, _React$Component);
function BasicProvider(props, context, updater) {
var _this;
_this = _React$Component.call(this, props, context, updater) || this;
_this.state = {
value: createCache()
};
return _this;
}
var _proto = BasicProvider.prototype;
_proto.render = function render() {
return /*#__PURE__*/createElement(EmotionCacheContext.Provider, this.state, this.props.children(this.state.value));
};
return BasicProvider;
}(Component);
withEmotionCache = function withEmotionCache(func) {
return function (props) {
return /*#__PURE__*/createElement(EmotionCacheContext.Consumer, null, function (context) {
if (context === null) {
return /*#__PURE__*/createElement(BasicProvider, null, function (newContext) {
return func(props, newContext);
});
} else {
return func(props, context);
}
});
};
};
}
// thus we only need to replace what is a valid character for JS, but not for CSS
var sanitizeIdentifier = function sanitizeIdentifier(identifier) {
return identifier.replace(/\$/g, '-');
};
var typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';
var labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';
var createEmotionProps = function createEmotionProps(type, props) {
if (process.env.NODE_ENV !== 'production' && typeof props.css === 'string' && // check if there is a css declaration
props.css.indexOf(':') !== -1) {
throw new Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/css' like this: css`" + props.css + "`");
}
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key)) {
newProps[key] = props[key];
}
}
newProps[typePropName] = type; // TODO: check if this still works with all of those different JSX functions
if (process.env.NODE_ENV !== 'production') {
var error = new Error();
if (error.stack) {
// chrome
var match = error.stack.match(/at (?:Object\.|Module\.|)(?:jsx|createEmotionProps).*\n\s+at (?:Object\.|)([A-Z][A-Za-z$]+) /);
if (!match) {
// safari and firefox
match = error.stack.match(/.*\n([A-Z][A-Za-z$]+)@/);
}
if (match) {
newProps[labelPropName] = sanitizeIdentifier(match[1]);
}
}
}
return newProps;
};
var render = function render(cache, props, theme, ref) {
var cssProp = theme === null ? props.css : props.css(theme); // so that using `css` from `emotion` and passing the result to the css prop works
// not passing the registered cache to serializeStyles because it would
// make certain babel optimisations not possible
if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {
cssProp = cache.registered[cssProp];
}
var type = props[typePropName];
var registeredStyles = [cssProp];
var className = '';
if (typeof props.className === 'string') {
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
} else if (props.className != null) {
className = props.className + " ";
}
var serialized = serializeStyles(registeredStyles);
if (process.env.NODE_ENV !== 'production' && serialized.name.indexOf('-') === -1) {
var labelFromStack = props[labelPropName];
if (labelFromStack) {
serialized = serializeStyles([serialized, 'label:' + labelFromStack + ';']);
}
}
var rules = insertStyles(cache, serialized, typeof type === 'string');
className += cache.key + "-" + serialized.name;
var newProps = {};
for (var key in props) {
if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && (process.env.NODE_ENV === 'production' || key !== labelPropName)) {
newProps[key] = props[key];
}
}
newProps.ref = ref;
newProps.className = className;
var ele = /*#__PURE__*/createElement(type, newProps);
if (!isBrowser && rules !== undefined) {
var _ref;
var serializedNames = serialized.name;
var next = serialized.next;
while (next !== undefined) {
serializedNames += ' ' + next.name;
next = next.next;
}
return /*#__PURE__*/createElement(Fragment, null, /*#__PURE__*/createElement("style", (_ref = {}, _ref["data-emotion-" + cache.key] = serializedNames, _ref.dangerouslySetInnerHTML = {
__html: rules
}, _ref.nonce = cache.sheet.nonce, _ref)), ele);
}
return ele;
}; // eslint-disable-next-line no-undef
var Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {
if (typeof props.css === 'function') {
return /*#__PURE__*/createElement(ThemeContext.Consumer, null, function (theme) {
return render(cache, props, theme, ref);
});
}
return render(cache, props, null, ref);
});
if (process.env.NODE_ENV !== 'production') {
Emotion.displayName = 'EmotionCssPropInternal';
}
export { CacheProvider as C, Emotion as E, ThemeContext as T, createEmotionProps as c, hasOwnProperty as h, isBrowser as i, withEmotionCache as w };