@radix-ui/react-use-layout-effect 1.0.0-rc.1 → 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.
@@ -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
@@ -13,4 +13,4 @@ import {useLayoutEffect as $dxlwH$useLayoutEffect} from "react";
13
13
 
14
14
 
15
15
  export {$9f79659886946c16$export$e5c5a5f917a5871c as useLayoutEffect};
16
- //# sourceMappingURL=index.module.js.map
16
+ //# sourceMappingURL=index.mjs.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.module.js.map"}
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.0-rc.1",
3
+ "version": "1.0.1-rc.1",
4
4
  "license": "MIT",
5
- "source": "src/index.ts",
6
- "main": "dist/index.js",
7
- "module": "dist/index.module.js",
8
- "types": "dist/index.d.ts",
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"
@@ -29,5 +41,5 @@
29
41
  "dependencies": {
30
42
  "@babel/runtime": "^7.13.10"
31
43
  },
32
- "stableVersion": "0.1.0"
44
+ "stableVersion": "1.0.0"
33
45
  }