@chao-component/bag-animation-ui 1.0.17 → 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 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;
@@ -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;
@@ -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
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chao-component/bag-animation-ui",
3
- "version": "1.0.17",
3
+ "version": "1.0.18",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",