related-ui-components 3.2.2 → 3.2.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.
- package/lib/module/app.js.map +1 -1
- package/lib/module/components/ScratchCard/ScratchCard.js +75 -75
- package/lib/module/components/ScratchCard/ScratchCard.js.map +1 -1
- package/lib/module/components/Skeleton/Shimmer.js +40 -34
- package/lib/module/components/Skeleton/Shimmer.js.map +1 -1
- package/lib/typescript/src/app.d.ts.map +1 -1
- package/lib/typescript/src/components/ScratchCard/ScratchCard.d.ts.map +1 -1
- package/lib/typescript/src/components/Skeleton/Shimmer.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app.tsx +2 -3
- package/src/components/ScratchCard/ScratchCard.tsx +79 -91
- package/src/components/Skeleton/Shimmer.tsx +52 -45
package/lib/module/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","SafeAreaView","StyleSheet","StatusBar","GestureHandlerRootView","lightTheme","RelatedProvider","useTheme","CircularProgressBar","PhoneInput","BottomSheetStackProvider","SafeAreaProvider","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DUMMY_DATA","Array","from","length","_","i","id","image","title","App","theme","departureDate","setDepartureDate","undefined","returnDate","setReturnDate","progress","setProgress","handleAnimate","newProgress","Math","floor","random","children","style","flex","barStyle","styles","appContainer","variant","totalSteps","currentStep","size","fontSize","strokeWidth","progressColor","value","placeholder","onChangeText","inputContainerStyle","height","create","backgroundColor","justifyContent","alignItems"],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAeC,QAAQ,QAAQ,OAAO;AAClD,SAASC,YAAY,EAAEC,UAAU,EAAEC,SAAS,QAAwC,cAAc;AAChB;AAClF,SAASC,sBAAsB,QAAQ,8BAA8B;AAarE,SAAoBC,UAAU,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,kBAAS;AAC1E,OAAOC,mBAAmB,MAAM,i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UAAAoC,QAAA,eACjC1B,KAAA,CAACL,wBAAwB;YAAA+B,QAAA,gBACvB5B,IAAA,CAACV,SAAS;cAACyC,QAAQ,EAAC;YAAe,CAAE,CAAC,eACtC7B,KAAA,CAACd,YAAY;cAACyC,KAAK,EAAEG,MAAM,CAACC,YAAa;cAAAL,QAAA,gBAuDvC5B,IAAA,CAACL,mBAAmB;gBAClBuC,OAAO,EAAC,OAAO;gBACfC,UAAU,EAAE,CAAE;gBACdC,WAAW,EAAE,CAAE;gBACfC,IAAI,EAAE,EAAG;gBACTC,QAAQ,EAAE,EAAG;gBACbC,WAAW,EAAE,CAAE;gBACfC,aAAa,EAAC;cAAM,CACA,CAAC,eAEvBxC,IAAA,CAACJ,UAAU;gBACT6C,KAAK,EAAC,EAAE;
|
|
1
|
+
{"version":3,"names":["React","useState","SafeAreaView","StyleSheet","StatusBar","GestureHandlerRootView","lightTheme","RelatedProvider","useTheme","CircularProgressBar","PhoneInput","BottomSheetStackProvider","SafeAreaProvider","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","DUMMY_DATA","Array","from","length","_","i","id","image","title","App","theme","departureDate","setDepartureDate","undefined","returnDate","setReturnDate","progress","setProgress","handleAnimate","newProgress","Math","floor","random","children","style","flex","barStyle","styles","appContainer","variant","totalSteps","currentStep","size","fontSize","strokeWidth","progressColor","value","placeholder","onChangeText","inputContainerStyle","height","create","backgroundColor","justifyContent","alignItems"],"sourceRoot":"..\\..\\src","sources":["app.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAeC,QAAQ,QAAQ,OAAO;AAClD,SAASC,YAAY,EAAEC,UAAU,EAAEC,SAAS,QAAwC,cAAc;AAChB;AAClF,SAASC,sBAAsB,QAAQ,8BAA8B;AAarE,SAAoBC,UAAU,EAAEC,eAAe,EAAEC,QAAQ,QAAQ,kBAAS;AAC1E,OAAOC,mBAAmB,MAAM,iDAA8C;AAC9E,OAAOC,UAAU,MAAM,kCAA+B;AACtD,SAASC,wBAAwB,QAAQ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AAA,CAACV,SAAS;cAACyC,QAAQ,EAAC;YAAe,CAAE,CAAC,eACtC7B,KAAA,CAACd,YAAY;cAACyC,KAAK,EAAEG,MAAM,CAACC,YAAa;cAAAL,QAAA,gBAuDvC5B,IAAA,CAACL,mBAAmB;gBAClBuC,OAAO,EAAC,OAAO;gBACfC,UAAU,EAAE,CAAE;gBACdC,WAAW,EAAE,CAAE;gBACfC,IAAI,EAAE,EAAG;gBACTC,QAAQ,EAAE,EAAG;gBACbC,WAAW,EAAE,CAAE;gBACfC,aAAa,EAAC;cAAM,CACA,CAAC,eAEvBxC,IAAA,CAACJ,UAAU;gBACT6C,KAAK,EAAC,EAAE;gBACRC,WAAW,EAAC,cAAc;gBAC1BC,YAAY,EAAEA,CAAA,KAAM,CAAC,CAAE;gBACvBC,mBAAmB,EAAE;kBAAEC,MAAM,EAAE;gBAAG;cAAE,CACzB,CAAC;YAAA,CA6CF,CAAC;UAAA,CACS;QAAC,CACZ;MAAC,CACI;IAAC,CACT;EAAC,CACnB,CAAC;AAEP,CAAC;AAED,MAAMb,MAAM,GAAG3C,UAAU,CAACyD,MAAM,CAAC;EAC/Bb,YAAY,EAAE;IACZH,IAAI,EAAE,CAAC;IACPiB,eAAe,EAAE,MAAM;IACvBC,cAAc,EAAE,QAAQ;IAAE;IAC1BC,UAAU,EAAC;EACb;AACF,CAAC,CAAC;AAEF,eAAenC,GAAG","ignoreList":[]}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useState, useEffect, useCallback
|
|
4
|
-
|
|
3
|
+
import React, { useState, useEffect, useCallback // Import useCallback
|
|
4
|
+
} from "react";
|
|
5
|
+
import { Canvas, Group, Image, Mask, Path, Rect, Skia, useImage, Text, useFont, notifyChange
|
|
6
|
+
// Import SkPath type
|
|
7
|
+
// Import SkFont type
|
|
8
|
+
,
|
|
9
|
+
// Import SkImage type
|
|
10
|
+
LinearGradient } from "@shopify/react-native-skia";
|
|
5
11
|
import { View, StyleSheet } from "react-native";
|
|
6
12
|
import { runOnJS, useSharedValue } from "react-native-reanimated";
|
|
7
13
|
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
|
|
@@ -103,46 +109,6 @@ const ScratchCard = ({
|
|
|
103
109
|
return null;
|
|
104
110
|
}, [loadedFont, text, areaWidth, areaHeight]);
|
|
105
111
|
const canRenderCanvas = isLayoutReady && areaWidth > 0 && areaHeight > 0;
|
|
106
|
-
const renderScratchContent = () => {
|
|
107
|
-
return /*#__PURE__*/_jsxs(Group, {
|
|
108
|
-
children: [gradient ? /*#__PURE__*/_jsx(Rect, {
|
|
109
|
-
x: 0,
|
|
110
|
-
y: 0,
|
|
111
|
-
width: areaWidth,
|
|
112
|
-
height: areaHeight,
|
|
113
|
-
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
114
|
-
start: gradient.start ?? {
|
|
115
|
-
x: 0,
|
|
116
|
-
y: 0
|
|
117
|
-
},
|
|
118
|
-
end: gradient.end ?? {
|
|
119
|
-
x: areaWidth,
|
|
120
|
-
y: areaHeight
|
|
121
|
-
},
|
|
122
|
-
colors: gradient.colors
|
|
123
|
-
})
|
|
124
|
-
}) : /*#__PURE__*/_jsx(Rect, {
|
|
125
|
-
x: 0,
|
|
126
|
-
y: 0,
|
|
127
|
-
width: areaWidth,
|
|
128
|
-
height: areaHeight,
|
|
129
|
-
color: backgroundColor
|
|
130
|
-
}), loadedImg && /*#__PURE__*/_jsx(Image, {
|
|
131
|
-
image: loadedImg,
|
|
132
|
-
fit: "contain",
|
|
133
|
-
x: 0,
|
|
134
|
-
y: 0,
|
|
135
|
-
width: areaWidth,
|
|
136
|
-
height: areaHeight
|
|
137
|
-
}), loadedFont && textMetrics && text && /*#__PURE__*/_jsx(Text, {
|
|
138
|
-
x: textMetrics.x,
|
|
139
|
-
y: textMetrics.y,
|
|
140
|
-
text: text,
|
|
141
|
-
color: textFontColor,
|
|
142
|
-
font: loadedFont
|
|
143
|
-
})]
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
112
|
return /*#__PURE__*/_jsx(GestureHandlerRootView, {
|
|
147
113
|
style: {
|
|
148
114
|
justifyContent: "center",
|
|
@@ -157,32 +123,72 @@ const ScratchCard = ({
|
|
|
157
123
|
children: [canRenderCanvas && /*#__PURE__*/_jsx(View, {
|
|
158
124
|
style: styles.content,
|
|
159
125
|
children: children
|
|
160
|
-
}), !isScratched && canRenderCanvas && /*#__PURE__*/_jsx(
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
126
|
+
}), !isScratched && canRenderCanvas && /*#__PURE__*/_jsx(GestureDetector, {
|
|
127
|
+
gesture: pan,
|
|
128
|
+
children: /*#__PURE__*/_jsx(Canvas, {
|
|
129
|
+
style: styles.canvas,
|
|
130
|
+
children: /*#__PURE__*/_jsx(Mask, {
|
|
131
|
+
mode: "luminance",
|
|
132
|
+
mask: /*#__PURE__*/_jsxs(Group, {
|
|
133
|
+
children: [/*#__PURE__*/_jsx(Rect, {
|
|
134
|
+
x: 0,
|
|
135
|
+
y: 0,
|
|
136
|
+
width: areaWidth,
|
|
137
|
+
height: areaHeight,
|
|
138
|
+
color: "white"
|
|
139
|
+
}), /*#__PURE__*/_jsx(Path, {
|
|
140
|
+
path: path,
|
|
141
|
+
color: "black",
|
|
142
|
+
style: "stroke",
|
|
143
|
+
strokeJoin: "round",
|
|
144
|
+
strokeCap: "round",
|
|
145
|
+
strokeWidth: brushStrokeWidth
|
|
146
|
+
})]
|
|
147
|
+
}),
|
|
148
|
+
children: loadedImg ? /*#__PURE__*/_jsx(Image, {
|
|
149
|
+
image: loadedImg,
|
|
150
|
+
fit: "cover",
|
|
151
|
+
x: 0,
|
|
152
|
+
y: 0,
|
|
153
|
+
width: areaWidth,
|
|
154
|
+
height: areaHeight
|
|
155
|
+
}) : gradient ? /*#__PURE__*/_jsxs(Group, {
|
|
156
|
+
children: [/*#__PURE__*/_jsx(LinearGradient, {
|
|
157
|
+
start: gradient.start ?? {
|
|
171
158
|
x: 0,
|
|
172
|
-
y: 0
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}),
|
|
185
|
-
|
|
159
|
+
y: 0
|
|
160
|
+
},
|
|
161
|
+
end: gradient.end ?? {
|
|
162
|
+
x: areaWidth,
|
|
163
|
+
y: areaHeight
|
|
164
|
+
},
|
|
165
|
+
colors: gradient.colors
|
|
166
|
+
}), /*#__PURE__*/_jsx(Rect, {
|
|
167
|
+
x: 0,
|
|
168
|
+
y: 0,
|
|
169
|
+
width: areaWidth,
|
|
170
|
+
height: areaHeight
|
|
171
|
+
}), loadedFont && textMetrics && text ? /*#__PURE__*/_jsx(Text, {
|
|
172
|
+
x: textMetrics.x,
|
|
173
|
+
y: textMetrics.y,
|
|
174
|
+
text: text,
|
|
175
|
+
color: textFontColor,
|
|
176
|
+
font: loadedFont
|
|
177
|
+
}) : null]
|
|
178
|
+
}) : /*#__PURE__*/_jsxs(Group, {
|
|
179
|
+
children: [/*#__PURE__*/_jsx(Rect, {
|
|
180
|
+
x: 0,
|
|
181
|
+
y: 0,
|
|
182
|
+
width: areaWidth,
|
|
183
|
+
height: areaHeight,
|
|
184
|
+
color: backgroundColor
|
|
185
|
+
}), loadedFont && textMetrics && text ? /*#__PURE__*/_jsx(Text, {
|
|
186
|
+
x: textMetrics.x,
|
|
187
|
+
y: textMetrics.y,
|
|
188
|
+
text: text,
|
|
189
|
+
color: textFontColor,
|
|
190
|
+
font: loadedFont
|
|
191
|
+
}) : null]
|
|
186
192
|
})
|
|
187
193
|
})
|
|
188
194
|
})
|
|
@@ -203,19 +209,13 @@ const styles = StyleSheet.create({
|
|
|
203
209
|
height: "100%",
|
|
204
210
|
zIndex: 1
|
|
205
211
|
},
|
|
206
|
-
|
|
212
|
+
canvas: {
|
|
207
213
|
position: "absolute",
|
|
208
214
|
top: 0,
|
|
209
215
|
left: 0,
|
|
210
216
|
width: "100%",
|
|
211
217
|
height: "100%",
|
|
212
|
-
zIndex:
|
|
213
|
-
backgroundColor: "transparent"
|
|
214
|
-
},
|
|
215
|
-
canvas: {
|
|
216
|
-
flex: 1,
|
|
217
|
-
width: "100%",
|
|
218
|
-
height: "100%"
|
|
218
|
+
zIndex: 2
|
|
219
219
|
}
|
|
220
220
|
});
|
|
221
221
|
export default ScratchCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useState","useEffect","useCallback","Canvas","Group","Image","Mask","Path","Rect","Skia","useImage","Text","useFont","notifyChange","LinearGradient","View","StyleSheet","runOnJS","useSharedValue","Gesture","GestureDetector","GestureHandlerRootView","jsx","_jsx","jsxs","_jsxs","ScratchCard","style","children","image","brushStrokeWidth","revealThreshold","width","height","backgroundColor","text","textFont","textFontColor","textFontSize","onScratched","gradient","loadedImg","loadedFont","areaWidth","areaHeight","setSize","isScratched","setScratched","isLayoutReady","setLayoutReady","isThresholdReached","path","Make","value","handleLayout","event","newWidth","newHeight","nativeEvent","layout","revealCardOnJS","pan","Pan","averageTouches","maxPointers","onBegin","e","newPath","copy","moveTo","x","y","lineTo","error","console","onChange","bounds","getBounds","scratchedArea","totalArea","textMetrics","useMemo","metrics","measureText","textX","textY","canRenderCanvas","
|
|
1
|
+
{"version":3,"names":["React","useState","useEffect","useCallback","Canvas","Group","Image","Mask","Path","Rect","Skia","useImage","Text","useFont","notifyChange","LinearGradient","View","StyleSheet","runOnJS","useSharedValue","Gesture","GestureDetector","GestureHandlerRootView","jsx","_jsx","jsxs","_jsxs","ScratchCard","style","children","image","brushStrokeWidth","revealThreshold","width","height","backgroundColor","text","textFont","textFontColor","textFontSize","onScratched","gradient","loadedImg","loadedFont","areaWidth","areaHeight","setSize","isScratched","setScratched","isLayoutReady","setLayoutReady","isThresholdReached","path","Make","value","handleLayout","event","newWidth","newHeight","nativeEvent","layout","revealCardOnJS","pan","Pan","averageTouches","maxPointers","onBegin","e","newPath","copy","moveTo","x","y","lineTo","error","console","onChange","bounds","getBounds","scratchedArea","totalArea","textMetrics","useMemo","metrics","measureText","textX","textY","canRenderCanvas","justifyContent","alignContent","onLayout","styles","container","content","gesture","canvas","mode","mask","color","strokeJoin","strokeCap","strokeWidth","fit","start","end","colors","font","create","position","overflow","top","left","zIndex"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/ScratchCard/ScratchCard.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAEVC,QAAQ,EACRC,SAAS,EACTC,WAAW,CAAE;AAAA,OACR,OAAO;AACd,SACEC,MAAM,EACNC,KAAK,EACLC,KAAK,EACLC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,IAAI,EACJC,OAAO,EACPC;AACQ;AACA;AAAA;AACC;AACTC,cAAc,QACT,4BAA4B;AACnC,SAEEC,IAAI,EAEJC,UAAU,QAGL,cAAc;AACrB,SAASC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AACjE,SACEC,OAAO,EACPC,eAAe,EACfC,sBAAsB,QACjB,8BAA8B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuBtC,MAAMC,WAAuC,GAAGA,CAAC;EAC/CC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,gBAAgB,GAAG,EAAE;EACrBC,eAAe,GAAG,GAAG;EACrBC,KAAK,GAAG,GAAG;EACXC,MAAM,GAAG,GAAG;EACZC,eAAe,GAAG,SAAS;EAC3BC,IAAI,GAAG,EAAE;EACTC,QAAQ;EACRC,aAAa,GAAG,SAAS;EACzBC,YAAY,GAAG,EAAE;EACjBC,WAAW;EACXC;AACF,CAAC,KAAK;EACJ,MAAMC,SAAS,GAAG/B,QAAQ,CAACmB,KAAK,CAAC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,IAAA,CAACZ,IAAI;gBACH2D,CAAC,EAAEU,WAAW,CAACV,CAAE;gBACjBC,CAAC,EAAES,WAAW,CAACT,CAAE;gBACjBpC,IAAI,EAAEA,IAAK;gBACX8D,KAAK,EAAE5D,aAAc;gBACrBoE,IAAI,EAAE/D;cAAW,CAClB,CAAC,GACA,IAAI;YAAA,CACH;UACR,CACG;QAAC,CACD;MAAC,CACM,CAClB;IAAA,CACG;EAAC,CACe,CAAC;AAE7B,CAAC;AAED,MAAMgD,MAAM,GAAG1E,UAAU,CAAC0F,MAAM,CAAC;EAC/Bf,SAAS,EAAE;IACTgB,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDhB,OAAO,EAAE;IACPe,QAAQ,EAAE,UAAU;IACpBE,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACP9E,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACd8E,MAAM,EAAE;EACV,CAAC;EACDjB,MAAM,EAAE;IACNa,QAAQ,EAAE,UAAU;IACpBE,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACP9E,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACd8E,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAerF,WAAW","ignoreList":[]}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { LinearGradient } from "expo-linear-gradient";
|
|
4
|
-
import React, { useEffect
|
|
5
|
-
import {
|
|
4
|
+
import React, { useEffect } from "react";
|
|
5
|
+
import { I18nManager, StyleSheet, View } from "react-native";
|
|
6
|
+
import Animated, { Easing, interpolate, useAnimatedStyle, useSharedValue, withRepeat, withTiming } from "react-native-reanimated";
|
|
6
7
|
import { useTheme } from "../../theme/index.js";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
9
|
const Shimmer = ({
|
|
@@ -17,50 +18,50 @@ const Shimmer = ({
|
|
|
17
18
|
const {
|
|
18
19
|
theme
|
|
19
20
|
} = useTheme();
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
21
|
+
const layoutWidth = useSharedValue(0);
|
|
22
|
+
const progress = useSharedValue(0);
|
|
23
23
|
useEffect(() => {
|
|
24
|
-
|
|
25
|
-
const animation = Animated.loop(Animated.timing(animatedValue, {
|
|
26
|
-
toValue: 1,
|
|
24
|
+
progress.value = withRepeat(withTiming(1, {
|
|
27
25
|
duration: duration,
|
|
28
|
-
easing: Easing.linear
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}, [animatedValue, duration, viewWidth]);
|
|
26
|
+
easing: Easing.linear
|
|
27
|
+
}), -1, false);
|
|
28
|
+
}, [duration, progress]);
|
|
29
|
+
|
|
30
|
+
// 3. Update width via shared value (no re-render)
|
|
34
31
|
const handleLayout = event => {
|
|
35
|
-
|
|
36
|
-
width
|
|
37
|
-
} = event.nativeEvent.layout;
|
|
38
|
-
if (width > 0 && Math.round(width) !== Math.round(viewWidth)) {
|
|
39
|
-
setViewWidth(width);
|
|
40
|
-
}
|
|
32
|
+
layoutWidth.value = event.nativeEvent.layout.width;
|
|
41
33
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
34
|
+
|
|
35
|
+
// 4. Calculate translation on the UI thread
|
|
36
|
+
const rStyle = useAnimatedStyle(() => {
|
|
37
|
+
if (layoutWidth.value === 0) {
|
|
38
|
+
return {
|
|
39
|
+
opacity: 0
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
const start = -layoutWidth.value;
|
|
43
|
+
const end = layoutWidth.value;
|
|
44
|
+
const outputRange = I18nManager.isRTL ? [end, start] : [start, end];
|
|
45
|
+
const translateX = interpolate(progress.value, [0, 1], outputRange);
|
|
46
|
+
return {
|
|
47
|
+
opacity: 1,
|
|
48
|
+
transform: [{
|
|
49
|
+
translateX
|
|
50
|
+
}]
|
|
51
|
+
};
|
|
46
52
|
});
|
|
47
53
|
const gradientColors = ["rgba(255, 255, 255, 0)", shimmerColor || theme.skeletonShimmer || "rgba(255, 255, 255, 0.3)", "rgba(255, 255, 255, 0)"];
|
|
48
54
|
return /*#__PURE__*/_jsxs(View, {
|
|
49
55
|
onLayout: handleLayout,
|
|
50
|
-
style: [{
|
|
56
|
+
style: [styles.container, {
|
|
51
57
|
width,
|
|
52
58
|
height,
|
|
53
|
-
|
|
54
|
-
backgroundColor: theme.skeletonBackgroundColor
|
|
59
|
+
backgroundColor: theme.skeletonBackgroundColor || "#E0E0E0"
|
|
55
60
|
}, style],
|
|
56
|
-
children: [children,
|
|
57
|
-
style: {
|
|
58
|
-
...StyleSheet.absoluteFillObject,
|
|
59
|
-
transform: [{
|
|
60
|
-
translateX
|
|
61
|
-
}],
|
|
61
|
+
children: [children, /*#__PURE__*/_jsx(Animated.View, {
|
|
62
|
+
style: [StyleSheet.absoluteFill, rStyle, {
|
|
62
63
|
zIndex: 1
|
|
63
|
-
},
|
|
64
|
+
}],
|
|
64
65
|
children: /*#__PURE__*/_jsx(LinearGradient, {
|
|
65
66
|
colors: gradientColors,
|
|
66
67
|
style: {
|
|
@@ -79,5 +80,10 @@ const Shimmer = ({
|
|
|
79
80
|
})]
|
|
80
81
|
});
|
|
81
82
|
};
|
|
83
|
+
const styles = StyleSheet.create({
|
|
84
|
+
container: {
|
|
85
|
+
overflow: "hidden"
|
|
86
|
+
}
|
|
87
|
+
});
|
|
82
88
|
export default Shimmer;
|
|
83
89
|
//# sourceMappingURL=Shimmer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["LinearGradient","React","useEffect","
|
|
1
|
+
{"version":3,"names":["LinearGradient","React","useEffect","I18nManager","StyleSheet","View","Animated","Easing","interpolate","useAnimatedStyle","useSharedValue","withRepeat","withTiming","useTheme","jsx","_jsx","jsxs","_jsxs","Shimmer","children","width","height","style","shimmerColor","duration","shimmerWidth","theme","layoutWidth","progress","value","easing","linear","handleLayout","event","nativeEvent","layout","rStyle","opacity","start","end","outputRange","isRTL","translateX","transform","gradientColors","skeletonShimmer","onLayout","styles","container","backgroundColor","skeletonBackgroundColor","absoluteFill","zIndex","colors","x","y","create","overflow"],"sourceRoot":"..\\..\\..\\..\\src","sources":["components/Skeleton/Shimmer.tsx"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,sBAAsB;AACrD,OAAOC,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAEEC,WAAW,EAGXC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,OAAOC,QAAQ,IACbC,MAAM,EACNC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,EACVC,UAAU,QACL,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,sBAAa;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYvC,MAAMC,OAA+B,GAAGA,CAAC;EACvCC,QAAQ;EACRC,KAAK,GAAG,MAAM;EACdC,MAAM;EACNC,KAAK;EACLC,YAAY;EACZC,QAAQ,GAAG,IAAI;EACfC,YAAY,GAAG;AACjB,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAM,CAAC,GAAGb,QAAQ,CAAC,CAAC;EAE5B,MAAMc,WAAW,GAAGjB,cAAc,CAAC,CAAC,CAAC;EACrC,MAAMkB,QAAQ,GAAGlB,cAAc,CAAC,CAAC,CAAC;EAElCR,SAAS,CAAC,MAAM;IACd0B,QAAQ,CAACC,KAAK,GAAGlB,UAAU,CACzBC,UAAU,CAAC,CAAC,EAAE;MACZY,QAAQ,EAAEA,QAAQ;MAClBM,MAAM,EAAEvB,MAAM,CAACwB;IACjB,CAAC,CAAC,EACF,CAAC,CAAC,EACF,KACF,CAAC;EACH,CAAC,EAAE,CAACP,QAAQ,EAAEI,QAAQ,CAAC,CAAC;;EAExB;EACA,MAAMI,Y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,IAAA,CAACf,cAAc;QACbqD,MAAM,EAAET,cAAsB;QAC9BtB,KAAK,EAAE;UAAED,MAAM,EAAE,MAAM;UAAED,KAAK,EAAEK;QAAa,CAAE;QAC/Ca,KAAK,EAAE;UAAEgB,CAAC,EAAE,CAAC;UAAEC,CAAC,EAAE;QAAI,CAAE;QACxBhB,GAAG,EAAE;UAAEe,CAAC,EAAE,CAAC;UAAEC,CAAC,EAAE;QAAI;MAAE,CACvB;IAAC,CACW,CAAC;EAAA,CACZ,CAAC;AAEX,CAAC;AAED,MAAMR,MAAM,GAAG3C,UAAU,CAACoD,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAevC,OAAO","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAiCnD,QAAA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/app.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAiCnD,QAAA,MAAM,GAAG,yBAgJR,CAAC;AAWF,eAAe,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScratchCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ScratchCard/ScratchCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAKN,MAAM,OAAO,CAAC;AAkBf,OAAO,EACL,SAAS,EAET,SAAS,EAET,kBAAkB,EAEnB,MAAM,cAAc,CAAC;AAQtB,KAAK,gBAAgB,GAAG;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B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CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,KAAK,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QACjC,GAAG,CAAC,EAAE;YAAE,CAAC,EAAE,MAAM,CAAC;YAAC,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KAChC,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA6M3C,CAAC;AAyBF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/Shimmer.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"Shimmer.d.ts","sourceRoot":"","sources":["../../../../../src/components/Skeleton/Shimmer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EACL,cAAc,EAGd,SAAS,EAGT,SAAS,EACV,MAAM,cAAc,CAAC;AAWtB,UAAU,YAAY;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,MAAM,EAAE,cAAc,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAgFnC,CAAC;AAQF,eAAe,OAAO,CAAC"}
|
package/package.json
CHANGED
package/src/app.tsx
CHANGED
|
@@ -120,8 +120,7 @@ const App = () => {
|
|
|
120
120
|
{/* <RangeSlider initialMinValue={0} initialMaxValue={100} min={0} max={500} sliderWidth={300} onValueChange={console.log}></RangeSlider> */}
|
|
121
121
|
<PhoneInput
|
|
122
122
|
value=""
|
|
123
|
-
|
|
124
|
-
|
|
123
|
+
placeholder="123 456 7890"
|
|
125
124
|
onChangeText={() => {}}
|
|
126
125
|
inputContainerStyle={{ height: 55 }}
|
|
127
126
|
></PhoneInput>
|
|
@@ -139,7 +138,7 @@ const App = () => {
|
|
|
139
138
|
backgroundImage={require("./assets/images/namshi-banner.png")}
|
|
140
139
|
></SelaDealCard>
|
|
141
140
|
*/}
|
|
142
|
-
{/*
|
|
141
|
+
{/*
|
|
143
142
|
<ScratchCard
|
|
144
143
|
backgroundColor={"black"}
|
|
145
144
|
text="Scratch And Win"
|
|
@@ -2,7 +2,7 @@ import React, {
|
|
|
2
2
|
useRef,
|
|
3
3
|
useState,
|
|
4
4
|
useEffect,
|
|
5
|
-
useCallback,
|
|
5
|
+
useCallback, // Import useCallback
|
|
6
6
|
} from "react";
|
|
7
7
|
import {
|
|
8
8
|
Canvas,
|
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
Text,
|
|
17
17
|
useFont,
|
|
18
18
|
notifyChange,
|
|
19
|
-
SkPath,
|
|
20
|
-
SkFont,
|
|
21
|
-
SkImage,
|
|
19
|
+
SkPath, // Import SkPath type
|
|
20
|
+
SkFont, // Import SkFont type
|
|
21
|
+
SkImage, // Import SkImage type
|
|
22
22
|
LinearGradient,
|
|
23
23
|
} from "@shopify/react-native-skia";
|
|
24
24
|
import {
|
|
@@ -41,7 +41,7 @@ type ScratchCardProps = {
|
|
|
41
41
|
image?: ImageRequireSource;
|
|
42
42
|
children?: React.ReactNode;
|
|
43
43
|
brushStrokeWidth?: number;
|
|
44
|
-
revealThreshold?: number;
|
|
44
|
+
revealThreshold?: number; // Percentage (0 to 1) - Based on bounding box
|
|
45
45
|
width?: number;
|
|
46
46
|
height?: number;
|
|
47
47
|
backgroundColor?: string;
|
|
@@ -173,54 +173,6 @@ const ScratchCard: React.FC<ScratchCardProps> = ({
|
|
|
173
173
|
|
|
174
174
|
const canRenderCanvas = isLayoutReady && areaWidth > 0 && areaHeight > 0;
|
|
175
175
|
|
|
176
|
-
const renderScratchContent = () => {
|
|
177
|
-
return (
|
|
178
|
-
<Group>
|
|
179
|
-
{/* Background layer */}
|
|
180
|
-
{gradient ? (
|
|
181
|
-
<Rect x={0} y={0} width={areaWidth} height={areaHeight}>
|
|
182
|
-
<LinearGradient
|
|
183
|
-
start={gradient.start ?? { x: 0, y: 0 }}
|
|
184
|
-
end={gradient.end ?? { x: areaWidth, y: areaHeight }}
|
|
185
|
-
colors={gradient.colors}
|
|
186
|
-
/>
|
|
187
|
-
</Rect>
|
|
188
|
-
) : (
|
|
189
|
-
<Rect
|
|
190
|
-
x={0}
|
|
191
|
-
y={0}
|
|
192
|
-
width={areaWidth}
|
|
193
|
-
height={areaHeight}
|
|
194
|
-
color={backgroundColor}
|
|
195
|
-
/>
|
|
196
|
-
)}
|
|
197
|
-
|
|
198
|
-
{/* Image layer */}
|
|
199
|
-
{loadedImg && (
|
|
200
|
-
<Image
|
|
201
|
-
image={loadedImg}
|
|
202
|
-
fit="contain"
|
|
203
|
-
x={0}
|
|
204
|
-
y={0}
|
|
205
|
-
width={areaWidth}
|
|
206
|
-
height={areaHeight}
|
|
207
|
-
/>
|
|
208
|
-
)}
|
|
209
|
-
|
|
210
|
-
{/* Text layer */}
|
|
211
|
-
{loadedFont && textMetrics && text && (
|
|
212
|
-
<Text
|
|
213
|
-
x={textMetrics.x}
|
|
214
|
-
y={textMetrics.y}
|
|
215
|
-
text={text}
|
|
216
|
-
color={textFontColor}
|
|
217
|
-
font={loadedFont}
|
|
218
|
-
/>
|
|
219
|
-
)}
|
|
220
|
-
</Group>
|
|
221
|
-
);
|
|
222
|
-
};
|
|
223
|
-
|
|
224
176
|
return (
|
|
225
177
|
<GestureHandlerRootView
|
|
226
178
|
style={{ justifyContent: "center", alignContent: "center" }}
|
|
@@ -229,41 +181,83 @@ const ScratchCard: React.FC<ScratchCardProps> = ({
|
|
|
229
181
|
onLayout={handleLayout}
|
|
230
182
|
style={[styles.container, style, { width, height }]}
|
|
231
183
|
>
|
|
232
|
-
{/* Prize content */}
|
|
233
184
|
{canRenderCanvas && <View style={styles.content}>{children}</View>}
|
|
234
185
|
|
|
235
|
-
{/* Scratch overlay with opaque background */}
|
|
236
186
|
{!isScratched && canRenderCanvas && (
|
|
237
|
-
<
|
|
238
|
-
<
|
|
239
|
-
<
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
<
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
187
|
+
<GestureDetector gesture={pan}>
|
|
188
|
+
<Canvas style={styles.canvas}>
|
|
189
|
+
<Mask
|
|
190
|
+
mode="luminance"
|
|
191
|
+
mask={
|
|
192
|
+
<Group>
|
|
193
|
+
<Rect
|
|
194
|
+
x={0}
|
|
195
|
+
y={0}
|
|
196
|
+
width={areaWidth}
|
|
197
|
+
height={areaHeight}
|
|
198
|
+
color="white"
|
|
199
|
+
/>
|
|
200
|
+
<Path
|
|
201
|
+
path={path}
|
|
202
|
+
color="black"
|
|
203
|
+
style="stroke"
|
|
204
|
+
strokeJoin="round"
|
|
205
|
+
strokeCap="round"
|
|
206
|
+
strokeWidth={brushStrokeWidth}
|
|
207
|
+
/>
|
|
208
|
+
</Group>
|
|
209
|
+
}
|
|
210
|
+
>
|
|
211
|
+
{loadedImg ? (
|
|
212
|
+
<Image
|
|
213
|
+
image={loadedImg}
|
|
214
|
+
fit="cover"
|
|
215
|
+
x={0}
|
|
216
|
+
y={0}
|
|
217
|
+
width={areaWidth}
|
|
218
|
+
height={areaHeight}
|
|
219
|
+
/>
|
|
220
|
+
) : gradient ? (
|
|
221
|
+
<Group>
|
|
222
|
+
<LinearGradient
|
|
223
|
+
start={gradient.start ?? { x: 0, y: 0 }}
|
|
224
|
+
end={gradient.end ?? { x: areaWidth, y: areaHeight }}
|
|
225
|
+
colors={gradient.colors}
|
|
226
|
+
></LinearGradient>
|
|
227
|
+
<Rect x={0} y={0} width={areaWidth} height={areaHeight} />
|
|
228
|
+
{loadedFont && textMetrics && text ? (
|
|
229
|
+
<Text
|
|
230
|
+
x={textMetrics.x}
|
|
231
|
+
y={textMetrics.y}
|
|
232
|
+
text={text}
|
|
233
|
+
color={textFontColor}
|
|
234
|
+
font={loadedFont}
|
|
250
235
|
/>
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
236
|
+
) : null}
|
|
237
|
+
</Group>
|
|
238
|
+
) : (
|
|
239
|
+
<Group>
|
|
240
|
+
<Rect
|
|
241
|
+
x={0}
|
|
242
|
+
y={0}
|
|
243
|
+
width={areaWidth}
|
|
244
|
+
height={areaHeight}
|
|
245
|
+
color={backgroundColor}
|
|
246
|
+
/>
|
|
247
|
+
{loadedFont && textMetrics && text ? (
|
|
248
|
+
<Text
|
|
249
|
+
x={textMetrics.x}
|
|
250
|
+
y={textMetrics.y}
|
|
251
|
+
text={text}
|
|
252
|
+
color={textFontColor}
|
|
253
|
+
font={loadedFont}
|
|
258
254
|
/>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
</GestureDetector>
|
|
266
|
-
</View>
|
|
255
|
+
) : null}
|
|
256
|
+
</Group>
|
|
257
|
+
)}
|
|
258
|
+
</Mask>
|
|
259
|
+
</Canvas>
|
|
260
|
+
</GestureDetector>
|
|
267
261
|
)}
|
|
268
262
|
</View>
|
|
269
263
|
</GestureHandlerRootView>
|
|
@@ -283,19 +277,13 @@ const styles = StyleSheet.create({
|
|
|
283
277
|
height: "100%",
|
|
284
278
|
zIndex: 1,
|
|
285
279
|
},
|
|
286
|
-
|
|
280
|
+
canvas: {
|
|
287
281
|
position: "absolute",
|
|
288
282
|
top: 0,
|
|
289
283
|
left: 0,
|
|
290
284
|
width: "100%",
|
|
291
285
|
height: "100%",
|
|
292
|
-
zIndex:
|
|
293
|
-
backgroundColor: "transparent",
|
|
294
|
-
},
|
|
295
|
-
canvas: {
|
|
296
|
-
flex: 1,
|
|
297
|
-
width: "100%",
|
|
298
|
-
height: "100%",
|
|
286
|
+
zIndex: 2,
|
|
299
287
|
},
|
|
300
288
|
});
|
|
301
289
|
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { LinearGradient } from "expo-linear-gradient";
|
|
2
|
-
import React, { useEffect
|
|
2
|
+
import React, { useEffect } from "react";
|
|
3
3
|
import {
|
|
4
|
-
Animated,
|
|
5
4
|
DimensionValue,
|
|
6
|
-
Easing,
|
|
7
5
|
I18nManager,
|
|
8
6
|
LayoutChangeEvent,
|
|
9
7
|
StyleProp,
|
|
@@ -11,6 +9,14 @@ import {
|
|
|
11
9
|
View,
|
|
12
10
|
ViewStyle,
|
|
13
11
|
} from "react-native";
|
|
12
|
+
import Animated, {
|
|
13
|
+
Easing,
|
|
14
|
+
interpolate,
|
|
15
|
+
useAnimatedStyle,
|
|
16
|
+
useSharedValue,
|
|
17
|
+
withRepeat,
|
|
18
|
+
withTiming,
|
|
19
|
+
} from "react-native-reanimated";
|
|
14
20
|
import { useTheme } from "../../theme";
|
|
15
21
|
|
|
16
22
|
interface ShimmerProps {
|
|
@@ -33,40 +39,43 @@ const Shimmer: React.FC<ShimmerProps> = ({
|
|
|
33
39
|
shimmerWidth = 150,
|
|
34
40
|
}) => {
|
|
35
41
|
const { theme } = useTheme();
|
|
36
|
-
const isRTL = I18nManager.isRTL;
|
|
37
|
-
|
|
38
|
-
const [viewWidth, setViewWidth] = useState<number>(0);
|
|
39
|
-
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
+
const layoutWidth = useSharedValue(0);
|
|
44
|
+
const progress = useSharedValue(0);
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
useEffect(() => {
|
|
47
|
+
progress.value = withRepeat(
|
|
48
|
+
withTiming(1, {
|
|
47
49
|
duration: duration,
|
|
48
50
|
easing: Easing.linear,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
}),
|
|
52
|
+
-1,
|
|
53
|
+
false
|
|
51
54
|
);
|
|
52
|
-
|
|
53
|
-
return () => animation.stop();
|
|
54
|
-
}, [animatedValue, duration, viewWidth]);
|
|
55
|
+
}, [duration, progress]);
|
|
55
56
|
|
|
57
|
+
// 3. Update width via shared value (no re-render)
|
|
56
58
|
const handleLayout = (event: LayoutChangeEvent) => {
|
|
57
|
-
|
|
58
|
-
if (width > 0 && Math.round(width) !== Math.round(viewWidth)) {
|
|
59
|
-
setViewWidth(width);
|
|
60
|
-
}
|
|
59
|
+
layoutWidth.value = event.nativeEvent.layout.width;
|
|
61
60
|
};
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
// 4. Calculate translation on the UI thread
|
|
63
|
+
const rStyle = useAnimatedStyle(() => {
|
|
64
|
+
if (layoutWidth.value === 0) {
|
|
65
|
+
return { opacity: 0 };
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const start = -layoutWidth.value;
|
|
69
|
+
const end = layoutWidth.value;
|
|
70
|
+
|
|
71
|
+
const outputRange = I18nManager.isRTL ? [end, start] : [start, end];
|
|
66
72
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
const translateX = interpolate(progress.value, [0, 1], outputRange);
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
opacity: 1,
|
|
77
|
+
transform: [{ translateX }],
|
|
78
|
+
};
|
|
70
79
|
});
|
|
71
80
|
|
|
72
81
|
const gradientColors = [
|
|
@@ -79,35 +88,33 @@ const Shimmer: React.FC<ShimmerProps> = ({
|
|
|
79
88
|
<View
|
|
80
89
|
onLayout={handleLayout}
|
|
81
90
|
style={[
|
|
91
|
+
styles.container,
|
|
82
92
|
{
|
|
83
93
|
width,
|
|
84
94
|
height,
|
|
85
|
-
|
|
86
|
-
backgroundColor: theme.skeletonBackgroundColor,
|
|
95
|
+
backgroundColor: theme.skeletonBackgroundColor || "#E0E0E0",
|
|
87
96
|
},
|
|
88
97
|
style,
|
|
89
98
|
]}
|
|
90
99
|
>
|
|
91
100
|
{children}
|
|
92
101
|
|
|
93
|
-
{
|
|
94
|
-
<
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
<LinearGradient
|
|
102
|
-
colors={gradientColors as any}
|
|
103
|
-
style={{ height: "100%", width: shimmerWidth }}
|
|
104
|
-
start={{ x: 0, y: 0.5 }}
|
|
105
|
-
end={{ x: 1, y: 0.5 }}
|
|
106
|
-
/>
|
|
107
|
-
</Animated.View>
|
|
108
|
-
)}
|
|
102
|
+
<Animated.View style={[StyleSheet.absoluteFill, rStyle, { zIndex: 1 }]}>
|
|
103
|
+
<LinearGradient
|
|
104
|
+
colors={gradientColors as any}
|
|
105
|
+
style={{ height: "100%", width: shimmerWidth }}
|
|
106
|
+
start={{ x: 0, y: 0.5 }}
|
|
107
|
+
end={{ x: 1, y: 0.5 }}
|
|
108
|
+
/>
|
|
109
|
+
</Animated.View>
|
|
109
110
|
</View>
|
|
110
111
|
);
|
|
111
112
|
};
|
|
112
113
|
|
|
114
|
+
const styles = StyleSheet.create({
|
|
115
|
+
container: {
|
|
116
|
+
overflow: "hidden",
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
113
120
|
export default Shimmer;
|