@sbaiahmed1/react-native-blur 4.6.2-beta.0 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -11
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/BlurType.kt +24 -22
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurSwitch.kt +19 -1
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurSwitchManager.kt +5 -0
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurView.kt +37 -2
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeBlurViewManager.kt +5 -0
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurView.kt +34 -2
- package/android/src/main/java/com/sbaiahmed1/reactnativeblur/ReactNativeProgressiveBlurViewManager.kt +5 -0
- package/lib/module/BlurSwitch.js +11 -6
- package/lib/module/BlurSwitch.js.map +1 -1
- package/lib/module/BlurView.js +2 -0
- package/lib/module/BlurView.js.map +1 -1
- package/lib/module/LiquidGlassContainer.js.map +1 -1
- package/lib/module/LiquidGlassView.js.map +1 -1
- package/lib/module/ProgressiveBlurView.js +3 -0
- package/lib/module/ProgressiveBlurView.js.map +1 -1
- package/lib/module/ReactNativeBlurSwitchNativeComponent.ts +2 -37
- package/lib/module/ReactNativeBlurViewNativeComponent.ts +2 -0
- package/lib/module/ReactNativeLiquidGlassContainerNativeComponent.ts +0 -5
- package/lib/module/ReactNativeLiquidGlassViewNativeComponent.ts +0 -35
- package/lib/module/ReactNativeProgressiveBlurViewNativeComponent.ts +2 -0
- package/lib/typescript/src/BlurSwitch.d.ts +10 -0
- package/lib/typescript/src/BlurSwitch.d.ts.map +1 -1
- package/lib/typescript/src/BlurView.d.ts +11 -2
- package/lib/typescript/src/BlurView.d.ts.map +1 -1
- package/lib/typescript/src/LiquidGlassContainer.d.ts +3 -2
- package/lib/typescript/src/LiquidGlassContainer.d.ts.map +1 -1
- package/lib/typescript/src/LiquidGlassView.d.ts +25 -15
- package/lib/typescript/src/LiquidGlassView.d.ts.map +1 -1
- package/lib/typescript/src/ProgressiveBlurView.d.ts +11 -2
- package/lib/typescript/src/ProgressiveBlurView.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeBlurSwitchNativeComponent.d.ts +2 -32
- package/lib/typescript/src/ReactNativeBlurSwitchNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/ReactNativeBlurViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeLiquidGlassContainerNativeComponent.d.ts +0 -5
- package/lib/typescript/src/ReactNativeLiquidGlassContainerNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts +0 -30
- package/lib/typescript/src/ReactNativeLiquidGlassViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts +2 -1
- package/lib/typescript/src/ReactNativeProgressiveBlurViewNativeComponent.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/BlurSwitch.tsx +23 -3
- package/src/BlurView.tsx +14 -2
- package/src/LiquidGlassContainer.tsx +3 -2
- package/src/LiquidGlassView.tsx +25 -15
- package/src/ProgressiveBlurView.tsx +15 -2
- package/src/ReactNativeBlurSwitchNativeComponent.ts +2 -37
- package/src/ReactNativeBlurViewNativeComponent.ts +2 -0
- package/src/ReactNativeLiquidGlassContainerNativeComponent.ts +0 -5
- package/src/ReactNativeLiquidGlassViewNativeComponent.ts +0 -35
- package/src/ReactNativeProgressiveBlurViewNativeComponent.ts +2 -0
- 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
|
@@ -22,6 +22,16 @@ export interface ProgressiveBlurViewProps {
|
|
|
22
22
|
*/
|
|
23
23
|
blurAmount?: number;
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* @description The number of blur interactions to perform for a smoother
|
|
27
|
+
* effect (1-15)
|
|
28
|
+
*
|
|
29
|
+
* @default 5
|
|
30
|
+
*
|
|
31
|
+
* @platform Android
|
|
32
|
+
*/
|
|
33
|
+
blurRounds?: number;
|
|
34
|
+
|
|
25
35
|
/**
|
|
26
36
|
* @description The direction of the progressive blur gradient
|
|
27
37
|
* - 'blurredTopClearBottom': Blur starts at top, clear at bottom
|
|
@@ -44,9 +54,9 @@ export interface ProgressiveBlurViewProps {
|
|
|
44
54
|
/**
|
|
45
55
|
* @description Fallback color when reduced transparency is enabled
|
|
46
56
|
*
|
|
47
|
-
* Accepts hex color strings like `#FFFFFF`
|
|
48
|
-
*
|
|
49
57
|
* @default '#FFFFFF'
|
|
58
|
+
*
|
|
59
|
+
* @platform iOS
|
|
50
60
|
*/
|
|
51
61
|
reducedTransparencyFallbackColor?: string;
|
|
52
62
|
|
|
@@ -115,6 +125,7 @@ export interface ProgressiveBlurViewProps {
|
|
|
115
125
|
export const ProgressiveBlurView: React.FC<ProgressiveBlurViewProps> = ({
|
|
116
126
|
blurType = 'regular',
|
|
117
127
|
blurAmount = 20,
|
|
128
|
+
blurRounds = 5,
|
|
118
129
|
direction = 'blurredTopClearBottom',
|
|
119
130
|
startOffset = 0.0,
|
|
120
131
|
reducedTransparencyFallbackColor = '#FFFFFF',
|
|
@@ -131,6 +142,7 @@ export const ProgressiveBlurView: React.FC<ProgressiveBlurViewProps> = ({
|
|
|
131
142
|
<ReactNativeProgressiveBlurView
|
|
132
143
|
blurType={blurType}
|
|
133
144
|
blurAmount={blurAmount}
|
|
145
|
+
blurRounds={blurRounds}
|
|
134
146
|
direction={direction}
|
|
135
147
|
startOffset={startOffset}
|
|
136
148
|
reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
|
|
@@ -147,6 +159,7 @@ export const ProgressiveBlurView: React.FC<ProgressiveBlurViewProps> = ({
|
|
|
147
159
|
<ReactNativeProgressiveBlurView
|
|
148
160
|
blurType={blurType}
|
|
149
161
|
blurAmount={blurAmount}
|
|
162
|
+
blurRounds={blurRounds}
|
|
150
163
|
direction={direction}
|
|
151
164
|
startOffset={startOffset}
|
|
152
165
|
reducedTransparencyFallbackColor={reducedTransparencyFallbackColor}
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
6
|
DirectEventHandler,
|
|
7
|
+
Int32,
|
|
7
8
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
8
9
|
|
|
9
10
|
export interface ValueChangeEvent {
|
|
@@ -11,49 +12,13 @@ export interface ValueChangeEvent {
|
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
interface NativeProps extends ViewProps {
|
|
14
|
-
/**
|
|
15
|
-
* The current value of the switch
|
|
16
|
-
* @default false
|
|
17
|
-
*/
|
|
18
15
|
value?: WithDefault<boolean, false>;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The intensity of the blur effect (0-100)
|
|
22
|
-
* @default 10.0
|
|
23
|
-
*/
|
|
24
16
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* The color of the switch thumb
|
|
28
|
-
* Note: Not supported by the Android implementation (no-op).
|
|
29
|
-
* Use the native iOS Switch for platform-specific thumb colors.
|
|
30
|
-
* @default '#FFFFFF'
|
|
31
|
-
*/
|
|
17
|
+
blurRounds?: WithDefault<Int32, 5>;
|
|
32
18
|
thumbColor?: WithDefault<string, '#FFFFFF'>;
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* The track color when switch is off
|
|
36
|
-
* Note: Not supported by the Android implementation (no-op).
|
|
37
|
-
* Use the native iOS Switch for platform-specific off-state colors.
|
|
38
|
-
* @default '#E5E5EA'
|
|
39
|
-
*/
|
|
40
19
|
trackColorOff?: WithDefault<string, '#E5E5EA'>;
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* The track color when switch is on
|
|
44
|
-
* @default '#34C759'
|
|
45
|
-
*/
|
|
46
20
|
trackColorOn?: WithDefault<string, '#34C759'>;
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Whether the switch is disabled
|
|
50
|
-
* @default false
|
|
51
|
-
*/
|
|
52
21
|
disabled?: WithDefault<boolean, false>;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Callback invoked when the switch value changes
|
|
56
|
-
*/
|
|
57
22
|
onValueChange?: DirectEventHandler<Readonly<ValueChangeEvent>>;
|
|
58
23
|
}
|
|
59
24
|
|
|
@@ -3,6 +3,7 @@ import type { ViewProps } from 'react-native';
|
|
|
3
3
|
import type {
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
|
+
Int32,
|
|
6
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
8
|
|
|
8
9
|
export type BlurType =
|
|
@@ -31,6 +32,7 @@ export type BlurType =
|
|
|
31
32
|
interface NativeProps extends ViewProps {
|
|
32
33
|
blurAmount?: WithDefault<Double, 10.0>;
|
|
33
34
|
blurType?: WithDefault<BlurType, 'xlight'>;
|
|
35
|
+
blurRounds?: WithDefault<Int32, 5>;
|
|
34
36
|
reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
|
|
35
37
|
ignoreSafeArea?: WithDefault<boolean, true>;
|
|
36
38
|
}
|
|
@@ -3,11 +3,6 @@ import type { ViewProps } from 'react-native';
|
|
|
3
3
|
import type { Double } from 'react-native/Libraries/Types/CodegenTypes';
|
|
4
4
|
|
|
5
5
|
interface NativeProps extends ViewProps {
|
|
6
|
-
/**
|
|
7
|
-
* The spacing value for the glass container effect
|
|
8
|
-
* Platform: iOS only (iOS 26+)
|
|
9
|
-
* @default 0
|
|
10
|
-
*/
|
|
11
6
|
spacing?: Double;
|
|
12
7
|
}
|
|
13
8
|
|
|
@@ -8,46 +8,11 @@ import type {
|
|
|
8
8
|
export type GlassType = 'clear' | 'regular';
|
|
9
9
|
|
|
10
10
|
interface NativeProps extends ViewProps {
|
|
11
|
-
/**
|
|
12
|
-
* The type of glass effect to apply
|
|
13
|
-
* Platform: iOS only
|
|
14
|
-
* @default 'clear'
|
|
15
|
-
*/
|
|
16
11
|
glassType?: WithDefault<GlassType, 'clear'>;
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* The tint color of the glass effect
|
|
20
|
-
* Platform: iOS only
|
|
21
|
-
* @default 'clear'
|
|
22
|
-
*/
|
|
23
12
|
glassTintColor?: WithDefault<string, 'clear'>;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* The opacity of the glass effect (0-1)
|
|
27
|
-
* Platform: iOS only
|
|
28
|
-
* @default 1.0
|
|
29
|
-
*/
|
|
30
13
|
glassOpacity?: WithDefault<Double, 1.0>;
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Fallback color when reduced transparency is enabled
|
|
34
|
-
* Platform: iOS only
|
|
35
|
-
* @default '#FFFFFF'
|
|
36
|
-
*/
|
|
37
14
|
reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Whether the glass view should be interactive
|
|
41
|
-
* Platform: iOS only
|
|
42
|
-
* @default true
|
|
43
|
-
*/
|
|
44
15
|
isInteractive?: WithDefault<boolean, true>;
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* Whether the glass view should ignore safe area insets
|
|
48
|
-
* Platform: iOS only
|
|
49
|
-
* @default true
|
|
50
|
-
*/
|
|
51
16
|
ignoreSafeArea?: WithDefault<boolean, true>;
|
|
52
17
|
}
|
|
53
18
|
|
|
@@ -3,6 +3,7 @@ import type { ViewProps } from 'react-native';
|
|
|
3
3
|
import type {
|
|
4
4
|
WithDefault,
|
|
5
5
|
Double,
|
|
6
|
+
Int32,
|
|
6
7
|
} from 'react-native/Libraries/Types/CodegenTypes';
|
|
7
8
|
|
|
8
9
|
export type BlurType =
|
|
@@ -36,6 +37,7 @@ export type ProgressiveBlurDirection =
|
|
|
36
37
|
interface NativeProps extends ViewProps {
|
|
37
38
|
blurAmount?: WithDefault<Double, 20.0>;
|
|
38
39
|
blurType?: WithDefault<BlurType, 'regular'>;
|
|
40
|
+
blurRounds?: WithDefault<Int32, 5>;
|
|
39
41
|
direction?: WithDefault<ProgressiveBlurDirection, 'blurredTopClearBottom'>;
|
|
40
42
|
startOffset?: WithDefault<Double, 0.0>;
|
|
41
43
|
reducedTransparencyFallbackColor?: WithDefault<string, '#FFFFFF'>;
|
|
@@ -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
|