Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

pretty-lights

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pretty-lights - npm Package Compare versions

Comparing version 0.0.12-alpha.1 to 0.0.12-alpha.2

2

babel/index.js

@@ -30,3 +30,3 @@ "use strict";

function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

@@ -33,0 +33,0 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

@@ -25,3 +25,3 @@ "use strict";

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -28,0 +28,0 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

"use strict";
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {

@@ -16,3 +18,3 @@ value: true

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

@@ -19,0 +21,0 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

@@ -1,2 +0,2 @@

function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),c=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),s=e(require("hoist-non-react-statics")),u=e(require("react"));function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b=/[A-Z]|^ms/g,_=o(function(e){return e.replace(b,"-$&").toLowerCase()}),E=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var w=/(attr|calc|counters?|url)\(/,O=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],N=E;E=function(e,t){return"content"===e&&("string"!=typeof t||-1===O.indexOf(t)&&!w.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),N(e,t)}}var P="undefined"!=typeof document,j=function(){function e(t){f(this,e),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}return h(e,[{key:"insert",value:function(e,t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var r=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(r,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(r)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else n.appendChild(document.createTextNode(e+(t||"")));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}]),e}(),S=u.createContext({}),x=c,A=function(e){return"theme"!==e&&"innerRef"!==e},C=function(){return!0},T=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},k=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(r,!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})});function D(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function R(e,t){return function(r){return D(e,r,t)}}R.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&D(e,n,o)}};var q=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i,c=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(c))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(c,'" was passed'));P&&(i=o.container||document.head);var a,s,u=new j({key:c,container:i,nonce:o.nonce,speedy:o.speedy}),f="",p=n(function(e){a+=e,P&&u.insert(e,f)});void 0!==o.prefix&&(s={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:c},d=new t(s);function y(e,t){if(null==e)return"";switch(l(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==l(e[r]))t+=void 0!==h.registered[e[r]]?"".concat(r,"{").concat(h.registered[e[r]],"}"):"".concat(_(r),":").concat(E(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(_(r),":").concat(E(r,e),";")}):t+="".concat(r,"{").concat(y.call(this,e[r],!1),"}")}},this),m.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(p);var v,g,m=new WeakMap,b=/label:\s*([^\s;\n{]+)\s*;/g,w=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var O=w,N=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;w=function(e,t){return O(e.replace(N,function(e){return f=e,""}),t)}}var S=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=y.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=y.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),g=n,n=n.replace(b,function(e,t){return o+="-".concat(t),""}),v=w(n,o),n};if("production"!==process.env.NODE_ENV){var x=d;d=function(e,t){x(e,t),f=""}}function A(e,t){void 0===h.inserted[v]&&(a="",d(e,t),h.inserted[v]=a)}var C=function(){var e=S.apply(this,arguments),t="".concat(c,"-").concat(v);return void 0===h.registered[t]&&(h.registered[t]=g),A(".".concat(t),e),t};function T(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==h.registered[t]?e.push(t):r+="".concat(t," ")}),r}function k(e,t){var r=[],n=T(r,e);return r.length<2?e:n+C(r,t)}function D(e){h.inserted[e]=!0}if(P){var R=document.querySelectorAll("style[data-lights-".concat(c,"]"));Array.prototype.forEach.call(R,function(e){e.getAttribute("data-lights-".concat(c)).split(" ").forEach(D),e.parentNode!==i&&i.appendChild(e)})}var q={flush:function(){P&&u.flush(),h.inserted={},h.registered={}},hydrate:function(e){e.forEach(D)},cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return k(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},merge:k,getRegisteredStyles:T,injectGlobal:function(){A("",S.apply(this,arguments))},keyframes:function(){var e=S.apply(this,arguments),t="animation-".concat(v);return A("","@keyframes ".concat(t,"{").concat(e,"}")),t},css:C,sheet:u,caches:h};return e.__SECRET_LIGHTS__=q,q}("undefined"!=typeof global?global:{}),V=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,l=void 0===o&&s&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?x:A),function(){var p=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{d.push(p[0][0]);for(var y=p.length,v=1;v<y;v+=1)d.push(p[v],p[0][v])}var b=function(t){function r(){return f(this,r),!(e=g(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,u.Component),h(r,[{key:"render",value:function(){var t=this;return u.createElement(S.Consumer,null,function(r){var n=t.props;t.mergedProps=T(C,{},n,{theme:n.theme||r});var i="",s=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(s,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(s)):o,void 0!==c&&(i+=" ".concat(c)),u.createElement(l,T(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof l?l:l.displayName||l.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=l,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?T(C,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(q),L=q.hydrate,I=q.cx,G=q.merge,M=q.getRegisteredStyles,F=q.injectGlobal,Y=q.keyframes,z=q.css,H=q.sheet,$=q.caches;exports.flush=q.flush,exports.hydrate=L,exports.cx=I,exports.merge=G,exports.getRegisteredStyles=M,exports.injectGlobal=F,exports.keyframes=Y,exports.css=z,exports.sheet=H,exports.caches=$,exports.ThemeContext=S,exports.ThemeProvider=function(e){return u.createElement(S.Consumer,null,function(t){return e.theme!==t&&(t=k(t)(e.theme)),u.createElement(S.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(S)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(S.Consumer,null,function(n){return u.createElement(e,y({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},exports.themeFn=R,exports.styled=V;
function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(require("@emotion/stylis")),r=e(require("@emotion/hash")),n=e(require("stylis-rule-sheet")),o=e(require("@emotion/memoize")),i=e(require("@emotion/unitless")),c=e(require("@emotion/is-prop-valid")),a=e(require("@emotion/weak-memoize")),s=e(require("hoist-non-react-statics")),u=e(require("react"));function l(e){return(l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function h(e,t,r){return t&&p(e.prototype,t),r&&p(e,r),e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function y(){return(y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function v(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function g(e){return(g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var b="undefined"!=typeof document;function _(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(r):n+="".concat(r," ")}),n}var E=/[A-Z]|^ms/g,w=o(function(e){return e.replace(E,"-$&").toLowerCase()}),O=function(e,t){return null==t||"boolean"==typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var N=/(attr|calc|counters?|url)\(/,P=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],j=O;O=function(e,t){return"content"===e&&("string"!=typeof t||-1===P.indexOf(t)&&!N.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),j(e,t)}}var S=function(){function e(t){f(this,e),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}return h(e,[{key:"insert",value:function(e,t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var r=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(r,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(r)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else n.appendChild(document.createTextNode(e+(t||"")));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}]),e}(),x=u.createContext({}),A=c,C=function(e){return"theme"!==e&&"innerRef"!==e},T=function(){return!0},k=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},D=a(function(e){return a(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==l(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==l(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?v(Object(r),!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})});function R(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function q(e,t){return function(r){return R(e,r,t)}}q.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&R(e,n,o)}};var V=function(e,o){if(void 0!==e.__SECRET_LIGHTS__)return e.__SECRET_LIGHTS__;void 0===o&&(o={});var i,c=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(c))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(c,'" was passed'));b&&(i=o.container||document.head);var a,s,u=new S({key:c,container:i,nonce:o.nonce,speedy:o.speedy}),f="",p=n(function(e){a+=e,b&&u.insert(e,f)});void 0!==o.prefix&&(s={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:c},d=new t(s);function y(e,t){if(null==e)return"";switch(l(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(m.has(e))return m.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==l(e[r]))t+=void 0!==h.registered[e[r]]?"".concat(r,"{").concat(h.registered[e[r]],"}"):"".concat(w(r),":").concat(O(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(w(r),":").concat(O(r,e),";")}):t+="".concat(r,"{").concat(y.call(this,e[r],!1),"}")}},this),m.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(p);var v,g,m=new WeakMap,E=/label:\s*([^\s;\n{]+)\s*;/g,N=function(e,t){return r(e+t)+t};if("production"!==process.env.NODE_ENV){var P=N,j=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;N=function(e,t){return P(e.replace(j,function(e){return f=e,""}),t)}}var x=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=y.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=y.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),g=n,n=n.replace(E,function(e,t){return o+="-".concat(t),""}),v=N(n,o),n};if("production"!==process.env.NODE_ENV){var A=d;d=function(e,t){A(e,t),f=""}}function C(e,t){void 0===h.inserted[v]&&(a="",d(e,t),h.inserted[v]=a)}var T=function(){var e=x.apply(this,arguments),t="".concat(c,"-").concat(v);return void 0===h.registered[t]&&(h.registered[t]=g),C(".".concat(t),e),t};function k(e,t){var r=[],n=_(h.registered,r,e);return r.length<2?e:n+T(r,t)}function D(e){h.inserted[e]=!0}if(b){var R=document.querySelectorAll("style[data-lights-".concat(c,"]"));Array.prototype.forEach.call(R,function(e){e.getAttribute("data-lights-".concat(c)).split(" ").forEach(D),e.parentNode!==i&&i.appendChild(e)})}var q={css:T,cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return k(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(l(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},injectGlobal:function(){C("",x.apply(this,arguments))},keyframes:function(){var e=x.apply(this,arguments),t="animation-".concat(v);return C("","@keyframes ".concat(t,"{").concat(e,"}")),t},hydrate:function(e){e.forEach(function(e){h.inserted[e]=!0})},flush:function(){h.inserted={},h.registered={},b&&u.flush()},sheet:u,caches:h,getRegisteredStyles:_,merge:k};return e.__SECRET_LIGHTS__=q,q}("undefined"!=typeof global?global:{}),L=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var s=r.__lights_real===r,l=void 0===o&&s&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof l&&l.charAt(0)===l.charAt(0).toLowerCase()?A:C),function(){var p=arguments,d=s&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==p[0]||void 0===p[0].raw)d.push.apply(d,p);else{d.push(p[0][0]);for(var y=p.length,v=1;v<y;v+=1)d.push(p[v],p[0][v])}var b=function(t){function r(){return f(this,r),!(e=g(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,u.Component),h(r,[{key:"render",value:function(){var t=this;return u.createElement(x.Consumer,null,function(r){var n=t.props;t.mergedProps=k(T,{},n,{theme:n.theme||r});var i="",s=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(e.caches.registered,s,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(s)):o,void 0!==c&&(i+=" ".concat(c)),u.createElement(l,k(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof l?l:l.displayName||l.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=l,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?k(T,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(V),I=V.hydrate,G=V.cx,M=V.merge,F=V.getRegisteredStyles,Y=V.injectGlobal,z=V.keyframes,H=V.css,$=V.sheet,B=V.caches;exports.flush=V.flush,exports.hydrate=I,exports.cx=G,exports.merge=M,exports.getRegisteredStyles=F,exports.injectGlobal=Y,exports.keyframes=z,exports.css=H,exports.sheet=$,exports.caches=B,exports.ThemeContext=x,exports.ThemeProvider=function(e){return u.createElement(x.Consumer,null,function(t){return e.theme!==t&&(t=D(t)(e.theme)),u.createElement(x.Provider,{value:t},e.children)})},exports.useTheme=function(){return u.useContext(x)},exports.withTheme=function(e){var t=e.displayName||e.name||"Component",r=u.forwardRef(function(t,r){return u.createElement(x.Consumer,null,function(n){return u.createElement(e,y({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),s(r,e)},exports.themeFn=q,exports.styled=L;
//# sourceMappingURL=pretty-lights.js.map

@@ -1,2 +0,2 @@

import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import c from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import s from"react";function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=/[A-Z]|^ms/g,b=n(function(e){return e.replace(g,"-$&").toLowerCase()}),_=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var E=/(attr|calc|counters?|url)\(/,w=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],O=_;_=function(e,t){return"content"===e&&("string"!=typeof t||-1===w.indexOf(t)&&!E.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),O(e,t)}}var N="undefined"!=typeof document,P=function(){function e(t){l(this,e),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}return p(e,[{key:"insert",value:function(e,t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var r=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(r,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(r)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else n.appendChild(document.createTextNode(e+(t||"")));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}]),e}(),S=s.createContext({}),j=i,A=function(e){return"theme"!==e&&"innerRef"!==e},C=function(){return!0},k=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},T=c(function(e){return c(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==u(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==u(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(r,!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})}),x=function(e){return s.createElement(S.Consumer,null,function(t){return e.theme!==t&&(t=T(t)(e.theme)),s.createElement(S.Provider,{value:t},e.children)})};function D(e){var t=e.displayName||e.name||"Component",r=s.forwardRef(function(t,r){return s.createElement(S.Consumer,null,function(n){return s.createElement(e,d({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),a(r,e)}function R(){return s.useContext(S)}function V(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function L(e,t){return function(r){return V(e,r,t)}}L.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&V(e,n,o)}};var I=function(n,o){if(void 0!==n.__SECRET_LIGHTS__)return n.__SECRET_LIGHTS__;void 0===o&&(o={});var i,c=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(c))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(c,'" was passed'));N&&(i=o.container||document.head);var a,s,l=new P({key:c,container:i,nonce:o.nonce,speedy:o.speedy}),f="",p=r(function(e){a+=e,N&&l.insert(e,f)});void 0!==o.prefix&&(s={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:c},d=new e(s);function y(e,t){if(null==e)return"";switch(u(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(g.has(e))return g.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==u(e[r]))t+=void 0!==h.registered[e[r]]?"".concat(r,"{").concat(h.registered[e[r]],"}"):"".concat(b(r),":").concat(_(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(b(r),":").concat(_(r,e),";")}):t+="".concat(r,"{").concat(y.call(this,e[r],!1),"}")}},this),g.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(p);var v,m,g=new WeakMap,E=/label:\s*([^\s;\n{]+)\s*;/g,w=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var O=w,S=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;w=function(e,t){return O(e.replace(S,function(e){return f=e,""}),t)}}var j=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=y.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=y.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),m=n,n=n.replace(E,function(e,t){return o+="-".concat(t),""}),v=w(n,o),n};if("production"!==process.env.NODE_ENV){var A=d;d=function(e,t){A(e,t),f=""}}function C(e,t){void 0===h.inserted[v]&&(a="",d(e,t),h.inserted[v]=a)}var k=function(){var e=j.apply(this,arguments),t="".concat(c,"-").concat(v);return void 0===h.registered[t]&&(h.registered[t]=m),C(".".concat(t),e),t};function T(e,t){var r="";return t.split(" ").forEach(function(t){void 0!==h.registered[t]?e.push(t):r+="".concat(t," ")}),r}function x(e,t){var r=[],n=T(r,e);return r.length<2?e:n+k(r,t)}function D(e){h.inserted[e]=!0}if(N){var R=document.querySelectorAll("style[data-lights-".concat(c,"]"));Array.prototype.forEach.call(R,function(e){e.getAttribute("data-lights-".concat(c)).split(" ").forEach(D),e.parentNode!==i&&i.appendChild(e)})}var V={flush:function(){N&&l.flush(),h.inserted={},h.registered={}},hydrate:function(e){e.forEach(D)},cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return x(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(u(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},merge:x,getRegisteredStyles:T,injectGlobal:function(){C("",j.apply(this,arguments))},keyframes:function(){var e=j.apply(this,arguments),t="animation-".concat(v);return C("","@keyframes ".concat(t,"{").concat(e,"}")),t},css:k,sheet:l,caches:h};return n.__SECRET_LIGHTS__=V,V}("undefined"!=typeof global?global:{}),q=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__lights_real===r,f=void 0===o&&u&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof f&&f.charAt(0)===f.charAt(0).toLowerCase()?j:A),function(){var h=arguments,d=u&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==h[0]||void 0===h[0].raw)d.push.apply(d,h);else{d.push(h[0][0]);for(var y=h.length,g=1;g<y;g+=1)d.push(h[g],h[0][g])}var b=function(t){function r(){return l(this,r),!(e=v(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,s.Component),p(r,[{key:"render",value:function(){var t=this;return s.createElement(S.Consumer,null,function(r){var n=t.props;t.mergedProps=k(C,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(u,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(u)):o,void 0!==c&&(i+=" ".concat(c)),s.createElement(f,k(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof f?f:f.displayName||f.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=f,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?k(C,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(I),G=I.flush,M=I.hydrate,F=I.cx,Y=I.merge,z=I.getRegisteredStyles,H=I.injectGlobal,$=I.keyframes,B=I.css,W=I.sheet,U=I.caches;export{G as flush,M as hydrate,F as cx,Y as merge,z as getRegisteredStyles,H as injectGlobal,$ as keyframes,B as css,W as sheet,U as caches,S as ThemeContext,x as ThemeProvider,R as useTheme,D as withTheme,L as themeFn,q as styled};
import e from"@emotion/stylis";import t from"@emotion/hash";import r from"stylis-rule-sheet";import n from"@emotion/memoize";import o from"@emotion/unitless";import i from"@emotion/is-prop-valid";import c from"@emotion/weak-memoize";import a from"hoist-non-react-statics";import s from"react";function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function p(e,t,r){return t&&f(e.prototype,t),r&&f(e,r),e}function h(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d(){return(d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function m(e,t){return(m=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g="undefined"!=typeof document;function b(e,t,r){var n="";return r.split(" ").forEach(function(r){void 0!==e[r]?t.push(r):n+="".concat(r," ")}),n}var _=/[A-Z]|^ms/g,E=n(function(e){return e.replace(_,"-$&").toLowerCase()}),w=function(e,t){return null==t||"boolean"==typeof t?"":1===o[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:"".concat(t,"px")};if("production"!==process.env.NODE_ENV){var O=/(attr|calc|counters?|url)\(/,N=["normal","none","counter","open-quote","close-quote","no-open-quote","no-close-quote","initial","inherit","unset"],P=w;w=function(e,t){return"content"===e&&("string"!=typeof t||-1===N.indexOf(t)&&!O.test(t)&&(t.charAt(0)!==t.charAt(t.length-1)||'"'!==t.charAt(0)&&"'"!==t.charAt(0)))&&console.error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(t,"\"'`")),P(e,t)}}var j=function(){function e(t){l(this,e),this.isSpeedy=void 0===t.speedy?"production"===process.env.NODE_ENV:t.speedy,this.tags=[],this.ctr=0,this.nonce=t.nonce,this.key=t.key,this.container=t.container,this.before=null}return p(e,[{key:"insert",value:function(e,t){if(this.ctr%(this.isSpeedy?65e3:1)==0){var r=function(e){var t=document.createElement("style");return t.setAttribute("data-lights",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t}(this);this.container.insertBefore(r,0===this.tags.length?this.before:this.tags[this.tags.length-1].nextSibling),this.tags.push(r)}var n=this.tags[this.tags.length-1];if(this.isSpeedy){var o=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t+=1)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(n);try{var i=105===e.charCodeAt(1)&&64===e.charCodeAt(0);o.insertRule(e,i?0:o.cssRules.length)}catch(t){"production"!==process.env.NODE_ENV&&console.warn('There was a problem inserting the following rule: "'.concat(e,'"'),t)}}else n.appendChild(document.createTextNode(e+(t||"")));this.ctr+=1}},{key:"flush",value:function(){this.tags.forEach(function(e){return e.parentNode.removeChild(e)}),this.tags=[],this.ctr=0}}]),e}(),S=s.createContext({}),A=i,C=function(e){return"theme"!==e&&"innerRef"!==e},k=function(){return!0},T=function(e,t){for(var r=arguments,n=2,o=arguments.length;n<o;n+=1){var i=r[n],c=void 0;for(c in i)e(c)&&(t[c]=i[c])}return t},x=c(function(e){return c(function(t){return function(e,t){if("function"==typeof t){var r=t(e);if("production"!==process.env.NODE_ENV&&(null==r||"object"!==u(r)||Array.isArray(r)))throw new Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return r}if("production"!==process.env.NODE_ENV&&(null==t||"object"!==u(t)||Array.isArray(t)))throw new Error("[ThemeProvider] Please make your theme prop a plain object");return function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach(function(t){h(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}({},e,{},t)}(e,t)})}),D=function(e){return s.createElement(S.Consumer,null,function(t){return e.theme!==t&&(t=x(t)(e.theme)),s.createElement(S.Provider,{value:t},e.children)})};function R(e){var t=e.displayName||e.name||"Component",r=s.forwardRef(function(t,r){return s.createElement(S.Consumer,null,function(n){return s.createElement(e,d({theme:n,ref:r},t))})});return r.displayName="WithTheme(".concat(t,")"),a(r,e)}function V(){return s.useContext(S)}function L(e,t,r){var n,o=t.theme&&t.theme[e];return"function"==typeof(n="function"==typeof o?o(r):r[o]?r[o]:r.none)?n(t):n}function I(e,t){return function(r){return L(e,r,t)}}I.variants=function(e,t,r){return function(n){var o=n[t]&&r[n[t]];return o&&L(e,n,o)}};var q=function(n,o){if(void 0!==n.__SECRET_LIGHTS__)return n.__SECRET_LIGHTS__;void 0===o&&(o={});var i,c=o.key||"css";if("production"!==process.env.NODE_ENV&&/[^a-z-]/.test(c))throw new Error('Pretty Lights key must only contain lower case alphabetical characters and - but "'.concat(c,'" was passed'));g&&(i=o.container||document.head);var a,s,l=new j({key:c,container:i,nonce:o.nonce,speedy:o.speedy}),f="",p=r(function(e){a+=e,g&&l.insert(e,f)});void 0!==o.prefix&&(s={prefix:o.prefix});var h={registered:{},inserted:{},nonce:o.nonce,key:c},d=new e(s);function y(e,t){if(null==e)return"";switch(u(e)){case"boolean":return"";case"function":if(void 0!==e.__lights_styles){var r=e.toString();if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");return r}return void 0===this&&"production"!==process.env.NODE_ENV&&console.error("Interpolating functions in css calls is deprecated.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`"),y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return function(e){if(_.has(e))return _.get(e);var t="";return Array.isArray(e)?e.forEach(function(e){t+=y.call(this,e,!1)},this):Object.keys(e).forEach(function(r){if("object"!==u(e[r]))t+=void 0!==h.registered[e[r]]?"".concat(r,"{").concat(h.registered[e[r]],"}"):"".concat(E(r),":").concat(w(r,e[r]),";");else{if("NO_COMPONENT_SELECTOR"===r&&"production"!==process.env.NODE_ENV)throw new Error("Component selectors can only be used in conjunction with pretty-lights/babel.");Array.isArray(e[r])&&"string"==typeof e[r][0]&&void 0===h.registered[e[r][0]]?e[r].forEach(function(e){t+="".concat(E(r),":").concat(w(r,e),";")}):t+="".concat(r,"{").concat(y.call(this,e[r],!1),"}")}},this),_.set(e,t),t}.call(this,e);default:var n=h.registered[e];return!1===t&&void 0!==n?n:e}}d.use(o.stylisPlugins)(p);var v,m,_=new WeakMap,O=/label:\s*([^\s;\n{]+)\s*;/g,N=function(e,r){return t(e+r)+r};if("production"!==process.env.NODE_ENV){var P=N,S=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g;N=function(e,t){return P(e.replace(S,function(e){return f=e,""}),t)}}var A=function(e){var t=arguments,r=!0,n="",o="";null==e||void 0===e.raw?(r=!1,n+=y.call(this,e,!1)):n+=e[0];for(var i=arguments.length,c=new Array(i>1?i-1:0),a=1;a<i;a++)c[a-1]=t[a];return c.forEach(function(t,o){n+=y.call(this,t,46===n.charCodeAt(n.length-1)),!0===r&&void 0!==e[o+1]&&(n+=e[o+1])},this),m=n,n=n.replace(O,function(e,t){return o+="-".concat(t),""}),v=N(n,o),n};if("production"!==process.env.NODE_ENV){var C=d;d=function(e,t){C(e,t),f=""}}function k(e,t){void 0===h.inserted[v]&&(a="",d(e,t),h.inserted[v]=a)}var T=function(){var e=A.apply(this,arguments),t="".concat(c,"-").concat(v);return void 0===h.registered[t]&&(h.registered[t]=m),k(".".concat(t),e),t};function x(e,t){var r=[],n=b(h.registered,r,e);return r.length<2?e:n+T(r,t)}function D(e){h.inserted[e]=!0}if(g){var R=document.querySelectorAll("style[data-lights-".concat(c,"]"));Array.prototype.forEach.call(R,function(e){e.getAttribute("data-lights-".concat(c)).split(" ").forEach(D),e.parentNode!==i&&i.appendChild(e)})}var V={css:T,cx:function(){for(var e=arguments,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=e[n];return x(function e(t){for(var r="",n=0;n<t.length;n+=1){var o=t[n];if(null!=o){var i=void 0;switch(u(o)){case"boolean":break;case"object":if(Array.isArray(o))i=e(o);else for(var c in i="",o)o[c]&&c&&(i&&(i+=" "),i+=c);break;default:i=o}i&&(r&&(r+=" "),r+=i)}}return r}(r))},injectGlobal:function(){k("",A.apply(this,arguments))},keyframes:function(){var e=A.apply(this,arguments),t="animation-".concat(v);return k("","@keyframes ".concat(t,"{").concat(e,"}")),t},hydrate:function(e){e.forEach(function(e){h.inserted[e]=!0})},flush:function(){h.inserted={},h.registered={},g&&l.flush()},sheet:l,caches:h,getRegisteredStyles:b,merge:x};return n.__SECRET_LIGHTS__=V,V}("undefined"!=typeof global?global:{}),G=function(e){var t=function(r,n){if("production"!==process.env.NODE_ENV&&void 0===r)throw new Error("You are trying to create a styled element with an undefined component.\nYou may have forgotten to import it.");var o,i,c,a;void 0!==n&&(o=n.e,i=n.label,c=n.target,a=r.__lights_forwardProp&&n.shouldForwardProp?function(e){return r.__lights_forwardProp(e)&&n.shouldForwardProp(e)}:n.shouldForwardProp);var u=r.__lights_real===r,f=void 0===o&&u&&r.__lights_base||r;return"function"!=typeof a&&(a="string"==typeof f&&f.charAt(0)===f.charAt(0).toLowerCase()?A:C),function(){var h=arguments,d=u&&void 0!==r.__lights_styles?r.__lights_styles.slice(0):[];if(void 0!==i&&d.push("label:".concat(i,";")),void 0===o)if(null==h[0]||void 0===h[0].raw)d.push.apply(d,h);else{d.push(h[0][0]);for(var y=h.length,g=1;g<y;g+=1)d.push(h[g],h[0][g])}var b=function(t){function r(){return l(this,r),!(e=v(r).apply(this,arguments))||"object"!=typeof e&&"function"!=typeof e?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this):e;var e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&m(e,t)}(r,s.Component),p(r,[{key:"render",value:function(){var t=this;return s.createElement(S.Consumer,null,function(r){var n=t.props;t.mergedProps=T(k,{},n,{theme:n.theme||r});var i="",u=[];return n.className&&(i+=void 0===o?e.getRegisteredStyles(e.caches.registered,u,n.className):"".concat(n.className," ")),i+=void 0===o?e.css.apply(t,d.concat(u)):o,void 0!==c&&(i+=" ".concat(c)),s.createElement(f,T(a,{},n,{className:i,ref:n.innerRef}))})}}]),r}();return b.displayName=void 0!==i?i:"Styled(".concat("string"==typeof f?f:f.displayName||f.name||"Component",")"),void 0!==r.defaultProps&&(b.defaultProps=r.defaultProps),b.__lights_styles=d,b.__lights_base=f,b.__lights_real=b,b.__lights_forwardProp=a,Object.defineProperty(b,"toString",{value:function(){return"production"!==process.env.NODE_ENV&&void 0===c?"NO_COMPONENT_SELECTOR":".".concat(c)}}),b.withComponent=function(e,r){return t(e,void 0!==r?T(k,{},n,r):n).apply(void 0,function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(o=d)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(o)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}());var o},b}};return"production"!==process.env.NODE_ENV&&"undefined"!=typeof Proxy&&(t=new Proxy(t,{get:function(e,t){switch(t){case"__proto__":case"name":case"prototype":case"displayName":return e[t];default:throw new Error("You're trying to use the styled shorthand without the pretty-lights/babel plugin."+"\nPlease add pretty-lights/babel to your Babel config or use the function call syntax(`styled('".concat(t,"')` instead of `styled.").concat(t,"`)"))}}})),t}(q),M=q.flush,F=q.hydrate,Y=q.cx,z=q.merge,H=q.getRegisteredStyles,$=q.injectGlobal,B=q.keyframes,W=q.css,U=q.sheet,Z=q.caches;export{M as flush,F as hydrate,Y as cx,z as merge,H as getRegisteredStyles,$ as injectGlobal,B as keyframes,W as css,U as sheet,Z as caches,S as ThemeContext,D as ThemeProvider,V as useTheme,R as withTheme,I as themeFn,G as styled};
//# sourceMappingURL=pretty-lights.modern.js.map
{
"name": "pretty-lights",
"version": "0.0.12-alpha.1",
"version": "0.0.12-alpha.2",
"description": "CSS-in-JS with a reliable API",

@@ -33,3 +33,3 @@ "main": "lib/pretty-lights.js",

"@emotion/hash": "0.7.3",
"@emotion/is-prop-valid": "0.8.3",
"@emotion/is-prop-valid": "0.8.5",
"@emotion/memoize": "0.7.3",

@@ -39,7 +39,7 @@ "@emotion/stylis": "0.8.4",

"@emotion/weak-memoize": "0.2.4",
"chalk": "2.4.2",
"convert-source-map": "1.6.0",
"chalk": "3.0.0",
"convert-source-map": "1.7.0",
"css": "2.2.4",
"find-root": "1.1.0",
"hoist-non-react-statics": "^3.3.0",
"hoist-non-react-statics": "^3.3.1",
"source-map": "0.7.3",

@@ -55,14 +55,14 @@ "stylis": "^3.5.4",

"devDependencies": {
"@babel/cli": "7.6.2",
"@babel/core": "7.6.2",
"@babel/plugin-proposal-class-properties": "7.5.5",
"@babel/preset-env": "7.6.2",
"@babel/preset-react": "7.6.3",
"@babel/cli": "7.7.7",
"@babel/core": "7.7.7",
"@babel/plugin-proposal-class-properties": "7.7.4",
"@babel/preset-env": "7.7.7",
"@babel/preset-react": "7.7.4",
"babel-check-duplicated-nodes": "1.0.0",
"babel-eslint": "10.0.1",
"babel-plugin-codegen": "3.0.0",
"babel-plugin-codegen": "3.1.0",
"cssjanus": "1.3.2",
"enzyme": "3.10.0",
"enzyme-adapter-react-16": "1.15.1",
"enzyme-to-json": "3.4.2",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
"enzyme-to-json": "3.4.3",
"eslint": "5.16.0",

@@ -84,9 +84,9 @@ "eslint-config-airbnb": "17.1.0",

"mkdirp": "0.5.1",
"polished": "3.4.1",
"polished": "3.4.2",
"prettier": "1.17.1",
"pretty-format": "24.9.0",
"prop-types": "^15.7.2",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-test-renderer": "16.10.2",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-test-renderer": "16.12.0",
"rimraf": "3.0.0",

@@ -97,7 +97,5 @@ "touch": "3.1.0"

"clean": "rimraf lib babel jest server",
"build:jest": "babel src/jest --ignore \"**/__tests__/**\" -d jest",
"build:babel": "babel src/babel --ignore \"**/__tests__/**\" -d babel",
"build:server": "babel src/server --ignore \"**/__tests__/**\" -d server",
"build:server": "babel src --only src/jest,src/babel,src/server --ignore \"**/__tests__/**\" -d .",
"build:main": "NODE_ENV=production microbundle --jsx React.createElement -f es,cjs",
"build:dev": "npm run clean && npm run build:jest && npm run build:babel && npm run build:server",
"build:dev": "npm run clean && npm run build:server",
"build": "npm run build:dev && npm run build:main",

@@ -108,4 +106,5 @@ "prepare": "npm run build",

"lint": "eslint .",
"lint-fix": "eslint . --fix"
"lint-fix": "eslint . --fix",
"publish:alpha": "npm publish --tag alpha"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc