@sbaiahmed1/react-native-blur 4.5.3 → 4.5.5-beta.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/README.md +8 -8
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +147 -35
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurView.kt +128 -19
- package/package.json +1 -1
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerDelegate.java +0 -53
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeBlurViewManagerInterface.java +0 -25
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassEffectContainerManagerDelegate.java +0 -53
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassEffectContainerManagerInterface.java +0 -25
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassViewManagerDelegate.java +0 -38
- package/android/app/build/generated/source/codegen/java/com/facebook/react/viewmanagers/ReactNativeGlassViewManagerInterface.java +0 -20
- package/android/app/build/generated/source/codegen/jni/CMakeLists.txt +0 -36
- package/android/app/build/generated/source/codegen/jni/ReactNativeBlurViewSpec-generated.cpp +0 -22
- package/android/app/build/generated/source/codegen/jni/ReactNativeBlurViewSpec.h +0 -24
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.cpp +0 -23
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ComponentDescriptors.h +0 -25
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.cpp +0 -17
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h +0 -30
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.cpp +0 -46
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/Props.h +0 -131
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ReactNativeBlurViewSpecJSI-generated.cpp +0 -17
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ReactNativeBlurViewSpecJSI.h +0 -19
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.cpp +0 -18
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/ShadowNodes.h +0 -43
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/States.cpp +0 -16
- package/android/app/build/generated/source/codegen/jni/react/renderer/components/ReactNativeBlurViewSpec/States.h +0 -41
package/README.md
CHANGED
|
@@ -53,13 +53,13 @@ A modern React Native library providing **six specialized components** for advan
|
|
|
53
53
|
|
|
54
54
|
## Requirements
|
|
55
55
|
|
|
56
|
-
| Platform | Minimum Version
|
|
57
|
-
| -------------------------
|
|
58
|
-
| **iOS** | iOS 13.0+
|
|
59
|
-
| **Xcode** | Xcode 26.0+ (for liquid glass support) |
|
|
60
|
-
| **React Native** | 0.68+ (New Architecture)
|
|
61
|
-
| **Android** | API 24+ (Android 7.0)
|
|
62
|
-
| **Android Gradle Plugin** | 8.9.1+
|
|
56
|
+
| Platform | Minimum Version |
|
|
57
|
+
| ------------------------- |-------------------------------------------------------|
|
|
58
|
+
| **iOS** | iOS 13.0+ |
|
|
59
|
+
| **Xcode** | min: Xcode 16; Xcode 26.0+ (for liquid glass support) |
|
|
60
|
+
| **React Native** | 0.68+ (New Architecture) |
|
|
61
|
+
| **Android** | API 24+ (Android 7.0) |
|
|
62
|
+
| **Android Gradle Plugin** | 8.9.1+ |
|
|
63
63
|
|
|
64
64
|
> ⚠️ **Note**: LiquidGlassView requires Xcode 26.0+ and iOS 26+ for full glass effects. The component automatically falls back to enhanced blur on older versions.
|
|
65
65
|
|
|
@@ -265,7 +265,7 @@ The library uses native Android blur with automatic platform detection. No addit
|
|
|
265
265
|
> 📦 **Dependency**: The library uses [QmBlurView](https://github.com/QmDeve/QmBlurView) from Maven Central:
|
|
266
266
|
>
|
|
267
267
|
> ```gradle
|
|
268
|
-
> implementation 'com.qmdeve.blurview:core:1.1.
|
|
268
|
+
> implementation 'com.qmdeve.blurview:core:1.1.4'
|
|
269
269
|
> ```
|
|
270
270
|
|
|
271
271
|
The implementation automatically handles different Android versions:
|
package/android/build.gradle
CHANGED
|
@@ -74,7 +74,7 @@ def kotlin_version = getExtOrDefault("kotlinVersion")
|
|
|
74
74
|
dependencies {
|
|
75
75
|
implementation "com.facebook.react:react-android"
|
|
76
76
|
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
|
77
|
-
implementation 'com.qmdeve.blurview:core:1.1.
|
|
77
|
+
implementation 'com.qmdeve.blurview:core:1.1.4'
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
react {
|
|
@@ -3,15 +3,15 @@ package com.sbaiahmed1.reactnativeblur
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.graphics.Color
|
|
5
5
|
import android.graphics.Outline
|
|
6
|
-
import android.os.Build
|
|
7
6
|
import android.util.AttributeSet
|
|
8
7
|
import android.util.Log
|
|
9
8
|
import android.util.TypedValue
|
|
10
9
|
import android.view.View
|
|
11
10
|
import android.view.ViewGroup
|
|
12
11
|
import android.view.ViewOutlineProvider
|
|
13
|
-
import
|
|
12
|
+
import android.view.ViewTreeObserver
|
|
14
13
|
import com.qmdeve.blurview.widget.BlurViewGroup
|
|
14
|
+
import com.qmdeve.blurview.base.BaseBlurViewGroup
|
|
15
15
|
import androidx.core.graphics.toColorInt
|
|
16
16
|
|
|
17
17
|
import android.view.View.MeasureSpec
|
|
@@ -22,6 +22,10 @@ import android.view.View.MeasureSpec
|
|
|
22
22
|
*
|
|
23
23
|
* QmBlurView is a high-performance blur library that uses native blur algorithms
|
|
24
24
|
* implemented with underlying Native calls for optimal performance.
|
|
25
|
+
*
|
|
26
|
+
* Uses reflection to redirect the blur capture root from the activity decor view
|
|
27
|
+
* to the nearest react-native-screens Screen ancestor, preventing flickering and
|
|
28
|
+
* wrong frame capture during navigation transitions.
|
|
25
29
|
*/
|
|
26
30
|
class ReactNativeBlurView : BlurViewGroup {
|
|
27
31
|
private var currentBlurRadius = DEFAULT_BLUR_RADIUS
|
|
@@ -31,12 +35,13 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
31
35
|
private var glassOpacity: Float = 1.0f
|
|
32
36
|
private var viewType: String = "blur"
|
|
33
37
|
private var glassType: String = "clear"
|
|
38
|
+
private var isBlurInitialized: Boolean = false
|
|
34
39
|
|
|
35
40
|
companion object {
|
|
36
41
|
private const val TAG = "ReactNativeBlurView"
|
|
37
42
|
private const val MAX_BLUR_RADIUS = 100f
|
|
38
43
|
private const val DEFAULT_BLUR_RADIUS = 10f
|
|
39
|
-
private const val DEBUG = false
|
|
44
|
+
private const val DEBUG = false
|
|
40
45
|
|
|
41
46
|
// Cross-platform blur amount constants
|
|
42
47
|
private const val MIN_BLUR_AMOUNT = 0f
|
|
@@ -69,32 +74,149 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
69
74
|
}
|
|
70
75
|
|
|
71
76
|
constructor(context: Context?) : super(context, null) {
|
|
72
|
-
|
|
77
|
+
setupView()
|
|
73
78
|
}
|
|
74
79
|
|
|
75
80
|
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs) {
|
|
76
|
-
|
|
81
|
+
setupView()
|
|
77
82
|
}
|
|
78
83
|
|
|
79
84
|
/**
|
|
80
|
-
*
|
|
81
|
-
*
|
|
85
|
+
* Initial view setup in constructor - only sets up visual defaults.
|
|
86
|
+
* Blur initialization is deferred to onAttachedToWindow to ensure the
|
|
87
|
+
* view hierarchy is fully mounted, preventing flickering and wrong frame capture.
|
|
82
88
|
*/
|
|
83
|
-
private fun
|
|
89
|
+
private fun setupView() {
|
|
90
|
+
super.setBackgroundColor(currentOverlayColor)
|
|
91
|
+
clipChildren = true
|
|
92
|
+
clipToOutline = true
|
|
93
|
+
super.setDownsampleFactor(6.0F)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Called when the view is attached to a window.
|
|
98
|
+
* After QmBlurView's onAttachedToWindow sets the decor view as blur root,
|
|
99
|
+
* we use reflection to redirect it to the nearest Screen ancestor.
|
|
100
|
+
* This scopes the blur capture to just the current screen, preventing
|
|
101
|
+
* navigation transition artifacts.
|
|
102
|
+
*/
|
|
103
|
+
override fun onAttachedToWindow() {
|
|
104
|
+
super.onAttachedToWindow()
|
|
105
|
+
|
|
106
|
+
// Defer the blur root swap to next frame so the view tree is fully mounted
|
|
107
|
+
post {
|
|
108
|
+
swapBlurRootToScreenAncestor()
|
|
109
|
+
initializeBlur()
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Uses reflection to redirect QmBlurView's internal blur capture root
|
|
115
|
+
* from the activity decor view to the nearest react-native-screens Screen ancestor.
|
|
116
|
+
*
|
|
117
|
+
* Reflection path: BlurViewGroup.mBaseBlurViewGroup -> BaseBlurViewGroup.mDecorView
|
|
118
|
+
* Also moves the OnPreDrawListener from the old root to the new one.
|
|
119
|
+
*/
|
|
120
|
+
private fun swapBlurRootToScreenAncestor() {
|
|
121
|
+
val newRoot = findOptimalBlurRoot() ?: return
|
|
122
|
+
|
|
84
123
|
try {
|
|
85
|
-
//
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
124
|
+
// Step 1: Get BlurViewGroup's private mBaseBlurViewGroup field
|
|
125
|
+
val blurViewGroupClass = BlurViewGroup::class.java
|
|
126
|
+
val baseField = blurViewGroupClass.getDeclaredField("mBaseBlurViewGroup")
|
|
127
|
+
baseField.isAccessible = true
|
|
128
|
+
val baseBlurViewGroup = baseField.get(this) ?: return
|
|
129
|
+
|
|
130
|
+
// Step 2: Get BaseBlurViewGroup's private fields
|
|
131
|
+
val baseClass = BaseBlurViewGroup::class.java
|
|
132
|
+
|
|
133
|
+
val decorViewField = baseClass.getDeclaredField("mDecorView")
|
|
134
|
+
decorViewField.isAccessible = true
|
|
135
|
+
val oldDecorView = decorViewField.get(baseBlurViewGroup) as? View
|
|
136
|
+
|
|
137
|
+
val preDrawListenerField = baseClass.getDeclaredField("preDrawListener")
|
|
138
|
+
preDrawListenerField.isAccessible = true
|
|
139
|
+
val preDrawListener = preDrawListenerField.get(baseBlurViewGroup) as? ViewTreeObserver.OnPreDrawListener
|
|
140
|
+
|
|
141
|
+
if (preDrawListener != null && oldDecorView != null) {
|
|
142
|
+
// Step 3: Remove listener from old root's ViewTreeObserver
|
|
143
|
+
try {
|
|
144
|
+
oldDecorView.viewTreeObserver.removeOnPreDrawListener(preDrawListener)
|
|
145
|
+
} catch (e: Exception) {
|
|
146
|
+
logDebug("Could not remove old pre-draw listener: ${e.message}")
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Step 4: Set new root as mDecorView
|
|
150
|
+
decorViewField.set(baseBlurViewGroup, newRoot)
|
|
151
|
+
|
|
152
|
+
// Step 5: Add listener to new root's ViewTreeObserver
|
|
153
|
+
newRoot.viewTreeObserver.addOnPreDrawListener(preDrawListener)
|
|
154
|
+
|
|
155
|
+
// Step 6: Update mDifferentRoot flag
|
|
156
|
+
val differentRootField = baseClass.getDeclaredField("mDifferentRoot")
|
|
157
|
+
differentRootField.isAccessible = true
|
|
158
|
+
differentRootField.setBoolean(baseBlurViewGroup, newRoot.rootView != this.rootView)
|
|
90
159
|
|
|
91
|
-
|
|
160
|
+
// Step 7: Force a redraw
|
|
161
|
+
val forceRedrawField = baseClass.getDeclaredField("mForceRedraw")
|
|
162
|
+
forceRedrawField.isAccessible = true
|
|
163
|
+
forceRedrawField.setBoolean(baseBlurViewGroup, true)
|
|
92
164
|
|
|
93
|
-
|
|
94
|
-
super.setBackgroundColor(currentOverlayColor)
|
|
165
|
+
logDebug("Swapped blur root to: ${newRoot.javaClass.simpleName} (was: ${oldDecorView.javaClass.simpleName})")
|
|
95
166
|
}
|
|
167
|
+
} catch (e: NoSuchFieldException) {
|
|
168
|
+
logWarning("Reflection failed - QmBlurView field not found: ${e.message}. Falling back to decor view.")
|
|
169
|
+
} catch (e: Exception) {
|
|
170
|
+
logWarning("Failed to swap blur root: ${e.message}. Falling back to decor view.")
|
|
171
|
+
}
|
|
172
|
+
}
|
|
96
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Finds the optimal view to use as blur capture root.
|
|
176
|
+
* Priority: nearest react-native-screens Screen > android.R.id.content > parent
|
|
177
|
+
*/
|
|
178
|
+
private fun findOptimalBlurRoot(): ViewGroup? {
|
|
179
|
+
return findNearestScreenAncestor() ?: getContentViewFallback()
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Walks up the view hierarchy looking for react-native-screens Screen components
|
|
184
|
+
* using class name detection to avoid hard dependencies on react-native-screens.
|
|
185
|
+
*/
|
|
186
|
+
private fun findNearestScreenAncestor(): ViewGroup? {
|
|
187
|
+
var currentParent = this.parent
|
|
188
|
+
while (currentParent != null) {
|
|
189
|
+
if (currentParent.javaClass.name == "com.swmansion.rnscreens.Screen") {
|
|
190
|
+
return currentParent as? ViewGroup
|
|
191
|
+
}
|
|
192
|
+
currentParent = currentParent.parent
|
|
193
|
+
}
|
|
194
|
+
return null
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Falls back to android.R.id.content or the activity root view.
|
|
199
|
+
*/
|
|
200
|
+
private fun getContentViewFallback(): ViewGroup? {
|
|
201
|
+
try {
|
|
202
|
+
val activity = context as? android.app.Activity
|
|
203
|
+
activity?.findViewById<ViewGroup>(android.R.id.content)?.let { return it }
|
|
204
|
+
} catch (e: Exception) {
|
|
205
|
+
logDebug("Could not access activity content view: ${e.message}")
|
|
206
|
+
}
|
|
207
|
+
return this.parent as? ViewGroup
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Initialize the blur view with current settings.
|
|
212
|
+
* Called after the view is attached and the blur root has been swapped.
|
|
213
|
+
*/
|
|
214
|
+
private fun initializeBlur() {
|
|
215
|
+
try {
|
|
216
|
+
super.setBlurRadius(currentBlurRadius)
|
|
217
|
+
super.setOverlayColor(currentOverlayColor)
|
|
97
218
|
updateCornerRadius()
|
|
219
|
+
isBlurInitialized = true
|
|
98
220
|
|
|
99
221
|
logDebug("QmBlurView initialized with blurRadius: $currentBlurRadius, overlayColor: $currentOverlayColor")
|
|
100
222
|
} catch (e: Exception) {
|
|
@@ -104,7 +226,8 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
104
226
|
|
|
105
227
|
/**
|
|
106
228
|
* Called when the view is detached from a window.
|
|
107
|
-
* Performs cleanup to prevent memory leaks
|
|
229
|
+
* Performs cleanup to prevent memory leaks and resets initialization state
|
|
230
|
+
* so blur is re-initialized on next attach (e.g. navigation transitions).
|
|
108
231
|
*/
|
|
109
232
|
override fun onDetachedFromWindow() {
|
|
110
233
|
super.onDetachedFromWindow()
|
|
@@ -116,6 +239,7 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
116
239
|
* Helps prevent memory leaks and ensures clean state.
|
|
117
240
|
*/
|
|
118
241
|
fun cleanup() {
|
|
242
|
+
isBlurInitialized = false
|
|
119
243
|
removeCallbacks(null)
|
|
120
244
|
logDebug("View cleaned up")
|
|
121
245
|
}
|
|
@@ -129,7 +253,6 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
129
253
|
logDebug("setBlurAmount: $amount -> $currentBlurRadius (mapped from 0-100 to 0-25 range)")
|
|
130
254
|
|
|
131
255
|
try {
|
|
132
|
-
// QmBlurView uses setBlurRadius() to set blur intensity
|
|
133
256
|
super.setBlurRadius(currentBlurRadius)
|
|
134
257
|
} catch (e: Exception) {
|
|
135
258
|
logError("Failed to set blur radius: ${e.message}", e)
|
|
@@ -146,12 +269,8 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
146
269
|
logDebug("setBlurType: $type -> ${blurType.name}")
|
|
147
270
|
|
|
148
271
|
try {
|
|
149
|
-
|
|
272
|
+
super.setBackgroundColor(currentOverlayColor)
|
|
150
273
|
super.setOverlayColor(currentOverlayColor)
|
|
151
|
-
|
|
152
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
153
|
-
super.setBackgroundColor(currentOverlayColor)
|
|
154
|
-
}
|
|
155
274
|
} catch (e: Exception) {
|
|
156
275
|
logError("Failed to set overlay color: ${e.message}", e)
|
|
157
276
|
}
|
|
@@ -249,11 +368,8 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
249
368
|
"blur" -> {
|
|
250
369
|
// Restore original blur overlay color
|
|
251
370
|
try {
|
|
371
|
+
super.setBackgroundColor(currentOverlayColor)
|
|
252
372
|
super.setOverlayColor(currentOverlayColor)
|
|
253
|
-
|
|
254
|
-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
255
|
-
super.setBackgroundColor(currentOverlayColor)
|
|
256
|
-
}
|
|
257
373
|
} catch (e: Exception) {
|
|
258
374
|
logError("Failed to restore blur overlay: ${e.message}", e)
|
|
259
375
|
}
|
|
@@ -286,16 +402,12 @@ class ReactNativeBlurView : BlurViewGroup {
|
|
|
286
402
|
context.resources.displayMetrics
|
|
287
403
|
)
|
|
288
404
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
override fun getOutline(view: View, outline: Outline?) {
|
|
293
|
-
outline?.setRoundRect(0, 0, view.width, view.height, radiusInPixels)
|
|
294
|
-
}
|
|
405
|
+
outlineProvider = object : ViewOutlineProvider() {
|
|
406
|
+
override fun getOutline(view: View, outline: Outline?) {
|
|
407
|
+
outline?.setRoundRect(0, 0, view.width, view.height, radiusInPixels)
|
|
295
408
|
}
|
|
296
|
-
|
|
297
|
-
clipToOutline = true
|
|
298
409
|
}
|
|
410
|
+
clipToOutline = true
|
|
299
411
|
|
|
300
412
|
super.setCornerRadius(radiusInPixels)
|
|
301
413
|
logDebug("Updated corner radius: ${currentCornerRadius}dp -> ${radiusInPixels}px")
|
package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurView.kt
CHANGED
|
@@ -10,10 +10,11 @@ import android.graphics.PorterDuffXfermode
|
|
|
10
10
|
import android.graphics.Shader
|
|
11
11
|
import android.util.AttributeSet
|
|
12
12
|
import android.util.Log
|
|
13
|
+
import android.view.View
|
|
14
|
+
import android.view.ViewGroup
|
|
13
15
|
import android.widget.FrameLayout
|
|
14
16
|
import android.view.View.MeasureSpec
|
|
15
17
|
import com.qmdeve.blurview.widget.BlurView
|
|
16
|
-
import androidx.core.graphics.toColorInt
|
|
17
18
|
import kotlin.math.max
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -33,12 +34,13 @@ class ReactNativeProgressiveBlurView : FrameLayout {
|
|
|
33
34
|
private var currentDirection = "topToBottom"
|
|
34
35
|
private var currentStartOffset = 0.0f
|
|
35
36
|
private var hasExplicitBackground: Boolean = false
|
|
37
|
+
private var isBlurInitialized: Boolean = false
|
|
36
38
|
|
|
37
39
|
companion object {
|
|
38
40
|
private const val TAG = "ReactNativeProgressiveBlur"
|
|
39
41
|
private const val MAX_BLUR_RADIUS = 100f
|
|
40
42
|
private const val DEFAULT_BLUR_RADIUS = 10f
|
|
41
|
-
private const val DEBUG =
|
|
43
|
+
private const val DEBUG = false
|
|
42
44
|
|
|
43
45
|
// Cross-platform blur amount constants
|
|
44
46
|
private const val MIN_BLUR_AMOUNT = 0f
|
|
@@ -72,36 +74,69 @@ class ReactNativeProgressiveBlurView : FrameLayout {
|
|
|
72
74
|
}
|
|
73
75
|
|
|
74
76
|
constructor(context: Context) : super(context) {
|
|
75
|
-
|
|
77
|
+
setupView()
|
|
76
78
|
}
|
|
77
79
|
|
|
78
80
|
constructor(context: Context, attrs: AttributeSet?) : super(context, attrs) {
|
|
79
|
-
|
|
81
|
+
setupView()
|
|
80
82
|
}
|
|
81
83
|
|
|
82
84
|
/**
|
|
83
|
-
*
|
|
85
|
+
* Initial view setup in constructor - only sets up visual defaults and gradient paint.
|
|
86
|
+
* Blur child creation is deferred to onAttachedToWindow.
|
|
84
87
|
*/
|
|
85
|
-
private fun
|
|
88
|
+
private fun setupView() {
|
|
89
|
+
// Set up the gradient paint
|
|
90
|
+
gradientPaint.style = Paint.Style.FILL
|
|
91
|
+
setWillNotDraw(false)
|
|
92
|
+
|
|
93
|
+
// Set transparent background for the container
|
|
94
|
+
super.setBackgroundColor(Color.TRANSPARENT)
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Called when the view is attached to a window.
|
|
99
|
+
* Defers blur initialization to the next frame to ensure the view tree is ready.
|
|
100
|
+
*/
|
|
101
|
+
override fun onAttachedToWindow() {
|
|
102
|
+
super.onAttachedToWindow()
|
|
103
|
+
|
|
104
|
+
if (!isBlurInitialized) {
|
|
105
|
+
post {
|
|
106
|
+
initializeBlurChild()
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Initialize the internal blur view child after the view tree is ready.
|
|
113
|
+
* Also swaps the blur capture root to the nearest Screen ancestor.
|
|
114
|
+
*/
|
|
115
|
+
private fun initializeBlurChild() {
|
|
116
|
+
if (isBlurInitialized) return
|
|
117
|
+
|
|
86
118
|
try {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
119
|
+
if (blurView == null) {
|
|
120
|
+
blurView = BlurView(context, null).apply {
|
|
121
|
+
layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)
|
|
122
|
+
setDownsampleFactor(6.0F)
|
|
123
|
+
blurRounds = 3
|
|
124
|
+
}
|
|
125
|
+
addView(blurView)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
blurView?.apply {
|
|
90
129
|
setBlurRadius(currentBlurRadius)
|
|
91
|
-
setDownsampleFactor(6.0F)
|
|
92
|
-
blurRounds = 3
|
|
93
130
|
overlayColor = currentOverlayColor
|
|
94
131
|
setBackgroundColor(currentOverlayColor)
|
|
95
132
|
}
|
|
96
|
-
addView(blurView)
|
|
97
133
|
|
|
98
|
-
//
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// Set transparent background for the container
|
|
103
|
-
super.setBackgroundColor(Color.TRANSPARENT)
|
|
134
|
+
// Swap blur root after BlurView is attached (deferred to let it attach first)
|
|
135
|
+
blurView?.post {
|
|
136
|
+
swapBlurRootToScreenAncestor()
|
|
137
|
+
}
|
|
104
138
|
|
|
139
|
+
isBlurInitialized = true
|
|
105
140
|
logDebug("Initialized progressive blur with blur + gradient approach")
|
|
106
141
|
updateGradient()
|
|
107
142
|
|
|
@@ -110,6 +145,79 @@ class ReactNativeProgressiveBlurView : FrameLayout {
|
|
|
110
145
|
}
|
|
111
146
|
}
|
|
112
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Redirects the internal BlurView's blur capture root from the activity decor view
|
|
150
|
+
* to the nearest react-native-screens Screen ancestor.
|
|
151
|
+
*
|
|
152
|
+
* BaseBlurView has public mDecorView and preDrawListener fields, so no reflection needed.
|
|
153
|
+
*/
|
|
154
|
+
private fun swapBlurRootToScreenAncestor() {
|
|
155
|
+
val bv = blurView ?: return
|
|
156
|
+
val newRoot = findOptimalBlurRoot() ?: return
|
|
157
|
+
|
|
158
|
+
try {
|
|
159
|
+
val oldDecorView = bv.mDecorView
|
|
160
|
+
val listener = bv.preDrawListener
|
|
161
|
+
|
|
162
|
+
if (oldDecorView != null && listener != null) {
|
|
163
|
+
// Remove listener from old root
|
|
164
|
+
try {
|
|
165
|
+
oldDecorView.viewTreeObserver.removeOnPreDrawListener(listener)
|
|
166
|
+
} catch (e: Exception) {
|
|
167
|
+
logDebug("Could not remove old pre-draw listener: ${e.message}")
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// Set new root
|
|
171
|
+
bv.mDecorView = newRoot
|
|
172
|
+
|
|
173
|
+
// Add listener to new root
|
|
174
|
+
newRoot.viewTreeObserver.addOnPreDrawListener(listener)
|
|
175
|
+
|
|
176
|
+
// Update mDifferentRoot flag
|
|
177
|
+
bv.mDifferentRoot = newRoot.rootView != bv.rootView
|
|
178
|
+
|
|
179
|
+
logDebug("Progressive blur: swapped root to ${newRoot.javaClass.simpleName}")
|
|
180
|
+
}
|
|
181
|
+
} catch (e: Exception) {
|
|
182
|
+
logWarning("Failed to swap progressive blur root: ${e.message}")
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Finds the optimal view to use as blur capture root.
|
|
188
|
+
* Priority: nearest react-native-screens Screen > android.R.id.content > parent
|
|
189
|
+
*/
|
|
190
|
+
private fun findOptimalBlurRoot(): ViewGroup? {
|
|
191
|
+
return findNearestScreenAncestor() ?: getContentViewFallback()
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* Walks up the view hierarchy looking for react-native-screens Screen components.
|
|
196
|
+
*/
|
|
197
|
+
private fun findNearestScreenAncestor(): ViewGroup? {
|
|
198
|
+
var currentParent = this.parent
|
|
199
|
+
while (currentParent != null) {
|
|
200
|
+
if (currentParent.javaClass.name == "com.swmansion.rnscreens.Screen") {
|
|
201
|
+
return currentParent as? ViewGroup
|
|
202
|
+
}
|
|
203
|
+
currentParent = currentParent.parent
|
|
204
|
+
}
|
|
205
|
+
return null
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Falls back to android.R.id.content or the activity root view.
|
|
210
|
+
*/
|
|
211
|
+
private fun getContentViewFallback(): ViewGroup? {
|
|
212
|
+
try {
|
|
213
|
+
val activity = context as? android.app.Activity
|
|
214
|
+
activity?.findViewById<ViewGroup>(android.R.id.content)?.let { return it }
|
|
215
|
+
} catch (e: Exception) {
|
|
216
|
+
logDebug("Could not access activity content view: ${e.message}")
|
|
217
|
+
}
|
|
218
|
+
return this.parent as? ViewGroup
|
|
219
|
+
}
|
|
220
|
+
|
|
113
221
|
override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
|
|
114
222
|
val width = MeasureSpec.getSize(widthMeasureSpec)
|
|
115
223
|
val height = MeasureSpec.getSize(heightMeasureSpec)
|
|
@@ -252,11 +360,12 @@ class ReactNativeProgressiveBlurView : FrameLayout {
|
|
|
252
360
|
|
|
253
361
|
/**
|
|
254
362
|
* Cleanup method to prevent memory leaks.
|
|
363
|
+
* Resets initialization state so blur is re-initialized on next attach.
|
|
255
364
|
*/
|
|
256
365
|
fun cleanup() {
|
|
257
366
|
hasExplicitBackground = false
|
|
367
|
+
isBlurInitialized = false
|
|
258
368
|
removeCallbacks(null)
|
|
259
|
-
blurView = null
|
|
260
369
|
logDebug("View cleaned up")
|
|
261
370
|
}
|
|
262
371
|
|
package/package.json
CHANGED
|
@@ -1,53 +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 "glassTintColor":
|
|
26
|
-
mViewManager.setGlassTintColor(view, value == null ? "clear" : (String) value);
|
|
27
|
-
break;
|
|
28
|
-
case "glassOpacity":
|
|
29
|
-
mViewManager.setGlassOpacity(view, value == null ? 1f : ((Double) value).doubleValue());
|
|
30
|
-
break;
|
|
31
|
-
case "blurAmount":
|
|
32
|
-
mViewManager.setBlurAmount(view, value == null ? 10f : ((Double) value).doubleValue());
|
|
33
|
-
break;
|
|
34
|
-
case "type":
|
|
35
|
-
mViewManager.setType(view, (String) value);
|
|
36
|
-
break;
|
|
37
|
-
case "blurType":
|
|
38
|
-
mViewManager.setBlurType(view, (String) value);
|
|
39
|
-
break;
|
|
40
|
-
case "glassType":
|
|
41
|
-
mViewManager.setGlassType(view, (String) value);
|
|
42
|
-
break;
|
|
43
|
-
case "reducedTransparencyFallbackColor":
|
|
44
|
-
mViewManager.setReducedTransparencyFallbackColor(view, value == null ? "#FFFFFF" : (String) value);
|
|
45
|
-
break;
|
|
46
|
-
case "isInteractive":
|
|
47
|
-
mViewManager.setIsInteractive(view, value == null ? true : (boolean) value);
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
super.setProperty(view, propName, value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,25 +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 setGlassTintColor(T view, @Nullable String value);
|
|
18
|
-
void setGlassOpacity(T view, double value);
|
|
19
|
-
void setBlurAmount(T view, double value);
|
|
20
|
-
void setType(T view, @Nullable String value);
|
|
21
|
-
void setBlurType(T view, @Nullable String value);
|
|
22
|
-
void setGlassType(T view, @Nullable String value);
|
|
23
|
-
void setReducedTransparencyFallbackColor(T view, @Nullable String value);
|
|
24
|
-
void setIsInteractive(T view, boolean value);
|
|
25
|
-
}
|
|
@@ -1,53 +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 ReactNativeGlassEffectContainerManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & ReactNativeGlassEffectContainerManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
|
19
|
-
public ReactNativeGlassEffectContainerManagerDelegate(U viewManager) {
|
|
20
|
-
super(viewManager);
|
|
21
|
-
}
|
|
22
|
-
@Override
|
|
23
|
-
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
24
|
-
switch (propName) {
|
|
25
|
-
case "glassType":
|
|
26
|
-
mViewManager.setGlassType(view, (String) value);
|
|
27
|
-
break;
|
|
28
|
-
case "glassTintColor":
|
|
29
|
-
mViewManager.setGlassTintColor(view, value == null ? "clear" : (String) value);
|
|
30
|
-
break;
|
|
31
|
-
case "glassOpacity":
|
|
32
|
-
mViewManager.setGlassOpacity(view, value == null ? 1f : ((Double) value).doubleValue());
|
|
33
|
-
break;
|
|
34
|
-
case "isInteractive":
|
|
35
|
-
mViewManager.setIsInteractive(view, value == null ? true : (boolean) value);
|
|
36
|
-
break;
|
|
37
|
-
case "spacing":
|
|
38
|
-
mViewManager.setSpacing(view, value == null ? 8f : ((Double) value).doubleValue());
|
|
39
|
-
break;
|
|
40
|
-
case "enableMorphing":
|
|
41
|
-
mViewManager.setEnableMorphing(view, value == null ? true : (boolean) value);
|
|
42
|
-
break;
|
|
43
|
-
case "morphingDuration":
|
|
44
|
-
mViewManager.setMorphingDuration(view, value == null ? 300 : ((Double) value).intValue());
|
|
45
|
-
break;
|
|
46
|
-
case "reducedTransparencyFallbackColor":
|
|
47
|
-
mViewManager.setReducedTransparencyFallbackColor(view, value == null ? "#FFFFFF" : (String) value);
|
|
48
|
-
break;
|
|
49
|
-
default:
|
|
50
|
-
super.setProperty(view, propName, value);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,25 +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 ReactNativeGlassEffectContainerManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
17
|
-
void setGlassType(T view, @Nullable String value);
|
|
18
|
-
void setGlassTintColor(T view, @Nullable String value);
|
|
19
|
-
void setGlassOpacity(T view, double value);
|
|
20
|
-
void setIsInteractive(T view, boolean value);
|
|
21
|
-
void setSpacing(T view, double value);
|
|
22
|
-
void setEnableMorphing(T view, boolean value);
|
|
23
|
-
void setMorphingDuration(T view, int value);
|
|
24
|
-
void setReducedTransparencyFallbackColor(T view, @Nullable String value);
|
|
25
|
-
}
|
|
@@ -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 ReactNativeGlassViewManagerDelegate<T extends View, U extends BaseViewManager<T, ? extends LayoutShadowNode> & ReactNativeGlassViewManagerInterface<T>> extends BaseViewManagerDelegate<T, U> {
|
|
19
|
-
public ReactNativeGlassViewManagerDelegate(U viewManager) {
|
|
20
|
-
super(viewManager);
|
|
21
|
-
}
|
|
22
|
-
@Override
|
|
23
|
-
public void setProperty(T view, String propName, @Nullable Object value) {
|
|
24
|
-
switch (propName) {
|
|
25
|
-
case "glassType":
|
|
26
|
-
mViewManager.setGlassType(view, (String) value);
|
|
27
|
-
break;
|
|
28
|
-
case "glassAmount":
|
|
29
|
-
mViewManager.setGlassAmount(view, value == null ? 50f : ((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 ReactNativeGlassViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
|
|
17
|
-
void setGlassType(T view, @Nullable String value);
|
|
18
|
-
void setGlassAmount(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
|
-
)
|
package/android/app/build/generated/source/codegen/jni/ReactNativeBlurViewSpec-generated.cpp
DELETED
|
@@ -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 ¶ms) {
|
|
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 ¶ms);
|
|
23
|
-
|
|
24
|
-
} // 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: 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
|
-
registry->add(concreteComponentDescriptorProvider<ReactNativeGlassEffectContainerComponentDescriptor>());
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
} // namespace facebook::react
|
|
@@ -1,25 +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
|
-
using ReactNativeGlassEffectContainerComponentDescriptor = ConcreteComponentDescriptor<ReactNativeGlassEffectContainerShadowNode>;
|
|
21
|
-
|
|
22
|
-
void ReactNativeBlurViewSpec_registerComponentDescriptorsFromCodegen(
|
|
23
|
-
std::shared_ptr<const ComponentDescriptorProviderRegistry> registry);
|
|
24
|
-
|
|
25
|
-
} // 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: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include <react/renderer/components/ReactNativeBlurViewSpec/EventEmitters.h>
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
namespace facebook::react {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
} // namespace facebook::react
|
|
@@ -1,30 +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
|
-
class ReactNativeGlassEffectContainerEventEmitter : public ViewEventEmitter {
|
|
24
|
-
public:
|
|
25
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
};
|
|
30
|
-
} // namespace facebook::react
|
|
@@ -1,46 +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
|
-
glassTintColor(convertRawProp(context, rawProps, "glassTintColor", sourceProps.glassTintColor, {"clear"})),
|
|
23
|
-
glassOpacity(convertRawProp(context, rawProps, "glassOpacity", sourceProps.glassOpacity, {1.0})),
|
|
24
|
-
blurAmount(convertRawProp(context, rawProps, "blurAmount", sourceProps.blurAmount, {10.0})),
|
|
25
|
-
type(convertRawProp(context, rawProps, "type", sourceProps.type, {ReactNativeBlurViewType::Blur})),
|
|
26
|
-
blurType(convertRawProp(context, rawProps, "blurType", sourceProps.blurType, {ReactNativeBlurViewBlurType::Xlight})),
|
|
27
|
-
glassType(convertRawProp(context, rawProps, "glassType", sourceProps.glassType, {ReactNativeBlurViewGlassType::Clear})),
|
|
28
|
-
reducedTransparencyFallbackColor(convertRawProp(context, rawProps, "reducedTransparencyFallbackColor", sourceProps.reducedTransparencyFallbackColor, {"#FFFFFF"})),
|
|
29
|
-
isInteractive(convertRawProp(context, rawProps, "isInteractive", sourceProps.isInteractive, {true}))
|
|
30
|
-
{}
|
|
31
|
-
ReactNativeGlassEffectContainerProps::ReactNativeGlassEffectContainerProps(
|
|
32
|
-
const PropsParserContext &context,
|
|
33
|
-
const ReactNativeGlassEffectContainerProps &sourceProps,
|
|
34
|
-
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
35
|
-
|
|
36
|
-
glassType(convertRawProp(context, rawProps, "glassType", sourceProps.glassType, {ReactNativeGlassEffectContainerGlassType::Clear})),
|
|
37
|
-
glassTintColor(convertRawProp(context, rawProps, "glassTintColor", sourceProps.glassTintColor, {"clear"})),
|
|
38
|
-
glassOpacity(convertRawProp(context, rawProps, "glassOpacity", sourceProps.glassOpacity, {1.0})),
|
|
39
|
-
isInteractive(convertRawProp(context, rawProps, "isInteractive", sourceProps.isInteractive, {true})),
|
|
40
|
-
spacing(convertRawProp(context, rawProps, "spacing", sourceProps.spacing, {8.0})),
|
|
41
|
-
enableMorphing(convertRawProp(context, rawProps, "enableMorphing", sourceProps.enableMorphing, {true})),
|
|
42
|
-
morphingDuration(convertRawProp(context, rawProps, "morphingDuration", sourceProps.morphingDuration, {300})),
|
|
43
|
-
reducedTransparencyFallbackColor(convertRawProp(context, rawProps, "reducedTransparencyFallbackColor", sourceProps.reducedTransparencyFallbackColor, {"#FFFFFF"}))
|
|
44
|
-
{}
|
|
45
|
-
|
|
46
|
-
} // namespace facebook::react
|
|
@@ -1,131 +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 ReactNativeBlurViewType { Blur, LiquidGlass };
|
|
18
|
-
|
|
19
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ReactNativeBlurViewType &result) {
|
|
20
|
-
auto string = (std::string)value;
|
|
21
|
-
if (string == "blur") { result = ReactNativeBlurViewType::Blur; return; }
|
|
22
|
-
if (string == "liquidGlass") { result = ReactNativeBlurViewType::LiquidGlass; return; }
|
|
23
|
-
abort();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
static inline std::string toString(const ReactNativeBlurViewType &value) {
|
|
27
|
-
switch (value) {
|
|
28
|
-
case ReactNativeBlurViewType::Blur: return "blur";
|
|
29
|
-
case ReactNativeBlurViewType::LiquidGlass: return "liquidGlass";
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
enum class ReactNativeBlurViewBlurType { Xlight, Light, Dark, ExtraDark, Regular, Prominent, SystemUltraThinMaterial, SystemThinMaterial, SystemMaterial, SystemThickMaterial, SystemChromeMaterial };
|
|
33
|
-
|
|
34
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ReactNativeBlurViewBlurType &result) {
|
|
35
|
-
auto string = (std::string)value;
|
|
36
|
-
if (string == "xlight") { result = ReactNativeBlurViewBlurType::Xlight; return; }
|
|
37
|
-
if (string == "light") { result = ReactNativeBlurViewBlurType::Light; return; }
|
|
38
|
-
if (string == "dark") { result = ReactNativeBlurViewBlurType::Dark; return; }
|
|
39
|
-
if (string == "extraDark") { result = ReactNativeBlurViewBlurType::ExtraDark; return; }
|
|
40
|
-
if (string == "regular") { result = ReactNativeBlurViewBlurType::Regular; return; }
|
|
41
|
-
if (string == "prominent") { result = ReactNativeBlurViewBlurType::Prominent; return; }
|
|
42
|
-
if (string == "systemUltraThinMaterial") { result = ReactNativeBlurViewBlurType::SystemUltraThinMaterial; return; }
|
|
43
|
-
if (string == "systemThinMaterial") { result = ReactNativeBlurViewBlurType::SystemThinMaterial; return; }
|
|
44
|
-
if (string == "systemMaterial") { result = ReactNativeBlurViewBlurType::SystemMaterial; return; }
|
|
45
|
-
if (string == "systemThickMaterial") { result = ReactNativeBlurViewBlurType::SystemThickMaterial; return; }
|
|
46
|
-
if (string == "systemChromeMaterial") { result = ReactNativeBlurViewBlurType::SystemChromeMaterial; return; }
|
|
47
|
-
abort();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
static inline std::string toString(const ReactNativeBlurViewBlurType &value) {
|
|
51
|
-
switch (value) {
|
|
52
|
-
case ReactNativeBlurViewBlurType::Xlight: return "xlight";
|
|
53
|
-
case ReactNativeBlurViewBlurType::Light: return "light";
|
|
54
|
-
case ReactNativeBlurViewBlurType::Dark: return "dark";
|
|
55
|
-
case ReactNativeBlurViewBlurType::ExtraDark: return "extraDark";
|
|
56
|
-
case ReactNativeBlurViewBlurType::Regular: return "regular";
|
|
57
|
-
case ReactNativeBlurViewBlurType::Prominent: return "prominent";
|
|
58
|
-
case ReactNativeBlurViewBlurType::SystemUltraThinMaterial: return "systemUltraThinMaterial";
|
|
59
|
-
case ReactNativeBlurViewBlurType::SystemThinMaterial: return "systemThinMaterial";
|
|
60
|
-
case ReactNativeBlurViewBlurType::SystemMaterial: return "systemMaterial";
|
|
61
|
-
case ReactNativeBlurViewBlurType::SystemThickMaterial: return "systemThickMaterial";
|
|
62
|
-
case ReactNativeBlurViewBlurType::SystemChromeMaterial: return "systemChromeMaterial";
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
enum class ReactNativeBlurViewGlassType { Clear, Regular };
|
|
66
|
-
|
|
67
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ReactNativeBlurViewGlassType &result) {
|
|
68
|
-
auto string = (std::string)value;
|
|
69
|
-
if (string == "clear") { result = ReactNativeBlurViewGlassType::Clear; return; }
|
|
70
|
-
if (string == "regular") { result = ReactNativeBlurViewGlassType::Regular; return; }
|
|
71
|
-
abort();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
static inline std::string toString(const ReactNativeBlurViewGlassType &value) {
|
|
75
|
-
switch (value) {
|
|
76
|
-
case ReactNativeBlurViewGlassType::Clear: return "clear";
|
|
77
|
-
case ReactNativeBlurViewGlassType::Regular: return "regular";
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
class ReactNativeBlurViewProps final : public ViewProps {
|
|
82
|
-
public:
|
|
83
|
-
ReactNativeBlurViewProps() = default;
|
|
84
|
-
ReactNativeBlurViewProps(const PropsParserContext& context, const ReactNativeBlurViewProps &sourceProps, const RawProps &rawProps);
|
|
85
|
-
|
|
86
|
-
#pragma mark - Props
|
|
87
|
-
|
|
88
|
-
std::string glassTintColor{"clear"};
|
|
89
|
-
double glassOpacity{1.0};
|
|
90
|
-
double blurAmount{10.0};
|
|
91
|
-
ReactNativeBlurViewType type{ReactNativeBlurViewType::Blur};
|
|
92
|
-
ReactNativeBlurViewBlurType blurType{ReactNativeBlurViewBlurType::Xlight};
|
|
93
|
-
ReactNativeBlurViewGlassType glassType{ReactNativeBlurViewGlassType::Clear};
|
|
94
|
-
std::string reducedTransparencyFallbackColor{"#FFFFFF"};
|
|
95
|
-
bool isInteractive{true};
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
enum class ReactNativeGlassEffectContainerGlassType { Clear, Regular };
|
|
99
|
-
|
|
100
|
-
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ReactNativeGlassEffectContainerGlassType &result) {
|
|
101
|
-
auto string = (std::string)value;
|
|
102
|
-
if (string == "clear") { result = ReactNativeGlassEffectContainerGlassType::Clear; return; }
|
|
103
|
-
if (string == "regular") { result = ReactNativeGlassEffectContainerGlassType::Regular; return; }
|
|
104
|
-
abort();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
static inline std::string toString(const ReactNativeGlassEffectContainerGlassType &value) {
|
|
108
|
-
switch (value) {
|
|
109
|
-
case ReactNativeGlassEffectContainerGlassType::Clear: return "clear";
|
|
110
|
-
case ReactNativeGlassEffectContainerGlassType::Regular: return "regular";
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
class ReactNativeGlassEffectContainerProps final : public ViewProps {
|
|
115
|
-
public:
|
|
116
|
-
ReactNativeGlassEffectContainerProps() = default;
|
|
117
|
-
ReactNativeGlassEffectContainerProps(const PropsParserContext& context, const ReactNativeGlassEffectContainerProps &sourceProps, const RawProps &rawProps);
|
|
118
|
-
|
|
119
|
-
#pragma mark - Props
|
|
120
|
-
|
|
121
|
-
ReactNativeGlassEffectContainerGlassType glassType{ReactNativeGlassEffectContainerGlassType::Clear};
|
|
122
|
-
std::string glassTintColor{"clear"};
|
|
123
|
-
double glassOpacity{1.0};
|
|
124
|
-
bool isInteractive{true};
|
|
125
|
-
double spacing{8.0};
|
|
126
|
-
bool enableMorphing{true};
|
|
127
|
-
int morphingDuration{300};
|
|
128
|
-
std::string reducedTransparencyFallbackColor{"#FFFFFF"};
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
} // 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,18 +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
|
-
extern const char ReactNativeGlassEffectContainerComponentName[] = "ReactNativeGlassEffectContainer";
|
|
17
|
-
|
|
18
|
-
} // namespace facebook::react
|
|
@@ -1,43 +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
|
-
JSI_EXPORT extern const char ReactNativeGlassEffectContainerComponentName[];
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
* `ShadowNode` for <ReactNativeGlassEffectContainer> component.
|
|
36
|
-
*/
|
|
37
|
-
using ReactNativeGlassEffectContainerShadowNode = ConcreteViewShadowNode<
|
|
38
|
-
ReactNativeGlassEffectContainerComponentName,
|
|
39
|
-
ReactNativeGlassEffectContainerProps,
|
|
40
|
-
ReactNativeGlassEffectContainerEventEmitter,
|
|
41
|
-
ReactNativeGlassEffectContainerState>;
|
|
42
|
-
|
|
43
|
-
} // 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,41 +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
|
-
class ReactNativeGlassEffectContainerState {
|
|
30
|
-
public:
|
|
31
|
-
ReactNativeGlassEffectContainerState() = default;
|
|
32
|
-
|
|
33
|
-
#ifdef ANDROID
|
|
34
|
-
ReactNativeGlassEffectContainerState(ReactNativeGlassEffectContainerState const &previousState, folly::dynamic data){};
|
|
35
|
-
folly::dynamic getDynamic() const {
|
|
36
|
-
return {};
|
|
37
|
-
};
|
|
38
|
-
#endif
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
} // namespace facebook::react
|