@onekeyfe/react-native-image 3.0.125 → 3.0.127
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 +8 -2
- package/package.json +2 -2
- package/src/index.tsx +8 -0
package/lib/module/index.js
CHANGED
|
@@ -173,18 +173,22 @@ 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 hasBorderWidth = Boolean(flattenedStyle && [flattenedStyle.borderWidth, flattenedStyle.borderTopWidth, flattenedStyle.borderRightWidth, flattenedStyle.borderBottomWidth, flattenedStyle.borderLeftWidth].some(width => typeof width === 'number' && width > 0));
|
|
176
|
+
const hasBorderWidth = Boolean(flattenedStyle && [flattenedStyle.borderWidth, flattenedStyle.borderTopWidth, flattenedStyle.borderRightWidth, flattenedStyle.borderBottomWidth, flattenedStyle.borderLeftWidth, flattenedStyle.borderStartWidth, flattenedStyle.borderEndWidth].some(width => typeof width === 'number' && width > 0));
|
|
177
177
|
const borderOverlayStyle = flattenedStyle && hasRoundedCorners && hasBorderWidth ? {
|
|
178
178
|
borderWidth: flattenedStyle.borderWidth,
|
|
179
179
|
borderTopWidth: flattenedStyle.borderTopWidth,
|
|
180
180
|
borderRightWidth: flattenedStyle.borderRightWidth,
|
|
181
181
|
borderBottomWidth: flattenedStyle.borderBottomWidth,
|
|
182
182
|
borderLeftWidth: flattenedStyle.borderLeftWidth,
|
|
183
|
+
borderStartWidth: flattenedStyle.borderStartWidth,
|
|
184
|
+
borderEndWidth: flattenedStyle.borderEndWidth,
|
|
183
185
|
borderColor: flattenedStyle.borderColor,
|
|
184
186
|
borderTopColor: flattenedStyle.borderTopColor,
|
|
185
187
|
borderRightColor: flattenedStyle.borderRightColor,
|
|
186
188
|
borderBottomColor: flattenedStyle.borderBottomColor,
|
|
187
189
|
borderLeftColor: flattenedStyle.borderLeftColor,
|
|
190
|
+
borderStartColor: flattenedStyle.borderStartColor,
|
|
191
|
+
borderEndColor: flattenedStyle.borderEndColor,
|
|
188
192
|
borderStyle: flattenedStyle.borderStyle,
|
|
189
193
|
borderRadius: flattenedStyle.borderRadius,
|
|
190
194
|
borderTopLeftRadius: flattenedStyle.borderTopLeftRadius,
|
|
@@ -261,7 +265,9 @@ const styles = StyleSheet.create({
|
|
|
261
265
|
borderTopWidth: 0,
|
|
262
266
|
borderRightWidth: 0,
|
|
263
267
|
borderBottomWidth: 0,
|
|
264
|
-
borderLeftWidth: 0
|
|
268
|
+
borderLeftWidth: 0,
|
|
269
|
+
borderStartWidth: 0,
|
|
270
|
+
borderEndWidth: 0
|
|
265
271
|
}
|
|
266
272
|
});
|
|
267
273
|
//# sourceMappingURL=index.js.map
|
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.127",
|
|
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.127",
|
|
85
85
|
"react": "*",
|
|
86
86
|
"react-native": "*",
|
|
87
87
|
"react-native-nitro-modules": "0.37.0"
|
package/src/index.tsx
CHANGED
|
@@ -333,6 +333,8 @@ export function OneKeyImage({
|
|
|
333
333
|
flattenedStyle.borderRightWidth,
|
|
334
334
|
flattenedStyle.borderBottomWidth,
|
|
335
335
|
flattenedStyle.borderLeftWidth,
|
|
336
|
+
flattenedStyle.borderStartWidth,
|
|
337
|
+
flattenedStyle.borderEndWidth,
|
|
336
338
|
].some((width) => typeof width === 'number' && width > 0)
|
|
337
339
|
);
|
|
338
340
|
const borderOverlayStyle =
|
|
@@ -343,11 +345,15 @@ export function OneKeyImage({
|
|
|
343
345
|
borderRightWidth: flattenedStyle.borderRightWidth,
|
|
344
346
|
borderBottomWidth: flattenedStyle.borderBottomWidth,
|
|
345
347
|
borderLeftWidth: flattenedStyle.borderLeftWidth,
|
|
348
|
+
borderStartWidth: flattenedStyle.borderStartWidth,
|
|
349
|
+
borderEndWidth: flattenedStyle.borderEndWidth,
|
|
346
350
|
borderColor: flattenedStyle.borderColor,
|
|
347
351
|
borderTopColor: flattenedStyle.borderTopColor,
|
|
348
352
|
borderRightColor: flattenedStyle.borderRightColor,
|
|
349
353
|
borderBottomColor: flattenedStyle.borderBottomColor,
|
|
350
354
|
borderLeftColor: flattenedStyle.borderLeftColor,
|
|
355
|
+
borderStartColor: flattenedStyle.borderStartColor,
|
|
356
|
+
borderEndColor: flattenedStyle.borderEndColor,
|
|
351
357
|
borderStyle: flattenedStyle.borderStyle,
|
|
352
358
|
borderRadius: flattenedStyle.borderRadius,
|
|
353
359
|
borderTopLeftRadius: flattenedStyle.borderTopLeftRadius,
|
|
@@ -456,5 +462,7 @@ const styles = StyleSheet.create({
|
|
|
456
462
|
borderRightWidth: 0,
|
|
457
463
|
borderBottomWidth: 0,
|
|
458
464
|
borderLeftWidth: 0,
|
|
465
|
+
borderStartWidth: 0,
|
|
466
|
+
borderEndWidth: 0,
|
|
459
467
|
},
|
|
460
468
|
});
|