@onekeyfe/react-native-image 3.0.135 → 3.0.136
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/index.js +2 -3
- package/package.json +2 -2
- package/src/index.tsx +2 -14
package/lib/module/index.js
CHANGED
|
@@ -173,8 +173,7 @@ export function OneKeyImage({
|
|
|
173
173
|
const flattenedStyle = StyleSheet.flatten(style);
|
|
174
174
|
const hasRoundedCorners = Boolean(flattenedStyle && [flattenedStyle.borderRadius, flattenedStyle.borderTopLeftRadius, flattenedStyle.borderTopRightRadius, flattenedStyle.borderBottomLeftRadius, flattenedStyle.borderBottomRightRadius, flattenedStyle.borderStartStartRadius, flattenedStyle.borderStartEndRadius, flattenedStyle.borderEndStartRadius, flattenedStyle.borderEndEndRadius].some(radius => typeof radius === 'number' && radius > 0));
|
|
175
175
|
const shouldWrapNative = hasOverlay || hasRoundedCorners;
|
|
176
|
-
const
|
|
177
|
-
const borderOverlayStyle = flattenedStyle && hasRoundedCorners && hasBorderWidth ? {
|
|
176
|
+
const borderOverlayStyle = flattenedStyle && hasRoundedCorners ? {
|
|
178
177
|
borderWidth: flattenedStyle.borderWidth,
|
|
179
178
|
borderTopWidth: flattenedStyle.borderTopWidth,
|
|
180
179
|
borderRightWidth: flattenedStyle.borderRightWidth,
|
|
@@ -220,7 +219,7 @@ export function OneKeyImage({
|
|
|
220
219
|
});
|
|
221
220
|
if (!shouldWrapNative) return native;
|
|
222
221
|
return /*#__PURE__*/_jsxs(View, {
|
|
223
|
-
style: [style, styles.overlayContainer,
|
|
222
|
+
style: [style, styles.overlayContainer, hasRoundedCorners ? styles.borderlessContainer : undefined],
|
|
224
223
|
collapsable: false,
|
|
225
224
|
children: [native, effectiveState === 'loading' && placeholder != null ? /*#__PURE__*/_jsx(View, {
|
|
226
225
|
pointerEvents: "none",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-image",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.136",
|
|
4
4
|
"description": "High-performance native image view for OneKey",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"typescript": "^5.9.2"
|
|
82
82
|
},
|
|
83
83
|
"peerDependencies": {
|
|
84
|
-
"@onekeyfe/react-native-skeleton": "3.0.
|
|
84
|
+
"@onekeyfe/react-native-skeleton": "3.0.136",
|
|
85
85
|
"react": "*",
|
|
86
86
|
"react-native": "*",
|
|
87
87
|
"react-native-nitro-modules": "0.37.0"
|
package/src/index.tsx
CHANGED
|
@@ -325,20 +325,8 @@ export function OneKeyImage({
|
|
|
325
325
|
].some((radius) => typeof radius === 'number' && radius > 0)
|
|
326
326
|
);
|
|
327
327
|
const shouldWrapNative = hasOverlay || hasRoundedCorners;
|
|
328
|
-
const hasBorderWidth = Boolean(
|
|
329
|
-
flattenedStyle &&
|
|
330
|
-
[
|
|
331
|
-
flattenedStyle.borderWidth,
|
|
332
|
-
flattenedStyle.borderTopWidth,
|
|
333
|
-
flattenedStyle.borderRightWidth,
|
|
334
|
-
flattenedStyle.borderBottomWidth,
|
|
335
|
-
flattenedStyle.borderLeftWidth,
|
|
336
|
-
flattenedStyle.borderStartWidth,
|
|
337
|
-
flattenedStyle.borderEndWidth,
|
|
338
|
-
].some((width) => typeof width === 'number' && width > 0)
|
|
339
|
-
);
|
|
340
328
|
const borderOverlayStyle =
|
|
341
|
-
flattenedStyle && hasRoundedCorners
|
|
329
|
+
flattenedStyle && hasRoundedCorners
|
|
342
330
|
? {
|
|
343
331
|
borderWidth: flattenedStyle.borderWidth,
|
|
344
332
|
borderTopWidth: flattenedStyle.borderTopWidth,
|
|
@@ -396,7 +384,7 @@ export function OneKeyImage({
|
|
|
396
384
|
style={[
|
|
397
385
|
style,
|
|
398
386
|
styles.overlayContainer,
|
|
399
|
-
|
|
387
|
+
hasRoundedCorners ? styles.borderlessContainer : undefined,
|
|
400
388
|
]}
|
|
401
389
|
collapsable={false}
|
|
402
390
|
>
|