@chao-component/bag-animation-ui 1.0.16 → 1.0.18
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/index.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -845,7 +845,7 @@ function BagAnimation({
|
|
|
845
845
|
}
|
|
846
846
|
}, [isAnimating]);
|
|
847
847
|
(0, import_react.useEffect)(() => {
|
|
848
|
-
if (!isAnimating || !canvasRef.current) return;
|
|
848
|
+
if (!isAnimating || !canvasRef.current || !hasChances) return;
|
|
849
849
|
const canvas = canvasRef.current;
|
|
850
850
|
const ctx = canvas.getContext("2d");
|
|
851
851
|
if (!ctx) return;
|
|
@@ -1034,8 +1034,8 @@ function BagAnimation({
|
|
|
1034
1034
|
setShowSwipeHint(true);
|
|
1035
1035
|
}
|
|
1036
1036
|
};
|
|
1037
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `flex
|
|
1038
|
-
!isAnimating && hasChances && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute left-[calc(50%-0px)] transform -translate-x-1/2 z-50 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center animate-bounce", children: [
|
|
1037
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: `flex w-full relative justify-center items-center ${className}`, children: [
|
|
1038
|
+
!isAnimating && hasChances && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-0 left-[calc(50%-0px)] transform -translate-x-1/2 z-50 pointer-events-none", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center animate-bounce", children: [
|
|
1039
1039
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1040
1040
|
"p",
|
|
1041
1041
|
{
|
|
@@ -1051,7 +1051,7 @@ function BagAnimation({
|
|
|
1051
1051
|
}
|
|
1052
1052
|
)
|
|
1053
1053
|
] }) }),
|
|
1054
|
-
isAnimating && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1054
|
+
isAnimating && hasChances && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1055
1055
|
showMask && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1056
1056
|
"div",
|
|
1057
1057
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -829,7 +829,7 @@ function BagAnimation({
|
|
|
829
829
|
}
|
|
830
830
|
}, [isAnimating]);
|
|
831
831
|
useEffect(() => {
|
|
832
|
-
if (!isAnimating || !canvasRef.current) return;
|
|
832
|
+
if (!isAnimating || !canvasRef.current || !hasChances) return;
|
|
833
833
|
const canvas = canvasRef.current;
|
|
834
834
|
const ctx = canvas.getContext("2d");
|
|
835
835
|
if (!ctx) return;
|
|
@@ -1018,8 +1018,8 @@ function BagAnimation({
|
|
|
1018
1018
|
setShowSwipeHint(true);
|
|
1019
1019
|
}
|
|
1020
1020
|
};
|
|
1021
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: `flex
|
|
1022
|
-
!isAnimating && hasChances && /* @__PURE__ */ jsx("div", { className: "absolute left-[calc(50%-0px)] transform -translate-x-1/2 z-50 pointer-events-none", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center animate-bounce", children: [
|
|
1021
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: `flex w-full relative justify-center items-center ${className}`, children: [
|
|
1022
|
+
!isAnimating && hasChances && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-[calc(50%-0px)] transform -translate-x-1/2 z-50 pointer-events-none", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center animate-bounce", children: [
|
|
1023
1023
|
/* @__PURE__ */ jsx(
|
|
1024
1024
|
"p",
|
|
1025
1025
|
{
|
|
@@ -1035,7 +1035,7 @@ function BagAnimation({
|
|
|
1035
1035
|
}
|
|
1036
1036
|
)
|
|
1037
1037
|
] }) }),
|
|
1038
|
-
isAnimating && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1038
|
+
isAnimating && hasChances && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1039
1039
|
showMask && /* @__PURE__ */ jsx(
|
|
1040
1040
|
"div",
|
|
1041
1041
|
{
|