react-native 0.82.0-nightly-20250710-586f5ba89 → 0.82.0-nightly-20250711-263ccad3c
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/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -0
- package/Libraries/Blob/React-RCTBlob.podspec +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/React-RCTImage.podspec +1 -0
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +13 -33
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -0
- package/Libraries/Network/React-RCTNetwork.podspec +1 -0
- package/Libraries/Settings/React-RCTSettings.podspec +1 -0
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTPerfMonitor.mm +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +0 -6
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +0 -9
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.cpp +25 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.h +25 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.cpp +34 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.h +17 -0
- package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/RCTComponentViewHelpers.h +4 -0
- package/React/Fabric/Mounting/ComponentViews/VirtualViewExperimental/RCTVirtualViewExperimentalComponentView.h +24 -0
- package/React/Fabric/Mounting/ComponentViews/VirtualViewExperimental/RCTVirtualViewExperimentalComponentView.mm +384 -0
- package/React/Fabric/RCTPrimitives.h +1 -1
- package/React/Fabric/RCTSurfaceRegistry.h +1 -1
- package/React/React-RCTFBReactNativeSpec.podspec +1 -0
- package/React/React-RCTFabric.podspec +1 -0
- package/React/Runtime/React-RCTRuntime.podspec +1 -0
- package/React-Core-prebuilt.podspec +2 -3
- package/React-Core.podspec +1 -4
- package/ReactAndroid/api/ReactAndroid.api +94 -1
- package/ReactAndroid/build.gradle.kts +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +1 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.kt +4 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +1 -7
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +1 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +1 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainer.kt +136 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewMode.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewModeChangeEmitter.kt +19 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt +3 -11
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualViewManager.kt +4 -3
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/viewexperimental/ReactVirtualViewExperimental.kt +200 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/viewexperimental/ReactVirtualViewExperimentalManager.kt +109 -0
- package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +3 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +1 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +1 -4
- package/ReactCommon/React-Fabric.podspec +2 -1
- package/ReactCommon/React-FabricComponents.podspec +7 -0
- package/ReactCommon/React-FabricImage.podspec +1 -0
- package/ReactCommon/React-Mapbuffer.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +2 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/React-hermes.podspec +1 -0
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +2 -1
- package/ReactCommon/jsi/React-jsi.podspec +1 -0
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -0
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -0
- package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +2 -1
- package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +2 -1
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +2 -1
- package/ReactCommon/jsitooling/React-jsitooling.podspec +2 -1
- package/ReactCommon/logger/React-logger.podspec +1 -0
- package/ReactCommon/react/debug/React-debug.podspec +1 -1
- package/ReactCommon/react/featureflags/React-featureflags.podspec +2 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +1 -6
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +57 -75
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +2 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +1 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +1 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +1 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +2 -1
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +1 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +1 -3
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +1 -0
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -0
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +2 -1
- package/ReactCommon/react/renderer/components/virtualviewexperimental/VirtualViewExperimentalComponentDescriptor.h +20 -0
- package/ReactCommon/react/renderer/components/virtualviewexperimental/VirtualViewExperimentalShadowNode.h +39 -0
- package/ReactCommon/react/renderer/core/ShadowNodeTraits.h +9 -0
- package/ReactCommon/react/renderer/css/React-renderercss.podspec +2 -2
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +2 -1
- package/ReactCommon/react/renderer/graphics/Color.cpp +4 -4
- package/ReactCommon/react/renderer/graphics/Color.h +4 -4
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +2 -1
- package/ReactCommon/react/renderer/graphics/Transform.cpp +23 -20
- package/ReactCommon/react/renderer/graphics/Transform.h +17 -17
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -0
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +2 -1
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +2 -1
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +2 -1
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +2 -1
- package/ReactCommon/react/utils/React-utils.podspec +2 -1
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -0
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +2 -1
- package/package.json +8 -8
- package/scripts/cocoapods/new_architecture.rb +1 -0
- package/scripts/cocoapods/rncore.rb +20 -8
- package/scripts/cocoapods/utils.rb +16 -8
- package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/sdks/hermesc/win64-bin/msvcp140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140.dll +0 -0
- package/sdks/hermesc/win64-bin/vcruntime140_1.dll +0 -0
- package/src/private/animated/NativeAnimatedHelper.js +0 -1
- package/src/private/animated/createAnimatedPropsHook.js +1 -1
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -6
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -2
|
@@ -51,9 +51,7 @@ RCT_EXPORT_MODULE();
|
|
|
51
51
|
{
|
|
52
52
|
// _surfacePresenter set in setSurfacePresenter:
|
|
53
53
|
_nodesManager = [[RCTNativeAnimatedNodesManager alloc] initWithBridge:nil surfacePresenter:_surfacePresenter];
|
|
54
|
-
|
|
55
|
-
[_surfacePresenter addObserver:self];
|
|
56
|
-
}
|
|
54
|
+
[_surfacePresenter addObserver:self];
|
|
57
55
|
[[self.moduleRegistry moduleForName:"EventDispatcher"] addDispatchObserver:self];
|
|
58
56
|
}
|
|
59
57
|
|
|
@@ -62,9 +60,7 @@ RCT_EXPORT_MODULE();
|
|
|
62
60
|
[super invalidate];
|
|
63
61
|
[_nodesManager stopAnimationLoop];
|
|
64
62
|
[[self.moduleRegistry moduleForName:"EventDispatcher"] removeDispatchObserver:self];
|
|
65
|
-
|
|
66
|
-
[_surfacePresenter removeObserver:self];
|
|
67
|
-
}
|
|
63
|
+
[_surfacePresenter removeObserver:self];
|
|
68
64
|
}
|
|
69
65
|
|
|
70
66
|
/*
|
|
@@ -80,11 +76,7 @@ RCT_EXPORT_MODULE();
|
|
|
80
76
|
|
|
81
77
|
RCT_EXPORT_METHOD(startOperationBatch) {}
|
|
82
78
|
|
|
83
|
-
RCT_EXPORT_METHOD(finishOperationBatch)
|
|
84
|
-
{
|
|
85
|
-
// This method is only called from JS when animatedShouldSignalBatch is enabled.
|
|
86
|
-
[self flushOperationQueues];
|
|
87
|
-
}
|
|
79
|
+
RCT_EXPORT_METHOD(finishOperationBatch) {}
|
|
88
80
|
|
|
89
81
|
RCT_EXPORT_METHOD(createAnimatedNode : (double)tag config : (NSDictionary<NSString *, id> *)config)
|
|
90
82
|
{
|
|
@@ -259,39 +251,27 @@ RCT_EXPORT_METHOD(queueAndExecuteBatchedOperations : (NSArray *)operationsAndArg
|
|
|
259
251
|
|
|
260
252
|
- (void)queueFlushedOperationBlock:(AnimatedOperation)operation
|
|
261
253
|
{
|
|
262
|
-
|
|
254
|
+
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
263
255
|
[self addOperationBlock:operation];
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
// animations, flush here for changes in Animated.Value for Animated.event.
|
|
270
|
-
[self flushOperationQueues];
|
|
271
|
-
});
|
|
272
|
-
}
|
|
256
|
+
// In Bridge, flushing of native animations is done from RCTCxxBridge batchDidComplete().
|
|
257
|
+
// Since RCTCxxBridge doesn't exist in Bridgeless, and components are not remounted in Fabric for native
|
|
258
|
+
// animations, flush here for changes in Animated.Value for Animated.event.
|
|
259
|
+
[self flushOperationQueues];
|
|
260
|
+
});
|
|
273
261
|
}
|
|
274
262
|
|
|
275
263
|
- (void)queueOperationBlock:(AnimatedOperation)operation
|
|
276
264
|
{
|
|
277
|
-
|
|
265
|
+
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
278
266
|
[self addOperationBlock:operation];
|
|
279
|
-
}
|
|
280
|
-
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
281
|
-
[self addOperationBlock:operation];
|
|
282
|
-
});
|
|
283
|
-
}
|
|
267
|
+
});
|
|
284
268
|
}
|
|
285
269
|
|
|
286
270
|
- (void)queuePreOperationBlock:(AnimatedOperation)operation
|
|
287
271
|
{
|
|
288
|
-
|
|
272
|
+
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
289
273
|
[self addPreOperationBlock:operation];
|
|
290
|
-
}
|
|
291
|
-
dispatch_async(RCTGetUIManagerQueue(), ^{
|
|
292
|
-
[self addPreOperationBlock:operation];
|
|
293
|
-
});
|
|
294
|
-
}
|
|
274
|
+
});
|
|
295
275
|
}
|
|
296
276
|
|
|
297
277
|
- (void)addOperationBlock:(AnimatedOperation)operation
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(82),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20250711-263ccad3c",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -39,7 +39,7 @@ static NSString *const RCTPerfMonitorCellIdentifier = @"RCTPerfMonitorCellIdenti
|
|
|
39
39
|
static const CGFloat RCTPerfMonitorBarHeight = 50;
|
|
40
40
|
static const CGFloat RCTPerfMonitorExpandHeight = 250;
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
using RCTJSCSetOptionType = BOOL (*)(const char *);
|
|
43
43
|
|
|
44
44
|
NSArray<NSString *> *LabelsForRCTPerformanceLoggerTags();
|
|
45
45
|
|
|
@@ -92,11 +92,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonT
|
|
|
92
92
|
rt
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
|
-
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animatedShouldSignalBatch(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
96
|
-
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->animatedShouldSignalBatch(
|
|
97
|
-
rt
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
95
|
static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
|
101
96
|
return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->cxxNativeAnimatedEnabled(
|
|
102
97
|
rt
|
|
@@ -382,7 +377,6 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
|
|
|
382
377
|
: TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) {
|
|
383
378
|
methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag};
|
|
384
379
|
methodMap_["commonTestFlagWithoutNativeImplementation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation};
|
|
385
|
-
methodMap_["animatedShouldSignalBatch"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animatedShouldSignalBatch};
|
|
386
380
|
methodMap_["cxxNativeAnimatedEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled};
|
|
387
381
|
methodMap_["cxxNativeAnimatedRemoveJsSync"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedRemoveJsSync};
|
|
388
382
|
methodMap_["disableMainQueueSyncDispatchIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMainQueueSyncDispatchIOS};
|
|
@@ -328,7 +328,6 @@ protected:
|
|
|
328
328
|
public:
|
|
329
329
|
virtual bool commonTestFlag(jsi::Runtime &rt) = 0;
|
|
330
330
|
virtual bool commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt) = 0;
|
|
331
|
-
virtual bool animatedShouldSignalBatch(jsi::Runtime &rt) = 0;
|
|
332
331
|
virtual bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) = 0;
|
|
333
332
|
virtual bool cxxNativeAnimatedRemoveJsSync(jsi::Runtime &rt) = 0;
|
|
334
333
|
virtual bool disableMainQueueSyncDispatchIOS(jsi::Runtime &rt) = 0;
|
|
@@ -431,14 +430,6 @@ private:
|
|
|
431
430
|
return bridging::callFromJs<bool>(
|
|
432
431
|
rt, &T::commonTestFlagWithoutNativeImplementation, jsInvoker_, instance_);
|
|
433
432
|
}
|
|
434
|
-
bool animatedShouldSignalBatch(jsi::Runtime &rt) override {
|
|
435
|
-
static_assert(
|
|
436
|
-
bridging::getParameterCount(&T::animatedShouldSignalBatch) == 1,
|
|
437
|
-
"Expected animatedShouldSignalBatch(...) to have 1 parameters");
|
|
438
|
-
|
|
439
|
-
return bridging::callFromJs<bool>(
|
|
440
|
-
rt, &T::animatedShouldSignalBatch, jsInvoker_, instance_);
|
|
441
|
-
}
|
|
442
433
|
bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) override {
|
|
443
434
|
static_assert(
|
|
444
435
|
bridging::getParameterCount(&T::cxxNativeAnimatedEnabled) == 1,
|
package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.cpp
CHANGED
|
@@ -13,6 +13,31 @@
|
|
|
13
13
|
|
|
14
14
|
namespace facebook::react {
|
|
15
15
|
|
|
16
|
+
void VirtualViewExperimentalEventEmitter::onModeChange(OnModeChange event) const {
|
|
17
|
+
dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
18
|
+
auto payload = jsi::Object(runtime);
|
|
19
|
+
payload.setProperty(runtime, "mode", event.mode);
|
|
20
|
+
{
|
|
21
|
+
auto targetRect = jsi::Object(runtime);
|
|
22
|
+
targetRect.setProperty(runtime, "x", event.targetRect.x);
|
|
23
|
+
targetRect.setProperty(runtime, "y", event.targetRect.y);
|
|
24
|
+
targetRect.setProperty(runtime, "width", event.targetRect.width);
|
|
25
|
+
targetRect.setProperty(runtime, "height", event.targetRect.height);
|
|
26
|
+
payload.setProperty(runtime, "targetRect", targetRect);
|
|
27
|
+
}
|
|
28
|
+
{
|
|
29
|
+
auto thresholdRect = jsi::Object(runtime);
|
|
30
|
+
thresholdRect.setProperty(runtime, "x", event.thresholdRect.x);
|
|
31
|
+
thresholdRect.setProperty(runtime, "y", event.thresholdRect.y);
|
|
32
|
+
thresholdRect.setProperty(runtime, "width", event.thresholdRect.width);
|
|
33
|
+
thresholdRect.setProperty(runtime, "height", event.thresholdRect.height);
|
|
34
|
+
payload.setProperty(runtime, "thresholdRect", thresholdRect);
|
|
35
|
+
}
|
|
36
|
+
return payload;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
16
41
|
void VirtualViewEventEmitter::onModeChange(OnModeChange event) const {
|
|
17
42
|
dispatchEvent("modeChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
18
43
|
auto payload = jsi::Object(runtime);
|
|
@@ -13,6 +13,31 @@
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
namespace facebook::react {
|
|
16
|
+
class VirtualViewExperimentalEventEmitter : public ViewEventEmitter {
|
|
17
|
+
public:
|
|
18
|
+
using ViewEventEmitter::ViewEventEmitter;
|
|
19
|
+
|
|
20
|
+
struct OnModeChangeTargetRect {
|
|
21
|
+
double x;
|
|
22
|
+
double y;
|
|
23
|
+
double width;
|
|
24
|
+
double height;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
struct OnModeChangeThresholdRect {
|
|
28
|
+
double x;
|
|
29
|
+
double y;
|
|
30
|
+
double width;
|
|
31
|
+
double height;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
struct OnModeChange {
|
|
35
|
+
int mode;
|
|
36
|
+
OnModeChangeTargetRect targetRect;
|
|
37
|
+
OnModeChangeThresholdRect thresholdRect;
|
|
38
|
+
};
|
|
39
|
+
void onModeChange(OnModeChange value) const;
|
|
40
|
+
};
|
|
16
41
|
class VirtualViewEventEmitter : public ViewEventEmitter {
|
|
17
42
|
public:
|
|
18
43
|
using ViewEventEmitter::ViewEventEmitter;
|
|
@@ -14,6 +14,40 @@
|
|
|
14
14
|
|
|
15
15
|
namespace facebook::react {
|
|
16
16
|
|
|
17
|
+
VirtualViewExperimentalProps::VirtualViewExperimentalProps(
|
|
18
|
+
const PropsParserContext &context,
|
|
19
|
+
const VirtualViewExperimentalProps &sourceProps,
|
|
20
|
+
const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
|
|
21
|
+
|
|
22
|
+
initialHidden(convertRawProp(context, rawProps, "initialHidden", sourceProps.initialHidden, {false})),
|
|
23
|
+
renderState(convertRawProp(context, rawProps, "renderState", sourceProps.renderState, {0})) {}
|
|
24
|
+
|
|
25
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
26
|
+
ComponentName VirtualViewExperimentalProps::getDiffPropsImplementationTarget() const {
|
|
27
|
+
return "VirtualViewExperimental";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
folly::dynamic VirtualViewExperimentalProps::getDiffProps(
|
|
31
|
+
const Props* prevProps) const {
|
|
32
|
+
static const auto defaultProps = VirtualViewExperimentalProps();
|
|
33
|
+
const VirtualViewExperimentalProps* oldProps = prevProps == nullptr
|
|
34
|
+
? &defaultProps
|
|
35
|
+
: static_cast<const VirtualViewExperimentalProps*>(prevProps);
|
|
36
|
+
if (this == oldProps) {
|
|
37
|
+
return folly::dynamic::object();
|
|
38
|
+
}
|
|
39
|
+
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
|
|
40
|
+
|
|
41
|
+
if (initialHidden != oldProps->initialHidden) {
|
|
42
|
+
result["initialHidden"] = initialHidden;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (renderState != oldProps->renderState) {
|
|
46
|
+
result["renderState"] = renderState;
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
50
|
+
#endif
|
|
17
51
|
VirtualViewProps::VirtualViewProps(
|
|
18
52
|
const PropsParserContext &context,
|
|
19
53
|
const VirtualViewProps &sourceProps,
|
|
@@ -17,6 +17,23 @@
|
|
|
17
17
|
|
|
18
18
|
namespace facebook::react {
|
|
19
19
|
|
|
20
|
+
class VirtualViewExperimentalProps final : public ViewProps {
|
|
21
|
+
public:
|
|
22
|
+
VirtualViewExperimentalProps() = default;
|
|
23
|
+
VirtualViewExperimentalProps(const PropsParserContext& context, const VirtualViewExperimentalProps &sourceProps, const RawProps &rawProps);
|
|
24
|
+
|
|
25
|
+
#pragma mark - Props
|
|
26
|
+
|
|
27
|
+
bool initialHidden{false};
|
|
28
|
+
int renderState{0};
|
|
29
|
+
|
|
30
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
31
|
+
ComponentName getDiffPropsImplementationTarget() const override;
|
|
32
|
+
|
|
33
|
+
folly::dynamic getDiffProps(const Props* prevProps) const override;
|
|
34
|
+
#endif
|
|
35
|
+
};
|
|
36
|
+
|
|
20
37
|
class VirtualViewProps final : public ViewProps {
|
|
21
38
|
public:
|
|
22
39
|
VirtualViewProps() = default;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#import <UIKit/UIKit.h>
|
|
9
|
+
|
|
10
|
+
#import <React/RCTViewComponentView.h>
|
|
11
|
+
|
|
12
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
@interface RCTVirtualViewExperimentalComponentView : RCTViewComponentView
|
|
15
|
+
|
|
16
|
+
+ (instancetype)new NS_UNAVAILABLE;
|
|
17
|
+
- (instancetype)init NS_UNAVAILABLE;
|
|
18
|
+
- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;
|
|
19
|
+
|
|
20
|
+
- (instancetype)initWithFrame:(CGRect)frame NS_DESIGNATED_INITIALIZER;
|
|
21
|
+
|
|
22
|
+
@end
|
|
23
|
+
|
|
24
|
+
NS_ASSUME_NONNULL_END
|