styled-components 6.1.19 → 6.2.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 (54) hide show
  1. package/dist/constructors/constructWithOptions.d.ts +0 -1
  2. package/dist/constructors/styled.d.ts +2 -135
  3. package/dist/hoc/withTheme.d.ts +1 -1
  4. package/dist/models/ServerStyleSheet.d.ts +2 -3
  5. package/dist/models/StyledComponent.d.ts +1 -1
  6. package/dist/models/StyledNativeComponent.d.ts +1 -1
  7. package/dist/native/index.d.ts +8 -26
  8. package/dist/styled-components.browser.cjs.js +1 -1
  9. package/dist/styled-components.browser.cjs.js.map +1 -1
  10. package/dist/styled-components.browser.esm.js +1 -1
  11. package/dist/styled-components.browser.esm.js.map +1 -1
  12. package/dist/styled-components.cjs.js +1 -1
  13. package/dist/styled-components.cjs.js.map +1 -1
  14. package/dist/styled-components.esm.js +1 -1
  15. package/dist/styled-components.esm.js.map +1 -1
  16. package/dist/styled-components.js +22 -15
  17. package/dist/styled-components.js.map +1 -1
  18. package/dist/styled-components.min.js +1 -1
  19. package/dist/styled-components.min.js.map +1 -1
  20. package/dist/test/utils.d.ts +2 -3
  21. package/dist/types.d.ts +23 -23
  22. package/dist/utils/domElements.d.ts +1 -1
  23. package/dist/utils/empties.d.ts +1 -1
  24. package/native/dist/constructors/constructWithOptions.d.ts +0 -1
  25. package/native/dist/constructors/styled.d.ts +2 -135
  26. package/native/dist/dist/constructors/constructWithOptions.d.ts +0 -1
  27. package/native/dist/dist/constructors/styled.d.ts +2 -135
  28. package/native/dist/dist/hoc/withTheme.d.ts +1 -1
  29. package/native/dist/dist/models/ServerStyleSheet.d.ts +2 -3
  30. package/native/dist/dist/models/StyledComponent.d.ts +1 -1
  31. package/native/dist/dist/models/StyledNativeComponent.d.ts +1 -1
  32. package/native/dist/dist/native/index.d.ts +8 -26
  33. package/native/dist/dist/test/utils.d.ts +2 -3
  34. package/native/dist/dist/types.d.ts +23 -23
  35. package/native/dist/dist/utils/domElements.d.ts +1 -1
  36. package/native/dist/dist/utils/empties.d.ts +1 -1
  37. package/native/dist/hoc/withTheme.d.ts +1 -1
  38. package/native/dist/models/ServerStyleSheet.d.ts +2 -3
  39. package/native/dist/models/StyledComponent.d.ts +1 -1
  40. package/native/dist/models/StyledNativeComponent.d.ts +1 -1
  41. package/native/dist/native/index.d.ts +8 -26
  42. package/native/dist/styled-components.native.cjs.js +1 -1
  43. package/native/dist/styled-components.native.cjs.js.map +1 -1
  44. package/native/dist/styled-components.native.esm.js +1 -1
  45. package/native/dist/styled-components.native.esm.js.map +1 -1
  46. package/native/dist/test/utils.d.ts +2 -3
  47. package/native/dist/types.d.ts +23 -23
  48. package/native/dist/utils/domElements.d.ts +1 -1
  49. package/native/dist/utils/empties.d.ts +1 -1
  50. package/package.json +55 -52
  51. package/test-utils/setupTestFramework.ts +7 -2
  52. package/dist/hoc/withTheme.spec.d.ts +0 -1
  53. package/native/dist/dist/hoc/withTheme.spec.d.ts +0 -1
  54. package/native/dist/hoc/withTheme.spec.d.ts +0 -1
@@ -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<Props>) | ((props: ExecutionContext & Props) => ExecutionProps & Partial<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,7 +118,7 @@ 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> : {}> = NoInfer<FastOmit<Substitute<BaseProps, Substitute<ForwardedAsTargetProps, AsTargetProps>>, keyof ExecutionProps>> & FastOmit<ExecutionProps, 'as' | 'forwardedAs'> & {
122
122
  as?: AsTarget;
123
123
  forwardedAs?: ForwardedAsTarget;
124
124
  };
@@ -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,13 +156,13 @@ 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
  }
