styled-components 5.0.0-testgrouplimit.0 → 5.1.0

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.
@@ -1,5 +1,5 @@
1
1
  import transformDeclPairs from 'css-to-react-native';
2
- import { isElement, isValidElementType } from 'react-is';
2
+ import { typeOf, isElement, isValidElementType } from 'react-is';
3
3
  import React, { useContext, useMemo, createElement, Component } from 'react';
4
4
  import 'shallowequal';
5
5
  import Stylis from '@emotion/stylis';
@@ -80,7 +80,7 @@ function isStatelessFunction(test) {
80
80
 
81
81
  //
82
82
  var isPlainObject = (function (x) {
83
- return typeof x === 'object' && x.constructor === Object;
83
+ return x !== null && typeof x === 'object' && (x.toString ? x.toString() : Object.prototype.toString.call(x)) === '[object Object]' && !typeOf(x);
84
84
  });
85
85
 
86
86
  //
@@ -147,7 +147,8 @@ function _objectWithoutPropertiesLoose(source, excluded) {
147
147
  var SC_ATTR = typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || 'data-styled';
148
148
  var SC_ATTR_ACTIVE = 'active';
149
149
  var SC_ATTR_VERSION = 'data-styled-version';
150
- var SC_VERSION = "5.0.0-testgrouplimit.0";
150
+ var SC_VERSION = "5.1.0";
151
+ var SPLITTER = '/*!sc*/\n';
151
152
  var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
152
153
  var DISABLE_SPEEDY = typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY || typeof process !== 'undefined' && (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY) || process.env.NODE_ENV !== 'production'; // Shared empty execution context when generating static styles
153
154
 
@@ -289,9 +290,7 @@ var makeTag = function makeTag(_ref) {
289
290
  return new TextTag(target);
290
291
  }
291
292
  };
292
- var CSSOMTag =
293
- /*#__PURE__*/
294
- function () {
293
+ var CSSOMTag = /*#__PURE__*/function () {
295
294
  function CSSOMTag(target) {
296
295
  var element = this.element = makeStyleTag(target); // Avoid Edge bug where empty style elements don't create sheets
297
296
 
@@ -331,9 +330,7 @@ function () {
331
330
  }();
332
331
  /** A Tag that emulates the CSSStyleSheet API but uses text nodes */
333
332
 
334
- var TextTag =
335
- /*#__PURE__*/
336
- function () {
333
+ var TextTag = /*#__PURE__*/function () {
337
334
  function TextTag(target) {
338
335
  var element = this.element = makeStyleTag(target);
339
336
  this.nodes = element.childNodes;
@@ -371,9 +368,7 @@ function () {
371
368
  }();
372
369
  /** A completely virtual (server-side) Tag that doesn't manipulate the DOM */
373
370
 
374
- var VirtualTag =
375
- /*#__PURE__*/
376
- function () {
371
+ var VirtualTag = /*#__PURE__*/function () {
377
372
  function VirtualTag(_target) {
378
373
  this.rules = [];
379
374
  this.length = 0;
@@ -415,9 +410,7 @@ var makeGroupedTag = function makeGroupedTag(tag) {
415
410
  };
416
411
  var BASE_SIZE = 1 << 9;
417
412
 
418
- var DefaultGroupedTag =
419
- /*#__PURE__*/
420
- function () {
413
+ var DefaultGroupedTag = /*#__PURE__*/function () {
421
414
  function DefaultGroupedTag(tag) {
422
415
  this.groupSizes = new Uint32Array(BASE_SIZE);
423
416
  this.length = BASE_SIZE;
@@ -494,7 +487,7 @@ function () {
494
487
  var endIndex = startIndex + length;
495
488
 
496
489
  for (var i = startIndex; i < endIndex; i++) {
497
- css += this.tag.getRule(i) + "\n";
490
+ css += "" + this.tag.getRule(i) + SPLITTER;
498
491
  }
499
492
 
500
493
  return css;
@@ -537,8 +530,7 @@ var setGroupForId = function setGroupForId(id, group) {
537
530
 
538
531
  //
539
532
  var SELECTOR = "style[" + SC_ATTR + "][" + SC_ATTR_VERSION + "=\"" + SC_VERSION + "\"]";
540
- var RULE_RE = /(?:\s*)?(.*?){((?:{[^}]*}|(?!{).*?)*)}/g;
541
- var MARKER_RE = new RegExp("^" + SC_ATTR + "\\.g(\\d+)\\[id=\"([\\w\\d-]+)\"\\]");
533
+ var MARKER_RE = new RegExp("^" + SC_ATTR + "\\.g(\\d+)\\[id=\"([\\w\\d-]+)\"\\].*?\"([^\"]*)");
542
534
  var outputSheet = function outputSheet(sheet) {
543
535
  var tag = sheet.getTag();
544
536
  var length = tag.length;
@@ -563,7 +555,7 @@ var outputSheet = function outputSheet(sheet) {
563
555
  // after the actual rules to simplify the rehydration
564
556
 
565
557
 
566
- css += "" + rules + selector + "{content:\"" + content + "\"}\n";
558
+ css += "" + rules + selector + "{content:\"" + content + "\"}" + SPLITTER;
567
559
  }
568
560
 
569
561
  return css;
@@ -582,13 +574,13 @@ var rehydrateNamesFromContent = function rehydrateNamesFromContent(sheet, id, co
582
574
  };
583
575
 
584
576
  var rehydrateSheetFromTag = function rehydrateSheetFromTag(sheet, style) {
585
- var rawHTML = style.innerHTML;
577
+ var parts = style.innerHTML.split(SPLITTER);
586
578
  var rules = [];
587
- var parts; // parts = [match, selector, content]
588
- // eslint-disable-next-line no-cond-assign
589
579
 
590
- while (parts = RULE_RE.exec(rawHTML)) {
591
- var marker = parts[1].match(MARKER_RE);
580
+ for (var i = 0, l = parts.length; i < l; i++) {
581
+ var part = parts[i].trim();
582
+ if (!part) continue;
583
+ var marker = part.match(MARKER_RE);
592
584
 
593
585
  if (marker) {
594
586
  var group = parseInt(marker[1], 10) | 0;
@@ -599,13 +591,13 @@ var rehydrateSheetFromTag = function rehydrateSheetFromTag(sheet, style) {
599
591
  setGroupForId(id, group); // Rehydrate names and rules
600
592
  // looks like: data-styled.g11[id="idA"]{content:"nameA,"}
601
593
 
602
- rehydrateNamesFromContent(sheet, id, parts[2].split('"')[1]);
594
+ rehydrateNamesFromContent(sheet, id, marker[3]);
603
595
  sheet.getTag().insertRules(group, rules);
604
596
  }
605
597
 
606
598
  rules.length = 0;
607
599
  } else {
608
- rules.push(parts[0].trim());
600
+ rules.push(part);
609
601
  }
610
602
  }
611
603
  };
@@ -633,9 +625,7 @@ var defaultOptions = {
633
625
  };
634
626
  /** Contains the main stylesheet logic for stringification and caching */
635
627
 
636
- var StyleSheet =
637
- /*#__PURE__*/
638
- function () {
628
+ var StyleSheet = /*#__PURE__*/function () {
639
629
  /** Register a group ID to give it an index */
640
630
  StyleSheet.registerId = function registerId(id) {
641
631
  return getGroupForId(id);
@@ -906,9 +896,7 @@ var masterStylis = createStylisInstance();
906
896
 
907
897
  //
908
898
 
909
- var Keyframes =
910
- /*#__PURE__*/
911
- function () {
899
+ var Keyframes = /*#__PURE__*/function () {
912
900
  function Keyframes(name, stringifyArgs) {
913
901
  var _this = this;
914
902
 
@@ -1413,9 +1401,7 @@ function terminalHighlight(css) {
1413
1401
  * throw node.error('Unknown variable', { plugin: 'postcss-vars' });
1414
1402
  */
1415
1403
 
1416
- var CssSyntaxError =
1417
- /*#__PURE__*/
1418
- function () {
1404
+ var CssSyntaxError = /*#__PURE__*/function () {
1419
1405
  /**
1420
1406
  * @param {string} message - error message
1421
1407
  * @param {number} [line] - source line of the error
@@ -1639,9 +1625,7 @@ function capitalize(str) {
1639
1625
  return str[0].toUpperCase() + str.slice(1);
1640
1626
  }
1641
1627
 
1642
- var Stringifier =
1643
- /*#__PURE__*/
1644
- function () {
1628
+ var Stringifier = /*#__PURE__*/function () {
1645
1629
  function Stringifier(builder) {
1646
1630
  this.builder = builder;
1647
1631
  }
@@ -2016,9 +2000,7 @@ var cloneNode = function cloneNode(obj, parent) {
2016
2000
  */
2017
2001
 
2018
2002
 
2019
- var Node =
2020
- /*#__PURE__*/
2021
- function () {
2003
+ var Node = /*#__PURE__*/function () {
2022
2004
  /**
2023
2005
  * @param {object} [defaults] - value for node properties
2024
2006
  */
@@ -2623,9 +2605,7 @@ function () {
2623
2605
  * decl.toString() //=> ' color: black'
2624
2606
  */
2625
2607
 
2626
- var Declaration =
2627
- /*#__PURE__*/
2628
- function (_Node) {
2608
+ var Declaration = /*#__PURE__*/function (_Node) {
2629
2609
  _inheritsLoose(Declaration, _Node);
2630
2610
 
2631
2611
  function Declaration(defaults) {
@@ -2727,9 +2707,7 @@ function (_Node) {
2727
2707
  * @extends Node
2728
2708
  */
2729
2709
 
2730
- var Comment =
2731
- /*#__PURE__*/
2732
- function (_Node) {
2710
+ var Comment = /*#__PURE__*/function (_Node) {
2733
2711
  _inheritsLoose(Comment, _Node);
2734
2712
 
2735
2713
  function Comment(defaults) {
@@ -2785,9 +2763,7 @@ function (_Node) {
2785
2763
 
2786
2764
  //
2787
2765
 
2788
- var Parser =
2789
- /*#__PURE__*/
2790
- function () {
2766
+ var Parser = /*#__PURE__*/function () {
2791
2767
  function Parser(input) {
2792
2768
  this.input = input;
2793
2769
  this.pos = 0;
@@ -3372,9 +3348,7 @@ function cleanSource(nodes) {
3372
3348
  */
3373
3349
 
3374
3350
 
3375
- var Container =
3376
- /*#__PURE__*/
3377
- function (_Node) {
3351
+ var Container = /*#__PURE__*/function (_Node) {
3378
3352
  _inheritsLoose(Container, _Node);
3379
3353
 
3380
3354
  function Container() {
@@ -4153,9 +4127,7 @@ function (_Node) {
4153
4127
  * media.nodes //=> []
4154
4128
  */
4155
4129
 
4156
- var AtRule =
4157
- /*#__PURE__*/
4158
- function (_Container) {
4130
+ var AtRule = /*#__PURE__*/function (_Container) {
4159
4131
  _inheritsLoose(AtRule, _Container);
4160
4132
 
4161
4133
  function AtRule(defaults) {
@@ -4371,9 +4343,7 @@ var list = {
4371
4343
  * rule.toString() //=> 'a{}'
4372
4344
  */
4373
4345
 
4374
- var Rule =
4375
- /*#__PURE__*/
4376
- function (_Container) {
4346
+ var Rule = /*#__PURE__*/function (_Container) {
4377
4347
  _inheritsLoose(Rule, _Container);
4378
4348
 
4379
4349
  function Rule(defaults) {
@@ -4476,9 +4446,7 @@ function (_Container) {
4476
4446
  * decl.warn(result, 'Avoid !important', { word: '!important' });
4477
4447
  * }
4478
4448
  */
4479
- var Warning =
4480
- /*#__PURE__*/
4481
- function () {
4449
+ var Warning = /*#__PURE__*/function () {
4482
4450
  /**
4483
4451
  * @param {string} text - warning message
4484
4452
  * @param {Object} [opts] - warning options
@@ -4607,9 +4575,7 @@ function () {
4607
4575
  * var result2 = postcss.parse(css).toResult();
4608
4576
  */
4609
4577
 
4610
- var Result =
4611
- /*#__PURE__*/
4612
- function () {
4578
+ var Result = /*#__PURE__*/function () {
4613
4579
  /**
4614
4580
  * @param {Processor} processor - processor used for this transformation.
4615
4581
  * @param {Root} root - Root node after all transformations.
@@ -4801,9 +4767,7 @@ function isPromise(obj) {
4801
4767
  */
4802
4768
 
4803
4769
 
4804
- var LazyResult =
4805
- /*#__PURE__*/
4806
- function () {
4770
+ var LazyResult = /*#__PURE__*/function () {
4807
4771
  function LazyResult(processor, css, opts) {
4808
4772
  this.stringified = false;
4809
4773
  this.processed = false;
@@ -5249,9 +5213,7 @@ function () {
5249
5213
  * processor.process(css2).then(result => console.log(result.css));
5250
5214
  */
5251
5215
 
5252
- var Processor =
5253
- /*#__PURE__*/
5254
- function () {
5216
+ var Processor = /*#__PURE__*/function () {
5255
5217
  /**
5256
5218
  * @param {Array.<Plugin|pluginFunction>|Processor} plugins - PostCSS
5257
5219
  * plugins. See {@link Processor#use} for plugin format.
@@ -5379,9 +5341,7 @@ function () {
5379
5341
  * root.nodes.length //=> 2
5380
5342
  */
5381
5343
 
5382
- var Root =
5383
- /*#__PURE__*/
5384
- function (_Container) {
5344
+ var Root = /*#__PURE__*/function (_Container) {
5385
5345
  _inheritsLoose(Root, _Container);
5386
5346
 
5387
5347
  function Root(defaults) {
@@ -5493,9 +5453,7 @@ var sequence = 0;
5493
5453
  * const input = root.source.input;
5494
5454
  */
5495
5455
 
5496
- var Input =
5497
- /*#__PURE__*/
5498
- function () {
5456
+ var Input = /*#__PURE__*/function () {
5499
5457
  /**
5500
5458
  * @param {string} css - input CSS source
5501
5459
  * @param {object} [opts] - {@link Processor#process} options
@@ -5658,9 +5616,7 @@ function () {
5658
5616
  return Input;
5659
5617
  }();
5660
5618
 
5661
- var SafeParser =
5662
- /*#__PURE__*/
5663
- function (_Parser) {
5619
+ var SafeParser = /*#__PURE__*/function (_Parser) {
5664
5620
  _inheritsLoose(SafeParser, _Parser);
5665
5621
 
5666
5622
  function SafeParser() {
@@ -5770,9 +5726,7 @@ var generated = {};
5770
5726
  */
5771
5727
 
5772
5728
  var _InlineStyle = (function (styleSheet) {
5773
- var InlineStyle =
5774
- /*#__PURE__*/
5775
- function () {
5729
+ var InlineStyle = /*#__PURE__*/function () {
5776
5730
  function InlineStyle(rules) {
5777
5731
  this.rules = rules;
5778
5732
  }
@@ -5939,16 +5893,14 @@ function ThemeProvider(props) {
5939
5893
  return null;
5940
5894
  }
5941
5895
 
5942
- return React.createElement(ThemeContext.Provider, {
5896
+ return /*#__PURE__*/React.createElement(ThemeContext.Provider, {
5943
5897
  value: themeContext
5944
5898
  }, props.children);
5945
5899
  }
5946
5900
 
5947
5901
  // if the user makes use of ThemeProvider or StyleSheetManager things will break.
5948
5902
 
5949
- var StyledNativeComponent =
5950
- /*#__PURE__*/
5951
- function (_Component) {
5903
+ var StyledNativeComponent = /*#__PURE__*/function (_Component) {
5952
5904
  _inheritsLoose(StyledNativeComponent, _Component);
5953
5905
 
5954
5906
  function StyledNativeComponent() {
@@ -5968,28 +5920,38 @@ function (_Component) {
5968
5920
  _proto.render = function render() {
5969
5921
  var _this2 = this;
5970
5922
 
5971
- return React.createElement(ThemeConsumer, null, function (theme) {
5923
+ return /*#__PURE__*/React.createElement(ThemeConsumer, null, function (theme) {
5972
5924
  var _this2$props = _this2.props,
5925
+ transientAsProp = _this2$props.$as,
5973
5926
  renderAs = _this2$props.as,
5974
5927
  forwardedComponent = _this2$props.forwardedComponent,
5975
5928
  forwardedAs = _this2$props.forwardedAs,
5976
5929
  forwardedRef = _this2$props.forwardedRef,
5977
5930
  _this2$props$style = _this2$props.style,
5978
5931
  style = _this2$props$style === void 0 ? [] : _this2$props$style,
5979
- props = _objectWithoutPropertiesLoose(_this2$props, ["as", "forwardedComponent", "forwardedAs", "forwardedRef", "style"]);
5932
+ props = _objectWithoutPropertiesLoose(_this2$props, ["$as", "as", "forwardedComponent", "forwardedAs", "forwardedRef", "style"]);
5980
5933
 
5981
5934
  var defaultProps = forwardedComponent.defaultProps,
5982
5935
  target = forwardedComponent.target;
5936
+ var elementToBeRendered = _this2.attrs.$as || _this2.attrs.as || transientAsProp || renderAs || target;
5983
5937
 
5984
5938
  var generatedStyles = _this2.generateAndInjectStyles(determineTheme(_this2.props, theme, defaultProps) || EMPTY_OBJECT, _this2.props);
5985
5939
 
5986
- var propsForElement = _extends({}, props, {}, _this2.attrs, {
5987
- style: [generatedStyles].concat(style)
5988
- });
5940
+ var propsForElement = {};
5941
+ var key;
5942
+
5943
+ for (key in props) {
5944
+ if (key[0] !== '$') propsForElement[key] = props[key];
5945
+ }
5946
+
5947
+ for (key in _this2.attrs) {
5948
+ if (key[0] !== '$') propsForElement[key] = _this2.attrs[key];
5949
+ }
5989
5950
 
5951
+ propsForElement.style = [generatedStyles].concat(style);
5990
5952
  if (forwardedRef) propsForElement.ref = forwardedRef;
5991
5953
  if (forwardedAs) propsForElement.as = forwardedAs;
5992
- return createElement(renderAs || target, propsForElement);
5954
+ return createElement(elementToBeRendered, propsForElement);
5993
5955
  });
5994
5956
  };
5995
5957
 
@@ -6055,7 +6017,7 @@ var _StyledNativeComponent = (function (InlineStyle) {
6055
6017
  var isTargetStyledComp = isStyledComponent(target); // $FlowFixMe
6056
6018
 
6057
6019
  var WrappedStyledNativeComponent = React.forwardRef(function (props, ref) {
6058
- return React.createElement(ParentComponent, _extends({}, props, {
6020
+ return /*#__PURE__*/React.createElement(ParentComponent, _extends({}, props, {
6059
6021
  forwardedComponent: WrappedStyledNativeComponent,
6060
6022
  forwardedRef: ref
6061
6023
  }));
@@ -6204,7 +6166,7 @@ var withTheme = (function (Component) {
6204
6166
  console.warn("[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"" + getComponentName(Component) + "\"");
6205
6167
  }
6206
6168
 
6207
- return React.createElement(Component, _extends({}, props, {
6169
+ return /*#__PURE__*/React.createElement(Component, _extends({}, props, {
6208
6170
  theme: themeProp,
6209
6171
  ref: ref
6210
6172
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"styled-components.native.esm.js","sources":["../../src/constants.js","../../src/sheet/Tag.js","../../src/sheet/GroupedTag.js","../../src/sheet/GroupIDAllocator.js","../../src/sheet/Sheet.js","../../src/models/InlineStyle.js"],"sourcesContent":["// @flow\n\ndeclare var SC_DISABLE_SPEEDY: ?boolean;\ndeclare var __VERSION__: string;\n\nexport const SC_ATTR =\n (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||\n 'data-styled';\n\nexport const SC_ATTR_ACTIVE = 'active';\nexport const SC_ATTR_VERSION = 'data-styled-version';\nexport const SC_VERSION = __VERSION__;\n\nexport const IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\n\nexport const DISABLE_SPEEDY =\n (typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY) ||\n (typeof process !== 'undefined' &&\n (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY)) ||\n process.env.NODE_ENV !== 'production';\n\n// Shared empty execution context when generating static styles\nexport const STATIC_EXECUTION_CONTEXT = {};\n","// @flow\n/* eslint-disable no-use-before-define */\n\nimport { makeStyleTag, getSheet } from './dom';\nimport type { SheetOptions, Tag } from './types';\n\n/** Create a CSSStyleSheet-like tag depending on the environment */\nexport const makeTag = ({ isServer, useCSSOMInjection, target }: SheetOptions): Tag => {\n if (isServer) {\n return new VirtualTag(target);\n } else if (useCSSOMInjection) {\n return new CSSOMTag(target);\n } else {\n return new TextTag(target);\n }\n};\n\nexport class CSSOMTag implements Tag {\n element: HTMLStyleElement;\n\n sheet: CSSStyleSheet;\n\n length: number;\n\n constructor(target?: HTMLElement) {\n const element = (this.element = makeStyleTag(target));\n\n // Avoid Edge bug where empty style elements don't create sheets\n element.appendChild(document.createTextNode(''));\n\n this.sheet = getSheet(element);\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n try {\n this.sheet.insertRule(rule, index);\n this.length++;\n return true;\n } catch (_error) {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.sheet.deleteRule(index);\n this.length--;\n }\n\n getRule(index: number): string {\n const rule = this.sheet.cssRules[index];\n // Avoid IE11 quirk where cssText is inaccessible on some invalid rules\n if (rule !== undefined && typeof rule.cssText === 'string') {\n return rule.cssText;\n } else {\n return '';\n }\n }\n}\n\n/** A Tag that emulates the CSSStyleSheet API but uses text nodes */\nexport class TextTag implements Tag {\n element: HTMLStyleElement;\n\n nodes: NodeList<Node>;\n\n length: number;\n\n constructor(target?: HTMLElement) {\n const element = (this.element = makeStyleTag(target));\n this.nodes = element.childNodes;\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n if (index <= this.length && index >= 0) {\n const node = document.createTextNode(rule);\n const refNode = this.nodes[index];\n this.element.insertBefore(node, refNode || null);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.element.removeChild(this.nodes[index]);\n this.length--;\n }\n\n getRule(index: number): string {\n if (index < this.length) {\n return this.nodes[index].textContent;\n } else {\n return '';\n }\n }\n}\n\n/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */\nexport class VirtualTag implements Tag {\n rules: string[];\n\n length: number;\n\n constructor(_target?: HTMLElement) {\n this.rules = [];\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n if (index <= this.length) {\n this.rules.splice(index, 0, rule);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.rules.splice(index, 1);\n this.length--;\n }\n\n getRule(index: number): string {\n if (index < this.length) {\n return this.rules[index];\n } else {\n return '';\n }\n }\n}\n","// @flow\n/* eslint-disable no-use-before-define */\n\nimport type { GroupedTag, Tag } from './types';\nimport throwStyledError from '../utils/error';\n\n/** Create a GroupedTag with an underlying Tag implementation */\nexport const makeGroupedTag = (tag: Tag): GroupedTag => {\n return new DefaultGroupedTag(tag);\n};\n\nconst BASE_SIZE = 1 << 9;\n\nclass DefaultGroupedTag implements GroupedTag {\n groupSizes: Uint32Array;\n\n length: number;\n\n tag: Tag;\n\n constructor(tag: Tag) {\n this.groupSizes = new Uint32Array(BASE_SIZE);\n this.length = BASE_SIZE;\n this.tag = tag;\n }\n\n indexOfGroup(group: number): number {\n let index = 0;\n for (let i = 0; i < group; i++) {\n index += this.groupSizes[i];\n }\n\n return index;\n }\n\n insertRules(group: number, rules: string[]): void {\n if (group >= this.groupSizes.length) {\n const oldBuffer = this.groupSizes;\n const oldSize = oldBuffer.length;\n\n let newSize = oldSize;\n while (group >= newSize) {\n newSize <<= 1;\n if (newSize < 0) {\n throwStyledError(16, `${group}`);\n }\n }\n\n this.groupSizes = new Uint32Array(newSize);\n this.groupSizes.set(oldBuffer);\n this.length = newSize;\n\n for (let i = oldSize; i < newSize; i++) {\n this.groupSizes[i] = 0;\n }\n }\n\n let ruleIndex = this.indexOfGroup(group + 1);\n for (let i = 0, l = rules.length; i < l; i++) {\n if (this.tag.insertRule(ruleIndex, rules[i])) {\n this.groupSizes[group]++;\n ruleIndex++;\n }\n }\n }\n\n clearGroup(group: number): void {\n if (group < this.length) {\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n this.groupSizes[group] = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n this.tag.deleteRule(startIndex);\n }\n }\n }\n\n getGroup(group: number): string {\n let css = '';\n if (group >= this.length || this.groupSizes[group] === 0) {\n return css;\n }\n\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n for (let i = startIndex; i < endIndex; i++) {\n css += `${this.tag.getRule(i)}\\n`;\n }\n\n return css;\n }\n}\n","// @flow\n\nimport throwStyledError from '../utils/error';\n\nconst MAX_SMI = 1 << 31 - 1;\n\nlet groupIDRegister: Map<string, number> = new Map();\nlet reverseRegister: Map<number, string> = new Map();\nlet nextFreeGroup = 1;\n\nexport const resetGroupIds = () => {\n groupIDRegister = new Map();\n reverseRegister = new Map();\n nextFreeGroup = 1;\n};\n\nexport const getGroupForId = (id: string): number => {\n if (groupIDRegister.has(id)) {\n return (groupIDRegister.get(id): any);\n }\n\n const group = nextFreeGroup++;\n if (\n process.env.NODE_ENV !== 'production' &&\n ((group | 0) < 0 || group > MAX_SMI)\n ) {\n throwStyledError(16, `${group}`);\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n return group;\n};\n\nexport const getIdForGroup = (group: number): void | string => {\n return reverseRegister.get(group);\n};\n\nexport const setGroupForId = (id: string, group: number) => {\n if (group >= nextFreeGroup) {\n nextFreeGroup = group + 1;\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n};\n","// @flow\nimport { DISABLE_SPEEDY, IS_BROWSER } from '../constants';\nimport type { GroupedTag, Sheet, SheetOptions } from './types';\nimport { makeTag } from './Tag';\nimport { makeGroupedTag } from './GroupedTag';\nimport { getGroupForId } from './GroupIDAllocator';\nimport { outputSheet, rehydrateSheet } from './Rehydration';\n\nlet SHOULD_REHYDRATE = IS_BROWSER;\n\ntype SheetConstructorArgs = {\n isServer?: boolean,\n useCSSOMInjection?: boolean,\n target?: HTMLElement,\n};\n\ntype GlobalStylesAllocationMap = { [key: string]: number };\ntype NamesAllocationMap = Map<string, Set<string>>;\n\nconst defaultOptions = {\n isServer: !IS_BROWSER,\n useCSSOMInjection: !DISABLE_SPEEDY,\n};\n\n/** Contains the main stylesheet logic for stringification and caching */\nexport default class StyleSheet implements Sheet {\n gs: GlobalStylesAllocationMap;\n\n names: NamesAllocationMap;\n\n options: SheetOptions;\n\n tag: void | GroupedTag;\n\n /** Register a group ID to give it an index */\n static registerId(id: string): number {\n return getGroupForId(id);\n }\n\n constructor(\n options: SheetConstructorArgs = defaultOptions,\n globalStyles?: GlobalStylesAllocationMap = {},\n names?: NamesAllocationMap\n ) {\n this.options = {\n ...defaultOptions,\n ...options,\n };\n\n this.gs = globalStyles;\n this.names = new Map(names);\n\n // We rehydrate only once and use the sheet that is created first\n if (!this.options.isServer && IS_BROWSER && SHOULD_REHYDRATE) {\n SHOULD_REHYDRATE = false;\n rehydrateSheet(this);\n }\n }\n\n reconstructWithOptions(options: SheetConstructorArgs) {\n return new StyleSheet({ ...this.options, ...options }, this.gs, this.names);\n }\n\n allocateGSInstance(id: string) {\n return (this.gs[id] = (this.gs[id] || 0) + 1);\n }\n\n /** Lazily initialises a GroupedTag for when it's actually needed */\n getTag(): GroupedTag {\n return this.tag || (this.tag = makeGroupedTag(makeTag(this.options)));\n }\n\n /** Check whether a name is known for caching */\n hasNameForId(id: string, name: string): boolean {\n return this.names.has(id) && (this.names.get(id): any).has(name);\n }\n\n /** Mark a group's name as known for caching */\n registerName(id: string, name: string) {\n getGroupForId(id);\n\n if (!this.names.has(id)) {\n const groupNames = new Set();\n groupNames.add(name);\n this.names.set(id, groupNames);\n } else {\n (this.names.get(id): any).add(name);\n }\n }\n\n /** Insert new rules which also marks the name as known */\n insertRules(id: string, name: string, rules: string[]) {\n this.registerName(id, name);\n this.getTag().insertRules(getGroupForId(id), rules);\n }\n\n /** Clears all cached names for a given group ID */\n clearNames(id: string) {\n if (this.names.has(id)) {\n (this.names.get(id): any).clear();\n }\n }\n\n /** Clears all rules for a given group ID */\n clearRules(id: string) {\n this.getTag().clearGroup(getGroupForId(id));\n this.clearNames(id);\n }\n\n /** Clears the entire tag which deletes all rules but not its names */\n clearTag() {\n // NOTE: This does not clear the names, since it's only used during SSR\n // so that we can continuously output only new rules\n this.tag = undefined;\n }\n\n /** Outputs the current sheet as a CSS string with markers for SSR */\n toString(): string {\n return outputSheet(this);\n }\n}\n","// @flow\n/* eslint-disable import/no-unresolved */\nimport transformDeclPairs from 'css-to-react-native';\n\nimport generateComponentId from '../utils/generateComponentId';\nimport type { RuleSet, StyleSheet } from '../types';\nimport flatten from '../utils/flatten';\n// $FlowFixMe\nimport parse from '../vendor/postcss-safe-parser/parse';\n\nlet generated = {};\n\nexport const resetStyleCache = () => {\n generated = {};\n};\n\n/*\n InlineStyle takes arbitrary CSS and generates a flat object\n */\nexport default (styleSheet: StyleSheet) => {\n class InlineStyle {\n rules: RuleSet;\n\n constructor(rules: RuleSet) {\n this.rules = rules;\n }\n\n generateStyleObject(executionContext: Object) {\n const flatCSS = flatten(this.rules, executionContext).join('');\n\n const hash = generateComponentId(flatCSS);\n if (!generated[hash]) {\n const root = parse(flatCSS);\n const declPairs = [];\n root.each(node => {\n if (node.type === 'decl') {\n declPairs.push([node.prop, node.value]);\n } else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') {\n /* eslint-disable no-console */\n console.warn(`Node of type ${node.type} not supported as an inline style`);\n }\n });\n // RN currently does not support differing values for the corner radii of Image\n // components (but does for View). It is almost impossible to tell whether we'll have\n // support, so we'll just disable multiple values here.\n // https://github.com/styled-components/css-to-react-native/issues/11\n const styleObject = transformDeclPairs(declPairs, [\n 'borderRadius',\n 'borderWidth',\n 'borderColor',\n 'borderStyle',\n ]);\n const styles = styleSheet.create({\n generated: styleObject,\n });\n generated[hash] = styles.generated;\n }\n return generated[hash];\n }\n }\n\n return InlineStyle;\n};\n"],"names":["nodes","insertRule","names","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACiB9B,0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyC8B;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBNA;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtE1B,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"styled-components.native.esm.js","sources":["../../src/constants.js","../../src/sheet/Tag.js","../../src/sheet/GroupedTag.js","../../src/sheet/GroupIDAllocator.js","../../src/sheet/Sheet.js","../../src/models/InlineStyle.js"],"sourcesContent":["// @flow\n\ndeclare var SC_DISABLE_SPEEDY: ?boolean;\ndeclare var __VERSION__: string;\n\nexport const SC_ATTR =\n (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||\n 'data-styled';\n\nexport const SC_ATTR_ACTIVE = 'active';\nexport const SC_ATTR_VERSION = 'data-styled-version';\nexport const SC_VERSION = __VERSION__;\nexport const SPLITTER = '/*!sc*/\\n';\n\nexport const IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;\n\nexport const DISABLE_SPEEDY =\n (typeof SC_DISABLE_SPEEDY === 'boolean' && SC_DISABLE_SPEEDY) ||\n (typeof process !== 'undefined' &&\n (process.env.REACT_APP_SC_DISABLE_SPEEDY || process.env.SC_DISABLE_SPEEDY)) ||\n process.env.NODE_ENV !== 'production';\n\n// Shared empty execution context when generating static styles\nexport const STATIC_EXECUTION_CONTEXT = {};\n","// @flow\n/* eslint-disable no-use-before-define */\n\nimport { makeStyleTag, getSheet } from './dom';\nimport type { SheetOptions, Tag } from './types';\n\n/** Create a CSSStyleSheet-like tag depending on the environment */\nexport const makeTag = ({ isServer, useCSSOMInjection, target }: SheetOptions): Tag => {\n if (isServer) {\n return new VirtualTag(target);\n } else if (useCSSOMInjection) {\n return new CSSOMTag(target);\n } else {\n return new TextTag(target);\n }\n};\n\nexport class CSSOMTag implements Tag {\n element: HTMLStyleElement;\n\n sheet: CSSStyleSheet;\n\n length: number;\n\n constructor(target?: HTMLElement) {\n const element = (this.element = makeStyleTag(target));\n\n // Avoid Edge bug where empty style elements don't create sheets\n element.appendChild(document.createTextNode(''));\n\n this.sheet = getSheet(element);\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n try {\n this.sheet.insertRule(rule, index);\n this.length++;\n return true;\n } catch (_error) {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.sheet.deleteRule(index);\n this.length--;\n }\n\n getRule(index: number): string {\n const rule = this.sheet.cssRules[index];\n // Avoid IE11 quirk where cssText is inaccessible on some invalid rules\n if (rule !== undefined && typeof rule.cssText === 'string') {\n return rule.cssText;\n } else {\n return '';\n }\n }\n}\n\n/** A Tag that emulates the CSSStyleSheet API but uses text nodes */\nexport class TextTag implements Tag {\n element: HTMLStyleElement;\n\n nodes: NodeList<Node>;\n\n length: number;\n\n constructor(target?: HTMLElement) {\n const element = (this.element = makeStyleTag(target));\n this.nodes = element.childNodes;\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n if (index <= this.length && index >= 0) {\n const node = document.createTextNode(rule);\n const refNode = this.nodes[index];\n this.element.insertBefore(node, refNode || null);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.element.removeChild(this.nodes[index]);\n this.length--;\n }\n\n getRule(index: number): string {\n if (index < this.length) {\n return this.nodes[index].textContent;\n } else {\n return '';\n }\n }\n}\n\n/** A completely virtual (server-side) Tag that doesn't manipulate the DOM */\nexport class VirtualTag implements Tag {\n rules: string[];\n\n length: number;\n\n constructor(_target?: HTMLElement) {\n this.rules = [];\n this.length = 0;\n }\n\n insertRule(index: number, rule: string): boolean {\n if (index <= this.length) {\n this.rules.splice(index, 0, rule);\n this.length++;\n return true;\n } else {\n return false;\n }\n }\n\n deleteRule(index: number): void {\n this.rules.splice(index, 1);\n this.length--;\n }\n\n getRule(index: number): string {\n if (index < this.length) {\n return this.rules[index];\n } else {\n return '';\n }\n }\n}\n","// @flow\n/* eslint-disable no-use-before-define */\n\nimport type { GroupedTag, Tag } from './types';\nimport { SPLITTER } from '../constants';\nimport throwStyledError from '../utils/error';\n\n/** Create a GroupedTag with an underlying Tag implementation */\nexport const makeGroupedTag = (tag: Tag): GroupedTag => {\n return new DefaultGroupedTag(tag);\n};\n\nconst BASE_SIZE = 1 << 9;\n\nclass DefaultGroupedTag implements GroupedTag {\n groupSizes: Uint32Array;\n\n length: number;\n\n tag: Tag;\n\n constructor(tag: Tag) {\n this.groupSizes = new Uint32Array(BASE_SIZE);\n this.length = BASE_SIZE;\n this.tag = tag;\n }\n\n indexOfGroup(group: number): number {\n let index = 0;\n for (let i = 0; i < group; i++) {\n index += this.groupSizes[i];\n }\n\n return index;\n }\n\n insertRules(group: number, rules: string[]): void {\n if (group >= this.groupSizes.length) {\n const oldBuffer = this.groupSizes;\n const oldSize = oldBuffer.length;\n\n let newSize = oldSize;\n while (group >= newSize) {\n newSize <<= 1;\n if (newSize < 0) {\n throwStyledError(16, `${group}`);\n }\n }\n\n this.groupSizes = new Uint32Array(newSize);\n this.groupSizes.set(oldBuffer);\n this.length = newSize;\n\n for (let i = oldSize; i < newSize; i++) {\n this.groupSizes[i] = 0;\n }\n }\n\n let ruleIndex = this.indexOfGroup(group + 1);\n for (let i = 0, l = rules.length; i < l; i++) {\n if (this.tag.insertRule(ruleIndex, rules[i])) {\n this.groupSizes[group]++;\n ruleIndex++;\n }\n }\n }\n\n clearGroup(group: number): void {\n if (group < this.length) {\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n this.groupSizes[group] = 0;\n\n for (let i = startIndex; i < endIndex; i++) {\n this.tag.deleteRule(startIndex);\n }\n }\n }\n\n getGroup(group: number): string {\n let css = '';\n if (group >= this.length || this.groupSizes[group] === 0) {\n return css;\n }\n\n const length = this.groupSizes[group];\n const startIndex = this.indexOfGroup(group);\n const endIndex = startIndex + length;\n\n for (let i = startIndex; i < endIndex; i++) {\n css += `${this.tag.getRule(i)}${SPLITTER}`;\n }\n\n return css;\n }\n}\n","// @flow\n\nimport throwStyledError from '../utils/error';\n\nconst MAX_SMI = 1 << 31 - 1;\n\nlet groupIDRegister: Map<string, number> = new Map();\nlet reverseRegister: Map<number, string> = new Map();\nlet nextFreeGroup = 1;\n\nexport const resetGroupIds = () => {\n groupIDRegister = new Map();\n reverseRegister = new Map();\n nextFreeGroup = 1;\n};\n\nexport const getGroupForId = (id: string): number => {\n if (groupIDRegister.has(id)) {\n return (groupIDRegister.get(id): any);\n }\n\n const group = nextFreeGroup++;\n if (\n process.env.NODE_ENV !== 'production' &&\n ((group | 0) < 0 || group > MAX_SMI)\n ) {\n throwStyledError(16, `${group}`);\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n return group;\n};\n\nexport const getIdForGroup = (group: number): void | string => {\n return reverseRegister.get(group);\n};\n\nexport const setGroupForId = (id: string, group: number) => {\n if (group >= nextFreeGroup) {\n nextFreeGroup = group + 1;\n }\n\n groupIDRegister.set(id, group);\n reverseRegister.set(group, id);\n};\n","// @flow\nimport { DISABLE_SPEEDY, IS_BROWSER } from '../constants';\nimport type { GroupedTag, Sheet, SheetOptions } from './types';\nimport { makeTag } from './Tag';\nimport { makeGroupedTag } from './GroupedTag';\nimport { getGroupForId } from './GroupIDAllocator';\nimport { outputSheet, rehydrateSheet } from './Rehydration';\n\nlet SHOULD_REHYDRATE = IS_BROWSER;\n\ntype SheetConstructorArgs = {\n isServer?: boolean,\n useCSSOMInjection?: boolean,\n target?: HTMLElement,\n};\n\ntype GlobalStylesAllocationMap = { [key: string]: number };\ntype NamesAllocationMap = Map<string, Set<string>>;\n\nconst defaultOptions = {\n isServer: !IS_BROWSER,\n useCSSOMInjection: !DISABLE_SPEEDY,\n};\n\n/** Contains the main stylesheet logic for stringification and caching */\nexport default class StyleSheet implements Sheet {\n gs: GlobalStylesAllocationMap;\n\n names: NamesAllocationMap;\n\n options: SheetOptions;\n\n tag: void | GroupedTag;\n\n /** Register a group ID to give it an index */\n static registerId(id: string): number {\n return getGroupForId(id);\n }\n\n constructor(\n options: SheetConstructorArgs = defaultOptions,\n globalStyles?: GlobalStylesAllocationMap = {},\n names?: NamesAllocationMap\n ) {\n this.options = {\n ...defaultOptions,\n ...options,\n };\n\n this.gs = globalStyles;\n this.names = new Map(names);\n\n // We rehydrate only once and use the sheet that is created first\n if (!this.options.isServer && IS_BROWSER && SHOULD_REHYDRATE) {\n SHOULD_REHYDRATE = false;\n rehydrateSheet(this);\n }\n }\n\n reconstructWithOptions(options: SheetConstructorArgs) {\n return new StyleSheet({ ...this.options, ...options }, this.gs, this.names);\n }\n\n allocateGSInstance(id: string) {\n return (this.gs[id] = (this.gs[id] || 0) + 1);\n }\n\n /** Lazily initialises a GroupedTag for when it's actually needed */\n getTag(): GroupedTag {\n return this.tag || (this.tag = makeGroupedTag(makeTag(this.options)));\n }\n\n /** Check whether a name is known for caching */\n hasNameForId(id: string, name: string): boolean {\n return this.names.has(id) && (this.names.get(id): any).has(name);\n }\n\n /** Mark a group's name as known for caching */\n registerName(id: string, name: string) {\n getGroupForId(id);\n\n if (!this.names.has(id)) {\n const groupNames = new Set();\n groupNames.add(name);\n this.names.set(id, groupNames);\n } else {\n (this.names.get(id): any).add(name);\n }\n }\n\n /** Insert new rules which also marks the name as known */\n insertRules(id: string, name: string, rules: string[]) {\n this.registerName(id, name);\n this.getTag().insertRules(getGroupForId(id), rules);\n }\n\n /** Clears all cached names for a given group ID */\n clearNames(id: string) {\n if (this.names.has(id)) {\n (this.names.get(id): any).clear();\n }\n }\n\n /** Clears all rules for a given group ID */\n clearRules(id: string) {\n this.getTag().clearGroup(getGroupForId(id));\n this.clearNames(id);\n }\n\n /** Clears the entire tag which deletes all rules but not its names */\n clearTag() {\n // NOTE: This does not clear the names, since it's only used during SSR\n // so that we can continuously output only new rules\n this.tag = undefined;\n }\n\n /** Outputs the current sheet as a CSS string with markers for SSR */\n toString(): string {\n return outputSheet(this);\n }\n}\n","// @flow\n/* eslint-disable import/no-unresolved */\nimport transformDeclPairs from 'css-to-react-native';\n\nimport generateComponentId from '../utils/generateComponentId';\nimport type { RuleSet, StyleSheet } from '../types';\nimport flatten from '../utils/flatten';\n// $FlowFixMe\nimport parse from '../vendor/postcss-safe-parser/parse';\n\nlet generated = {};\n\nexport const resetStyleCache = () => {\n generated = {};\n};\n\n/*\n InlineStyle takes arbitrary CSS and generates a flat object\n */\nexport default (styleSheet: StyleSheet) => {\n class InlineStyle {\n rules: RuleSet;\n\n constructor(rules: RuleSet) {\n this.rules = rules;\n }\n\n generateStyleObject(executionContext: Object) {\n const flatCSS = flatten(this.rules, executionContext).join('');\n\n const hash = generateComponentId(flatCSS);\n if (!generated[hash]) {\n const root = parse(flatCSS);\n const declPairs = [];\n root.each(node => {\n if (node.type === 'decl') {\n declPairs.push([node.prop, node.value]);\n } else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') {\n /* eslint-disable no-console */\n console.warn(`Node of type ${node.type} not supported as an inline style`);\n }\n });\n // RN currently does not support differing values for the corner radii of Image\n // components (but does for View). It is almost impossible to tell whether we'll have\n // support, so we'll just disable multiple values here.\n // https://github.com/styled-components/css-to-react-native/issues/11\n const styleObject = transformDeclPairs(declPairs, [\n 'borderRadius',\n 'borderWidth',\n 'borderColor',\n 'borderStyle',\n ]);\n const styles = styleSheet.create({\n generated: styleObject,\n });\n generated[hash] = styles.generated;\n }\n return generated[hash];\n }\n }\n\n return InlineStyle;\n};\n"],"names":["nodes","insertRule","names","id"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACiB9B,0BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAyC8B;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAyBNA;;;;;;;;;;;;;;;;;;UAgBxBC,aAAA,yBAAA,MAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACrFA,gCAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBCXiB;mBAC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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACtE1B,8BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styled-components",
3
- "version": "5.0.0-testgrouplimit.0",
3
+ "version": "5.1.0",
4
4
  "description": "Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress",
5
5
  "main": "dist/styled-components.cjs.js",
6
6
  "jsnext:main": "dist/styled-components.esm.js",
@@ -63,7 +63,7 @@
63
63
  "dependencies": {
64
64
  "@babel/helper-module-imports": "^7.0.0",
65
65
  "@babel/traverse": "^7.4.5",
66
- "@emotion/is-prop-valid": "^0.8.3",
66
+ "@emotion/is-prop-valid": "^0.8.8",
67
67
  "@emotion/stylis": "^0.8.4",
68
68
  "@emotion/unitless": "^0.7.4",
69
69
  "babel-plugin-styled-components": ">= 1",
@@ -78,6 +78,15 @@
78
78
  "react-is": ">= 16.8.0"
79
79
  },
80
80
  "devDependencies": {
81
+ "@babel/cli": "^7.0.0",
82
+ "@babel/core": "^7.0.0",
83
+ "@babel/plugin-proposal-object-rest-spread": "^7.0.0",
84
+ "@babel/preset-env": "^7.0.0",
85
+ "@babel/preset-flow": "^7.0.0",
86
+ "@babel/preset-react": "^7.0.0",
87
+ "babel-eslint": "^10.0.1",
88
+ "eslint-plugin-import": "^2.17.2",
89
+ "eslint-plugin-react": "^7.12.4",
81
90
  "flow-bin": "^0.100.0",
82
91
  "prop-types": "^15.7.2",
83
92
  "react": "^16.8.6",
@@ -87,6 +96,9 @@
87
96
  "react-native": "^0.59.8",
88
97
  "react-primitives": "^0.8.0",
89
98
  "react-test-renderer": "^16.8.6",
99
+ "rollup": "^1.13.1",
100
+ "rollup-plugin-babel": "^4.3.2",
101
+ "rollup-plugin-terser": "^5.0.0",
90
102
  "stylis-plugin-rtl": "^1.0.0"
91
103
  },
92
104
  "bundlesize": [