From 86e936b4e8849e9ed9bad87a50be46fcd9b255d7 Mon Sep 17 00:00:00 2001 From: Konstantin Tarkus Date: Thu, 22 Jul 2021 17:04:17 +0300 Subject: [PATCH] 5.2.0-beta.1 --- dist/StyleContext.js.map | 2 +- dist/index.js.map | 2 +- dist/insertCss.js.map | 2 +- dist/withStyles.js | 12 +++++++++++- dist/withStyles.js.map | 2 +- package.json | 4 ++-- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/dist/StyleContext.js.map b/dist/StyleContext.js.map index 48631e60..6471f3e4 100644 --- a/dist/StyleContext.js.map +++ b/dist/StyleContext.js.map @@ -1 +1 @@ -{"version":3,"file":"StyleContext.js","sources":["src/StyleContext.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport React from 'react'\n\nconst StyleContext = React.createContext({\n insertCss: null,\n})\n\nexport default StyleContext\n"],"names":["StyleContext","React","createContext","insertCss"],"mappings":";;;;;;AAWA,IAAMA,YAAY,GAAGC,KAAK,CAACC,aAAN,CAAoB;EACvCC,SAAS,EAAE;CADQ,CAArB;;;;"} \ No newline at end of file +{"version":3,"file":"StyleContext.js","sources":["src/StyleContext.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport React from 'react'\n\nconst StyleContext = React.createContext({\n insertCss: null,\n})\n\nexport default StyleContext\n"],"names":["StyleContext","React","createContext","insertCss"],"mappings":";;;;;;AAWA,IAAMA,YAAY,GAAGC,KAAK,CAACC,aAAN,CAAoB;AACvCC,EAAAA,SAAS,EAAE;AAD4B,CAApB,CAArB;;;;"} \ No newline at end of file diff --git a/dist/index.js.map b/dist/index.js.map index 696a40d4..36791111 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["src/index.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport { stringifyRequest } from 'loader-utils'\n\nmodule.exports = function loader() {}\nmodule.exports.pitch = function pitch(request) {\n if (this.cacheable) {\n this.cacheable()\n }\n\n const insertCss = require.resolve('./insertCss.js')\n return `\n var refs = 0;\n var css = require(${stringifyRequest(this, `!!${request}`)});\n var insertCss = require(${stringifyRequest(this, `!${insertCss}`)});\n var content = typeof css === 'string' ? [[module.id, css, '']] : css;\n\n exports = module.exports = css.locals || {};\n exports._getContent = function() { return content; };\n exports._getCss = function() { return '' + css; };\n exports._insertCss = function(options) { return insertCss(content, options) };\n\n // Hot Module Replacement\n // https://webpack.github.io/docs/hot-module-replacement\n // Only activated in browser context\n if (module.hot && typeof window !== 'undefined' && window.document) {\n var removeCss = function() {};\n module.hot.accept(${stringifyRequest(this, `!!${request}`)}, function() {\n css = require(${stringifyRequest(this, `!!${request}`)});\n content = typeof css === 'string' ? [[module.id, css, '']] : css;\n removeCss = insertCss(content, { replace: true });\n });\n module.hot.dispose(function() { removeCss(); });\n }\n `\n}\n"],"names":["module","exports","loader","pitch","request","cacheable","insertCss","require","resolve","stringifyRequest"],"mappings":";;;;;;AAWAA,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,GAAkB,EAAnC;;AACAF,MAAM,CAACC,OAAP,CAAeE,KAAf,GAAuB,SAASA,KAAT,CAAeC,OAAf,EAAwB;MACzC,KAAKC,SAAT,EAAoB;SACbA,SAAL;;;MAGIC,SAAS,GAAGC,OAAO,CAACC,OAAR,CAAgB,gBAAhB,CAAlB;;yDAGsBC,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAFtC,wCAG4BK,4BAAgB,CAAC,IAAD,QAAWH,SAAX,CAH5C,omBAgBwBG,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAhBxC,8CAiBsBK,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAjBtC;CANF"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["src/index.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport { stringifyRequest } from 'loader-utils'\n\nmodule.exports = function loader() {}\nmodule.exports.pitch = function pitch(request) {\n if (this.cacheable) {\n this.cacheable()\n }\n\n const insertCss = require.resolve('./insertCss.js')\n return `\n var refs = 0;\n var css = require(${stringifyRequest(this, `!!${request}`)});\n var insertCss = require(${stringifyRequest(this, `!${insertCss}`)});\n var content = typeof css === 'string' ? [[module.id, css, '']] : css;\n\n exports = module.exports = css.locals || {};\n exports._getContent = function() { return content; };\n exports._getCss = function() { return '' + css; };\n exports._insertCss = function(options) { return insertCss(content, options) };\n\n // Hot Module Replacement\n // https://webpack.github.io/docs/hot-module-replacement\n // Only activated in browser context\n if (module.hot && typeof window !== 'undefined' && window.document) {\n var removeCss = function() {};\n module.hot.accept(${stringifyRequest(this, `!!${request}`)}, function() {\n css = require(${stringifyRequest(this, `!!${request}`)});\n content = typeof css === 'string' ? [[module.id, css, '']] : css;\n removeCss = insertCss(content, { replace: true });\n });\n module.hot.dispose(function() { removeCss(); });\n }\n `\n}\n"],"names":["module","exports","loader","pitch","request","cacheable","insertCss","require","resolve","stringifyRequest"],"mappings":";;;;;;AAWAA,MAAM,CAACC,OAAP,GAAiB,SAASC,MAAT,GAAkB,EAAnC;;AACAF,MAAM,CAACC,OAAP,CAAeE,KAAf,GAAuB,SAASA,KAAT,CAAeC,OAAf,EAAwB;AAC7C,MAAI,KAAKC,SAAT,EAAoB;AAClB,SAAKA,SAAL;AACD;;AAED,MAAMC,SAAS,GAAGC,OAAO,CAACC,OAAR,CAAgB,gBAAhB,CAAlB;;AACA,yDAEsBC,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAFtC,wCAG4BK,4BAAgB,CAAC,IAAD,QAAWH,SAAX,CAH5C,omBAgBwBG,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAhBxC,8CAiBsBK,4BAAgB,CAAC,IAAD,SAAYL,OAAZ,CAjBtC;AAwBD,CA9BD"} \ No newline at end of file diff --git a/dist/insertCss.js.map b/dist/insertCss.js.map index 9f2580e0..651f624b 100644 --- a/dist/insertCss.js.map +++ b/dist/insertCss.js.map @@ -1 +1 @@ -{"version":3,"file":"insertCss.js","sources":["src/insertCss.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nconst inserted = {}\n\n// Base64 encoding and decoding - The \"Unicode Problem\"\n// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\nfunction b64EncodeUnicode(str) {\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>\n String.fromCharCode(`0x${p1}`),\n ),\n )\n}\n\n/**\n * Remove style/link elements for specified node IDs\n * if they are no longer referenced by UI components.\n */\nfunction removeCss(ids) {\n ids.forEach((id) => {\n if (--inserted[id] <= 0) {\n const elem = document.getElementById(id)\n if (elem) {\n elem.parentNode.removeChild(elem)\n }\n }\n })\n}\n\n/**\n * Example:\n * // Insert CSS styles object generated by `css-loader` into DOM\n * var removeCss = insertCss([[1, 'body { color: red; }']]);\n *\n * // Remove it from the DOM\n * removeCss();\n */\nfunction insertCss(styles, { replace = false, prepend = false, prefix = 's' } = {}) {\n const ids = []\n for (let i = 0; i < styles.length; i++) {\n const [moduleId, css, media, sourceMap] = styles[i]\n const id = `${prefix}${moduleId}-${i}`\n\n ids.push(id)\n\n if (inserted[id]) {\n if (!replace) {\n inserted[id]++\n continue\n }\n }\n\n inserted[id] = 1\n\n let elem = document.getElementById(id)\n let create = false\n\n if (!elem) {\n create = true\n\n elem = document.createElement('style')\n elem.setAttribute('type', 'text/css')\n elem.id = id\n\n if (media) {\n elem.setAttribute('media', media)\n }\n }\n\n let cssText = css\n if (sourceMap && typeof btoa === 'function') {\n // skip IE9 and below, see http://caniuse.com/atob-btoa\n cssText += `\\n/*# sourceMappingURL=data:application/json;base64,${b64EncodeUnicode(\n JSON.stringify(sourceMap),\n )}*/`\n cssText += `\\n/*# sourceURL=${sourceMap.file}?${id}*/`\n }\n\n if ('textContent' in elem) {\n elem.textContent = cssText\n } else {\n elem.styleSheet.cssText = cssText\n }\n\n if (create) {\n if (prepend) {\n document.head.insertBefore(elem, document.head.childNodes[0])\n } else {\n document.head.appendChild(elem)\n }\n }\n }\n\n return removeCss.bind(null, ids)\n}\n\nmodule.exports = insertCss\n"],"names":["inserted","b64EncodeUnicode","str","btoa","encodeURIComponent","replace","match","p1","String","fromCharCode","removeCss","ids","forEach","id","elem","document","getElementById","parentNode","removeChild","insertCss","styles","prepend","prefix","i","length","moduleId","css","media","sourceMap","push","create","createElement","setAttribute","cssText","JSON","stringify","file","textContent","styleSheet","head","insertBefore","childNodes","appendChild","bind","module","exports"],"mappings":";;;;AASA,IAAMA,QAAQ,GAAG,EAAjB;;AAIA,SAASC,gBAAT,CAA0BC,GAA1B,EAA+B;SACtBC,IAAI,CACTC,kBAAkB,CAACF,GAAD,CAAlB,CAAwBG,OAAxB,CAAgC,iBAAhC,EAAmD,UAACC,KAAD,EAAQC,EAAR;WACjDC,MAAM,CAACC,YAAP,QAAyBF,EAAzB,CADiD;GAAnD,CADS,CAAX;;;AAWF,SAASG,SAAT,CAAmBC,GAAnB,EAAwB;EACtBA,GAAG,CAACC,OAAJ,CAAY,UAACC,EAAD,EAAQ;QACd,EAAEb,QAAQ,CAACa,EAAD,CAAV,IAAkB,CAAtB,EAAyB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zB,IAAP,KAAgB,UAAjC,EAA6C;MAE3C8B,OAAO,6DAA2DhC,gBAAgB,CAChFiC,IAAI,CAACC,SAAL,CAAeP,SAAf,CADgF,CAA3E,OAAP;MAGAK,OAAO,yBAAuBL,SAAS,CAACQ,IAAjC,SAAyCvB,EAAzC,OAAP;;;QAGE,iBAAiBC,IAArB,EAA2B;MACzBA,IAAI,CAACuB,WAAL,GAAmBJ,OAAnB;KADF,MAEO;MACLnB,IAAI,CAACwB,UAAL,CAAgBL,OAAhB,GAA0BA,OAA1B;;;QAGEH,MAAJ,EAAY;UACNT,OAAJ,EAAa;QACXN,QAAQ,CAACwB,IAAT,CAAcC,YAAd,CAA2B1B,IAA3B,EAAiCC,QAAQ,CAACwB,IAAT,CAAcE,UAAd,CAAyB,CAAzB,CAAjC;OADF,MAEO;QACL1B,QAAQ,CAACwB,IAAT,CAAcG,WAAd,CAA0B5B,IAA1B;;;;;SAKCJ,SAAS,CAACiC,IAAV,CAAe,IAAf,EAAqBhC,GAArB,CAAP;;;AAGFiC,MAAM,CAACC,OAAP,GAAiB1B,SAAjB"} \ No newline at end of file +{"version":3,"file":"insertCss.js","sources":["src/insertCss.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nconst inserted = {}\n\n// Base64 encoding and decoding - The \"Unicode Problem\"\n// https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\nfunction b64EncodeUnicode(str) {\n return btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) =>\n String.fromCharCode(`0x${p1}`),\n ),\n )\n}\n\n/**\n * Remove style/link elements for specified node IDs\n * if they are no longer referenced by UI components.\n */\nfunction removeCss(ids) {\n ids.forEach((id) => {\n if (--inserted[id] <= 0) {\n const elem = document.getElementById(id)\n if (elem) {\n elem.parentNode.removeChild(elem)\n }\n }\n })\n}\n\n/**\n * Example:\n * // Insert CSS styles object generated by `css-loader` into DOM\n * var removeCss = insertCss([[1, 'body { color: red; }']]);\n *\n * // Remove it from the DOM\n * removeCss();\n */\nfunction insertCss(styles, { replace = false, prepend = false, prefix = 's' } = {}) {\n const ids = []\n for (let i = 0; i < styles.length; i++) {\n const [moduleId, css, media, sourceMap] = styles[i]\n const id = `${prefix}${moduleId}-${i}`\n\n ids.push(id)\n\n if (inserted[id]) {\n if (!replace) {\n inserted[id]++\n continue\n }\n }\n\n inserted[id] = 1\n\n let elem = document.getElementById(id)\n let create = false\n\n if (!elem) {\n create = true\n\n elem = document.createElement('style')\n elem.setAttribute('type', 'text/css')\n elem.id = id\n\n if (media) {\n elem.setAttribute('media', media)\n }\n }\n\n let cssText = css\n if (sourceMap && typeof btoa === 'function') {\n // skip IE9 and below, see http://caniuse.com/atob-btoa\n cssText += `\\n/*# sourceMappingURL=data:application/json;base64,${b64EncodeUnicode(\n JSON.stringify(sourceMap),\n )}*/`\n cssText += `\\n/*# sourceURL=${sourceMap.file}?${id}*/`\n }\n\n if ('textContent' in elem) {\n elem.textContent = cssText\n } else {\n elem.styleSheet.cssText = cssText\n }\n\n if (create) {\n if (prepend) {\n document.head.insertBefore(elem, document.head.childNodes[0])\n } else {\n document.head.appendChild(elem)\n }\n }\n }\n\n return removeCss.bind(null, ids)\n}\n\nmodule.exports = insertCss\n"],"names":["inserted","b64EncodeUnicode","str","btoa","encodeURIComponent","replace","match","p1","String","fromCharCode","removeCss","ids","forEach","id","elem","document","getElementById","parentNode","removeChild","insertCss","styles","prepend","prefix","i","length","moduleId","css","media","sourceMap","push","create","createElement","setAttribute","cssText","JSON","stringify","file","textContent","styleSheet","head","insertBefore","childNodes","appendChild","bind","module","exports"],"mappings":";;;;AASA,IAAMA,QAAQ,GAAG,EAAjB;;AAIA,SAASC,gBAAT,CAA0BC,GAA1B,EAA+B;AAC7B,SAAOC,IAAI,CACTC,k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IAA1B;AACD;AACF;AACF;;AAED,SAAOJ,SAAS,CAACiC,IAAV,CAAe,IAAf,EAAqBhC,GAArB,CAAP;AACD;;AAEDiC,MAAM,CAACC,OAAP,GAAiB1B,SAAjB"} \ No newline at end of file diff --git a/dist/withStyles.js b/dist/withStyles.js index 8489f5d4..117efd0a 100644 --- a/dist/withStyles.js +++ b/dist/withStyles.js @@ -9,7 +9,17 @@ var StyleContext = require('./StyleContext.js'); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; - subClass.__proto__ = superClass; + + _setPrototypeOf(subClass, superClass); +} + +function _setPrototypeOf(o, p) { + _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { + o.__proto__ = p; + return o; + }; + + return _setPrototypeOf(o, p); } function withStyles() { diff --git a/dist/withStyles.js.map b/dist/withStyles.js.map index 758445f7..f6afd9b8 100644 --- a/dist/withStyles.js.map +++ b/dist/withStyles.js.map @@ -1 +1 @@ -{"version":3,"file":"withStyles.js","sources":["src/withStyles.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport React from 'react'\nimport hoistStatics from 'hoist-non-react-statics'\n\nimport StyleContext from './StyleContext'\n\nfunction withStyles(...styles) {\n return function wrapWithStyles(ComposedComponent) {\n class WithStyles extends React.PureComponent {\n constructor(props, context) {\n super(props, context)\n this.removeCss = context.insertCss(...styles)\n }\n\n componentWillUnmount() {\n if (this.removeCss) {\n setTimeout(this.removeCss, 0)\n }\n }\n\n render() {\n return \n }\n }\n\n const displayName = ComposedComponent.displayName || ComposedComponent.name || 'Component'\n\n WithStyles.displayName = `WithStyles(${displayName})`\n WithStyles.contextType = StyleContext\n WithStyles.ComposedComponent = ComposedComponent\n\n return hoistStatics(WithStyles, ComposedComponent)\n }\n}\n\nexport default withStyles\n"],"names":["withStyles","styles","wrapWithStyles","ComposedComponent","WithStyles","props","context","removeCss","insertCss","componentWillUnmount","setTimeout","render","React","PureComponent","displayName","name","contextType","StyleContext","hoistStatics"],"mappings":";;;;;;;;;;;;;;AAcA,SAASA,UAAT,GAA+B;oCAARC,MAAQ;IAARA,MAAQ;;;SACtB,SAASC,cAAT,CAAwBC,iBAAxB,EAA2C;QAC1CC,UAD0C;;;0BAElCC,KAAZ,EAAmBC,OAAnB,EAA4B;;;gDACpBD,KAAN,EAAaC,OAAb;cACKC,SAAL,GAAiBD,OAAO,CAACE,SAAR,OAAAF,OAAO,EAAcL,MAAd,CAAxB;;;;;;aAGFQ,oBAP8C,GAO9C,gCAAuB;YACjB,KAAKF,SAAT,EAAoB;UAClBG,UAAU,CAAC,KAAKH,SAAN,EAAiB,CAAjB,CAAV;;OAT0C;;aAa9CI,MAb8C,GAa9C,kBAAS;eACA,oBAAC,iBAAD,EAAuB,KAAKN,KAA5B,CAAP;OAd4C;;;MACvBO,KAAK,CAACC,aADiB;;QAkB1CC,WAAW,GAAGX,iBAAiB,CAACW,WAAlB,IAAiCX,iBAAiB,CAACY,IAAnD,IAA2D,WAA/E;IAEAX,UAAU,CAACU,WAAX,mBAAuCA,WAAvC;IACAV,UAAU,CAACY,WAAX,GAAyBC,YAAzB;IACAb,UAAU,CAACD,iBAAX,GAA+BA,iBAA/B;WAEOe,YAAY,CAACd,UAAD,EAAaD,iBAAb,CAAnB;GAxBF;;;;;"} \ No newline at end of file +{"version":3,"file":"withStyles.js","sources":["src/withStyles.js"],"sourcesContent":["/**\n * Isomorphic CSS style loader for Webpack\n *\n * Copyright © 2015-present Kriasoft, LLC. All rights reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.txt file in the root directory of this source tree.\n */\n\nimport React from 'react'\nimport hoistStatics from 'hoist-non-react-statics'\n\nimport StyleContext from './StyleContext'\n\nfunction withStyles(...styles) {\n return function wrapWithStyles(ComposedComponent) {\n class WithStyles extends React.PureComponent {\n constructor(props, context) {\n super(props, context)\n this.removeCss = context.insertCss(...styles)\n }\n\n componentWillUnmount() {\n if (this.removeCss) {\n setTimeout(this.removeCss, 0)\n }\n }\n\n render() {\n return \n }\n }\n\n const displayName = ComposedComponent.displayName || ComposedComponent.name || 'Component'\n\n WithStyles.displayName = `WithStyles(${displayName})`\n WithStyles.contextType = StyleContext\n WithStyles.ComposedComponent = ComposedComponent\n\n return hoistStatics(WithStyles, ComposedComponent)\n }\n}\n\nexport default withStyles\n"],"names":["withStyles","styles","wrapWithStyles","ComposedComponent","WithStyles","props","context","removeCss","insertCss","componentWillUnmount","setTimeout","render","React","PureComponent","displayName","name","contextType","StyleContext","hoistStatics"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAcA,SAASA,UAAT,GAA+B;AAAA,oCAARC,MAAQ;AAARA,IAAAA,MAAQ;AAAA;;AAC7B,SAAO,SAASC,cAAT,CAAwBC,iBAAxB,EAA2C;AAAA,QAC1CC,UAD0C;AAAA;;AAE9C,0BAAYC,KAAZ,EAAmBC,OAAnB,EAA4B;AAAA;;AAC1B,gDAAMD,KAAN,EAAaC,OAAb;AACA,cAAKC,SAAL,GAAiBD,OAAO,CAACE,SAAR,OAAAF,OAAO,EAAcL,MAAd,CAAxB;AAF0B;AAG3B;;AAL6C;;AAAA,aAO9CQ,oBAP8C,GAO9C,gCAAuB;AACrB,YAAI,KAAKF,SAAT,EAAoB;AAClBG,UAAAA,UAAU,CAAC,KAAKH,SAAN,EAAiB,CAAjB,CAAV;AACD;AACF,OAX6C;;AAAA,aAa9CI,MAb8C,GAa9C,kBAAS;AACP,eAAO,oBAAC,iBAAD,EAAuB,KAAKN,KAA5B,CAAP;AACD,OAf6C;;AAAA;AAAA,MACvBO,KAAK,CAACC,aADiB;;AAkBhD,QAAMC,WAAW,GAAGX,iBAAiB,CAACW,WAAlB,IAAiCX,iBAAiB,CAACY,IAAnD,IAA2D,WAA/E;AAEAX,IAAAA,UAAU,CAACU,WAAX,mBAAuCA,WAAvC;AACAV,IAAAA,UAAU,CAACY,WAAX,GAAyBC,YAAzB;AACAb,IAAAA,UAAU,CAACD,iBAAX,GAA+BA,iBAA/B;AAEA,WAAOe,YAAY,CAACd,UAAD,EAAaD,iBAAb,CAAnB;AACD,GAzBD;AA0BD;;;;"} \ No newline at end of file diff --git a/package.json b/package.json index b15f0362..0c53feb5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "isomorphic-style-loader", - "version": "5.1.0", + "version": "5.2.0-beta.1", "description": "CSS style loader for Webpack optimized for critical path CSS rendering and isomoprhic web apps", "repository": "kriasoft/isomorphic-style-loader", "author": "Kriasoft (https://www.kriasoft.com)", @@ -57,7 +57,7 @@ "jest": "^24.1.0", "prettier": "^1.16.4", "prop-types": "^15.7.2", - "react": "^16.3.0", + "react": "^16.8.2", "react-dom": "^16.8.2", "rollup": "^1.2.1", "rollup-plugin-babel": "^4.3.2",