styled-components 6.1.19 → 6.2.1-prerelease.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.
Files changed (114) hide show
  1. package/README.md +2 -1
  2. package/dist/styled-components.browser.cjs.js +1 -1
  3. package/dist/styled-components.browser.cjs.js.map +1 -1
  4. package/dist/styled-components.browser.esm.js +1 -1
  5. package/dist/styled-components.browser.esm.js.map +1 -1
  6. package/dist/styled-components.cjs.js +1 -1
  7. package/dist/styled-components.cjs.js.map +1 -1
  8. package/dist/styled-components.esm.js +1 -1
  9. package/dist/styled-components.esm.js.map +1 -1
  10. package/dist/styled-components.js +186 -114
  11. package/dist/styled-components.js.map +1 -1
  12. package/dist/styled-components.min.js +1 -1
  13. package/dist/styled-components.min.js.map +1 -1
  14. package/native/dist/constants.d.ts +5 -0
  15. package/native/dist/constructors/constructWithOptions.d.ts +0 -1
  16. package/native/dist/constructors/styled.d.ts +2 -135
  17. package/native/dist/dist/constants.d.ts +5 -0
  18. package/native/dist/dist/constructors/constructWithOptions.d.ts +0 -1
  19. package/native/dist/dist/constructors/styled.d.ts +2 -135
  20. package/native/dist/dist/hoc/withTheme.d.ts +1 -1
  21. package/native/dist/dist/index.d.ts +2 -2
  22. package/native/dist/dist/models/ComponentStyle.d.ts +4 -1
  23. package/native/dist/dist/models/ServerStyleSheet.d.ts +2 -3
  24. package/native/dist/dist/models/StyledComponent.d.ts +1 -1
  25. package/native/dist/dist/models/StyledNativeComponent.d.ts +1 -1
  26. package/native/dist/dist/native/index.d.ts +8 -26
  27. package/native/dist/dist/sheet/Tag.d.ts +4 -4
  28. package/native/dist/dist/test/utils.d.ts +35 -17
  29. package/native/dist/dist/types.d.ts +32 -24
  30. package/native/dist/dist/utils/domElements.d.ts +2 -2
  31. package/native/dist/dist/utils/empties.d.ts +1 -1
  32. package/native/dist/dist/utils/isRSC.d.ts +11 -0
  33. package/native/dist/hoc/withTheme.d.ts +1 -1
  34. package/native/dist/index.d.ts +2 -2
  35. package/native/dist/models/ComponentStyle.d.ts +4 -1
  36. package/native/dist/models/ServerStyleSheet.d.ts +2 -3
  37. package/native/dist/models/StyledComponent.d.ts +1 -1
  38. package/native/dist/models/StyledNativeComponent.d.ts +1 -1
  39. package/native/dist/native/index.d.ts +8 -26
  40. package/native/dist/sheet/Tag.d.ts +4 -4
  41. package/native/dist/styled-components.native.cjs.js +1 -1
  42. package/native/dist/styled-components.native.cjs.js.map +1 -1
  43. package/native/dist/styled-components.native.esm.js +1 -1
  44. package/native/dist/styled-components.native.esm.js.map +1 -1
  45. package/native/dist/test/utils.d.ts +34 -16
  46. package/native/dist/types.d.ts +32 -24
  47. package/native/dist/utils/domElements.d.ts +2 -2
  48. package/native/dist/utils/empties.d.ts +1 -1
  49. package/native/dist/utils/isRSC.d.ts +11 -0
  50. package/package.json +60 -57
  51. package/test-utils/setupTestFramework.ts +7 -2
  52. package/dist/base.d.ts +0 -12
  53. package/dist/constants.d.ts +0 -8
  54. package/dist/constructors/constructWithOptions.d.ts +0 -18
  55. package/dist/constructors/createGlobalStyle.d.ts +0 -3
  56. package/dist/constructors/css.d.ts +0 -4
  57. package/dist/constructors/keyframes.d.ts +0 -3
  58. package/dist/constructors/styled.d.ts +0 -150
  59. package/dist/hoc/withTheme.d.ts +0 -4
  60. package/dist/hoc/withTheme.spec.d.ts +0 -1
  61. package/dist/index-standalone.d.ts +0 -2
  62. package/dist/index.d.ts +0 -4
  63. package/dist/models/ComponentStyle.d.ts +0 -15
  64. package/dist/models/GlobalStyle.d.ts +0 -11
  65. package/dist/models/InlineStyle.d.ts +0 -7
  66. package/dist/models/Keyframes.d.ts +0 -10
  67. package/dist/models/ServerStyleSheet.d.ts +0 -16
  68. package/dist/models/StyleSheetManager.d.ts +0 -65
  69. package/dist/models/StyledComponent.d.ts +0 -3
  70. package/dist/models/StyledNativeComponent.d.ts +0 -3
  71. package/dist/models/ThemeProvider.d.ts +0 -47
  72. package/dist/native/index.d.ts +0 -37
  73. package/dist/secretInternals.d.ts +0 -5
  74. package/dist/sheet/GroupIDAllocator.d.ts +0 -4
  75. package/dist/sheet/GroupedTag.d.ts +0 -11
  76. package/dist/sheet/Rehydration.d.ts +0 -3
  77. package/dist/sheet/Sheet.d.ts +0 -40
  78. package/dist/sheet/Tag.d.ts +0 -55
  79. package/dist/sheet/dom.d.ts +0 -5
  80. package/dist/sheet/index.d.ts +0 -1
  81. package/dist/sheet/types.d.ts +0 -36
  82. package/dist/test/globals.d.ts +0 -2
  83. package/dist/test/utils.d.ts +0 -145
  84. package/dist/test/veryLargeUnionType.d.ts +0 -1
  85. package/dist/types.d.ts +0 -204
  86. package/dist/utils/addUnitIfNeeded.d.ts +0 -1
  87. package/dist/utils/checkDynamicCreation.d.ts +0 -1
  88. package/dist/utils/createWarnTooManyClasses.d.ts +0 -3
  89. package/dist/utils/determineTheme.d.ts +0 -4
  90. package/dist/utils/domElements.d.ts +0 -4
  91. package/dist/utils/empties.d.ts +0 -3
  92. package/dist/utils/error.d.ts +0 -5
  93. package/dist/utils/errors.d.ts +0 -21
  94. package/dist/utils/escape.d.ts +0 -5
  95. package/dist/utils/flatten.d.ts +0 -4
  96. package/dist/utils/generateAlphabeticName.d.ts +0 -1
  97. package/dist/utils/generateComponentId.d.ts +0 -1
  98. package/dist/utils/generateDisplayName.d.ts +0 -2
  99. package/dist/utils/getComponentName.d.ts +0 -2
  100. package/dist/utils/hash.d.ts +0 -3
  101. package/dist/utils/hoist.d.ts +0 -51
  102. package/dist/utils/hyphenateStyleName.d.ts +0 -14
  103. package/dist/utils/interleave.d.ts +0 -2
  104. package/dist/utils/isFunction.d.ts +0 -1
  105. package/dist/utils/isPlainObject.d.ts +0 -1
  106. package/dist/utils/isStatelessFunction.d.ts +0 -1
  107. package/dist/utils/isStaticRules.d.ts +0 -2
  108. package/dist/utils/isStyledComponent.d.ts +0 -2
  109. package/dist/utils/isTag.d.ts +0 -2
  110. package/dist/utils/joinStrings.d.ts +0 -5
  111. package/dist/utils/mixinDeep.d.ts +0 -6
  112. package/dist/utils/nonce.d.ts +0 -1
  113. package/dist/utils/setToString.d.ts +0 -17
  114. package/dist/utils/stylis.d.ts +0 -10
