@jamsr-ui/ripple
Advanced tools
Comparing version 0.0.21 to 0.0.22
@@ -1,2 +0,2 @@ | ||
"use client" | ||
"use strict";"use client";var c=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var o in e)c(t,o,{get:e[o],enumerable:!0})},y=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of M(e))!v.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(r=E(e,n))||r.enumerable});return t};var H=t=>y(c({},"__esModule",{value:!0}),t);var L={};w(L,{Ripple:()=>g});module.exports=H(L);var R=require("react");var f=require("@jamsr-ui/hooks"),s=require("react"),h=t=>{let[e,o]=(0,s.useState)([]);(0,s.useEffect)(()=>{if(t.current){let n=t.current,a=u=>{let m=n.getBoundingClientRect(),b=u.clientX-m.left,x=u.clientY-m.top,i=n.clientHeight,l=n.clientWidth,d=Math.max(l,i);o([...e,{top:x-d/2,left:b-d/2,height:Math.max(l,i),width:Math.max(l,i)}])};return n.addEventListener("mousedown",a),()=>{n.removeEventListener("mousedown",a)}}return()=>{}},[t,e]);let r=(0,f.useDebounce)(e,1e3);return(0,s.useEffect)(()=>{r.length&&o([])},[r.length]),e};var p=require("react/jsx-runtime"),g=()=>{let t=(0,R.useRef)(null),e=h(t);return(0,p.jsx)("span",{"data-component":"ripple",className:"absolute inset-0 size-full overflow-hidden rounded-inherit",ref:t,children:e?.map((o,r)=>(0,p.jsx)("span",{className:"absolute scale-0 rounded-full bg-current opacity-25",style:{...o,transform:"scale(0)",animation:"ripple 1s linear"}},r))})};0&&(module.exports={Ripple}); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client" | ||
"use client";var _chunkJSN4OKWFjs = require('./chunk-JSN4OKWF.js');require('./chunk-QLE34WT6.js');exports.Ripple = _chunkJSN4OKWFjs.a; |
@@ -1,2 +0,2 @@ | ||
"use client" | ||
"use strict";var l=Object.defineProperty;var E=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var v=Object.prototype.hasOwnProperty;var w=(t,e)=>{for(var o in e)l(t,o,{get:e[o],enumerable:!0})},x=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of M(e))!v.call(t,n)&&n!==o&&l(t,n,{get:()=>e[n],enumerable:!(r=E(e,n))||r.enumerable});return t};var y=t=>x(l({},"__esModule",{value:!0}),t);var L={};w(L,{Ripple:()=>H});module.exports=y(L);var R=require("react");var f=require("@jamsr-ui/hooks"),s=require("react"),h=t=>{let[e,o]=(0,s.useState)([]);(0,s.useEffect)(()=>{if(t.current){let n=t.current,a=u=>{let m=n.getBoundingClientRect(),g=u.clientX-m.left,b=u.clientY-m.top,i=n.clientHeight,c=n.clientWidth,d=Math.max(c,i);o([...e,{top:b-d/2,left:g-d/2,height:Math.max(c,i),width:Math.max(c,i)}])};return n.addEventListener("mousedown",a),()=>{n.removeEventListener("mousedown",a)}}return()=>{}},[t,e]);let r=(0,f.useDebounce)(e,1e3);return(0,s.useEffect)(()=>{r.length&&o([])},[r.length]),e};var p=require("react/jsx-runtime"),H=()=>{let t=(0,R.useRef)(null),e=h(t);return(0,p.jsx)("span",{"data-component":"ripple",className:"absolute inset-0 size-full overflow-hidden rounded-inherit",ref:t,children:e?.map((o,r)=>(0,p.jsx)("span",{className:"absolute scale-0 rounded-full bg-current opacity-25",style:{...o,transform:"scale(0)",animation:"ripple 1s linear"}},r))})};0&&(module.exports={Ripple}); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client" | ||
var _chunkJSN4OKWFjs = require('./chunk-JSN4OKWF.js');require('./chunk-QLE34WT6.js');exports.Ripple = _chunkJSN4OKWFjs.a; |
@@ -1,2 +0,2 @@ | ||
"use client" | ||
"use strict";var l=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var R=Object.getOwnPropertyNames;var x=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var o in t)l(e,o,{get:t[o],enumerable:!0})},M=(e,t,o,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of R(t))!x.call(e,n)&&n!==o&&l(e,n,{get:()=>t[n],enumerable:!(c=g(t,n))||c.enumerable});return e};var v=e=>M(l({},"__esModule",{value:!0}),e);var b={};E(b,{useRipple:()=>w});module.exports=v(b);var d=require("@jamsr-ui/hooks"),i=require("react"),w=e=>{let[t,o]=(0,i.useState)([]);(0,i.useEffect)(()=>{if(e.current){let n=e.current,m=p=>{let u=n.getBoundingClientRect(),h=p.clientX-u.left,f=p.clientY-u.top,r=n.clientHeight,s=n.clientWidth,a=Math.max(s,r);o([...t,{top:f-a/2,left:h-a/2,height:Math.max(s,r),width:Math.max(s,r)}])};return n.addEventListener("mousedown",m),()=>{n.removeEventListener("mousedown",m)}}return()=>{}},[e,t]);let c=(0,d.useDebounce)(t,1e3);return(0,i.useEffect)(()=>{c.length&&o([])},[c.length]),t};0&&(module.exports={useRipple}); | ||
"use strict";Object.defineProperty(exports, "__esModule", {value: true});"use client" | ||
var _chunkQLE34WT6js = require('./chunk-QLE34WT6.js');exports.useRipple = _chunkQLE34WT6js.a; |
{ | ||
"name": "@jamsr-ui/ripple", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "", | ||
@@ -24,4 +24,4 @@ "main": "./dist/index.mjs", | ||
"dependencies": { | ||
"@jamsr-ui/hooks": "^0.0.14", | ||
"@jamsr-ui/utils": "^0.0.19" | ||
"@jamsr-ui/utils": "^0.0.20", | ||
"@jamsr-ui/hooks": "^0.0.15" | ||
}, | ||
@@ -28,0 +28,0 @@ "module": "dist/index.mjs", |
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
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 2 instances 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
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
17
4
5273
36
+ Added@jamsr-ui/hooks@0.0.15(transitive)
+ Added@jamsr-ui/utils@0.0.20(transitive)
- Removed@jamsr-ui/hooks@0.0.14(transitive)
- Removed@jamsr-ui/utils@0.0.19(transitive)
Updated@jamsr-ui/hooks@^0.0.15
Updated@jamsr-ui/utils@^0.0.20