@sbaiahmed1/react-native-blur 4.6.1-beta.3 → 4.6.1-beta.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/BlurView.js
CHANGED
|
@@ -45,6 +45,8 @@ export const BlurView = ({
|
|
|
45
45
|
ignoreSafeArea,
|
|
46
46
|
reducedTransparencyFallbackColor
|
|
47
47
|
};
|
|
48
|
+
|
|
49
|
+
// If no children, render the blur view directly (for background use)
|
|
48
50
|
if (!Children.count(children)) {
|
|
49
51
|
return /*#__PURE__*/_jsx(ReactNativeBlurView, {
|
|
50
52
|
style: [style, overlay],
|
|
@@ -52,6 +54,8 @@ export const BlurView = ({
|
|
|
52
54
|
...props
|
|
53
55
|
});
|
|
54
56
|
}
|
|
57
|
+
|
|
58
|
+
// If children exist, use the style default for Android
|
|
55
59
|
if (Platform.OS === 'android') {
|
|
56
60
|
return /*#__PURE__*/_jsxs(ReactNativeBlurView, {
|
|
57
61
|
style: style,
|
|
@@ -62,6 +66,8 @@ export const BlurView = ({
|
|
|
62
66
|
}), children]
|
|
63
67
|
});
|
|
64
68
|
}
|
|
69
|
+
|
|
70
|
+
// If children exist, use the absolute positioning pattern for iOS and others
|
|
65
71
|
return /*#__PURE__*/_jsxs(View, {
|
|
66
72
|
style: [styles.container, style, overlay],
|
|
67
73
|
children: [/*#__PURE__*/_jsx(ReactNativeBlurView, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Children","Platform","StyleSheet","View","ReactNativeBlurView","jsx","_jsx","jsxs","_jsxs","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","overlayColor","style","children","ignoreSafeArea","props","overlay","backgroundColor","commonProps","count","OS","absoluteFill","styles","container","create","position","overflow"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;
|
|
1
|
+
{"version":3,"names":["React","Children","Platform","StyleSheet","View","ReactNativeBlurView","jsx","_jsx","jsxs","_jsxs","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","overlayColor","style","children","ignoreSafeArea","props","overlay","backgroundColor","commonProps","count","OS","absoluteFill","styles","container","create","position","overflow"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AACvC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAEzD,OAAOC,mBAAmB,MAEnB,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAuD9C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAiC,GAAGA,CAAC;EAChDC,QAAQ,GAAG,QAAQ;EACnBC,UAAU,GAAG,EAAE;EACfC,gCAAgC,GAAG,SAAS;EAC5CC,YAAY;EACZC,KAAK;EACLC,QAAQ;EACRC,cAAc,GAAG,IAAI;EACrB,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,OAAO,GAAG;IAAEC,eAAe,EAAEN;EAAa,CAAC;EACjD,MAAMO,WAA0B,GAAG;IACjCV,QAAQ;IACRC,UAAU;IACVK,cAAc;IACdJ;EACF,CAAC;;EAED;EACA,IAAI,CAACZ,QAAQ,CAACqB,KAAK,CAACN,QAAQ,CAAC,EAAE;IAC7B,oBACET,IAAA,CAACF,mBAAmB;MAClBU,KAAK,EAAE,CAACA,KAAK,EAAEI,OAAO,CAAE;MAAA,GACpBE,WAAW;MAAA,GACXH;IAAK,CACV,CAAC;EAEN;;EAEA;EACA,IAAIhB,QAAQ,CAACqB,EAAE,KAAK,SAAS,EAAE;IAC7B,oBACEd,KAAA,CAACJ,mBAAmB;MAACU,KAAK,EAAEA,KAAM;MAAA,GAAKM,WAAW;MAAA,GAAMH,KAAK;MAAAF,QAAA,gBAC3DT,IAAA,CAACH,IAAI;QAACW,KAAK,EAAE,CAACZ,UAAU,CAACqB,YAAY,EAAEL,OAAO;MAAE,CAAE,CAAC,EAElDH,QAAQ;IAAA,CACU,CAAC;EAE1B;;EAEA;EACA,oBACEP,KAAA,CAACL,IAAI;IAACW,KAAK,EAAE,CAACU,MAAM,CAACC,SAAS,EAAEX,KAAK,EAAEI,OAAO,CAAE;IAAAH,QAAA,gBAE9CT,IAAA,CAACF,mBAAmB;MAClBU,KAAK,EAAEZ,UAAU,CAACqB,YAAa;MAAA,GAC3BH,WAAW;MAAA,GACXH;IAAK,CACV,CAAC,EACDF,QAAQ;EAAA,CACL,CAAC;AAEX,CAAC;AAED,eAAeN,QAAQ;AAEvB,MAAMe,MAAM,GAAGtB,UAAU,CAACwB,MAAM,CAAC;EAC/BD,SAAS,EAAE;IACTE,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ViewStyle, StyleProp, ColorValue } from 'react-native';
|
|
3
3
|
import { type BlurType } from './ReactNativeBlurViewNativeComponent';
|
|
4
4
|
export interface BlurViewProps {
|
|
5
5
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../src/BlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../src/BlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrE,OAA4B,EAC1B,KAAK,QAAQ,EACd,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,YAAY,CAAC,EAAE,UAAU,CAAC;IAE1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAoD5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
package/package.json
CHANGED
package/src/BlurView.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Children } from 'react';
|
|
2
|
-
import type { ColorValue, StyleProp, ViewStyle } from 'react-native';
|
|
3
2
|
import { Platform, StyleSheet, View } from 'react-native';
|
|
3
|
+
import type { ViewStyle, StyleProp, ColorValue } from 'react-native';
|
|
4
4
|
import ReactNativeBlurView, {
|
|
5
5
|
type BlurType,
|
|
6
6
|
} from './ReactNativeBlurViewNativeComponent';
|
|
@@ -98,6 +98,7 @@ export const BlurView: React.FC<BlurViewProps> = ({
|
|
|
98
98
|
reducedTransparencyFallbackColor,
|
|
99
99
|
};
|
|
100
100
|
|
|
101
|
+
// If no children, render the blur view directly (for background use)
|
|
101
102
|
if (!Children.count(children)) {
|
|
102
103
|
return (
|
|
103
104
|
<ReactNativeBlurView
|
|
@@ -108,6 +109,7 @@ export const BlurView: React.FC<BlurViewProps> = ({
|
|
|
108
109
|
);
|
|
109
110
|
}
|
|
110
111
|
|
|
112
|
+
// If children exist, use the style default for Android
|
|
111
113
|
if (Platform.OS === 'android') {
|
|
112
114
|
return (
|
|
113
115
|
<ReactNativeBlurView style={style} {...commonProps} {...props}>
|
|
@@ -118,8 +120,10 @@ export const BlurView: React.FC<BlurViewProps> = ({
|
|
|
118
120
|
);
|
|
119
121
|
}
|
|
120
122
|
|
|
123
|
+
// If children exist, use the absolute positioning pattern for iOS and others
|
|
121
124
|
return (
|
|
122
125
|
<View style={[styles.container, style, overlay]}>
|
|
126
|
+
{/* Blur effect positioned absolutely behind content */}
|
|
123
127
|
<ReactNativeBlurView
|
|
124
128
|
style={StyleSheet.absoluteFill}
|
|
125
129
|
{...commonProps}
|