@radix-ui/react-use-layout-effect 1.0.0 → 1.0.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.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* On the server, React emits a warning when calling `useLayoutEffect`.
|
|
4
|
+
* This is because neither `useLayoutEffect` nor `useEffect` run on the server.
|
|
5
|
+
* We use this safe version which suppresses the warning by replacing it with a noop on the server.
|
|
6
|
+
*
|
|
7
|
+
* See: https://reactjs.org/docs/hooks-reference.html#uselayouteffect
|
|
8
|
+
*/
|
|
9
|
+
export const useLayoutEffect: typeof React.useLayoutEffect;
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;ACAA;AAEA;;;;;;GAMA,CACA,MAAMA,yCAAe,GAAGE,OAAO,CAACC,UAAD,KAAA,IAAA,IAACA,UAAD,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAACA,UAAU,CAAEC,QAAb,CAAP,GAAgCH,sBAAhC,GAAwD,IAAM,EAAtF,AAAA;;ADTA","sources":["packages/react/use-layout-effect/src/index.ts","packages/react/use-layout-effect/src/useLayoutEffect.tsx"],"sourcesContent":["export { useLayoutEffect } from './useLayoutEffect';\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 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"],"names":["useLayoutEffect","React","Boolean","globalThis","document"],"version":3,"file":"index.
|
|
1
|
+
{"mappings":";;ACAA;AAEA;;;;;;GAMA,CACA,MAAMA,yCAAe,GAAGE,OAAO,CAACC,UAAD,KAAA,IAAA,IAACA,UAAD,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAACA,UAAU,CAAEC,QAAb,CAAP,GAAgCH,sBAAhC,GAAwD,IAAM,EAAtF,AAAA;;ADTA","sources":["packages/react/use-layout-effect/src/index.ts","packages/react/use-layout-effect/src/useLayoutEffect.tsx"],"sourcesContent":["export { useLayoutEffect } from './useLayoutEffect';\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 = Boolean(globalThis?.document) ? React.useLayoutEffect : () => {};\n\nexport { useLayoutEffect };\n"],"names":["useLayoutEffect","React","Boolean","globalThis","document"],"version":3,"file":"index.mjs.map"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@radix-ui/react-use-layout-effect",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1-rc.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
"exports": {
|
|
6
|
+
".": {
|
|
7
|
+
"import": {
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"default": "./dist/index.mjs"
|
|
10
|
+
},
|
|
11
|
+
"require": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"default": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"source": "./src/index.ts",
|
|
18
|
+
"main": "./dist/index.js",
|
|
19
|
+
"module": "./dist/index.mjs",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
9
21
|
"files": [
|
|
10
22
|
"dist",
|
|
11
23
|
"README.md"
|
|
@@ -28,5 +40,6 @@
|
|
|
28
40
|
},
|
|
29
41
|
"dependencies": {
|
|
30
42
|
"@babel/runtime": "^7.13.10"
|
|
31
|
-
}
|
|
43
|
+
},
|
|
44
|
+
"stableVersion": "1.0.0"
|
|
32
45
|
}
|