@@ -173,8 +173,8 @@ export type CSSPseudos = {
173
173
  export type CSSKeyframes = object & {
174
174
  [key: string]: CSSObject;
175
175
  };
176
- export type CSSObject<Props extends object = BaseObject> = StyledObject<Props>;
177
- export interface StyledObject<Props extends object = BaseObject> extends CSSProperties, CSSPseudos {
176
+ export type CSSObject<Props extends BaseObject = BaseObject> = StyledObject<Props>;
177
+ export interface StyledObject<Props extends BaseObject = BaseObject> extends CSSProperties, CSSPseudos {
178
178
  [key: string]: StyledObject<Props> | string | number | StyleFunction<Props> | RuleSet<any> | undefined;
179
179
  }
180
180
  /**
@@ -200,5 +200,5 @@ export interface StyledObject<Props extends object = BaseObject> extends CSSProp
200
200
  */
201
201
  export type CSSProp = Interpolation<any>;
202
202
  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;
203
+ export type Substitute<A extends BaseObject, B extends BaseObject> = FastOmit<A, keyof B> & B;
204
204
  export type InsertionTarget = HTMLElement | ShadowRoot;
@@ -1,4 +1,4 @@
1
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">;
2
+ declare const _default: Set<"object" | "g" | "map" | "big" | "link" | "small" | "sub" | "sup" | "input" | "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" | "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" | "circle" | "clipPath" | "defs" | "ellipse" | "foreignObject" | "image" | "line" | "linearGradient" | "marker" | "mask" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "stop" | "svg" | "text" | "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>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styled-components",
3
- "version": "6.1.19",
3
+ "version": "6.2.0",
4
4
  "description": "CSS for the <Component> Age. Style components your way with speed, strong typing, and flexibility.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,7 +23,6 @@
23
23
  "test": "yarn run test:web && yarn run test:native",
24
24
  "test:web": "jest -c jest.config.main.js",
25
25
  "test:native": "jest -c jest.config.native.js --forceExit",
26
- "test:integration": "jest -c jest.config.integration.js --runInBand --forceExit",
27
26
  "size": "bundlewatch",
28
27
  "prettier": "prettier src --write",
29
28
  "prettier:check": "prettier src --check",
@@ -56,12 +55,12 @@
56
55
  "dependencies": {
57
56
  "@emotion/is-prop-valid": "1.2.2",
58
57
  "@emotion/unitless": "0.8.1",
59
- "@types/stylis": "4.2.5",
58
+ "@types/stylis": "4.2.7",
60
59
  "css-to-react-native": "3.2.0",
61
- "csstype": "3.1.3",
60
+ "csstype": "3.2.3",
62
61
  "postcss": "8.4.49",
63
62
  "shallowequal": "1.1.0",
64
- "stylis": "4.3.2",
63
+ "stylis": "4.3.6",
65
64
  "tslib": "2.6.2"
66
65
  },
67
66
  "peerDependencies": {
@@ -69,53 +68,57 @@
69
68
  "react-dom": ">= 16.8.0"
70
69
  },
71
70
  "devDependencies": {
72
- "@babel/core": "7.24.5",
73
- "@babel/helper-module-imports": "7.24.3",
74
- "@babel/plugin-external-helpers": "7.24.1",
75
- "@babel/plugin-proposal-class-properties": "7.18.6",
76
- "@babel/plugin-proposal-object-rest-spread": "7.20.7",
77
- "@babel/plugin-transform-flow-strip-types": "7.24.1",
78
- "@babel/preset-env": "7.24.5",
79
- "@babel/preset-react": "7.24.1",
80
- "@babel/preset-typescript": "7.24.1",
81
- "@rollup/plugin-typescript": "11.1.6",
82
- "@types/enzyme": "3.10.18",
83
- "@types/jest": "29.5.12",
84
- "@types/js-beautify": "1.14.3",
85
- "@types/node": "18.19.31",
86
- "@types/react": "17.0.80",
87
- "@types/react-dom": "17.0.25",
88
- "@types/react-frame-component": "4.1.6",
89
- "@types/react-native": "0.69.26",
90
- "@types/react-test-renderer": "17.0.9",
91
- "@types/shallowequal": "1.1.5",
92
- "babel-jest": "29.7.0",
93
- "babel-plugin-add-module-exports": "1.0.4",
94
- "babel-plugin-styled-components": "2.1.4",
95
- "babel-plugin-tester": "10.1.0",
96
- "bundlewatch": "0.3.3",
97
- "jest": "29.7.0",
98
- "jest-environment-jsdom": "29.7.0",
99
- "jest-serializer-html": "7.1.0",
100
- "jest-watch-typeahead": "2.2.2",
101
- "js-beautify": "1.15.1",
102
- "prettier": "3.2.5",
103
- "prop-types": "15.8.1",
104
- "react": "17.0.2",
105
- "react-dom": "17.0.2",
106
- "react-frame-component": "4.1.3",
107
- "react-native": "0.70.15",
108
- "react-test-renderer": "17.0.2",
109
- "rollup": "3.29.4",
110
- "rollup-plugin-commonjs": "10.1.0",
111
- "rollup-plugin-json": "4.0.0",
112
- "rollup-plugin-node-resolve": "5.2.0",
113
- "rollup-plugin-replace": "2.2.0",
114
- "rollup-plugin-sourcemaps": "0.6.3",
115
- "rollup-plugin-terser": "7.0.2",
116
- "stylis-plugin-rtl": "2.1.1",
117
- "ts-toolbelt": "9.6.0",
118
- "typescript": "5.4.5"
71
+ "@babel/core": "^7.24.5",
72
+ "@babel/helper-module-imports": "^7.24.3",
73
+ "@babel/plugin-external-helpers": "^7.24.1",
74
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
75
+ "@babel/plugin-proposal-object-rest-spread": "^7.20.7",
76
+ "@babel/plugin-transform-flow-strip-types": "^7.24.1",
77
+ "@babel/preset-env": "^7.24.5",
78
+ "@babel/preset-react": "^7.24.1",
79
+ "@babel/preset-typescript": "^7.24.1",
80
+ "@rollup/plugin-typescript": "^11.1.6",
81
+ "@testing-library/dom": "^10.4.1",
82
+ "@testing-library/jest-dom": "^6.8.0",
83
+ "@testing-library/react": "^16.3.0",
84
+ "@testing-library/user-event": "^14.6.1",
85
+ "@types/enzyme": "^3.10.18",
86
+ "@types/jest": "^30.0.0",
87
+ "@types/js-beautify": "^1.14.3",
88
+ "@types/node": "^18.19.31",
89
+ "@types/react": "^18",
90
+ "@types/react-dom": "^18",
91
+ "@types/react-frame-component": "^4.1.6",
92
+ "@types/react-native": "^0.71",
93
+ "@types/react-test-renderer": "^18.0.0",
94
+ "@types/shallowequal": "^1.1.5",
95
+ "babel-jest": "^30.1.2",
96
+ "babel-plugin-add-module-exports": "^1.0.4",
97
+ "babel-plugin-styled-components": "^2.1.4",
98
+ "babel-plugin-tester": "^10.1.0",
99
+ "bundlewatch": "^0.3.3",
100
+ "jest": "^30.1.3",
101
+ "jest-environment-jsdom": "^30.1.2",
102
+ "jest-serializer-html": "^7.1.0",
103
+ "jest-watch-typeahead": "^3.0.1",
104
+ "js-beautify": "^1.15.1",
105
+ "prettier": "^3.6.2",
106
+ "prop-types": "^15.8.1",
107
+ "react": "^18",
108
+ "react-dom": "^18",
109
+ "react-frame-component": "^4.1.3",
110
+ "react-native": "~0.71",
111
+ "react-test-renderer": "^18.0.0",
112
+ "rollup": "^3.29.4",
113
+ "rollup-plugin-commonjs": "^10.1.0",
114
+ "rollup-plugin-json": "^4.0.0",
115
+ "rollup-plugin-node-resolve": "^5.2.0",
116
+ "rollup-plugin-replace": "^2.2.0",
117
+ "rollup-plugin-sourcemaps": "^0.6.3",
118
+ "rollup-plugin-terser": "^7.0.2",
119
+ "stylis-plugin-rtl": "^2.1.1",
120
+ "ts-toolbelt": "^9.6.0",
121
+ "typescript": "^5.4.5"
119
122
  },
120
123
  "bundlewatch": {
121
124
  "files": [
@@ -4,12 +4,17 @@ const suppressedErrors = [
4
4
  'Error: Could not parse CSS stylesheet',
5
5
  'Warning: Use the `defaultValue` or `value` props instead of setting children on <textarea>',
6
6
  'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
7
+ 'Warning: <%s /> is using incorrect casing.',
8
+ 'Warning: The tag <%s> is unrecognized in this browser.',
9
+ 'Warning: React does not recognize the `%s` prop on a DOM element.',
10
+ 'Warning: %s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.',
11
+ 'Warning: renderToNodeStream is deprecated. Use renderToPipeableStream instead.',
7
12
  ];
8
13
 
9
14
  beforeEach(() => {
10
15
  // Suppress errors from JSDOM CSS parser
11
16
  // See: https://github.com/jsdom/jsdom/issues/2177
12
- console.error = (logged: any) => {
17
+ console.error = jest.fn((logged: any) => {
13
18
  const message = logged.stack || logged;
14
19
 
15
20
  if (
@@ -18,7 +23,7 @@ beforeEach(() => {
18
23
  ) {
19
24
  consoleError(logged);
20
25
  }
21
- };
26
+ });
22
27
  });
23
28
 
24
29
  afterEach(() => {
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};