react-native 0.83.0-nightly-20251005-07f40ec6b → 0.83.0-nightly-20251007-854268275
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/Core/ReactNativeVersion.js +1 -1
- package/Libraries/NativeComponent/NativeComponentRegistry.d.ts +98 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/RCTMountingManager.mm +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt +2 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/tests/DebuggerSessionObserverTest.cpp +151 -0
- package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +2 -2
- package/ReactCommon/react/renderer/textlayoutmanager/platform/cxx/react/renderer/textlayoutmanager/TextLayoutManager.cpp +8 -5
- package/ReactCommon/react/renderer/uimanager/PointerEventsProcessor.cpp +5 -3
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +7 -5
- package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +3 -3
- package/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp +4 -2
- package/ReactCommon/react/utils/tests/hash_combineTests.cpp +2 -2
- package/ReactCommon/reactperflogger/fusebox/FuseboxTracer.cpp +4 -1
- package/package.json +8 -8
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
- package/types/index.d.ts +1 -0
- package/ReactCommon/jsinspector-modern/tests/RuntimeTargetDebuggerSessionObserverTest.cpp +0 -214
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 83;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'nightly-
|
|
32
|
+
static prerelease: string | null = 'nightly-20251007-854268275';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -0,0 +1,98 @@
|
|
|
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
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type {HostComponent} from '../../types/public/ReactNativeTypes';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Configures a function that is called to determine whether a given component
|
|
15
|
+
* should be registered using reflection of the native component at runtime.
|
|
16
|
+
*
|
|
17
|
+
* The provider should return null if the native component is unavailable in
|
|
18
|
+
* the current environment.
|
|
19
|
+
*/
|
|
20
|
+
export function setRuntimeConfigProvider(
|
|
21
|
+
runtimeConfigProvider: (name: string) => {
|
|
22
|
+
native: boolean;
|
|
23
|
+
verify: boolean;
|
|
24
|
+
} | null,
|
|
25
|
+
): void;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Gets a `NativeComponent` that can be rendered by React Native.
|
|
29
|
+
*
|
|
30
|
+
* The supplied `viewConfigProvider` may or may not be invoked and utilized,
|
|
31
|
+
* depending on how `setRuntimeConfigProvider` is configured.
|
|
32
|
+
*/
|
|
33
|
+
export function get<Config extends object>(
|
|
34
|
+
name: string,
|
|
35
|
+
viewConfigProvider: () => PartialViewConfig,
|
|
36
|
+
): HostComponent<Config>;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Same as `NativeComponentRegistry.get(...)`, except this will check either
|
|
40
|
+
* the `setRuntimeConfigProvider` configuration or use native reflection (slow)
|
|
41
|
+
* to determine whether this native component is available.
|
|
42
|
+
*
|
|
43
|
+
* If the native component is not available, a stub component is returned. Note
|
|
44
|
+
* that the return value of this is not `HostComponent` because the returned
|
|
45
|
+
* component instance is not guaranteed to have native methods.
|
|
46
|
+
*/
|
|
47
|
+
export function getWithFallback_DEPRECATED<Config extends object>(
|
|
48
|
+
name: string,
|
|
49
|
+
viewConfigProvider: () => PartialViewConfig,
|
|
50
|
+
): React.ComponentType<Config>;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Unstable API. Do not use!
|
|
54
|
+
*
|
|
55
|
+
* This method returns if there is a StaticViewConfig registered for the
|
|
56
|
+
* component name received as a parameter.
|
|
57
|
+
*/
|
|
58
|
+
export function unstable_hasStaticViewConfig(name: string): boolean;
|
|
59
|
+
|
|
60
|
+
type AttributeType<T, V> =
|
|
61
|
+
| true
|
|
62
|
+
| {
|
|
63
|
+
readonly diff?: ((arg1: T, arg2: T) => boolean) | undefined;
|
|
64
|
+
readonly process?: ((arg1: V) => T) | undefined;
|
|
65
|
+
};
|
|
66
|
+
type AnyAttributeType = AttributeType<any, any>;
|
|
67
|
+
type AttributeConfiguration = {
|
|
68
|
+
readonly [propName: string]: AnyAttributeType | void;
|
|
69
|
+
readonly style?:
|
|
70
|
+
| {
|
|
71
|
+
readonly [propName: string]: AnyAttributeType;
|
|
72
|
+
}
|
|
73
|
+
| undefined;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type PartialViewConfig = Readonly<{
|
|
77
|
+
bubblingEventTypes?:
|
|
78
|
+
| {
|
|
79
|
+
readonly [eventName: string]: {
|
|
80
|
+
readonly phasedRegistrationNames: {
|
|
81
|
+
readonly bubbled: string;
|
|
82
|
+
readonly captured: string;
|
|
83
|
+
readonly skipBubbling?: boolean | undefined;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
| undefined;
|
|
88
|
+
directEventTypes?:
|
|
89
|
+
| {
|
|
90
|
+
readonly [eventName: string]: {
|
|
91
|
+
readonly registrationName: string;
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
| undefined;
|
|
95
|
+
supportsRawText?: boolean | undefined;
|
|
96
|
+
uiViewClassName: string;
|
|
97
|
+
validAttributes?: AttributeConfiguration | undefined;
|
|
98
|
+
}>;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(83),
|
|
26
26
|
RCTVersionPatch: @(0),
|
|
27
|
-
RCTVersionPrerelease: @"nightly-
|
|
27
|
+
RCTVersionPrerelease: @"nightly-20251007-854268275",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -299,7 +299,7 @@ static void RCTPerformMountInstructions(
|
|
|
299
299
|
SurfaceId surfaceId = RCTSurfaceIdForView(componentView);
|
|
300
300
|
Props::Shared oldProps = [componentView props];
|
|
301
301
|
Props::Shared newProps = componentDescriptor.cloneProps(
|
|
302
|
-
PropsParserContext{surfaceId, *_contextContainer
|
|
302
|
+
PropsParserContext{surfaceId, *_contextContainer}, oldProps, RawProps(std::move(props)));
|
|
303
303
|
|
|
304
304
|
NSSet<NSString *> *propKeys = componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN ?: [NSSet new];
|
|
305
305
|
propKeys = [propKeys setByAddingObjectsFromArray:propsKeysToBeUpdated];
|
|
@@ -126,7 +126,7 @@ internal class BridgelessReactContext(context: Context, private val reactHost: R
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
override fun <T : JavaScriptModule> getJSModule(jsInterface: Class<T>): T? {
|
|
129
|
-
mInteropModuleRegistry?.getInteropModule(jsInterface)?.let {
|
|
129
|
+
mInteropModuleRegistry?.getInteropModule(jsInterface)?.let { interopModule ->
|
|
130
130
|
if (jsInterface == RCTEventEmitter::class.java) {
|
|
131
131
|
logSoftException(
|
|
132
132
|
TAG,
|
|
@@ -135,7 +135,7 @@ internal class BridgelessReactContext(context: Context, private val reactHost: R
|
|
|
135
135
|
),
|
|
136
136
|
)
|
|
137
137
|
}
|
|
138
|
-
return
|
|
138
|
+
return interopModule
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
// TODO T189052462: ReactContext caches JavaScriptModule instances
|
|
@@ -22,7 +22,7 @@ constexpr struct {
|
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 83;
|
|
24
24
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "nightly-
|
|
25
|
+
std::string_view Prerelease = "nightly-20251007-854268275";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
28
28
|
} // namespace facebook::react
|
|
@@ -0,0 +1,151 @@
|
|
|
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
|
+
#include <folly/executors/QueuedImmediateExecutor.h>
|
|
9
|
+
|
|
10
|
+
#include "JsiIntegrationTest.h"
|
|
11
|
+
#include "engines/JsiIntegrationTestHermesEngineAdapter.h"
|
|
12
|
+
|
|
13
|
+
using namespace ::testing;
|
|
14
|
+
|
|
15
|
+
namespace facebook::react::jsinspector_modern {
|
|
16
|
+
|
|
17
|
+
class DebuggerSessionObserverTest : public JsiIntegrationPortableTestBase<
|
|
18
|
+
JsiIntegrationTestHermesEngineAdapter,
|
|
19
|
+
folly::QueuedImmediateExecutor> {
|
|
20
|
+
protected:
|
|
21
|
+
void enableRuntimeDomain() {
|
|
22
|
+
InSequence s;
|
|
23
|
+
|
|
24
|
+
auto executionContextInfo = expectMessageFromPage(JsonParsed(
|
|
25
|
+
AllOf(AtJsonPtr("/method", "Runtime.executionContextCreated"))));
|
|
26
|
+
expectMessageFromPage(JsonEq(R"({
|
|
27
|
+
"id": 1,
|
|
28
|
+
"result": {}
|
|
29
|
+
})"));
|
|
30
|
+
toPage_->sendMessage(R"({
|
|
31
|
+
"id": 1,
|
|
32
|
+
"method": "Runtime.enable"
|
|
33
|
+
})");
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
void enableLogDomain() {
|
|
37
|
+
InSequence s;
|
|
38
|
+
|
|
39
|
+
EXPECT_CALL(
|
|
40
|
+
fromPage(),
|
|
41
|
+
onMessage(JsonParsed(AllOf(
|
|
42
|
+
AtJsonPtr("/method", "Log.entryAdded"),
|
|
43
|
+
AtJsonPtr("/params/entry", Not(IsEmpty()))))))
|
|
44
|
+
.Times(AtLeast(1));
|
|
45
|
+
expectMessageFromPage(JsonEq(R"({
|
|
46
|
+
"id": 1,
|
|
47
|
+
"result": {}
|
|
48
|
+
})"));
|
|
49
|
+
toPage_->sendMessage(R"({
|
|
50
|
+
"id": 1,
|
|
51
|
+
"method": "Log.enable"
|
|
52
|
+
})");
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
void disableRuntimeDomain() {
|
|
56
|
+
InSequence s;
|
|
57
|
+
expectMessageFromPage(JsonEq(R"({
|
|
58
|
+
"id": 1,
|
|
59
|
+
"result": {}
|
|
60
|
+
})"));
|
|
61
|
+
toPage_->sendMessage(R"({
|
|
62
|
+
"id": 1,
|
|
63
|
+
"method": "Runtime.disable"
|
|
64
|
+
})");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
void disableLogDomain() {
|
|
68
|
+
InSequence s;
|
|
69
|
+
expectMessageFromPage(JsonEq(R"({
|
|
70
|
+
"id": 1,
|
|
71
|
+
"result": {}
|
|
72
|
+
})"));
|
|
73
|
+
toPage_->sendMessage(R"({
|
|
74
|
+
"id": 1,
|
|
75
|
+
"method": "Log.disable"
|
|
76
|
+
})");
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
TEST_F(DebuggerSessionObserverTest, InstallsGlobalObserverObjectByDefault) {
|
|
81
|
+
EXPECT_TRUE(eval("__DEBUGGER_SESSION_OBSERVER__ != null").asBool());
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
TEST_F(
|
|
85
|
+
DebuggerSessionObserverTest,
|
|
86
|
+
WillNotEmitStatusUpdateUnlessBothRuntimeAndLogDomainsAreEnabled) {
|
|
87
|
+
EXPECT_FALSE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
88
|
+
|
|
89
|
+
connect();
|
|
90
|
+
|
|
91
|
+
EXPECT_FALSE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
92
|
+
|
|
93
|
+
enableRuntimeDomain();
|
|
94
|
+
|
|
95
|
+
EXPECT_FALSE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
96
|
+
|
|
97
|
+
enableLogDomain();
|
|
98
|
+
|
|
99
|
+
EXPECT_TRUE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
TEST_F(
|
|
103
|
+
DebuggerSessionObserverTest,
|
|
104
|
+
UpdatesTheStatusOnceRuntimeDomainIsDisabled) {
|
|
105
|
+
connect();
|
|
106
|
+
enableLogDomain();
|
|
107
|
+
enableRuntimeDomain();
|
|
108
|
+
|
|
109
|
+
EXPECT_TRUE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
110
|
+
|
|
111
|
+
disableRuntimeDomain();
|
|
112
|
+
|
|
113
|
+
EXPECT_FALSE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
TEST_F(DebuggerSessionObserverTest, UpdatesTheStatusOnceLogDomainIsDisabled) {
|
|
117
|
+
connect();
|
|
118
|
+
enableLogDomain();
|
|
119
|
+
enableRuntimeDomain();
|
|
120
|
+
|
|
121
|
+
EXPECT_TRUE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
122
|
+
|
|
123
|
+
disableLogDomain();
|
|
124
|
+
|
|
125
|
+
EXPECT_FALSE(eval("__DEBUGGER_SESSION_OBSERVER__.hasActiveSession").asBool());
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
TEST_F(
|
|
129
|
+
DebuggerSessionObserverTest,
|
|
130
|
+
NotifiesSubscribersWhichWereSubscribedBeforeSessionInitialization) {
|
|
131
|
+
eval(
|
|
132
|
+
R"(
|
|
133
|
+
var latestStatus = undefined;
|
|
134
|
+
__DEBUGGER_SESSION_OBSERVER__.subscribers.add(updatedStatus => {
|
|
135
|
+
latestStatus = updatedStatus;
|
|
136
|
+
});
|
|
137
|
+
)");
|
|
138
|
+
|
|
139
|
+
EXPECT_TRUE(eval("latestStatus").isUndefined());
|
|
140
|
+
|
|
141
|
+
connect();
|
|
142
|
+
enableLogDomain();
|
|
143
|
+
enableRuntimeDomain();
|
|
144
|
+
EXPECT_TRUE(eval("latestStatus").asBool());
|
|
145
|
+
|
|
146
|
+
disableLogDomain();
|
|
147
|
+
|
|
148
|
+
EXPECT_FALSE(eval("latestStatus").asBool());
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
} // namespace facebook::react::jsinspector_modern
|
|
@@ -225,7 +225,7 @@ Size SurfaceHandler::measure(
|
|
|
225
225
|
link_.shadowTree->getCurrentRevision().rootShadowNode;
|
|
226
226
|
|
|
227
227
|
PropsParserContext propsParserContext{
|
|
228
|
-
parameters_.surfaceId, *parameters_.contextContainer
|
|
228
|
+
parameters_.surfaceId, *parameters_.contextContainer};
|
|
229
229
|
|
|
230
230
|
auto rootShadowNode = currentRootShadowNode->clone(
|
|
231
231
|
propsParserContext, layoutConstraints, layoutContext);
|
|
@@ -329,7 +329,7 @@ void SurfaceHandler::constraintLayout(
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
PropsParserContext propsParserContext{
|
|
332
|
-
parameters_.surfaceId, *parameters_.contextContainer
|
|
332
|
+
parameters_.surfaceId, *parameters_.contextContainer};
|
|
333
333
|
|
|
334
334
|
react_native_assert(
|
|
335
335
|
link_.shadowTree && "`link_.shadowTree` must not be null.");
|
|
@@ -21,14 +21,17 @@ TextMeasurement TextLayoutManager::measure(
|
|
|
21
21
|
TextMeasurement::Attachments attachments;
|
|
22
22
|
for (const auto& fragment : attributedStringBox.getValue().getFragments()) {
|
|
23
23
|
if (fragment.isAttachment()) {
|
|
24
|
-
attachments.push_back(
|
|
25
|
-
|
|
24
|
+
attachments.push_back(TextMeasurement::Attachment{
|
|
25
|
+
.frame =
|
|
26
|
+
{.origin = {.x = 0, .y = 0}, .size = {.width = 0, .height = 0}},
|
|
27
|
+
.isClipped = false});
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
return TextMeasurement{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
31
|
+
.size =
|
|
32
|
+
{.width = layoutConstraints.minimumSize.width,
|
|
33
|
+
.height = layoutConstraints.minimumSize.height},
|
|
34
|
+
.attachments = attachments};
|
|
32
35
|
}
|
|
33
36
|
|
|
34
37
|
} // namespace facebook::react
|
|
@@ -104,10 +104,12 @@ static PointerEventTarget retargetPointerEvent(
|
|
|
104
104
|
// More work will be needed to properly take non-trival transforms into
|
|
105
105
|
// account.
|
|
106
106
|
auto layoutMetrics = uiManager.getRelativeLayoutMetrics(
|
|
107
|
-
*latestNodeToTarget,
|
|
107
|
+
*latestNodeToTarget,
|
|
108
|
+
nullptr,
|
|
109
|
+
{/* .includeTransform */ .includeTransform = true});
|
|
108
110
|
retargetedEvent.offsetPoint = {
|
|
109
|
-
event.clientPoint.x - layoutMetrics.frame.origin.x,
|
|
110
|
-
event.clientPoint.y - layoutMetrics.frame.origin.y,
|
|
111
|
+
.x = event.clientPoint.x - layoutMetrics.frame.origin.x,
|
|
112
|
+
.y = event.clientPoint.y - layoutMetrics.frame.origin.y,
|
|
111
113
|
};
|
|
112
114
|
|
|
113
115
|
PointerEventTarget result = {};
|
|
@@ -70,10 +70,12 @@ std::shared_ptr<ShadowNode> UIManager::createNode(
|
|
|
70
70
|
auto fallbackDescriptor =
|
|
71
71
|
componentDescriptorRegistry_->getFallbackComponentDescriptor();
|
|
72
72
|
|
|
73
|
-
PropsParserContext propsParserContext{surfaceId, *contextContainer_
|
|
73
|
+
PropsParserContext propsParserContext{surfaceId, *contextContainer_};
|
|
74
74
|
|
|
75
75
|
auto family = componentDescriptor.createFamily(
|
|
76
|
-
{tag
|
|
76
|
+
{.tag = tag,
|
|
77
|
+
.surfaceId = surfaceId,
|
|
78
|
+
.instanceHandle = std::move(instanceHandle)});
|
|
77
79
|
const auto props = componentDescriptor.cloneProps(
|
|
78
80
|
propsParserContext, nullptr, std::move(rawProps));
|
|
79
81
|
const auto state = componentDescriptor.createInitialState(props, family);
|
|
@@ -111,7 +113,7 @@ std::shared_ptr<ShadowNode> UIManager::cloneNode(
|
|
|
111
113
|
"UIManager::cloneNode", "componentName", shadowNode.getComponentName());
|
|
112
114
|
|
|
113
115
|
PropsParserContext propsParserContext{
|
|
114
|
-
shadowNode.getFamily().getSurfaceId(), *contextContainer_
|
|
116
|
+
shadowNode.getFamily().getSurfaceId(), *contextContainer_};
|
|
115
117
|
|
|
116
118
|
auto& componentDescriptor = shadowNode.getComponentDescriptor();
|
|
117
119
|
auto& family = shadowNode.getFamily();
|
|
@@ -455,14 +457,14 @@ void UIManager::setNativeProps_DEPRECATED(
|
|
|
455
457
|
componentDescriptorRegistry_->at(
|
|
456
458
|
shadowNode->getComponentHandle());
|
|
457
459
|
PropsParserContext propsParserContext{
|
|
458
|
-
family.getSurfaceId(), *contextContainer_
|
|
460
|
+
family.getSurfaceId(), *contextContainer_};
|
|
459
461
|
auto props = componentDescriptor.cloneProps(
|
|
460
462
|
propsParserContext,
|
|
461
463
|
getShadowNodeInSubtree(*shadowNode, ancestorShadowNode)
|
|
462
464
|
->getProps(),
|
|
463
465
|
RawProps(rawProps));
|
|
464
466
|
|
|
465
|
-
return oldShadowNode.clone({/* .props = */ props});
|
|
467
|
+
return oldShadowNode.clone({/* .props = */ .props = props});
|
|
466
468
|
});
|
|
467
469
|
|
|
468
470
|
return std::static_pointer_cast<RootShadowNode>(rootNode);
|
|
@@ -277,8 +277,8 @@ jsi::Value UIManagerBinding::get(
|
|
|
277
277
|
auto locationY = (Float)arguments[2].getNumber();
|
|
278
278
|
auto onSuccessFunction =
|
|
279
279
|
arguments[3].getObject(runtime).getFunction(runtime);
|
|
280
|
-
auto targetNode =
|
|
281
|
-
|
|
280
|
+
auto targetNode = uiManager->findNodeAtPoint(
|
|
281
|
+
node, Point{.x = locationX, .y = locationY});
|
|
282
282
|
|
|
283
283
|
if (!targetNode) {
|
|
284
284
|
onSuccessFunction.call(runtime, jsi::Value::null());
|
|
@@ -511,7 +511,7 @@ jsi::Value UIManagerBinding::get(
|
|
|
511
511
|
Bridging<std::shared_ptr<const ShadowNode>>::fromJs(
|
|
512
512
|
runtime, arguments[1])
|
|
513
513
|
.get(),
|
|
514
|
-
{/* .includeTransform = */ false});
|
|
514
|
+
{/* .includeTransform = */ .includeTransform = false});
|
|
515
515
|
auto frame = layoutMetrics.frame;
|
|
516
516
|
auto result = jsi::Object(runtime);
|
|
517
517
|
result.setProperty(runtime, "left", frame.origin.x);
|
|
@@ -43,7 +43,9 @@ class PointerEventsProcessorTest : public ::testing::Test {
|
|
|
43
43
|
auto componentDescriptorRegistry =
|
|
44
44
|
componentDescriptorProviderRegistry.createComponentDescriptorRegistry(
|
|
45
45
|
ComponentDescriptorParameters{
|
|
46
|
-
eventDispatcher
|
|
46
|
+
.eventDispatcher = eventDispatcher,
|
|
47
|
+
.contextContainer = std::move(contextContainer),
|
|
48
|
+
.flavor = nullptr});
|
|
47
49
|
|
|
48
50
|
componentDescriptorProviderRegistry.add(
|
|
49
51
|
concreteComponentDescriptorProvider<RootComponentDescriptor>());
|
|
@@ -83,7 +85,7 @@ class PointerEventsProcessorTest : public ::testing::Test {
|
|
|
83
85
|
auto sharedProps = std::make_shared<RootProps>();
|
|
84
86
|
auto &props = *sharedProps;
|
|
85
87
|
listenToAllPointerEvents(props);
|
|
86
|
-
props.layoutConstraints = LayoutConstraints{{0
|
|
88
|
+
props.layoutConstraints = LayoutConstraints{.minimumSize={.width=0,.height=0}, .maximumSize={.width=500, .height=500}};
|
|
87
89
|
auto &yogaStyle = props.yogaStyle;
|
|
88
90
|
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(400));
|
|
89
91
|
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(400));
|
|
@@ -67,8 +67,8 @@ TEST(hash_combineTests, testStrings) {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
TEST(hash_combineTests, testCustomTypes) {
|
|
70
|
-
auto person1 = Person{"John", "Doe"};
|
|
71
|
-
auto person2 = Person{"Jane", "Doe"};
|
|
70
|
+
auto person1 = Person{.firstName = "John", .lastName = "Doe"};
|
|
71
|
+
auto person2 = Person{.firstName = "Jane", .lastName = "Doe"};
|
|
72
72
|
|
|
73
73
|
std::size_t seed = 0;
|
|
74
74
|
hash_combine(seed, person1);
|
|
@@ -110,7 +110,10 @@ void FuseboxTracer::addEvent(
|
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
112
112
|
buffer_.push_back(BufferEvent{
|
|
113
|
-
start
|
|
113
|
+
.start = start,
|
|
114
|
+
.end = end,
|
|
115
|
+
.name = std::string(name),
|
|
116
|
+
.track = std::string(track.value_or(""))});
|
|
114
117
|
}
|
|
115
118
|
|
|
116
119
|
bool FuseboxTracer::stopTracingAndWriteToFile(const std::string& path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.83.0-nightly-
|
|
3
|
+
"version": "0.83.0-nightly-20251007-854268275",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -159,13 +159,13 @@
|
|
|
159
159
|
},
|
|
160
160
|
"dependencies": {
|
|
161
161
|
"@jest/create-cache-key-function": "^29.7.0",
|
|
162
|
-
"@react-native/assets-registry": "0.83.0-nightly-
|
|
163
|
-
"@react-native/codegen": "0.83.0-nightly-
|
|
164
|
-
"@react-native/community-cli-plugin": "0.83.0-nightly-
|
|
165
|
-
"@react-native/gradle-plugin": "0.83.0-nightly-
|
|
166
|
-
"@react-native/js-polyfills": "0.83.0-nightly-
|
|
167
|
-
"@react-native/normalize-colors": "0.83.0-nightly-
|
|
168
|
-
"@react-native/virtualized-lists": "0.83.0-nightly-
|
|
162
|
+
"@react-native/assets-registry": "0.83.0-nightly-20251007-854268275",
|
|
163
|
+
"@react-native/codegen": "0.83.0-nightly-20251007-854268275",
|
|
164
|
+
"@react-native/community-cli-plugin": "0.83.0-nightly-20251007-854268275",
|
|
165
|
+
"@react-native/gradle-plugin": "0.83.0-nightly-20251007-854268275",
|
|
166
|
+
"@react-native/js-polyfills": "0.83.0-nightly-20251007-854268275",
|
|
167
|
+
"@react-native/normalize-colors": "0.83.0-nightly-20251007-854268275",
|
|
168
|
+
"@react-native/virtualized-lists": "0.83.0-nightly-20251007-854268275",
|
|
169
169
|
"abort-controller": "^3.0.0",
|
|
170
170
|
"anser": "^1.4.9",
|
|
171
171
|
"ansi-regex": "^5.0.0",
|
|
Binary file
|
|
@@ -62,7 +62,7 @@ Pod::Spec.new do |spec|
|
|
|
62
62
|
exit 0
|
|
63
63
|
fi
|
|
64
64
|
|
|
65
|
-
cp -R "$HEADERS_PATH
|
|
65
|
+
cp -R "$HEADERS_PATH/." Headers
|
|
66
66
|
mkdir -p framework/packages/react-native
|
|
67
67
|
cp -R "$XCFRAMEWORK_PATH/../." framework/packages/react-native/
|
|
68
68
|
find "$XCFRAMEWORK_PATH/.." -type f -exec rm {} +
|
package/types/index.d.ts
CHANGED
|
@@ -104,6 +104,7 @@ export * from '../Libraries/Components/View/ViewAccessibility';
|
|
|
104
104
|
export * from '../Libraries/Components/View/ViewPropTypes';
|
|
105
105
|
export * from '../Libraries/Components/Button';
|
|
106
106
|
export * from '../Libraries/Core/registerCallableModule';
|
|
107
|
+
export * as NativeComponentRegistry from '../Libraries/NativeComponent/NativeComponentRegistry';
|
|
107
108
|
export * from '../Libraries/EventEmitter/NativeEventEmitter';
|
|
108
109
|
export * from '../Libraries/EventEmitter/RCTDeviceEventEmitter';
|
|
109
110
|
export * from '../Libraries/EventEmitter/RCTNativeAppEventEmitter';
|
|
@@ -1,214 +0,0 @@
|
|
|
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
|
-
#include <folly/executors/QueuedImmediateExecutor.h>
|
|
9
|
-
|
|
10
|
-
#include "JsiIntegrationTest.h"
|
|
11
|
-
#include "engines/JsiIntegrationTestHermesEngineAdapter.h"
|
|
12
|
-
|
|
13
|
-
using namespace ::testing;
|
|
14
|
-
|
|
15
|
-
namespace facebook::react::jsinspector_modern {
|
|
16
|
-
|
|
17
|
-
class RuntimeTargetDebuggerSessionObserverTest
|
|
18
|
-
: public JsiIntegrationPortableTestBase<
|
|
19
|
-
JsiIntegrationTestHermesEngineAdapter,
|
|
20
|
-
folly::QueuedImmediateExecutor> {
|
|
21
|
-
public:
|
|
22
|
-
void enableRuntimeDomain() {
|
|
23
|
-
InSequence s;
|
|
24
|
-
|
|
25
|
-
auto executionContextInfo = expectMessageFromPage(JsonParsed(
|
|
26
|
-
AllOf(AtJsonPtr("/method", "Runtime.executionContextCreated"))));
|
|
27
|
-
expectMessageFromPage(JsonEq(R"({
|
|
28
|
-
"id": 1,
|
|
29
|
-
"result": {}
|
|
30
|
-
})"));
|
|
31
|
-
toPage_->sendMessage(R"({
|
|
32
|
-
"id": 1,
|
|
33
|
-
"method": "Runtime.enable"
|
|
34
|
-
})");
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
void enableLogDomain() {
|
|
38
|
-
InSequence s;
|
|
39
|
-
|
|
40
|
-
EXPECT_CALL(
|
|
41
|
-
fromPage(),
|
|
42
|
-
onMessage(JsonParsed(AllOf(
|
|
43
|
-
AtJsonPtr("/method", "Log.entryAdded"),
|
|
44
|
-
AtJsonPtr("/params/entry", Not(IsEmpty()))))))
|
|
45
|
-
.Times(AtLeast(1));
|
|
46
|
-
expectMessageFromPage(JsonEq(R"({
|
|
47
|
-
"id": 1,
|
|
48
|
-
"result": {}
|
|
49
|
-
})"));
|
|
50
|
-
toPage_->sendMessage(R"({
|
|
51
|
-
"id": 1,
|
|
52
|
-
"method": "Log.enable"
|
|
53
|
-
})");
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
void disableRuntimeDomain() {
|
|
57
|
-
InSequence s;
|
|
58
|
-
expectMessageFromPage(JsonEq(R"({
|
|
59
|
-
"id": 1,
|
|
60
|
-
"result": {}
|
|
61
|
-
})"));
|
|
62
|
-
toPage_->sendMessage(R"({
|
|
63
|
-
"id": 1,
|
|
64
|
-
"method": "Runtime.disable"
|
|
65
|
-
})");
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
void disableLogDomain() {
|
|
69
|
-
InSequence s;
|
|
70
|
-
expectMessageFromPage(JsonEq(R"({
|
|
71
|
-
"id": 1,
|
|
72
|
-
"result": {}
|
|
73
|
-
})"));
|
|
74
|
-
toPage_->sendMessage(R"({
|
|
75
|
-
"id": 1,
|
|
76
|
-
"method": "Log.disable"
|
|
77
|
-
})");
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
TEST_F(
|
|
82
|
-
RuntimeTargetDebuggerSessionObserverTest,
|
|
83
|
-
InstallsGlobalObserverObjectByDefault) {
|
|
84
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
85
|
-
EXPECT_THAT(
|
|
86
|
-
eval("JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__ != null)")
|
|
87
|
-
.asString(runtime)
|
|
88
|
-
.utf8(runtime),
|
|
89
|
-
JsonEq(R"(true)"));
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
TEST_F(
|
|
93
|
-
RuntimeTargetDebuggerSessionObserverTest,
|
|
94
|
-
WillNotEmitStatusUpdateUnlessBothRuntimeAndLogDomainsAreEnabled) {
|
|
95
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
96
|
-
EXPECT_THAT(
|
|
97
|
-
eval(
|
|
98
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
99
|
-
.asString(runtime)
|
|
100
|
-
.utf8(runtime),
|
|
101
|
-
JsonEq(R"(false)"));
|
|
102
|
-
|
|
103
|
-
connect();
|
|
104
|
-
|
|
105
|
-
EXPECT_THAT(
|
|
106
|
-
eval(
|
|
107
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
108
|
-
.asString(runtime)
|
|
109
|
-
.utf8(runtime),
|
|
110
|
-
JsonEq(R"(false)"));
|
|
111
|
-
|
|
112
|
-
enableRuntimeDomain();
|
|
113
|
-
|
|
114
|
-
EXPECT_THAT(
|
|
115
|
-
eval(
|
|
116
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
117
|
-
.asString(runtime)
|
|
118
|
-
.utf8(runtime),
|
|
119
|
-
JsonEq(R"(false)"));
|
|
120
|
-
|
|
121
|
-
enableLogDomain();
|
|
122
|
-
|
|
123
|
-
EXPECT_THAT(
|
|
124
|
-
eval(
|
|
125
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
126
|
-
.asString(runtime)
|
|
127
|
-
.utf8(runtime),
|
|
128
|
-
JsonEq(R"(true)"));
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
TEST_F(
|
|
132
|
-
RuntimeTargetDebuggerSessionObserverTest,
|
|
133
|
-
UpdatesTheStatusOnceOneRuntimeDomainIsDisabled) {
|
|
134
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
135
|
-
connect();
|
|
136
|
-
enableLogDomain();
|
|
137
|
-
enableRuntimeDomain();
|
|
138
|
-
|
|
139
|
-
EXPECT_THAT(
|
|
140
|
-
eval(
|
|
141
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
142
|
-
.asString(runtime)
|
|
143
|
-
.utf8(runtime),
|
|
144
|
-
JsonEq(R"(true)"));
|
|
145
|
-
|
|
146
|
-
disableRuntimeDomain();
|
|
147
|
-
|
|
148
|
-
EXPECT_THAT(
|
|
149
|
-
eval(
|
|
150
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
151
|
-
.asString(runtime)
|
|
152
|
-
.utf8(runtime),
|
|
153
|
-
JsonEq(R"(false)"));
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
TEST_F(
|
|
157
|
-
RuntimeTargetDebuggerSessionObserverTest,
|
|
158
|
-
UpdatesTheStatusOnceOneLogDomainIsDisabled) {
|
|
159
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
160
|
-
connect();
|
|
161
|
-
enableLogDomain();
|
|
162
|
-
enableRuntimeDomain();
|
|
163
|
-
|
|
164
|
-
EXPECT_THAT(
|
|
165
|
-
eval(
|
|
166
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
167
|
-
.asString(runtime)
|
|
168
|
-
.utf8(runtime),
|
|
169
|
-
JsonEq(R"(true)"));
|
|
170
|
-
|
|
171
|
-
disableLogDomain();
|
|
172
|
-
|
|
173
|
-
EXPECT_THAT(
|
|
174
|
-
eval(
|
|
175
|
-
"JSON.stringify(globalThis.__DEBUGGER_SESSION_OBSERVER__.hasActiveSession)")
|
|
176
|
-
.asString(runtime)
|
|
177
|
-
.utf8(runtime),
|
|
178
|
-
JsonEq(R"(false)"));
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
TEST_F(
|
|
182
|
-
RuntimeTargetDebuggerSessionObserverTest,
|
|
183
|
-
NotifiesSubscribersWhichWereSubscribedBeforeSessionInitialization) {
|
|
184
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
185
|
-
|
|
186
|
-
eval(
|
|
187
|
-
"globalThis.__DEBUGGER_SESSION_OBSERVER__.subscribers.add(updatedStatus => (globalThis.__LOREM_IPSUM__ = updatedStatus))");
|
|
188
|
-
|
|
189
|
-
EXPECT_THAT(
|
|
190
|
-
eval("JSON.stringify(globalThis.__LOREM_IPSUM__ === undefined)")
|
|
191
|
-
.asString(runtime)
|
|
192
|
-
.utf8(runtime),
|
|
193
|
-
JsonEq(R"(true)"));
|
|
194
|
-
|
|
195
|
-
connect();
|
|
196
|
-
enableLogDomain();
|
|
197
|
-
enableRuntimeDomain();
|
|
198
|
-
|
|
199
|
-
EXPECT_THAT(
|
|
200
|
-
eval("JSON.stringify(globalThis.__LOREM_IPSUM__)")
|
|
201
|
-
.asString(runtime)
|
|
202
|
-
.utf8(runtime),
|
|
203
|
-
JsonEq(R"(true)"));
|
|
204
|
-
|
|
205
|
-
disableLogDomain();
|
|
206
|
-
|
|
207
|
-
EXPECT_THAT(
|
|
208
|
-
eval("JSON.stringify(globalThis.__LOREM_IPSUM__)")
|
|
209
|
-
.asString(runtime)
|
|
210
|
-
.utf8(runtime),
|
|
211
|
-
JsonEq(R"(false)"));
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
} // namespace facebook::react::jsinspector_modern
|