styled-components 6.0.0-alpha.5 → 6.0.0-alpha.6

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.
Files changed (310) hide show
  1. package/dist/constructors/constructWithOptions.d.ts +27 -14
  2. package/dist/constructors/css.d.ts +2 -2
  3. package/dist/constructors/styled.d.ts +178 -178
  4. package/dist/hoc/withTheme.d.ts +1 -1
  5. package/dist/native/index.d.ts +29 -53
  6. package/dist/sheet/Tag.d.ts +3 -3
  7. package/dist/sheet/dom.d.ts +1 -1
  8. package/dist/styled-components-macro.cjs.js +1 -1
  9. package/dist/styled-components-macro.cjs.js.map +1 -1
  10. package/dist/styled-components-macro.esm.js +1 -1
  11. package/dist/styled-components-macro.esm.js.map +1 -1
  12. package/dist/styled-components.browser.cjs.js +1 -1
  13. package/dist/styled-components.browser.cjs.js.map +1 -1
  14. package/dist/styled-components.browser.esm.js +1 -1
  15. package/dist/styled-components.browser.esm.js.map +1 -1
  16. package/dist/styled-components.cjs.js +1 -1
  17. package/dist/styled-components.cjs.js.map +1 -1
  18. package/dist/styled-components.esm.js +1 -1
  19. package/dist/styled-components.esm.js.map +1 -1
  20. package/dist/styled-components.js +1 -1
  21. package/dist/styled-components.js.map +1 -1
  22. package/dist/styled-components.min.js +1 -1
  23. package/dist/styled-components.min.js.map +1 -1
  24. package/dist/test/utils.d.ts +178 -178
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/dist/types.d.ts +17 -20
  27. package/dist/utils/checkDynamicCreation.d.ts +1 -1
  28. package/dist/utils/flatten.d.ts +1 -1
  29. package/native/dist/constructors/constructWithOptions.d.ts +27 -14
  30. package/native/dist/constructors/css.d.ts +2 -2
  31. package/native/dist/constructors/styled.d.ts +178 -178
  32. package/native/dist/hoc/withTheme.d.ts +1 -1
  33. package/native/dist/native/index.d.ts +29 -53
  34. package/native/dist/sheet/Tag.d.ts +3 -3
  35. package/native/dist/sheet/dom.d.ts +1 -1
  36. package/native/dist/styled-components.native.cjs.js +404 -468
  37. package/native/dist/styled-components.native.cjs.js.map +1 -1
  38. package/native/dist/styled-components.native.esm.js +401 -465
  39. package/native/dist/styled-components.native.esm.js.map +1 -1
  40. package/native/dist/test/utils.d.ts +178 -178
  41. package/native/dist/types.d.ts +17 -20
  42. package/native/dist/utils/checkDynamicCreation.d.ts +1 -1
  43. package/native/dist/utils/flatten.d.ts +1 -1
  44. package/package.json +25 -29
  45. package/dist/primitives/index.d.ts +0 -23
  46. package/primitives/dist/base.d.ts +0 -18
  47. package/primitives/dist/base.d.ts.map +0 -1
  48. package/primitives/dist/constants.d.ts +0 -8
  49. package/primitives/dist/constants.d.ts.map +0 -1
  50. package/primitives/dist/constructors/constructWithOptions.d.ts +0 -19
  51. package/primitives/dist/constructors/constructWithOptions.d.ts.map +0 -1
  52. package/primitives/dist/constructors/createGlobalStyle.d.ts +0 -3
  53. package/primitives/dist/constructors/createGlobalStyle.d.ts.map +0 -1
  54. package/primitives/dist/constructors/css.d.ts +0 -4
  55. package/primitives/dist/constructors/css.d.ts.map +0 -1
  56. package/primitives/dist/constructors/keyframes.d.ts +0 -3
  57. package/primitives/dist/constructors/keyframes.d.ts.map +0 -1
  58. package/primitives/dist/constructors/styled.d.ts +0 -185
  59. package/primitives/dist/constructors/styled.d.ts.map +0 -1
  60. package/primitives/dist/dist/base.d.ts +0 -18
  61. package/primitives/dist/dist/base.d.ts.map +0 -1
  62. package/primitives/dist/dist/constants.d.ts +0 -9
  63. package/primitives/dist/dist/constants.d.ts.map +0 -1
  64. package/primitives/dist/dist/constructors/constructWithOptions.d.ts +0 -20
  65. package/primitives/dist/dist/constructors/constructWithOptions.d.ts.map +0 -1
  66. package/primitives/dist/dist/constructors/createGlobalStyle.d.ts +0 -4
  67. package/primitives/dist/dist/constructors/createGlobalStyle.d.ts.map +0 -1
  68. package/primitives/dist/dist/constructors/css.d.ts +0 -5
  69. package/primitives/dist/dist/constructors/css.d.ts.map +0 -1
  70. package/primitives/dist/dist/constructors/keyframes.d.ts +0 -4
  71. package/primitives/dist/dist/constructors/keyframes.d.ts.map +0 -1
  72. package/primitives/dist/dist/constructors/styled.d.ts +0 -186
  73. package/primitives/dist/dist/constructors/styled.d.ts.map +0 -1
  74. package/primitives/dist/dist/hoc/withTheme.d.ts +0 -4
  75. package/primitives/dist/dist/hoc/withTheme.d.ts.map +0 -1
  76. package/primitives/dist/dist/hoc/withTheme.spec.d.ts +0 -2
  77. package/primitives/dist/dist/hoc/withTheme.spec.d.ts.map +0 -1
  78. package/primitives/dist/dist/hooks/useTheme.d.ts +0 -4
  79. package/primitives/dist/dist/hooks/useTheme.d.ts.map +0 -1
  80. package/primitives/dist/dist/index-standalone.d.ts +0 -3
  81. package/primitives/dist/dist/index-standalone.d.ts.map +0 -1
  82. package/primitives/dist/dist/index.d.ts +0 -4
  83. package/primitives/dist/dist/index.d.ts.map +0 -1
  84. package/primitives/dist/dist/macro/index.d.ts +0 -3
  85. package/primitives/dist/dist/macro/index.d.ts.map +0 -1
  86. package/primitives/dist/dist/macro/test/babel.config.d.ts +0 -1
  87. package/primitives/dist/dist/macro/test/babel.config.d.ts.map +0 -1
  88. package/primitives/dist/dist/models/ComponentStyle.d.ts +0 -16
  89. package/primitives/dist/dist/models/ComponentStyle.d.ts.map +0 -1
  90. package/primitives/dist/dist/models/GlobalStyle.d.ts +0 -12
  91. package/primitives/dist/dist/models/GlobalStyle.d.ts.map +0 -1
  92. package/primitives/dist/dist/models/InlineStyle.d.ts +0 -7
  93. package/primitives/dist/dist/models/InlineStyle.d.ts.map +0 -1
  94. package/primitives/dist/dist/models/Keyframes.d.ts +0 -12
  95. package/primitives/dist/dist/models/Keyframes.d.ts.map +0 -1
  96. package/primitives/dist/dist/models/ServerStyleSheet.d.ts +0 -16
  97. package/primitives/dist/dist/models/ServerStyleSheet.d.ts.map +0 -1
  98. package/primitives/dist/dist/models/StyleSheetManager.d.ts +0 -22
  99. package/primitives/dist/dist/models/StyleSheetManager.d.ts.map +0 -1
  100. package/primitives/dist/dist/models/StyledComponent.d.ts +0 -4
  101. package/primitives/dist/dist/models/StyledComponent.d.ts.map +0 -1
  102. package/primitives/dist/dist/models/StyledNativeComponent.d.ts +0 -4
  103. package/primitives/dist/dist/models/StyledNativeComponent.d.ts.map +0 -1
  104. package/primitives/dist/dist/models/ThemeProvider.d.ts +0 -18
  105. package/primitives/dist/dist/models/ThemeProvider.d.ts.map +0 -1
  106. package/primitives/dist/dist/native/index.d.ts +0 -65
  107. package/primitives/dist/dist/native/index.d.ts.map +0 -1
  108. package/primitives/dist/dist/primitives/index.d.ts +0 -23
  109. package/primitives/dist/dist/primitives/index.d.ts.map +0 -1
  110. package/primitives/dist/dist/secretInternals.d.ts +0 -6
  111. package/primitives/dist/dist/secretInternals.d.ts.map +0 -1
  112. package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts +0 -5
  113. package/primitives/dist/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
  114. package/primitives/dist/dist/sheet/GroupedTag.d.ts +0 -12
  115. package/primitives/dist/dist/sheet/GroupedTag.d.ts.map +0 -1
  116. package/primitives/dist/dist/sheet/Rehydration.d.ts +0 -4
  117. package/primitives/dist/dist/sheet/Rehydration.d.ts.map +0 -1
  118. package/primitives/dist/dist/sheet/Sheet.d.ts +0 -41
  119. package/primitives/dist/dist/sheet/Sheet.d.ts.map +0 -1
  120. package/primitives/dist/dist/sheet/Tag.d.ts +0 -55
  121. package/primitives/dist/dist/sheet/Tag.d.ts.map +0 -1
  122. package/primitives/dist/dist/sheet/dom.d.ts +0 -5
  123. package/primitives/dist/dist/sheet/dom.d.ts.map +0 -1
  124. package/primitives/dist/dist/sheet/index.d.ts +0 -2
  125. package/primitives/dist/dist/sheet/index.d.ts.map +0 -1
  126. package/primitives/dist/dist/sheet/types.d.ts +0 -35
  127. package/primitives/dist/dist/sheet/types.d.ts.map +0 -1
  128. package/primitives/dist/dist/test/globals.d.ts +0 -3
  129. package/primitives/dist/dist/test/globals.d.ts.map +0 -1
  130. package/primitives/dist/dist/test/utils.d.ts +0 -192
  131. package/primitives/dist/dist/test/utils.d.ts.map +0 -1
  132. package/primitives/dist/dist/types.d.ts +0 -121
  133. package/primitives/dist/dist/types.d.ts.map +0 -1
  134. package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts +0 -2
  135. package/primitives/dist/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
  136. package/primitives/dist/dist/utils/checkDynamicCreation.d.ts +0 -2
  137. package/primitives/dist/dist/utils/checkDynamicCreation.d.ts.map +0 -1
  138. package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts +0 -4
  139. package/primitives/dist/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
  140. package/primitives/dist/dist/utils/determineTheme.d.ts +0 -3
  141. package/primitives/dist/dist/utils/determineTheme.d.ts.map +0 -1
  142. package/primitives/dist/dist/utils/domElements.d.ts +0 -3
  143. package/primitives/dist/dist/utils/domElements.d.ts.map +0 -1
  144. package/primitives/dist/dist/utils/empties.d.ts +0 -4
  145. package/primitives/dist/dist/utils/empties.d.ts.map +0 -1
  146. package/primitives/dist/dist/utils/error.d.ts +0 -6
  147. package/primitives/dist/dist/utils/error.d.ts.map +0 -1
  148. package/primitives/dist/dist/utils/errors.d.ts +0 -21
  149. package/primitives/dist/dist/utils/errors.d.ts.map +0 -1
  150. package/primitives/dist/dist/utils/escape.d.ts +0 -6
  151. package/primitives/dist/dist/utils/escape.d.ts.map +0 -1
  152. package/primitives/dist/dist/utils/flatten.d.ts +0 -5
  153. package/primitives/dist/dist/utils/flatten.d.ts.map +0 -1
  154. package/primitives/dist/dist/utils/generateAlphabeticName.d.ts +0 -2
  155. package/primitives/dist/dist/utils/generateAlphabeticName.d.ts.map +0 -1
  156. package/primitives/dist/dist/utils/generateComponentId.d.ts +0 -2
  157. package/primitives/dist/dist/utils/generateComponentId.d.ts.map +0 -1
  158. package/primitives/dist/dist/utils/generateDisplayName.d.ts +0 -3
  159. package/primitives/dist/dist/utils/generateDisplayName.d.ts.map +0 -1
  160. package/primitives/dist/dist/utils/getComponentName.d.ts +0 -3
  161. package/primitives/dist/dist/utils/getComponentName.d.ts.map +0 -1
  162. package/primitives/dist/dist/utils/hash.d.ts +0 -4
  163. package/primitives/dist/dist/utils/hash.d.ts.map +0 -1
  164. package/primitives/dist/dist/utils/hoist.d.ts +0 -52
  165. package/primitives/dist/dist/utils/hoist.d.ts.map +0 -1
  166. package/primitives/dist/dist/utils/hyphenateStyleName.d.ts +0 -15
  167. package/primitives/dist/dist/utils/hyphenateStyleName.d.ts.map +0 -1
  168. package/primitives/dist/dist/utils/interleave.d.ts +0 -3
  169. package/primitives/dist/dist/utils/interleave.d.ts.map +0 -1
  170. package/primitives/dist/dist/utils/isFunction.d.ts +0 -2
  171. package/primitives/dist/dist/utils/isFunction.d.ts.map +0 -1
  172. package/primitives/dist/dist/utils/isPlainObject.d.ts +0 -2
  173. package/primitives/dist/dist/utils/isPlainObject.d.ts.map +0 -1
  174. package/primitives/dist/dist/utils/isStatelessFunction.d.ts +0 -2
  175. package/primitives/dist/dist/utils/isStatelessFunction.d.ts.map +0 -1
  176. package/primitives/dist/dist/utils/isStaticRules.d.ts +0 -3
  177. package/primitives/dist/dist/utils/isStaticRules.d.ts.map +0 -1
  178. package/primitives/dist/dist/utils/isStyledComponent.d.ts +0 -3
  179. package/primitives/dist/dist/utils/isStyledComponent.d.ts.map +0 -1
  180. package/primitives/dist/dist/utils/isTag.d.ts +0 -3
  181. package/primitives/dist/dist/utils/isTag.d.ts.map +0 -1
  182. package/primitives/dist/dist/utils/joinStrings.d.ts +0 -5
  183. package/primitives/dist/dist/utils/joinStrings.d.ts.map +0 -1
  184. package/primitives/dist/dist/utils/mixinDeep.d.ts +0 -8
  185. package/primitives/dist/dist/utils/mixinDeep.d.ts.map +0 -1
  186. package/primitives/dist/dist/utils/nonce.d.ts +0 -2
  187. package/primitives/dist/dist/utils/nonce.d.ts.map +0 -1
  188. package/primitives/dist/dist/utils/stylis.d.ts +0 -10
  189. package/primitives/dist/dist/utils/stylis.d.ts.map +0 -1
  190. package/primitives/dist/hoc/withTheme.d.ts +0 -3
  191. package/primitives/dist/hoc/withTheme.d.ts.map +0 -1
  192. package/primitives/dist/hoc/withTheme.spec.d.ts +0 -1
  193. package/primitives/dist/hoc/withTheme.spec.d.ts.map +0 -1
  194. package/primitives/dist/hooks/useTheme.d.ts +0 -3
  195. package/primitives/dist/hooks/useTheme.d.ts.map +0 -1
  196. package/primitives/dist/index-standalone.d.ts +0 -2
  197. package/primitives/dist/index-standalone.d.ts.map +0 -1
  198. package/primitives/dist/index.d.ts +0 -4
  199. package/primitives/dist/index.d.ts.map +0 -1
  200. package/primitives/dist/macro/index.d.ts +0 -2
  201. package/primitives/dist/macro/index.d.ts.map +0 -1
  202. package/primitives/dist/macro/test/babel.config.d.ts +0 -1
  203. package/primitives/dist/macro/test/babel.config.d.ts.map +0 -1
  204. package/primitives/dist/models/ComponentStyle.d.ts +0 -15
  205. package/primitives/dist/models/ComponentStyle.d.ts.map +0 -1
  206. package/primitives/dist/models/GlobalStyle.d.ts +0 -11
  207. package/primitives/dist/models/GlobalStyle.d.ts.map +0 -1
  208. package/primitives/dist/models/InlineStyle.d.ts +0 -6
  209. package/primitives/dist/models/InlineStyle.d.ts.map +0 -1
  210. package/primitives/dist/models/Keyframes.d.ts +0 -11
  211. package/primitives/dist/models/Keyframes.d.ts.map +0 -1
  212. package/primitives/dist/models/ServerStyleSheet.d.ts +0 -15
  213. package/primitives/dist/models/ServerStyleSheet.d.ts.map +0 -1
  214. package/primitives/dist/models/StyleSheetManager.d.ts +0 -21
  215. package/primitives/dist/models/StyleSheetManager.d.ts.map +0 -1
  216. package/primitives/dist/models/StyledComponent.d.ts +0 -3
  217. package/primitives/dist/models/StyledComponent.d.ts.map +0 -1
  218. package/primitives/dist/models/StyledNativeComponent.d.ts +0 -3
  219. package/primitives/dist/models/StyledNativeComponent.d.ts.map +0 -1
  220. package/primitives/dist/models/ThemeProvider.d.ts +0 -39
  221. package/primitives/dist/models/ThemeProvider.d.ts.map +0 -1
  222. package/primitives/dist/native/index.d.ts +0 -65
  223. package/primitives/dist/native/index.d.ts.map +0 -1
  224. package/primitives/dist/primitives/index.d.ts +0 -23
  225. package/primitives/dist/primitives/index.d.ts.map +0 -1
  226. package/primitives/dist/secretInternals.d.ts +0 -5
  227. package/primitives/dist/secretInternals.d.ts.map +0 -1
  228. package/primitives/dist/sheet/GroupIDAllocator.d.ts +0 -4
  229. package/primitives/dist/sheet/GroupIDAllocator.d.ts.map +0 -1
  230. package/primitives/dist/sheet/GroupedTag.d.ts +0 -11
  231. package/primitives/dist/sheet/GroupedTag.d.ts.map +0 -1
  232. package/primitives/dist/sheet/Rehydration.d.ts +0 -3
  233. package/primitives/dist/sheet/Rehydration.d.ts.map +0 -1
  234. package/primitives/dist/sheet/Sheet.d.ts +0 -40
  235. package/primitives/dist/sheet/Sheet.d.ts.map +0 -1
  236. package/primitives/dist/sheet/Tag.d.ts +0 -54
  237. package/primitives/dist/sheet/Tag.d.ts.map +0 -1
  238. package/primitives/dist/sheet/dom.d.ts +0 -4
  239. package/primitives/dist/sheet/dom.d.ts.map +0 -1
  240. package/primitives/dist/sheet/index.d.ts +0 -1
  241. package/primitives/dist/sheet/index.d.ts.map +0 -1
  242. package/primitives/dist/sheet/types.d.ts +0 -34
  243. package/primitives/dist/sheet/types.d.ts.map +0 -1
  244. package/primitives/dist/styled-components-primitives.cjs.js +0 -1292
  245. package/primitives/dist/styled-components-primitives.cjs.js.map +0 -1
  246. package/primitives/dist/styled-components-primitives.esm.js +0 -1274
  247. package/primitives/dist/styled-components-primitives.esm.js.map +0 -1
  248. package/primitives/dist/test/globals.d.ts +0 -2
  249. package/primitives/dist/test/globals.d.ts.map +0 -1
  250. package/primitives/dist/test/utils.d.ts +0 -191
  251. package/primitives/dist/test/utils.d.ts.map +0 -1
  252. package/primitives/dist/types.d.ts +0 -143
  253. package/primitives/dist/types.d.ts.map +0 -1
  254. package/primitives/dist/utils/addUnitIfNeeded.d.ts +0 -1
  255. package/primitives/dist/utils/addUnitIfNeeded.d.ts.map +0 -1
  256. package/primitives/dist/utils/checkDynamicCreation.d.ts +0 -1
  257. package/primitives/dist/utils/checkDynamicCreation.d.ts.map +0 -1
  258. package/primitives/dist/utils/createWarnTooManyClasses.d.ts +0 -3
  259. package/primitives/dist/utils/createWarnTooManyClasses.d.ts.map +0 -1
  260. package/primitives/dist/utils/determineTheme.d.ts +0 -2
  261. package/primitives/dist/utils/determineTheme.d.ts.map +0 -1
  262. package/primitives/dist/utils/domElements.d.ts +0 -2
  263. package/primitives/dist/utils/domElements.d.ts.map +0 -1
  264. package/primitives/dist/utils/empties.d.ts +0 -3
  265. package/primitives/dist/utils/empties.d.ts.map +0 -1
  266. package/primitives/dist/utils/error.d.ts +0 -5
  267. package/primitives/dist/utils/error.d.ts.map +0 -1
  268. package/primitives/dist/utils/errors.d.ts +0 -20
  269. package/primitives/dist/utils/errors.d.ts.map +0 -1
  270. package/primitives/dist/utils/escape.d.ts +0 -5
  271. package/primitives/dist/utils/escape.d.ts.map +0 -1
  272. package/primitives/dist/utils/flatten.d.ts +0 -4
  273. package/primitives/dist/utils/flatten.d.ts.map +0 -1
  274. package/primitives/dist/utils/generateAlphabeticName.d.ts +0 -1
  275. package/primitives/dist/utils/generateAlphabeticName.d.ts.map +0 -1
  276. package/primitives/dist/utils/generateComponentId.d.ts +0 -1
  277. package/primitives/dist/utils/generateComponentId.d.ts.map +0 -1
  278. package/primitives/dist/utils/generateDisplayName.d.ts +0 -2
  279. package/primitives/dist/utils/generateDisplayName.d.ts.map +0 -1
  280. package/primitives/dist/utils/getComponentName.d.ts +0 -2
  281. package/primitives/dist/utils/getComponentName.d.ts.map +0 -1
  282. package/primitives/dist/utils/hash.d.ts +0 -3
  283. package/primitives/dist/utils/hash.d.ts.map +0 -1
  284. package/primitives/dist/utils/hoist.d.ts +0 -51
  285. package/primitives/dist/utils/hoist.d.ts.map +0 -1
  286. package/primitives/dist/utils/hyphenateStyleName.d.ts +0 -14
  287. package/primitives/dist/utils/hyphenateStyleName.d.ts.map +0 -1
  288. package/primitives/dist/utils/interleave.d.ts +0 -2
  289. package/primitives/dist/utils/interleave.d.ts.map +0 -1
  290. package/primitives/dist/utils/isFunction.d.ts +0 -1
  291. package/primitives/dist/utils/isFunction.d.ts.map +0 -1
  292. package/primitives/dist/utils/isPlainObject.d.ts +0 -1
  293. package/primitives/dist/utils/isPlainObject.d.ts.map +0 -1
  294. package/primitives/dist/utils/isStatelessFunction.d.ts +0 -1
  295. package/primitives/dist/utils/isStatelessFunction.d.ts.map +0 -1
  296. package/primitives/dist/utils/isStaticRules.d.ts +0 -2
  297. package/primitives/dist/utils/isStaticRules.d.ts.map +0 -1
  298. package/primitives/dist/utils/isStyledComponent.d.ts +0 -2
  299. package/primitives/dist/utils/isStyledComponent.d.ts.map +0 -1
  300. package/primitives/dist/utils/isTag.d.ts +0 -2
  301. package/primitives/dist/utils/isTag.d.ts.map +0 -1
  302. package/primitives/dist/utils/joinStrings.d.ts +0 -4
  303. package/primitives/dist/utils/joinStrings.d.ts.map +0 -1
  304. package/primitives/dist/utils/mixinDeep.d.ts +0 -7
  305. package/primitives/dist/utils/mixinDeep.d.ts.map +0 -1
  306. package/primitives/dist/utils/nonce.d.ts +0 -1
  307. package/primitives/dist/utils/nonce.d.ts.map +0 -1
  308. package/primitives/dist/utils/stylis.d.ts +0 -9
  309. package/primitives/dist/utils/stylis.d.ts.map +0 -1
  310. package/primitives/package.json +0 -8
