@radix-ui/rect
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,2 +0,2 @@ | ||
function e(e){return e&&e.__esModule?e.default:e}var t,r=e(require("@babel/runtime-corejs3/core-js-stable/instance/for-each")),c=e(require("@babel/runtime-corejs3/core-js-stable/map")),a=e(require("@babel/runtime-corejs3/core-js-stable/instance/splice")),n=e(require("@babel/runtime-corejs3/core-js-stable/instance/index-of"));function i(e,r){var c=u.get(e);return void 0===c?(u.set(e,{rect:{},callbacks:[r]}),1===u.size&&(t=requestAnimationFrame(b))):c.callbacks.push(r),function(){var c,i=u.get(e);if(void 0!==i){var l,o=n(c=i.callbacks).call(c,r);if(o>-1)a(l=i.callbacks).call(l,o,1);0===i.callbacks.length&&(u.delete(e),0===u.size&&cancelAnimationFrame(t))}}}exports.observeElementRect=i;var l,o,s,u=new c;function b(){var e=[];r(u).call(u,(function(t,r){var c,a,n=r.getBoundingClientRect();c=t.rect,a=n,(c.width!==a.width||c.height!==a.height||c.top!==a.top||c.right!==a.right||c.bottom!==a.bottom||c.left!==a.left)&&(t.rect=n,e.push(t))})),r(e).call(e,(function(e){var t;r(t=e.callbacks).call(t,(function(t){return t(e.rect)}))})),t=requestAnimationFrame(b)}l={},o="observeElementRect",s=function(){return i},Object.defineProperty(l,o,{get:s,enumerable:!0}); | ||
function e(e,o){const r=c.get(e);return void 0===r?(c.set(e,{rect:{},callbacks:[o]}),1===c.size&&(t=requestAnimationFrame(n))):r.callbacks.push(o),()=>{const n=c.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(o);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&(c.delete(e),0===c.size&&cancelAnimationFrame(t))}}let t;exports.observeElementRect=e;const c=new Map;function n(){const e=[];c.forEach(((t,c)=>{const n=c.getBoundingClientRect();var o,r;o=t.rect,r=n,(o.width!==r.width||o.height!==r.height||o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.left!==r.left)&&(t.rect=n,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),t=requestAnimationFrame(n)}var o,r,a;o={},r="observeElementRect",a=function(){return e},Object.defineProperty(o,r,{get:a,enumerable:!0}); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime-corejs3/core-js-stable/instance/for-each";import t from"@babel/runtime-corejs3/core-js-stable/map";import r from"@babel/runtime-corejs3/core-js-stable/instance/splice";import a from"@babel/runtime-corejs3/core-js-stable/instance/index-of";var c;function n(e,t){var n=s.get(e);return void 0===n?(s.set(e,{rect:{},callbacks:[t]}),1===s.size&&(c=requestAnimationFrame(b))):n.callbacks.push(t),function(){var n,i=s.get(e);if(void 0!==i){var o,l=a(n=i.callbacks).call(n,t);if(l>-1)r(o=i.callbacks).call(o,l,1);0===i.callbacks.length&&(s.delete(e),0===s.size&&cancelAnimationFrame(c))}}}export{n as observeElementRect};var i,o,l,s=new t;function b(){var t=[];e(s).call(s,(function(e,r){var a,c,n=r.getBoundingClientRect();a=e.rect,c=n,(a.width!==c.width||a.height!==c.height||a.top!==c.top||a.right!==c.right||a.bottom!==c.bottom||a.left!==c.left)&&(e.rect=n,t.push(e))})),e(t).call(t,(function(t){var r;e(r=t.callbacks).call(r,(function(e){return e(t.rect)}))})),c=requestAnimationFrame(b)}i={},o="observeElementRect",l=function(){return n},Object.defineProperty(i,o,{get:l,enumerable:!0}); | ||
function t(t,o){const r=c.get(t);return void 0===r?(c.set(t,{rect:{},callbacks:[o]}),1===c.size&&(e=requestAnimationFrame(n))):r.callbacks.push(o),()=>{const n=c.get(t);if(void 0===n)return;const r=n.callbacks.indexOf(o);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&(c.delete(t),0===c.size&&cancelAnimationFrame(e))}}export{t as observeElementRect};let e;const c=new Map;function n(){const t=[];c.forEach(((e,c)=>{const n=c.getBoundingClientRect();var o,r;o=e.rect,r=n,(o.width!==r.width||o.height!==r.height||o.top!==r.top||o.right!==r.right||o.bottom!==r.bottom||o.left!==r.left)&&(e.rect=n,t.push(e))})),t.forEach((t=>{t.callbacks.forEach((e=>e(t.rect)))})),e=requestAnimationFrame(n)}var o,r,a;o={},r="observeElementRect",a=function(){return t},Object.defineProperty(o,r,{get:a,enumerable:!0}); | ||
//# sourceMappingURL=index.module.js.map |
{ | ||
"name": "@radix-ui/rect", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"license": "MIT", | ||
@@ -28,4 +28,4 @@ "source": "src/index.ts", | ||
"dependencies": { | ||
"@babel/runtime-corejs3": "^7.13.10" | ||
"@babel/runtime": "^7.13.10" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
1
15648
25
+ Added@babel/runtime@^7.13.10
+ Added@babel/runtime@7.26.0(transitive)
- Removed@babel/runtime-corejs3@^7.13.10
- Removed@babel/runtime-corejs3@7.26.0(transitive)
- Removedcore-js-pure@3.39.0(transitive)