@radix-ui/react-use-layout-effect 1.1.0 → 1.1.1-rc.1
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/dist/index.js +5 -5
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +3 -3
- package/package.json +14 -2
package/dist/index.js
CHANGED
|
@@ -28,14 +28,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// packages/react/use-layout-effect/src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
useLayoutEffect: () => useLayoutEffect2
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
|
-
// packages/react/use-layout-effect/src/
|
|
37
|
+
// packages/react/use-layout-effect/src/use-layout-effect.tsx
|
|
38
38
|
var React = __toESM(require("react"));
|
|
39
|
-
var useLayoutEffect2 =
|
|
39
|
+
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/index.ts", "../src/
|
|
4
|
-
"sourcesContent": ["export { useLayoutEffect } from './
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,YAAuB;AASvB,IAAMC,mBAAkB,
|
|
3
|
+
"sources": ["../src/index.ts", "../src/use-layout-effect.tsx"],
|
|
4
|
+
"sourcesContent": ["export { useLayoutEffect } from './use-layout-effect';\n", "import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,yBAAAA;AAAA;AAAA;;;ACAA,YAAuB;AASvB,IAAMC,mBAAkB,YAAY,WAAiB,wBAAkB,MAAM;AAAC;",
|
|
6
6
|
"names": ["useLayoutEffect", "useLayoutEffect"]
|
|
7
7
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// packages/react/use-layout-effect/src/
|
|
1
|
+
// packages/react/use-layout-effect/src/use-layout-effect.tsx
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
var useLayoutEffect2 =
|
|
3
|
+
var useLayoutEffect2 = globalThis?.document ? React.useLayoutEffect : () => {
|
|
4
4
|
};
|
|
5
5
|
export {
|
|
6
6
|
useLayoutEffect2 as useLayoutEffect
|
package/dist/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect =
|
|
5
|
-
"mappings": ";AAAA,YAAY,WAAW;AASvB,IAAMA,mBAAkB,
|
|
3
|
+
"sources": ["../src/use-layout-effect.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\n\n/**\n * On the server, React emits a warning when calling `useLayoutEffect`.\n * This is because neither `useLayoutEffect` nor `useEffect` run on the server.\n * We use this safe version which suppresses the warning by replacing it with a noop on the server.\n *\n * See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect\n */\nconst useLayoutEffect = globalThis?.document ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"],
|
|
5
|
+
"mappings": ";AAAA,YAAY,WAAW;AASvB,IAAMA,mBAAkB,YAAY,WAAiB,wBAAkB,MAAM;AAAC;",
|
|
6
6
|
"names": ["useLayoutEffect"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-use-layout-effect",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -24,9 +24,20 @@
|
|
|
24
24
|
],
|
|
25
25
|
"sideEffects": false,
|
|
26
26
|
"scripts": {
|
|
27
|
+
"lint": "eslint --max-warnings 0 src",
|
|
27
28
|
"clean": "rm -rf dist",
|
|
28
29
|
"version": "yarn version"
|
|
29
30
|
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@repo/eslint-config": "0.0.0",
|
|
33
|
+
"@repo/typescript-config": "0.0.0",
|
|
34
|
+
"@types/react": "^19.0.7",
|
|
35
|
+
"@types/react-dom": "^19.0.3",
|
|
36
|
+
"eslint": "^9.18.0",
|
|
37
|
+
"react": "^19.0.0",
|
|
38
|
+
"react-dom": "^19.0.0",
|
|
39
|
+
"typescript": "^5.7.3"
|
|
40
|
+
},
|
|
30
41
|
"peerDependencies": {
|
|
31
42
|
"@types/react": "*",
|
|
32
43
|
"react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc"
|
|
@@ -43,5 +54,6 @@
|
|
|
43
54
|
},
|
|
44
55
|
"bugs": {
|
|
45
56
|
"url": "https://github.com/radix-ui/primitives/issues"
|
|
46
|
-
}
|
|
57
|
+
},
|
|
58
|
+
"stableVersion": "1.1.0"
|
|
47
59
|
}
|