@mui/styled-engine 6.4.8 → 6.4.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,82 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.4.11
4
+
5
+ _Apr 9, 2025_
6
+
7
+ A big thanks to the 3 contributors who made this release possible.
8
+
9
+ ### `@mui/material@6.4.11`
10
+
11
+ - [AvatarGroup] Fix `spacing` prop ignoring value `0` (#45845) @Kartik-Murthy
12
+ - [Dialog] Deprecate composed classes (#45814) @sai6855
13
+
14
+ ### `@mui/styled-engine@6.4.11`
15
+
16
+ - Add caching to improve performance for running tests with Jest (#45855) @siriwatknp
17
+
18
+ ### Docs
19
+
20
+ - Add missing v7 docs banner (#45842) @DiegoAndai
21
+ - Add v7 is here banner (#45838) @DiegoAndai
22
+ - Fix lab version install instructions (#45770) @DiegoAndai
23
+
24
+ All contributors of this release in alphabetical order: @DiegoAndai, @Kartik-Murthy, @sai6855
25
+
26
+ ## 6.4.10
27
+
28
+ <!-- generated comparing v6.4.9..v6.x -->
29
+
30
+ _Mar 31, 2025_
31
+
32
+ A big thanks to the 4 contributors who made this release possible.
33
+
34
+ ### `@mui/material@6.4.10`
35
+
36
+ - [Autocomplete] Prevent shrink animation in controlled Autocomplete when initial `value` is provided (#45735) @imadx
37
+ - [Popover] Allow `null` in `anchorEl` function return type (#45723) @eduter
38
+
39
+ ### Docs
40
+
41
+ - Fix new React project link, CRA deprecated (#45669) @oliviertassinari
42
+
43
+ ### Core
44
+
45
+ - [utils] Support cleanup callbacks in useForkRef (#45733) @DiegoAndai
46
+
47
+ All contributors of this release in alphabetical order: @DiegoAndai, @eduter, @imadx, @oliviertassinari
48
+
49
+ ## 6.4.9
50
+
51
+ <!-- generated comparing v6.4.8..v6.x -->
52
+
53
+ _Mar 25, 2025_
54
+
55
+ A big thanks to the 7 contributors who made this release possible.
56
+
57
+ ### `@mui/material@6.4.9`
58
+
59
+ - [Autocomplete] Fix when `onHighlightChange` is called (@ZeeshanTamboli) (#45635) @ZeeshanTamboli
60
+ - [StepLabel] Add missing root slot (#45607) @sai6855
61
+ - [Switch] Add slots and slotProps (#45628) @siriwatknp
62
+ - [TextField] Add `root` slot (#45616) @sai6855
63
+ - [Tabs] Fix modifier keys + Left/Right Arrow key from being consumed by tab navigation (#45620) @mushfiqbh
64
+
65
+ ### `@mui/codemon@6.4.9`
66
+
67
+ - Add missing deprecations in deprecations-all file (#45508) @sai6855
68
+
69
+ ### Docs
70
+
71
+ - [docs] Fix grammatical errors in support.md (#45636) @letianpailove
72
+ - [docs] Restore utility component docs from MUI Base to Material UI (#45240) @mapache-salvaje
73
+
74
+ ### Core
75
+
76
+ - [core] Prepare v6 branch for v7 stable release (#45668) @DiegoAndai
77
+
78
+ All contributors of this release in alphabetical order: @DiegoAndai, @letianpailove, @mapache-salvaje, @mushfiqbh, @sai6855, @siriwatknp, @ZeeshanTamboli
79
+
3
80
  ## 6.4.8
4
81
 
5
82
  <!-- generated comparing v6.4.7..v6.x -->
package/README.md CHANGED
@@ -6,6 +6,6 @@ It is used internally in the `@mui/system` package.
6
6
 
7
7
  ## Documentation
8
8
 
9
- <!-- #default-branch-switch -->
9
+ <!-- #host-reference -->
10
10
 
11
- Visit [https://mui.com/material-ui/integrations/styled-components/](https://mui.com/material-ui/integrations/styled-components/) to view the full documentation.
11
+ Visit [https://v6.mui.com/material-ui/integrations/styled-components/](https://v6.mui.com/material-ui/integrations/styled-components/) to view the full documentation.
@@ -6,10 +6,13 @@ import { CacheProvider } from '@emotion/react';
6
6
  import createCache from '@emotion/cache';
7
7
  import { StyleSheet } from '@emotion/sheet';
8
8
 
9
+ // To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ const cacheMap = new Map();
12
+
9
13
  // Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.
10
14
  // We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.
11
15
  // Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
16
  export const TEST_INTERNALS_DO_NOT_USE = {
14
17
  /**
15
18
  * to intercept the generated CSS before inserting to the style tag, so that we can check the generated CSS.
@@ -97,7 +100,15 @@ export default function StyledEngineProvider(props) {
97
100
  enableCssLayer,
98
101
  children
99
102
  } = props;
100
- const cache = React.useMemo(() => getCache(injectFirst, enableCssLayer), [injectFirst, enableCssLayer]);
103
+ const cache = React.useMemo(() => {
104
+ const cacheKey = `${injectFirst}-${enableCssLayer}`;
105
+ if (cacheMap.has(cacheKey)) {
106
+ return cacheMap.get(cacheKey);
107
+ }
108
+ const fresh = getCache(injectFirst, enableCssLayer);
109
+ cacheMap.set(cacheKey, fresh);
110
+ return fresh;
111
+ }, [injectFirst, enableCssLayer]);
101
112
  return cache ? /*#__PURE__*/_jsx(CacheProvider, {
102
113
  value: cache,
103
114
  children: children
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v6.4.8
2
+ * @mui/styled-engine v6.4.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -6,10 +6,13 @@ import { CacheProvider } from '@emotion/react';
6
6
  import createCache from '@emotion/cache';
7
7
  import { StyleSheet } from '@emotion/sheet';
8
8
 
9
+ // To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ const cacheMap = new Map();
12
+
9
13
  // Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.
10
14
  // We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.
11
15
  // Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.
12
- import { jsx as _jsx } from "react/jsx-runtime";
13
16
  export const TEST_INTERNALS_DO_NOT_USE = {
14
17
  /**
15
18
  * to intercept the generated CSS before inserting to the style tag, so that we can check the generated CSS.
@@ -97,7 +100,15 @@ export default function StyledEngineProvider(props) {
97
100
  enableCssLayer,
98
101
  children
99
102
  } = props;
100
- const cache = React.useMemo(() => getCache(injectFirst, enableCssLayer), [injectFirst, enableCssLayer]);
103
+ const cache = React.useMemo(() => {
104
+ const cacheKey = `${injectFirst}-${enableCssLayer}`;
105
+ if (cacheMap.has(cacheKey)) {
106
+ return cacheMap.get(cacheKey);
107
+ }
108
+ const fresh = getCache(injectFirst, enableCssLayer);
109
+ cacheMap.set(cacheKey, fresh);
110
+ return fresh;
111
+ }, [injectFirst, enableCssLayer]);
101
112
  return cache ? /*#__PURE__*/_jsx(CacheProvider, {
102
113
  value: cache,
103
114
  children: children
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v6.4.8
2
+ * @mui/styled-engine v6.4.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -14,6 +14,9 @@ var _react2 = require("@emotion/react");
14
14
  var _cache = _interopRequireDefault(require("@emotion/cache"));
15
15
  var _sheet = require("@emotion/sheet");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
+ // To fix [Jest performance](https://github.com/mui/material-ui/issues/45638).
18
+ const cacheMap = new Map();
19
+
17
20
  // Need to add a private variable to test the generated CSS from Emotion, this is the simplest way to do it.
18
21
  // We can't test the CSS from `style` tag easily because the `speedy: true` (produce empty text content) is enabled by Emotion.
19
22
  // Even if we disable it, JSDOM needs extra configuration to be able to parse `@layer` CSS.
@@ -104,7 +107,15 @@ function StyledEngineProvider(props) {
104
107
  enableCssLayer,
105
108
  children
106
109
  } = props;
107
- const cache = React.useMemo(() => getCache(injectFirst, enableCssLayer), [injectFirst, enableCssLayer]);
110
+ const cache = React.useMemo(() => {
111
+ const cacheKey = `${injectFirst}-${enableCssLayer}`;
112
+ if (cacheMap.has(cacheKey)) {
113
+ return cacheMap.get(cacheKey);
114
+ }
115
+ const fresh = getCache(injectFirst, enableCssLayer);
116
+ cacheMap.set(cacheKey, fresh);
117
+ return fresh;
118
+ }, [injectFirst, enableCssLayer]);
108
119
  return cache ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.CacheProvider, {
109
120
  value: cache,
110
121
  children: children
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/styled-engine v6.4.8
2
+ * @mui/styled-engine v6.4.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/styled-engine",
3
- "version": "6.4.8",
3
+ "version": "6.4.11",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "styled() API wrapper package for emotion.",