@sbaiahmed1/react-native-blur 4.0.1 → 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.
Files changed (43) hide show
  1. package/README.md +155 -47
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/BlurType.kt +63 -0
  4. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurPackage.kt +1 -0
  5. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +63 -43
  6. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurViewManager.kt +14 -26
  7. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurView.kt +320 -0
  8. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurViewManager.kt +81 -0
  9. package/ios/Helpers/BlurStyleHelpers.swift +20 -0
  10. package/ios/Helpers/ReactNativeProgressiveBlurViewHelper.swift +39 -0
  11. package/ios/ReactNativeProgressiveBlurView.h +14 -0
  12. package/ios/ReactNativeProgressiveBlurView.mm +213 -0
  13. package/ios/ReactNativeProgressiveBlurViewManager.h +4 -0
  14. package/ios/ReactNativeProgressiveBlurViewManager.mm +137 -0
  15. package/ios/Views/ProgressiveBlurView.swift +124 -0
  16. package/ios/Views/VariableBlurView.swift +142 -0
  17. package/lib/module/BlurView.js +23 -12
  18. package/lib/module/BlurView.js.map +1 -1
  19. package/lib/module/LiquidGlassView.js +3 -1
  20. package/lib/module/LiquidGlassView.js.map +1 -1
  21. package/lib/module/ProgressiveBlurView.js +98 -0
  22. package/lib/module/ProgressiveBlurView.js.map +1 -0
  23. package/lib/module/ReactNativeBlurViewNativeComponent.ts +11 -1
  24. package/lib/module/ReactNativeProgressiveBlurViewNativeComponent.ts +45 -0
  25. package/lib/module/index.js +2 -0
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/typescript/src/BlurView.d.ts.map +1 -1
  28. package/lib/typescript/src/LiquidGlassView.d.ts.map +1 -1
  29. package/lib/typescript/src/ProgressiveBlurView.d.ts +97 -0
  30. package/lib/typescript/src/ProgressiveBlurView.d.ts.map +1 -0
  31. package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts +1 -1
  32. package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts.map +1 -1
  33. package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts +14 -0
  34. package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts.map +1 -0
  35. package/lib/typescript/src/index.d.ts +4 -0
  36. package/lib/typescript/src/index.d.ts.map +1 -1
  37. package/package.json +3 -2
  38. package/src/BlurView.tsx +21 -17
  39. package/src/LiquidGlassView.tsx +3 -4
  40. package/src/ProgressiveBlurView.tsx +161 -0
  41. package/src/ReactNativeBlurViewNativeComponent.ts +11 -1
  42. package/src/ReactNativeProgressiveBlurViewNativeComponent.ts +45 -0
  43. package/src/index.tsx +6 -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/src/index.tsx CHANGED
@@ -9,3 +9,9 @@ export type { GlassType } from './ReactNativeLiquidGlassViewNativeComponent';
9
9
 
10
10
  export { LiquidGlassView } from './LiquidGlassView';
11
11
  export type { LiquidGlassViewProps } from './LiquidGlassView';
12
+
13
+ export { default as ReactNativeProgressiveBlurView } from './ReactNativeProgressiveBlurViewNativeComponent';
14
+ export type { ProgressiveBlurDirection } from './ReactNativeProgressiveBlurViewNativeComponent';
15
+
16
+ export { ProgressiveBlurView } from './ProgressiveBlurView';
17
+ export type { ProgressiveBlurViewProps } from './ProgressiveBlurView';