@@ -1,14 +1,14 @@
1
- /// <reference types="react" />
2
1
  export declare const seedNextClassnames: (names: string[]) => string[];
3
2
  export declare const resetStyled: (isServer?: boolean) => (<Target extends import("..").WebTarget, InjectedProps extends object = import("../types").BaseObject>(tag: Target) => import("../constructors/constructWithOptions").Styled<"web", Target, Target extends import("../types").KnownTarget ? import("react").ComponentPropsWithRef<Target> & InjectedProps : InjectedProps, import("../types").BaseObject>) & {
3
+ symbol: import("../constructors/constructWithOptions").Styled<"web", "symbol", import("react").SVGProps<SVGSymbolElement>, import("../types").BaseObject>;
4
4
  object: import("../constructors/constructWithOptions").Styled<"web", "object", import("react").DetailedHTMLProps<import("react").ObjectHTMLAttributes<HTMLObjectElement>, HTMLObjectElement>, import("../types").BaseObject>;
5
- g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
6
5
  map: import("../constructors/constructWithOptions").Styled<"web", "map", import("react").DetailedHTMLProps<import("react").MapHTMLAttributes<HTMLMapElement>, HTMLMapElement>, import("../types").BaseObject>;
7
- big: import("../constructors/constructWithOptions").Styled<"web", "big", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
8
- link: import("../constructors/constructWithOptions").Styled<"web", "link", import("react").DetailedHTMLProps<import("react").LinkHTMLAttributes<HTMLLinkElement>, HTMLLinkElement>, import("../types").BaseObject>;
6
+ filter: import("../constructors/constructWithOptions").Styled<"web", "filter", import("react").SVGProps<SVGFilterElement>, import("../types").BaseObject>;
7
+ search: import("../constructors/constructWithOptions").Styled<"web", "search", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
9
8
  small: import("../constructors/constructWithOptions").Styled<"web", "small", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
10
9
  sub: import("../constructors/constructWithOptions").Styled<"web", "sub", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
11
10
  sup: import("../constructors/constructWithOptions").Styled<"web", "sup", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
11
+ input: import("../constructors/constructWithOptions").Styled<"web", "input", import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("../types").BaseObject>;
12
12
  a: import("../constructors/constructWithOptions").Styled<"web", "a", import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, import("../types").BaseObject>;
13
13
  abbr: import("../constructors/constructWithOptions").Styled<"web", "abbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
14
14
  address: import("../constructors/constructWithOptions").Styled<"web", "address", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
@@ -17,12 +17,10 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
17
17
  aside: import("../constructors/constructWithOptions").Styled<"web", "aside", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
18
18
  audio: import("../constructors/constructWithOptions").Styled<"web", "audio", import("react").DetailedHTMLProps<import("react").AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, import("../types").BaseObject>;
19
19
  b: import("../constructors/constructWithOptions").Styled<"web", "b", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
20
- base: import("../constructors/constructWithOptions").Styled<"web", "base", import("react").DetailedHTMLProps<import("react").BaseHTMLAttributes<HTMLBaseElement>, HTMLBaseElement>, import("../types").BaseObject>;
21
20
  bdi: import("../constructors/constructWithOptions").Styled<"web", "bdi", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
22
21
  bdo: import("../constructors/constructWithOptions").Styled<"web", "bdo", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
23
22
  blockquote: import("../constructors/constructWithOptions").Styled<"web", "blockquote", import("react").DetailedHTMLProps<import("react").BlockquoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>, import("../types").BaseObject>;
24
23
  body: import("../constructors/constructWithOptions").Styled<"web", "body", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>, import("../types").BaseObject>;
25
- br: import("../constructors/constructWithOptions").Styled<"web", "br", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLBRElement>, HTMLBRElement>, import("../types").BaseObject>;
26
24
  button: import("../constructors/constructWithOptions").Styled<"web", "button", import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, import("../types").BaseObject>;
27
25
  canvas: import("../constructors/constructWithOptions").Styled<"web", "canvas", import("react").DetailedHTMLProps<import("react").CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>, import("../types").BaseObject>;
28
26
  caption: import("../constructors/constructWithOptions").Styled<"web", "caption", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
@@ -60,27 +58,21 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
60
58
  i: import("../constructors/constructWithOptions").Styled<"web", "i", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
61
59
  iframe: import("../constructors/constructWithOptions").Styled<"web", "iframe", import("react").DetailedHTMLProps<import("react").IframeHTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>, import("../types").BaseObject>;
62
60
  img: import("../constructors/constructWithOptions").Styled<"web", "img", import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, import("../types").BaseObject>;
63
- input: import("../constructors/constructWithOptions").Styled<"web", "input", import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, import("../types").BaseObject>;
64
61
  ins: import("../constructors/constructWithOptions").Styled<"web", "ins", import("react").DetailedHTMLProps<import("react").InsHTMLAttributes<HTMLModElement>, HTMLModElement>, import("../types").BaseObject>;
65
62
  kbd: import("../constructors/constructWithOptions").Styled<"web", "kbd", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
66
- keygen: import("../constructors/constructWithOptions").Styled<"web", "keygen", import("react").DetailedHTMLProps<import("react").KeygenHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
67
63
  label: import("../constructors/constructWithOptions").Styled<"web", "label", import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, import("../types").BaseObject>;
68
64
  legend: import("../constructors/constructWithOptions").Styled<"web", "legend", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>, import("../types").BaseObject>;
69
65
  li: import("../constructors/constructWithOptions").Styled<"web", "li", import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, import("../types").BaseObject>;
70
66
  main: import("../constructors/constructWithOptions").Styled<"web", "main", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
71
67
  mark: import("../constructors/constructWithOptions").Styled<"web", "mark", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
72
68
  menu: import("../constructors/constructWithOptions").Styled<"web", "menu", import("react").DetailedHTMLProps<import("react").MenuHTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
73
- menuitem: import("../constructors/constructWithOptions").Styled<"web", "menuitem", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
74
- meta: import("../constructors/constructWithOptions").Styled<"web", "meta", import("react").DetailedHTMLProps<import("react").MetaHTMLAttributes<HTMLMetaElement>, HTMLMetaElement>, import("../types").BaseObject>;
75
69
  meter: import("../constructors/constructWithOptions").Styled<"web", "meter", import("react").DetailedHTMLProps<import("react").MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>, import("../types").BaseObject>;
76
70
  nav: import("../constructors/constructWithOptions").Styled<"web", "nav", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
77
- noscript: import("../constructors/constructWithOptions").Styled<"web", "noscript", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
78
71
  ol: import("../constructors/constructWithOptions").Styled<"web", "ol", import("react").DetailedHTMLProps<import("react").OlHTMLAttributes<HTMLOListElement>, HTMLOListElement>, import("../types").BaseObject>;
79
72
  optgroup: import("../constructors/constructWithOptions").Styled<"web", "optgroup", import("react").DetailedHTMLProps<import("react").OptgroupHTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>, import("../types").BaseObject>;
80
73
  option: import("../constructors/constructWithOptions").Styled<"web", "option", import("react").DetailedHTMLProps<import("react").OptionHTMLAttributes<HTMLOptionElement>, HTMLOptionElement>, import("../types").BaseObject>;
81
74
  output: import("../constructors/constructWithOptions").Styled<"web", "output", import("react").DetailedHTMLProps<import("react").OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>, import("../types").BaseObject>;
82
75
  p: import("../constructors/constructWithOptions").Styled<"web", "p", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, import("../types").BaseObject>;
83
- param: import("../constructors/constructWithOptions").Styled<"web", "param", import("react").DetailedHTMLProps<import("react").ParamHTMLAttributes<HTMLParamElement>, HTMLParamElement>, import("../types").BaseObject>;
84
76
  picture: import("../constructors/constructWithOptions").Styled<"web", "picture", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
85
77
  pre: import("../constructors/constructWithOptions").Styled<"web", "pre", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLPreElement>, HTMLPreElement>, import("../types").BaseObject>;
86
78
  progress: import("../constructors/constructWithOptions").Styled<"web", "progress", import("react").DetailedHTMLProps<import("react").ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>, import("../types").BaseObject>;
@@ -90,15 +82,14 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
90
82
  ruby: import("../constructors/constructWithOptions").Styled<"web", "ruby", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
91
83
  s: import("../constructors/constructWithOptions").Styled<"web", "s", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
92
84
  samp: import("../constructors/constructWithOptions").Styled<"web", "samp", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
93
- script: import("../constructors/constructWithOptions").Styled<"web", "script", import("react").DetailedHTMLProps<import("react").ScriptHTMLAttributes<HTMLScriptElement>, HTMLScriptElement>, import("../types").BaseObject>;
85
+ slot: import("../constructors/constructWithOptions").Styled<"web", "slot", import("react").DetailedHTMLProps<import("react").SlotHTMLAttributes<HTMLSlotElement>, HTMLSlotElement>, import("../types").BaseObject>;
94
86
  section: import("../constructors/constructWithOptions").Styled<"web", "section", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
95
87
  select: import("../constructors/constructWithOptions").Styled<"web", "select", import("react").DetailedHTMLProps<import("react").SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, import("../types").BaseObject>;
96
- source: import("../constructors/constructWithOptions").Styled<"web", "source", import("react").DetailedHTMLProps<import("react").SourceHTMLAttributes<HTMLSourceElement>, HTMLSourceElement>, import("../types").BaseObject>;
97
88
  span: import("../constructors/constructWithOptions").Styled<"web", "span", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, import("../types").BaseObject>;
98
89
  strong: import("../constructors/constructWithOptions").Styled<"web", "strong", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
99
- style: import("../constructors/constructWithOptions").Styled<"web", "style", import("react").DetailedHTMLProps<import("react").StyleHTMLAttributes<HTMLStyleElement>, HTMLStyleElement>, import("../types").BaseObject>;
100
90
  summary: import("../constructors/constructWithOptions").Styled<"web", "summary", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
101
91
  table: import("../constructors/constructWithOptions").Styled<"web", "table", import("react").DetailedHTMLProps<import("react").TableHTMLAttributes<HTMLTableElement>, HTMLTableElement>, import("../types").BaseObject>;
92
+ template: import("../constructors/constructWithOptions").Styled<"web", "template", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>, import("../types").BaseObject>;
102
93
  tbody: import("../constructors/constructWithOptions").Styled<"web", "tbody", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
103
94
  td: import("../constructors/constructWithOptions").Styled<"web", "td", import("react").DetailedHTMLProps<import("react").TdHTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>, import("../types").BaseObject>;
104
95
  textarea: import("../constructors/constructWithOptions").Styled<"web", "textarea", import("react").DetailedHTMLProps<import("react").TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, import("../types").BaseObject>;
@@ -107,18 +98,42 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
107
98
  thead: import("../constructors/constructWithOptions").Styled<"web", "thead", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>, import("../types").BaseObject>;
108
99
  time: import("../constructors/constructWithOptions").Styled<"web", "time", import("react").DetailedHTMLProps<import("react").TimeHTMLAttributes<HTMLTimeElement>, HTMLTimeElement>, import("../types").BaseObject>;
109
100
  tr: import("../constructors/constructWithOptions").Styled<"web", "tr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, import("../types").BaseObject>;
110
- track: import("../constructors/constructWithOptions").Styled<"web", "track", import("react").DetailedHTMLProps<import("react").TrackHTMLAttributes<HTMLTrackElement>, HTMLTrackElement>, import("../types").BaseObject>;
111
101
  u: import("../constructors/constructWithOptions").Styled<"web", "u", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
112
102
  ul: import("../constructors/constructWithOptions").Styled<"web", "ul", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, import("../types").BaseObject>;
113
103
  var: import("../constructors/constructWithOptions").Styled<"web", "var", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
114
104
  video: import("../constructors/constructWithOptions").Styled<"web", "video", import("react").DetailedHTMLProps<import("react").VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, import("../types").BaseObject>;
115
105
  wbr: import("../constructors/constructWithOptions").Styled<"web", "wbr", import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, import("../types").BaseObject>;
116
- svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
117
106
  circle: import("../constructors/constructWithOptions").Styled<"web", "circle", import("react").SVGProps<SVGCircleElement>, import("../types").BaseObject>;
118
107
  clipPath: import("../constructors/constructWithOptions").Styled<"web", "clipPath", import("react").SVGProps<SVGClipPathElement>, import("../types").BaseObject>;
119
108
  defs: import("../constructors/constructWithOptions").Styled<"web", "defs", import("react").SVGProps<SVGDefsElement>, import("../types").BaseObject>;
120
109
  ellipse: import("../constructors/constructWithOptions").Styled<"web", "ellipse", import("react").SVGProps<SVGEllipseElement>, import("../types").BaseObject>;
110
+ feBlend: import("../constructors/constructWithOptions").Styled<"web", "feBlend", import("react").SVGProps<SVGFEBlendElement>, import("../types").BaseObject>;
111
+ feColorMatrix: import("../constructors/constructWithOptions").Styled<"web", "feColorMatrix", import("react").SVGProps<SVGFEColorMatrixElement>, import("../types").BaseObject>;
112
+ feComponentTransfer: import("../constructors/constructWithOptions").Styled<"web", "feComponentTransfer", import("react").SVGProps<SVGFEComponentTransferElement>, import("../types").BaseObject>;
113
+ feComposite: import("../constructors/constructWithOptions").Styled<"web", "feComposite", import("react").SVGProps<SVGFECompositeElement>, import("../types").BaseObject>;
114
+ feConvolveMatrix: import("../constructors/constructWithOptions").Styled<"web", "feConvolveMatrix", import("react").SVGProps<SVGFEConvolveMatrixElement>, import("../types").BaseObject>;
115
+ feDiffuseLighting: import("../constructors/constructWithOptions").Styled<"web", "feDiffuseLighting", import("react").SVGProps<SVGFEDiffuseLightingElement>, import("../types").BaseObject>;
116
+ feDisplacementMap: import("../constructors/constructWithOptions").Styled<"web", "feDisplacementMap", import("react").SVGProps<SVGFEDisplacementMapElement>, import("../types").BaseObject>;
117
+ feDistantLight: import("../constructors/constructWithOptions").Styled<"web", "feDistantLight", import("react").SVGProps<SVGFEDistantLightElement>, import("../types").BaseObject>;
118
+ feDropShadow: import("../constructors/constructWithOptions").Styled<"web", "feDropShadow", import("react").SVGProps<SVGFEDropShadowElement>, import("../types").BaseObject>;
119
+ feFlood: import("../constructors/constructWithOptions").Styled<"web", "feFlood", import("react").SVGProps<SVGFEFloodElement>, import("../types").BaseObject>;
120
+ feFuncA: import("../constructors/constructWithOptions").Styled<"web", "feFuncA", import("react").SVGProps<SVGFEFuncAElement>, import("../types").BaseObject>;
121
+ feFuncB: import("../constructors/constructWithOptions").Styled<"web", "feFuncB", import("react").SVGProps<SVGFEFuncBElement>, import("../types").BaseObject>;
122
+ feFuncG: import("../constructors/constructWithOptions").Styled<"web", "feFuncG", import("react").SVGProps<SVGFEFuncGElement>, import("../types").BaseObject>;
123
+ feFuncR: import("../constructors/constructWithOptions").Styled<"web", "feFuncR", import("react").SVGProps<SVGFEFuncRElement>, import("../types").BaseObject>;
124
+ feGaussianBlur: import("../constructors/constructWithOptions").Styled<"web", "feGaussianBlur", import("react").SVGProps<SVGFEGaussianBlurElement>, import("../types").BaseObject>;
125
+ feImage: import("../constructors/constructWithOptions").Styled<"web", "feImage", import("react").SVGProps<SVGFEImageElement>, import("../types").BaseObject>;
126
+ feMerge: import("../constructors/constructWithOptions").Styled<"web", "feMerge", import("react").SVGProps<SVGFEMergeElement>, import("../types").BaseObject>;
127
+ feMergeNode: import("../constructors/constructWithOptions").Styled<"web", "feMergeNode", import("react").SVGProps<SVGFEMergeNodeElement>, import("../types").BaseObject>;
128
+ feMorphology: import("../constructors/constructWithOptions").Styled<"web", "feMorphology", import("react").SVGProps<SVGFEMorphologyElement>, import("../types").BaseObject>;
129
+ feOffset: import("../constructors/constructWithOptions").Styled<"web", "feOffset", import("react").SVGProps<SVGFEOffsetElement>, import("../types").BaseObject>;
130
+ fePointLight: import("../constructors/constructWithOptions").Styled<"web", "fePointLight", import("react").SVGProps<SVGFEPointLightElement>, import("../types").BaseObject>;
131
+ feSpecularLighting: import("../constructors/constructWithOptions").Styled<"web", "feSpecularLighting", import("react").SVGProps<SVGFESpecularLightingElement>, import("../types").BaseObject>;
132
+ feSpotLight: import("../constructors/constructWithOptions").Styled<"web", "feSpotLight", import("react").SVGProps<SVGFESpotLightElement>, import("../types").BaseObject>;
133
+ feTile: import("../constructors/constructWithOptions").Styled<"web", "feTile", import("react").SVGProps<SVGFETileElement>, import("../types").BaseObject>;
134
+ feTurbulence: import("../constructors/constructWithOptions").Styled<"web", "feTurbulence", import("react").SVGProps<SVGFETurbulenceElement>, import("../types").BaseObject>;
121
135
  foreignObject: import("../constructors/constructWithOptions").Styled<"web", "foreignObject", import("react").SVGProps<SVGForeignObjectElement>, import("../types").BaseObject>;
136
+ g: import("../constructors/constructWithOptions").Styled<"web", "g", import("react").SVGProps<SVGGElement>, import("../types").BaseObject>;
122
137
  image: import("../constructors/constructWithOptions").Styled<"web", "image", import("react").SVGProps<SVGImageElement>, import("../types").BaseObject>;
123
138
  line: import("../constructors/constructWithOptions").Styled<"web", "line", import("react").SVGLineElementAttributes<SVGLineElement>, import("../types").BaseObject>;
124
139
  linearGradient: import("../constructors/constructWithOptions").Styled<"web", "linearGradient", import("react").SVGProps<SVGLinearGradientElement>, import("../types").BaseObject>;
@@ -131,7 +146,10 @@ export declare const resetStyled: (isServer?: boolean) => (<Target extends impor
131
146
  radialGradient: import("../constructors/constructWithOptions").Styled<"web", "radialGradient", import("react").SVGProps<SVGRadialGradientElement>, import("../types").BaseObject>;
132
147
  rect: import("../constructors/constructWithOptions").Styled<"web", "rect", import("react").SVGProps<SVGRectElement>, import("../types").BaseObject>;
133
148
  stop: import("../constructors/constructWithOptions").Styled<"web", "stop", import("react").SVGProps<SVGStopElement>, import("../types").BaseObject>;
149
+ svg: import("../constructors/constructWithOptions").Styled<"web", "svg", import("react").SVGProps<SVGSVGElement>, import("../types").BaseObject>;
150
+ switch: import("../constructors/constructWithOptions").Styled<"web", "switch", import("react").SVGProps<SVGSwitchElement>, import("../types").BaseObject>;
134
151
  text: import("../constructors/constructWithOptions").Styled<"web", "text", import("react").SVGTextElementAttributes<SVGTextElement>, import("../types").BaseObject>;
152
+ textPath: import("../constructors/constructWithOptions").Styled<"web", "textPath", import("react").SVGProps<SVGTextPathElement>, import("../types").BaseObject>;
135
153
  tspan: import("../constructors/constructWithOptions").Styled<"web", "tspan", import("react").SVGProps<SVGTSpanElement>, import("../types").BaseObject>;
136
154
  use: import("../constructors/constructWithOptions").Styled<"web", "use", import("react").SVGProps<SVGUseElement>, import("../types").BaseObject>;
137
155
  };
@@ -5,7 +5,7 @@ import { DefaultTheme } from './models/ThemeProvider';
5
5
  import createWarnTooManyClasses from './utils/createWarnTooManyClasses';
6
6
  import type { SupportedHTMLElements } from './utils/domElements';
7
7
  export { CSS, DefaultTheme, SupportedHTMLElements };
8
- export interface ExoticComponentWithDisplayName<P extends object = {}> extends React.ExoticComponent<P> {
8
+ export interface ExoticComponentWithDisplayName<P extends BaseObject = {}> extends React.ExoticComponent<P> {
9
9
  defaultProps?: Partial<P> | undefined;
10
10
  displayName?: string | undefined;
11
11
  }
@@ -20,16 +20,16 @@ export type BaseObject = {};
20
20
  export type OmitNever<T> = {
21
21
  [K in keyof T as T[K] extends never ? never : K]: T[K];
22
22
  };
23
- export type FastOmit<T extends object, U extends string | number | symbol> = {
23
+ export type FastOmit<T extends BaseObject, U extends string | number | symbol> = {
24
24
  [K in keyof T as K extends U ? never : K]: T[K];
25
25
  };
26
26
  export type Runtime = 'web' | 'native';
27
- export type AnyComponent<P extends object = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
27
+ export type AnyComponent<P extends BaseObject = any> = ExoticComponentWithDisplayName<P> | React.ComponentType<P>;
28
28
  export type KnownTarget = SupportedHTMLElements | AnyComponent;
29
29
  export type WebTarget = string | KnownTarget;
30
30
  export type NativeTarget = AnyComponent;
31
31
  export type StyledTarget<R extends Runtime> = R extends 'web' ? WebTarget : NativeTarget;
32
- export interface StyledOptions<R extends Runtime, Props extends object> {
32
+ export interface StyledOptions<R extends Runtime, Props extends BaseObject> {
33
33
  attrs?: Attrs<Props>[] | undefined;
34
34
  componentId?: (R extends 'web' ? string : never) | undefined;
35
35
  displayName?: string | undefined;
@@ -76,13 +76,13 @@ export type ExecutionProps = {
76
76
  export interface ExecutionContext extends ExecutionProps {
77
77
  theme: DefaultTheme;
78
78
  }
79
- export interface StyleFunction<Props extends object> {
79
+ export interface StyleFunction<Props extends BaseObject> {
80
80
  (executionContext: ExecutionContext & Props): Interpolation<Props>;
81
81
  }
82
- export type Interpolation<Props extends object> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | StyledComponentBrand | RuleSet<Props> | Interpolation<Props>[];
83
- export type Attrs<Props extends object = BaseObject> = (ExecutionProps & Partial<Props>) | ((props: ExecutionContext & Props) => ExecutionProps & Partial<Props>);
84
- export type RuleSet<Props extends object = BaseObject> = Interpolation<Props>[];
85
- export type Styles<Props extends object> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>;
82
+ export type Interpolation<Props extends BaseObject> = StyleFunction<Props> | StyledObject<Props> | TemplateStringsArray | string | number | false | undefined | null | Keyframes | StyledComponentBrand | RuleSet<Props> | Interpolation<Props>[];
83
+ export type Attrs<Props extends BaseObject = BaseObject> = (ExecutionProps & Partial<OverrideStyle<Props>>) | ((props: ExecutionContext & Props) => ExecutionProps & Partial<OverrideStyle<Props>>);
84
+ export type RuleSet<Props extends BaseObject = BaseObject> = Interpolation<Props>[];
85
+ export type Styles<Props extends BaseObject> = TemplateStringsArray | StyledObject<Props> | StyleFunction<Props>;
86
86
  export type NameGenerator = (hash: number) => string;
87
87
  export interface StyleSheet {
88
88
  create: Function;
@@ -92,7 +92,7 @@ export interface Keyframes {
92
92
  name: string;
93
93
  rules: string;
94
94
  }
95
- export interface Flattener<Props extends object> {
95
+ export interface Flattener<Props extends BaseObject> {
96
96
  (chunks: Interpolation<Props>[], executionContext: object | null | undefined, styleSheet: StyleSheet | null | undefined): Interpolation<Props>[];
97
97
  }
98
98
  export interface Stringifier {
@@ -102,12 +102,12 @@ export interface Stringifier {
102
102
  export interface ShouldForwardProp<R extends Runtime> {
103
103
  (prop: string, elementToBeCreated: StyledTarget<R>): boolean;
104
104
  }
105
- export interface CommonStatics<R extends Runtime, Props extends object> {
105
+ export interface CommonStatics<R extends Runtime, Props extends BaseObject> {
106
106
  attrs: Attrs<Props>[];
107
107
  target: StyledTarget<R>;
108
108
  shouldForwardProp?: ShouldForwardProp<R> | undefined;
109
109
  }
110
- export interface IStyledStatics<R extends Runtime, OuterProps extends object> extends CommonStatics<R, OuterProps> {
110
+ export interface IStyledStatics<R extends Runtime, OuterProps extends BaseObject> extends CommonStatics<R, OuterProps> {
111
111
  componentStyle: R extends 'web' ? ComponentStyle : never;
112
112
  foldedComponentIds: R extends 'web' ? string : never;
113
113
  inlineStyle: R extends 'native' ? InstanceType<IInlineStyleConstructor<OuterProps>> : never;
@@ -118,10 +118,10 @@ export interface IStyledStatics<R extends Runtime, OuterProps extends object> ex
118
118
  /**
119
119
  * Used by PolymorphicComponent to define prop override cascading order.
120
120
  */
121
- export type PolymorphicComponentProps<R extends Runtime, BaseProps extends object, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends object = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends object = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithRef<ForwardedAsTarget> : {}> = NoInfer<FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
121
+ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends BaseObject, AsTarget extends StyledTarget<R> | void, ForwardedAsTarget extends StyledTarget<R> | void, AsTargetProps extends BaseObject = AsTarget extends KnownTarget ? React.ComponentPropsWithRef<AsTarget> : {}, ForwardedAsTargetProps extends BaseObject = ForwardedAsTarget extends KnownTarget ? React.ComponentPropsWithRef<ForwardedAsTarget> : {}> = OverrideStyle<NoInfer<FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
122
122
  as?: AsTarget;
123
123
  forwardedAs?: ForwardedAsTarget;
124
- };
124
+ }>;
125
125
  /**
126
126
  * This type forms the signature for a forwardRef-enabled component
127
127
  * that accepts the "as" prop to dynamically change the underlying
@@ -129,14 +129,14 @@ export type PolymorphicComponentProps<R extends Runtime, BaseProps extends objec
129
129
  * props from the given rendering target to get proper typing for
130
130
  * any specialized props in the target component.
131
131
  */
132
- export interface PolymorphicComponent<R extends Runtime, BaseProps extends object> extends React.ForwardRefExoticComponent<BaseProps> {
132
+ export interface PolymorphicComponent<R extends Runtime, BaseProps extends BaseObject> extends React.ForwardRefExoticComponent<BaseProps> {
133
133
  <AsTarget extends StyledTarget<R> | void = void, ForwardedAsTarget extends StyledTarget<R> | void = void>(props: PolymorphicComponentProps<R, BaseProps, AsTarget, ForwardedAsTarget>): React.JSX.Element;
134
134
  }
135
- export interface IStyledComponentBase<R extends Runtime, Props extends object = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
135
+ export interface IStyledComponentBase<R extends Runtime, Props extends BaseObject = BaseObject> extends PolymorphicComponent<R, Props>, IStyledStatics<R, Props>, StyledComponentBrand {
136
136
  defaultProps?: (ExecutionProps & Partial<Props>) | undefined;
137
137
  toString: () => string;
138
138
  }
139
- export type IStyledComponent<R extends Runtime, Props extends object = BaseObject> = IStyledComponentBase<R, Props> &
139
+ export type IStyledComponent<R extends Runtime, Props extends BaseObject = BaseObject> = IStyledComponentBase<R, Props> &
140
140
  /**
141
141
  * TypeScript doesn't allow using a styled component as a key inside object
142
142
  * styles because "A computed property name must be of type 'string', 'number',
@@ -156,25 +156,33 @@ export type IStyledComponent<R extends Runtime, Props extends object = BaseObjec
156
156
  * })
157
157
  */
158
158
  (R extends 'web' ? string : {});
159
- export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends object, OuterStatics extends object = BaseObject> {
160
- <Props extends object = BaseObject, Statics extends object = BaseObject>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics;
159
+ export interface IStyledComponentFactory<R extends Runtime, Target extends StyledTarget<R>, OuterProps extends BaseObject, OuterStatics extends BaseObject = BaseObject> {
160
+ <Props extends BaseObject = BaseObject, Statics extends BaseObject = BaseObject>(target: Target, options: StyledOptions<R, OuterProps & Props>, rules: RuleSet<OuterProps & Props>): IStyledComponent<R, Substitute<OuterProps, Props>> & OuterStatics & Statics;
161
161
  }
162
- export interface IInlineStyleConstructor<Props extends object> {
162
+ export interface IInlineStyleConstructor<Props extends BaseObject> {
163
163
  new (rules: RuleSet<Props>): IInlineStyle<Props>;
164
164
  }
165
- export interface IInlineStyle<Props extends object> {
165
+ export interface IInlineStyle<Props extends BaseObject> {
166
166
  rules: RuleSet<Props>;
167
167
  generateStyleObject(executionContext: ExecutionContext & Props): object;
168
168
  }
169
169
  export type CSSProperties = CSS.Properties<number | (string & {})>;
170
+ export type CSSPropertiesWithVars = CSSProperties & {
171
+ [key: `--${string}`]: string | number | undefined;
172
+ };
173
+ type OverrideStyle<P> = P extends {
174
+ style?: any;
175
+ } ? Omit<P, 'style'> & {
176
+ style?: CSSPropertiesWithVars;
177
+ } : P;
170
178
  export type CSSPseudos = {
171
179
  [K in CSS.Pseudos]?: CSSObject;
172
180
  };
173
181
  export type CSSKeyframes = object & {
174
182
  [key: string]: CSSObject;
175
183
  };
176
- export type CSSObject<Props extends object = BaseObject> = StyledObject<Props>;
177
- export interface StyledObject<Props extends object = BaseObject> extends CSSProperties, CSSPseudos {
184
+ export type CSSObject<Props extends BaseObject = BaseObject> = StyledObject<Props>;
185
+ export interface StyledObject<Props extends BaseObject = BaseObject> extends CSSProperties, CSSPseudos {
178
186
  [key: string]: StyledObject<Props> | string | number | StyleFunction<Props> | RuleSet<any> | undefined;
179
187
  }
180
188
  /**
@@ -200,5 +208,5 @@ export interface StyledObject<Props extends object = BaseObject> extends CSSProp
200
208
  */
201
209
  export type CSSProp = Interpolation<any>;
202
210
  export type NoInfer<T> = [T][T extends any ? 0 : never];
203
- export type Substitute<A extends object, B extends object> = FastOmit<A, keyof B> & B;
211
+ export type Substitute<A extends BaseObject, B extends BaseObject> = FastOmit<A, keyof B> & B;
204
212
  export type InsertionTarget = HTMLElement | ShadowRoot;
@@ -1,4 +1,4 @@
1
- declare const elements: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "base", "bdi", "bdo", "big", "blockquote", "body", "br", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "keygen", "label", "legend", "li", "link", "main", "map", "mark", "menu", "menuitem", "meta", "meter", "nav", "noscript", "object", "ol", "optgroup", "option", "output", "p", "param", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "script", "section", "select", "small", "source", "span", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "u", "ul", "use", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "text", "tspan"];
2
- declare const _default: Set<"object" | "g" | "map" | "big" | "link" | "small" | "sub" | "sup" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "base" | "bdi" | "bdo" | "blockquote" | "body" | "br" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "input" | "ins" | "kbd" | "keygen" | "label" | "legend" | "li" | "main" | "mark" | "menu" | "menuitem" | "meta" | "meter" | "nav" | "noscript" | "ol" | "optgroup" | "option" | "output" | "p" | "param" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "script" | "section" | "select" | "source" | "span" | "strong" | "style" | "summary" | "table" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "track" | "u" | "ul" | "var" | "video" | "wbr" | "svg" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "text" | "tspan" | "use">;
1
+ declare const elements: readonly ["a", "abbr", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "blockquote", "body", "button", "canvas", "caption", "cite", "code", "col", "colgroup", "data", "datalist", "dd", "del", "details", "dfn", "dialog", "div", "dl", "dt", "em", "embed", "fieldset", "figcaption", "figure", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "header", "hgroup", "hr", "html", "i", "iframe", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "menu", "meter", "nav", "object", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "slot", "small", "span", "strong", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "u", "ul", "var", "video", "wbr", "circle", "clipPath", "defs", "ellipse", "feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence", "filter", "foreignObject", "g", "image", "line", "linearGradient", "marker", "mask", "path", "pattern", "polygon", "polyline", "radialGradient", "rect", "stop", "svg", "switch", "symbol", "text", "textPath", "tspan", "use"];
2
+ declare const _default: Set<"symbol" | "object" | "map" | "filter" | "search" | "small" | "sub" | "sup" | "input" | "a" | "abbr" | "address" | "area" | "article" | "aside" | "audio" | "b" | "bdi" | "bdo" | "blockquote" | "body" | "button" | "canvas" | "caption" | "cite" | "code" | "col" | "colgroup" | "data" | "datalist" | "dd" | "del" | "details" | "dfn" | "dialog" | "div" | "dl" | "dt" | "em" | "embed" | "fieldset" | "figcaption" | "figure" | "footer" | "form" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "header" | "hgroup" | "hr" | "html" | "i" | "iframe" | "img" | "ins" | "kbd" | "label" | "legend" | "li" | "main" | "mark" | "menu" | "meter" | "nav" | "ol" | "optgroup" | "option" | "output" | "p" | "picture" | "pre" | "progress" | "q" | "rp" | "rt" | "ruby" | "s" | "samp" | "slot" | "section" | "select" | "span" | "strong" | "summary" | "table" | "template" | "tbody" | "td" | "textarea" | "tfoot" | "th" | "thead" | "time" | "tr" | "u" | "ul" | "var" | "video" | "wbr" | "circle" | "clipPath" | "defs" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "switch" | "text" | "textPath" | "tspan" | "use">;
3
3
  export default _default;
4
4
  export type SupportedHTMLElements = (typeof elements)[number];
@@ -1,3 +1,3 @@
1
1
  import { Dict } from '../types';
2
- export declare const EMPTY_ARRAY: readonly any[];
2
+ export declare const EMPTY_ARRAY: Readonly<any[]>;
3
3
  export declare const EMPTY_OBJECT: Readonly<Dict<any>>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Detect if we're running in a React Server Component environment.
3
+ * RSC environments lack createContext, making this a reliable indicator.
4
+ * This is evaluated once at module load time and is deterministic per environment.
5
+ */
6
+ export declare const isRSC: boolean;
7
+ /**
8
+ * Check if React context APIs are available (opposite of isRSC).
9
+ * Used to guard context creation and usage.
10
+ */
11
+ export declare const canUseContext: boolean;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { AnyComponent, ExecutionProps } from '../types';
3
3
  import { NonReactStatics } from '../utils/hoist';
4
- export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.JSX.LibraryManagedAttributes<T, ExecutionProps>> & React.RefAttributes<T>> & NonReactStatics<T>;
4
+ export default function withTheme<T extends AnyComponent>(Component: T): React.ForwardRefExoticComponent<React.PropsWithoutRef<React.ComponentPropsWithRef<T> & ExecutionProps> & React.RefAttributes<T>> & NonReactStatics<T>;
@@ -1,4 +1,4 @@
1
1
  import styled, { LibraryStyled, Styled, StyledInstance } from './constructors/styled';
2
2
  export * from './base';
3
- export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, FastOmit, IStyledComponent, IStyledComponentFactory, IStyledStatics, Interpolation, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyleFunction, StyledObject, StyledOptions, SupportedHTMLElements, WebTarget, } from './types';
4
- export { LibraryStyled, Styled, StyledInstance, styled as default, styled };
3
+ export { CSSKeyframes, CSSObject, CSSProp, CSSProperties, CSSPseudos, DataAttributes, DefaultTheme, ExecutionContext, ExecutionProps, FastOmit, Interpolation, IStyledComponent, IStyledComponentFactory, IStyledStatics, PolymorphicComponent, PolymorphicComponentProps, RuleSet, Runtime, StyledObject, StyledOptions, StyleFunction, SupportedHTMLElements, WebTarget, } from './types';
4
+ export { styled as default, LibraryStyled, Styled, styled, StyledInstance };
@@ -11,5 +11,8 @@ export default class ComponentStyle {
11
11
  rules: RuleSet<any>;
12
12
  staticRulesId: string;
13
13
  constructor(rules: RuleSet<any>, componentId: string, baseStyle?: ComponentStyle | undefined);
14
- generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): string;
14
+ generateAndInjectStyles(executionContext: ExecutionContext, styleSheet: StyleSheet, stylis: Stringifier): {
15
+ className: string;
16
+ css: string;
17
+ };
15
18
  }
@@ -1,7 +1,6 @@
1
- /// <reference types="node" />
2
1
  import React from 'react';
2
+ import { type PipeableStream } from 'react-dom/server';
3
3
  import type * as streamInternal from 'stream';
4
- import { Readable } from 'stream';
5
4
  import StyleSheet from '../sheet';
6
5
  export default class ServerStyleSheet {
7
6
  instance: StyleSheet;
@@ -11,6 +10,6 @@ export default class ServerStyleSheet {
11
10
  collectStyles(children: any): React.JSX.Element;
12
11
  getStyleTags: () => string;
13
12
  getStyleElement: () => React.JSX.Element[];
14
- interleaveWithNodeStream(input: Readable): streamInternal.Transform;
13
+ interleaveWithNodeStream(input: NodeJS.ReadableStream | PipeableStream): streamInternal.Transform;
15
14
  seal: () => void;
16
15
  }
@@ -1,3 +1,3 @@
1
1
  import type { BaseObject, IStyledComponentFactory, RuleSet, StyledOptions, WebTarget } from '../types';
2
- declare function createStyledComponent<Target extends WebTarget, OuterProps extends object, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'web', OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<'web', Target, OuterProps, Statics>>;
2
+ declare function createStyledComponent<Target extends WebTarget, OuterProps extends BaseObject, Statics extends BaseObject = BaseObject>(target: Target, options: StyledOptions<'web', OuterProps>, rules: RuleSet<OuterProps>): ReturnType<IStyledComponentFactory<'web', Target, OuterProps, Statics>>;
3
3
  export default createStyledComponent;
@@ -1,3 +1,3 @@
1
1
  import type { BaseObject, ExecutionProps, IInlineStyleConstructor, IStyledComponentFactory, NativeTarget, RuleSet, StyledOptions } from '../types';
2
- declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExecutionProps, Statics extends object = BaseObject>(target: Target, options: StyledOptions<'native', OuterProps>, rules: RuleSet<OuterProps>) => ReturnType<IStyledComponentFactory<'native', Target, OuterProps, Statics>>;
2
+ declare const _default: (InlineStyle: IInlineStyleConstructor<any>) => <Target extends NativeTarget, OuterProps extends ExecutionProps, Statics extends object = BaseObject>(target: Target, options: StyledOptions<"native", OuterProps>, rules: RuleSet<OuterProps>) => ReturnType<IStyledComponentFactory<"native", Target, OuterProps, Statics>>;
3
3
  export default _default;
@@ -1,4 +1,3 @@
1
- /// <reference path="../../../src/global.d.ts" />
2
1
  import React from 'react';
3
2
  import { Styled } from '../constructors/constructWithOptions';
4
3
  import css from '../constructors/css';
@@ -6,32 +5,15 @@ import withTheme from '../hoc/withTheme';
6
5
  import ThemeProvider, { ThemeConsumer, ThemeContext, useTheme } from '../models/ThemeProvider';
7
6
  import { NativeTarget, RuleSet } from '../types';
8
7
  import isStyledComponent from '../utils/isStyledComponent';
9
- declare const styled: (<Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>) & {
10
- ActivityIndicator: Styled<"native", typeof import("react-native").ActivityIndicator, import("react-native").ActivityIndicatorProps, import("../types").BaseObject>;
11
- Button: Styled<"native", typeof import("react-native").Button, import("react-native").ButtonProps, import("../types").BaseObject>;
12
- DatePickerIOS: Styled<"native", typeof import("react-native").DatePickerIOS, import("react-native").DatePickerIOSProps, import("../types").BaseObject>;
13
- DrawerLayoutAndroid: Styled<"native", typeof import("react-native").DrawerLayoutAndroid, import("react-native").DrawerLayoutAndroidProps, import("../types").BaseObject>;
14
- FlatList: Styled<"native", typeof import("react-native").FlatList, import("react-native").FlatListProps<unknown>, import("../types").BaseObject>;
15
- Image: Styled<"native", typeof import("react-native").Image, import("react-native").ImageProps, import("../types").BaseObject>;
16
- ImageBackground: Styled<"native", typeof import("react-native").ImageBackground, import("react-native").ImageBackgroundProps, import("../types").BaseObject>;
17
- KeyboardAvoidingView: Styled<"native", typeof import("react-native").KeyboardAvoidingView, import("react-native").KeyboardAvoidingViewProps, import("../types").BaseObject>;
18
- Modal: Styled<"native", typeof import("react-native").Modal, import("react-native").ModalBaseProps & import("react-native").ModalPropsIOS & import("react-native").ModalPropsAndroid & import("react-native").ViewProps, import("../types").BaseObject>;
19
- Pressable: Styled<"native", React.ForwardRefExoticComponent<import("react-native").PressableProps & React.RefAttributes<import("react-native").View>>, import("react-native").PressableProps & React.RefAttributes<import("react-native").View>, import("../types").BaseObject>;
20
- ProgressBarAndroid: Styled<"native", typeof import("react-native").ProgressBarAndroid, import("react-native").ProgressBarAndroidProps, import("../types").BaseObject>;
21
- ProgressViewIOS: Styled<"native", typeof import("react-native").ProgressViewIOS, import("react-native").ProgressViewIOSProps, import("../types").BaseObject>;
22
- RefreshControl: Styled<"native", typeof import("react-native").RefreshControl, import("react-native").RefreshControlProps, import("../types").BaseObject>;
23
- SafeAreaView: Styled<"native", typeof import("react-native").SafeAreaView, import("react-native").ViewProps, import("../types").BaseObject>;
24
- ScrollView: Styled<"native", typeof import("react-native").ScrollView, import("react-native").ScrollViewProps, import("../types").BaseObject>;
25
- SectionList: Styled<"native", typeof import("react-native").SectionList, import("react-native").SectionListProps<unknown, unknown>, import("../types").BaseObject>;
26
- Slider: Styled<"native", typeof import("react-native").Slider, import("react-native").SliderProps, import("../types").BaseObject>;
27
- Switch: Styled<"native", typeof import("react-native").Switch, import("react-native").SwitchProps, import("../types").BaseObject>;
28
- Text: Styled<"native", typeof import("react-native").Text, import("react-native").TextProps, import("../types").BaseObject>;
29
- TextInput: Styled<"native", typeof import("react-native").TextInput, import("react-native").TextInputProps, import("../types").BaseObject>;
30
- TouchableHighlight: Styled<"native", typeof import("react-native").TouchableHighlight, import("react-native").TouchableHighlightProps, import("../types").BaseObject>;
31
- TouchableOpacity: Styled<"native", typeof import("react-native").TouchableOpacity, import("react-native").TouchableOpacityProps, import("../types").BaseObject>;
32
- View: Styled<"native", typeof import("react-native").View, import("react-native").ViewProps, import("../types").BaseObject>;
33
- VirtualizedList: Styled<"native", typeof import("react-native").VirtualizedList, import("react-native").VirtualizedListProps<unknown>, import("../types").BaseObject>;
8
+ declare const reactNative: Awaited<typeof import("react-native")>;
9
+ declare const baseStyled: <Target extends NativeTarget>(tag: Target) => Styled<"native", Target, Target extends import("../types").KnownTarget ? React.ComponentPropsWithRef<Target> : import("../types").BaseObject, import("../types").BaseObject>;
10
+ declare const aliases: readonly ["ActivityIndicator", "Button", "DatePickerIOS", "DrawerLayoutAndroid", "FlatList", "Image", "ImageBackground", "KeyboardAvoidingView", "Modal", "Pressable", "ProgressBarAndroid", "ProgressViewIOS", "RefreshControl", "SafeAreaView", "ScrollView", "SectionList", "Slider", "Switch", "Text", "TextInput", "TouchableHighlight", "TouchableOpacity", "View", "VirtualizedList"];
11
+ type KnownComponents = (typeof aliases)[number];
12
+ /** Isolates RN-provided components since they don't expose a helper type for this. */
13
+ type RNComponents = {
14
+ [K in keyof typeof reactNative]: (typeof reactNative)[K] extends React.ComponentType<any> ? (typeof reactNative)[K] : never;
34
15
  };
16
+ declare const styled: typeof baseStyled & { [E in KnownComponents]: Styled<"native", RNComponents[E], React.ComponentProps<RNComponents[E]>>; };
35
17
  declare const toStyleSheet: (rules: RuleSet<object>) => import("css-to-react-native").Style;
36
18
  export { CSSKeyframes, CSSObject, CSSProperties, CSSPseudos, DefaultTheme, ExecutionContext, ExecutionProps, IStyledComponent, IStyledComponentFactory, IStyledStatics, NativeTarget, PolymorphicComponent, PolymorphicComponentProps, Runtime, StyledObject, StyledOptions, } from '../types';
37
19
  export { ThemeConsumer, ThemeContext, ThemeProvider, css, styled as default, isStyledComponent, styled, toStyleSheet, useTheme, withTheme, };
@@ -2,21 +2,21 @@ import { InsertionTarget } from '../types';
2
2
  import { SheetOptions } from './types';
3
3
  /** Create a CSSStyleSheet-like tag depending on the environment */
4
4
  export declare const makeTag: ({ isServer, useCSSOMInjection, target }: SheetOptions) => {
5
- element: HTMLStyleElement;
6
- sheet: CSSStyleSheet;
5
+ rules: string[];
7
6
  length: number;
8
7
  insertRule(index: number, rule: string): boolean;
9
8
  deleteRule(index: number): void;
10
9
  getRule(index: number): string;
11
10
  } | {
12
11
  element: HTMLStyleElement;
13
- nodes: NodeListOf<Node>;
12
+ sheet: CSSStyleSheet;
14
13
  length: number;
15
14
  insertRule(index: number, rule: string): boolean;
16
15
  deleteRule(index: number): void;
17
16
  getRule(index: number): string;
18
17
  } | {
19
- rules: string[];
18
+ element: HTMLStyleElement;
19
+ nodes: NodeListOf<Node>;
20
20
  length: number;
21
21
  insertRule(index: number, rule: string): boolean;
22
22
  deleteRule(index: number): void;