react-native-blur-vibe 0.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/LICENSE +20 -0
- package/README.md +232 -0
- package/android/build.gradle +68 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/blurvibe/BlurVibePackage.kt +12 -0
- package/android/src/main/java/com/blurvibe/BlurVibeView.kt +128 -0
- package/android/src/main/java/com/blurvibe/BlurVibeViewManager.kt +37 -0
- package/ios/BlurVibeView.m +3 -0
- package/ios/BlurVibeView.swift +132 -0
- package/ios/BlurVibeViewManager.m +9 -0
- package/ios/BlurVibeViewManager.swift +17 -0
- package/ios/react-native-blur-vibe.podspec +21 -0
- package/lib/commonjs/BlurVibeViewNativeComponent.ts +17 -0
- package/lib/commonjs/BlurView.js +56 -0
- package/lib/commonjs/BlurView.js.map +1 -0
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/types.js +6 -0
- package/lib/commonjs/types.js.map +1 -0
- package/lib/module/BlurVibeViewNativeComponent.ts +17 -0
- package/lib/module/BlurView.js +53 -0
- package/lib/module/BlurView.js.map +1 -0
- package/lib/module/index.js +4 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/types.js +4 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/BlurVibeViewNativeComponent.d.ts +12 -0
- package/lib/typescript/commonjs/src/BlurVibeViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/BlurView.d.ts +24 -0
- package/lib/typescript/commonjs/src/BlurView.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types.d.ts +40 -0
- package/lib/typescript/commonjs/src/types.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/BlurVibeViewNativeComponent.d.ts +12 -0
- package/lib/typescript/module/src/BlurVibeViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/module/src/BlurView.d.ts +24 -0
- package/lib/typescript/module/src/BlurView.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +3 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types.d.ts +40 -0
- package/lib/typescript/module/src/types.d.ts.map +1 -0
- package/package.json +155 -0
- package/react-native.config.js +7 -0
- package/src/BlurVibeViewNativeComponent.ts +17 -0
- package/src/BlurView.tsx +58 -0
- package/src/index.ts +2 -0
- package/src/types.ts +65 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-ignore - codegenNativeComponent is available at runtime in RN 0.71+
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
4
|
+
// @ts-ignore - CodegenTypes available at runtime
|
|
5
|
+
import type { Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
export interface NativeBlurVibeViewProps extends ViewProps {
|
|
8
|
+
blurAmount?: Float;
|
|
9
|
+
blurType?: string;
|
|
10
|
+
overlayColor?: string;
|
|
11
|
+
reducedTransparencyFallbackColor?: string;
|
|
12
|
+
blurRadius?: Int32;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeBlurVibeViewProps>(
|
|
16
|
+
'BlurVibeView'
|
|
17
|
+
) as HostComponent<NativeBlurVibeViewProps>;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _BlurVibeViewNativeComponent = _interopRequireDefault(require("./BlurVibeViewNativeComponent"));
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
/**
|
|
12
|
+
* BlurView — react-native-blur-vibe
|
|
13
|
+
*
|
|
14
|
+
* Cross-platform blur view for React Native.
|
|
15
|
+
* iOS: UIVisualEffectView | Android: RenderEffect (API 31+) / RenderScript fallback
|
|
16
|
+
*
|
|
17
|
+
* overlayColor works on BOTH platforms — composites a color on top of the blur,
|
|
18
|
+
* exactly like CSS: backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <BlurView
|
|
22
|
+
* blurAmount={15}
|
|
23
|
+
* blurType="systemMaterial"
|
|
24
|
+
* overlayColor="#00000040"
|
|
25
|
+
* style={StyleSheet.absoluteFill}
|
|
26
|
+
* />
|
|
27
|
+
*/const BlurView = ({
|
|
28
|
+
blurAmount = 10,
|
|
29
|
+
blurType = 'light',
|
|
30
|
+
overlayColor,
|
|
31
|
+
reducedTransparencyFallbackColor = '#F2F2F2',
|
|
32
|
+
blurRadius = 4,
|
|
33
|
+
style,
|
|
34
|
+
children,
|
|
35
|
+
...rest
|
|
36
|
+
}) => {
|
|
37
|
+
const resolvedOverlayColor = overlayColor ?? (_reactNative.Platform.OS === 'android' ? '#00000030' : 'transparent');
|
|
38
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_BlurVibeViewNativeComponent.default, {
|
|
39
|
+
blurAmount: blurAmount,
|
|
40
|
+
blurType: blurType,
|
|
41
|
+
overlayColor: resolvedOverlayColor,
|
|
42
|
+
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
43
|
+
blurRadius: blurRadius,
|
|
44
|
+
style: [styles.transparent, style],
|
|
45
|
+
...rest,
|
|
46
|
+
children: children
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
BlurView.displayName = 'BlurView';
|
|
50
|
+
const styles = _reactNative.StyleSheet.create({
|
|
51
|
+
transparent: {
|
|
52
|
+
backgroundColor: 'transparent'
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
var _default = exports.default = BlurView;
|
|
56
|
+
//# sourceMappingURL=BlurView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_BlurVibeViewNativeComponent","_interopRequireDefault","_jsxRuntime","e","__esModule","default","BlurView","blurAmount","blurType","overlayColor","reducedTransparencyFallbackColor","blurRadius","style","children","rest","resolvedOverlayColor","Platform","OS","jsx","styles","transparent","displayName","StyleSheet","create","backgroundColor","_default","exports"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,4BAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA+D,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,QAAQ,GAAGA,CAAC;EAChBC,UAAU,GAAG,EAAE;EACfC,QAAQ,GAAG,OAAO;EAClBC,YAAY;EACZC,gCAAgC,GAAG,SAAS;EAC5CC,UAAU,GAAG,CAAC;EACdC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACU,CAAC,KAAK;EACnB,MAAMC,oBAAoB,GACxBN,YAAY,KAAKO,qBAAQ,CAACC,EAAE,KAAK,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;EAE3E,oBACE,IAAAf,WAAA,CAAAgB,GAAA,EAAClB,4BAAA,CAAAK,OAAkB;IACjBE,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBC,YAAY,EAAEM,oBAAqB;IACnCL,gCAAgC,EAAEA,gCAAiC;IACnEC,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAE,CAACO,MAAM,CAACC,WAAW,EAAER,KAAK,CAAE;IAAA,GAC/BE,IAAI;IAAAD,QAAA,EAEPA;EAAQ,CACS,CAAC;AAEzB,CAAC;AAEDP,QAAQ,CAACe,WAAW,GAAG,UAAU;AAEjC,MAAMF,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,WAAW,EAAE;IACXI,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArB,OAAA,GAEYC,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "BlurView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _BlurView.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _BlurView = _interopRequireDefault(require("./BlurView"));
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_BlurView","_interopRequireDefault","require","e","__esModule","default"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiD,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-ignore - codegenNativeComponent is available at runtime in RN 0.71+
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
4
|
+
// @ts-ignore - CodegenTypes available at runtime
|
|
5
|
+
import type { Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
export interface NativeBlurVibeViewProps extends ViewProps {
|
|
8
|
+
blurAmount?: Float;
|
|
9
|
+
blurType?: string;
|
|
10
|
+
overlayColor?: string;
|
|
11
|
+
reducedTransparencyFallbackColor?: string;
|
|
12
|
+
blurRadius?: Int32;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeBlurVibeViewProps>(
|
|
16
|
+
'BlurVibeView'
|
|
17
|
+
) as HostComponent<NativeBlurVibeViewProps>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform, StyleSheet } from 'react-native';
|
|
4
|
+
import NativeBlurVibeView from './BlurVibeViewNativeComponent';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* BlurView — react-native-blur-vibe
|
|
8
|
+
*
|
|
9
|
+
* Cross-platform blur view for React Native.
|
|
10
|
+
* iOS: UIVisualEffectView | Android: RenderEffect (API 31+) / RenderScript fallback
|
|
11
|
+
*
|
|
12
|
+
* overlayColor works on BOTH platforms — composites a color on top of the blur,
|
|
13
|
+
* exactly like CSS: backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <BlurView
|
|
17
|
+
* blurAmount={15}
|
|
18
|
+
* blurType="systemMaterial"
|
|
19
|
+
* overlayColor="#00000040"
|
|
20
|
+
* style={StyleSheet.absoluteFill}
|
|
21
|
+
* />
|
|
22
|
+
*/
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
const BlurView = ({
|
|
25
|
+
blurAmount = 10,
|
|
26
|
+
blurType = 'light',
|
|
27
|
+
overlayColor,
|
|
28
|
+
reducedTransparencyFallbackColor = '#F2F2F2',
|
|
29
|
+
blurRadius = 4,
|
|
30
|
+
style,
|
|
31
|
+
children,
|
|
32
|
+
...rest
|
|
33
|
+
}) => {
|
|
34
|
+
const resolvedOverlayColor = overlayColor ?? (Platform.OS === 'android' ? '#00000030' : 'transparent');
|
|
35
|
+
return /*#__PURE__*/_jsx(NativeBlurVibeView, {
|
|
36
|
+
blurAmount: blurAmount,
|
|
37
|
+
blurType: blurType,
|
|
38
|
+
overlayColor: resolvedOverlayColor,
|
|
39
|
+
reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
|
|
40
|
+
blurRadius: blurRadius,
|
|
41
|
+
style: [styles.transparent, style],
|
|
42
|
+
...rest,
|
|
43
|
+
children: children
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
BlurView.displayName = 'BlurView';
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
transparent: {
|
|
49
|
+
backgroundColor: 'transparent'
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export default BlurView;
|
|
53
|
+
//# sourceMappingURL=BlurView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","StyleSheet","NativeBlurVibeView","jsx","_jsx","BlurView","blurAmount","blurType","overlayColor","reducedTransparencyFallbackColor","blurRadius","style","children","rest","resolvedOverlayColor","OS","styles","transparent","displayName","create","backgroundColor"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAEnD,OAAOC,kBAAkB,MAAM,+BAA+B;;AAE9D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA,SAAAC,GAAA,IAAAC,IAAA;AAiBA,MAAMC,QAAQ,GAAGA,CAAC;EAChBC,UAAU,GAAG,EAAE;EACfC,QAAQ,GAAG,OAAO;EAClBC,YAAY;EACZC,gCAAgC,GAAG,SAAS;EAC5CC,UAAU,GAAG,CAAC;EACdC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACU,CAAC,KAAK;EACnB,MAAMC,oBAAoB,GACxBN,YAAY,KAAKR,QAAQ,CAACe,EAAE,KAAK,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;EAE3E,oBACEX,IAAA,CAACF,kBAAkB;IACjBI,UAAU,EAAEA,UAAW;IACvBC,QAAQ,EAAEA,QAAS;IACnBC,YAAY,EAAEM,oBAAqB;IACnCL,gCAAgC,EAAEA,gCAAiC;IACnEC,UAAU,EAAEA,UAAW;IACvBC,KAAK,EAAE,CAACK,MAAM,CAACC,WAAW,EAAEN,KAAK,CAAE;IAAA,GAC/BE,IAAI;IAAAD,QAAA,EAEPA;EAAQ,CACS,CAAC;AAEzB,CAAC;AAEDP,QAAQ,CAACa,WAAW,GAAG,UAAU;AAEjC,MAAMF,MAAM,GAAGf,UAAU,CAACkB,MAAM,CAAC;EAC/BF,WAAW,EAAE;IACXG,eAAe,EAAE;EACnB;AACF,CAAC,CAAC;AAEF,eAAef,QAAQ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","BlurView"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,OAAO,IAAIC,QAAQ,QAAQ,eAAY","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"commonjs"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export interface NativeBlurVibeViewProps extends ViewProps {
|
|
4
|
+
blurAmount?: Float;
|
|
5
|
+
blurType?: string;
|
|
6
|
+
overlayColor?: string;
|
|
7
|
+
reducedTransparencyFallbackColor?: string;
|
|
8
|
+
blurRadius?: Int32;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: HostComponent<NativeBlurVibeViewProps>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=BlurVibeViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlurVibeViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/BlurVibeViewNativeComponent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;wBAII,aAAa,CAAC,uBAAuB,CAAC;AAF3C,wBAE4C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BlurViewProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* BlurView — react-native-blur-vibe
|
|
4
|
+
*
|
|
5
|
+
* Cross-platform blur view for React Native.
|
|
6
|
+
* iOS: UIVisualEffectView | Android: RenderEffect (API 31+) / RenderScript fallback
|
|
7
|
+
*
|
|
8
|
+
* overlayColor works on BOTH platforms — composites a color on top of the blur,
|
|
9
|
+
* exactly like CSS: backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <BlurView
|
|
13
|
+
* blurAmount={15}
|
|
14
|
+
* blurType="systemMaterial"
|
|
15
|
+
* overlayColor="#00000040"
|
|
16
|
+
* style={StyleSheet.absoluteFill}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
declare const BlurView: {
|
|
20
|
+
({ blurAmount, blurType, overlayColor, reducedTransparencyFallbackColor, blurRadius, style, children, ...rest }: BlurViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default BlurView;
|
|
24
|
+
//# sourceMappingURL=BlurView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../../src/BlurView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,QAAQ;qHASX,aAAa;;CAiBf,CAAC;AAUF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export type BlurType = 'light' | 'dark' | 'extraLight' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
3
|
+
export interface BlurViewProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Blur intensity from 0 to 100.
|
|
6
|
+
* @default 10
|
|
7
|
+
*/
|
|
8
|
+
blurAmount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* iOS only — maps to UIBlurEffectStyle.
|
|
11
|
+
* @default 'light'
|
|
12
|
+
*/
|
|
13
|
+
blurType?: BlurType;
|
|
14
|
+
/**
|
|
15
|
+
* Overlay color composited ON TOP of the blur layer. Works on iOS AND Android.
|
|
16
|
+
*
|
|
17
|
+
* Alpha channel controls how much blur is visible — like CSS:
|
|
18
|
+
* backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
19
|
+
*
|
|
20
|
+
* "#00000000" → transparent overlay = pure blur
|
|
21
|
+
* "#00000080" → semi-transparent black tint over blur
|
|
22
|
+
* "#FFFFFFFF" → fully opaque = blur hidden
|
|
23
|
+
*
|
|
24
|
+
* @default "transparent" on iOS | "#00000030" on Android
|
|
25
|
+
*/
|
|
26
|
+
overlayColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Fallback color when blur is unavailable.
|
|
29
|
+
* (Reduce Transparency on iOS, API < 21 on Android)
|
|
30
|
+
* @default "#F2F2F2"
|
|
31
|
+
*/
|
|
32
|
+
reducedTransparencyFallbackColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Android only — downscale factor for RenderScript blur path (API 21-30).
|
|
35
|
+
* Higher = faster performance, slightly softer blur. Range: 1–8.
|
|
36
|
+
* @default 4
|
|
37
|
+
*/
|
|
38
|
+
blurRadius?: number;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,MAAM,GACN,YAAY,GACZ,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,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
2
|
+
import type { Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
export interface NativeBlurVibeViewProps extends ViewProps {
|
|
4
|
+
blurAmount?: Float;
|
|
5
|
+
blurType?: string;
|
|
6
|
+
overlayColor?: string;
|
|
7
|
+
reducedTransparencyFallbackColor?: string;
|
|
8
|
+
blurRadius?: Int32;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: HostComponent<NativeBlurVibeViewProps>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=BlurVibeViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlurVibeViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/BlurVibeViewNativeComponent.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE7D,OAAO,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;AAE9E,MAAM,WAAW,uBAAwB,SAAQ,SAAS;IACxD,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAC1C,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB;wBAII,aAAa,CAAC,uBAAuB,CAAC;AAF3C,wBAE4C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BlurViewProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* BlurView — react-native-blur-vibe
|
|
4
|
+
*
|
|
5
|
+
* Cross-platform blur view for React Native.
|
|
6
|
+
* iOS: UIVisualEffectView | Android: RenderEffect (API 31+) / RenderScript fallback
|
|
7
|
+
*
|
|
8
|
+
* overlayColor works on BOTH platforms — composites a color on top of the blur,
|
|
9
|
+
* exactly like CSS: backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <BlurView
|
|
13
|
+
* blurAmount={15}
|
|
14
|
+
* blurType="systemMaterial"
|
|
15
|
+
* overlayColor="#00000040"
|
|
16
|
+
* style={StyleSheet.absoluteFill}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
declare const BlurView: {
|
|
20
|
+
({ blurAmount, blurType, overlayColor, reducedTransparencyFallbackColor, blurRadius, style, children, ...rest }: BlurViewProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default BlurView;
|
|
24
|
+
//# sourceMappingURL=BlurView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../../src/BlurView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,QAAQ;qHASX,aAAa;;CAiBf,CAAC;AAUF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export type BlurType = 'light' | 'dark' | 'extraLight' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
3
|
+
export interface BlurViewProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* Blur intensity from 0 to 100.
|
|
6
|
+
* @default 10
|
|
7
|
+
*/
|
|
8
|
+
blurAmount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* iOS only — maps to UIBlurEffectStyle.
|
|
11
|
+
* @default 'light'
|
|
12
|
+
*/
|
|
13
|
+
blurType?: BlurType;
|
|
14
|
+
/**
|
|
15
|
+
* Overlay color composited ON TOP of the blur layer. Works on iOS AND Android.
|
|
16
|
+
*
|
|
17
|
+
* Alpha channel controls how much blur is visible — like CSS:
|
|
18
|
+
* backdrop-filter: blur(Xpx) + background-color: overlayColor
|
|
19
|
+
*
|
|
20
|
+
* "#00000000" → transparent overlay = pure blur
|
|
21
|
+
* "#00000080" → semi-transparent black tint over blur
|
|
22
|
+
* "#FFFFFFFF" → fully opaque = blur hidden
|
|
23
|
+
*
|
|
24
|
+
* @default "transparent" on iOS | "#00000030" on Android
|
|
25
|
+
*/
|
|
26
|
+
overlayColor?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Fallback color when blur is unavailable.
|
|
29
|
+
* (Reduce Transparency on iOS, API < 21 on Android)
|
|
30
|
+
* @default "#F2F2F2"
|
|
31
|
+
*/
|
|
32
|
+
reducedTransparencyFallbackColor?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Android only — downscale factor for RenderScript blur path (API 21-30).
|
|
35
|
+
* Higher = faster performance, slightly softer blur. Range: 1–8.
|
|
36
|
+
* @default 4
|
|
37
|
+
*/
|
|
38
|
+
blurRadius?: number;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,QAAQ,GAChB,OAAO,GACP,MAAM,GACN,YAAY,GACZ,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,WAAW,aAAc,SAAQ,SAAS;IAC9C;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-native-blur-vibe",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "React Native package implementing Blur View in iOS and Android",
|
|
5
|
+
"main": "./lib/commonjs/index.js",
|
|
6
|
+
"module": "./lib/module/index.js",
|
|
7
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
|
+
"import": {
|
|
12
|
+
"types": "./lib/typescript/module/src/index.d.ts",
|
|
13
|
+
"default": "./lib/module/index.js"
|
|
14
|
+
},
|
|
15
|
+
"require": {
|
|
16
|
+
"types": "./lib/typescript/commonjs/src/index.d.ts",
|
|
17
|
+
"default": "./lib/commonjs/index.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"src",
|
|
24
|
+
"lib",
|
|
25
|
+
"android",
|
|
26
|
+
"ios",
|
|
27
|
+
"*.podspec",
|
|
28
|
+
"react-native.config.js",
|
|
29
|
+
"!ios/build",
|
|
30
|
+
"!android/build",
|
|
31
|
+
"!android/gradle",
|
|
32
|
+
"!android/gradlew",
|
|
33
|
+
"!android/gradlew.bat",
|
|
34
|
+
"!android/local.properties",
|
|
35
|
+
"!**/__tests__",
|
|
36
|
+
"!**/__fixtures__",
|
|
37
|
+
"!**/__mocks__",
|
|
38
|
+
"!**/.*"
|
|
39
|
+
],
|
|
40
|
+
"scripts": {
|
|
41
|
+
"example": "yarn workspace react-native-blur-vibe-example",
|
|
42
|
+
"clean": "del-cli android/build example/android/build example/android/app/build example/ios/build lib",
|
|
43
|
+
"prepare": "bob build",
|
|
44
|
+
"typecheck": "tsc",
|
|
45
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
46
|
+
"test": "jest",
|
|
47
|
+
"prepublishOnly": "yarn lint && yarn typecheck"
|
|
48
|
+
},
|
|
49
|
+
"keywords": [
|
|
50
|
+
"react-native",
|
|
51
|
+
"blur",
|
|
52
|
+
"blurview",
|
|
53
|
+
"glassmorphism",
|
|
54
|
+
"ios",
|
|
55
|
+
"android",
|
|
56
|
+
"overlay",
|
|
57
|
+
"backdrop-filter",
|
|
58
|
+
"uivisualeffectview",
|
|
59
|
+
"rendereffect"
|
|
60
|
+
],
|
|
61
|
+
"repository": {
|
|
62
|
+
"type": "git",
|
|
63
|
+
"url": "git+https://github.com/I-am-Pritam-20/react-native-blur-vibe.git"
|
|
64
|
+
},
|
|
65
|
+
"author": "Pritam Nanda (https://github.com/I-am-Pritam-20)",
|
|
66
|
+
"license": "MIT",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/I-am-Pritam-20/react-native-blur-vibe/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://github.com/I-am-Pritam-20/react-native-blur-vibe#readme",
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public",
|
|
73
|
+
"registry": "https://registry.npmjs.org/"
|
|
74
|
+
},
|
|
75
|
+
"engines": {
|
|
76
|
+
"node": ">=18.0.0"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@eslint/compat": "^2.0.5",
|
|
80
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
81
|
+
"@eslint/js": "^10.0.1",
|
|
82
|
+
"@react-native/babel-preset": "0.83.0",
|
|
83
|
+
"@react-native/eslint-config": "^0.75.0",
|
|
84
|
+
"@types/jest": "^29.5.14",
|
|
85
|
+
"@types/react": "^19.2.0",
|
|
86
|
+
"del-cli": "^6.0.0",
|
|
87
|
+
"eslint": "^8.57.1",
|
|
88
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
89
|
+
"jest": "^29.7.0",
|
|
90
|
+
"prettier": "^3.2.5",
|
|
91
|
+
"react": "19.2.0",
|
|
92
|
+
"react-native": "0.83.0",
|
|
93
|
+
"react-native-builder-bob": "^0.40.18",
|
|
94
|
+
"typescript": "^5.9.2"
|
|
95
|
+
},
|
|
96
|
+
"peerDependencies": {
|
|
97
|
+
"react": "*",
|
|
98
|
+
"react-native": "*"
|
|
99
|
+
},
|
|
100
|
+
"workspaces": [
|
|
101
|
+
"example"
|
|
102
|
+
],
|
|
103
|
+
"packageManager": "yarn@4.11.0",
|
|
104
|
+
"react-native-builder-bob": {
|
|
105
|
+
"source": "src",
|
|
106
|
+
"output": "lib",
|
|
107
|
+
"targets": [
|
|
108
|
+
"commonjs",
|
|
109
|
+
[
|
|
110
|
+
"module",
|
|
111
|
+
{
|
|
112
|
+
"esm": true
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"typescript",
|
|
117
|
+
{
|
|
118
|
+
"project": "tsconfig.build.json"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
],
|
|
122
|
+
"exclude": "**/{__tests__,__fixtures__,__mocks__}/**"
|
|
123
|
+
},
|
|
124
|
+
"codegenConfig": {
|
|
125
|
+
"name": "BlurVibeSpec",
|
|
126
|
+
"type": "components",
|
|
127
|
+
"jsSrcsDir": "src",
|
|
128
|
+
"android": {
|
|
129
|
+
"javaPackageName": "com.blurvibe"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"prettier": {
|
|
133
|
+
"quoteProps": "consistent",
|
|
134
|
+
"singleQuote": true,
|
|
135
|
+
"tabWidth": 2,
|
|
136
|
+
"trailingComma": "es5",
|
|
137
|
+
"useTabs": false
|
|
138
|
+
},
|
|
139
|
+
"jest": {
|
|
140
|
+
"preset": "react-native",
|
|
141
|
+
"modulePathIgnorePatterns": [
|
|
142
|
+
"<rootDir>/example/node_modules",
|
|
143
|
+
"<rootDir>/lib/"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"create-react-native-library": {
|
|
147
|
+
"type": "native-view",
|
|
148
|
+
"languages": "kotlin-swift",
|
|
149
|
+
"tools": [
|
|
150
|
+
"eslint",
|
|
151
|
+
"jest"
|
|
152
|
+
],
|
|
153
|
+
"version": "0.57.2"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// @ts-ignore - codegenNativeComponent is available at runtime in RN 0.71+
|
|
2
|
+
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
3
|
+
import type { HostComponent, ViewProps } from 'react-native';
|
|
4
|
+
// @ts-ignore - CodegenTypes available at runtime
|
|
5
|
+
import type { Float, Int32 } from 'react-native/Libraries/Types/CodegenTypes';
|
|
6
|
+
|
|
7
|
+
export interface NativeBlurVibeViewProps extends ViewProps {
|
|
8
|
+
blurAmount?: Float;
|
|
9
|
+
blurType?: string;
|
|
10
|
+
overlayColor?: string;
|
|
11
|
+
reducedTransparencyFallbackColor?: string;
|
|
12
|
+
blurRadius?: Int32;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default codegenNativeComponent<NativeBlurVibeViewProps>(
|
|
16
|
+
'BlurVibeView'
|
|
17
|
+
) as HostComponent<NativeBlurVibeViewProps>;
|