@sbaiahmed1/react-native-blur 0.1.1 → 0.2.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 (25) hide show
  1. package/README.md +23 -1
  2. package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +6 -12
  3. package/lib/module/BlurView.js +44 -9
  4. package/lib/module/BlurView.js.map +1 -1
  5. package/lib/typescript/src/BlurView.d.ts +6 -1
  6. package/lib/typescript/src/BlurView.d.ts.map +1 -1
  7. package/package.json +6 -2
  8. package/src/BlurView.tsx +39 -10
  9. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerDelegate.java +0 -38
  10. package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerInterface.java +0 -20
  11. package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
  12. package/android/app/build/generated/source/codegen/jni/ReactNativeBlurViewSpec-generated.cpp +0 -22
  13. package/android/app/build/generated/source/codegen/jni/ReactNativeBlurViewSpec.h +0 -24
  14. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.cpp +0 -22
  15. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.h +0 -24
  16. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.cpp +0 -16
  17. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h +0 -23
  18. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.cpp +0 -27
  19. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.h +0 -63
  20. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ReactNativeBlurViewSpecJSI-generated.cpp +0 -17
  21. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ReactNativeBlurViewSpecJSI.h +0 -19
  22. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.cpp +0 -17
  23. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.h +0 -32
  24. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/States.cpp +0 -16
  25. package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/States.h +0 -29
package/README.md CHANGED
@@ -1,7 +1,18 @@
1
1
  # @sbaiahmed1/react-native-blur
2
2
 
3
3
  A modern React Native blur view component that provides native blur effects for both iOS and Android platforms.
4
-
4
+ <div align="center">
5
+ <p>
6
+ <img src="https://img.shields.io/npm/v/@sbaiahmed1/react-native-blur?style=for-the-badge&color=blue" alt="npm version" />
7
+ <img src="https://img.shields.io/npm/dm/@sbaiahmed1/react-native-blur?style=for-the-badge&color=green" alt="downloads" />
8
+ <img src="https://img.shields.io/github/license/sbaiahmed1/react-native-blur?style=for-the-badge&color=orange" alt="license" />
9
+ <img src="https://img.shields.io/github/stars/sbaiahmed1/react-native-blur?style=for-the-badge&color=yellow" alt="stars" />
10
+ </p>
11
+
12
+ <p>
13
+ <img src="https://img.shields.io/badge/New%20Architecture-Ready-purple?style=for-the-badge" alt="New Architecture" />
14
+ </p>
15
+ </div>
5
16
  ## Demo
6
17
 
7
18
  <div align="center">
@@ -217,6 +228,17 @@ See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the
217
228
 
218
229
  MIT
219
230
 
231
+ ## 📊 Stats
232
+
233
+ <div align="center">
234
+ <img src="https://img.shields.io/github/contributors/sbaiahmed1/react-native-blur?style=for-the-badge" alt="contributors" />
235
+ <img src="https://img.shields.io/github/last-commit/sbaiahmed1/react-native-blur?style=for-the-badge" alt="last commit" />
236
+ <img src="https://img.shields.io/github/issues/sbaiahmed1/react-native-blur?style=for-the-badge" alt="issues" />
237
+ <img src="https://img.shields.io/github/issues-pr/sbaiahmed1/react-native-blur?style=for-the-badge" alt="pull requests" />
238
+ </div>
239
+
240
+ ---
241
+
220
242
  ## Credits
221
243
 
222
244
  Built with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
