pop-emojis 0.0.7 → 0.0.9
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.
- package/dist/pop-emojis.js +44 -39
- package/dist/pop-emojis.umd.cjs +2 -2
- package/package.json +1 -1
package/dist/pop-emojis.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import ee, { useState as re } from "react";
|
|
2
2
|
import { AnimatePresence as te, motion as ne } from "framer-motion";
|
|
3
|
-
var
|
|
3
|
+
var R = { exports: {} }, p = {};
|
|
4
4
|
var D;
|
|
5
5
|
function ae() {
|
|
6
|
-
if (D) return
|
|
6
|
+
if (D) return p;
|
|
7
7
|
D = 1;
|
|
8
8
|
var l = /* @__PURE__ */ Symbol.for("react.transitional.element"), m = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
9
|
-
function f(
|
|
10
|
-
var
|
|
11
|
-
if (o !== void 0 && (
|
|
9
|
+
function f(i, s, o) {
|
|
10
|
+
var u = null;
|
|
11
|
+
if (o !== void 0 && (u = "" + o), s.key !== void 0 && (u = "" + s.key), "key" in s) {
|
|
12
12
|
o = {};
|
|
13
13
|
for (var c in s)
|
|
14
14
|
c !== "key" && (o[c] = s[c]);
|
|
15
15
|
} else o = s;
|
|
16
16
|
return s = o.ref, {
|
|
17
17
|
$$typeof: l,
|
|
18
|
-
type:
|
|
19
|
-
key:
|
|
18
|
+
type: i,
|
|
19
|
+
key: u,
|
|
20
20
|
ref: s !== void 0 ? s : null,
|
|
21
21
|
props: o
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
return
|
|
24
|
+
return p.Fragment = m, p.jsx = f, p.jsxs = f, p;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var E = {};
|
|
27
27
|
var F;
|
|
28
28
|
function oe() {
|
|
29
29
|
return F || (F = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
@@ -90,7 +90,7 @@ function oe() {
|
|
|
90
90
|
), m(e);
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function i(e) {
|
|
94
94
|
if (e === k) return "<>";
|
|
95
95
|
if (typeof e == "object" && e !== null && e.$$typeof === y)
|
|
96
96
|
return "<...>";
|
|
@@ -102,13 +102,13 @@ function oe() {
|
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
function s() {
|
|
105
|
-
var e =
|
|
105
|
+
var e = O.A;
|
|
106
106
|
return e === null ? null : e.getOwner();
|
|
107
107
|
}
|
|
108
108
|
function o() {
|
|
109
109
|
return Error("react-stack-top-frame");
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function u(e) {
|
|
112
112
|
if (g.call(e, "key")) {
|
|
113
113
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
114
114
|
if (r && r.isReactWarning) return !1;
|
|
@@ -133,7 +133,7 @@ function oe() {
|
|
|
133
133
|
"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."
|
|
134
134
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
135
135
|
}
|
|
136
|
-
function L(e, r, t, n,
|
|
136
|
+
function L(e, r, t, n, b, A) {
|
|
137
137
|
var a = t.ref;
|
|
138
138
|
return e = {
|
|
139
139
|
$$typeof: w,
|
|
@@ -158,7 +158,7 @@ function oe() {
|
|
|
158
158
|
configurable: !1,
|
|
159
159
|
enumerable: !1,
|
|
160
160
|
writable: !0,
|
|
161
|
-
value:
|
|
161
|
+
value: b
|
|
162
162
|
}), Object.defineProperty(e, "_debugTask", {
|
|
163
163
|
configurable: !1,
|
|
164
164
|
enumerable: !1,
|
|
@@ -166,7 +166,7 @@ function oe() {
|
|
|
166
166
|
value: A
|
|
167
167
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
168
168
|
}
|
|
169
|
-
function P(e, r, t, n,
|
|
169
|
+
function P(e, r, t, n, b, A) {
|
|
170
170
|
var a = r.children;
|
|
171
171
|
if (a !== void 0)
|
|
172
172
|
if (n)
|
|
@@ -197,7 +197,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
197
197
|
a
|
|
198
198
|
), $[a + n] = !0);
|
|
199
199
|
}
|
|
200
|
-
if (a = null, t !== void 0 && (f(t), a = "" + t),
|
|
200
|
+
if (a = null, t !== void 0 && (f(t), a = "" + t), u(r) && (f(r.key), a = "" + r.key), "key" in r) {
|
|
201
201
|
t = {};
|
|
202
202
|
for (var S in r)
|
|
203
203
|
S !== "key" && (t[S] = r[S]);
|
|
@@ -210,7 +210,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
210
210
|
a,
|
|
211
211
|
t,
|
|
212
212
|
s(),
|
|
213
|
-
|
|
213
|
+
b,
|
|
214
214
|
A
|
|
215
215
|
);
|
|
216
216
|
}
|
|
@@ -220,54 +220,54 @@ React keys must be passed directly to JSX without using spread:
|
|
|
220
220
|
function j(e) {
|
|
221
221
|
return typeof e == "object" && e !== null && e.$$typeof === w;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var _ = 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"), z = /* @__PURE__ */ Symbol.for("react.consumer"), J = /* @__PURE__ */ Symbol.for("react.context"), V = /* @__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"), y = /* @__PURE__ */ Symbol.for("react.lazy"), H = /* @__PURE__ */ Symbol.for("react.activity"), Z = /* @__PURE__ */ Symbol.for("react.client.reference"), O = _.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, g = Object.prototype.hasOwnProperty, Q = Array.isArray, x = console.createTask ? console.createTask : function() {
|
|
224
224
|
return null;
|
|
225
225
|
};
|
|
226
|
-
|
|
226
|
+
_ = {
|
|
227
227
|
react_stack_bottom_frame: function(e) {
|
|
228
228
|
return e();
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var N, C = {}, Y =
|
|
232
|
-
|
|
231
|
+
var N, C = {}, Y = _.react_stack_bottom_frame.bind(
|
|
232
|
+
_,
|
|
233
233
|
o
|
|
234
|
-
)(), I =
|
|
235
|
-
|
|
236
|
-
var n = 1e4 >
|
|
234
|
+
)(), I = x(i(o)), $ = {};
|
|
235
|
+
E.Fragment = k, E.jsx = function(e, r, t) {
|
|
236
|
+
var n = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
237
237
|
return P(
|
|
238
238
|
e,
|
|
239
239
|
r,
|
|
240
240
|
t,
|
|
241
241
|
!1,
|
|
242
242
|
n ? Error("react-stack-top-frame") : Y,
|
|
243
|
-
n ?
|
|
243
|
+
n ? x(i(e)) : I
|
|
244
244
|
);
|
|
245
|
-
},
|
|
246
|
-
var n = 1e4 >
|
|
245
|
+
}, E.jsxs = function(e, r, t) {
|
|
246
|
+
var n = 1e4 > O.recentlyCreatedOwnerStacks++;
|
|
247
247
|
return P(
|
|
248
248
|
e,
|
|
249
249
|
r,
|
|
250
250
|
t,
|
|
251
251
|
!0,
|
|
252
252
|
n ? Error("react-stack-top-frame") : Y,
|
|
253
|
-
n ?
|
|
253
|
+
n ? x(i(e)) : I
|
|
254
254
|
);
|
|
255
255
|
};
|
|
256
|
-
})()),
|
|
256
|
+
})()), E;
|
|
257
257
|
}
|
|
258
258
|
var M;
|
|
259
259
|
function se() {
|
|
260
|
-
return M || (M = 1, process.env.NODE_ENV === "production" ?
|
|
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
|
|
264
|
-
const [f,
|
|
265
|
-
const o = Date.now(),
|
|
263
|
+
function ie({ emoji: l, count: m }) {
|
|
264
|
+
const [f, i] = re([]), s = () => {
|
|
265
|
+
const o = Date.now(), u = Array.from({ length: m }, (c, T) => ({
|
|
266
266
|
id: o + T,
|
|
267
267
|
x: Math.random() * 120 - 80,
|
|
268
268
|
y: Math.random() * -100
|
|
269
269
|
}));
|
|
270
|
-
u
|
|
270
|
+
i(u), setTimeout(() => i([]), 600);
|
|
271
271
|
};
|
|
272
272
|
return /* @__PURE__ */ v.jsxs("div", { style: { position: "relative", display: "inline-block" }, children: [
|
|
273
273
|
/* @__PURE__ */ v.jsx(
|
|
@@ -275,22 +275,27 @@ function ue({ emoji: l, count: m }) {
|
|
|
275
275
|
{
|
|
276
276
|
onClick: s,
|
|
277
277
|
style: {
|
|
278
|
-
padding: "0.5rem 1rem"
|
|
278
|
+
padding: "0.5rem 1rem",
|
|
279
|
+
border: "none",
|
|
280
|
+
outline: "none",
|
|
281
|
+
background: "transparent",
|
|
282
|
+
cursor: "pointer"
|
|
279
283
|
},
|
|
280
284
|
children: l
|
|
281
285
|
}
|
|
282
286
|
),
|
|
283
|
-
/* @__PURE__ */ v.jsx(te, { children: f.map(({ id: o, x:
|
|
287
|
+
/* @__PURE__ */ v.jsx(te, { children: f.map(({ id: o, x: u, y: c }) => /* @__PURE__ */ v.jsx(
|
|
284
288
|
ne.span,
|
|
285
289
|
{
|
|
286
290
|
initial: { scale: 0.5, opacity: 1, x: 0, y: 0 },
|
|
287
|
-
animate: { scale: 1, opacity: 0, x:
|
|
291
|
+
animate: { scale: 1, opacity: 0, x: u, y: c },
|
|
288
292
|
exit: { opacity: 0 },
|
|
289
293
|
transition: { duration: 0.8, ease: "easeOut" },
|
|
290
294
|
style: {
|
|
291
|
-
position: "
|
|
295
|
+
position: "absolute",
|
|
292
296
|
left: "50%",
|
|
293
297
|
top: "50%",
|
|
298
|
+
transform: "translate(-50%, -50%)",
|
|
294
299
|
pointerEvents: "none",
|
|
295
300
|
fontSize: "1.25rem"
|
|
296
301
|
},
|
|
@@ -301,5 +306,5 @@ function ue({ emoji: l, count: m }) {
|
|
|
301
306
|
] });
|
|
302
307
|
}
|
|
303
308
|
export {
|
|
304
|
-
|
|
309
|
+
ie as EmojiPop
|
|
305
310
|
};
|
package/dist/pop-emojis.umd.cjs
CHANGED
|
@@ -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,A){"use strict";var
|
|
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,A){"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,a){var l=null;if(a!==void 0&&(l=""+a),s.key!==void 0&&(l=""+s.key),"key"in s){a={};for(var f in s)f!=="key"&&(a[f]=s[f])}else a=s;return s=a.ref,{$$typeof:i,type:c,key:l,ref:s!==void 0?s:null,props:a}}return _.Fragment=p,_.jsx=d,_.jsxs=d,_}var b={};var g;function z(){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===oe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O: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 x: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===O)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===x)return"<...>";try{var r=i(e);return r?"<"+r+">":"<...>"}catch{return"<...>"}}function s(){var e=P.A;return e===null?null:e.getOwner()}function a(){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 k(){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,y,h){var o=t.ref;return e={$$typeof:F,type:e,key:r,props:t,_owner:n},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:k}):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:y}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:h}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function C(e,r,t,n,y,h){var o=r.children;if(o!==void 0)if(n)if(ae(o)){for(n=0;n<o.length;n++)Y(o[n]);Object.freeze&&Object.freeze(o)}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(o);if(D.call(r,"key")){o=i(e);var E=Object.keys(r).filter(function(se){return se!=="key"});n=0<E.length?"{key: someKey, "+E.join(": ..., ")+": ...}":"{key: someKey}",U[o+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,o,E,o),U[o+n]=!0)}if(o=null,t!==void 0&&(d(t),o=""+t),l(r)&&(d(r.key),o=""+r.key),"key"in r){t={};for(var j in r)j!=="key"&&(t[j]=r[j])}else t=r;return o&&f(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,o,t,s(),y,h)}function Y(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===
|
|
6
|
+
<%s key={someKey} {...props} />`,n,o,E,o),U[o+n]=!0)}if(o=null,t!==void 0&&(d(t),o=""+t),l(r)&&(d(r.key),o=""+r.key),"key"in r){t={};for(var j in r)j!=="key"&&(t[j]=r[j])}else t=r;return o&&f(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),G(e,o,t,s(),y,h)}function Y(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===x&&(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"),O=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"),x=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),oe=Symbol.for("react.client.reference"),P=T.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,D=Object.prototype.hasOwnProperty,ae=Array.isArray,S=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,a)(),W=S(c(a)),U={};b.Fragment=O,b.jsx=function(e,r,t){var n=1e4>P.recentlyCreatedOwnerStacks++;return C(e,r,t,!1,n?Error("react-stack-top-frame"):L,n?S(c(e)):W)},b.jsxs=function(e,r,t){var n=1e4>P.recentlyCreatedOwnerStacks++;return C(e,r,t,!0,n?Error("react-stack-top-frame"):L,n?S(c(e)):W)}})()),b}var N;function J(){return N||(N=1,process.env.NODE_ENV==="production"?R.exports=q():R.exports=z()),R.exports}var v=J();function V({emoji:i,count:p}){const[d,c]=m.useState([]),s=()=>{const a=Date.now(),l=Array.from({length:p},(f,k)=>({id:a+k,x:Math.random()*120-80,y:Math.random()*-100}));c(l),setTimeout(()=>c([]),600)};return v.jsxs("div",{style:{position:"relative",display:"inline-block"},children:[v.jsx("button",{onClick:s,style:{padding:"0.5rem 1rem",border:"none",outline:"none",background:"transparent",cursor:"pointer"},children:i}),v.jsx(A.AnimatePresence,{children:d.map(({id:a,x:l,y:f})=>v.jsx(A.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"},style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none",fontSize:"1.25rem"},children:i},a))})]})}u.EmojiPop=V,Object.defineProperty(u,Symbol.toStringTag,{value:"Module"})}));
|