@sbaiahmed1/react-native-blur 4.0.0 → 4.1.0
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/README.md +155 -47
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/BlurType.kt +63 -0
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurPackage.kt +1 -0
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +63 -43
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurViewManager.kt +14 -26
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurView.kt +320 -0
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurViewManager.kt +81 -0
- package/ios/Helpers/BlurStyleHelpers.swift +20 -0
- package/ios/Helpers/ReactNativeProgressiveBlurViewHelper.swift +39 -0
- package/ios/ReactNativeLiquidGlassView.mm +8 -1
- package/ios/ReactNativeProgressiveBlurView.h +14 -0
- package/ios/ReactNativeProgressiveBlurView.mm +213 -0
- package/ios/ReactNativeProgressiveBlurViewManager.h +4 -0
- package/ios/ReactNativeProgressiveBlurViewManager.mm +137 -0
- package/ios/Views/LiquidGlassContainerView.swift +8 -30
- package/ios/Views/ProgressiveBlurView.swift +124 -0
- package/ios/Views/VariableBlurView.swift +142 -0
- package/lib/module/BlurView.js +23 -12
- package/lib/module/BlurView.js.map +1 -1
- package/lib/module/LiquidGlassView.js +3 -1
- package/lib/module/LiquidGlassView.js.map +1 -1
- package/lib/module/ProgressiveBlurView.js +98 -0
- package/lib/module/ProgressiveBlurView.js.map +1 -0
- package/lib/module/ReactNativeBlurViewNativeComponent.ts +11 -1
- package/lib/module/ReactNativeProgressiveBlurViewNativeComponent.ts +45 -0
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/src/BlurView.d.ts.map +1 -1
- package/lib/typescript/src/LiquidGlassView.d.ts.map +1 -1
- package/lib/typescript/src/ProgressiveBlurView.d.ts +97 -0
- package/lib/typescript/src/ProgressiveBlurView.d.ts.map +1 -0
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts +1 -1
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts +14 -0
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/BlurView.tsx +21 -17
- package/src/LiquidGlassView.tsx +3 -4
- package/src/ProgressiveBlurView.tsx +161 -0
- package/src/ReactNativeBlurViewNativeComponent.ts +11 -1
- package/src/ReactNativeProgressiveBlurViewNativeComponent.ts +45 -0
- package/src/index.tsx +6 -0
package/lib/module/BlurView.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import React, { Children } from 'react';
|
|
4
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
5
5
|
import ReactNativeBlurView from './ReactNativeBlurViewNativeComponent';
|
|
6
6
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
7
|
/**
|
|
@@ -35,27 +35,38 @@ export const BlurView = ({
|
|
|
35
35
|
ignoreSafeArea = false,
|
|
36
36
|
...props
|
|
37
37
|
}) => {
|
|
38
|
+
const commonProps = {
|
|
39
|
+
blurType,
|
|
40
|
+
blurAmount,
|
|
41
|
+
ignoreSafeArea,
|
|
42
|
+
reducedTransparencyFallbackColor
|
|
43
|
+
};
|
|
44
|
+
|
|
38
45
|
// If no children, render the blur view directly (for background use)
|
|
39
|
-
if (
|
|
46
|
+
if (!Children.count(children)) {
|
|
40
47
|
return /*#__PURE__*/_jsx(ReactNativeBlurView, {
|
|
41
|
-
ignoreSafeArea: ignoreSafeArea,
|
|
42
|
-
blurType: blurType,
|
|
43
|
-
blurAmount: blurAmount,
|
|
44
|
-
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
45
48
|
style: style,
|
|
49
|
+
...commonProps,
|
|
46
50
|
...props
|
|
47
51
|
});
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
// If children exist, use the
|
|
54
|
+
// If children exist, use the style default for Android
|
|
55
|
+
if (Platform.OS === 'android') {
|
|
56
|
+
return /*#__PURE__*/_jsx(ReactNativeBlurView, {
|
|
57
|
+
style: style,
|
|
58
|
+
...commonProps,
|
|
59
|
+
...props,
|
|
60
|
+
children: children
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// If children exist, use the absolute positioning pattern for iOS and others
|
|
51
65
|
return /*#__PURE__*/_jsxs(View, {
|
|
52
66
|
style: [styles.container, style],
|
|
53
67
|
children: [/*#__PURE__*/_jsx(ReactNativeBlurView, {
|
|
54
|
-
ignoreSafeArea: ignoreSafeArea,
|
|
55
|
-
blurType: blurType,
|
|
56
|
-
blurAmount: blurAmount,
|
|
57
|
-
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
58
68
|
style: StyleSheet.absoluteFill,
|
|
69
|
+
...commonProps,
|
|
59
70
|
...props
|
|
60
71
|
}), /*#__PURE__*/_jsx(View, {
|
|
61
72
|
style: styles.children,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","StyleSheet","View","ReactNativeBlurView","jsx","_jsx","jsxs","_jsxs","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","style","children","ignoreSafeArea","props","
|
|
1
|
+
{"version":3,"names":["React","Children","Platform","StyleSheet","View","ReactNativeBlurView","jsx","_jsx","jsxs","_jsxs","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","style","children","ignoreSafeArea","props","commonProps","count","OS","styles","container","absoluteFill","create","position","overflow","zIndex"],"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;AAgD9C;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,KAAK;EACLC,QAAQ;EACRC,cAAc,GAAG,KAAK;EACtB,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,WAA0B,GAAG;IACjCP,QAAQ;IACRC,UAAU;IACVI,cAAc;IACdH;EACF,CAAC;;EAED;EACA,IAAI,CAACZ,QAAQ,CAACkB,KAAK,CAACJ,QAAQ,CAAC,EAAE;IAC7B,oBAAOR,IAAA,CAACF,mBAAmB;MAACS,KAAK,EAAEA,KAAM;MAAA,GAAKI,WAAW;MAAA,GAAMD;IAAK,CAAG,CAAC;EAC1E;;EAEA;EACA,IAAIf,QAAQ,CAACkB,EAAE,KAAK,SAAS,EAAE;IAC7B,oBACEb,IAAA,CAACF,mBAAmB;MAACS,KAAK,EAAEA,KAAM;MAAA,GAAKI,WAAW;MAAA,GAAMD,KAAK;MAAAF,QAAA,EAC1DA;IAAQ,CACU,CAAC;EAE1B;;EAEA;EACA,oBACEN,KAAA,CAACL,IAAI;IAACU,KAAK,EAAE,CAACO,MAAM,CAACC,SAAS,EAAER,KAAK,CAAE;IAAAC,QAAA,gBAErCR,IAAA,CAACF,mBAAmB;MAClBS,KAAK,EAAEX,UAAU,CAACoB,YAAa;MAAA,GAC3BL,WAAW;MAAA,GACXD;IAAK,CACV,CAAC,eAEFV,IAAA,CAACH,IAAI;MAACU,KAAK,EAAEO,MAAM,CAACN,QAAS;MAAAA,QAAA,EAAEA;IAAQ,CAAO,CAAC;EAAA,CAC3C,CAAC;AAEX,CAAC;AAED,eAAeL,QAAQ;AAEvB,MAAMW,MAAM,GAAGlB,UAAU,CAACqB,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDX,QAAQ,EAAE;IACRU,QAAQ,EAAE,UAAU;IACpBE,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -48,8 +48,10 @@ export const LiquidGlassView = ({
|
|
|
48
48
|
children,
|
|
49
49
|
...props
|
|
50
50
|
}) => {
|
|
51
|
+
const isIos = Platform.OS === 'ios';
|
|
52
|
+
|
|
51
53
|
// Only render on iOS 26+ (fallback otherwise)
|
|
52
|
-
if (
|
|
54
|
+
if (!isIos || isIos && Number.parseInt(String(Platform.Version), 10) < 26) {
|
|
53
55
|
console.warn('LiquidGlassView is only supported on iOS. Rendering children without glass effect.');
|
|
54
56
|
return /*#__PURE__*/_jsx(BlurView, {
|
|
55
57
|
blurAmount: 70,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Platform","ReactNativeLiquidGlassView","BlurView","jsx","_jsx","LiquidGlassView","glassType","glassTintColor","glassOpacity","reducedTransparencyFallbackColor","isInteractive","ignoreSafeArea","style","children","props","OS","parseInt","Version","console","warn","blurAmount"],"sourceRoot":"../../src","sources":["LiquidGlassView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,0BAA0B,MAE1B,6CAA6C;AACpD,OAAOC,QAAQ,MAAM,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwDlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAA+C,GAAGA,CAAC;EAC9DC,SAAS,GAAG,OAAO;EACnBC,cAAc,GAAG,OAAO;EACxBC,YAAY,GAAG,GAAG;EAClBC,gCAAgC,GAAG,SAAS;EAC5CC,aAAa,GAAG,IAAI;EACpBC,cAAc,GAAG,KAAK;EACtBC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACL,CAAC,KAAK;EACJ
|
|
1
|
+
{"version":3,"names":["React","Platform","ReactNativeLiquidGlassView","BlurView","jsx","_jsx","LiquidGlassView","glassType","glassTintColor","glassOpacity","reducedTransparencyFallbackColor","isInteractive","ignoreSafeArea","style","children","props","isIos","OS","Number","parseInt","String","Version","console","warn","blurAmount"],"sourceRoot":"../../src","sources":["LiquidGlassView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,cAAc;AAEvC,OAAOC,0BAA0B,MAE1B,6CAA6C;AACpD,OAAOC,QAAQ,MAAM,eAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAwDlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAA+C,GAAGA,CAAC;EAC9DC,SAAS,GAAG,OAAO;EACnBC,cAAc,GAAG,OAAO;EACxBC,YAAY,GAAG,GAAG;EAClBC,gCAAgC,GAAG,SAAS;EAC5CC,aAAa,GAAG,IAAI;EACpBC,cAAc,GAAG,KAAK;EACtBC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACL,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAGf,QAAQ,CAACgB,EAAE,KAAK,KAAK;;EAEnC;EACA,IAAI,CAACD,KAAK,IAAKA,KAAK,IAAIE,MAAM,CAACC,QAAQ,CAACC,MAAM,CAACnB,QAAQ,CAACoB,OAAO,CAAC,EAAE,EAAE,CAAC,GAAG,EAAG,EAAE;IAC3EC,OAAO,CAACC,IAAI,CACV,oFACF,CAAC;IACD,oBACElB,IAAA,CAACF,QAAQ;MAACqB,UAAU,EAAE,EAAG;MAACX,KAAK,EAAEA,KAAM;MAAAC,QAAA,EACpCA;IAAQ,CACD,CAAC;EAEf;;EAEA;EACA,oBACET,IAAA,CAACH,0BAA0B;IACzBK,SAAS,EAAEA,SAAU;IACrBC,cAAc,EAAEA,cAAe;IAC/BC,YAAY,EAAEA,YAAa;IAC3BC,gCAAgC,EAAEA,gCAAiC;IACnEC,aAAa,EAAEA,aAAc;IAC7BC,cAAc,EAAEA,cAAe;IAC/BC,KAAK,EAAEA,KAAM;IAAA,GACTE,KAAK;IAAAD,QAAA,EAERA;EAAQ,CACiB,CAAC;AAEjC,CAAC;AAED,eAAeR,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { StyleSheet, View } from 'react-native';
|
|
5
|
+
import ReactNativeProgressiveBlurView from './ReactNativeProgressiveBlurViewNativeComponent';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* A progressive blur view component that provides variable/gradient blur effects.
|
|
9
|
+
*
|
|
10
|
+
* This component applies a blur effect that gradually changes intensity across the view,
|
|
11
|
+
* creating a smooth gradient from fully blurred to clear (or vice versa).
|
|
12
|
+
*
|
|
13
|
+
* **Platform Support:**
|
|
14
|
+
* - iOS: Full support using private Core Animation filters
|
|
15
|
+
* - Android: Supported using QmBlurView's ProgressiveBlurView
|
|
16
|
+
*
|
|
17
|
+
* This component uses the same positioning pattern as BlurView where the blur
|
|
18
|
+
* effect is positioned absolutely behind the content.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // Blur that fades from top (blurred) to bottom (clear)
|
|
23
|
+
* <ProgressiveBlurView
|
|
24
|
+
* blurType="light"
|
|
25
|
+
* blurAmount={30}
|
|
26
|
+
* direction="blurredTopClearBottom"
|
|
27
|
+
* startOffset={0.2}
|
|
28
|
+
* style={{ height: 200 }}
|
|
29
|
+
* >
|
|
30
|
+
* <Text>Content on top of progressive blur</Text>
|
|
31
|
+
* </ProgressiveBlurView>
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* // Blur that fades from bottom (blurred) to top (clear)
|
|
37
|
+
* <ProgressiveBlurView
|
|
38
|
+
* blurType="dark"
|
|
39
|
+
* blurAmount={40}
|
|
40
|
+
* direction="blurredBottomClearTop"
|
|
41
|
+
* style={{ height: 200 }}
|
|
42
|
+
* >
|
|
43
|
+
* <Text>Content visible at top, blurred at bottom</Text>
|
|
44
|
+
* </ProgressiveBlurView>
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export const ProgressiveBlurView = ({
|
|
48
|
+
blurType = 'regular',
|
|
49
|
+
blurAmount = 20,
|
|
50
|
+
direction = 'blurredTopClearBottom',
|
|
51
|
+
startOffset = 0.0,
|
|
52
|
+
reducedTransparencyFallbackColor = '#FFFFFF',
|
|
53
|
+
style,
|
|
54
|
+
children,
|
|
55
|
+
...props
|
|
56
|
+
}) => {
|
|
57
|
+
// If no children, render the blur view directly (for background use)
|
|
58
|
+
if (React.Children.count(children) === 0) {
|
|
59
|
+
return /*#__PURE__*/_jsx(ReactNativeProgressiveBlurView, {
|
|
60
|
+
blurType: blurType,
|
|
61
|
+
blurAmount: blurAmount,
|
|
62
|
+
direction: direction,
|
|
63
|
+
startOffset: startOffset,
|
|
64
|
+
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
65
|
+
style: style,
|
|
66
|
+
...props
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// If children exist, use the absolute positioning pattern
|
|
71
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
72
|
+
style: [styles.container, style],
|
|
73
|
+
children: [/*#__PURE__*/_jsx(ReactNativeProgressiveBlurView, {
|
|
74
|
+
blurType: blurType,
|
|
75
|
+
blurAmount: blurAmount,
|
|
76
|
+
direction: direction,
|
|
77
|
+
startOffset: startOffset,
|
|
78
|
+
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
79
|
+
style: StyleSheet.absoluteFill,
|
|
80
|
+
...props
|
|
81
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
82
|
+
style: styles.children,
|
|
83
|
+
children: children
|
|
84
|
+
})]
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
export default ProgressiveBlurView;
|
|
88
|
+
const styles = StyleSheet.create({
|
|
89
|
+
container: {
|
|
90
|
+
position: 'relative',
|
|
91
|
+
overflow: 'hidden'
|
|
92
|
+
},
|
|
93
|
+
children: {
|
|
94
|
+
position: 'relative',
|
|
95
|
+
zIndex: 1
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=ProgressiveBlurView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","StyleSheet","View","ReactNativeProgressiveBlurView","jsx","_jsx","jsxs","_jsxs","ProgressiveBlurView","blurType","blurAmount","direction","startOffset","reducedTransparencyFallbackColor","style","children","props","Children","count","styles","container","absoluteFill","create","position","overflow","zIndex"],"sourceRoot":"../../src","sources":["ProgressiveBlurView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAE/C,OAAOC,8BAA8B,MAG9B,iDAAiD;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AA4DzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAuD,GAAGA,CAAC;EACtEC,QAAQ,GAAG,SAAS;EACpBC,UAAU,GAAG,EAAE;EACfC,SAAS,GAAG,uBAAuB;EACnCC,WAAW,GAAG,GAAG;EACjBC,gCAAgC,GAAG,SAAS;EAC5CC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACL,CAAC,KAAK;EACJ;EACA,IAAIhB,KAAK,CAACiB,QAAQ,CAACC,KAAK,CAACH,QAAQ,CAAC,KAAK,CAAC,EAAE;IACxC,oBACEV,IAAA,CAACF,8BAA8B;MAC7BM,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,SAAS,EAAEA,SAAU;MACrBC,WAAW,EAAEA,WAAY;MACzBC,gCAAgC,EAAEA,gCAAiC;MACnEC,KAAK,EAAEA,KAAM;MAAA,GACTE;IAAK,CACV,CAAC;EAEN;;EAEA;EACA,oBACET,KAAA,CAACL,IAAI;IAACY,KAAK,EAAE,CAACK,MAAM,CAACC,SAAS,EAAEN,KAAK,CAAE;IAAAC,QAAA,gBAErCV,IAAA,CAACF,8BAA8B;MAC7BM,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,SAAS,EAAEA,SAAU;MACrBC,WAAW,EAAEA,WAAY;MACzBC,gCAAgC,EAAEA,gCAAiC;MACnEC,KAAK,EAAEb,UAAU,CAACoB,YAAa;MAAA,GAC3BL;IAAK,CACV,CAAC,eACFX,IAAA,CAACH,IAAI;MAACY,KAAK,EAAEK,MAAM,CAACJ,QAAS;MAAAA,QAAA,EAAEA;IAAQ,CAAO,CAAC;EAAA,CAC3C,CAAC;AAEX,CAAC;AAED,eAAeP,mBAAmB;AAElC,MAAMW,MAAM,GAAGlB,UAAU,CAACqB,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,QAAQ,EAAE,UAAU;IACpBC,QAAQ,EAAE;EACZ,CAAC;EACDT,QAAQ,EAAE;IACRQ,QAAQ,EAAE,UAAU;IACpBE,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -16,7 +16,17 @@ export type BlurType =
|
|
|
16
16
|
| 'systemThinMaterial'
|
|
17
17
|
| 'systemMaterial'
|
|
18
18
|
| 'systemThickMaterial'
|
|
19
|
-
| 'systemChromeMaterial'
|
|
19
|
+
| 'systemChromeMaterial'
|
|
20
|
+
| 'systemUltraThinMaterialLight'
|
|
21
|
+
| 'systemThinMaterialLight'
|
|
22
|
+
| 'systemMaterialLight'
|
|
23
|
+
| 'systemThickMaterialLight'
|
|
24
|
+
| 'systemChromeMaterialLight'
|
|
25
|
+
| 'systemUltraThinMaterialDark'
|
|
26
|
+
| 'systemThinMaterialDark'
|
|
27
|
+
| 'systemMaterialDark'
|
|
28
|
+
| 'systemThickMaterialDark'
|
|
29
|
+
| 'systemChromeMaterialDark';
|
|
20
30
|
|
|
21
31
|
interface NativeProps extends ViewProps {
|
|
22
32
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
WithDefault,
|
|
5
|
+
Double,
|
|
6
|
+
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
|
|
8
|
+
export type BlurType =
|
|
9
|
+
| 'xlight'
|
|
10
|
+
| 'light'
|
|
11
|
+
| 'dark'
|
|
12
|
+
| 'extraDark'
|
|
13
|
+
| 'regular'
|
|
14
|
+
| 'prominent'
|
|
15
|
+
| 'systemUltraThinMaterial'
|
|
16
|
+
| 'systemThinMaterial'
|
|
17
|
+
| 'systemMaterial'
|
|
18
|
+
| 'systemThickMaterial'
|
|
19
|
+
| 'systemChromeMaterial'
|
|
20
|
+
| 'systemUltraThinMaterialLight'
|
|
21
|
+
| 'systemThinMaterialLight'
|
|
22
|
+
| 'systemMaterialLight'
|
|
23
|
+
| 'systemThickMaterialLight'
|
|
24
|
+
| 'systemChromeMaterialLight'
|
|
25
|
+
| 'systemUltraThinMaterialDark'
|
|
26
|
+
| 'systemThinMaterialDark'
|
|
27
|
+
| 'systemMaterialDark'
|
|
28
|
+
| 'systemThickMaterialDark'
|
|
29
|
+
| 'systemChromeMaterialDark';
|
|
30
|
+
|
|
31
|
+
export type ProgressiveBlurDirection =
|
|
32
|
+
| 'blurredTopClearBottom'
|
|
33
|
+
| 'blurredBottomClearTop';
|
|
34
|
+
|
|
35
|
+
interface NativeProps extends ViewProps {
|
|
36
|
+
blurAmount?: WithDefault<Double, 20.0>;
|
|
37
|
+
blurType?: WithDefault<BlurType, 'regular'>;
|
|
38
|
+
direction?: WithDefault<ProgressiveBlurDirection, 'blurredTopClearBottom'>;
|
|
39
|
+
startOffset?: WithDefault<Double, 0.0>;
|
|
40
|
+
reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export default codegenNativeComponent<NativeProps>(
|
|
44
|
+
'ReactNativeProgressiveBlurView'
|
|
45
|
+
);
|
package/lib/module/index.js
CHANGED
|
@@ -5,4 +5,6 @@ export * from './ReactNativeBlurViewNativeComponent';
|
|
|
5
5
|
export { BlurView as default, BlurView } from "./BlurView.js";
|
|
6
6
|
export { default as ReactNativeLiquidGlassView } from './ReactNativeLiquidGlassViewNativeComponent';
|
|
7
7
|
export { LiquidGlassView } from "./LiquidGlassView.js";
|
|
8
|
+
export { default as ReactNativeProgressiveBlurView } from './ReactNativeProgressiveBlurViewNativeComponent';
|
|
9
|
+
export { ProgressiveBlurView } from "./ProgressiveBlurView.js";
|
|
8
10
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","ReactNativeBlurView","BlurView","ReactNativeLiquidGlassView","LiquidGlassView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,mBAAmB,QAAQ,sCAAsC;AACrF,cAAc,sCAAsC;AAEpD,SAASC,QAAQ,IAAIF,OAAO,EAAEE,QAAQ,QAAQ,eAAY;AAG1D,SAASF,OAAO,IAAIG,0BAA0B,QAAQ,6CAA6C;AAGnG,SAASC,eAAe,QAAQ,sBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["default","ReactNativeBlurView","BlurView","ReactNativeLiquidGlassView","LiquidGlassView","ReactNativeProgressiveBlurView","ProgressiveBlurView"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,mBAAmB,QAAQ,sCAAsC;AACrF,cAAc,sCAAsC;AAEpD,SAASC,QAAQ,IAAIF,OAAO,EAAEE,QAAQ,QAAQ,eAAY;AAG1D,SAASF,OAAO,IAAIG,0BAA0B,QAAQ,6CAA6C;AAGnG,SAASC,eAAe,QAAQ,sBAAmB;AAGnD,SAASJ,OAAO,IAAIK,8BAA8B,QAAQ,iDAAiD;AAG3G,SAASC,mBAAmB,QAAQ,0BAAuB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../src/BlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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,MAAM,cAAc,CAAC;AACzD,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,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,CA2C5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LiquidGlassView.d.ts","sourceRoot":"","sources":["../../../src/LiquidGlassView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAmC,EACjC,KAAK,SAAS,EACf,MAAM,6CAA6C,CAAC;AAGrD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;;;;;OAKnB,CAAC;IACJ,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"LiquidGlassView.d.ts","sourceRoot":"","sources":["../../../src/LiquidGlassView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAmC,EACjC,KAAK,SAAS,EACf,MAAM,6CAA6C,CAAC;AAGrD,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;;;;;OAKnB,CAAC;IACJ,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;;OAKG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAwC1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewStyle, StyleProp } from 'react-native';
|
|
3
|
+
import { type BlurType, type ProgressiveBlurDirection } from './ReactNativeProgressiveBlurViewNativeComponent';
|
|
4
|
+
export interface ProgressiveBlurViewProps {
|
|
5
|
+
/**
|
|
6
|
+
* @description The type of blur effect to apply
|
|
7
|
+
*
|
|
8
|
+
* @default 'regular'
|
|
9
|
+
*/
|
|
10
|
+
blurType?: BlurType;
|
|
11
|
+
/**
|
|
12
|
+
* @description The maximum intensity of the blur effect (in pixels)
|
|
13
|
+
* This is the blur radius at the most blurred part of the gradient
|
|
14
|
+
*
|
|
15
|
+
* @default 20
|
|
16
|
+
*/
|
|
17
|
+
blurAmount?: number;
|
|
18
|
+
/**
|
|
19
|
+
* @description The direction of the progressive blur gradient
|
|
20
|
+
* - 'blurredTopClearBottom': Blur starts at top, clear at bottom
|
|
21
|
+
* - 'blurredBottomClearTop': Blur starts at bottom, clear at top
|
|
22
|
+
*
|
|
23
|
+
* @default 'blurredTopClearBottom'
|
|
24
|
+
*/
|
|
25
|
+
direction?: ProgressiveBlurDirection;
|
|
26
|
+
/**
|
|
27
|
+
* @description The offset where the gradient starts (0.0 to 1.0)
|
|
28
|
+
* 0.0 means the gradient starts immediately
|
|
29
|
+
* 1.0 means the gradient is delayed to the end
|
|
30
|
+
*
|
|
31
|
+
* @default 0.0
|
|
32
|
+
*/
|
|
33
|
+
startOffset?: number;
|
|
34
|
+
/**
|
|
35
|
+
* @description Fallback color when reduced transparency is enabled
|
|
36
|
+
*
|
|
37
|
+
* Accepts hex color strings like `#FFFFFF`
|
|
38
|
+
*
|
|
39
|
+
* @default '#FFFFFF'
|
|
40
|
+
*/
|
|
41
|
+
reducedTransparencyFallbackColor?: string;
|
|
42
|
+
/**
|
|
43
|
+
* @description style object for the progressive blur view
|
|
44
|
+
*
|
|
45
|
+
* @default undefined
|
|
46
|
+
*/
|
|
47
|
+
style?: StyleProp<ViewStyle>;
|
|
48
|
+
/**
|
|
49
|
+
* @description Child components to render inside the progressive blur view
|
|
50
|
+
*
|
|
51
|
+
* @default undefined
|
|
52
|
+
*/
|
|
53
|
+
children?: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* A progressive blur view component that provides variable/gradient blur effects.
|
|
57
|
+
*
|
|
58
|
+
* This component applies a blur effect that gradually changes intensity across the view,
|
|
59
|
+
* creating a smooth gradient from fully blurred to clear (or vice versa).
|
|
60
|
+
*
|
|
61
|
+
* **Platform Support:**
|
|
62
|
+
* - iOS: Full support using private Core Animation filters
|
|
63
|
+
* - Android: Supported using QmBlurView's ProgressiveBlurView
|
|
64
|
+
*
|
|
65
|
+
* This component uses the same positioning pattern as BlurView where the blur
|
|
66
|
+
* effect is positioned absolutely behind the content.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* // Blur that fades from top (blurred) to bottom (clear)
|
|
71
|
+
* <ProgressiveBlurView
|
|
72
|
+
* blurType="light"
|
|
73
|
+
* blurAmount={30}
|
|
74
|
+
* direction="blurredTopClearBottom"
|
|
75
|
+
* startOffset={0.2}
|
|
76
|
+
* style={{ height: 200 }}
|
|
77
|
+
* >
|
|
78
|
+
* <Text>Content on top of progressive blur</Text>
|
|
79
|
+
* </ProgressiveBlurView>
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* ```tsx
|
|
84
|
+
* // Blur that fades from bottom (blurred) to top (clear)
|
|
85
|
+
* <ProgressiveBlurView
|
|
86
|
+
* blurType="dark"
|
|
87
|
+
* blurAmount={40}
|
|
88
|
+
* direction="blurredBottomClearTop"
|
|
89
|
+
* style={{ height: 200 }}
|
|
90
|
+
* >
|
|
91
|
+
* <Text>Content visible at top, blurred at bottom</Text>
|
|
92
|
+
* </ProgressiveBlurView>
|
|
93
|
+
* ```
|
|
94
|
+
*/
|
|
95
|
+
export declare const ProgressiveBlurView: React.FC<ProgressiveBlurViewProps>;
|
|
96
|
+
export default ProgressiveBlurView;
|
|
97
|
+
//# sourceMappingURL=ProgressiveBlurView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressiveBlurView.d.ts","sourceRoot":"","sources":["../../../src/ProgressiveBlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAuC,EACrC,KAAK,QAAQ,EACb,KAAK,wBAAwB,EAC9B,MAAM,iDAAiD,CAAC;AAEzD,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,wBAAwB,CAAC;IAErC;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;OAMG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAyClE,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { WithDefault, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
export type BlurType = 'xlight' | 'light' | 'dark' | 'extraDark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial';
|
|
3
|
+
export type BlurType = 'xlight' | 'light' | 'dark' | 'extraDark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
4
4
|
interface NativeProps extends ViewProps {
|
|
5
5
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
6
6
|
blurType?: WithDefault<BlurType, 'xlight'>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeBlurViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/ReactNativeBlurViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACP,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,WAAW,GACX,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ReactNativeBlurViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/ReactNativeBlurViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACP,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,WAAW,GACX,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,yBAAyB,GACzB,qBAAqB,GACrB,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GACxB,oBAAoB,GACpB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B,UAAU,WAAY,SAAQ,SAAS;IACrC,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IAC3C,gCAAgC,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClE,cAAc,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC9C;;AAED,wBAA0E"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
import type { WithDefault, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export type BlurType = 'xlight' | 'light' | 'dark' | 'extraDark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
4
|
+
export type ProgressiveBlurDirection = 'blurredTopClearBottom' | 'blurredBottomClearTop';
|
|
5
|
+
interface NativeProps extends ViewProps {
|
|
6
|
+
blurAmount?: WithDefault<Double, 20.0>;
|
|
7
|
+
blurType?: WithDefault<BlurType, 'regular'>;
|
|
8
|
+
direction?: WithDefault<ProgressiveBlurDirection, 'blurredTopClearBottom'>;
|
|
9
|
+
startOffset?: WithDefault<Double, 0.0>;
|
|
10
|
+
reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
13
|
+
export default _default;
|
|
14
|
+
//# sourceMappingURL=ReactNativeProgressiveBlurViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReactNativeProgressiveBlurViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/ReactNativeProgressiveBlurViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACP,MAAM,2CAA2C,CAAC;AAEnD,MAAM,MAAM,QAAQ,GAChB,QAAQ,GACR,OAAO,GACP,MAAM,GACN,WAAW,GACX,SAAS,GACT,WAAW,GACX,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,yBAAyB,GACzB,qBAAqB,GACrB,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GACxB,oBAAoB,GACpB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B,MAAM,MAAM,wBAAwB,GAChC,uBAAuB,GACvB,uBAAuB,CAAC;AAE5B,UAAU,WAAY,SAAQ,SAAS;IACrC,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,WAAW,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5C,SAAS,CAAC,EAAE,WAAW,CAAC,wBAAwB,EAAE,uBAAuB,CAAC,CAAC;IAC3E,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACvC,gCAAgC,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;CACnE;;AAED,wBAEE"}
|
|
@@ -6,4 +6,8 @@ export { default as ReactNativeLiquidGlassView } from './ReactNativeLiquidGlassV
|
|
|
6
6
|
export type { GlassType } from './ReactNativeLiquidGlassViewNativeComponent';
|
|
7
7
|
export { LiquidGlassView } from './LiquidGlassView';
|
|
8
8
|
export type { LiquidGlassViewProps } from './LiquidGlassView';
|
|
9
|
+
export { default as ReactNativeProgressiveBlurView } from './ReactNativeProgressiveBlurViewNativeComponent';
|
|
10
|
+
export type { ProgressiveBlurDirection } from './ReactNativeProgressiveBlurViewNativeComponent';
|
|
11
|
+
export { ProgressiveBlurView } from './ProgressiveBlurView';
|
|
12
|
+
export type { ProgressiveBlurViewProps } from './ProgressiveBlurView';
|
|
9
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACtF,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACpG,YAAY,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACtF,cAAc,sCAAsC,CAAC;AAErD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,OAAO,EAAE,OAAO,IAAI,0BAA0B,EAAE,MAAM,6CAA6C,CAAC;AACpG,YAAY,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAE7E,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,OAAO,IAAI,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AAC5G,YAAY,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;AAEhG,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbaiahmed1/react-native-blur",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "React native modern blur view",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"!**/.*"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"example": "yarn workspace @sbaiahmed1/react-native-blur-example",
|
|
36
35
|
"test": "jest",
|
|
37
36
|
"typecheck": "tsc",
|
|
38
37
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
"@react-native-community/cli": "15.0.0-alpha.2",
|
|
75
74
|
"@react-native/babel-preset": "0.79.2",
|
|
76
75
|
"@react-native/eslint-config": "^0.78.0",
|
|
77
|
-
"@release-it/conventional-changelog": "^
|
|
76
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
78
77
|
"@types/jest": "^29.5.5",
|
|
79
78
|
"@types/react": "^19.0.0",
|
|
80
79
|
"commitlint": "^19.6.1",
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
"react": "19.0.0",
|
|
88
87
|
"react-native": "0.79.2",
|
|
89
88
|
"react-native-builder-bob": "^0.40.11",
|
|
90
|
-
"release-it": "^
|
|
89
|
+
"release-it": "^19.0.4",
|
|
91
90
|
"turbo": "^1.10.7",
|
|
92
91
|
"typescript": "^5.8.3"
|
|
93
92
|
},
|
|
@@ -165,7 +164,8 @@
|
|
|
165
164
|
"ios": {
|
|
166
165
|
"componentProvider": {
|
|
167
166
|
"ReactNativeBlurView": "ReactNativeBlurView",
|
|
168
|
-
"ReactNativeLiquidGlassView": "ReactNativeLiquidGlassView"
|
|
167
|
+
"ReactNativeLiquidGlassView": "ReactNativeLiquidGlassView",
|
|
168
|
+
"ReactNativeProgressiveBlurView": "ReactNativeProgressiveBlurView"
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
},
|
package/src/BlurView.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleSheet, View } from 'react-native';
|
|
1
|
+
import React, { Children } from 'react';
|
|
2
|
+
import { Platform, StyleSheet, View } from 'react-native';
|
|
3
3
|
import type { ViewStyle, StyleProp } from 'react-native';
|
|
4
4
|
import ReactNativeBlurView, {
|
|
5
5
|
type BlurType,
|
|
@@ -82,33 +82,37 @@ export const BlurView: React.FC<BlurViewProps> = ({
|
|
|
82
82
|
ignoreSafeArea = false,
|
|
83
83
|
...props
|
|
84
84
|
}) => {
|
|
85
|
+
const commonProps: BlurViewProps = {
|
|
86
|
+
blurType,
|
|
87
|
+
blurAmount,
|
|
88
|
+
ignoreSafeArea,
|
|
89
|
+
reducedTransparencyFallbackColor,
|
|
90
|
+
};
|
|
91
|
+
|
|
85
92
|
// If no children, render the blur view directly (for background use)
|
|
86
|
-
if (
|
|
93
|
+
if (!Children.count(children)) {
|
|
94
|
+
return <ReactNativeBlurView style={style} {...commonProps} {...props} />;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// If children exist, use the style default for Android
|
|
98
|
+
if (Platform.OS === 'android') {
|
|
87
99
|
return (
|
|
88
|
-
<ReactNativeBlurView
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
blurAmount={blurAmount}
|
|
92
|
-
reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
|
|
93
|
-
style={style}
|
|
94
|
-
{...props}
|
|
95
|
-
/>
|
|
100
|
+
<ReactNativeBlurView style={style} {...commonProps} {...props}>
|
|
101
|
+
{children}
|
|
102
|
+
</ReactNativeBlurView>
|
|
96
103
|
);
|
|
97
104
|
}
|
|
98
105
|
|
|
99
|
-
// If children exist, use the absolute positioning pattern
|
|
106
|
+
// If children exist, use the absolute positioning pattern for iOS and others
|
|
100
107
|
return (
|
|
101
108
|
<View style={[styles.container, style]}>
|
|
102
109
|
{/* Blur effect positioned absolutely behind content */}
|
|
103
110
|
<ReactNativeBlurView
|
|
104
|
-
ignoreSafeArea={ignoreSafeArea}
|
|
105
|
-
blurType={blurType}
|
|
106
|
-
blurAmount={blurAmount}
|
|
107
|
-
reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
|
|
108
111
|
style={StyleSheet.absoluteFill}
|
|
112
|
+
{...commonProps}
|
|
109
113
|
{...props}
|
|
110
114
|
/>
|
|
111
|
-
{/* Content positioned relatively on top */}
|
|
115
|
+
{/* Content positioned relatively on top when device is not Android */}
|
|
112
116
|
<View style={styles.children}>{children}</View>
|
|
113
117
|
</View>
|
|
114
118
|
);
|
package/src/LiquidGlassView.tsx
CHANGED
|
@@ -103,11 +103,10 @@ export const LiquidGlassView: React.FC<LiquidGlassViewProps> = ({
|
|
|
103
103
|
children,
|
|
104
104
|
...props
|
|
105
105
|
}) => {
|
|
106
|
+
const isIos = Platform.OS === 'ios';
|
|
107
|
+
|
|
106
108
|
// Only render on iOS 26+ (fallback otherwise)
|
|
107
|
-
if (
|
|
108
|
-
Platform.OS !== 'ios' ||
|
|
109
|
-
(Platform.OS === 'ios' && parseInt(Platform.Version, 10) < 26)
|
|
110
|
-
) {
|
|
109
|
+
if (!isIos || (isIos && Number.parseInt(String(Platform.Version), 10) < 26)) {
|
|
111
110
|
console.warn(
|
|
112
111
|
'LiquidGlassView is only supported on iOS. Rendering children without glass effect.'
|
|
113
112
|
);
|