@@ -346,19 +346,13 @@ class ReactNativeBlurView : BlurView {
346
346
  color?.let {
347
347
  try {
348
348
  val fallbackColor = Color.parseColor(it)
349
- // Use fallback color as overlay when accessibility settings require it
350
- // This is a simplified implementation - in a full implementation,
351
- // you'd check system accessibility settings
352
- overlayColor = fallbackColor
353
- logDebug("setReducedTransparencyFallbackColor: $color -> $fallbackColor (isSetup: $isSetup)")
349
+ logDebug("setReducedTransparencyFallbackColor: $color -> $fallbackColor (stored but not applied unless accessibility requires it)")
350
+
351
+ // Store the fallback color but don't apply it unless accessibility settings require it
352
+ // For now, we'll just log it since Android doesn't have a direct equivalent to iOS's
353
+ // "Reduce Transparency" setting that we can easily check
354
+ // The blur effect should remain the primary visual
354
355
 
355
- if (isSetup) {
356
- try {
357
- setOverlayColor(overlayColor)
358
- } catch (e: Exception) {
359
- logError("Failed to set fallback overlay color: ${e.message}", e)
360
- }
361
- }
362
356
  } catch (e: Exception) {
363
357
  logWarning("Invalid color format for reduced transparency fallback: $color")
364
358
  }
@@ -1,14 +1,19 @@
1
1
  "use strict";
2
2
 
3
3
  import React from 'react';
4
+ import { View } from 'react-native';
4
5
  import ReactNativeBlurView from './ReactNativeBlurViewNativeComponent';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
7
  /**
7
8
  * A cross-platform blur view component that provides native blur effects.
8
9
  *
9
10
  * On iOS, this uses UIVisualEffectView for true blur effects.
10
11
  * On Android, this uses the BlurView library for hardware-accelerated blur effects.
11
12
  *
13
+ * This component automatically handles the proper positioning pattern where the blur
14
+ * effect is positioned absolutely behind the content, ensuring interactive elements
15
+ * work correctly.
16
+ *
12
17
  * @example
13
18
  * ```tsx
14
19
  * <BlurView
@@ -16,7 +21,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
21
  * blurAmount={20}
17
22
  * style={{ flex: 1 }}
18
23
  * >
19
- * <Text>Content behind blur</Text>
24
+ * <Text>Content on top of blur</Text>
25
+ * <Button title="Interactive Button" onPress={() => {}} />
20
26
  * </BlurView>
21
27
  * ```
22
28
  */
@@ -28,13 +34,42 @@ export const BlurView = ({
28
34
  children,
29
35
  ...props
30
36
  }) => {
31
- return /*#__PURE__*/_jsx(ReactNativeBlurView, {
32
- blurType: blurType,
33
- blurAmount: blurAmount,
34
- reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
35
- style: style,
36
- ...props,
37
- children: children
37
+ // If no children, render the blur view directly (for background use)
38
+ if (React.Children.count(children) === 0) {
39
+ return /*#__PURE__*/_jsx(ReactNativeBlurView, {
40
+ blurType: blurType,
41
+ blurAmount: blurAmount,
42
+ reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
43
+ style: style,
44
+ ...props
45
+ });
46
+ }
47
+
48
+ // If children exist, use the absolute positioning pattern
49
+ return /*#__PURE__*/_jsxs(View, {
50
+ style: [{
51
+ position: 'relative',
52
+ overflow: 'hidden'
53
+ }, style],
54
+ children: [/*#__PURE__*/_jsx(ReactNativeBlurView, {
55
+ blurType: blurType,
56
+ blurAmount: blurAmount,
57
+ reducedTransparencyFallbackColor: reducedTransparencyFallbackColor,
58
+ style: {
59
+ position: 'absolute',
60
+ top: 0,
61
+ left: 0,
62
+ right: 0,
63
+ bottom: 0
64
+ },
65
+ ...props
66
+ }), /*#__PURE__*/_jsx(View, {
67
+ style: {
68
+ position: 'relative',
69
+ zIndex: 1
70
+ },
71
+ children: children
72
+ })]
38
73
  });
39
74
  };
40
75
  export default BlurView;
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReactNativeBlurView","jsx","_jsx","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","style","children","props"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,OAAOC,mBAAmB,MAEnB,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAgC9C;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,OAAO;EAClBC,UAAU,GAAG,EAAE;EACfC,gCAAgC;EAChCC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACL,CAAC,KAAK;EACJ,oBACEP,IAAA,CAACF,mBAAmB;IAClBI,QAAQ,EAAEA,QAAS;IACnBC,UAAU,EAAEA,UAAW;IACvBC,gCAAgC,EAAEA,gCAAiC;IACnEC,KAAK,EAAEA,KAAM;IAAA,GACTE,KAAK;IAAAD,QAAA,EAERA;EAAQ,CACU,CAAC;AAE1B,CAAC;AAED,eAAeL,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["React","View","ReactNativeBlurView","jsx","_jsx","jsxs","_jsxs","BlurView","blurType","blurAmount","reducedTransparencyFallbackColor","style","children","props","Children","count","position","overflow","top","left","right","bottom","zIndex"],"sourceRoot":"../../src","sources":["BlurView.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,OAAOC,mBAAmB,MAEnB,sCAAsC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgC9C;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,OAAO;EAClBC,UAAU,GAAG,EAAE;EACfC,gCAAgC;EAChCC,KAAK;EACLC,QAAQ;EACR,GAAGC;AACL,CAAC,KAAK;EACJ;EACA,IAAIb,KAAK,CAACc,QAAQ,CAACC,KAAK,CAACH,QAAQ,CAAC,KAAK,CAAC,EAAE;IACxC,oBACER,IAAA,CAACF,mBAAmB;MAClBM,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,gCAAgC,EAAEA,gCAAiC;MACnEC,KAAK,EAAEA,KAAM;MAAA,GACTE;IAAK,CACV,CAAC;EAEN;;EAEA;EACA,oBACEP,KAAA,CAACL,IAAI;IAACU,KAAK,EAAE,CAAC;MAAEK,QAAQ,EAAE,UAAU;MAAEC,QAAQ,EAAE;IAAS,CAAC,EAAEN,KAAK,CAAE;IAAAC,QAAA,gBAEjER,IAAA,CAACF,mBAAmB;MAClBM,QAAQ,EAAEA,QAAS;MACnBC,UAAU,EAAEA,UAAW;MACvBC,gCAAgC,EAAEA,gCAAiC;MACnEC,KAAK,EAAE;QACLK,QAAQ,EAAE,UAAU;QACpBE,GAAG,EAAE,CAAC;QACNC,IAAI,EAAE,CAAC;QACPC,KAAK,EAAE,CAAC;QACRC,MAAM,EAAE;MACV,CAAE;MAAA,GACER;IAAK,CACV,CAAC,eAEFT,IAAA,CAACH,IAAI;MAACU,KAAK,EAAE;QAAEK,QAAQ,EAAE,UAAU;QAAEM,MAAM,EAAE;MAAE,CAAE;MAAAV,QAAA,EAAEA;IAAQ,CAAO,CAAC;EAAA,CAC/D,CAAC;AAEX,CAAC;AAED,eAAeL,QAAQ","ignoreList":[]}
@@ -32,6 +32,10 @@ export interface BlurViewProps {
32
32
  * On iOS, this uses UIVisualEffectView for true blur effects.
33
33
  * On Android, this uses the BlurView library for hardware-accelerated blur effects.
34
34
  *
35
+ * This component automatically handles the proper positioning pattern where the blur
36
+ * effect is positioned absolutely behind the content, ensuring interactive elements
37
+ * work correctly.
38
+ *
35
39
  * @example
36
40
  * ```tsx
37
41
  * <BlurView
@@ -39,7 +43,8 @@ export interface BlurViewProps {
39
43
  * blurAmount={20}
40
44
  * style={{ flex: 1 }}
41
45
  * >
42
- * <Text>Content behind blur</Text>
46
+ * <Text>Content on top of blur</Text>
47
+ * <Button title="Interactive Button" onPress={() => {}} />
43
48
  * </BlurView>
44
49
  * ```
45
50
  */
@@ -1 +1 @@
1
- {"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../src/BlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAA4B,EAC1B,KAAK,QAAQ,EACd,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmB5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"BlurView.d.ts","sourceRoot":"","sources":["../../../src/BlurView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAA4B,EAC1B,KAAK,QAAQ,EACd,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,gCAAgC,CAAC,EAAE,MAAM,CAAC;IAE1C;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CA0C5C,CAAC;AAEF,eAAe,QAAQ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sbaiahmed1/react-native-blur",
3
- "version": "0.1.1",
3
+ "version": "0.2.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",
@@ -43,7 +43,11 @@
43
43
  "keywords": [
44
44
  "react-native",
45
45
  "ios",
46
- "android"
46
+ "android",
47
+ "blur",
48
+ "react blur",
49
+ "react native blur",
50
+ "modern blur"
47
51
  ],
48
52
  "repository": {
49
53
  "type": "git",
package/src/BlurView.tsx CHANGED
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { View } from 'react-native';
2
3
  import type { ViewStyle, StyleProp } from 'react-native';
3
4
  import ReactNativeBlurView, {
4
5
  type BlurType,
@@ -40,6 +41,10 @@ export interface BlurViewProps {
40
41
  * On iOS, this uses UIVisualEffectView for true blur effects.
41
42
  * On Android, this uses the BlurView library for hardware-accelerated blur effects.
42
43
  *
44
+ * This component automatically handles the proper positioning pattern where the blur
45
+ * effect is positioned absolutely behind the content, ensuring interactive elements
46
+ * work correctly.
47
+ *
43
48
  * @example
44
49
  * ```tsx
45
50
  * <BlurView
@@ -47,7 +52,8 @@ export interface BlurViewProps {
47
52
  * blurAmount={20}
48
53
  * style={{ flex: 1 }}
49
54
  * >
50
- * <Text>Content behind blur</Text>
55
+ * <Text>Content on top of blur</Text>
56
+ * <Button title="Interactive Button" onPress={() => {}} />
51
57
  * </BlurView>
52
58
  * ```
53
59
  */
@@ -59,16 +65,39 @@ export const BlurView: React.FC<BlurViewProps> = ({
59
65
  children,
60
66
  ...props
61
67
  }) => {
68
+ // If no children, render the blur view directly (for background use)
69
+ if (React.Children.count(children) === 0) {
70
+ return (
71
+ <ReactNativeBlurView
72
+ blurType={blurType}
73
+ blurAmount={blurAmount}
74
+ reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
75
+ style={style}
76
+ {...props}
77
+ />
78
+ );
79
+ }
80
+
81
+ // If children exist, use the absolute positioning pattern
62
82
  return (
63
- <ReactNativeBlurView
64
- blurType={blurType}
65
- blurAmount={blurAmount}
66
- reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
67
- style={style}
68
- {...props}
69
- >
70
- {children}
71
- </ReactNativeBlurView>
83
+ <View style={[{ position: 'relative', overflow: 'hidden' }, style]}>
84
+ {/* Blur effect positioned absolutely behind content */}
85
+ <ReactNativeBlurView
86
+ blurType={blurType}
87
+ blurAmount={blurAmount}
88
+ reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
89
+ style={{
90
+ position: 'absolute',
91
+ top: 0,
92
+ left: 0,
93
+ right: 0,
94
+ bottom: 0,
95
+ }}
96
+ {...props}
97
+ />
98
+ {/* Content positioned relatively on top */}
99
+ <View style={{ position: 'relative', zIndex: 1 }}>{children}</View>
100
+ </View>
72
101
  );
73
102
  };
74
103
 
@@ -1,38 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GeneratePropsJavaDelegate.js
8
- */
9
-
10
- package com.facebook.react.viewmanagers;
11
-
12
- import android.view.View;
13
- import androidx.annotation.Nullable;
14
- import com.facebook.react.uimanager.BaseViewManager;
15
- import com.facebook.react.uimanager.BaseViewManagerDelegate;
16
- import com.facebook.react.uimanager.LayoutShadowNode;
17
-
18
- public class ReactNativeBlurViewManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & ReactNativeBlurViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
19
- public ReactNativeBlurViewManagerDelegate(U viewManager) {
20
- super(viewManager);
21
- }
22
- @Override
23
- public void setProperty(T view, String propName, @Nullable Object value) {
24
- switch (propName) {
25
- case "blurType":
26
- mViewManager.setBlurType(view, (String) value);
27
- break;
28
- case "blurAmount":
29
- mViewManager.setBlurAmount(view, value == null ? 10f : ((Double) value).doubleValue());
30
- break;
31
- case "reducedTransparencyFallbackColor":
32
- mViewManager.setReducedTransparencyFallbackColor(view, value == null ? null : (String) value);
33
- break;
34
- default:
35
- super.setProperty(view, propName, value);
36
- }
37
- }
38
- }
@@ -1,20 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GeneratePropsJavaInterface.js
8
- */
9
-
10
- package com.facebook.react.viewmanagers;
11
-
12
- import android.view.View;
13
- import androidx.annotation.Nullable;
14
- import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
15
-
16
- public interface ReactNativeBlurViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
17
- void setBlurType(T view, @Nullable String value);
18
- void setBlurAmount(T view, double value);
19
- void setReducedTransparencyFallbackColor(T view, @Nullable String value);
20
- }
@@ -1,36 +0,0 @@
1
- # Copyright (c) Meta Platforms, Inc. and affiliates.
2
- #
3
- # This source code is licensed under the MIT license found in the
4
- # LICENSE file in the root directory of this source tree.
5
-
6
- cmake_minimum_required(VERSION 3.13)
7
- set(CMAKE_VERBOSE_MAKEFILE on)
8
-
9
- file(GLOB react_codegen_SRCS CONFIGURE_DEPENDS *.cpp react/renderer/components/ReactNativeBlurViewSpec/*.cpp)
10
-
11
- add_library(
12
- react_codegen_ReactNativeBlurViewSpec
13
- OBJECT
14
- ${react_codegen_SRCS}
15
- )
16
-
17
- target_include_directories(react_codegen_ReactNativeBlurViewSpec PUBLIC . react/renderer/components/ReactNativeBlurViewSpec)
18
-
19
- target_link_libraries(
20
- react_codegen_ReactNativeBlurViewSpec
21
- fbjni
22
- jsi
23
- # We need to link different libraries based on whether we are building rncore or not, that's necessary
24
- # because we want to break a circular dependency between react_codegen_rncore and reactnative
25
- reactnative
26
- )
27
-
28
- target_compile_options(
29
- react_codegen_ReactNativeBlurViewSpec
30
- PRIVATE
31
- -DLOG_TAG=\"ReactNative\"
32
- -fexceptions
33
- -frtti
34
- -std=c++20
35
- -Wall
36
- )
@@ -1,22 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateModuleJniCpp.js
9
- */
10
-
11
- #include "ReactNativeBlurViewSpec.h"
12
-
13
- namespace facebook::react {
14
-
15
-
16
-
17
- std::shared_ptr<TurboModule> ReactNativeBlurViewSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params) {
18
-
19
- return nullptr;
20
- }
21
-
22
- } // namespace facebook::react
@@ -1,24 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateModuleJniH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include <ReactCommon/JavaTurboModule.h>
14
- #include <ReactCommon/TurboModule.h>
15
- #include <jsi/jsi.h>
16
-
17
- namespace facebook::react {
18
-
19
-
20
-
21
- JSI_EXPORT
22
- std::shared_ptr<TurboModule> ReactNativeBlurViewSpec_ModuleProvider(const std::string &moduleName, const JavaTurboModule::InitParams &params);
23
-
24
- } // namespace facebook::react
@@ -1,22 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateComponentDescriptorCpp.js
9
- */
10
-
11
- #include <react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.h>
12
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
13
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
14
-
15
- namespace facebook::react {
16
-
17
- void ReactNativeBlurViewSpec_registerComponentDescriptorsFromCodegen(
18
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry) {
19
- registry->add(concreteComponentDescriptorProvider<ReactNativeBlurViewComponentDescriptor>());
20
- }
21
-
22
- } // namespace facebook::react
@@ -1,24 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateComponentDescriptorH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include <react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.h>
14
- #include <react/renderer/core/ConcreteComponentDescriptor.h>
15
- #include <react/renderer/componentregistry/ComponentDescriptorProviderRegistry.h>
16
-
17
- namespace facebook::react {
18
-
19
- using ReactNativeBlurViewComponentDescriptor = ConcreteComponentDescriptor<ReactNativeBlurViewShadowNode>;
20
-
21
- void ReactNativeBlurViewSpec_registerComponentDescriptorsFromCodegen(
22
- std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
23
-
24
- } // namespace facebook::react
@@ -1,16 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterCpp.js
9
- */
10
-
11
- #include <react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h>
12
-
13
-
14
- namespace facebook::react {
15
-
16
- } // namespace facebook::react
@@ -1,23 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateEventEmitterH.js
9
- */
10
- #pragma once
11
-
12
- #include <react/renderer/components/view/ViewEventEmitter.h>
13
-
14
-
15
- namespace facebook::react {
16
- class ReactNativeBlurViewEventEmitter : public ViewEventEmitter {
17
- public:
18
- using ViewEventEmitter::ViewEventEmitter;
19
-
20
-
21
-
22
- };
23
- } // namespace facebook::react
@@ -1,27 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsCpp.js
9
- */
10
-
11
- #include <react/renderer/components/ReactNativeBlurViewSpec/Props.h>
12
- #include <react/renderer/core/PropsParserContext.h>
13
- #include <react/renderer/core/propsConversions.h>
14
-
15
- namespace facebook::react {
16
-
17
- ReactNativeBlurViewProps::ReactNativeBlurViewProps(
18
- const PropsParserContext &context,
19
- const ReactNativeBlurViewProps &sourceProps,
20
- const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
21
-
22
- blurType(convertRawProp(context, rawProps, "blurType", sourceProps.blurType, {ReactNativeBlurViewBlurType::Light})),
23
- blurAmount(convertRawProp(context, rawProps, "blurAmount", sourceProps.blurAmount, {10.0})),
24
- reducedTransparencyFallbackColor(convertRawProp(context, rawProps, "reducedTransparencyFallbackColor", sourceProps.reducedTransparencyFallbackColor, {}))
25
- {}
26
-
27
- } // namespace facebook::react
@@ -1,63 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GeneratePropsH.js
9
- */
10
- #pragma once
11
-
12
- #include <react/renderer/components/view/ViewProps.h>
13
- #include <react/renderer/core/PropsParserContext.h>
14
-
15
- namespace facebook::react {
16
-
17
- enum class ReactNativeBlurViewBlurType { Xlight, Light, Dark, ExtraDark, Regular, Prominent, SystemUltraThinMaterial, SystemThinMaterial, SystemMaterial, SystemThickMaterial, SystemChromeMaterial };
18
-
19
- static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ReactNativeBlurViewBlurType &result) {
20
- auto string = (std::string)value;
21
- if (string == "xlight") { result = ReactNativeBlurViewBlurType::Xlight; return; }
22
- if (string == "light") { result = ReactNativeBlurViewBlurType::Light; return; }
23
- if (string == "dark") { result = ReactNativeBlurViewBlurType::Dark; return; }
24
- if (string == "extraDark") { result = ReactNativeBlurViewBlurType::ExtraDark; return; }
25
- if (string == "regular") { result = ReactNativeBlurViewBlurType::Regular; return; }
26
- if (string == "prominent") { result = ReactNativeBlurViewBlurType::Prominent; return; }
27
- if (string == "systemUltraThinMaterial") { result = ReactNativeBlurViewBlurType::SystemUltraThinMaterial; return; }
28
- if (string == "systemThinMaterial") { result = ReactNativeBlurViewBlurType::SystemThinMaterial; return; }
29
- if (string == "systemMaterial") { result = ReactNativeBlurViewBlurType::SystemMaterial; return; }
30
- if (string == "systemThickMaterial") { result = ReactNativeBlurViewBlurType::SystemThickMaterial; return; }
31
- if (string == "systemChromeMaterial") { result = ReactNativeBlurViewBlurType::SystemChromeMaterial; return; }
32
- abort();
33
- }
34
-
35
- static inline std::string toString(const ReactNativeBlurViewBlurType &value) {
36
- switch (value) {
37
- case ReactNativeBlurViewBlurType::Xlight: return "xlight";
38
- case ReactNativeBlurViewBlurType::Light: return "light";
39
- case ReactNativeBlurViewBlurType::Dark: return "dark";
40
- case ReactNativeBlurViewBlurType::ExtraDark: return "extraDark";
41
- case ReactNativeBlurViewBlurType::Regular: return "regular";
42
- case ReactNativeBlurViewBlurType::Prominent: return "prominent";
43
- case ReactNativeBlurViewBlurType::SystemUltraThinMaterial: return "systemUltraThinMaterial";
44
- case ReactNativeBlurViewBlurType::SystemThinMaterial: return "systemThinMaterial";
45
- case ReactNativeBlurViewBlurType::SystemMaterial: return "systemMaterial";
46
- case ReactNativeBlurViewBlurType::SystemThickMaterial: return "systemThickMaterial";
47
- case ReactNativeBlurViewBlurType::SystemChromeMaterial: return "systemChromeMaterial";
48
- }
49
- }
50
-
51
- class ReactNativeBlurViewProps final : public ViewProps {
52
- public:
53
- ReactNativeBlurViewProps() = default;
54
- ReactNativeBlurViewProps(const PropsParserContext& context, const ReactNativeBlurViewProps &sourceProps, const RawProps &rawProps);
55
-
56
- #pragma mark - Props
57
-
58
- ReactNativeBlurViewBlurType blurType{ReactNativeBlurViewBlurType::Light};
59
- double blurAmount{10.0};
60
- std::string reducedTransparencyFallbackColor{};
61
- };
62
-
63
- } // namespace facebook::react
@@ -1,17 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleCpp.js
8
- */
9
-
10
- #include "ReactNativeBlurViewSpecJSI.h"
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
-
17
- } // namespace facebook::react
@@ -1,19 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateModuleH.js
8
- */
9
-
10
- #pragma once
11
-
12
- #include <ReactCommon/TurboModule.h>
13
- #include <react/bridging/Bridging.h>
14
-
15
- namespace facebook::react {
16
-
17
-
18
-
19
- } // namespace facebook::react
@@ -1,17 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeCpp.js
9
- */
10
-
11
- #include <react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.h>
12
-
13
- namespace facebook::react {
14
-
15
- extern const char ReactNativeBlurViewComponentName[] = "ReactNativeBlurView";
16
-
17
- } // namespace facebook::react
@@ -1,32 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateShadowNodeH.js
9
- */
10
-
11
- #pragma once
12
-
13
- #include <react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h>
14
- #include <react/renderer/components/ReactNativeBlurViewSpec/Props.h>
15
- #include <react/renderer/components/ReactNativeBlurViewSpec/States.h>
16
- #include <react/renderer/components/view/ConcreteViewShadowNode.h>
17
- #include <jsi/jsi.h>
18
-
19
- namespace facebook::react {
20
-
21
- JSI_EXPORT extern const char ReactNativeBlurViewComponentName[];
22
-
23
- /*
24
- * `ShadowNode` for <ReactNativeBlurView> component.
25
- */
26
- using ReactNativeBlurViewShadowNode = ConcreteViewShadowNode<
27
- ReactNativeBlurViewComponentName,
28
- ReactNativeBlurViewProps,
29
- ReactNativeBlurViewEventEmitter,
30
- ReactNativeBlurViewState>;
31
-
32
- } // namespace facebook::react
@@ -1,16 +0,0 @@
1
-
2
- /**
3
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
4
- *
5
- * Do not edit this file as changes may cause incorrect behavior and will be lost
6
- * once the code is regenerated.
7
- *
8
- * @generated by codegen project: GenerateStateCpp.js
9
- */
10
- #include <react/renderer/components/ReactNativeBlurViewSpec/States.h>
11
-
12
- namespace facebook::react {
13
-
14
-
15
-
16
- } // namespace facebook::react
@@ -1,29 +0,0 @@
1
- /**
2
- * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
3
- *
4
- * Do not edit this file as changes may cause incorrect behavior and will be lost
5
- * once the code is regenerated.
6
- *
7
- * @generated by codegen project: GenerateStateH.js
8
- */
9
- #pragma once
10
-
11
- #ifdef ANDROID
12
- #include <folly/dynamic.h>
13
- #endif
14
-
15
- namespace facebook::react {
16
-
17
- class ReactNativeBlurViewState {
18
- public:
19
- ReactNativeBlurViewState() = default;
20
-
21
- #ifdef ANDROID
22
- ReactNativeBlurViewState(ReactNativeBlurViewState const &previousState, folly::dynamic data){};
23
- folly::dynamic getDynamic() const {
24
- return {};
25
- };
26
- #endif
27
- };
28
-
29
- } // namespace facebook::react