@radix-ui/react-use-rect 0.1.2-rc.8 → 1.0.0

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.
@@ -1 +1 @@
1
- {"mappings":";AAKA;;;GAGG;AACH,wBAAiB,UAAU,EAAE,UAAU,GAAG,IAAI,0BAa7C","sources":["packages/react/use-rect/src/packages/react/use-rect/src/useRect.tsx","packages/react/use-rect/src/packages/react/use-rect/src/index.ts","packages/react/use-rect/src/index.ts"],"sourcesContent":[null,null,"export * from './useRect';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";AAKA;;;GAGG;AACH,wBAAiB,UAAU,EAAE,UAAU,GAAG,IAAI,0BAa7C","sources":["packages/react/use-rect/src/packages/react/use-rect/src/useRect.tsx","packages/react/use-rect/src/packages/react/use-rect/src/index.ts","packages/react/use-rect/src/index.ts"],"sourcesContent":[null,null,"export { useRect } from './useRect';\n"],"names":[],"version":3,"file":"index.d.ts.map"}
package/dist/index.js CHANGED
@@ -1,28 +1,11 @@
1
1
  var $KEKIw$react = require("react");
2
2
  var $KEKIw$radixuirect = require("@radix-ui/rect");
3
3
 
4
- function $parcel$exportWildcard(dest, source) {
5
- Object.keys(source).forEach(function(key) {
6
- if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
7
- return;
8
- }
9
-
10
- Object.defineProperty(dest, key, {
11
- enumerable: true,
12
- get: function get() {
13
- return source[key];
14
- }
15
- });
16
- });
17
-
18
- return dest;
19
- }
20
4
  function $parcel$export(e, n, v, s) {
21
5
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
22
6
  }
23
- var $c64cf18f363cc04f$exports = {};
24
7
 
25
- $parcel$export($c64cf18f363cc04f$exports, "useRect", () => $c64cf18f363cc04f$export$9823a655542017cd);
8
+ $parcel$export(module.exports, "useRect", () => $c64cf18f363cc04f$export$9823a655542017cd);
26
9
 
27
10
 
28
11
  /**
@@ -46,7 +29,6 @@ $parcel$export($c64cf18f363cc04f$exports, "useRect", () => $c64cf18f363cc04f$exp
46
29
  }
47
30
 
48
31
 
49
- $parcel$exportWildcard(module.exports, $c64cf18f363cc04f$exports);
50
32
 
51
33
 
52
34
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;ACAA;;AAKA;;;GAGA,CACA,SAASE,yCAAT,CAAiBC,UAAjB,EAAgD;IAC9C,MAAM,CAACC,IAAD,EAAOC,OAAP,CAAA,GAAkBL,qBAAA,EAAxB,AAAA;IACAA,sBAAA,CAAgB,IAAM;QACpB,IAAIG,UAAJ,EAAgB;YACd,MAAMK,SAAS,GAAGP,qCAAkB,CAACE,UAAD,EAAaE,OAAb,CAApC,AAAA;YACA,OAAO,IAAM;gBACXA,OAAO,CAACI,SAAD,CAAP,CAAAJ;gBACAG,SAAS,EAATA,CAAAA;aAFF,CAGC;SACF;QACD,OAAA;KARF,EASG;QAACL,UAAD;KATH,CASC,CAAA;IACD,OAAOC,IAAP,CAAA;CACD;;ADtBD","sources":["packages/react/use-rect/src/index.ts","packages/react/use-rect/src/useRect.tsx"],"sourcesContent":["export * from './useRect';\n","import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState<ClientRect>();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"],"names":["React","observeElementRect","useRect","measurable","rect","setRect","useState","useEffect","unobserve","undefined"],"version":3,"file":"index.js.map"}
1
+ {"mappings":";;;;;;;;ACAA;;AAKA;;;GAGA,CACA,SAASA,yCAAT,CAAiBG,UAAjB,EAAgD;IAC9C,MAAM,CAACC,IAAD,EAAOC,OAAP,CAAA,GAAkBJ,qBAAA,EAAxB,AAAA;IACAA,sBAAA,CAAgB,IAAM;QACpB,IAAIE,UAAJ,EAAgB;YACd,MAAMK,SAAS,GAAGN,qCAAkB,CAACC,UAAD,EAAaE,OAAb,CAApC,AAAA;YACA,OAAO,IAAM;gBACXA,OAAO,CAACI,SAAD,CAAP,CAAAJ;gBACAG,SAAS,EAATA,CAAAA;aAFF,CAGC;SACF;QACD,OAAA;KARF,EASG;QAACL,UAAD;KATH,CASC,CAAA;IACD,OAAOC,IAAP,CAAA;CACD;;ADtBD","sources":["packages/react/use-rect/src/index.ts","packages/react/use-rect/src/useRect.tsx"],"sourcesContent":["export { useRect } from './useRect';\n","import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState<ClientRect>();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"],"names":["useRect","React","observeElementRect","measurable","rect","setRect","useState","useEffect","unobserve","undefined"],"version":3,"file":"index.js.map"}
@@ -1,12 +1,6 @@
1
1
  import {useState as $jNFHB$useState, useEffect as $jNFHB$useEffect} from "react";
2
2
  import {observeElementRect as $jNFHB$observeElementRect} from "@radix-ui/rect";
3
3
 
4
- function $parcel$export(e, n, v, s) {
5
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
6
- }
7
- var $ccac1052a272b78b$exports = {};
8
-
9
- $parcel$export($ccac1052a272b78b$exports, "useRect", () => $ccac1052a272b78b$export$9823a655542017cd);
10
4
 
11
5
 
12
6
  /**
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;ACAA;;AAKA;;;GAGA,CACA,SAASE,yCAAT,CAAiBC,UAAjB,EAAgD;IAC9C,MAAM,CAACC,IAAD,EAAOC,OAAP,CAAA,GAAkBL,eAAA,EAAxB,AAAA;IACAA,gBAAA,CAAgB,IAAM;QACpB,IAAIG,UAAJ,EAAgB;YACd,MAAMK,SAAS,GAAGP,yBAAkB,CAACE,UAAD,EAAaE,OAAb,CAApC,AAAA;YACA,OAAO,IAAM;gBACXA,OAAO,CAACI,SAAD,CAAP,CAAAJ;gBACAG,SAAS,EAATA,CAAAA;aAFF,CAGC;SACF;QACD,OAAA;KARF,EASG;QAACL,UAAD;KATH,CASC,CAAA;IACD,OAAOC,IAAP,CAAA;CACD;;ADtBD","sources":["packages/react/use-rect/src/index.ts","packages/react/use-rect/src/useRect.tsx"],"sourcesContent":["export * from './useRect';\n","import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState<ClientRect>();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"],"names":["React","observeElementRect","useRect","measurable","rect","setRect","useState","useEffect","unobserve","undefined"],"version":3,"file":"index.module.js.map"}
1
+ {"mappings":";;;ACAA;;AAKA;;;GAGA,CACA,SAASA,yCAAT,CAAiBG,UAAjB,EAAgD;IAC9C,MAAM,CAACC,IAAD,EAAOC,OAAP,CAAA,GAAkBJ,eAAA,EAAxB,AAAA;IACAA,gBAAA,CAAgB,IAAM;QACpB,IAAIE,UAAJ,EAAgB;YACd,MAAMK,SAAS,GAAGN,yBAAkB,CAACC,UAAD,EAAaE,OAAb,CAApC,AAAA;YACA,OAAO,IAAM;gBACXA,OAAO,CAACI,SAAD,CAAP,CAAAJ;gBACAG,SAAS,EAATA,CAAAA;aAFF,CAGC;SACF;QACD,OAAA;KARF,EASG;QAACL,UAAD;KATH,CASC,CAAA;IACD,OAAOC,IAAP,CAAA;CACD;;ADtBD","sources":["packages/react/use-rect/src/index.ts","packages/react/use-rect/src/useRect.tsx"],"sourcesContent":["export { useRect } from './useRect';\n","import * as React from 'react';\nimport { observeElementRect } from '@radix-ui/rect';\n\nimport type { Measurable } from '@radix-ui/rect';\n\n/**\n * Use this custom hook to get access to an element's rect (getBoundingClientRect)\n * and observe it along time.\n */\nfunction useRect(measurable: Measurable | null) {\n const [rect, setRect] = React.useState<ClientRect>();\n React.useEffect(() => {\n if (measurable) {\n const unobserve = observeElementRect(measurable, setRect);\n return () => {\n setRect(undefined);\n unobserve();\n };\n }\n return;\n }, [measurable]);\n return rect;\n}\n\nexport { useRect };\n"],"names":["useRect","React","observeElementRect","measurable","rect","setRect","useState","useEffect","unobserve","undefined"],"version":3,"file":"index.module.js.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ui/react-use-rect",
3
- "version": "0.1.2-rc.8",
3
+ "version": "1.0.0",
4
4
  "license": "MIT",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@babel/runtime": "^7.13.10",
20
- "@radix-ui/rect": "0.1.1"
20
+ "@radix-ui/rect": "1.0.0"
21
21
  },
22
22
  "peerDependencies": {
23
23
  "react": "^16.8 || ^17.0 || ^18.0"
@@ -29,6 +29,5 @@
29
29
  },
30
30
  "bugs": {
31
31
  "url": "https://github.com/radix-ui/primitives/issues"
32
- },
33
- "stableVersion": "0.1.1"
32
+ }
34
33
  }