@@ -1,4 +1,3 @@
1
- import { __spreadArray, __read, __assign, __values } from 'tslib';
2
1
  import React, { useContext, useMemo, createElement } from 'react';
3
2
  import 'shallowequal';
4
3
  import { prefixer, stringify, serialize, compile, middleware, RULESET } from 'stylis';
@@ -6,8 +5,8 @@ import unitless from '@emotion/unitless';
6
5
  import transformDeclPairs from 'css-to-react-native';
7
6
  import { parse } from 'postcss';
8
7
 
9
- var EMPTY_ARRAY = Object.freeze([]);
10
- var EMPTY_OBJECT = Object.freeze({});
8
+ const EMPTY_ARRAY = Object.freeze([]);
9
+ const EMPTY_OBJECT = Object.freeze({});
11
10
 
12
11
  var errorMap = {
13
12
  '1': 'Cannot create styled-component for component: %s.\n\n',
@@ -29,21 +28,17 @@ var errorMap = {
29
28
  '17': "CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",
30
29
  };
31
30
 
32
- var ERRORS = process.env.NODE_ENV !== 'production' ? errorMap : {};
31
+ const ERRORS = process.env.NODE_ENV !== 'production' ? errorMap : {};
33
32
  /**
34
33
  * super basic version of sprintf
35
34
  */
36
- function format() {
37
- var args = [];
38
- for (var _i = 0; _i < arguments.length; _i++) {
39
- args[_i] = arguments[_i];
40
- }
41
- var a = args[0];
42
- var b = [];
43
- for (var c = 1, len = args.length; c < len; c += 1) {
35
+ function format(...args) {
36
+ let a = args[0];
37
+ const b = [];
38
+ for (let c = 1, len = args.length; c < len; c += 1) {
44
39
  b.push(args[c]);
45
40
  }
46
- b.forEach(function (d) {
41
+ b.forEach(d => {
47
42
  a = a.replace(/%[a-z]/, d);
48
43
  });
49
44
  return a;
@@ -52,27 +47,23 @@ function format() {
52
47
  * Create an error file out of errors.md for development and a simple web link to the full errors
53
48
  * in production mode.
54
49
  */
55
- function throwStyledComponentsError(code) {
56
- var interpolations = [];
57
- for (var _i = 1; _i < arguments.length; _i++) {
58
- interpolations[_i - 1] = arguments[_i];
59
- }
50
+ function throwStyledComponentsError(code, ...interpolations) {
60
51
  if (process.env.NODE_ENV === 'production') {
61
- return new Error("An error occurred. See https://git.io/JUIaE#".concat(code, " for more information.").concat(interpolations.length > 0 ? " Args: ".concat(interpolations.join(', ')) : ''));
52
+ return new Error(`An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#${code} for more information.${interpolations.length > 0 ? ` Args: ${interpolations.join(', ')}` : ''}`);
62
53
  }
63
54
  else {
64
- return new Error(format.apply(void 0, __spreadArray([ERRORS[code]], __read(interpolations), false)).trim());
55
+ return new Error(format(ERRORS[code], ...interpolations).trim());
65
56
  }
66
57
  }
67
58
 
68
- var SC_ATTR = (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||
59
+ const SC_ATTR = (typeof process !== 'undefined' && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR)) ||
69
60
  'data-styled';
70
- var SC_ATTR_ACTIVE = 'active';
71
- var SC_ATTR_VERSION = 'data-styled-version';
72
- var SC_VERSION = "6.0.0-alpha.5";
73
- var SPLITTER = '/*!sc*/\n';
74
- var IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
75
- var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'
61
+ const SC_ATTR_ACTIVE = 'active';
62
+ const SC_ATTR_VERSION = 'data-styled-version';
63
+ const SC_VERSION = "6.0.0-alpha.6";
64
+ const SPLITTER = '/*!sc*/\n';
65
+ const IS_BROWSER = typeof window !== 'undefined' && 'HTMLElement' in window;
66
+ const DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'
76
67
  ? SC_DISABLE_SPEEDY
77
68
  : typeof process !== 'undefined' &&
78
69
  typeof process.env.REACT_APP_SC_DISABLE_SPEEDY !== 'undefined' &&
@@ -89,44 +80,47 @@ var DISABLE_SPEEDY = Boolean(typeof SC_DISABLE_SPEEDY === 'boolean'
89
80
  : process.env.NODE_ENV !== 'production');
90
81
 
91
82
  /** Create a GroupedTag with an underlying Tag implementation */
92
- var makeGroupedTag = function (tag) {
83
+ const makeGroupedTag = (tag) => {
93
84
  return new DefaultGroupedTag(tag);
94
85
  };
95
- var BASE_SIZE = 1 << 9;
96
- var DefaultGroupedTag = /** @class */ (function () {
97
- function DefaultGroupedTag(tag) {
86
+ const BASE_SIZE = 1 << 9;
87
+ const DefaultGroupedTag = class DefaultGroupedTag {
88
+ groupSizes;
89
+ length;
90
+ tag;
91
+ constructor(tag) {
98
92
  this.groupSizes = new Uint32Array(BASE_SIZE);
99
93
  this.length = BASE_SIZE;
100
94
  this.tag = tag;
101
95
  }
102
- DefaultGroupedTag.prototype.indexOfGroup = function (group) {
103
- var index = 0;
104
- for (var i = 0; i < group; i++) {
96
+ indexOfGroup(group) {
97
+ let index = 0;
98
+ for (let i = 0; i < group; i++) {
105
99
  index += this.groupSizes[i];
106
100
  }
107
101
  return index;
108
- };
109
- DefaultGroupedTag.prototype.insertRules = function (group, rules) {
102
+ }
103
+ insertRules(group, rules) {
110
104
  if (group >= this.groupSizes.length) {
111
- var oldBuffer = this.groupSizes;
112
- var oldSize = oldBuffer.length;
113
- var newSize = oldSize;
105
+ const oldBuffer = this.groupSizes;
106
+ const oldSize = oldBuffer.length;
107
+ let newSize = oldSize;
114
108
  while (group >= newSize) {
115
109
  newSize <<= 1;
116
110
  if (newSize < 0) {
117
- throw throwStyledComponentsError(16, "".concat(group));
111
+ throw throwStyledComponentsError(16, `${group}`);
118
112
  }
119
113
  }
120
114
  this.groupSizes = new Uint32Array(newSize);
121
115
  this.groupSizes.set(oldBuffer);
122
116
  this.length = newSize;
123
- for (var i = oldSize; i < newSize; i++) {
117
+ for (let i = oldSize; i < newSize; i++) {
124
118
  this.groupSizes[i] = 0;
125
119
  }
126
120
  }
127
- var ruleIndex = this.indexOfGroup(group + 1);
121
+ let ruleIndex = this.indexOfGroup(group + 1);
128
122
  if (Array.isArray(rules)) {
129
- for (var i = 0, l = rules.length; i < l; i++) {
123
+ for (let i = 0, l = rules.length; i < l; i++) {
130
124
  if (this.tag.insertRule(ruleIndex, rules[i])) {
131
125
  this.groupSizes[group]++;
132
126
  ruleIndex++;
@@ -138,115 +132,110 @@ var DefaultGroupedTag = /** @class */ (function () {
138
132
  this.groupSizes[group]++;
139
133
  }
140
134
  }
141
- };
142
- DefaultGroupedTag.prototype.clearGroup = function (group) {
135
+ }
136
+ clearGroup(group) {
143
137
  if (group < this.length) {
144
- var length_1 = this.groupSizes[group];
145
- var startIndex = this.indexOfGroup(group);
146
- var endIndex = startIndex + length_1;
138
+ const length = this.groupSizes[group];
139
+ const startIndex = this.indexOfGroup(group);
140
+ const endIndex = startIndex + length;
147
141
  this.groupSizes[group] = 0;
148
- for (var i = startIndex; i < endIndex; i++) {
142
+ for (let i = startIndex; i < endIndex; i++) {
149
143
  this.tag.deleteRule(startIndex);
150
144
  }
151
145
  }
152
- };
153
- DefaultGroupedTag.prototype.getGroup = function (group) {
154
- var css = '';
146
+ }
147
+ getGroup(group) {
148
+ let css = '';
155
149
  if (group >= this.length || this.groupSizes[group] === 0) {
156
150
  return css;
157
151
  }
158
- var length = this.groupSizes[group];
159
- var startIndex = this.indexOfGroup(group);
160
- var endIndex = startIndex + length;
161
- for (var i = startIndex; i < endIndex; i++) {
162
- css += "".concat(this.tag.getRule(i)).concat(SPLITTER);
152
+ const length = this.groupSizes[group];
153
+ const startIndex = this.indexOfGroup(group);
154
+ const endIndex = startIndex + length;
155
+ for (let i = startIndex; i < endIndex; i++) {
156
+ css += `${this.tag.getRule(i)}${SPLITTER}`;
163
157
  }
164
158
  return css;
165
- };
166
- return DefaultGroupedTag;
167
- }());
159
+ }
160
+ };
168
161
 
169
- var MAX_SMI = 1 << (31 - 1);
170
- var groupIDRegister = new Map();
171
- var reverseRegister = new Map();
172
- var nextFreeGroup = 1;
173
- var getGroupForId = function (id) {
162
+ const MAX_SMI = 1 << (31 - 1);
163
+ let groupIDRegister = new Map();
164
+ let reverseRegister = new Map();
165
+ let nextFreeGroup = 1;
166
+ const getGroupForId = (id) => {
174
167
  if (groupIDRegister.has(id)) {
175
168
  return groupIDRegister.get(id);
176
169
  }
177
170
  while (reverseRegister.has(nextFreeGroup)) {
178
171
  nextFreeGroup++;
179
172
  }
180
- var group = nextFreeGroup++;
173
+ const group = nextFreeGroup++;
181
174
  if (process.env.NODE_ENV !== 'production' && ((group | 0) < 0 || group > MAX_SMI)) {
182
- throw throwStyledComponentsError(16, "".concat(group));
175
+ throw throwStyledComponentsError(16, `${group}`);
183
176
  }
184
177
  groupIDRegister.set(id, group);
185
178
  reverseRegister.set(group, id);
186
179
  return group;
187
180
  };
188
- var getIdForGroup = function (group) {
181
+ const getIdForGroup = (group) => {
189
182
  return reverseRegister.get(group);
190
183
  };
191
- var setGroupForId = function (id, group) {
184
+ const setGroupForId = (id, group) => {
192
185
  groupIDRegister.set(id, group);
193
186
  reverseRegister.set(group, id);
194
187
  };
195
188
 
196
- var SELECTOR = "style[".concat(SC_ATTR, "][").concat(SC_ATTR_VERSION, "=\"").concat(SC_VERSION, "\"]");
197
- var MARKER_RE = new RegExp("^".concat(SC_ATTR, "\\.g(\\d+)\\[id=\"([\\w\\d-]+)\"\\].*?\"([^\"]*)"));
198
- var outputSheet = function (sheet) {
199
- var tag = sheet.getTag();
200
- var length = tag.length;
201
- var css = '';
202
- var _loop_1 = function (group) {
203
- var id = getIdForGroup(group);
189
+ const SELECTOR = `style[${SC_ATTR}][${SC_ATTR_VERSION}="${SC_VERSION}"]`;
190
+ const MARKER_RE = new RegExp(`^${SC_ATTR}\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)`);
191
+ const outputSheet = (sheet) => {
192
+ const tag = sheet.getTag();
193
+ const { length } = tag;
194
+ let css = '';
195
+ for (let group = 0; group < length; group++) {
196
+ const id = getIdForGroup(group);
204
197
  if (id === undefined)
205
- return "continue";
206
- var names = sheet.names.get(id);
207
- var rules = tag.getGroup(group);
198
+ continue;
199
+ const names = sheet.names.get(id);
200
+ const rules = tag.getGroup(group);
208
201
  if (names === undefined || rules.length === 0)
209
- return "continue";
210
- var selector = "".concat(SC_ATTR, ".g").concat(group, "[id=\"").concat(id, "\"]");
211
- var content = '';
202
+ continue;
203
+ const selector = `${SC_ATTR}.g${group}[id="${id}"]`;
204
+ let content = '';
212
205
  if (names !== undefined) {
213
- names.forEach(function (name) {
206
+ names.forEach(name => {
214
207
  if (name.length > 0) {
215
- content += "".concat(name, ",");
208
+ content += `${name},`;
216
209
  }
217
210
  });
218
211
  }
219
212
  // NOTE: It's easier to collect rules and have the marker
220
213
  // after the actual rules to simplify the rehydration
221
- css += "".concat(rules).concat(selector, "{content:\"").concat(content, "\"}").concat(SPLITTER);
222
- };
223
- for (var group = 0; group < length; group++) {
224
- _loop_1(group);
214
+ css += `${rules}${selector}{content:"${content}"}${SPLITTER}`;
225
215
  }
226
216
  return css;
227
217
  };
228
- var rehydrateNamesFromContent = function (sheet, id, content) {
229
- var names = content.split(',');
230
- var name;
231
- for (var i = 0, l = names.length; i < l; i++) {
218
+ const rehydrateNamesFromContent = (sheet, id, content) => {
219
+ const names = content.split(',');
220
+ let name;
221
+ for (let i = 0, l = names.length; i < l; i++) {
232
222
  // eslint-disable-next-line
233
223
  if ((name = names[i])) {
234
224
  sheet.registerName(id, name);
235
225
  }
236
226
  }
237
227
  };
238
- var rehydrateSheetFromTag = function (sheet, style) {
239
- var _a;
240
- var parts = ((_a = style.textContent) !== null && _a !== void 0 ? _a : '').split(SPLITTER);
241
- var rules = [];
242
- for (var i = 0, l = parts.length; i < l; i++) {
243
- var part = parts[i].trim();
228
+ const rehydrateSheetFromTag = (sheet, style) => {
229
+ const parts = (style.textContent ?? '').split(SPLITTER);
230
+ const rules = [];
231
+ for (let i = 0, l = parts.length; i < l; i++) {
232
+ const part = parts[i].trim();
244
233
  if (!part)
245
234
  continue;
246
- var marker = part.match(MARKER_RE);
235
+ const marker = part.match(MARKER_RE);
247
236
  if (marker) {
248
- var group = parseInt(marker[1], 10) | 0;
249
- var id = marker[2];
237
+ const group = parseInt(marker[1], 10) | 0;
238
+ const id = marker[2];
250
239
  if (group !== 0) {
251
240
  // Rehydrate componentId to group index mapping
252
241
  setGroupForId(id, group);
@@ -262,10 +251,10 @@ var rehydrateSheetFromTag = function (sheet, style) {
262
251
  }
263
252
  }
264
253
  };
265
- var rehydrateSheet = function (sheet) {
266
- var nodes = document.querySelectorAll(SELECTOR);
267
- for (var i = 0, l = nodes.length; i < l; i++) {
268
- var node = nodes[i];
254
+ const rehydrateSheet = (sheet) => {
255
+ const nodes = document.querySelectorAll(SELECTOR);
256
+ for (let i = 0, l = nodes.length; i < l; i++) {
257
+ const node = nodes[i];
269
258
  if (node && node.getAttribute(SC_ATTR) !== SC_ATTR_ACTIVE) {
270
259
  rehydrateSheetFromTag(sheet, node);
271
260
  if (node.parentNode) {
@@ -279,13 +268,13 @@ function getNonce() {
279
268
  return typeof __webpack_nonce__ !== 'undefined' ? __webpack_nonce__ : null;
280
269
  }
281
270
 
282
- var ELEMENT_TYPE = 1;
271
+ const ELEMENT_TYPE = 1;
283
272
  /* Node.ELEMENT_TYPE */
284
273
  /** Find last style element if any inside target */
285
- var findLastStyleTag = function (target) {
286
- var childNodes = target.childNodes;
287
- for (var i = childNodes.length; i >= 0; i--) {
288
- var child = childNodes[i];
274
+ const findLastStyleTag = (target) => {
275
+ const { childNodes } = target;
276
+ for (let i = childNodes.length; i >= 0; i--) {
277
+ const child = childNodes[i];
289
278
  if (child && child.nodeType === ELEMENT_TYPE && child.hasAttribute(SC_ATTR)) {
290
279
  return child;
291
280
  }
@@ -293,29 +282,29 @@ var findLastStyleTag = function (target) {
293
282
  return undefined;
294
283
  };
295
284
  /** Create a style element inside `target` or <head> after the last */
296
- var makeStyleTag = function (target) {
297
- var head = document.head;
298
- var parent = target || head;
299
- var style = document.createElement('style');
300
- var prevStyle = findLastStyleTag(parent);
301
- var nextSibling = prevStyle !== undefined ? prevStyle.nextSibling : null;
285
+ const makeStyleTag = (target) => {
286
+ const head = document.head;
287
+ const parent = target || head;
288
+ const style = document.createElement('style');
289
+ const prevStyle = findLastStyleTag(parent);
290
+ const nextSibling = prevStyle !== undefined ? prevStyle.nextSibling : null;
302
291
  style.setAttribute(SC_ATTR, SC_ATTR_ACTIVE);
303
292
  style.setAttribute(SC_ATTR_VERSION, SC_VERSION);
304
- var nonce = getNonce();
293
+ const nonce = getNonce();
305
294
  if (nonce)
306
295
  style.setAttribute('nonce', nonce);
307
296
  parent.insertBefore(style, nextSibling);
308
297
  return style;
309
298
  };
310
299
  /** Get the CSSStyleSheet instance for a given style element */
311
- var getSheet = function (tag) {
300
+ const getSheet = (tag) => {
312
301
  if (tag.sheet) {
313
302
  return tag.sheet;
314
303
  }
315
304
  // Avoid Firefox quirk where the style element might not have a sheet property
316
- var styleSheets = document.styleSheets;
317
- for (var i = 0, l = styleSheets.length; i < l; i++) {
318
- var sheet = styleSheets[i];
305
+ const { styleSheets } = document;
306
+ for (let i = 0, l = styleSheets.length; i < l; i++) {
307
+ const sheet = styleSheets[i];
319
308
  if (sheet.ownerNode === tag) {
320
309
  return sheet;
321
310
  }
@@ -324,8 +313,7 @@ var getSheet = function (tag) {
324
313
  };
325
314
 
326
315
  /** Create a CSSStyleSheet-like tag depending on the environment */
327
- var makeTag = function (_a) {
328
- var isServer = _a.isServer, useCSSOMInjection = _a.useCSSOMInjection, target = _a.target;
316
+ const makeTag = ({ isServer, useCSSOMInjection, target }) => {
329
317
  if (isServer) {
330
318
  return new VirtualTag(target);
331
319
  }
@@ -336,15 +324,18 @@ var makeTag = function (_a) {
336
324
  return new TextTag(target);
337
325
  }
338
326
  };
339
- var CSSOMTag = /** @class */ (function () {
340
- function CSSOMTag(target) {
341
- var element = (this.element = makeStyleTag(target));
327
+ const CSSOMTag = class CSSOMTag {
328
+ element;
329
+ sheet;
330
+ length;
331
+ constructor(target) {
332
+ const element = (this.element = makeStyleTag(target));
342
333
  // Avoid Edge bug where empty style elements don't create sheets
343
334
  element.appendChild(document.createTextNode(''));
344
335
  this.sheet = getSheet(element);
345
336
  this.length = 0;
346
337
  }
347
- CSSOMTag.prototype.insertRule = function (index, rule) {
338
+ insertRule(index, rule) {
348
339
  try {
349
340
  this.sheet.insertRule(rule, index);
350
341
  this.length++;
@@ -353,13 +344,13 @@ var CSSOMTag = /** @class */ (function () {
353
344
  catch (_error) {
354
345
  return false;
355
346
  }
356
- };
357
- CSSOMTag.prototype.deleteRule = function (index) {
347
+ }
348
+ deleteRule(index) {
358
349
  this.sheet.deleteRule(index);
359
350
  this.length--;
360
- };
361
- CSSOMTag.prototype.getRule = function (index) {
362
- var rule = this.sheet.cssRules[index];
351
+ }
352
+ getRule(index) {
353
+ const rule = this.sheet.cssRules[index];
363
354
  // Avoid IE11 quirk where cssText is inaccessible on some invalid rules
364
355
  if (rule !== undefined && typeof rule.cssText === 'string') {
365
356
  return rule.cssText;
@@ -367,20 +358,22 @@ var CSSOMTag = /** @class */ (function () {
367
358
  else {
368
359
  return '';
369
360
  }
370
- };
371
- return CSSOMTag;
372
- }());
361
+ }
362
+ };
373
363
  /** A Tag that emulates the CSSStyleSheet API but uses text nodes */
374
- var TextTag = /** @class */ (function () {
375
- function TextTag(target) {
376
- var element = (this.element = makeStyleTag(target));
364
+ const TextTag = class TextTag {
365
+ element;
366
+ nodes;
367
+ length;
368
+ constructor(target) {
369
+ const element = (this.element = makeStyleTag(target));
377
370
  this.nodes = element.childNodes;
378
371
  this.length = 0;
379
372
  }
380
- TextTag.prototype.insertRule = function (index, rule) {
373
+ insertRule(index, rule) {
381
374
  if (index <= this.length && index >= 0) {
382
- var node = document.createTextNode(rule);
383
- var refNode = this.nodes[index];
375
+ const node = document.createTextNode(rule);
376
+ const refNode = this.nodes[index];
384
377
  this.element.insertBefore(node, refNode || null);
385
378
  this.length++;
386
379
  return true;
@@ -388,28 +381,29 @@ var TextTag = /** @class */ (function () {
388
381
  else {
389
382
  return false;
390
383
  }
391
- };
392
- TextTag.prototype.deleteRule = function (index) {
384
+ }
385
+ deleteRule(index) {
393
386
  this.element.removeChild(this.nodes[index]);
394
387
  this.length--;
395
- };
396
- TextTag.prototype.getRule = function (index) {
388
+ }
389
+ getRule(index) {
397
390
  if (index < this.length) {
398
391
  return this.nodes[index].textContent;
399
392
  }
400
393
  else {
401
394
  return '';
402
395
  }
403
- };
404
- return TextTag;
405
- }());
396
+ }
397
+ };
406
398
  /** A completely virtual (server-side) Tag that doesn't manipulate the DOM */
407
- var VirtualTag = /** @class */ (function () {
408
- function VirtualTag(_target) {
399
+ const VirtualTag = class VirtualTag {
400
+ rules;
401
+ length;
402
+ constructor(_target) {
409
403
  this.rules = [];
410
404
  this.length = 0;
411
405
  }
412
- VirtualTag.prototype.insertRule = function (index, rule) {
406
+ insertRule(index, rule) {
413
407
  if (index <= this.length) {
414
408
  this.rules.splice(index, 0, rule);
415
409
  this.length++;
@@ -418,33 +412,42 @@ var VirtualTag = /** @class */ (function () {
418
412
  else {
419
413
  return false;
420
414
  }
421
- };
422
- VirtualTag.prototype.deleteRule = function (index) {
415
+ }
416
+ deleteRule(index) {
423
417
  this.rules.splice(index, 1);
424
418
  this.length--;
425
- };
426
- VirtualTag.prototype.getRule = function (index) {
419
+ }
420
+ getRule(index) {
427
421
  if (index < this.length) {
428
422
  return this.rules[index];
429
423
  }
430
424
  else {
431
425
  return '';
432
426
  }
433
- };
434
- return VirtualTag;
435
- }());
427
+ }
428
+ };
436
429
 
437
- var SHOULD_REHYDRATE = IS_BROWSER;
438
- var defaultOptions = {
430
+ let SHOULD_REHYDRATE = IS_BROWSER;
431
+ const defaultOptions = {
439
432
  isServer: !IS_BROWSER,
440
433
  useCSSOMInjection: !DISABLE_SPEEDY,
441
434
  };
442
435
  /** Contains the main stylesheet logic for stringification and caching */
443
- var StyleSheet = /** @class */ (function () {
444
- function StyleSheet(options, globalStyles, names) {
445
- if (options === void 0) { options = EMPTY_OBJECT; }
446
- if (globalStyles === void 0) { globalStyles = {}; }
447
- this.options = __assign(__assign({}, defaultOptions), options);
436
+ class StyleSheet {
437
+ gs;
438
+ names;
439
+ options;
440
+ server;
441
+ tag;
442
+ /** Register a group ID to give it an index */
443
+ static registerId(id) {
444
+ return getGroupForId(id);
445
+ }
446
+ constructor(options = EMPTY_OBJECT, globalStyles = {}, names) {
447
+ this.options = {
448
+ ...defaultOptions,
449
+ ...options,
450
+ };
448
451
  this.gs = globalStyles;
449
452
  this.names = new Map(names);
450
453
  this.server = !!options.isServer;
@@ -454,96 +457,89 @@ var StyleSheet = /** @class */ (function () {
454
457
  rehydrateSheet(this);
455
458
  }
456
459
  }
457
- /** Register a group ID to give it an index */
458
- StyleSheet.registerId = function (id) {
459
- return getGroupForId(id);
460
- };
461
- StyleSheet.prototype.reconstructWithOptions = function (options, withNames) {
462
- if (withNames === void 0) { withNames = true; }
463
- return new StyleSheet(__assign(__assign({}, this.options), options), this.gs, (withNames && this.names) || undefined);
464
- };
465
- StyleSheet.prototype.allocateGSInstance = function (id) {
460
+ reconstructWithOptions(options, withNames = true) {
461
+ return new StyleSheet({ ...this.options, ...options }, this.gs, (withNames && this.names) || undefined);
462
+ }
463
+ allocateGSInstance(id) {
466
464
  return (this.gs[id] = (this.gs[id] || 0) + 1);
467
- };
465
+ }
468
466
  /** Lazily initialises a GroupedTag for when it's actually needed */
469
- StyleSheet.prototype.getTag = function () {
467
+ getTag() {
470
468
  return this.tag || (this.tag = makeGroupedTag(makeTag(this.options)));
471
- };
469
+ }
472
470
  /** Check whether a name is known for caching */
473
- StyleSheet.prototype.hasNameForId = function (id, name) {
471
+ hasNameForId(id, name) {
474
472
  return this.names.has(id) && this.names.get(id).has(name);
475
- };
473
+ }
476
474
  /** Mark a group's name as known for caching */
477
- StyleSheet.prototype.registerName = function (id, name) {
475
+ registerName(id, name) {
478
476
  getGroupForId(id);
479
477
  if (!this.names.has(id)) {
480
- var groupNames = new Set();
478
+ const groupNames = new Set();
481
479
  groupNames.add(name);
482
480
  this.names.set(id, groupNames);
483
481
  }
484
482
  else {
485
483
  this.names.get(id).add(name);
486
484
  }
487
- };
485
+ }
488
486
  /** Insert new rules which also marks the name as known */
489
- StyleSheet.prototype.insertRules = function (id, name, rules) {
487
+ insertRules(id, name, rules) {
490
488
  this.registerName(id, name);
491
489
  this.getTag().insertRules(getGroupForId(id), rules);
492
- };
490
+ }
493
491
  /** Clears all cached names for a given group ID */
494
- StyleSheet.prototype.clearNames = function (id) {
492
+ clearNames(id) {
495
493
  if (this.names.has(id)) {
496
494
  this.names.get(id).clear();
497
495
  }
498
- };
496
+ }
499
497
  /** Clears all rules for a given group ID */
500
- StyleSheet.prototype.clearRules = function (id) {
498
+ clearRules(id) {
501
499
  this.getTag().clearGroup(getGroupForId(id));
502
500
  this.clearNames(id);
503
- };
501
+ }
504
502
  /** Clears the entire tag which deletes all rules but not its names */
505
- StyleSheet.prototype.clearTag = function () {
503
+ clearTag() {
506
504
  // NOTE: This does not clear the names, since it's only used during SSR
507
505
  // so that we can continuously output only new rules
508
506
  this.tag = undefined;
509
- };
507
+ }
510
508
  /** Outputs the current sheet as a CSS string with markers for SSR */
511
- StyleSheet.prototype.toString = function () {
509
+ toString() {
512
510
  return outputSheet(this);
513
- };
514
- return StyleSheet;
515
- }());
511
+ }
512
+ }
516
513
 
517
- var SEED = 5381;
514
+ const SEED = 5381;
518
515
  // When we have separate strings it's useful to run a progressive
519
516
  // version of djb2 where we pretend that we're still looping over
520
517
  // the same string
521
- var phash = function (h, x) {
522
- var i = x.length;
518
+ const phash = (h, x) => {
519
+ let i = x.length;
523
520
  while (i) {
524
521
  h = (h * 33) ^ x.charCodeAt(--i);
525
522
  }
526
523
  return h;
527
524
  };
528
525
  // This is a djb2 hashing function
529
- var hash = function (x) {
526
+ const hash = (x) => {
530
527
  return phash(SEED, x);
531
528
  };
532
529
 
533
- var COMMENT_REGEX = /^\s*\/\/.*$/gm;
534
- var COMPLEX_SELECTOR_PREFIX = [':', '[', '.', '#'];
535
- function createStylisInstance(_a) {
536
- var _b = _a === void 0 ? EMPTY_OBJECT : _a, _c = _b.options, options = _c === void 0 ? EMPTY_OBJECT : _c, _d = _b.plugins, plugins = _d === void 0 ? EMPTY_ARRAY : _d;
537
- var _componentId;
538
- var _selector;
539
- var _selectorRegexp;
540
- var _consecutiveSelfRefRegExp;
541
- var selfReferenceReplacer = function (match, offset, string) {
530
+ const COMMENT_REGEX = /^\s*\/\/.*$/gm;
531
+ const COMPLEX_SELECTOR_PREFIX = [':', '[', '.', '#'];
532
+ function createStylisInstance({ options = EMPTY_OBJECT, plugins = EMPTY_ARRAY, } = EMPTY_OBJECT) {
533
+ let _componentId;
534
+ let _selector;
535
+ let _selectorRegexp;
536
+ let _consecutiveSelfRefRegExp;
537
+ const selfReferenceReplacer = (match, offset, string) => {
542
538
  if (
543
539
  // do not replace the first occurrence if it is complex (has a modifier)
544
540
  (offset === 0 ? !COMPLEX_SELECTOR_PREFIX.includes(string[_selector.length]) : true) && // no consecutive self refs (.b.b); that is a precedence boost and treated differently
545
541
  !string.match(_consecutiveSelfRefRegExp)) {
546
- return ".".concat(_componentId);
542
+ return `.${_componentId}`;
547
543
  }
548
544
  return match;
549
545
  };
@@ -559,34 +555,31 @@ function createStylisInstance(_a) {
559
555
  *
560
556
  * https://github.com/thysultan/stylis.js/tree/v4.0.2#abstract-syntax-structure
561
557
  */
562
- var selfReferenceReplacementPlugin = function (element) {
558
+ const selfReferenceReplacementPlugin = element => {
563
559
  if (element.type === RULESET && element.value.includes('&')) {
564
- var props = element.props;
560
+ const props = element.props;
565
561
  props[0] = props[0].replace(_selectorRegexp, selfReferenceReplacer);
566
562
  }
567
563
  };
568
- var stringifyRules = function (css, selector, prefix, componentId) {
569
- if (selector === void 0) { selector = ''; }
570
- if (prefix === void 0) { prefix = ''; }
571
- if (componentId === void 0) { componentId = '&'; }
572
- var flatCSS = css.replace(COMMENT_REGEX, '');
564
+ const stringifyRules = (css, selector = '', prefix = '', componentId = '&') => {
565
+ let flatCSS = css.replace(COMMENT_REGEX, '');
573
566
  // stylis has no concept of state to be passed to plugins
574
567
  // but since JS is single-threaded, we can rely on that to ensure
575
568
  // these properties stay in sync with the current stylis run
576
569
  _componentId = componentId;
577
570
  _selector = selector;
578
- _selectorRegexp = new RegExp("\\".concat(_selector, "\\b"), 'g');
579
- _consecutiveSelfRefRegExp = new RegExp("(\\".concat(_selector, "\\b){2,}"));
580
- var middlewares = plugins.slice();
571
+ _selectorRegexp = new RegExp(`\\${_selector}\\b`, 'g');
572
+ _consecutiveSelfRefRegExp = new RegExp(`(\\${_selector}\\b){2,}`);
573
+ const middlewares = plugins.slice();
581
574
  if (options.prefix || options.prefix === undefined) {
582
575
  middlewares.unshift(prefixer);
583
576
  }
584
577
  middlewares.push(selfReferenceReplacementPlugin, stringify);
585
- return serialize(compile(prefix || selector ? "".concat(prefix, " ").concat(selector, " { ").concat(flatCSS, " }") : flatCSS), middleware(middlewares));
578
+ return serialize(compile(prefix || selector ? `${prefix} ${selector} { ${flatCSS} }` : flatCSS), middleware(middlewares));
586
579
  };
587
580
  stringifyRules.hash = plugins.length
588
581
  ? plugins
589
- .reduce(function (acc, plugin) {
582
+ .reduce((acc, plugin) => {
590
583
  if (!plugin.name) {
591
584
  throwStyledComponentsError(15);
592
585
  }
@@ -597,36 +590,35 @@ function createStylisInstance(_a) {
597
590
  return stringifyRules;
598
591
  }
599
592
 
600
- var StyleSheetContext = React.createContext(undefined);
593
+ const StyleSheetContext = React.createContext(undefined);
601
594
  StyleSheetContext.Consumer;
602
- var StylisContext = React.createContext(undefined);
595
+ const StylisContext = React.createContext(undefined);
603
596
  StylisContext.Consumer;
604
597
  new StyleSheet();
605
- var mainStylis = createStylisInstance();
598
+ const mainStylis = createStylisInstance();
606
599
 
607
- var Keyframes = /** @class */ (function () {
608
- function Keyframes(name, rules) {
609
- var _this = this;
610
- this.inject = function (styleSheet, stylisInstance) {
611
- if (stylisInstance === void 0) { stylisInstance = mainStylis; }
612
- var resolvedName = _this.name + stylisInstance.hash;
613
- if (!styleSheet.hasNameForId(_this.id, resolvedName)) {
614
- styleSheet.insertRules(_this.id, resolvedName, stylisInstance(_this.rules, resolvedName, '@keyframes'));
615
- }
616
- };
617
- this.toString = function () {
618
- throw throwStyledComponentsError(12, String(_this.name));
619
- };
600
+ class Keyframes {
601
+ id;
602
+ name;
603
+ rules;
604
+ constructor(name, rules) {
620
605
  this.name = name;
621
- this.id = "sc-keyframes-".concat(name);
606
+ this.id = `sc-keyframes-${name}`;
622
607
  this.rules = rules;
623
608
  }
624
- Keyframes.prototype.getName = function (stylisInstance) {
625
- if (stylisInstance === void 0) { stylisInstance = mainStylis; }
626
- return this.name + stylisInstance.hash;
609
+ inject = (styleSheet, stylisInstance = mainStylis) => {
610
+ const resolvedName = this.name + stylisInstance.hash;
611
+ if (!styleSheet.hasNameForId(this.id, resolvedName)) {
612
+ styleSheet.insertRules(this.id, resolvedName, stylisInstance(this.rules, resolvedName, '@keyframes'));
613
+ }
614
+ };
615
+ toString = () => {
616
+ throw throwStyledComponentsError(12, String(this.name));
627
617
  };
628
- return Keyframes;
629
- }());
618
+ getName(stylisInstance = mainStylis) {
619
+ return this.name + stylisInstance.hash;
620
+ }
621
+ }
630
622
 
631
623
  // Taken from https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/shared/dangerousStyleValue.js
632
624
  function addUnitIfNeeded(name, value) {
@@ -635,7 +627,7 @@ function addUnitIfNeeded(name, value) {
635
627
  return '';
636
628
  }
637
629
  if (typeof value === 'number' && value !== 0 && !(name in unitless)) {
638
- return "".concat(value, "px"); // Presumes implicit 'px' suffix for unitless numbers
630
+ return `${value}px`; // Presumes implicit 'px' suffix for unitless numbers
639
631
  }
640
632
  return String(value).trim();
641
633
  }
@@ -651,10 +643,10 @@ function getComponentName(target) {
651
643
  * inlined version of
652
644
  * https://github.com/facebook/fbjs/blob/master/packages/fbjs/src/core/hyphenateStyleName.js
653
645
  */
654
- var uppercaseCheck = /([A-Z])/;
655
- var uppercasePattern = /([A-Z])/g;
656
- var msPattern = /^ms-/;
657
- var prefixAndLowerCase = function (char) { return "-".concat(char.toLowerCase()); };
646
+ const uppercaseCheck = /([A-Z])/;
647
+ const uppercasePattern = /([A-Z])/g;
648
+ const msPattern = /^ms-/;
649
+ const prefixAndLowerCase = (char) => `-${char.toLowerCase()}`;
658
650
  /**
659
651
  * Hyphenates a camelcased CSS property name, for example:
660
652
  *
@@ -700,35 +692,33 @@ function isStyledComponent(target) {
700
692
  /**
701
693
  * It's falsish not falsy because 0 is allowed.
702
694
  */
703
- var isFalsish = function (chunk) {
704
- return chunk === undefined || chunk === null || chunk === false || chunk === '';
705
- };
706
- var objToCssArray = function (obj, prevKey) {
707
- var rules = [];
708
- for (var key in obj) {
695
+ const isFalsish = (chunk) => chunk === undefined || chunk === null || chunk === false || chunk === '';
696
+ const objToCssArray = (obj, prevKey) => {
697
+ const rules = [];
698
+ for (const key in obj) {
709
699
  if (!obj.hasOwnProperty(key) || isFalsish(obj[key]))
710
700
  continue;
711
701
  if ((Array.isArray(obj[key]) && obj[key].isCss) || isFunction(obj[key])) {
712
- rules.push("".concat(hyphenateStyleName(key), ":"), obj[key], ';');
702
+ rules.push(`${hyphenateStyleName(key)}:`, obj[key], ';');
713
703
  }
714
704
  else if (isPlainObject(obj[key])) {
715
- rules.push.apply(rules, __spreadArray([], __read(objToCssArray(obj[key], key)), false));
705
+ rules.push(...objToCssArray(obj[key], key));
716
706
  }
717
707
  else {
718
- rules.push("".concat(hyphenateStyleName(key), ": ").concat(addUnitIfNeeded(key, obj[key]), ";"));
708
+ rules.push(`${hyphenateStyleName(key)}: ${addUnitIfNeeded(key, obj[key])};`);
719
709
  }
720
710
  }
721
- return prevKey ? __spreadArray(__spreadArray(["".concat(prevKey, " {")], __read(rules), false), ['}'], false) : rules;
711
+ return prevKey ? [`${prevKey} {`, ...rules, '}'] : rules;
722
712
  };
723
713
  function flatten(chunk, executionContext, styleSheet, stylisInstance) {
724
714
  if (Array.isArray(chunk)) {
725
- var ruleSet = [];
726
- for (var i = 0, len = chunk.length, result = void 0; i < len; i += 1) {
715
+ const ruleSet = [];
716
+ for (let i = 0, len = chunk.length, result; i < len; i += 1) {
727
717
  result = flatten(chunk[i], executionContext, styleSheet, stylisInstance);
728
718
  if (result === '')
729
719
  continue;
730
720
  else if (Array.isArray(result))
731
- ruleSet.push.apply(ruleSet, __spreadArray([], __read(result), false));
721
+ ruleSet.push(...result);
732
722
  else
733
723
  ruleSet.push(result);
734
724
  }
@@ -739,22 +729,22 @@ function flatten(chunk, executionContext, styleSheet, stylisInstance) {
739
729
  }
740
730
  /* Handle other components */
741
731
  if (isStyledComponent(chunk)) {
742
- return ".".concat(chunk.styledComponentId);
732
+ return `.${chunk.styledComponentId}`;
743
733
  }
744
734
  /* Either execute or defer the function */
745
735
  if (isFunction(chunk)) {
746
736
  if (isStatelessFunction(chunk) && executionContext) {
747
- var chunkFn = chunk;
748
- var result = chunkFn(executionContext);
737
+ const chunkFn = chunk;
738
+ const result = chunkFn(executionContext);
749
739
  if (process.env.NODE_ENV !== 'production' &&
750
740
  typeof result === 'object' &&
751
741
  !Array.isArray(result) &&
752
742
  !(result instanceof Keyframes) &&
753
743
  !isPlainObject(result)) {
754
744
  // eslint-disable-next-line no-console
755
- console.error("".concat(getComponentName(
745
+ console.error(`${getComponentName(
756
746
  // @ts-expect-error handling unexpected input
757
- chunkFn), " is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."));
747
+ chunkFn)} is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.`);
758
748
  }
759
749
  return flatten(result, executionContext, styleSheet, stylisInstance);
760
750
  }
@@ -774,8 +764,8 @@ function flatten(chunk, executionContext, styleSheet, stylisInstance) {
774
764
  }
775
765
 
776
766
  function interleave(strings, interpolations) {
777
- var result = [strings[0]];
778
- for (var i = 0, len = interpolations.length; i < len; i += 1) {
767
+ const result = [strings[0]];
768
+ for (let i = 0, len = interpolations.length; i < len; i += 1) {
779
769
  result.push(interpolations[i], strings[i + 1]);
780
770
  }
781
771
  return result;
@@ -785,25 +775,22 @@ function interleave(strings, interpolations) {
785
775
  * Used when flattening object styles to determine if we should
786
776
  * expand an array of styles.
787
777
  */
788
- var addTag = function (arg) {
778
+ const addTag = (arg) => {
789
779
  if (Array.isArray(arg)) {
790
780
  // eslint-disable-next-line no-param-reassign
791
781
  arg.isCss = true;
792
782
  }
793
783
  return arg;
794
784
  };
795
- function css(styles) {
796
- var interpolations = [];
797
- for (var _i = 1; _i < arguments.length; _i++) {
798
- interpolations[_i - 1] = arguments[_i];
799
- }
785
+ function css(styles, ...interpolations) {
800
786
  if (isFunction(styles) || isPlainObject(styles)) {
801
- var styleFunctionOrObject = styles;
802
- return addTag(flatten(interleave(EMPTY_ARRAY, __spreadArray([
803
- styleFunctionOrObject
804
- ], __read(interpolations), false))));
787
+ const styleFunctionOrObject = styles;
788
+ return addTag(flatten(interleave(EMPTY_ARRAY, [
789
+ styleFunctionOrObject,
790
+ ...interpolations,
791
+ ])));
805
792
  }
806
- var styleStringArray = styles;
793
+ const styleStringArray = styles;
807
794
  if (interpolations.length === 0 &&
808
795
  styleStringArray.length === 1 &&
809
796
  typeof styleStringArray[0] === 'string') {
@@ -812,8 +799,7 @@ function css(styles) {
812
799
  return addTag(flatten(interleave(styleStringArray, interpolations)));
813
800
  }
814
801
 
815
- function constructWithOptions(componentConstructor, tag, options) {
816
- if (options === void 0) { options = EMPTY_OBJECT; }
802
+ function constructWithOptions(componentConstructor, tag, options = EMPTY_OBJECT) {
817
803
  // We trust that the tag is a valid component as long as it isn't falsish
818
804
  // Typically the tag here is a string or function (i.e. class or pure function component)
819
805
  // However a component may also be an object if it uses another utility, e.g. React.memo
@@ -822,34 +808,30 @@ function constructWithOptions(componentConstructor, tag, options) {
822
808
  throw throwStyledComponentsError(1, tag);
823
809
  }
824
810
  /* This is callable directly as a template function */
825
- var templateFunction = function (initialStyles) {
826
- var interpolations = [];
827
- for (var _i = 1; _i < arguments.length; _i++) {
828
- interpolations[_i - 1] = arguments[_i];
829
- }
830
- return componentConstructor(tag, options, css.apply(void 0, __spreadArray([initialStyles], __read(interpolations), false)));
831
- };
811
+ const templateFunction = (initialStyles, ...interpolations) => componentConstructor(tag, options, css(initialStyles, ...interpolations));
832
812
  /* Modify/inject new props at runtime */
833
- templateFunction.attrs = function (attrs) {
834
- return constructWithOptions(componentConstructor, tag, __assign(__assign({}, options), { attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean) }));
835
- };
813
+ templateFunction.attrs = (attrs) => constructWithOptions(componentConstructor, tag, {
814
+ ...options,
815
+ attrs: Array.prototype.concat(options.attrs, attrs).filter(Boolean),
816
+ });
836
817
  /**
837
818
  * If config methods are called, wrap up a new template function and merge options */
838
- templateFunction.withConfig = function (config) {
839
- return constructWithOptions(componentConstructor, tag, __assign(__assign({}, options), config));
840
- };
819
+ templateFunction.withConfig = (config) => constructWithOptions(componentConstructor, tag, {
820
+ ...options,
821
+ ...config,
822
+ });
841
823
  return templateFunction;
842
824
  }
843
825
 
844
- var ThemeContext = React.createContext(undefined);
845
- var ThemeConsumer = ThemeContext.Consumer;
826
+ const ThemeContext = React.createContext(undefined);
827
+ const ThemeConsumer = ThemeContext.Consumer;
846
828
  function mergeTheme(theme, outerTheme) {
847
829
  if (!theme) {
848
830
  throw throwStyledComponentsError(14);
849
831
  }
850
832
  if (isFunction(theme)) {
851
- var themeFn = theme;
852
- var mergedTheme = themeFn(outerTheme);
833
+ const themeFn = theme;
834
+ const mergedTheme = themeFn(outerTheme);
853
835
  if (process.env.NODE_ENV !== 'production' &&
854
836
  (mergedTheme === null || Array.isArray(mergedTheme) || typeof mergedTheme !== 'object')) {
855
837
  throw throwStyledComponentsError(7);
@@ -859,34 +841,32 @@ function mergeTheme(theme, outerTheme) {
859
841
  if (Array.isArray(theme) || typeof theme !== 'object') {
860
842
  throw throwStyledComponentsError(8);
861
843
  }
862
- return outerTheme ? __assign(__assign({}, outerTheme), theme) : theme;
844
+ return outerTheme ? { ...outerTheme, ...theme } : theme;
863
845
  }
864
846
  /**
865
847
  * Provide a theme to an entire react component tree via context
866
848
  */
867
849
  function ThemeProvider(props) {
868
- var outerTheme = useContext(ThemeContext);
869
- var themeContext = useMemo(function () { return mergeTheme(props.theme, outerTheme); }, [props.theme, outerTheme]);
850
+ const outerTheme = useContext(ThemeContext);
851
+ const themeContext = useMemo(() => mergeTheme(props.theme, outerTheme), [props.theme, outerTheme]);
870
852
  if (!props.children) {
871
853
  return null;
872
854
  }
873
855
  return React.createElement(ThemeContext.Provider, { value: themeContext }, props.children);
874
856
  }
875
857
 
876
- function determineTheme(props, providedTheme, defaultProps) {
877
- if (defaultProps === void 0) { defaultProps = EMPTY_OBJECT; }
858
+ function determineTheme(props, providedTheme, defaultProps = EMPTY_OBJECT) {
878
859
  return (props.theme !== defaultProps.theme && props.theme) || providedTheme || defaultProps.theme;
879
860
  }
880
861
 
881
- var _a;
882
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
862
+ const hasSymbol = typeof Symbol === 'function' && Symbol.for;
883
863
  // copied from react-is
884
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
885
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
864
+ const REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
865
+ const REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
886
866
  /**
887
867
  * Adapted from hoist-non-react-statics to avoid the react-is dependency.
888
868
  */
889
- var REACT_STATICS = {
869
+ const REACT_STATICS = {
890
870
  childContextTypes: true,
891
871
  contextType: true,
892
872
  contextTypes: true,
@@ -899,7 +879,7 @@ var REACT_STATICS = {
899
879
  propTypes: true,
900
880
  type: true,
901
881
  };
902
- var KNOWN_STATICS = {
882
+ const KNOWN_STATICS = {
903
883
  name: true,
904
884
  length: true,
905
885
  prototype: true,
@@ -908,14 +888,14 @@ var KNOWN_STATICS = {
908
888
  arguments: true,
909
889
  arity: true,
910
890
  };
911
- var FORWARD_REF_STATICS = {
891
+ const FORWARD_REF_STATICS = {
912
892
  $$typeof: true,
913
893
  render: true,
914
894
  defaultProps: true,
915
895
  displayName: true,
916
896
  propTypes: true,
917
897
  };
918
- var MEMO_STATICS = {
898
+ const MEMO_STATICS = {
919
899
  $$typeof: true,
920
900
  compare: true,
921
901
  defaultProps: true,
@@ -923,13 +903,13 @@ var MEMO_STATICS = {
923
903
  propTypes: true,
924
904
  type: true,
925
905
  };
926
- var TYPE_STATICS = (_a = {},
927
- _a[REACT_FORWARD_REF_TYPE] = FORWARD_REF_STATICS,
928
- _a[REACT_MEMO_TYPE] = MEMO_STATICS,
929
- _a);
906
+ const TYPE_STATICS = {
907
+ [REACT_FORWARD_REF_TYPE]: FORWARD_REF_STATICS,
908
+ [REACT_MEMO_TYPE]: MEMO_STATICS,
909
+ };
930
910
  // adapted from react-is
931
911
  function isMemo(object) {
932
- var $$typeofType = 'type' in object && object.type.$$typeof;
912
+ const $$typeofType = 'type' in object && object.type.$$typeof;
933
913
  return $$typeofType === REACT_MEMO_TYPE;
934
914
  }
935
915
  function getStatics(component) {
@@ -942,34 +922,34 @@ function getStatics(component) {
942
922
  ? TYPE_STATICS[component['$$typeof']]
943
923
  : REACT_STATICS;
944
924
  }
945
- var defineProperty = Object.defineProperty;
946
- var getOwnPropertyNames = Object.getOwnPropertyNames;
947
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
948
- var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
949
- var getPrototypeOf = Object.getPrototypeOf;
950
- var objectPrototype = Object.prototype;
925
+ const defineProperty = Object.defineProperty;
926
+ const getOwnPropertyNames = Object.getOwnPropertyNames;
927
+ const getOwnPropertySymbols = Object.getOwnPropertySymbols;
928
+ const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
929
+ const getPrototypeOf = Object.getPrototypeOf;
930
+ const objectPrototype = Object.prototype;
951
931
  function hoistNonReactStatics(targetComponent, sourceComponent, excludelist) {
952
932
  if (typeof sourceComponent !== 'string') {
953
933
  // don't hoist over string (html) components
954
934
  if (objectPrototype) {
955
- var inheritedComponent = getPrototypeOf(sourceComponent);
935
+ const inheritedComponent = getPrototypeOf(sourceComponent);
956
936
  if (inheritedComponent && inheritedComponent !== objectPrototype) {
957
937
  hoistNonReactStatics(targetComponent, inheritedComponent, excludelist);
958
938
  }
959
939
  }
960
- var keys = getOwnPropertyNames(sourceComponent);
940
+ let keys = getOwnPropertyNames(sourceComponent);
961
941
  if (getOwnPropertySymbols) {
962
942
  keys = keys.concat(getOwnPropertySymbols(sourceComponent));
963
943
  }
964
- var targetStatics = getStatics(targetComponent);
965
- var sourceStatics = getStatics(sourceComponent);
966
- for (var i = 0; i < keys.length; ++i) {
967
- var key = keys[i];
944
+ const targetStatics = getStatics(targetComponent);
945
+ const sourceStatics = getStatics(sourceComponent);
946
+ for (let i = 0; i < keys.length; ++i) {
947
+ const key = keys[i];
968
948
  if (!(key in KNOWN_STATICS) &&
969
949
  !(excludelist && excludelist[key]) &&
970
950
  !(sourceStatics && key in sourceStatics) &&
971
951
  !(targetStatics && key in targetStatics)) {
972
- var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
952
+ const descriptor = getOwnPropertyDescriptor(sourceComponent, key);
973
953
  try {
974
954
  // Avoid failures from read-only properties
975
955
  defineProperty(targetComponent, key, descriptor);
@@ -984,31 +964,31 @@ function hoistNonReactStatics(targetComponent, sourceComponent, excludelist) {
984
964
  }
985
965
 
986
966
  function withTheme(Component) {
987
- var WithTheme = React.forwardRef(function (props, ref) {
988
- var theme = React.useContext(ThemeContext);
989
- var themeProp = determineTheme(props, theme, Component.defaultProps);
967
+ const WithTheme = React.forwardRef((props, ref) => {
968
+ const theme = React.useContext(ThemeContext);
969
+ const themeProp = determineTheme(props, theme, Component.defaultProps);
990
970
  if (process.env.NODE_ENV !== 'production' && themeProp === undefined) {
991
971
  // eslint-disable-next-line no-console
992
- console.warn("[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"".concat(getComponentName(Component), "\""));
972
+ console.warn(`[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class "${getComponentName(Component)}"`);
993
973
  }
994
- return React.createElement(Component, __assign({}, props, { theme: themeProp, ref: ref }));
974
+ return React.createElement(Component, { ...props, theme: themeProp, ref: ref });
995
975
  });
996
- WithTheme.displayName = "WithTheme(".concat(getComponentName(Component), ")");
976
+ WithTheme.displayName = `WithTheme(${getComponentName(Component)})`;
997
977
  return hoistNonReactStatics(WithTheme, Component);
998
978
  }
999
979
 
1000
- var useTheme = function () { return useContext(ThemeContext); };
980
+ const useTheme = () => useContext(ThemeContext);
1001
981
 
1002
- var AD_REPLACER_R = /(a)(d)/gi;
982
+ const AD_REPLACER_R = /(a)(d)/gi;
1003
983
  /* This is the "capacity" of our alphabet i.e. 2x26 for all letters plus their capitalised
1004
984
  * counterparts */
1005
- var charsLength = 52;
985
+ const charsLength = 52;
1006
986
  /* start at 75 for 'a' until 'z' (25) and then start at 65 for capitalised letters */
1007
- var getAlphabeticChar = function (code) { return String.fromCharCode(code + (code > 25 ? 39 : 97)); };
987
+ const getAlphabeticChar = (code) => String.fromCharCode(code + (code > 25 ? 39 : 97));
1008
988
  /* input a number, usually a hash and convert it to base-52 */
1009
989
  function generateAlphabeticName(code) {
1010
- var name = '';
1011
- var x;
990
+ let name = '';
991
+ let x;
1012
992
  /* get a char and divide by alphabet-length */
1013
993
  for (x = Math.abs(code); x > charsLength; x = (x / charsLength) | 0) {
1014
994
  name = getAlphabeticChar(x % charsLength) + name;
@@ -1020,41 +1000,41 @@ function generateComponentId(str) {
1020
1000
  return generateAlphabeticName(hash(str) >>> 0);
1021
1001
  }
1022
1002
 
1023
- var generated = {};
1003
+ let generated = {};
1024
1004
  /**
1025
1005
  * InlineStyle takes arbitrary CSS and generates a flat object
1026
1006
  */
1027
1007
  function makeInlineStyleClass(styleSheet) {
1028
- var InlineStyle = /** @class */ (function () {
1029
- function InlineStyle(rules) {
1008
+ const InlineStyle = class InlineStyle {
1009
+ rules;
1010
+ constructor(rules) {
1030
1011
  this.rules = rules;
1031
1012
  }
1032
- InlineStyle.prototype.generateStyleObject = function (executionContext) {
1013
+ generateStyleObject(executionContext) {
1033
1014
  // keyframes, functions, and component selectors are not allowed for React Native
1034
- var flatCSS = flatten(this.rules, executionContext).join('');
1035
- var hash = generateComponentId(flatCSS);
1015
+ const flatCSS = flatten(this.rules, executionContext).join('');
1016
+ const hash = generateComponentId(flatCSS);
1036
1017
  if (!generated[hash]) {
1037
- var root = parse(flatCSS);
1038
- var declPairs_1 = [];
1039
- root.each(function (node) {
1018
+ const root = parse(flatCSS);
1019
+ const declPairs = [];
1020
+ root.each(node => {
1040
1021
  if (node.type === 'decl') {
1041
- declPairs_1.push([node.prop, node.value]);
1022
+ declPairs.push([node.prop, node.value]);
1042
1023
  }
1043
1024
  else if (process.env.NODE_ENV !== 'production' && node.type !== 'comment') {
1044
1025
  /* eslint-disable no-console */
1045
- console.warn("Node of type ".concat(node.type, " not supported as an inline style"));
1026
+ console.warn(`Node of type ${node.type} not supported as an inline style`);
1046
1027
  }
1047
1028
  });
1048
- var styleObject = transformDeclPairs(declPairs_1);
1049
- var styles = styleSheet.create({
1029
+ const styleObject = transformDeclPairs(declPairs);
1030
+ const styles = styleSheet.create({
1050
1031
  generated: styleObject,
1051
1032
  });
1052
1033
  generated[hash] = styles.generated;
1053
1034
  }
1054
1035
  return generated[hash];
1055
- };
1056
- return InlineStyle;
1057
- }());
1036
+ }
1037
+ };
1058
1038
  return InlineStyle;
1059
1039
  }
1060
1040
 
@@ -1066,23 +1046,22 @@ function isTag(target) {
1066
1046
  }
1067
1047
 
1068
1048
  function generateDisplayName(target) {
1069
- return isTag(target) ? "styled.".concat(target) : "Styled(".concat(getComponentName(target), ")");
1049
+ return isTag(target) ? `styled.${target}` : `Styled(${getComponentName(target)})`;
1070
1050
  }
1071
1051
 
1072
- function mixinRecursively(target, source, forceMerge) {
1073
- if (forceMerge === void 0) { forceMerge = false; }
1052
+ function mixinRecursively(target, source, forceMerge = false) {
1074
1053
  /* only merge into POJOs, Arrays, but for top level objects only
1075
1054
  * allow to merge into anything by passing forceMerge = true */
1076
1055
  if (!forceMerge && !isPlainObject(target) && !Array.isArray(target)) {
1077
1056
  return source;
1078
1057
  }
1079
1058
  if (Array.isArray(source)) {
1080
- for (var key = 0; key < source.length; key++) {
1059
+ for (let key = 0; key < source.length; key++) {
1081
1060
  target[key] = mixinRecursively(target[key], source[key]);
1082
1061
  }
1083
1062
  }
1084
1063
  else if (isPlainObject(source)) {
1085
- for (var key in source) {
1064
+ for (const key in source) {
1086
1065
  target[key] = mixinRecursively(target[key], source[key]);
1087
1066
  }
1088
1067
  }
@@ -1093,39 +1072,23 @@ function mixinRecursively(target, source, forceMerge) {
1093
1072
  * If target is not a POJO or an Array, it will get source properties injected via shallow merge
1094
1073
  * Source objects applied left to right. Mutates & returns target. Similar to lodash merge.
1095
1074
  */
1096
- function mixinDeep(target) {
1097
- var e_1, _a;
1098
- if (target === void 0) { target = {}; }
1099
- var sources = [];
1100
- for (var _i = 1; _i < arguments.length; _i++) {
1101
- sources[_i - 1] = arguments[_i];
1102
- }
1103
- try {
1104
- for (var sources_1 = __values(sources), sources_1_1 = sources_1.next(); !sources_1_1.done; sources_1_1 = sources_1.next()) {
1105
- var source = sources_1_1.value;
1106
- mixinRecursively(target, source, true);
1107
- }
1108
- }
1109
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
1110
- finally {
1111
- try {
1112
- if (sources_1_1 && !sources_1_1.done && (_a = sources_1.return)) _a.call(sources_1);
1113
- }
1114
- finally { if (e_1) throw e_1.error; }
1075
+ function mixinDeep(target = {}, ...sources) {
1076
+ for (const source of sources) {
1077
+ mixinRecursively(target, source, true);
1115
1078
  }
1116
1079
  return target;
1117
1080
  }
1118
1081
 
1119
- function useResolvedAttrs(theme, props, attrs) {
1120
- if (theme === void 0) { theme = EMPTY_OBJECT; }
1082
+ function useResolvedAttrs(theme = EMPTY_OBJECT, props, attrs) {
1121
1083
  // NOTE: can't memoize this
1122
1084
  // returns [context, resolvedAttrs]
1123
1085
  // where resolvedAttrs is only the things injected by the attrs themselves
1124
- var context = __assign(__assign({}, props), { theme: theme });
1125
- var resolvedAttrs = {};
1126
- attrs.forEach(function (attrDef) {
1127
- var resolvedAttrDef = typeof attrDef === 'function' ? attrDef(context) : attrDef;
1128
- var key;
1086
+ const context = { ...props, theme };
1087
+ const resolvedAttrs = {};
1088
+ attrs.forEach(attrDef => {
1089
+ // @ts-expect-error narrowing isn't working properly for some reason
1090
+ let resolvedAttrDef = typeof attrDef === 'function' ? attrDef(context) : attrDef;
1091
+ let key;
1129
1092
  /* eslint-disable guard-for-in */
1130
1093
  for (key in resolvedAttrDef) {
1131
1094
  // @ts-expect-error bad types
@@ -1136,21 +1099,21 @@ function useResolvedAttrs(theme, props, attrs) {
1136
1099
  return [context, resolvedAttrs];
1137
1100
  }
1138
1101
  // Validator defaults to true if not in HTML/DOM env
1139
- var validAttr = function () { return true; };
1102
+ const validAttr = () => true;
1140
1103
  function useStyledComponentImpl(forwardedComponent, props, forwardedRef) {
1141
- var componentAttrs = forwardedComponent.attrs, inlineStyle = forwardedComponent.inlineStyle, defaultProps = forwardedComponent.defaultProps, shouldForwardProp = forwardedComponent.shouldForwardProp, target = forwardedComponent.target;
1104
+ const { attrs: componentAttrs, inlineStyle, defaultProps, shouldForwardProp, target, } = forwardedComponent;
1142
1105
  // NOTE: the non-hooks version only subscribes to this when !componentStyle.isStatic,
1143
1106
  // but that'd be against the rules-of-hooks. We could be naughty and do it anyway as it
1144
1107
  // should be an immutable value, but behave for now.
1145
- var theme = determineTheme(props, useContext(ThemeContext), defaultProps);
1146
- var _a = __read(useResolvedAttrs(theme || EMPTY_OBJECT, props, componentAttrs), 2), context = _a[0], attrs = _a[1];
1147
- var generatedStyles = inlineStyle.generateStyleObject(context);
1148
- var refToForward = forwardedRef;
1149
- var elementToBeCreated = attrs.$as || props.$as || attrs.as || props.as || target;
1150
- var computedProps = attrs !== props ? __assign(__assign({}, props), attrs) : props;
1151
- var propsForElement = {};
1108
+ const theme = determineTheme(props, useContext(ThemeContext), defaultProps);
1109
+ const [context, attrs] = useResolvedAttrs(theme || EMPTY_OBJECT, props, componentAttrs);
1110
+ const generatedStyles = inlineStyle.generateStyleObject(context);
1111
+ const refToForward = forwardedRef;
1112
+ const elementToBeCreated = attrs.$as || props.$as || attrs.as || props.as || target;
1113
+ const computedProps = attrs !== props ? { ...props, ...attrs } : props;
1114
+ const propsForElement = {};
1152
1115
  // eslint-disable-next-line guard-for-in
1153
- for (var key in computedProps) {
1116
+ for (const key in computedProps) {
1154
1117
  if (key[0] === '$' || key === 'as')
1155
1118
  continue;
1156
1119
  else if (key === 'forwardedAs') {
@@ -1160,9 +1123,9 @@ function useStyledComponentImpl(forwardedComponent, props, forwardedRef) {
1160
1123
  propsForElement[key] = computedProps[key];
1161
1124
  }
1162
1125
  }
1163
- propsForElement.style = useMemo(function () {
1126
+ propsForElement.style = useMemo(() => {
1164
1127
  if (typeof props.style === 'function') {
1165
- return function (state) {
1128
+ return (state) => {
1166
1129
  return [generatedStyles].concat(props.style(state));
1167
1130
  };
1168
1131
  }
@@ -1176,42 +1139,39 @@ function useStyledComponentImpl(forwardedComponent, props, forwardedRef) {
1176
1139
  propsForElement.ref = refToForward;
1177
1140
  return createElement(elementToBeCreated, propsForElement);
1178
1141
  }
1179
- var _StyledNativeComponent = (function (InlineStyle) {
1180
- var createStyledNativeComponent = function (target, options, rules) {
1181
- var isTargetStyledComp = isStyledComponent(target);
1182
- var styledComponentTarget = target;
1183
- var _a = options.displayName, displayName = _a === void 0 ? generateDisplayName(target) : _a, _b = options.attrs, attrs = _b === void 0 ? EMPTY_ARRAY : _b;
1142
+ var _StyledNativeComponent = (InlineStyle) => {
1143
+ const createStyledNativeComponent = (target, options, rules) => {
1144
+ const isTargetStyledComp = isStyledComponent(target);
1145
+ const styledComponentTarget = target;
1146
+ const { displayName = generateDisplayName(target), attrs = EMPTY_ARRAY } = options;
1184
1147
  // fold the underlying StyledComponent attrs up (implicit extend)
1185
- var finalAttrs = isTargetStyledComp && styledComponentTarget.attrs
1148
+ const finalAttrs = isTargetStyledComp && styledComponentTarget.attrs
1186
1149
  ? styledComponentTarget.attrs.concat(attrs).filter(Boolean)
1187
1150
  : attrs;
1188
1151
  // eslint-disable-next-line prefer-destructuring
1189
- var shouldForwardProp = options.shouldForwardProp;
1152
+ let shouldForwardProp = options.shouldForwardProp;
1190
1153
  if (isTargetStyledComp && styledComponentTarget.shouldForwardProp) {
1191
- var shouldForwardPropFn_1 = styledComponentTarget.shouldForwardProp;
1154
+ const shouldForwardPropFn = styledComponentTarget.shouldForwardProp;
1192
1155
  if (options.shouldForwardProp) {
1193
- var passedShouldForwardPropFn_1 = options.shouldForwardProp;
1156
+ const passedShouldForwardPropFn = options.shouldForwardProp;
1194
1157
  // compose nested shouldForwardProp calls
1195
- shouldForwardProp = function (prop, filterFn, elementToBeCreated) {
1196
- return shouldForwardPropFn_1(prop, filterFn, elementToBeCreated) &&
1197
- passedShouldForwardPropFn_1(prop, filterFn, elementToBeCreated);
1198
- };
1158
+ shouldForwardProp = (prop, filterFn, elementToBeCreated) => shouldForwardPropFn(prop, filterFn, elementToBeCreated) &&
1159
+ passedShouldForwardPropFn(prop, filterFn, elementToBeCreated);
1199
1160
  }
1200
1161
  else {
1201
1162
  // eslint-disable-next-line prefer-destructuring
1202
- shouldForwardProp = shouldForwardPropFn_1;
1163
+ shouldForwardProp = shouldForwardPropFn;
1203
1164
  }
1204
1165
  }
1205
- var forwardRef = function (props, ref) {
1206
- // eslint-disable-next-line react-hooks/rules-of-hooks
1207
- return useStyledComponentImpl(WrappedStyledComponent, props, ref);
1208
- };
1166
+ const forwardRef = (props, ref) =>
1167
+ // eslint-disable-next-line react-hooks/rules-of-hooks
1168
+ useStyledComponentImpl(WrappedStyledComponent, props, ref);
1209
1169
  forwardRef.displayName = displayName;
1210
1170
  /**
1211
1171
  * forwardRef creates a new interim component, which we'll take advantage of
1212
1172
  * instead of extending ParentComponent to create _another_ interim class
1213
1173
  */
1214
- var WrappedStyledComponent = React.forwardRef(forwardRef);
1174
+ let WrappedStyledComponent = React.forwardRef(forwardRef);
1215
1175
  WrappedStyledComponent.attrs = finalAttrs;
1216
1176
  WrappedStyledComponent.inlineStyle = new InlineStyle(isTargetStyledComp ? styledComponentTarget.inlineStyle.rules.concat(rules) : rules);
1217
1177
  WrappedStyledComponent.displayName = displayName;
@@ -1221,14 +1181,17 @@ var _StyledNativeComponent = (function (InlineStyle) {
1221
1181
  // fold the underlying StyledComponent target up since we folded the styles
1222
1182
  WrappedStyledComponent.target = isTargetStyledComp ? styledComponentTarget.target : target;
1223
1183
  WrappedStyledComponent.withComponent = function withComponent(tag) {
1224
- var newOptions = __assign(__assign({}, options), { attrs: finalAttrs });
1184
+ const newOptions = {
1185
+ ...options,
1186
+ attrs: finalAttrs,
1187
+ };
1225
1188
  return createStyledNativeComponent(tag, newOptions, rules);
1226
1189
  };
1227
1190
  Object.defineProperty(WrappedStyledComponent, 'defaultProps', {
1228
- get: function () {
1191
+ get() {
1229
1192
  return this._foldedDefaultProps;
1230
1193
  },
1231
- set: function (obj) {
1194
+ set(obj) {
1232
1195
  this._foldedDefaultProps = isTargetStyledComp
1233
1196
  ? mixinDeep({}, styledComponentTarget.defaultProps, obj)
1234
1197
  : obj;
@@ -1246,81 +1209,54 @@ var _StyledNativeComponent = (function (InlineStyle) {
1246
1209
  return WrappedStyledComponent;
1247
1210
  };
1248
1211
  return createStyledNativeComponent;
1249
- });
1212
+ };
1250
1213
 
1251
1214
  // eslint-disable-next-line @typescript-eslint/no-var-requires
1252
- var reactNative = require('react-native');
1253
- var InlineStyle = makeInlineStyleClass(reactNative.StyleSheet);
1254
- var StyledNativeComponent = _StyledNativeComponent(InlineStyle);
1255
- var baseStyled = function (tag) {
1256
- return constructWithOptions(StyledNativeComponent, tag);
1257
- };
1215
+ const reactNative = require('react-native');
1216
+ const InlineStyle = makeInlineStyleClass(reactNative.StyleSheet);
1217
+ const StyledNativeComponent = _StyledNativeComponent(InlineStyle);
1218
+ const baseStyled = (tag) => constructWithOptions(StyledNativeComponent, tag);
1258
1219
  /* React native lazy-requires each of these modules for some reason, so let's
1259
1220
  * assume it's for a good reason and not eagerly load them all */
1260
- var aliases = [
1221
+ const aliases = [
1261
1222
  'ActivityIndicator',
1262
- 'ActivityIndicatorIOS',
1263
- 'ART',
1264
1223
  'Button',
1265
1224
  'DatePickerIOS',
1266
1225
  'DrawerLayoutAndroid',
1267
1226
  'FlatList',
1268
1227
  'Image',
1269
1228
  'ImageBackground',
1270
- 'ImageEditor',
1271
- 'ImageStore',
1272
1229
  'KeyboardAvoidingView',
1273
- 'ListView',
1274
- 'MapView',
1275
1230
  'Modal',
1276
- 'NavigatorIOS',
1277
- 'Picker',
1278
- 'PickerIOS',
1279
1231
  'Pressable',
1280
1232
  'ProgressBarAndroid',
1281
1233
  'ProgressViewIOS',
1282
- 'RecyclerViewBackedScrollView',
1283
1234
  'RefreshControl',
1284
1235
  'SafeAreaView',
1285
1236
  'ScrollView',
1286
1237
  'SectionList',
1287
- 'SegmentedControlIOS',
1288
1238
  'Slider',
1289
- 'SliderIOS',
1290
- 'SnapshotViewIOS',
1291
- 'StatusBar',
1292
- 'SwipeableListView',
1293
1239
  'Switch',
1294
- 'SwitchAndroid',
1295
- 'SwitchIOS',
1296
- 'TabBarIOS',
1297
1240
  'Text',
1298
1241
  'TextInput',
1299
- 'ToastAndroid',
1300
- 'ToolbarAndroid',
1301
- 'Touchable',
1302
1242
  'TouchableHighlight',
1303
- 'TouchableNativeFeedback',
1304
1243
  'TouchableOpacity',
1305
- 'TouchableWithoutFeedback',
1306
1244
  'View',
1307
- 'ViewPagerAndroid',
1308
1245
  'VirtualizedList',
1309
- 'WebView',
1310
1246
  ];
1311
- var styled = baseStyled;
1247
+ const styled = baseStyled;
1312
1248
  /* Define a getter for each alias which simply gets the reactNative component
1313
1249
  * and passes it to styled */
1314
- aliases.forEach(function (alias) {
1315
- return Object.defineProperty(styled, alias, {
1316
- enumerable: true,
1317
- configurable: false,
1318
- get: function () {
1319
- // @ts-expect-error supporting old imports in some cases
1250
+ aliases.forEach(alias => Object.defineProperty(styled, alias, {
1251
+ enumerable: true,
1252
+ configurable: false,
1253
+ get() {
1254
+ if (alias in reactNative && reactNative[alias]) {
1320
1255
  return styled(reactNative[alias]);
1321
- },
1322
- });
1323
- });
1256
+ }
1257
+ throw new Error(`${alias} is not available in the currently-installed version of react-native`);
1258
+ },
1259
+ }));
1324
1260
 
1325
1261
  export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, useTheme, withTheme };
1326
1262
  //# sourceMappingURL=styled-components.native.esm.js.map