react-native 0.74.0-nightly-20240129-39cb02f6f → 1000.0.0
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/Animated/NativeAnimatedHelper.js +1 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +1 -1
- package/Libraries/AppDelegate/RCTAppDelegate.mm +2 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.android.js +69 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.d.ts +24 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroid.js +33 -0
- package/Libraries/Components/PopupMenuAndroid/PopupMenuAndroidNativeComponent.js +13 -0
- package/Libraries/Core/ReactNativeVersion.js +2 -3
- package/Libraries/Core/registerCallableModule.js +42 -0
- package/Libraries/Image/RCTImageLoader.mm +4 -11
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/ReactNative/BridgelessUIManager.js +31 -13
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -33
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +12 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +24543 -21110
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4104 -3058
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4352 -3273
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +25038 -21457
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3721 -2600
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4024 -2869
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +43 -4
- package/Libraries/WebPerformance/Performance.js +1 -1
- package/React/Base/RCTBridge+Private.h +14 -0
- package/React/Base/RCTBridge.mm +6 -0
- package/React/Base/RCTKeyCommands.m +12 -1
- package/React/Base/RCTVersion.m +3 -3
- package/React/CoreModules/RCTAlertController.mm +2 -3
- package/React/CoreModules/RCTAppearance.mm +1 -1
- package/React/CoreModules/React-CoreModules.podspec +1 -0
- package/React/CxxBridge/RCTCxxBridge.mm +21 -3
- package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +22 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +13 -2
- package/React/Fabric/RCTConversions.h +2 -18
- package/React/React-RCTFabric.podspec +1 -0
- package/React-Core.podspec +1 -3
- package/ReactAndroid/api/ReactAndroid.api +53 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/AnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DecayAnimation.java +2 -0
- package/ReactAndroid/src/main/java/com/facebook/react/animated/DiffClampAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ModulusAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/ObjectAnimatedNode.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/SpringAnimation.java +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +1 -3
- package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +5 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/jscexecutor/JSCExecutor.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +3 -3
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +3 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +13 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +7 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +11 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +24 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ScaleTypeStartInside.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/PopupMenuSelectionEvent.kt +37 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuContainer.kt +49 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/popupmenu/ReactPopupMenuManager.kt +54 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactBaseTextShadowNode.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManagerMapBuffer.java +2 -2
- package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +9 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.cpp +7 -1
- package/ReactAndroid/src/main/jni/react/featureflags/ReactNativeFeatureFlagsProviderHolder.h +2 -1
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +16 -10
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.cpp +0 -3
- package/ReactAndroid/src/main/jni/react/jni/ProxyExecutor.h +0 -1
- package/ReactAndroid/src/main/jni/react/newarchdefaults/DefaultComponentsRegistry.cpp +7 -6
- package/ReactCommon/cxxreact/Instance.cpp +34 -18
- package/ReactCommon/cxxreact/Instance.h +13 -2
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/jsinspector-modern/InstanceAgent.cpp +34 -0
- package/ReactCommon/jsinspector-modern/InstanceAgent.h +54 -0
- package/ReactCommon/jsinspector-modern/InstanceTarget.cpp +25 -0
- package/ReactCommon/jsinspector-modern/InstanceTarget.h +58 -0
- package/ReactCommon/jsinspector-modern/PageAgent.cpp +65 -0
- package/ReactCommon/jsinspector-modern/PageAgent.h +13 -0
- package/ReactCommon/jsinspector-modern/PageTarget.cpp +41 -0
- package/ReactCommon/jsinspector-modern/PageTarget.h +28 -1
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +12 -1
- package/ReactCommon/jsinspector-modern/ReactCdp.h +1 -0
- package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +2 -0
- package/ReactCommon/jsinspector-modern/tests/PageTargetTest.cpp +164 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +18 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +3 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/featureflags/tests/ReactNativeFeatureFlagsTest.cpp +4 -0
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -0
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/renderer/attributedstring/primitives.h +0 -86
- package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +0 -16
- package/ReactCommon/react/renderer/components/view/CSSTokenizer.cpp +187 -0
- package/ReactCommon/react/renderer/components/view/CSSTokenizer.h +101 -0
- package/ReactCommon/react/renderer/components/view/tests/CSSTokenizerTest.cpp +144 -0
- package/ReactCommon/react/renderer/core/ComponentDescriptor.h +0 -1
- package/ReactCommon/react/renderer/core/LayoutPrimitives.h +0 -17
- package/ReactCommon/react/renderer/core/propsConversions.h +0 -1
- package/ReactCommon/react/renderer/graphics/Color.h +7 -3
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +6 -1
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +55 -15
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +132 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.h +4 -18
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +73 -0
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.h +8 -2
- package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/RCTPlatformColorUtils.mm +14 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +4 -19
- package/ReactCommon/react/runtime/ReactInstance.cpp +15 -2
- package/ReactCommon/react/runtime/ReactInstance.h +13 -2
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +5 -3
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.h +3 -1
- package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +10 -2
- package/ReactCommon/react/test_utils/ios/Shims/ShimRCTInstance.mm +5 -2
- package/ReactCommon/react/utils/hash_combine.h +8 -6
- package/gradle/libs.versions.toml +1 -1
- package/index.js +9 -0
- package/package.json +9 -9
- 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/src/private/featureflags/NativeReactNativeFeatureFlags.js +2 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +42 -1
- package/src/private/specs/components/PopupMenuAndroidNativeComponent.js +47 -0
- package/template/package.json +5 -5
- package/ReactAndroid/src/main/jni/react/jni/OnLoad.h +0 -16
|
@@ -0,0 +1,132 @@
|
|
|
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 "HostPlatformColor.h"
|
|
9
|
+
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <UIKit/UIKit.h>
|
|
12
|
+
#import <react/utils/ManagedObjectWrapper.h>
|
|
13
|
+
#import <string>
|
|
14
|
+
|
|
15
|
+
using namespace facebook::react;
|
|
16
|
+
|
|
17
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
18
|
+
|
|
19
|
+
namespace facebook::react {
|
|
20
|
+
|
|
21
|
+
namespace {
|
|
22
|
+
UIColor *_Nullable UIColorFromInt32(int32_t intColor)
|
|
23
|
+
{
|
|
24
|
+
CGFloat a = CGFloat((intColor >> 24) & 0xFF) / 255.0;
|
|
25
|
+
CGFloat r = CGFloat((intColor >> 16) & 0xFF) / 255.0;
|
|
26
|
+
CGFloat g = CGFloat((intColor >> 8) & 0xFF) / 255.0;
|
|
27
|
+
CGFloat b = CGFloat(intColor & 0xFF) / 255.0;
|
|
28
|
+
return [UIColor colorWithRed:r green:g blue:b alpha:a];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
UIColor *_Nullable UIColorFromDynamicColor(const facebook::react::DynamicColor &dynamicColor)
|
|
32
|
+
{
|
|
33
|
+
int32_t light = dynamicColor.lightColor;
|
|
34
|
+
int32_t dark = dynamicColor.darkColor;
|
|
35
|
+
int32_t highContrastLight = dynamicColor.highContrastLightColor;
|
|
36
|
+
int32_t highContrastDark = dynamicColor.highContrastDarkColor;
|
|
37
|
+
|
|
38
|
+
UIColor *lightColor = UIColorFromInt32(light);
|
|
39
|
+
UIColor *darkColor = UIColorFromInt32(dark);
|
|
40
|
+
UIColor *highContrastLightColor = UIColorFromInt32(highContrastLight);
|
|
41
|
+
UIColor *highContrastDarkColor = UIColorFromInt32(highContrastDark);
|
|
42
|
+
|
|
43
|
+
if (lightColor != nil && darkColor != nil) {
|
|
44
|
+
UIColor *color = [UIColor colorWithDynamicProvider:^UIColor *_Nonnull(UITraitCollection *_Nonnull collection) {
|
|
45
|
+
if (collection.userInterfaceStyle == UIUserInterfaceStyleDark) {
|
|
46
|
+
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastDarkColor != nil) {
|
|
47
|
+
return highContrastDarkColor;
|
|
48
|
+
} else {
|
|
49
|
+
return darkColor;
|
|
50
|
+
}
|
|
51
|
+
} else {
|
|
52
|
+
if (collection.accessibilityContrast == UIAccessibilityContrastHigh && highContrastLightColor != nil) {
|
|
53
|
+
return highContrastLightColor;
|
|
54
|
+
} else {
|
|
55
|
+
return lightColor;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}];
|
|
59
|
+
return color;
|
|
60
|
+
} else {
|
|
61
|
+
return nil;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return nil;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
int32_t ColorFromUIColor(UIColor *color)
|
|
68
|
+
{
|
|
69
|
+
float ratio = 255;
|
|
70
|
+
CGFloat rgba[4];
|
|
71
|
+
[color getRed:&rgba[0] green:&rgba[1] blue:&rgba[2] alpha:&rgba[3]];
|
|
72
|
+
return ((int32_t)round((float)rgba[3] * ratio) & 0xff) << 24 | ((int)round((float)rgba[0] * ratio) & 0xff) << 16 |
|
|
73
|
+
((int)round((float)rgba[1] * ratio) & 0xff) << 8 | ((int)round((float)rgba[2] * ratio) & 0xff);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
int32_t ColorFromUIColor(const std::shared_ptr<void> &uiColor)
|
|
77
|
+
{
|
|
78
|
+
UIColor *color = (UIColor *)unwrapManagedObject(uiColor);
|
|
79
|
+
if (color) {
|
|
80
|
+
UITraitCollection *currentTraitCollection = [UITraitCollection currentTraitCollection];
|
|
81
|
+
color = [color resolvedColorWithTraitCollection:currentTraitCollection];
|
|
82
|
+
return ColorFromUIColor(color);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
UIColor *_Nullable UIColorFromComponentsColor(const facebook::react::ColorComponents &components)
|
|
89
|
+
{
|
|
90
|
+
return [UIColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha];
|
|
91
|
+
}
|
|
92
|
+
} // anonymous namespace
|
|
93
|
+
|
|
94
|
+
Color::Color(int32_t color)
|
|
95
|
+
{
|
|
96
|
+
uiColor_ = wrapManagedObject(UIColorFromInt32(color));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
Color::Color(const DynamicColor &dynamicColor)
|
|
100
|
+
{
|
|
101
|
+
uiColor_ = wrapManagedObject(UIColorFromDynamicColor(dynamicColor));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
Color::Color(const ColorComponents &components)
|
|
105
|
+
{
|
|
106
|
+
uiColor_ = wrapManagedObject(UIColorFromComponentsColor(components));
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
Color::Color(std::shared_ptr<void> uiColor)
|
|
110
|
+
{
|
|
111
|
+
uiColor_ = std::move(uiColor);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
bool Color::operator==(const Color &other) const
|
|
115
|
+
{
|
|
116
|
+
return (!uiColor_ && !other.uiColor_) ||
|
|
117
|
+
(uiColor_ && other.uiColor_ &&
|
|
118
|
+
[unwrapManagedObject(getUIColor()) isEqual:unwrapManagedObject(other.getUIColor())]);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
bool Color::operator!=(const Color &other) const
|
|
122
|
+
{
|
|
123
|
+
return !(*this == other);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
int32_t Color::getColor() const
|
|
127
|
+
{
|
|
128
|
+
return ColorFromUIColor(uiColor_);
|
|
129
|
+
}
|
|
130
|
+
} // namespace facebook::react
|
|
131
|
+
|
|
132
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -10,29 +10,15 @@
|
|
|
10
10
|
#include <react/debug/react_native_expect.h>
|
|
11
11
|
#include <react/renderer/core/rawValue.h>
|
|
12
12
|
#include <react/renderer/graphics/Color.h>
|
|
13
|
-
#include <react/renderer/graphics/RCTPlatformColorUtils.h>
|
|
14
13
|
#include <react/renderer/graphics/fromRawValueShared.h>
|
|
15
14
|
#include <react/utils/ContextContainer.h>
|
|
16
|
-
#include <unordered_map>
|
|
17
15
|
|
|
18
16
|
namespace facebook::react {
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
const ContextContainer&
|
|
22
|
-
int32_t
|
|
23
|
-
const RawValue& value)
|
|
24
|
-
if (value.hasType<std::unordered_map<std::string, RawValue>>()) {
|
|
25
|
-
auto items = (std::unordered_map<std::string, RawValue>)value;
|
|
26
|
-
if (items.find("semantic") != items.end() &&
|
|
27
|
-
items.at("semantic").hasType<std::vector<std::string>>()) {
|
|
28
|
-
auto semanticItems = (std::vector<std::string>)items.at("semantic");
|
|
29
|
-
return {colorFromComponents(
|
|
30
|
-
RCTPlatformColorComponentsFromSemanticItems(semanticItems))};
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
return clearColor();
|
|
35
|
-
}
|
|
18
|
+
SharedColor parsePlatformColor(
|
|
19
|
+
const ContextContainer& contextContainer,
|
|
20
|
+
int32_t surfaceId,
|
|
21
|
+
const RawValue& value);
|
|
36
22
|
|
|
37
23
|
inline void fromRawValue(
|
|
38
24
|
const ContextContainer& contextContainer,
|
|
@@ -0,0 +1,73 @@
|
|
|
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 "PlatformColorParser.h"
|
|
9
|
+
|
|
10
|
+
#import <react/renderer/core/RawValue.h>
|
|
11
|
+
#import <react/renderer/graphics/HostPlatformColor.h>
|
|
12
|
+
#import <react/renderer/graphics/RCTPlatformColorUtils.h>
|
|
13
|
+
#import <react/utils/ManagedObjectWrapper.h>
|
|
14
|
+
#import <string>
|
|
15
|
+
#import <unordered_map>
|
|
16
|
+
|
|
17
|
+
using namespace facebook::react;
|
|
18
|
+
|
|
19
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
20
|
+
|
|
21
|
+
namespace facebook::react {
|
|
22
|
+
|
|
23
|
+
inline facebook::react::SharedColor RCTPlatformColorComponentsFromDynamicItems(
|
|
24
|
+
const facebook::react::ContextContainer &contextContainer,
|
|
25
|
+
int32_t surfaceId,
|
|
26
|
+
std::unordered_map<std::string, facebook::react::RawValue> &dynamicItems)
|
|
27
|
+
{
|
|
28
|
+
SharedColor lightSharedColor{};
|
|
29
|
+
SharedColor darkSharedColor{};
|
|
30
|
+
SharedColor highContrastLightSharedColor{};
|
|
31
|
+
SharedColor highContrastDarkSharedColor{};
|
|
32
|
+
if (dynamicItems.count("light")) {
|
|
33
|
+
fromRawValue(contextContainer, surfaceId, dynamicItems.at("light"), lightSharedColor);
|
|
34
|
+
}
|
|
35
|
+
if (dynamicItems.count("dark")) {
|
|
36
|
+
fromRawValue(contextContainer, surfaceId, dynamicItems.at("dark"), darkSharedColor);
|
|
37
|
+
}
|
|
38
|
+
if (dynamicItems.count("highContrastLight")) {
|
|
39
|
+
fromRawValue(contextContainer, surfaceId, dynamicItems.at("highContrastLight"), highContrastLightSharedColor);
|
|
40
|
+
}
|
|
41
|
+
if (dynamicItems.count("highContrastDark")) {
|
|
42
|
+
fromRawValue(contextContainer, surfaceId, dynamicItems.at("highContrastDark"), highContrastDarkSharedColor);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
Color color = Color(DynamicColor{
|
|
46
|
+
(*lightSharedColor).getColor(),
|
|
47
|
+
(*darkSharedColor).getColor(),
|
|
48
|
+
(*highContrastLightSharedColor).getColor(),
|
|
49
|
+
(*highContrastDarkSharedColor).getColor()});
|
|
50
|
+
return SharedColor(color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
SharedColor parsePlatformColor(const ContextContainer &contextContainer, int32_t surfaceId, const RawValue &value)
|
|
54
|
+
{
|
|
55
|
+
if (value.hasType<std::unordered_map<std::string, RawValue>>()) {
|
|
56
|
+
auto items = (std::unordered_map<std::string, RawValue>)value;
|
|
57
|
+
if (items.find("semantic") != items.end() && items.at("semantic").hasType<std::vector<std::string>>()) {
|
|
58
|
+
auto semanticItems = (std::vector<std::string>)items.at("semantic");
|
|
59
|
+
return {wrapManagedObject(RCTPlatformColorFromSemanticItems(semanticItems))};
|
|
60
|
+
} else if (
|
|
61
|
+
items.find("dynamic") != items.end() &&
|
|
62
|
+
items.at("dynamic").hasType<std::unordered_map<std::string, RawValue>>()) {
|
|
63
|
+
auto dynamicItems = (std::unordered_map<std::string, RawValue>)items.at("dynamic");
|
|
64
|
+
return RCTPlatformColorComponentsFromDynamicItems(contextContainer, surfaceId, dynamicItems);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return clearColor();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
} // namespace facebook::react
|
|
72
|
+
|
|
73
|
+
NS_ASSUME_NONNULL_END
|
|
@@ -5,8 +5,14 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#
|
|
9
|
-
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#import <UIKit/UIKit.h>
|
|
11
|
+
#import <react/renderer/graphics/HostPlatformColor.h>
|
|
12
|
+
#import <vector>
|
|
10
13
|
|
|
11
14
|
facebook::react::ColorComponents RCTPlatformColorComponentsFromSemanticItems(
|
|
12
15
|
std::vector<std::string>& semanticItems);
|
|
16
|
+
UIColor* RCTPlatformColorFromSemanticItems(
|
|
17
|
+
std::vector<std::string>& semanticItems);
|
|
18
|
+
UIColor* RCTPlatformColorFromColor(const facebook::react::Color& color);
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
#import <Foundation/Foundation.h>
|
|
11
11
|
#import <UIKit/UIKit.h>
|
|
12
|
+
#import <react/utils/ManagedObjectWrapper.h>
|
|
12
13
|
|
|
13
14
|
#include <string>
|
|
14
15
|
|
|
@@ -184,20 +185,30 @@ static inline facebook::react::ColorComponents _ColorComponentsFromUIColor(UICol
|
|
|
184
185
|
}
|
|
185
186
|
|
|
186
187
|
facebook::react::ColorComponents RCTPlatformColorComponentsFromSemanticItems(std::vector<std::string> &semanticItems)
|
|
188
|
+
{
|
|
189
|
+
return _ColorComponentsFromUIColor(RCTPlatformColorFromSemanticItems(semanticItems));
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
UIColor *RCTPlatformColorFromSemanticItems(std::vector<std::string> &semanticItems)
|
|
187
193
|
{
|
|
188
194
|
for (const auto &semanticCString : semanticItems) {
|
|
189
195
|
NSString *semanticNSString = _NSStringFromCString(semanticCString);
|
|
190
196
|
UIColor *uiColor = [UIColor colorNamed:semanticNSString];
|
|
191
197
|
if (uiColor != nil) {
|
|
192
|
-
return
|
|
198
|
+
return uiColor;
|
|
193
199
|
}
|
|
194
200
|
uiColor = _UIColorFromSemanticString(semanticNSString);
|
|
195
201
|
if (uiColor != nil) {
|
|
196
|
-
return
|
|
202
|
+
return uiColor;
|
|
197
203
|
}
|
|
198
204
|
}
|
|
199
205
|
|
|
200
|
-
return
|
|
206
|
+
return UIColor.clearColor;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
UIColor *RCTPlatformColorFromColor(const facebook::react::Color &color)
|
|
210
|
+
{
|
|
211
|
+
return (UIColor *)facebook::react::unwrapManagedObject(color.getUIColor());
|
|
201
212
|
}
|
|
202
213
|
|
|
203
214
|
NS_ASSUME_NONNULL_END
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
|
|
10
|
+
#include <react/renderer/graphics/RCTPlatformColorUtils.h>
|
|
10
11
|
#include <react/renderer/textlayoutmanager/RCTFontProperties.h>
|
|
11
12
|
#include <react/renderer/textlayoutmanager/RCTFontUtils.h>
|
|
12
13
|
|
|
@@ -94,24 +95,8 @@ inline static NSUnderlineStyle RCTNSUnderlineStyleFromTextDecorationStyle(
|
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
|
|
97
|
-
|
|
98
|
+
// TODO: this file has some duplicates method, we can remove it
|
|
99
|
+
inline static UIColor *_Nullable RCTUIColorFromSharedColor(const facebook::react::SharedColor &sharedColor)
|
|
98
100
|
{
|
|
99
|
-
|
|
100
|
-
return nil;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (*facebook::react::clearColor() == *sharedColor) {
|
|
104
|
-
return [UIColor clearColor];
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (*facebook::react::blackColor() == *sharedColor) {
|
|
108
|
-
return [UIColor blackColor];
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
if (*facebook::react::whiteColor() == *sharedColor) {
|
|
112
|
-
return [UIColor whiteColor];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
auto components = facebook::react::colorComponentsFromColor(sharedColor);
|
|
116
|
-
return [UIColor colorWithRed:components.red green:components.green blue:components.blue alpha:components.alpha];
|
|
101
|
+
return RCTPlatformColorFromColor(*sharedColor);
|
|
117
102
|
}
|
|
@@ -29,12 +29,17 @@ ReactInstance::ReactInstance(
|
|
|
29
29
|
std::unique_ptr<JSRuntime> runtime,
|
|
30
30
|
std::shared_ptr<MessageQueueThread> jsMessageQueueThread,
|
|
31
31
|
std::shared_ptr<TimerManager> timerManager,
|
|
32
|
-
JsErrorHandler::JsErrorHandlingFunc jsErrorHandlingFunc
|
|
32
|
+
JsErrorHandler::JsErrorHandlingFunc jsErrorHandlingFunc,
|
|
33
|
+
jsinspector_modern::PageTarget* parentInspectorTarget)
|
|
33
34
|
: runtime_(std::move(runtime)),
|
|
34
35
|
jsMessageQueueThread_(jsMessageQueueThread),
|
|
35
36
|
timerManager_(std::move(timerManager)),
|
|
36
37
|
jsErrorHandler_(jsErrorHandlingFunc),
|
|
37
|
-
hasFatalJsError_(std::make_shared<bool>(false))
|
|
38
|
+
hasFatalJsError_(std::make_shared<bool>(false)),
|
|
39
|
+
parentInspectorTarget_(parentInspectorTarget) {
|
|
40
|
+
if (parentInspectorTarget_) {
|
|
41
|
+
inspectorTarget_ = &parentInspectorTarget_->registerInstance(*this);
|
|
42
|
+
}
|
|
38
43
|
auto runtimeExecutor = [weakRuntime = std::weak_ptr<JSRuntime>(runtime_),
|
|
39
44
|
weakTimerManager =
|
|
40
45
|
std::weak_ptr<TimerManager>(timerManager_),
|
|
@@ -95,6 +100,14 @@ ReactInstance::ReactInstance(
|
|
|
95
100
|
std::make_shared<BufferedRuntimeExecutor>(pipedRuntimeExecutor);
|
|
96
101
|
}
|
|
97
102
|
|
|
103
|
+
void ReactInstance::unregisterFromInspector() {
|
|
104
|
+
if (inspectorTarget_) {
|
|
105
|
+
assert(parentInspectorTarget_);
|
|
106
|
+
parentInspectorTarget_->unregisterInstance(*inspectorTarget_);
|
|
107
|
+
inspectorTarget_ = nullptr;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
98
111
|
RuntimeExecutor ReactInstance::getUnbufferedRuntimeExecutor() noexcept {
|
|
99
112
|
return [runtimeScheduler = runtimeScheduler_.get()](
|
|
100
113
|
std::function<void(jsi::Runtime & runtime)>&& callback) {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
#include <cxxreact/MessageQueueThread.h>
|
|
12
12
|
#include <jserrorhandler/JsErrorHandler.h>
|
|
13
13
|
#include <jsi/jsi.h>
|
|
14
|
+
#include <jsinspector-modern/ReactCdp.h>
|
|
14
15
|
#include <jsireact/JSIExecutor.h>
|
|
15
16
|
#include <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
|
16
17
|
#include <react/runtime/BufferedRuntimeExecutor.h>
|
|
@@ -25,7 +26,7 @@ struct CallableModule {
|
|
|
25
26
|
jsi::Function factory;
|
|
26
27
|
};
|
|
27
28
|
|
|
28
|
-
class ReactInstance final {
|
|
29
|
+
class ReactInstance final : private jsinspector_modern::InstanceTargetDelegate {
|
|
29
30
|
public:
|
|
30
31
|
using BindingsInstallFunc = std::function<void(jsi::Runtime& runtime)>;
|
|
31
32
|
|
|
@@ -33,7 +34,8 @@ class ReactInstance final {
|
|
|
33
34
|
std::unique_ptr<JSRuntime> runtime,
|
|
34
35
|
std::shared_ptr<MessageQueueThread> jsMessageQueueThread,
|
|
35
36
|
std::shared_ptr<TimerManager> timerManager,
|
|
36
|
-
JsErrorHandler::JsErrorHandlingFunc JsErrorHandlingFunc
|
|
37
|
+
JsErrorHandler::JsErrorHandlingFunc JsErrorHandlingFunc,
|
|
38
|
+
jsinspector_modern::PageTarget* parentInspectorTarget = nullptr);
|
|
37
39
|
|
|
38
40
|
RuntimeExecutor getUnbufferedRuntimeExecutor() noexcept;
|
|
39
41
|
|
|
@@ -63,6 +65,12 @@ class ReactInstance final {
|
|
|
63
65
|
|
|
64
66
|
void handleMemoryPressureJs(int pressureLevel);
|
|
65
67
|
|
|
68
|
+
/**
|
|
69
|
+
* Unregisters the instance from the inspector. This method must be called
|
|
70
|
+
* on the main (non-JS) thread.
|
|
71
|
+
*/
|
|
72
|
+
void unregisterFromInspector();
|
|
73
|
+
|
|
66
74
|
private:
|
|
67
75
|
std::shared_ptr<JSRuntime> runtime_;
|
|
68
76
|
std::shared_ptr<MessageQueueThread> jsMessageQueueThread_;
|
|
@@ -74,6 +82,9 @@ class ReactInstance final {
|
|
|
74
82
|
|
|
75
83
|
// Whether there are errors caught during bundle loading
|
|
76
84
|
std::shared_ptr<bool> hasFatalJsError_;
|
|
85
|
+
|
|
86
|
+
jsinspector_modern::InstanceTarget* inspectorTarget_{nullptr};
|
|
87
|
+
jsinspector_modern::PageTarget* parentInspectorTarget_{nullptr};
|
|
77
88
|
};
|
|
78
89
|
|
|
79
90
|
} // namespace facebook::react
|
|
@@ -198,7 +198,8 @@ class RCTHostPageTargetDelegate : public facebook::react::jsinspector_modern::Pa
|
|
|
198
198
|
bundleManager:_bundleManager
|
|
199
199
|
turboModuleManagerDelegate:_turboModuleManagerDelegate
|
|
200
200
|
onInitialBundleLoad:_onInitialBundleLoad
|
|
201
|
-
moduleRegistry:_moduleRegistry
|
|
201
|
+
moduleRegistry:_moduleRegistry
|
|
202
|
+
parentInspectorTarget:_inspectorTarget.get()];
|
|
202
203
|
[_hostDelegate hostDidStart:self];
|
|
203
204
|
}
|
|
204
205
|
|
|
@@ -265,7 +266,8 @@ class RCTHostPageTargetDelegate : public facebook::react::jsinspector_modern::Pa
|
|
|
265
266
|
bundleManager:_bundleManager
|
|
266
267
|
turboModuleManagerDelegate:_turboModuleManagerDelegate
|
|
267
268
|
onInitialBundleLoad:_onInitialBundleLoad
|
|
268
|
-
moduleRegistry:_moduleRegistry
|
|
269
|
+
moduleRegistry:_moduleRegistry
|
|
270
|
+
parentInspectorTarget:_inspectorTarget.get()];
|
|
269
271
|
[_hostDelegate hostDidStart:self];
|
|
270
272
|
|
|
271
273
|
for (RCTFabricSurface *surface in [self _getAttachedSurfaces]) {
|
|
@@ -275,12 +277,12 @@ class RCTHostPageTargetDelegate : public facebook::react::jsinspector_modern::Pa
|
|
|
275
277
|
|
|
276
278
|
- (void)dealloc
|
|
277
279
|
{
|
|
280
|
+
[_instance invalidate];
|
|
278
281
|
if (_inspectorPageId.has_value()) {
|
|
279
282
|
facebook::react::jsinspector_modern::getInspectorInstance().removePage(*_inspectorPageId);
|
|
280
283
|
_inspectorPageId.reset();
|
|
281
284
|
_inspectorTarget.reset();
|
|
282
285
|
}
|
|
283
|
-
[_instance invalidate];
|
|
284
286
|
}
|
|
285
287
|
|
|
286
288
|
#pragma mark - RCTInstanceDelegate
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
#import <UIKit/UIKit.h>
|
|
9
9
|
|
|
10
10
|
#import <React/RCTDefines.h>
|
|
11
|
+
#import <jsinspector-modern/ReactCdp.h>
|
|
11
12
|
#import <react/renderer/mapbuffer/MapBuffer.h>
|
|
12
13
|
#import <react/runtime/JSRuntimeFactory.h>
|
|
13
14
|
#import <react/runtime/ReactInstance.h>
|
|
@@ -60,7 +61,8 @@ typedef void (^_Null_unspecified RCTInstanceInitialBundleLoadCompletionBlock)();
|
|
|
60
61
|
bundleManager:(RCTBundleManager *)bundleManager
|
|
61
62
|
turboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)turboModuleManagerDelegate
|
|
62
63
|
onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
|
|
63
|
-
moduleRegistry:(RCTModuleRegistry *)moduleRegistry
|
|
64
|
+
moduleRegistry:(RCTModuleRegistry *)moduleRegistry
|
|
65
|
+
parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget;
|
|
64
66
|
|
|
65
67
|
- (void)callFunctionOnJSModule:(NSString *)moduleName method:(NSString *)method args:(NSArray *)args;
|
|
66
68
|
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
#import <ReactCommon/RCTTurboModuleManager.h>
|
|
32
32
|
#import <ReactCommon/RuntimeExecutor.h>
|
|
33
33
|
#import <cxxreact/ReactMarker.h>
|
|
34
|
+
#import <jsinspector-modern/ReactCdp.h>
|
|
34
35
|
#import <jsireact/JSIExecutor.h>
|
|
35
36
|
#import <react/runtime/BridgelessJSCallInvoker.h>
|
|
36
37
|
#import <react/utils/ContextContainer.h>
|
|
@@ -81,6 +82,8 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
81
82
|
|
|
82
83
|
// APIs supporting interop with native modules and view managers
|
|
83
84
|
RCTBridgeModuleDecorator *_bridgeModuleDecorator;
|
|
85
|
+
|
|
86
|
+
jsinspector_modern::PageTarget *_parentInspectorTarget;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
#pragma mark - Public
|
|
@@ -91,6 +94,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
91
94
|
turboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)tmmDelegate
|
|
92
95
|
onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
|
|
93
96
|
moduleRegistry:(RCTModuleRegistry *)moduleRegistry
|
|
97
|
+
parentInspectorTarget:(jsinspector_modern::PageTarget *)parentInspectorTarget
|
|
94
98
|
{
|
|
95
99
|
if (self = [super init]) {
|
|
96
100
|
_performanceLogger = [RCTPerformanceLogger new];
|
|
@@ -106,6 +110,7 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
106
110
|
moduleRegistry:moduleRegistry
|
|
107
111
|
bundleManager:bundleManager
|
|
108
112
|
callableJSModules:[RCTCallableJSModules new]];
|
|
113
|
+
_parentInspectorTarget = parentInspectorTarget;
|
|
109
114
|
{
|
|
110
115
|
__weak __typeof(self) weakSelf = self;
|
|
111
116
|
[_bridgeModuleDecorator.callableJSModules
|
|
@@ -138,7 +143,9 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
138
143
|
{
|
|
139
144
|
std::lock_guard<std::mutex> lock(_invalidationMutex);
|
|
140
145
|
_valid = false;
|
|
141
|
-
|
|
146
|
+
if (self->_reactInstance) {
|
|
147
|
+
self->_reactInstance->unregisterFromInspector();
|
|
148
|
+
}
|
|
142
149
|
[_surfacePresenter suspend];
|
|
143
150
|
[_jsThreadManager dispatchToJSThread:^{
|
|
144
151
|
/**
|
|
@@ -221,7 +228,8 @@ void RCTInstanceSetRuntimeDiagnosticFlags(NSString *flags)
|
|
|
221
228
|
_jsRuntimeFactory->createJSRuntime(_jsThreadManager.jsMessageThread),
|
|
222
229
|
_jsThreadManager.jsMessageThread,
|
|
223
230
|
timerManager,
|
|
224
|
-
jsErrorHandlingFunc
|
|
231
|
+
jsErrorHandlingFunc,
|
|
232
|
+
_parentInspectorTarget);
|
|
225
233
|
_valid = true;
|
|
226
234
|
|
|
227
235
|
RuntimeExecutor bufferedRuntimeExecutor = _reactInstance->getBufferedRuntimeExecutor();
|
|
@@ -23,7 +23,8 @@ static __weak ShimRCTInstance *weakShim = nil;
|
|
|
23
23
|
[RCTInstance class],
|
|
24
24
|
[ShimRCTInstance class],
|
|
25
25
|
@selector(initWithDelegate:
|
|
26
|
-
jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
|
|
26
|
+
jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
|
|
27
|
+
:parentInspectorTarget:));
|
|
27
28
|
RCTSwizzleInstanceSelector([RCTInstance class], [ShimRCTInstance class], @selector(invalidate));
|
|
28
29
|
RCTSwizzleInstanceSelector(
|
|
29
30
|
[RCTInstance class], [ShimRCTInstance class], @selector(callFunctionOnJSModule:method:args:));
|
|
@@ -38,7 +39,8 @@ static __weak ShimRCTInstance *weakShim = nil;
|
|
|
38
39
|
[RCTInstance class],
|
|
39
40
|
[ShimRCTInstance class],
|
|
40
41
|
@selector(initWithDelegate:
|
|
41
|
-
jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
|
|
42
|
+
jsRuntimeFactory:bundleManager:turboModuleManagerDelegate:onInitialBundleLoad:moduleRegistry
|
|
43
|
+
:parentInspectorTarget:));
|
|
42
44
|
RCTSwizzleInstanceSelector([RCTInstance class], [ShimRCTInstance class], @selector(invalidate));
|
|
43
45
|
RCTSwizzleInstanceSelector(
|
|
44
46
|
[RCTInstance class], [ShimRCTInstance class], @selector(callFunctionOnJSModule:method:args:));
|
|
@@ -52,6 +54,7 @@ static __weak ShimRCTInstance *weakShim = nil;
|
|
|
52
54
|
turboModuleManagerDelegate:(id<RCTTurboModuleManagerDelegate>)tmmDelegate
|
|
53
55
|
onInitialBundleLoad:(RCTInstanceInitialBundleLoadCompletionBlock)onInitialBundleLoad
|
|
54
56
|
moduleRegistry:(RCTModuleRegistry *)moduleRegistry
|
|
57
|
+
parentInspectorTarget:(facebook::react::jsinspector_modern::PageTarget *)parentInspectorTarget
|
|
55
58
|
{
|
|
56
59
|
weakShim.initCount++;
|
|
57
60
|
return self;
|
|
@@ -8,20 +8,22 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
#include <functional>
|
|
11
|
+
#include <type_traits>
|
|
11
12
|
|
|
12
13
|
namespace facebook::react {
|
|
13
14
|
|
|
14
|
-
template <
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
template <typename T>
|
|
16
|
+
concept Hashable = !std::is_same_v<T, const char*> && (requires(T a) {
|
|
17
|
+
{ std::hash<T>{}(a) } -> std::convertible_to<std::size_t>;
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
template <Hashable T, Hashable... Rest>
|
|
19
21
|
void hash_combine(std::size_t& seed, const T& v, const Rest&... rest) {
|
|
20
22
|
seed ^= std::hash<T>{}(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2);
|
|
21
23
|
(hash_combine(seed, rest), ...);
|
|
22
24
|
}
|
|
23
25
|
|
|
24
|
-
template <
|
|
26
|
+
template <Hashable T, Hashable... Args>
|
|
25
27
|
std::size_t hash_combine(const T& v, const Args&... args) {
|
|
26
28
|
std::size_t seed = 0;
|
|
27
29
|
hash_combine<T, Args...>(seed, v, args...);
|
package/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import typeof Clipboard from './Libraries/Components/Clipboard/Clipboard';
|
|
|
27
27
|
import typeof DrawerLayoutAndroid from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid';
|
|
28
28
|
import typeof Keyboard from './Libraries/Components/Keyboard/Keyboard';
|
|
29
29
|
import typeof KeyboardAvoidingView from './Libraries/Components/Keyboard/KeyboardAvoidingView';
|
|
30
|
+
import typeof PopupMenuAndroid from './Libraries/Components/PopupMenuAndroid/PopupMenuAndroid';
|
|
30
31
|
import typeof Pressable from './Libraries/Components/Pressable/Pressable';
|
|
31
32
|
import typeof ProgressBarAndroid from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid';
|
|
32
33
|
import typeof RefreshControl from './Libraries/Components/RefreshControl/RefreshControl';
|
|
@@ -43,6 +44,7 @@ import typeof TouchableNativeFeedback from './Libraries/Components/Touchable/Tou
|
|
|
43
44
|
import typeof TouchableOpacity from './Libraries/Components/Touchable/TouchableOpacity';
|
|
44
45
|
import typeof TouchableWithoutFeedback from './Libraries/Components/Touchable/TouchableWithoutFeedback';
|
|
45
46
|
import typeof View from './Libraries/Components/View/View';
|
|
47
|
+
import typeof RegisterCallableModule from './Libraries/Core/registerCallableModule';
|
|
46
48
|
import typeof NativeEventEmitter from './Libraries/EventEmitter/NativeEventEmitter';
|
|
47
49
|
import typeof RCTDeviceEventEmitter from './Libraries/EventEmitter/RCTDeviceEventEmitter';
|
|
48
50
|
import typeof RCTNativeAppEventEmitter from './Libraries/EventEmitter/RCTNativeAppEventEmitter';
|
|
@@ -97,6 +99,9 @@ const invariant = require('invariant');
|
|
|
97
99
|
export type HostComponent<T> = _HostComponentInternal<T>;
|
|
98
100
|
|
|
99
101
|
module.exports = {
|
|
102
|
+
get registerCallableModule(): RegisterCallableModule {
|
|
103
|
+
return require('./Libraries/Core/registerCallableModule').default;
|
|
104
|
+
},
|
|
100
105
|
// Components
|
|
101
106
|
get AccessibilityInfo(): AccessibilityInfo {
|
|
102
107
|
return require('./Libraries/Components/AccessibilityInfo/AccessibilityInfo')
|
|
@@ -129,6 +134,10 @@ module.exports = {
|
|
|
129
134
|
return require('./Libraries/Components/Keyboard/KeyboardAvoidingView')
|
|
130
135
|
.default;
|
|
131
136
|
},
|
|
137
|
+
get PopupMenuAndroid(): PopupMenuAndroid {
|
|
138
|
+
return require('./Libraries/Components/PopupMenuAndroid/PopupMenuAndroid')
|
|
139
|
+
.default;
|
|
140
|
+
},
|
|
132
141
|
get Modal(): Modal {
|
|
133
142
|
return require('./Libraries/Modal/Modal');
|
|
134
143
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1000.0.0",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -101,13 +101,13 @@
|
|
|
101
101
|
"@react-native-community/cli": "13.5.1",
|
|
102
102
|
"@react-native-community/cli-platform-android": "13.5.1",
|
|
103
103
|
"@react-native-community/cli-platform-ios": "13.5.1",
|
|
104
|
-
"@react-native/assets-registry": "0.74.0
|
|
105
|
-
"@react-native/codegen": "0.74.0
|
|
106
|
-
"@react-native/community-cli-plugin": "0.74.0
|
|
107
|
-
"@react-native/gradle-plugin": "0.74.0
|
|
108
|
-
"@react-native/js-polyfills": "0.74.0
|
|
109
|
-
"@react-native/normalize-colors": "0.74.
|
|
110
|
-
"@react-native/virtualized-lists": "0.74.0
|
|
104
|
+
"@react-native/assets-registry": "0.74.0",
|
|
105
|
+
"@react-native/codegen": "0.74.0",
|
|
106
|
+
"@react-native/community-cli-plugin": "0.74.0",
|
|
107
|
+
"@react-native/gradle-plugin": "0.74.0",
|
|
108
|
+
"@react-native/js-polyfills": "0.74.0",
|
|
109
|
+
"@react-native/normalize-colors": "0.74.1",
|
|
110
|
+
"@react-native/virtualized-lists": "0.74.0",
|
|
111
111
|
"abort-controller": "^3.0.0",
|
|
112
112
|
"anser": "^1.4.9",
|
|
113
113
|
"ansi-regex": "^5.0.0",
|
|
@@ -153,4 +153,4 @@
|
|
|
153
153
|
}
|
|
154
154
|
]
|
|
155
155
|
}
|
|
156
|
-
}
|
|
156
|
+
}
|
|
Binary file
|