@sbaiahmed1/react-native-blur 3.1.2 → 4.0.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 (56) hide show
  1. package/README.md +319 -308
  2. package/ReactNativeBlur.podspec +1 -1
  3. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerDelegate.java +18 -3
  4. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerInterface.java +6 -1
  5. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassEffectContainerManagerDelegate.java +53 -0
  6. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassEffectContainerManagerInterface.java +25 -0
  7. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassViewManagerDelegate.java +38 -0
  8. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassViewManagerInterface.java +20 -0
  9. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.cpp +1 -0
  10. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.h +1 -0
  11. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.cpp +1 -0
  12. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h +7 -0
  13. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.cpp +21 -2
  14. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.h +70 -2
  15. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.cpp +1 -0
  16. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.h +11 -0
  17. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/States.h +12 -0
  18. package/android/build.gradle +2 -3
  19. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +62 -269
  20. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurViewManager.kt +13 -8
  21. package/ios/Helpers/BlurStyleHelpers.swift +1 -1
  22. package/ios/Helpers/ReactNativeBlurViewHelper.swift +8 -32
  23. package/ios/Helpers/ReactNativeLiquidGlassViewHelper.swift +44 -0
  24. package/ios/ReactNativeBlurView.mm +28 -74
  25. package/ios/{ReactNativeBlurViewManager.m → ReactNativeBlurViewManager.mm} +15 -39
  26. package/ios/ReactNativeLiquidGlassView.h +14 -0
  27. package/ios/ReactNativeLiquidGlassView.mm +284 -0
  28. package/ios/ReactNativeLiquidGlassViewManager.h +6 -0
  29. package/ios/ReactNativeLiquidGlassViewManager.mm +20 -0
  30. package/ios/Views/AdvancedBlurView.swift +6 -34
  31. package/ios/Views/BasicColoredView.swift +37 -44
  32. package/ios/Views/LiquidGlassContainerView.swift +173 -0
  33. package/lib/module/BlurView.js +17 -31
  34. package/lib/module/BlurView.js.map +1 -1
  35. package/lib/module/LiquidGlassView.js +75 -0
  36. package/lib/module/LiquidGlassView.js.map +1 -0
  37. package/lib/module/ReactNativeBlurViewNativeComponent.ts +1 -7
  38. package/lib/module/ReactNativeLiquidGlassViewNativeComponent.ts +57 -0
  39. package/lib/module/index.js +2 -0
  40. package/lib/module/index.js.map +1 -1
  41. package/lib/typescript/src/BlurView.d.ts +19 -39
  42. package/lib/typescript/src/BlurView.d.ts.map +1 -1
  43. package/lib/typescript/src/LiquidGlassView.d.ts +85 -0
  44. package/lib/typescript/src/LiquidGlassView.d.ts.map +1 -0
  45. package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts +1 -6
  46. package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts.map +1 -1
  47. package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts +44 -0
  48. package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts.map +1 -0
  49. package/lib/typescript/src/index.d.ts +4 -0
  50. package/lib/typescript/src/index.d.ts.map +1 -1
  51. package/package.json +6 -3
  52. package/src/BlurView.tsx +37 -68
  53. package/src/LiquidGlassView.tsx +138 -0
  54. package/src/ReactNativeBlurViewNativeComponent.ts +1 -7
  55. package/src/ReactNativeLiquidGlassViewNativeComponent.ts +57 -0
  56. package/src/index.tsx +6 -0
@@ -0,0 +1,57 @@
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 GlassType = 'clear' | 'regular';
9
+
10
+ interface NativeProps extends ViewProps {
11
+ /**
12
+ * The type of glass effect to apply
13
+ * Platform: iOS only
14
+ * @default 'clear'
15
+ */
16
+ glassType?: WithDefault<GlassType, 'clear'>;
17
+
18
+ /**
19
+ * The tint color of the glass effect
20
+ * Platform: iOS only
21
+ * @default 'clear'
22
+ */
23
+ glassTintColor?: WithDefault<string, 'clear'>;
24
+
25
+ /**
26
+ * The opacity of the glass effect (0-1)
27
+ * Platform: iOS only
28
+ * @default 1.0
29
+ */
30
+ glassOpacity?: WithDefault<Double, 1.0>;
31
+
32
+ /**
33
+ * Fallback color when reduced transparency is enabled
34
+ * Platform: iOS only
35
+ * @default '#FFFFFF'
36
+ */
37
+ reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
38
+
39
+ /**
40
+ * Whether the glass view should be interactive
41
+ * Platform: iOS only
42
+ * @default true
43
+ */
44
+ isInteractive?: WithDefault<boolean, true>;
45
+
46
+ /**
47
+ * Whether the glass view should ignore safe area insets
48
+ * Platform: iOS only
49
+ * @default false
50
+ */
51
+ ignoreSafeArea?: WithDefault<boolean, false>;
52
+ }
53
+
54
+ export default codegenNativeComponent<NativeProps>(
55
+ 'ReactNativeLiquidGlassView',
56
+ { excludedPlatforms: ['android'] }
57
+ );
package/src/index.tsx CHANGED
@@ -3,3 +3,9 @@ export * from './ReactNativeBlurViewNativeComponent';
3
3
 
4
4
  export { BlurView as default, BlurView } from './BlurView';
5
5
  export type { BlurViewProps } from './BlurView';
6
+
7
+ export { default as ReactNativeLiquidGlassView } from './ReactNativeLiquidGlassViewNativeComponent';
8
+ export type { GlassType } from './ReactNativeLiquidGlassViewNativeComponent';
9
+
10
+ export { LiquidGlassView } from './LiquidGlassView';
11
+ export type { LiquidGlassViewProps } from './LiquidGlassView';