@chao-component/bag-animation-ui 1.0.10 → 1.0.11
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.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -3
- package/dist/index.mjs +5 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -6,11 +6,12 @@ interface BagAnimationProps {
|
|
|
6
6
|
defaultImage?: string;
|
|
7
7
|
defaultImageAlt?: string;
|
|
8
8
|
swipeHintText?: string;
|
|
9
|
+
boxOpeningText?: string;
|
|
9
10
|
showMask?: boolean;
|
|
10
11
|
maskOpacity?: number;
|
|
11
12
|
maskBlur?: number;
|
|
12
13
|
}
|
|
13
|
-
declare function BagAnimation({ doneFunction, frames, defaultImage, defaultImageAlt, swipeHintText, showMask, maskOpacity, maskBlur }: BagAnimationProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function BagAnimation({ doneFunction, frames, defaultImage, defaultImageAlt, swipeHintText, boxOpeningText, showMask, maskOpacity, maskBlur }: BagAnimationProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* 获取打包后的资源路径
|
package/dist/index.d.ts
CHANGED
|
@@ -6,11 +6,12 @@ interface BagAnimationProps {
|
|
|
6
6
|
defaultImage?: string;
|
|
7
7
|
defaultImageAlt?: string;
|
|
8
8
|
swipeHintText?: string;
|
|
9
|
+
boxOpeningText?: string;
|
|
9
10
|
showMask?: boolean;
|
|
10
11
|
maskOpacity?: number;
|
|
11
12
|
maskBlur?: number;
|
|
12
13
|
}
|
|
13
|
-
declare function BagAnimation({ doneFunction, frames, defaultImage, defaultImageAlt, swipeHintText, showMask, maskOpacity, maskBlur }: BagAnimationProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare function BagAnimation({ doneFunction, frames, defaultImage, defaultImageAlt, swipeHintText, boxOpeningText, showMask, maskOpacity, maskBlur }: BagAnimationProps): react_jsx_runtime.JSX.Element;
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
17
|
* 获取打包后的资源路径
|
package/dist/index.js
CHANGED
|
@@ -807,6 +807,7 @@ function BagAnimation({
|
|
|
807
807
|
defaultImage = defaultImagePath,
|
|
808
808
|
defaultImageAlt = "Weedza Mystery Box",
|
|
809
809
|
swipeHintText = "Swipe to open",
|
|
810
|
+
boxOpeningText = "Box Opening...",
|
|
810
811
|
showMask = true,
|
|
811
812
|
maskOpacity = 0.7,
|
|
812
813
|
maskBlur = 8
|
|
@@ -1029,7 +1030,7 @@ function BagAnimation({
|
|
|
1029
1030
|
setShowSwipeHint(true);
|
|
1030
1031
|
}
|
|
1031
1032
|
};
|
|
1032
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.
|
|
1033
|
+
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", children: [
|
|
1033
1034
|
isAnimating && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
1034
1035
|
showMask && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1035
1036
|
"div",
|
|
@@ -1135,7 +1136,8 @@ function BagAnimation({
|
|
|
1135
1136
|
}
|
|
1136
1137
|
)
|
|
1137
1138
|
}
|
|
1138
|
-
)
|
|
1139
|
+
),
|
|
1140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fixed z-[101] top-0 left-0 w-full h-[10%] flex justify-center items-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-theme_gold animate-pulse text-sm md:text-base text-center z-[101]", children: boxOpeningText }) })
|
|
1139
1141
|
] }),
|
|
1140
1142
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
1141
1143
|
"img",
|
|
@@ -1148,7 +1150,7 @@ function BagAnimation({
|
|
|
1148
1150
|
className: "w-36 h-36 md:w-96 md:h-96 object-contain relative z-10"
|
|
1149
1151
|
}
|
|
1150
1152
|
)
|
|
1151
|
-
] });
|
|
1153
|
+
] }) });
|
|
1152
1154
|
}
|
|
1153
1155
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1154
1156
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -791,6 +791,7 @@ function BagAnimation({
|
|
|
791
791
|
defaultImage = defaultImagePath,
|
|
792
792
|
defaultImageAlt = "Weedza Mystery Box",
|
|
793
793
|
swipeHintText = "Swipe to open",
|
|
794
|
+
boxOpeningText = "Box Opening...",
|
|
794
795
|
showMask = true,
|
|
795
796
|
maskOpacity = 0.7,
|
|
796
797
|
maskBlur = 8
|
|
@@ -1013,7 +1014,7 @@ function BagAnimation({
|
|
|
1013
1014
|
setShowSwipeHint(true);
|
|
1014
1015
|
}
|
|
1015
1016
|
};
|
|
1016
|
-
return /* @__PURE__ */
|
|
1017
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("div", { className: "flex w-full relative justify-center items-center", children: [
|
|
1017
1018
|
isAnimating && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1018
1019
|
showMask && /* @__PURE__ */ jsx(
|
|
1019
1020
|
"div",
|
|
@@ -1119,7 +1120,8 @@ function BagAnimation({
|
|
|
1119
1120
|
}
|
|
1120
1121
|
)
|
|
1121
1122
|
}
|
|
1122
|
-
)
|
|
1123
|
+
),
|
|
1124
|
+
/* @__PURE__ */ jsx("div", { className: "fixed z-[101] top-0 left-0 w-full h-[10%] flex justify-center items-center", children: /* @__PURE__ */ jsx("p", { className: "text-theme_gold animate-pulse text-sm md:text-base text-center z-[101]", children: boxOpeningText }) })
|
|
1123
1125
|
] }),
|
|
1124
1126
|
/* @__PURE__ */ jsx(
|
|
1125
1127
|
"img",
|
|
@@ -1132,7 +1134,7 @@ function BagAnimation({
|
|
|
1132
1134
|
className: "w-36 h-36 md:w-96 md:h-96 object-contain relative z-10"
|
|
1133
1135
|
}
|
|
1134
1136
|
)
|
|
1135
|
-
] });
|
|
1137
|
+
] }) });
|
|
1136
1138
|
}
|
|
1137
1139
|
export {
|
|
1138
1140
|
BagAnimation,
|