@sbaiahmed1/react-native-blur 4.0.0 → 4.0.1
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.
|
@@ -246,7 +246,14 @@ using namespace facebook::react;
|
|
|
246
246
|
// Copy corner radius from the Fabric view to the inner glass view (Callstack pattern)
|
|
247
247
|
_liquidGlassView.layer.cornerRadius = self.layer.cornerRadius;
|
|
248
248
|
_liquidGlassView.layer.cornerCurve = self.layer.cornerCurve;
|
|
249
|
-
|
|
249
|
+
|
|
250
|
+
// On iOS 26+, don't clip bounds to allow interactive glass animations to be visible
|
|
251
|
+
// The glass effect view handles its own clipping via cornerConfiguration
|
|
252
|
+
if (@available(iOS 26.0, *)) {
|
|
253
|
+
_liquidGlassView.layer.masksToBounds = NO;
|
|
254
|
+
} else {
|
|
255
|
+
_liquidGlassView.layer.masksToBounds = YES;
|
|
256
|
+
}
|
|
250
257
|
}
|
|
251
258
|
|
|
252
259
|
- (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics oldLayoutMetrics:(const LayoutMetrics &)oldLayoutMetrics
|
|
@@ -64,6 +64,10 @@ import UIKit
|
|
|
64
64
|
let effectView = UIVisualEffectView()
|
|
65
65
|
effectView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
|
66
66
|
effectView.frame = bounds
|
|
67
|
+
|
|
68
|
+
// Don't clip bounds to allow interactive glass animations to be visible
|
|
69
|
+
effectView.clipsToBounds = false
|
|
70
|
+
|
|
67
71
|
addSubview(effectView)
|
|
68
72
|
self.glassEffectView = effectView
|
|
69
73
|
|
|
@@ -74,30 +78,6 @@ import UIKit
|
|
|
74
78
|
|
|
75
79
|
@objc public func setBorderRadius(_ radius: CGFloat) {
|
|
76
80
|
allBorderRadius = radius
|
|
77
|
-
topLeftRadius = radius
|
|
78
|
-
topRightRadius = radius
|
|
79
|
-
bottomLeftRadius = radius
|
|
80
|
-
bottomRightRadius = radius
|
|
81
|
-
updateBorderRadius()
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@objc public func setBorderTopLeftRadius(_ radius: CGFloat) {
|
|
85
|
-
topLeftRadius = radius
|
|
86
|
-
updateBorderRadius()
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@objc public func setBorderTopRightRadius(_ radius: CGFloat) {
|
|
90
|
-
topRightRadius = radius
|
|
91
|
-
updateBorderRadius()
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@objc public func setBorderBottomLeftRadius(_ radius: CGFloat) {
|
|
95
|
-
bottomLeftRadius = radius
|
|
96
|
-
updateBorderRadius()
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
@objc public func setBorderBottomRightRadius(_ radius: CGFloat) {
|
|
100
|
-
bottomRightRadius = radius
|
|
101
81
|
updateBorderRadius()
|
|
102
82
|
}
|
|
103
83
|
|
|
@@ -129,17 +109,16 @@ import UIKit
|
|
|
129
109
|
} else {
|
|
130
110
|
backgroundColor = reducedTransparencyFallbackColor
|
|
131
111
|
layer.cornerRadius = allBorderRadius
|
|
132
|
-
layer.masksToBounds = true
|
|
133
112
|
}
|
|
134
113
|
}
|
|
135
114
|
|
|
136
115
|
private func updateBorderRadius() {
|
|
137
116
|
if #available(iOS 26.0, *) {
|
|
138
117
|
#if compiler(>=6.2)
|
|
139
|
-
let topLeft = UICornerRadius(floatLiteral: Double(
|
|
140
|
-
let topRight = UICornerRadius(floatLiteral: Double(
|
|
141
|
-
let bottomLeft = UICornerRadius(floatLiteral: Double(
|
|
142
|
-
let bottomRight = UICornerRadius(floatLiteral: Double(
|
|
118
|
+
let topLeft = UICornerRadius(floatLiteral: Double(allBorderRadius))
|
|
119
|
+
let topRight = UICornerRadius(floatLiteral: Double(allBorderRadius))
|
|
120
|
+
let bottomLeft = UICornerRadius(floatLiteral: Double(allBorderRadius))
|
|
121
|
+
let bottomRight = UICornerRadius(floatLiteral: Double(allBorderRadius))
|
|
143
122
|
|
|
144
123
|
glassEffectView?.cornerConfiguration = .corners(
|
|
145
124
|
topLeftRadius: topLeft,
|
|
@@ -153,7 +132,6 @@ import UIKit
|
|
|
153
132
|
#endif
|
|
154
133
|
} else {
|
|
155
134
|
layer.cornerRadius = allBorderRadius
|
|
156
|
-
layer.masksToBounds = true
|
|
157
135
|
}
|
|
158
136
|
}
|
|
159
137
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sbaiahmed1/react-native-blur",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "React native modern blur view",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
"!**/.*"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"example": "yarn workspace @sbaiahmed1/react-native-blur-example",
|
|
36
35
|
"test": "jest",
|
|
37
36
|
"typecheck": "tsc",
|
|
38
37
|
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
@@ -74,7 +73,7 @@
|
|
|
74
73
|
"@react-native-community/cli": "15.0.0-alpha.2",
|
|
75
74
|
"@react-native/babel-preset": "0.79.2",
|
|
76
75
|
"@react-native/eslint-config": "^0.78.0",
|
|
77
|
-
"@release-it/conventional-changelog": "^
|
|
76
|
+
"@release-it/conventional-changelog": "^10.0.1",
|
|
78
77
|
"@types/jest": "^29.5.5",
|
|
79
78
|
"@types/react": "^19.0.0",
|
|
80
79
|
"commitlint": "^19.6.1",
|
|
@@ -87,7 +86,7 @@
|
|
|
87
86
|
"react": "19.0.0",
|
|
88
87
|
"react-native": "0.79.2",
|
|
89
88
|
"react-native-builder-bob": "^0.40.11",
|
|
90
|
-
"release-it": "^
|
|
89
|
+
"release-it": "^19.0.4",
|
|
91
90
|
"turbo": "^1.10.7",
|
|
92
91
|
"typescript": "^5.8.3"
|
|
93
92
|
},
|