Skip to content

Commit 7f82022

Browse files
Expo 53 Support (#381)
* update: cleanup & update dependencies - Remove Fabric Interop (Will be a separate package) - Update React, React Native & Expo dependencies * update: fix broken materials * Update viro_renderer-release.aar * Update react_viro-release.aar * update: update virocore
1 parent 784ee9d commit 7f82022

File tree

547 files changed

+2413
-39918
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

547 files changed

+2413
-39918
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#Fri Feb 07 19:36:38 CST 2025
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
55
zipStoreBase=GRADLE_USER_HOME
66
zipStorePath=wrapper/dists
-69.3 KB
Binary file not shown.

android/viro_bridge/src/main/cpp/CMakeLists.txt

Lines changed: 0 additions & 36 deletions
This file was deleted.

android/viro_bridge/src/main/cpp/fabric/ViroFabricContainerJSI.cpp

Lines changed: 0 additions & 1077 deletions
This file was deleted.

android/viro_bridge/src/main/java/com/viromedia/bridge/component/VRTViroViewGroupManager.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.facebook.react.common.MapBuilder;
2929
import com.facebook.react.uimanager.LayoutShadowNode;
3030
import com.facebook.react.uimanager.ViewGroupManager;
31+
import com.facebook.react.uimanager.ReactStylesDiffMap;
3132
import com.facebook.react.uimanager.annotations.ReactProp;
3233

3334
import java.util.Map;
@@ -47,6 +48,18 @@ public VRTViroViewGroupManager(ReactApplicationContext context) {
4748
mContext = context;
4849
}
4950

51+
@Override
52+
public void updateProperties(T viewToUpdate, ReactStylesDiffMap props) {
53+
super.updateProperties(viewToUpdate, props);
54+
// Force immediate commit of props for React Native 0.79+ compatibility
55+
if (viewToUpdate != null) {
56+
viewToUpdate.post(() -> {
57+
viewToUpdate.requestLayout();
58+
viewToUpdate.invalidate();
59+
});
60+
}
61+
}
62+
5063
public ReactApplicationContext getContext() {
5164
return mContext;
5265
}

android/viro_bridge/src/main/java/com/viromedia/bridge/component/node/VRTNodeManager.java

Lines changed: 41 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
import com.facebook.react.common.MapBuilder;
3535
import com.facebook.react.uimanager.annotations.ReactProp;
3636
import com.facebook.react.uimanager.annotations.ReactPropGroup;
37+
import com.facebook.react.uimanager.ReactStylesDiffMap;
3738
import com.facebook.yoga.YogaConstants;
3839
import com.viro.core.Material;
3940
import com.viro.core.VideoTexture;
@@ -69,9 +70,21 @@ public VRTNodeManager(ReactApplicationContext context) {
6970
super(context);
7071
}
7172

73+
@Override
74+
public void updateProperties(T viewToUpdate, ReactStylesDiffMap props) {
75+
super.updateProperties(viewToUpdate, props);
76+
// Force immediate commit of props for React Native 0.79+ compatibility
77+
if (viewToUpdate != null && !viewToUpdate.isTornDown()) {
78+
viewToUpdate.post(() -> {
79+
viewToUpdate.requestLayout();
80+
viewToUpdate.invalidate();
81+
});
82+
}
83+
}
84+
7285
@ReactProp(name = "position")
7386
public void setPosition(T view, ReadableArray position) {
74-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
87+
if (view == null || view.isTornDown()) {
7588
// Skip property update for detached or torn down views
7689
return;
7790
}
@@ -84,7 +97,7 @@ public void setPosition(T view, ReadableArray position) {
8497

8598
@ReactProp(name = "rotation")
8699
public void setRotation(VRTNode view, ReadableArray rotation) {
87-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
100+
if (view == null || view.isTornDown()) {
88101
return;
89102
}
90103
try {
@@ -96,7 +109,7 @@ public void setRotation(VRTNode view, ReadableArray rotation) {
96109

97110
@ReactProp(name = "scale")
98111
public void setScale(VRTNode view, ReadableArray scale) {
99-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
112+
if (view == null || view.isTornDown()) {
100113
return;
101114
}
102115
try {
@@ -108,7 +121,7 @@ public void setScale(VRTNode view, ReadableArray scale) {
108121

109122
@ReactProp(name = "rotationPivot")
110123
public void setRotationPivot(VRTNode view, ReadableArray scale) {
111-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
124+
if (view == null || view.isTornDown()) {
112125
return;
113126
}
114127
try {
@@ -120,7 +133,7 @@ public void setRotationPivot(VRTNode view, ReadableArray scale) {
120133

121134
@ReactProp(name = "scalePivot")
122135
public void setScalePivot(VRTNode view, ReadableArray scale) {
123-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
136+
if (view == null || view.isTornDown()) {
124137
return;
125138
}
126139
try {
@@ -132,7 +145,7 @@ public void setScalePivot(VRTNode view, ReadableArray scale) {
132145

133146
@ReactProp(name = "opacity", defaultFloat = 1f)
134147
public void setOpacity(VRTNode view, float opacity) {
135-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
148+
if (view == null || view.isTornDown()) {
136149
return;
137150
}
138151
try {
@@ -144,7 +157,7 @@ public void setOpacity(VRTNode view, float opacity) {
144157

145158
@ReactProp(name = "visible", defaultBoolean = true)
146159
public void setVisible(VRTNode view, boolean visibility) {
147-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
160+
if (view == null || view.isTornDown()) {
148161
return;
149162
}
150163
try {
@@ -156,7 +169,7 @@ public void setVisible(VRTNode view, boolean visibility) {
156169

157170
@ReactProp(name = "renderingOrder", defaultInt = 0)
158171
public void setRenderingOrder(VRTNode view, int renderingOrder) {
159-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
172+
if (view == null || view.isTornDown()) {
160173
return;
161174
}
162175
try {
@@ -168,7 +181,7 @@ public void setRenderingOrder(VRTNode view, int renderingOrder) {
168181

169182
@ReactProp(name = "canHover", defaultBoolean = VRTNode.DEFAULT_CAN_HOVER)
170183
public void setCanHover(VRTNode view, boolean canHover) {
171-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
184+
if (view == null || view.isTornDown()) {
172185
return;
173186
}
174187
try {
@@ -180,7 +193,7 @@ public void setCanHover(VRTNode view, boolean canHover) {
180193

181194
@ReactProp(name = "canClick", defaultBoolean = VRTNode.DEFAULT_CAN_CLICK)
182195
public void setCanClick(VRTNode view, boolean canClick) {
183-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
196+
if (view == null || view.isTornDown()) {
184197
return;
185198
}
186199
try {
@@ -192,7 +205,7 @@ public void setCanClick(VRTNode view, boolean canClick) {
192205

193206
@ReactProp(name = "canTouch", defaultBoolean = VRTNode.DEFAULT_CAN_TOUCH)
194207
public void setCanTouch(VRTNode view, boolean canTouch) {
195-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
208+
if (view == null || view.isTornDown()) {
196209
return;
197210
}
198211
try {
@@ -204,7 +217,7 @@ public void setCanTouch(VRTNode view, boolean canTouch) {
204217

205218
@ReactProp(name = "canScroll", defaultBoolean = VRTNode.DEFAULT_CAN_SCROLL)
206219
public void setCanScroll(VRTNode view, boolean canScroll) {
207-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
220+
if (view == null || view.isTornDown()) {
208221
return;
209222
}
210223
try {
@@ -216,7 +229,7 @@ public void setCanScroll(VRTNode view, boolean canScroll) {
216229

217230
@ReactProp(name = "canSwipe", defaultBoolean = VRTNode.DEFAULT_CAN_SWIPE)
218231
public void setCanSwipe(VRTNode view, boolean canSwipe) {
219-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
232+
if (view == null || view.isTornDown()) {
220233
return;
221234
}
222235
try {
@@ -228,7 +241,7 @@ public void setCanSwipe(VRTNode view, boolean canSwipe) {
228241

229242
@ReactProp(name = "canDrag", defaultBoolean = VRTNode.DEFAULT_CAN_DRAG)
230243
public void setCanDrag(VRTNode view, boolean canDrag) {
231-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
244+
if (view == null || view.isTornDown()) {
232245
return;
233246
}
234247
try {
@@ -240,7 +253,7 @@ public void setCanDrag(VRTNode view, boolean canDrag) {
240253

241254
@ReactProp(name = "canFuse", defaultBoolean = VRTNode.DEFAULT_CAN_FUSE)
242255
public void setCanFuse(VRTNode view, boolean canFuse) {
243-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
256+
if (view == null || view.isTornDown()) {
244257
return;
245258
}
246259
try {
@@ -252,7 +265,7 @@ public void setCanFuse(VRTNode view, boolean canFuse) {
252265

253266
@ReactProp(name = "canPinch", defaultBoolean = VRTNode.DEFAULT_CAN_PINCH)
254267
public void setCanPinch(VRTNode view, boolean canPinch) {
255-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
268+
if (view == null || view.isTornDown()) {
256269
return;
257270
}
258271
try {
@@ -264,7 +277,7 @@ public void setCanPinch(VRTNode view, boolean canPinch) {
264277

265278
@ReactProp(name = "canRotate", defaultBoolean = VRTNode.DEFAULT_CAN_ROTATE)
266279
public void setCanRotate(VRTNode view, boolean canRotate) {
267-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
280+
if (view == null || view.isTornDown()) {
268281
return;
269282
}
270283
try {
@@ -276,7 +289,7 @@ public void setCanRotate(VRTNode view, boolean canRotate) {
276289

277290
@ReactProp(name = "timeToFuse", defaultFloat = VRTNode.DEFAULT_TIME_TO_FUSE_MILLIS)
278291
public void setTimeToFuse(VRTNode view, float durationMillis) {
279-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
292+
if (view == null || view.isTornDown()) {
280293
return;
281294
}
282295
try {
@@ -288,7 +301,7 @@ public void setTimeToFuse(VRTNode view, float durationMillis) {
288301

289302
@ReactProp(name = "dragType")
290303
public void setDragType(VRTNode view, String dragType) {
291-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
304+
if (view == null || view.isTornDown()) {
292305
return;
293306
}
294307
try {
@@ -300,7 +313,7 @@ public void setDragType(VRTNode view, String dragType) {
300313

301314
@ReactProp(name = "dragPlane")
302315
public void setDragPlane(VRTNode view, ReadableMap dragPlane) {
303-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
316+
if (view == null || view.isTornDown()) {
304317
return;
305318
}
306319
try {
@@ -312,7 +325,7 @@ public void setDragPlane(VRTNode view, ReadableMap dragPlane) {
312325

313326
@ReactProp(name = "animation")
314327
public void setAnimation(VRTNode view, @androidx.annotation.Nullable ReadableMap map) {
315-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
328+
if (view == null || view.isTornDown()) {
316329
return;
317330
}
318331
try {
@@ -324,7 +337,7 @@ public void setAnimation(VRTNode view, @androidx.annotation.Nullable ReadableMap
324337

325338
@ReactProp(name = "ignoreEventHandling", defaultBoolean = VRTNode.DEFAULT_IGNORE_EVENT_HANDLING)
326339
public void setIgnoreEventHandling(VRTNode view, boolean ignore) {
327-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
340+
if (view == null || view.isTornDown()) {
328341
return;
329342
}
330343
try {
@@ -336,7 +349,7 @@ public void setIgnoreEventHandling(VRTNode view, boolean ignore) {
336349

337350
@ReactProp(name = "materials")
338351
public void setMaterials(VRTNode view, @Nullable ReadableArray materials) {
339-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
352+
if (view == null || view.isTornDown()) {
340353
return;
341354
}
342355
try {
@@ -374,7 +387,7 @@ public void setMaterials(VRTNode view, @Nullable ReadableArray materials) {
374387

375388
@ReactProp(name = "transformBehaviors")
376389
public void setTransformBehaviors(VRTNode view, @Nullable ReadableArray transformBehaviors) {
377-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
390+
if (view == null || view.isTornDown()) {
378391
return;
379392
}
380393
try {
@@ -495,7 +508,7 @@ public Map getExportedCustomDirectEventTypeConstants() {
495508

496509
@ReactProp(name = "physicsBody")
497510
public void setPhysicsBody(VRTNode view, ReadableMap map) {
498-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
511+
if (view == null || view.isTornDown()) {
499512
return;
500513
}
501514
try {
@@ -507,7 +520,7 @@ public void setPhysicsBody(VRTNode view, ReadableMap map) {
507520

508521
@ReactProp(name = "canCollide", defaultBoolean = VRTNode.DEFAULT_CAN_FUSE)
509522
public void setCanCollide(VRTNode view, boolean canCollide) {
510-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
523+
if (view == null || view.isTornDown()) {
511524
return;
512525
}
513526
try {
@@ -519,7 +532,7 @@ public void setCanCollide(VRTNode view, boolean canCollide) {
519532

520533
@ReactProp(name = "viroTag")
521534
public void setViroTag(VRTNode view, String tag) {
522-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
535+
if (view == null || view.isTornDown()) {
523536
return;
524537
}
525538
try {
@@ -531,7 +544,7 @@ public void setViroTag(VRTNode view, String tag) {
531544

532545
@ReactProp(name = "hasTransformDelegate", defaultBoolean = false)
533546
public void setViroTag(VRTNode view, boolean hasDelegate) {
534-
if (view == null || view.isTornDown() || !view.isAttachedToWindow()) {
547+
if (view == null || view.isTornDown()) {
535548
return;
536549
}
537550
try {

0 commit comments

Comments
 (0)