@mui/styled-engine 6.4.9 → 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 +46 -0
- package/StyledEngineProvider/StyledEngineProvider.js +13 -2
- package/index.js +1 -1
- package/modern/StyledEngineProvider/StyledEngineProvider.js +13 -2
- package/modern/index.js +1 -1
- package/node/StyledEngineProvider/StyledEngineProvider.js +12 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
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
|
+
|
|
3
49
|
## 6.4.9
|
|
4
50
|
|
|
5
51
|
<!-- generated comparing v6.4.8..v6.x -->
|
|
@@ -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(() =>
|
|
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
|
@@ -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(() =>
|
|
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
|
@@ -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(() =>
|
|
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