@mui/utils
Advanced tools
Comparing version 6.1.0 to 6.1.1-dev.20240919-130050-82a6448768
@@ -5,2 +5,4 @@ 'use client'; | ||
let globalId = 0; | ||
// TODO React 17: Remove `useGlobalId` once React 17 support is removed | ||
function useGlobalId(idOverride) { | ||
@@ -22,4 +24,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride); | ||
// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814 | ||
const maybeReactUseId = React['useId'.toString()]; | ||
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why | ||
const safeReact = { | ||
...React | ||
}; | ||
const maybeReactUseId = safeReact.useId; | ||
/** | ||
@@ -32,2 +38,3 @@ * | ||
export default function useId(idOverride) { | ||
// React.useId() is only available from React 17.0.0. | ||
if (maybeReactUseId !== undefined) { | ||
@@ -37,2 +44,3 @@ const reactId = maybeReactUseId(); | ||
} | ||
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler | ||
@@ -39,0 +47,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime. |
/** | ||
* @mui/utils v6.1.0 | ||
* @mui/utils v6.1.1-dev.20240919-130050-82a6448768 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
/** | ||
* @mui/utils v6.1.0 | ||
* @mui/utils v6.1.1-dev.20240919-130050-82a6448768 | ||
* | ||
@@ -4,0 +4,0 @@ * @license MIT |
@@ -5,2 +5,4 @@ 'use client'; | ||
let globalId = 0; | ||
// TODO React 17: Remove `useGlobalId` once React 17 support is removed | ||
function useGlobalId(idOverride) { | ||
@@ -22,4 +24,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride); | ||
// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814 | ||
const maybeReactUseId = React['useId'.toString()]; | ||
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why | ||
const safeReact = { | ||
...React | ||
}; | ||
const maybeReactUseId = safeReact.useId; | ||
/** | ||
@@ -32,2 +38,3 @@ * | ||
export default function useId(idOverride) { | ||
// React.useId() is only available from React 17.0.0. | ||
if (maybeReactUseId !== undefined) { | ||
@@ -37,2 +44,3 @@ const reactId = maybeReactUseId(); | ||
} | ||
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler | ||
@@ -39,0 +47,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime. |
{ | ||
"name": "@mui/utils", | ||
"version": "6.1.0", | ||
"version": "6.1.1-dev.20240919-130050-82a6448768", | ||
"private": false, | ||
@@ -16,3 +16,3 @@ "author": "MUI Team", | ||
"type": "git", | ||
"url": "https://github.com/mui/material-ui.git", | ||
"url": "git+https://github.com/mui/material-ui.git", | ||
"directory": "packages/mui-utils" | ||
@@ -35,3 +35,3 @@ }, | ||
"react-is": "^18.3.1", | ||
"@mui/types": "^7.2.16" | ||
"@mui/types": "^7.2.17" | ||
}, | ||
@@ -38,0 +38,0 @@ "peerDependencies": { |
@@ -11,2 +11,4 @@ "use strict"; | ||
let globalId = 0; | ||
// TODO React 17: Remove `useGlobalId` once React 17 support is removed | ||
function useGlobalId(idOverride) { | ||
@@ -28,4 +30,8 @@ const [defaultId, setDefaultId] = React.useState(idOverride); | ||
// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814 | ||
const maybeReactUseId = React['useId'.toString()]; | ||
// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why | ||
const safeReact = { | ||
...React | ||
}; | ||
const maybeReactUseId = safeReact.useId; | ||
/** | ||
@@ -38,2 +44,3 @@ * | ||
function useId(idOverride) { | ||
// React.useId() is only available from React 17.0.0. | ||
if (maybeReactUseId !== undefined) { | ||
@@ -43,2 +50,3 @@ const reactId = maybeReactUseId(); | ||
} | ||
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler | ||
@@ -45,0 +53,0 @@ // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime. |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
288219
5016
1
Updated@mui/types@^7.2.17