@sbaiahmed1/react-native-blur 4.5.2-alpha.0 → 4.5.2-alpha.2
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/ReactNativeBlurViewNativeComponent.ts +3 -22
- package/lib/module/ReactNativeLiquidGlassViewNativeComponent.ts +3 -1
- package/lib/module/ReactNativeProgressiveBlurViewNativeComponent.ts +3 -27
- package/lib/module/index.web.js +19 -0
- package/lib/module/index.web.js.map +1 -0
- package/lib/module/types.js +2 -0
- package/lib/module/types.js.map +1 -0
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts +2 -2
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.web.d.ts +4 -0
- package/lib/typescript/src/index.web.d.ts.map +1 -0
- package/lib/typescript/src/types.d.ts +8 -0
- package/lib/typescript/src/types.d.ts.map +1 -0
- package/package.json +5 -3
- package/src/BlurView.web.tsx +1 -1
- package/src/ReactNativeBlurViewNativeComponent.ts +3 -22
- package/src/ReactNativeLiquidGlassViewNativeComponent.ts +3 -1
- package/src/ReactNativeProgressiveBlurViewNativeComponent.ts +3 -27
- package/src/index.web.tsx +18 -0
- package/src/types.ts +34 -0
|
@@ -4,29 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { BlurType } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
|
|
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';
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { BlurType };
|
|
30
11
|
|
|
31
12
|
interface NativeProps extends ViewProps {
|
|
32
13
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
@@ -4,8 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { GlassType } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { GlassType };
|
|
9
11
|
|
|
10
12
|
interface NativeProps extends ViewProps {
|
|
11
13
|
/**
|
|
@@ -4,34 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { BlurType, ProgressiveBlurDirection } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
|
|
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
|
-
| 'blurredCenterClearTopAndBottom';
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { BlurType, ProgressiveBlurDirection };
|
|
35
11
|
|
|
36
12
|
interface NativeProps extends ViewProps {
|
|
37
13
|
blurAmount?: WithDefault<Double, 20.0>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
// Web-specific exports
|
|
4
|
+
// Only exports components that have web implementations
|
|
5
|
+
|
|
6
|
+
export { BlurView as default, BlurView } from "./BlurView.web.js";
|
|
7
|
+
|
|
8
|
+
// Re-export types (these don't import native code)
|
|
9
|
+
|
|
10
|
+
// Note: The following components are not yet supported on web:
|
|
11
|
+
// - VibrancyView (iOS-specific)
|
|
12
|
+
// - ProgressiveBlurView (requires native gradient blur)
|
|
13
|
+
// - LiquidGlassView (iOS 26+ specific)
|
|
14
|
+
// - LiquidGlassContainer (iOS 26+ specific)
|
|
15
|
+
// - BlurSwitch (Android-specific)
|
|
16
|
+
//
|
|
17
|
+
// Attempting to use these on web will result in import errors.
|
|
18
|
+
// Consider using BlurView as a fallback for web platforms.
|
|
19
|
+
//# sourceMappingURL=index.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BlurView","default"],"sourceRoot":"../../src","sources":["index.web.tsx"],"mappings":";;AAAA;AACA;;AAEA,SAASA,QAAQ,IAAIC,OAAO,EAAED,QAAQ,QAAQ,mBAAgB;;AAG9D;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { WithDefault, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
|
|
3
|
+
import type { BlurType } from './types';
|
|
4
|
+
export type { BlurType };
|
|
4
5
|
interface NativeProps extends ViewProps {
|
|
5
6
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
6
7
|
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;
|
|
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;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGxC,YAAY,EAAE,QAAQ,EAAE,CAAC;AAEzB,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"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { WithDefault, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
|
|
3
|
+
import type { GlassType } from './types';
|
|
4
|
+
export type { GlassType };
|
|
4
5
|
interface NativeProps extends ViewProps {
|
|
5
6
|
/**
|
|
6
7
|
* The type of glass effect to apply
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactNativeLiquidGlassViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/ReactNativeLiquidGlassViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACP,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"ReactNativeLiquidGlassViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/ReactNativeLiquidGlassViewNativeComponent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,WAAW,EACX,MAAM,EACP,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,YAAY,EAAE,SAAS,EAAE,CAAC;AAE1B,UAAU,WAAY,SAAQ,SAAS;IACrC;;;;OAIG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAE5C;;;;OAIG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE9C;;;;OAIG;IACH,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAExC;;;;OAIG;IACH,gCAAgC,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAElE;;;;OAIG;IACH,aAAa,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IAE3C;;;;OAIG;IACH,cAAc,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC9C;;AAED,wBAGE"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
2
|
import type { WithDefault, Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
-
|
|
4
|
-
export type
|
|
3
|
+
import type { BlurType, ProgressiveBlurDirection } from './types';
|
|
4
|
+
export type { BlurType, ProgressiveBlurDirection };
|
|
5
5
|
interface NativeProps extends ViewProps {
|
|
6
6
|
blurAmount?: WithDefault<Double, 20.0>;
|
|
7
7
|
blurType?: WithDefault<BlurType, 'regular'>;
|
|
@@ -1 +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;
|
|
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;AACnD,OAAO,KAAK,EAAE,QAAQ,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAGlE,YAAY,EAAE,QAAQ,EAAE,wBAAwB,EAAE,CAAC;AAEnD,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.web.d.ts","sourceRoot":"","sources":["../../../src/index.web.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for @sbaiahmed1/react-native-blur
|
|
3
|
+
* These types are platform-agnostic and can be used on iOS, Android, and Web
|
|
4
|
+
*/
|
|
5
|
+
export type BlurType = 'xlight' | 'light' | 'dark' | 'extraDark' | 'regular' | 'prominent' | 'systemUltraThinMaterial' | 'systemThinMaterial' | 'systemMaterial' | 'systemThickMaterial' | 'systemChromeMaterial' | 'systemUltraThinMaterialLight' | 'systemThinMaterialLight' | 'systemMaterialLight' | 'systemThickMaterialLight' | 'systemChromeMaterialLight' | 'systemUltraThinMaterialDark' | 'systemThinMaterialDark' | 'systemMaterialDark' | 'systemThickMaterialDark' | 'systemChromeMaterialDark';
|
|
6
|
+
export type GlassType = 'clear' | 'regular';
|
|
7
|
+
export type ProgressiveBlurDirection = 'blurredTopClearBottom' | 'blurredBottomClearTop' | 'blurredCenterClearTopAndBottom';
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,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,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAE5C,MAAM,MAAM,wBAAwB,GAChC,uBAAuB,GACvB,uBAAuB,GACvB,gCAAgC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbaiahmed1/react-native-blur",
|
|
3
|
-
"version": "4.5.2-alpha.
|
|
3
|
+
"version": "4.5.2-alpha.2",
|
|
4
4
|
"description": "React native modern blur view",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
7
|
+
"react-native": "./lib/module/index.js",
|
|
7
8
|
"exports": {
|
|
8
9
|
".": {
|
|
9
|
-
"source": "./src/index.tsx",
|
|
10
10
|
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
-
"
|
|
11
|
+
"react-native": "./lib/module/index.js",
|
|
12
|
+
"browser": "./lib/module/index.web.js",
|
|
13
|
+
"default": "./lib/module/index.web.js"
|
|
12
14
|
},
|
|
13
15
|
"./package.json": "./package.json"
|
|
14
16
|
},
|
package/src/BlurView.web.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import { forwardRef, useImperativeHandle, useRef } from 'react';
|
|
|
2
2
|
import { View } from 'react-native';
|
|
3
3
|
import type { ViewStyle } from 'react-native';
|
|
4
4
|
import type { BlurViewProps } from './BlurView';
|
|
5
|
-
import type { BlurType } from './
|
|
5
|
+
import type { BlurType } from './types';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Maps blur types to background colors with opacity based on intensity
|
|
@@ -4,29 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { BlurType } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
|
|
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';
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { BlurType };
|
|
30
11
|
|
|
31
12
|
interface NativeProps extends ViewProps {
|
|
32
13
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
@@ -4,8 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { GlassType } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { GlassType };
|
|
9
11
|
|
|
10
12
|
interface NativeProps extends ViewProps {
|
|
11
13
|
/**
|
|
@@ -4,34 +4,10 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
|
+
import type { BlurType, ProgressiveBlurDirection } from './types';
|
|
7
8
|
|
|
8
|
-
export
|
|
9
|
-
|
|
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
|
-
| 'blurredCenterClearTopAndBottom';
|
|
9
|
+
// Re-export for backward compatibility
|
|
10
|
+
export type { BlurType, ProgressiveBlurDirection };
|
|
35
11
|
|
|
36
12
|
interface NativeProps extends ViewProps {
|
|
37
13
|
blurAmount?: WithDefault<Double, 20.0>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Web-specific exports
|
|
2
|
+
// Only exports components that have web implementations
|
|
3
|
+
|
|
4
|
+
export { BlurView as default, BlurView } from './BlurView.web';
|
|
5
|
+
export type { BlurViewProps } from './BlurView';
|
|
6
|
+
|
|
7
|
+
// Re-export types (these don't import native code)
|
|
8
|
+
export type { BlurType, GlassType, ProgressiveBlurDirection } from './types';
|
|
9
|
+
|
|
10
|
+
// Note: The following components are not yet supported on web:
|
|
11
|
+
// - VibrancyView (iOS-specific)
|
|
12
|
+
// - ProgressiveBlurView (requires native gradient blur)
|
|
13
|
+
// - LiquidGlassView (iOS 26+ specific)
|
|
14
|
+
// - LiquidGlassContainer (iOS 26+ specific)
|
|
15
|
+
// - BlurSwitch (Android-specific)
|
|
16
|
+
//
|
|
17
|
+
// Attempting to use these on web will result in import errors.
|
|
18
|
+
// Consider using BlurView as a fallback for web platforms.
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types for @sbaiahmed1/react-native-blur
|
|
3
|
+
* These types are platform-agnostic and can be used on iOS, Android, and Web
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export type BlurType =
|
|
7
|
+
| 'xlight'
|
|
8
|
+
| 'light'
|
|
9
|
+
| 'dark'
|
|
10
|
+
| 'extraDark'
|
|
11
|
+
| 'regular'
|
|
12
|
+
| 'prominent'
|
|
13
|
+
| 'systemUltraThinMaterial'
|
|
14
|
+
| 'systemThinMaterial'
|
|
15
|
+
| 'systemMaterial'
|
|
16
|
+
| 'systemThickMaterial'
|
|
17
|
+
| 'systemChromeMaterial'
|
|
18
|
+
| 'systemUltraThinMaterialLight'
|
|
19
|
+
| 'systemThinMaterialLight'
|
|
20
|
+
| 'systemMaterialLight'
|
|
21
|
+
| 'systemThickMaterialLight'
|
|
22
|
+
| 'systemChromeMaterialLight'
|
|
23
|
+
| 'systemUltraThinMaterialDark'
|
|
24
|
+
| 'systemThinMaterialDark'
|
|
25
|
+
| 'systemMaterialDark'
|
|
26
|
+
| 'systemThickMaterialDark'
|
|
27
|
+
| 'systemChromeMaterialDark';
|
|
28
|
+
|
|
29
|
+
export type GlassType = 'clear' | 'regular';
|
|
30
|
+
|
|
31
|
+
export type ProgressiveBlurDirection =
|
|
32
|
+
| 'blurredTopClearBottom'
|
|
33
|
+
| 'blurredBottomClearTop'
|
|
34
|
+
| 'blurredCenterClearTopAndBottom';
|