react-peekaboo
Advanced tools
Comparing version 0.4.0 to 0.4.1
@@ -1,2 +0,2 @@ | ||
import{useState as r,useEffect as o}from"react";import{peekaboo as n}from"dom-peekaboo";function t(n,t,e){void 0===e&&(e={});var i=r(null),u=i[0],f=i[1];return o(function(){if(u&&!1!==e.enabled)return n(u,t,e)},[u,t,e]),f}function e(r,o){return void 0===o&&(o={}),t(n,r,o)}function i(o){void 0===o&&(o={});var e=r(!1),i=e[0];return[t(n,e[1],o),i]}export{i as useIntersecting,e as useIntersectionChange,t as usePeekaboo}; | ||
import{useState as t,useMemo as o,useEffect as e}from"react";import{peekaboo as r}from"dom-peekaboo";function n(r,n,f){void 0===f&&(f={});var i=t(null),u=i[0],a=i[1],c=o(function(){return f},[f.enabled,f.offsetBottom,f.offsetLeft,f.offsetRight,f.offsetTop,f.throttle]);return e(function(){if(u&&!1!==c.enabled)return r(u,n,c)},[u,n,c]),a}function f(t,o){return void 0===o&&(o={}),n(r,t,o)}function i(o){void 0===o&&(o={});var e=t(!1),f=e[0];return[n(r,e[1],o),f]}export{i as useIntersecting,f as useIntersectionChange,n as usePeekaboo}; | ||
//# sourceMappingURL=index.esm.js.map |
@@ -1,2 +0,2 @@ | ||
var e=require("react"),r=require("dom-peekaboo");function t(r,t,o){void 0===o&&(o={});var n=e.useState(null),u=n[0],a=n[1];return e.useEffect(function(){if(u&&!1!==o.enabled)return r(u,t,o)},[u,t,o]),a}exports.useIntersecting=function(o){void 0===o&&(o={});var n=e.useState(!1),u=n[0];return[t(r.peekaboo,n[1],o),u]},exports.useIntersectionChange=function(e,o){return void 0===o&&(o={}),t(r.peekaboo,e,o)},exports.usePeekaboo=t; | ||
var e=require("react"),t=require("dom-peekaboo");function o(t,o,r){void 0===r&&(r={});var n=e.useState(null),u=n[0],f=n[1],s=e.useMemo(function(){return r},[r.enabled,r.offsetBottom,r.offsetLeft,r.offsetRight,r.offsetTop,r.throttle]);return e.useEffect(function(){if(u&&!1!==s.enabled)return t(u,o,s)},[u,o,s]),f}exports.useIntersecting=function(r){void 0===r&&(r={});var n=e.useState(!1),u=n[0];return[o(t.peekaboo,n[1],r),u]},exports.useIntersectionChange=function(e,r){return void 0===r&&(r={}),o(t.peekaboo,e,r)},exports.usePeekaboo=o; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import{useState as r,useEffect as t}from"react";import{peekaboo as e}from"dom-peekaboo";function n(e,n,o={}){let[u,f]=r(null);return t(()=>{if(u&&!1!==o.enabled)return e(u,n,o)},[u,n,o]),f}function o(r,t={}){return n(e,r,t)}function u(t={}){let[o,u]=r(!1);return[n(e,u,t),o]}export{u as useIntersecting,o as useIntersectionChange,n as usePeekaboo}; | ||
import{useState as t,useMemo as e,useEffect as o}from"react";import{peekaboo as f}from"dom-peekaboo";function r(f,r,n={}){let[u,i]=t(null),l=e(()=>n,[n.enabled,n.offsetBottom,n.offsetLeft,n.offsetRight,n.offsetTop,n.throttle]);return o(()=>{if(u&&!1!==l.enabled)return f(u,r,l)},[u,r,l]),i}function n(t,e={}){return r(f,t,e)}function u(e={}){let[o,n]=t(!1);return[r(f,n,e),o]}export{u as useIntersecting,n as useIntersectionChange,r as usePeekaboo}; | ||
//# sourceMappingURL=index.modern.js.map |
@@ -1,2 +0,2 @@ | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react"),require("dom-peekaboo")):"function"==typeof define&&define.amd?define(["exports","react","dom-peekaboo"],o):o((e=e||self).reactPeekaboo={},e.react,e.domPeekaboo)}(this,function(e,o,t){function n(e,t,n){void 0===n&&(n={});var r=o.useState(null),u=r[0],i=r[1];return o.useEffect(function(){if(u&&!1!==n.enabled)return e(u,t,n)},[u,t,n]),i}e.useIntersecting=function(e){void 0===e&&(e={});var r=o.useState(!1),u=r[0];return[n(t.peekaboo,r[1],e),u]},e.useIntersectionChange=function(e,o){return void 0===o&&(o={}),n(t.peekaboo,e,o)},e.usePeekaboo=n}); | ||
!function(e,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("react"),require("dom-peekaboo")):"function"==typeof define&&define.amd?define(["exports","react","dom-peekaboo"],o):o((e=e||self).reactPeekaboo={},e.react,e.domPeekaboo)}(this,function(e,o,t){function n(e,t,n){void 0===n&&(n={});var f=o.useState(null),r=f[0],u=f[1],i=o.useMemo(function(){return n},[n.enabled,n.offsetBottom,n.offsetLeft,n.offsetRight,n.offsetTop,n.throttle]);return o.useEffect(function(){if(r&&!1!==i.enabled)return e(r,t,i)},[r,t,i]),u}e.useIntersecting=function(e){void 0===e&&(e={});var f=o.useState(!1),r=f[0];return[n(t.peekaboo,f[1],e),r]},e.useIntersectionChange=function(e,o){return void 0===o&&(o={}),n(t.peekaboo,e,o)},e.usePeekaboo=n}); | ||
//# sourceMappingURL=index.umd.js.map |
{ | ||
"name": "react-peekaboo", | ||
"description": "React hooks for monitoring an element's intersection with the viewport", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "author": "Wyatt Johnston <w@wyatt.page>", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
18476
22
0