styled-components 6.0.0-beta.12 → 6.0.0-beta.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.d.ts +0 -5
- package/dist/styled-components.browser.cjs.js +16 -13
- package/dist/styled-components.browser.cjs.js.map +1 -1
- package/dist/styled-components.browser.esm.js +16 -13
- package/dist/styled-components.browser.esm.js.map +1 -1
- package/dist/styled-components.cjs.js +14 -8
- package/dist/styled-components.cjs.js.map +1 -1
- package/dist/styled-components.esm.js +14 -8
- package/dist/styled-components.esm.js.map +1 -1
- package/dist/styled-components.js +16 -13
- package/dist/styled-components.js.map +1 -1
- package/dist/styled-components.min.js +1 -1
- package/dist/styled-components.min.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/native/dist/base.d.ts +0 -5
- package/native/dist/styled-components.native.cjs.js +1 -1
- package/native/dist/styled-components.native.esm.js +1 -1
- package/package.json +1 -12
|
@@ -18,7 +18,7 @@ var SC_ATTR = (typeof process !== 'undefined' && typeof process.env !== 'undefin
|
|
|
18
18
|
'data-styled';
|
|
19
19
|
var SC_ATTR_ACTIVE = 'active';
|
|
20
20
|
var SC_ATTR_VERSION = 'data-styled-version';
|
|
21
|
-
var SC_VERSION = "6.0.0-beta.
|
|
21
|
+
var SC_VERSION = "6.0.0-beta.13";
|
|
22
22
|
var SPLITTER = '/*!sc*/\n';
|
|
23
23
|
var IS_BROWSER = typeof undefined !== 'undefined' ;
|
|
24
24
|
var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'
|
|
@@ -1551,7 +1551,11 @@ function createStyledComponent(target, options, rules) {
|
|
|
1551
1551
|
checkDynamicCreation(displayName, styledComponentId);
|
|
1552
1552
|
WrappedStyledComponent.warnTooManyClasses = createWarnTooManyClasses(displayName, styledComponentId);
|
|
1553
1553
|
}
|
|
1554
|
-
|
|
1554
|
+
// If the Object prototype is frozen, the "toString" property is non-writable. This means that any objects which inherit this property
|
|
1555
|
+
// cannot have the property changed using an assignment. If using strict mode, attempting that will cause an error. If not using strict
|
|
1556
|
+
// mode, attempting that will be silently ignored.
|
|
1557
|
+
// However, we can still explicitly shadow the prototype's "toString" property by defining a new "toString" property on this object.
|
|
1558
|
+
Object.defineProperty(WrappedStyledComponent, 'toString', { value: function () { return ".".concat(WrappedStyledComponent.styledComponentId); } });
|
|
1555
1559
|
if (isCompositeComponent) {
|
|
1556
1560
|
var compositeComponentTarget = target;
|
|
1557
1561
|
hoistNonReactStatics(WrappedStyledComponent, compositeComponentTarget, {
|
|
@@ -1848,17 +1852,19 @@ var __PRIVATE__ = {
|
|
|
1848
1852
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1849
1853
|
typeof navigator !== 'undefined' &&
|
|
1850
1854
|
navigator.product === 'ReactNative') {
|
|
1851
|
-
console.warn("It looks like you've imported 'styled-components' on React Native.\
|
|
1852
|
-
"Perhaps you're looking to import 'styled-components/native'?\n" +
|
|
1853
|
-
'Read more about this at https://www.styled-components.com/docs/basics#react-native');
|
|
1855
|
+
console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");
|
|
1854
1856
|
}
|
|
1857
|
+
var windowGlobalKey = "__sc-".concat(SC_ATTR, "__");
|
|
1855
1858
|
/* Warning if there are several instances of styled-components */
|
|
1856
1859
|
if (process.env.NODE_ENV !== 'production' &&
|
|
1857
1860
|
process.env.NODE_ENV !== 'test' &&
|
|
1858
1861
|
typeof undefined !== 'undefined') {
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
+
// @ts-expect-error dynamic key not in undefined object
|
|
1863
|
+
undefined[windowGlobalKey] || (undefined[windowGlobalKey] = 0);
|
|
1864
|
+
// @ts-expect-error dynamic key not in undefined object
|
|
1865
|
+
if (undefined[windowGlobalKey] === 1) ;
|
|
1866
|
+
// @ts-expect-error dynamic key not in undefined object
|
|
1867
|
+
undefined[windowGlobalKey] += 1;
|
|
1862
1868
|
}
|
|
1863
1869
|
|
|
1864
1870
|
exports.ServerStyleSheet = ServerStyleSheet;
|