react-native 0.82.0-nightly-20250902-9731e8ebc → 0.82.0-rc.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.
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/Timers/JSTimers.js +1 -0
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +1 -0
- package/Libraries/Lists/FlatList.js +8 -8
- package/Libraries/Lists/ViewabilityHelper.js +1 -1
- package/Libraries/Lists/VirtualizedList.js +0 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTAlertController.mm +6 -1
- package/ReactAndroid/build.gradle.kts +7 -0
- package/ReactAndroid/gradle.properties +3 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +28 -7
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/jni/CMakeLists.txt +2 -0
- package/ReactAndroid/src/main/jni/react/hermes/reactexecutor/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/hermes/jni/CMakeLists.txt +4 -0
- package/ReactAndroid/src/main/jni/react/runtime/jni/CMakeLists.txt +4 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/hermes/executor/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +8 -5
- package/ReactCommon/hermes/inspector-modern/CMakeLists.txt +4 -0
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.h +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +2 -2
- package/ReactCommon/hermes/inspector-modern/chrome/Registration.h +2 -2
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +2 -0
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +60 -2
- package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +0 -56
- package/ReactCommon/react/renderer/components/view/conversions.h +1 -1
- package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +40 -3
- package/ReactCommon/react/runtime/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/CMakeLists.txt +4 -0
- package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +7 -3
- package/index.js.flow +0 -1
- package/package.json +8 -8
- package/scripts/cocoapods/autolinking.rb +6 -0
- package/scripts/cocoapods/codegen_utils.rb +1 -1
- package/scripts/cocoapods/jsengine.rb +2 -1
- package/scripts/cocoapods/utils.rb +8 -2
- package/scripts/codegen/generate-artifacts-executor/index.js +5 -1
- package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
- package/sdks/.hermesversion +1 -0
- package/sdks/hermes-engine/hermes-engine.podspec +30 -12
- package/sdks/hermes-engine/hermes-utils.rb +41 -10
- package/sdks/hermes-engine/utils/build-apple-framework.sh +7 -1
- package/sdks/hermes-engine/utils/build-hermes-xcode.sh +8 -1
- package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +1 -1
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/settings.gradle.kts +9 -0
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +2 -2
- package/types_generated/index.d.ts +2 -2
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 82;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = '
|
|
32
|
+
static prerelease: string | null = 'rc.1';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -13,8 +13,8 @@ import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
|
13
13
|
import type {
|
|
14
14
|
ListRenderItem,
|
|
15
15
|
ListRenderItemInfo,
|
|
16
|
-
ListViewToken,
|
|
17
16
|
ViewabilityConfigCallbackPair,
|
|
17
|
+
ViewToken,
|
|
18
18
|
VirtualizedListProps,
|
|
19
19
|
} from '@react-native/virtualized-lists';
|
|
20
20
|
|
|
@@ -573,7 +573,7 @@ class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
|
573
573
|
return keyExtractor(items, index);
|
|
574
574
|
};
|
|
575
575
|
|
|
576
|
-
_pushMultiColumnViewable(arr: Array<
|
|
576
|
+
_pushMultiColumnViewable(arr: Array<ViewToken>, v: ViewToken): void {
|
|
577
577
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
578
578
|
const keyExtractor = this.props.keyExtractor ?? defaultKeyExtractor;
|
|
579
579
|
v.item.forEach((item, ii) => {
|
|
@@ -585,22 +585,22 @@ class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
|
585
585
|
|
|
586
586
|
_createOnViewableItemsChanged(
|
|
587
587
|
onViewableItemsChanged: ?(info: {
|
|
588
|
-
viewableItems: Array<
|
|
589
|
-
changed: Array<
|
|
588
|
+
viewableItems: Array<ViewToken>,
|
|
589
|
+
changed: Array<ViewToken>,
|
|
590
590
|
...
|
|
591
591
|
}) => void,
|
|
592
592
|
// $FlowFixMe[missing-local-annot]
|
|
593
593
|
) {
|
|
594
594
|
return (info: {
|
|
595
|
-
viewableItems: Array<
|
|
596
|
-
changed: Array<
|
|
595
|
+
viewableItems: Array<ViewToken>,
|
|
596
|
+
changed: Array<ViewToken>,
|
|
597
597
|
...
|
|
598
598
|
}) => {
|
|
599
599
|
const numColumns = numColumnsOrDefault(this.props.numColumns);
|
|
600
600
|
if (onViewableItemsChanged) {
|
|
601
601
|
if (numColumns > 1) {
|
|
602
|
-
const changed: Array<
|
|
603
|
-
const viewableItems: Array<
|
|
602
|
+
const changed: Array<ViewToken> = [];
|
|
603
|
+
const viewableItems: Array<ViewToken> = [];
|
|
604
604
|
info.viewableItems.forEach(v =>
|
|
605
605
|
this._pushMultiColumnViewable(viewableItems, v),
|
|
606
606
|
);
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -20,7 +20,12 @@
|
|
|
20
20
|
- (UIWindow *)alertWindow
|
|
21
21
|
{
|
|
22
22
|
if (_alertWindow == nil) {
|
|
23
|
-
|
|
23
|
+
UIWindowScene *scene = RCTKeyWindow().windowScene;
|
|
24
|
+
if (scene != nil) {
|
|
25
|
+
_alertWindow = [[UIWindow alloc] initWithWindowScene:scene];
|
|
26
|
+
} else {
|
|
27
|
+
_alertWindow = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
|
28
|
+
}
|
|
24
29
|
|
|
25
30
|
if (_alertWindow) {
|
|
26
31
|
_alertWindow.rootViewController = [UIViewController new];
|
|
@@ -39,6 +39,9 @@ val downloadsDir =
|
|
|
39
39
|
val thirdPartyNdkDir = File("$buildDir/third-party-ndk")
|
|
40
40
|
val reactNativeRootDir = projectDir.parent
|
|
41
41
|
|
|
42
|
+
val hermesV1Enabled =
|
|
43
|
+
rootProject.extensions.getByType(PrivateReactExtension::class.java).hermesV1Enabled.get()
|
|
44
|
+
|
|
42
45
|
// We put the publishing version from gradle.properties inside ext. so other
|
|
43
46
|
// subprojects can access it as well.
|
|
44
47
|
extra["publishing_version"] = project.findProperty("VERSION_NAME")?.toString()!!
|
|
@@ -565,6 +568,10 @@ android {
|
|
|
565
568
|
"-DCMAKE_POLICY_DEFAULT_CMP0069=NEW",
|
|
566
569
|
)
|
|
567
570
|
|
|
571
|
+
if (hermesV1Enabled) {
|
|
572
|
+
arguments("-DHERMES_V1_ENABLED=1")
|
|
573
|
+
}
|
|
574
|
+
|
|
568
575
|
targets(
|
|
569
576
|
"reactnative",
|
|
570
577
|
"jsi",
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
import com.facebook.react.internal.PrivateReactExtension
|
|
8
9
|
import com.facebook.react.tasks.internal.*
|
|
9
10
|
import de.undercouch.gradle.tasks.download.Download
|
|
10
11
|
import org.apache.tools.ant.taskdefs.condition.Os
|
|
@@ -50,6 +51,8 @@ fun getSDKManagerPath(): String {
|
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
|
|
54
|
+
val hermesV1Enabled =
|
|
55
|
+
rootProject.extensions.getByType(PrivateReactExtension::class.java).hermesV1Enabled.get()
|
|
53
56
|
val reactNativeRootDir = project(":packages:react-native:ReactAndroid").projectDir.parent
|
|
54
57
|
val customDownloadDir = System.getenv("REACT_NATIVE_DOWNLOADS_DIR")
|
|
55
58
|
val downloadsDir =
|
|
@@ -79,12 +82,21 @@ val hermesBuildOutputFileTree =
|
|
|
79
82
|
fileTree(hermesBuildDir.toString())
|
|
80
83
|
.include("**/*.cmake", "**/*.marks", "**/compiler_depends.ts", "**/Makefile", "**/link.txt")
|
|
81
84
|
|
|
82
|
-
|
|
83
|
-
|
|
85
|
+
val hermesVersionProvider: Provider<String> =
|
|
86
|
+
providers.provider {
|
|
87
|
+
var hermesVersion = if (hermesV1Enabled) "250829098.0.0-stable" else "main"
|
|
88
|
+
val hermesVersionFile =
|
|
89
|
+
File(
|
|
90
|
+
reactNativeRootDir,
|
|
91
|
+
if (hermesV1Enabled) "sdks/.hermesv1version" else "sdks/.hermesversion",
|
|
92
|
+
)
|
|
84
93
|
|
|
85
|
-
if (hermesVersionFile.exists()) {
|
|
86
|
-
|
|
87
|
-
}
|
|
94
|
+
if (hermesVersionFile.exists()) {
|
|
95
|
+
hermesVersion = hermesVersionFile.readText()
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
hermesVersion
|
|
99
|
+
}
|
|
88
100
|
|
|
89
101
|
val ndkBuildJobs = Runtime.getRuntime().availableProcessors().toString()
|
|
90
102
|
val prefabHeadersDir = File("$buildDir/prefab-headers")
|
|
@@ -95,7 +107,11 @@ val jsiDir = File(reactNativeRootDir, "ReactCommon/jsi")
|
|
|
95
107
|
val downloadHermesDest = File(downloadsDir, "hermes.tar.gz")
|
|
96
108
|
val downloadHermes by
|
|
97
109
|
tasks.registering(Download::class) {
|
|
98
|
-
src(
|
|
110
|
+
src(
|
|
111
|
+
providers.provider {
|
|
112
|
+
"https://github.com/facebook/hermes/tarball/${hermesVersionProvider.get()}"
|
|
113
|
+
}
|
|
114
|
+
)
|
|
99
115
|
onlyIfModified(true)
|
|
100
116
|
overwrite(true)
|
|
101
117
|
quiet(true)
|
|
@@ -151,6 +167,7 @@ val configureBuildForHermes by
|
|
|
151
167
|
"-B",
|
|
152
168
|
hermesBuildDir.toString(),
|
|
153
169
|
"-DJSI_DIR=" + jsiDir.absolutePath,
|
|
170
|
+
"-DCMAKE_BUILD_TYPE=Release",
|
|
154
171
|
)
|
|
155
172
|
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
|
156
173
|
cmakeCommandLine = cmakeCommandLine + "-GNMake Makefiles"
|
|
@@ -295,7 +312,11 @@ android {
|
|
|
295
312
|
// Therefore we're passing as build type Release, to provide a faster build.
|
|
296
313
|
// This has the (unlucky) side effect of letting AGP call the build
|
|
297
314
|
// tasks `configureCMakeRelease` while is actually building the debug flavor.
|
|
298
|
-
arguments(
|
|
315
|
+
arguments(
|
|
316
|
+
"-DCMAKE_BUILD_TYPE=Release",
|
|
317
|
+
// For debug builds, explicitly enable the Hermes Debugger.
|
|
318
|
+
"-DHERMES_ENABLE_DEBUGGER=True",
|
|
319
|
+
)
|
|
299
320
|
}
|
|
300
321
|
}
|
|
301
322
|
}
|
|
@@ -22,6 +22,8 @@ file(TO_CMAKE_PATH "${REACT_ANDROID_DIR}" REACT_ANDROID_DIR)
|
|
|
22
22
|
file(TO_CMAKE_PATH "${REACT_BUILD_DIR}" REACT_BUILD_DIR)
|
|
23
23
|
file(TO_CMAKE_PATH "${REACT_COMMON_DIR}" REACT_COMMON_DIR)
|
|
24
24
|
|
|
25
|
+
set(HERMES_V1_ENABLED OFF CACHE BOOL "Build with support for Hermes v1")
|
|
26
|
+
|
|
25
27
|
# If you have ccache installed, we're going to honor it.
|
|
26
28
|
find_program(CCACHE_FOUND ccache)
|
|
27
29
|
if(CCACHE_FOUND)
|
|
@@ -27,4 +27,8 @@ target_link_libraries(
|
|
|
27
27
|
target_compile_reactnative_options(hermes_executor PRIVATE)
|
|
28
28
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
29
29
|
target_compile_options(hermes_executor PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
30
|
+
|
|
31
|
+
if (DEFINED HERMES_V1_ENABLED)
|
|
32
|
+
target_compile_options(hermes_executor PRIVATE -DHERMES_V1_ENABLED=1)
|
|
33
|
+
endif()
|
|
30
34
|
endif()
|
|
@@ -29,4 +29,8 @@ target_link_libraries(hermesinstancejni
|
|
|
29
29
|
target_compile_reactnative_options(hermesinstancejni PRIVATE)
|
|
30
30
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
31
31
|
target_compile_options(hermesinstancejni PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
32
|
+
|
|
33
|
+
if (DEFINED HERMES_V1_ENABLED)
|
|
34
|
+
target_compile_options(hermesinstancejni PRIVATE -DHERMES_V1_ENABLED=1)
|
|
35
|
+
endif()
|
|
32
36
|
endif ()
|
|
@@ -19,6 +19,10 @@ add_library(rninstance
|
|
|
19
19
|
target_compile_reactnative_options(rninstance PRIVATE)
|
|
20
20
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
21
21
|
target_compile_options(rninstance PRIVATE -DHERMES_ENABLE_DEBUGGER=1)
|
|
22
|
+
|
|
23
|
+
if (DEFINED HERMES_V1_ENABLED)
|
|
24
|
+
target_compile_options(rninstance PRIVATE -DHERMES_V1_ENABLED=1)
|
|
25
|
+
endif()
|
|
22
26
|
endif ()
|
|
23
27
|
|
|
24
28
|
target_merge_so(rninstance)
|
|
@@ -32,6 +32,10 @@ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
|
32
32
|
PRIVATE
|
|
33
33
|
-DHERMES_ENABLE_DEBUGGER=1
|
|
34
34
|
)
|
|
35
|
+
|
|
36
|
+
if (DEFINED HERMES_V1_ENABLED)
|
|
37
|
+
target_compile_options(hermes_executor_common PRIVATE -DHERMES_V1_ENABLED=1)
|
|
38
|
+
endif()
|
|
35
39
|
else()
|
|
36
40
|
target_compile_options(
|
|
37
41
|
hermes_executor_common
|
|
@@ -14,8 +14,11 @@
|
|
|
14
14
|
#include <jsinspector-modern/InspectorFlags.h>
|
|
15
15
|
|
|
16
16
|
#include <hermes/inspector-modern/chrome/HermesRuntimeTargetDelegate.h>
|
|
17
|
+
|
|
18
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
17
19
|
#include <hermes/inspector-modern/chrome/Registration.h>
|
|
18
20
|
#include <hermes/inspector/RuntimeAdapter.h>
|
|
21
|
+
#endif
|
|
19
22
|
|
|
20
23
|
using namespace facebook::hermes;
|
|
21
24
|
using namespace facebook::jsi;
|
|
@@ -24,7 +27,7 @@ namespace facebook::react {
|
|
|
24
27
|
|
|
25
28
|
namespace {
|
|
26
29
|
|
|
27
|
-
#
|
|
30
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
28
31
|
|
|
29
32
|
class HermesExecutorRuntimeAdapter
|
|
30
33
|
: public facebook::hermes::inspector_modern::RuntimeAdapter {
|
|
@@ -59,7 +62,7 @@ class HermesExecutorRuntimeAdapter
|
|
|
59
62
|
std::shared_ptr<MessageQueueThread> thread_;
|
|
60
63
|
};
|
|
61
64
|
|
|
62
|
-
#endif // HERMES_ENABLE_DEBUGGER
|
|
65
|
+
#endif // defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
63
66
|
|
|
64
67
|
struct ReentrancyCheck {
|
|
65
68
|
// This is effectively a very subtle and complex assert, so only
|
|
@@ -144,7 +147,7 @@ class DecoratedRuntime : public jsi::WithRuntimeDecorator<ReentrancyCheck> {
|
|
|
144
147
|
const std::string& debuggerName)
|
|
145
148
|
: jsi::WithRuntimeDecorator<ReentrancyCheck>(*runtime, reentrancyCheck_),
|
|
146
149
|
runtime_(std::move(runtime)) {
|
|
147
|
-
#
|
|
150
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
148
151
|
enableDebugger_ = enableDebugger;
|
|
149
152
|
if (enableDebugger_) {
|
|
150
153
|
std::shared_ptr<HermesRuntime> rt(runtime_, &hermesRuntime);
|
|
@@ -159,7 +162,7 @@ class DecoratedRuntime : public jsi::WithRuntimeDecorator<ReentrancyCheck> {
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
~DecoratedRuntime() {
|
|
162
|
-
#
|
|
165
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
163
166
|
if (enableDebugger_) {
|
|
164
167
|
facebook::hermes::inspector_modern::chrome::disableDebugging(debugToken_);
|
|
165
168
|
}
|
|
@@ -176,7 +179,7 @@ class DecoratedRuntime : public jsi::WithRuntimeDecorator<ReentrancyCheck> {
|
|
|
176
179
|
|
|
177
180
|
std::shared_ptr<Runtime> runtime_;
|
|
178
181
|
ReentrancyCheck reentrancyCheck_;
|
|
179
|
-
#
|
|
182
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
180
183
|
bool enableDebugger_;
|
|
181
184
|
facebook::hermes::inspector_modern::chrome::DebugSessionToken debugToken_;
|
|
182
185
|
#endif // HERMES_ENABLE_DEBUGGER
|
|
@@ -23,6 +23,10 @@ if(${CMAKE_BUILD_TYPE} MATCHES Debug OR REACT_NATIVE_DEBUG_OPTIMIZED)
|
|
|
23
23
|
PRIVATE
|
|
24
24
|
-DHERMES_ENABLE_DEBUGGER=1
|
|
25
25
|
)
|
|
26
|
+
|
|
27
|
+
if (DEFINED HERMES_V1_ENABLED)
|
|
28
|
+
target_compile_options(hermes_inspector_modern PRIVATE -DHERMES_V1_ENABLED=1)
|
|
29
|
+
endif()
|
|
26
30
|
endif()
|
|
27
31
|
|
|
28
32
|
target_include_directories(hermes_inspector_modern PUBLIC ${REACT_COMMON_DIR})
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "ConnectionDemux.h"
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
11
11
|
|
|
12
12
|
#include <hermes/inspector/RuntimeAdapter.h>
|
|
13
13
|
#include <hermes/inspector/chrome/CDPHandler.h>
|
|
@@ -139,4 +139,4 @@ void ConnectionDemux::removePage(int pageId) {
|
|
|
139
139
|
|
|
140
140
|
} // namespace facebook::hermes::inspector_modern::chrome
|
|
141
141
|
|
|
142
|
-
#endif // HERMES_ENABLE_DEBUGGER
|
|
142
|
+
#endif // defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
11
11
|
|
|
12
12
|
#include <memory>
|
|
13
13
|
#include <mutex>
|
|
@@ -59,4 +59,4 @@ class ConnectionDemux {
|
|
|
59
59
|
|
|
60
60
|
} // namespace facebook::hermes::inspector_modern::chrome
|
|
61
61
|
|
|
62
|
-
#endif // HERMES_ENABLE_DEBUGGER
|
|
62
|
+
#endif // defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
#include "Registration.h"
|
|
9
9
|
#include "ConnectionDemux.h"
|
|
10
10
|
|
|
11
|
-
#
|
|
11
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
12
12
|
|
|
13
13
|
namespace facebook::hermes::inspector_modern::chrome {
|
|
14
14
|
|
|
@@ -34,4 +34,4 @@ void disableDebugging(DebugSessionToken session) {
|
|
|
34
34
|
|
|
35
35
|
} // namespace facebook::hermes::inspector_modern::chrome
|
|
36
36
|
|
|
37
|
-
#endif // HERMES_ENABLE_DEBUGGER
|
|
37
|
+
#endif // defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
-
#
|
|
10
|
+
#if defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
11
11
|
|
|
12
12
|
#include <memory>
|
|
13
13
|
#include <string>
|
|
@@ -38,4 +38,4 @@ extern void disableDebugging(DebugSessionToken session);
|
|
|
38
38
|
|
|
39
39
|
} // namespace facebook::hermes::inspector_modern::chrome
|
|
40
40
|
|
|
41
|
-
#endif // HERMES_ENABLE_DEBUGGER
|
|
41
|
+
#endif // defined(HERMES_ENABLE_DEBUGGER) && !defined(HERMES_V1_ENABLED)
|
|
@@ -54,6 +54,8 @@ Pod::Spec.new do |s|
|
|
|
54
54
|
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
|
|
55
55
|
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
|
|
56
56
|
s.dependency "React-perflogger", version
|
|
57
|
+
add_dependency(s, "React-oscompat")
|
|
58
|
+
|
|
57
59
|
if use_hermes()
|
|
58
60
|
s.dependency "hermes-engine"
|
|
59
61
|
end
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
#include <string>
|
|
13
13
|
#include <vector>
|
|
14
14
|
|
|
15
|
+
#include <react/renderer/debug/DebugStringConvertible.h>
|
|
16
|
+
|
|
15
17
|
namespace facebook::react {
|
|
16
18
|
|
|
17
19
|
enum class AccessibilityTraits : uint32_t {
|
|
@@ -53,6 +55,27 @@ struct AccessibilityAction {
|
|
|
53
55
|
std::optional<std::string> label{};
|
|
54
56
|
};
|
|
55
57
|
|
|
58
|
+
inline std::string toString(const AccessibilityAction& accessibilityAction) {
|
|
59
|
+
std::string result = accessibilityAction.name;
|
|
60
|
+
if (accessibilityAction.label.has_value()) {
|
|
61
|
+
result += ": '" + accessibilityAction.label.value() + "'";
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
inline std::string toString(
|
|
67
|
+
std::vector<AccessibilityAction> accessibilityActions) {
|
|
68
|
+
std::string result = "[";
|
|
69
|
+
for (size_t i = 0; i < accessibilityActions.size(); i++) {
|
|
70
|
+
result += toString(accessibilityActions[i]);
|
|
71
|
+
if (i < accessibilityActions.size() - 1) {
|
|
72
|
+
result += ", ";
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
result += "]";
|
|
76
|
+
return result;
|
|
77
|
+
}
|
|
78
|
+
|
|
56
79
|
inline static bool operator==(
|
|
57
80
|
const AccessibilityAction& lhs,
|
|
58
81
|
const AccessibilityAction& rhs) {
|
|
@@ -87,6 +110,29 @@ constexpr bool operator!=(
|
|
|
87
110
|
return !(rhs == lhs);
|
|
88
111
|
}
|
|
89
112
|
|
|
113
|
+
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
114
|
+
inline std::string toString(AccessibilityState::CheckedState state) {
|
|
115
|
+
switch (state) {
|
|
116
|
+
case AccessibilityState::Unchecked:
|
|
117
|
+
return "Unchecked";
|
|
118
|
+
case AccessibilityState::Checked:
|
|
119
|
+
return "Checked";
|
|
120
|
+
case AccessibilityState::Mixed:
|
|
121
|
+
return "Mixed";
|
|
122
|
+
case AccessibilityState::None:
|
|
123
|
+
return "None";
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
inline std::string toString(const AccessibilityState& accessibilityState) {
|
|
128
|
+
return "{disabled:" + toString(accessibilityState.disabled) +
|
|
129
|
+
",selected:" + toString(accessibilityState.selected) +
|
|
130
|
+
",checked:" + toString(accessibilityState.checked) +
|
|
131
|
+
",busy:" + toString(accessibilityState.busy) +
|
|
132
|
+
",expanded:" + toString(accessibilityState.expanded) + "}";
|
|
133
|
+
}
|
|
134
|
+
#endif
|
|
135
|
+
|
|
90
136
|
struct AccessibilityLabelledBy {
|
|
91
137
|
std::vector<std::string> value{};
|
|
92
138
|
};
|
|
@@ -136,7 +182,19 @@ enum class AccessibilityLiveRegion : uint8_t {
|
|
|
136
182
|
Assertive,
|
|
137
183
|
};
|
|
138
184
|
|
|
139
|
-
|
|
185
|
+
inline std::string toString(
|
|
186
|
+
const AccessibilityLiveRegion& accessibilityLiveRegion) {
|
|
187
|
+
switch (accessibilityLiveRegion) {
|
|
188
|
+
case AccessibilityLiveRegion::None:
|
|
189
|
+
return "none";
|
|
190
|
+
case AccessibilityLiveRegion::Polite:
|
|
191
|
+
return "polite";
|
|
192
|
+
case AccessibilityLiveRegion::Assertive:
|
|
193
|
+
return "assertive";
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
enum class AccessibilityRole {
|
|
140
198
|
None,
|
|
141
199
|
Button,
|
|
142
200
|
Dropdownlist,
|
|
@@ -179,7 +237,7 @@ enum class AccessibilityRole : uint8_t {
|
|
|
179
237
|
Iconmenu,
|
|
180
238
|
};
|
|
181
239
|
|
|
182
|
-
enum class Role
|
|
240
|
+
enum class Role {
|
|
183
241
|
Alert,
|
|
184
242
|
Alertdialog,
|
|
185
243
|
Application,
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
#include <react/renderer/components/view/AccessibilityPrimitives.h>
|
|
15
15
|
#include <react/renderer/core/PropsParserContext.h>
|
|
16
16
|
#include <react/renderer/core/propsConversions.h>
|
|
17
|
-
#include <react/renderer/debug/DebugStringConvertible.h>
|
|
18
17
|
|
|
19
18
|
#include <unordered_map>
|
|
20
19
|
|
|
@@ -783,59 +782,4 @@ inline void fromRawValue(
|
|
|
783
782
|
result = Role::None;
|
|
784
783
|
}
|
|
785
784
|
|
|
786
|
-
inline std::string toString(AccessibilityLiveRegion accessibilityLiveRegion) {
|
|
787
|
-
switch (accessibilityLiveRegion) {
|
|
788
|
-
case AccessibilityLiveRegion::None:
|
|
789
|
-
return "none";
|
|
790
|
-
case AccessibilityLiveRegion::Polite:
|
|
791
|
-
return "polite";
|
|
792
|
-
case AccessibilityLiveRegion::Assertive:
|
|
793
|
-
return "assertive";
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
|
|
797
|
-
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
798
|
-
inline std::string toString(AccessibilityState::CheckedState state) {
|
|
799
|
-
switch (state) {
|
|
800
|
-
case AccessibilityState::Unchecked:
|
|
801
|
-
return "Unchecked";
|
|
802
|
-
case AccessibilityState::Checked:
|
|
803
|
-
return "Checked";
|
|
804
|
-
case AccessibilityState::Mixed:
|
|
805
|
-
return "Mixed";
|
|
806
|
-
case AccessibilityState::None:
|
|
807
|
-
return "None";
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
|
|
811
|
-
inline std::string toString(const AccessibilityAction& accessibilityAction) {
|
|
812
|
-
std::string result = accessibilityAction.name;
|
|
813
|
-
if (accessibilityAction.label.has_value()) {
|
|
814
|
-
result += ": '" + accessibilityAction.label.value() + "'";
|
|
815
|
-
}
|
|
816
|
-
return result;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
inline std::string toString(
|
|
820
|
-
std::vector<AccessibilityAction> accessibilityActions) {
|
|
821
|
-
std::string result = "[";
|
|
822
|
-
for (size_t i = 0; i < accessibilityActions.size(); i++) {
|
|
823
|
-
result += toString(accessibilityActions[i]);
|
|
824
|
-
if (i < accessibilityActions.size() - 1) {
|
|
825
|
-
result += ", ";
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
result += "]";
|
|
829
|
-
return result;
|
|
830
|
-
}
|
|
831
|
-
|
|
832
|
-
inline std::string toString(const AccessibilityState& accessibilityState) {
|
|
833
|
-
return "{disabled:" + toString(accessibilityState.disabled) +
|
|
834
|
-
",selected:" + toString(accessibilityState.selected) +
|
|
835
|
-
",checked:" + toString(accessibilityState.checked) +
|
|
836
|
-
",busy:" + toString(accessibilityState.busy) +
|
|
837
|
-
",expanded:" + toString(accessibilityState.expanded) + "}";
|
|
838
|
-
}
|
|
839
|
-
#endif
|
|
840
|
-
|
|
841
785
|
} // namespace facebook::react
|
|
@@ -848,7 +848,7 @@ inline void fromRawValue(
|
|
|
848
848
|
react_native_expect(false);
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
-
inline std::string toString(PointerEventsMode value) {
|
|
851
|
+
inline std::string toString(const PointerEventsMode& value) {
|
|
852
852
|
switch (value) {
|
|
853
853
|
case PointerEventsMode::Auto:
|
|
854
854
|
return "auto";
|