pop-emojis 0.0.2 → 0.0.4

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.
@@ -136,7 +136,7 @@ function oe() {
136
136
  function L(e, r, t, n, b, A) {
137
137
  var a = t.ref;
138
138
  return e = {
139
- $$typeof: w,
139
+ $$typeof: j,
140
140
  type: e,
141
141
  key: r,
142
142
  props: t,
@@ -215,12 +215,12 @@ React keys must be passed directly to JSX without using spread:
215
215
  );
216
216
  }
217
217
  function S(e) {
218
- j(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === x && (e._payload.status === "fulfilled" ? j(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
218
+ w(e) ? e._store && (e._store.validated = 1) : typeof e == "object" && e !== null && e.$$typeof === x && (e._payload.status === "fulfilled" ? w(e._payload.value) && e._payload.value._store && (e._payload.value._store.validated = 1) : e._store && (e._store.validated = 1));
219
219
  }
220
- function j(e) {
221
- return typeof e == "object" && e !== null && e.$$typeof === w;
220
+ function w(e) {
221
+ return typeof e == "object" && e !== null && e.$$typeof === j;
222
222
  }
223
- var p = ee, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), x = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), y = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
223
+ var p = ee, j = /* @__PURE__ */ Symbol.for("react.transitional.element"), W = /* @__PURE__ */ Symbol.for("react.portal"), k = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), q = /* @__PURE__ */ Symbol.for("react.profiler"), J = /* @__PURE__ */ Symbol.for("react.consumer"), V = /* @__PURE__ */ Symbol.for("react.context"), z = /* @__PURE__ */ Symbol.for("react.forward_ref"), G = /* @__PURE__ */ Symbol.for("react.suspense"), X = /* @__PURE__ */ Symbol.for("react.suspense_list"), B = /* @__PURE__ */ Symbol.for("react.memo"), x = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), y = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Q = Array.isArray, O = console.createTask ? console.createTask : function() {
224
224
  return null;
225
225
  };
226
226
  p = {
@@ -260,11 +260,11 @@ function se() {
260
260
  return M || (M = 1, process.env.NODE_ENV === "production" ? R.exports = ae() : R.exports = oe()), R.exports;
261
261
  }
262
262
  var v = se();
263
- function ce({ emoji: l = "🔥", count: m = 6 }) {
263
+ function ce({ emoji: l, count: m }) {
264
264
  const [f, c] = re([]), s = () => {
265
265
  const o = Date.now(), u = Array.from({ length: m }, (i, T) => ({
266
266
  id: o + T,
267
- x: Math.random() * 180 - 80,
267
+ x: Math.random() * 120 - 80,
268
268
  y: Math.random() * -100
269
269
  }));
270
270
  c(u), setTimeout(() => c([]), 600);
@@ -275,7 +275,7 @@ function ce({ emoji: l = "🔥", count: m = 6 }) {
275
275
  {
276
276
  onClick: s,
277
277
  className: "rounded px-4 py-2 text-white",
278
- children: "🫡"
278
+ children: l
279
279
  }
280
280
  ),
281
281
  /* @__PURE__ */ v.jsx(te, { children: f.map(({ id: o, x: u, y: i }) => /* @__PURE__ */ v.jsx(
@@ -1,6 +1,6 @@
1
- (function(u,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],m):(u=typeof globalThis<"u"?globalThis:u||self,m(u.PopEmojis={},u.React,u.FramerMotion))})(this,(function(u,m,S){"use strict";var R={exports:{}},_={};var w;function q(){if(w)return _;w=1;var i=Symbol.for("react.transitional.element"),p=Symbol.for("react.fragment");function d(c,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:i,type:c,key:l,ref:s!==void 0?s:null,props:o}}return _.Fragment=p,_.jsx=d,_.jsxs=d,_}var b={};var g;function J(){return g||(g=1,process.env.NODE_ENV!=="production"&&(function(){function i(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:i(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return i(e(r))}catch{}}return null}function p(e){return""+e}function d(e){try{p(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),p(e)}}function c(e){if(e===y)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var r=i(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=h.A;return e===null?null:e.getOwner()}function o(){return Error("react-stack-top-frame")}function l(e){if(D.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function f(e,r){function t(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function x(){var e=i(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function G(e,r,t,n,k,P){var a=t.ref;return e={$$typeof:F,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:x}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:P}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,t,n,k,P){var a=r.children;if(a!==void 0)if(n)if(oe(a)){for(n=0;n<a.length;n++)Y(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Y(a);if(D.call(r,"key")){a=i(e);var E=Object.keys(r).filter(function(se){return se!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",U[a+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
1
+ (function(u,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("react"),require("framer-motion")):typeof define=="function"&&define.amd?define(["exports","react","framer-motion"],m):(u=typeof globalThis<"u"?globalThis:u||self,m(u.PopEmojis={},u.React,u.FramerMotion))})(this,(function(u,m,S){"use strict";var R={exports:{}},_={};var w;function q(){if(w)return _;w=1;var i=Symbol.for("react.transitional.element"),p=Symbol.for("react.fragment");function d(c,s,o){var l=null;if(o!==void 0&&(l=""+o),s.key!==void 0&&(l=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:i,type:c,key:l,ref:s!==void 0?s:null,props:o}}return _.Fragment=p,_.jsx=d,_.jsxs=d,_}var b={};var g;function J(){return g||(g=1,process.env.NODE_ENV!=="production"&&(function(){function i(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case y:return"Fragment";case H:return"Profiler";case B:return"StrictMode";case ee:return"Suspense";case re:return"SuspenseList";case ne:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return"Portal";case Q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case K:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return r=e.displayName||null,r!==null?r:i(e.type)||"Memo";case O:r=e._payload,e=e._init;try{return i(e(r))}catch{}}return null}function p(e){return""+e}function d(e){try{p(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),p(e)}}function c(e){if(e===y)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===O)return"<...>";try{var r=i(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=h.A;return e===null?null:e.getOwner()}function o(){return Error("react-stack-top-frame")}function l(e){if(D.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function f(e,r){function t(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function x(){var e=i(this.type);return $[e]||($[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function G(e,r,t,n,k,j){var a=t.ref;return e={$$typeof:F,type:e,key:r,props:t,_owner:n},(a!==void 0?a:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:x}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:k}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:j}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,t,n,k,j){var a=r.children;if(a!==void 0)if(n)if(oe(a)){for(n=0;n<a.length;n++)Y(a[n]);Object.freeze&&Object.freeze(a)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Y(a);if(D.call(r,"key")){a=i(e);var E=Object.keys(r).filter(function(se){return se!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",U[a+n]||(E=0<E.length?"{"+E.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
2
2
  let props = %s;
3
3
  <%s {...props} />
4
4
  React keys must be passed directly to JSX without using spread:
5
5
  let props = %s;
6
- <%s key={someKey} {...props} />`,n,a,E,a),U[a+n]=!0)}if(a=null,t!==void 0&&(d(t),a=""+t),l(r)&&(d(r.key),a=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return a&&f(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,a,t,s(),k,P)}function Y(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?I(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function I(e){return typeof e=="object"&&e!==null&&e.$$typeof===F}var T=m,F=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),h=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,oe=Array.isArray,j=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var M,$={},L=T.react_stack_bottom_frame.bind(T,o)(),W=j(c(o)),U={};b.Fragment=y,b.jsx=function(e,r,t){var n=1e4>h.recentlyCreatedOwnerStacks++;return C(e,r,t,!1,n?Error("react-stack-top-frame"):L,n?j(c(e)):W)},b.jsxs=function(e,r,t){var n=1e4>h.recentlyCreatedOwnerStacks++;return C(e,r,t,!0,n?Error("react-stack-top-frame"):L,n?j(c(e)):W)}})()),b}var N;function V(){return N||(N=1,process.env.NODE_ENV==="production"?R.exports=q():R.exports=J()),R.exports}var v=V();function z({emoji:i="🔥",count:p=6}){const[d,c]=m.useState([]),s=()=>{const o=Date.now(),l=Array.from({length:p},(f,x)=>({id:o+x,x:Math.random()*180-80,y:Math.random()*-100}));c(l),setTimeout(()=>c([]),600)};return v.jsxs("div",{className:"relative inline-block",children:[v.jsx("button",{onClick:s,className:"rounded px-4 py-2 text-white",children:"🫡"}),v.jsx(S.AnimatePresence,{children:d.map(({id:o,x:l,y:f})=>v.jsx(S.motion.span,{initial:{scale:.5,opacity:1,x:0,y:0},animate:{scale:1,opacity:0,x:l,y:f},exit:{opacity:0},transition:{duration:.8,ease:"easeOut"},className:"pointer-events-none absolute left-1/2 top-1/3 text-xl",children:i},o))})]})}u.EmojiPop=z,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
6
+ <%s key={someKey} {...props} />`,n,a,E,a),U[a+n]=!0)}if(a=null,t!==void 0&&(d(t),a=""+t),l(r)&&(d(r.key),a=""+r.key),"key"in r){t={};for(var A in r)A!=="key"&&(t[A]=r[A])}else t=r;return a&&f(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,a,t,s(),k,j)}function Y(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===O&&(e._payload.status==="fulfilled"?I(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function I(e){return typeof e=="object"&&e!==null&&e.$$typeof===F}var T=m,F=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),te=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),ae=Symbol.for("react.client.reference"),h=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,oe=Array.isArray,P=console.createTask?console.createTask:function(){return null};T={react_stack_bottom_frame:function(e){return e()}};var M,$={},L=T.react_stack_bottom_frame.bind(T,o)(),W=P(c(o)),U={};b.Fragment=y,b.jsx=function(e,r,t){var n=1e4>h.recentlyCreatedOwnerStacks++;return C(e,r,t,!1,n?Error("react-stack-top-frame"):L,n?P(c(e)):W)},b.jsxs=function(e,r,t){var n=1e4>h.recentlyCreatedOwnerStacks++;return C(e,r,t,!0,n?Error("react-stack-top-frame"):L,n?P(c(e)):W)}})()),b}var N;function V(){return N||(N=1,process.env.NODE_ENV==="production"?R.exports=q():R.exports=J()),R.exports}var v=V();function z({emoji:i,count:p}){const[d,c]=m.useState([]),s=()=>{const o=Date.now(),l=Array.from({length:p},(f,x)=>({id:o+x,x:Math.random()*120-80,y:Math.random()*-100}));c(l),setTimeout(()=>c([]),600)};return v.jsxs("div",{className:"relative inline-block",children:[v.jsx("button",{onClick:s,className:"rounded px-4 py-2 text-white",children:i}),v.jsx(S.AnimatePresence,{children:d.map(({id:o,x:l,y:f})=>v.jsx(S.motion.span,{initial:{scale:.5,opacity:1,x:0,y:0},animate:{scale:1,opacity:0,x:l,y:f},exit:{opacity:0},transition:{duration:.8,ease:"easeOut"},className:"pointer-events-none absolute left-1/2 top-1/3 text-xl",children:i},o))})]})}u.EmojiPop=z,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pop-emojis",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
6
  "author": "MahindraGamni",
7
7
  "description": "A React component for animated emoji pop effects",