react-native-windows 0.83.0-preview.2 → 0.84.0-preview.2
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/.flowconfig +2 -2
- package/Folly/Folly.vcxproj +2 -0
- package/Libraries/Animated/AnimatedEvent.js +2 -2
- package/Libraries/Animated/animations/Animation.js +1 -3
- package/Libraries/Animated/createAnimatedComponent.js +8 -5
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +40 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +16 -11
- package/Libraries/Animated/nodes/AnimatedProps.js +43 -12
- package/Libraries/Animated/nodes/AnimatedStyle.js +12 -12
- package/Libraries/Animated/nodes/AnimatedValue.js +6 -3
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +24 -22
- package/Libraries/Blob/URL.js +34 -3
- package/Libraries/Blob/URLSearchParams.js +1 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +9 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +6 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +6 -1
- package/Libraries/Components/Button.js +2 -5
- package/Libraries/Components/Button.windows.js +2 -5
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +4 -4
- package/Libraries/Components/Keyboard/Keyboard.js +2 -2
- package/Libraries/Components/Pressable/Pressable.js +8 -8
- package/Libraries/Components/Pressable/Pressable.windows.js +14 -13
- package/Libraries/Components/TextInput/TextInput.flow.js +13 -13
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +19 -18
- package/Libraries/Components/TextInput/TextInput.js +33 -34
- package/Libraries/Components/TextInput/TextInput.windows.js +40 -39
- package/Libraries/Components/Touchable/PooledClass.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +3 -3
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +3 -3
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +9 -9
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +9 -9
- package/Libraries/Components/View/ViewPropTypes.js +16 -6
- package/Libraries/Components/View/ViewPropTypes.windows.js +21 -11
- package/Libraries/Core/Devtools/loadBundleFromServer.js +6 -3
- package/Libraries/Core/Devtools/loadBundleFromServer.windows.js +6 -3
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -1
- package/Libraries/EventEmitter/NativeEventEmitter.js +2 -2
- package/Libraries/Image/Image.android.js +2 -2
- package/Libraries/Image/Image.ios.js +2 -2
- package/Libraries/Image/Image.windows.js +2 -2
- package/Libraries/Image/ImageProps.js +1 -1
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Interaction/InteractionManager.js +3 -3
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/LogBox/Data/LogBoxLog.js +2 -2
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +5 -5
- package/Libraries/LogBox/LogBox.js +7 -7
- package/Libraries/NativeComponent/BaseViewConfig.android.js +12 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +4 -4
- package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -1
- package/Libraries/NativeComponent/ViewConfigIgnore.windows.js +1 -1
- package/Libraries/Network/RCTNetworking.android.js +3 -3
- package/Libraries/Network/RCTNetworking.ios.js +2 -2
- package/Libraries/Network/RCTNetworking.js.flow +2 -2
- package/Libraries/Network/RCTNetworking.windows.js +2 -2
- package/Libraries/Pressability/Pressability.js +9 -9
- package/Libraries/Pressability/Pressability.windows.js +17 -16
- package/Libraries/ReactNative/AppRegistry.flow.js +1 -1
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.js +1 -1
- package/Libraries/ReactNative/PaperUIManager.windows.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +1 -1
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +11 -4
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +11 -4
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +2 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +4 -2
- package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +99 -4
- package/Libraries/StyleSheet/StyleSheetTypes.js +6 -8
- package/Libraries/StyleSheet/processFilter.js +1 -1
- package/Libraries/Text/Text.js +46 -6
- package/Libraries/Text/Text.windows.js +46 -6
- package/Libraries/Text/TextNativeComponent.js +1 -1
- package/Libraries/Text/TextProps.js +7 -7
- package/Libraries/Text/TextProps.windows.js +7 -7
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +31 -0
- package/Libraries/Types/CoreEventTypes.windows.js +31 -13
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +2 -2
- package/Libraries/Utilities/DevLoadingView.js +8 -1
- package/Libraries/Utilities/DevSettings.js +3 -3
- package/Libraries/Utilities/HMRClient.js +4 -3
- package/Libraries/Utilities/RCTLog.js +3 -3
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +3 -3
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +7 -7
- package/Libraries/Utilities/useRefEffect.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +3 -3
- package/Libraries/promiseRejectionTrackingOptions.js +8 -8
- package/Libraries/vendor/core/ErrorUtils.js +10 -10
- package/Libraries/vendor/emitter/EventEmitter.js +6 -6
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +5 -0
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +25 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +9 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +2 -3
- package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +2 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +2 -0
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +6 -0
- package/Microsoft.ReactNative/ViewProps.idl +9 -0
- package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +12 -2
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/ReactCommon/ReactCommon.vcxproj +7 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +5 -5
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSIExecutor.cpp +2 -43
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +12 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/attributedstring/TextAttributes.cpp +291 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +1 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/propsConversions.h +199 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +6 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +17 -10
- package/Scripts/creaternwapp.cmd +8 -1
- package/Scripts/creaternwlib.cmd +21 -2
- package/Shared/DevSettings.h +0 -3
- package/Shared/Modules/WebSocketModule.cpp +0 -1
- package/Shared/Modules/WebSocketModule.h +62 -3
- package/Shared/OInstance.cpp +5 -0
- package/Shared/Shared.vcxitems +4 -6
- package/Shared/Shared.vcxitems.filters +218 -709
- package/codegen/NativeAccessibilityManagerSpec.g.h +2 -0
- package/codegen/NativeAnimatedModuleSpec.g.h +21 -15
- package/codegen/NativeDevLoadingViewSpec.g.h +3 -3
- package/codegen/NativeIntentAndroidSpec.g.h +16 -3
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +209 -191
- package/codegen/react/components/rnwcore/EventEmitters.h +1 -0
- package/codegen/react/components/rnwcore/Props.h +14 -0
- package/codegen/rnwcoreJSI.h +246 -211
- package/index.js +3 -0
- package/index.windows.js +3 -0
- package/jest/mock.js +2 -2
- package/jest/mockComponent.js +1 -1
- package/jest/setup.js +1 -1
- package/package.json +22 -21
- package/src/private/animated/NativeAnimatedHelper.js +130 -125
- package/src/private/animated/NativeAnimatedValidation.js +7 -4
- package/src/private/animated/createAnimatedPropsHook.js +13 -5
- package/src/private/animated/createAnimatedPropsMemoHook.js +10 -10
- package/src/private/components/virtualview/VirtualView.js +16 -9
- package/src/private/components/virtualview/logger/VirtualViewLogger.js +21 -0
- package/src/private/components/virtualview/logger/VirtualViewLoggerTypes.js +24 -0
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +6 -25
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +1 -27
- package/src/private/devsupport/devmenu/elementinspector/XHRInterceptor.js +3 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +63 -42
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -9
- package/src/private/renderer/errorhandling/ErrorHandlers.js +7 -4
- package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +4 -0
- package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -0
- package/src/private/webapis/dom/events/CustomEvent.js +3 -3
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +29 -29
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +1 -1
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/src/private/webapis/html/events/MessageEvent.js +3 -3
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +3 -3
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +53 -5
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +2 -2
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +4 -4
- package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +1 -1
- package/src/private/webapis/mutationobserver/MutationObserver.js +1 -1
- package/src/private/webapis/mutationobserver/MutationRecord.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +4 -4
- package/src/private/webapis/performance/Performance.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +1 -1
- package/src/private/webapis/performance/specs/NativePerformance.js +3 -3
- package/src/private/webapis/structuredClone/structuredClone.js +3 -3
- package/src/types/globals.d.ts +30 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +0 -178
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +0 -183
- package/Shared/Modules/WebSocketTurboModule.h +0 -71
- package/src/private/devsupport/devmenu/elementinspector/NetworkOverlay.js +0 -628
- package/src/private/devsupport/devmenu/perfmonitor/PerformanceOverlay.js +0 -66
|
@@ -12,8 +12,15 @@ import typeof {enable} from 'promise/setimmediate/rejection-tracking';
|
|
|
12
12
|
|
|
13
13
|
import ExceptionsManager from './Core/ExceptionsManager';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const rejectionTrackingOptions: NonNullable<Parameters<enable>[0]> = {
|
|
16
16
|
allRejections: true,
|
|
17
|
+
onHandled: id => {
|
|
18
|
+
const warning =
|
|
19
|
+
`Promise rejection handled (id: ${id})\n` +
|
|
20
|
+
'This means you can ignore any previous messages of the form ' +
|
|
21
|
+
`"Uncaught (in promise, id: ${id})"`;
|
|
22
|
+
console.warn(warning);
|
|
23
|
+
},
|
|
17
24
|
onUnhandled: (id, rejection) => {
|
|
18
25
|
let message: string;
|
|
19
26
|
|
|
@@ -46,13 +53,6 @@ let rejectionTrackingOptions: $NonMaybeType<Parameters<enable>[0]> = {
|
|
|
46
53
|
false /* isFatal */,
|
|
47
54
|
);
|
|
48
55
|
},
|
|
49
|
-
onHandled: id => {
|
|
50
|
-
const warning =
|
|
51
|
-
`Promise rejection handled (id: ${id})\n` +
|
|
52
|
-
'This means you can ignore any previous messages of the form ' +
|
|
53
|
-
`"Uncaught (in promise, id: ${id})"`;
|
|
54
|
-
console.warn(warning);
|
|
55
|
-
},
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
export default rejectionTrackingOptions;
|
|
@@ -9,30 +9,30 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
// From @react-native/js-polyfills
|
|
12
|
-
type ErrorHandler = (error:
|
|
13
|
-
type Fn<Args: $ReadOnlyArray<
|
|
12
|
+
type ErrorHandler = (error: unknown, isFatal: boolean) => void;
|
|
13
|
+
type Fn<Args: $ReadOnlyArray<unknown>, Return> = (...Args) => Return;
|
|
14
14
|
export type ErrorUtils = {
|
|
15
|
-
applyWithGuard<TArgs: $ReadOnlyArray<
|
|
15
|
+
applyWithGuard<TArgs: $ReadOnlyArray<unknown>, TOut>(
|
|
16
16
|
fun: Fn<TArgs, TOut>,
|
|
17
|
-
context?:
|
|
17
|
+
context?: unknown,
|
|
18
18
|
args?: ?TArgs,
|
|
19
19
|
unused_onError?: null,
|
|
20
20
|
unused_name?: ?string,
|
|
21
21
|
): ?TOut,
|
|
22
|
-
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<
|
|
22
|
+
applyWithGuardIfNeeded<TArgs: $ReadOnlyArray<unknown>, TOut>(
|
|
23
23
|
fun: Fn<TArgs, TOut>,
|
|
24
|
-
context?:
|
|
24
|
+
context?: unknown,
|
|
25
25
|
args?: ?TArgs,
|
|
26
26
|
): ?TOut,
|
|
27
27
|
getGlobalHandler(): ErrorHandler,
|
|
28
|
-
guard<TArgs: $ReadOnlyArray<
|
|
28
|
+
guard<TArgs: $ReadOnlyArray<unknown>, TOut>(
|
|
29
29
|
fun: Fn<TArgs, TOut>,
|
|
30
30
|
name?: ?string,
|
|
31
|
-
context?:
|
|
31
|
+
context?: unknown,
|
|
32
32
|
): ?(...TArgs) => ?TOut,
|
|
33
33
|
inGuard(): boolean,
|
|
34
|
-
reportError(error:
|
|
35
|
-
reportFatalError(error:
|
|
34
|
+
reportError(error: unknown): void,
|
|
35
|
+
reportFatalError(error: unknown): void,
|
|
36
36
|
setGlobalHandler(fun: ErrorHandler): void,
|
|
37
37
|
};
|
|
38
38
|
|
|
@@ -20,8 +20,8 @@ export interface IEventEmitter<
|
|
|
20
20
|
> {
|
|
21
21
|
addListener<TEvent: $Keys<TEventToArgsMap>>(
|
|
22
22
|
eventType: TEvent,
|
|
23
|
-
listener: (...args: TEventToArgsMap[TEvent]) =>
|
|
24
|
-
context?:
|
|
23
|
+
listener: (...args: TEventToArgsMap[TEvent]) => unknown,
|
|
24
|
+
context?: unknown,
|
|
25
25
|
): EventSubscription;
|
|
26
26
|
|
|
27
27
|
emit<TEvent: $Keys<TEventToArgsMap>>(
|
|
@@ -35,8 +35,8 @@ export interface IEventEmitter<
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
interface Registration<TArgs> {
|
|
38
|
-
+context:
|
|
39
|
-
+listener: (...args: TArgs) =>
|
|
38
|
+
+context: unknown;
|
|
39
|
+
+listener: (...args: TArgs) => unknown;
|
|
40
40
|
+remove: () => void;
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -85,8 +85,8 @@ export default class EventEmitter<
|
|
|
85
85
|
*/
|
|
86
86
|
addListener<TEvent: $Keys<TEventToArgsMap>>(
|
|
87
87
|
eventType: TEvent,
|
|
88
|
-
listener: (...args: TEventToArgsMap[TEvent]) =>
|
|
89
|
-
context:
|
|
88
|
+
listener: (...args: TEventToArgsMap[TEvent]) => unknown,
|
|
89
|
+
context: unknown,
|
|
90
90
|
): EventSubscription {
|
|
91
91
|
if (typeof listener !== 'function') {
|
|
92
92
|
throw new TypeError(
|
|
@@ -226,6 +226,11 @@ winrt::hstring ViewProps::AccessibilityLabel() noexcept {
|
|
|
226
226
|
return m_viewProps ? winrt::to_hstring(m_viewProps->accessibilityLabel) : winrt::hstring{};
|
|
227
227
|
}
|
|
228
228
|
|
|
229
|
+
winrt::Microsoft::ReactNative::Overflow ViewProps::Overflow() noexcept {
|
|
230
|
+
return m_viewProps ? static_cast<winrt::Microsoft::ReactNative::Overflow>(m_viewProps->yogaStyle.overflow())
|
|
231
|
+
: winrt::Microsoft::ReactNative::Overflow::Visible;
|
|
232
|
+
}
|
|
233
|
+
|
|
229
234
|
ImageProps::ImageProps(facebook::react::SharedViewProps props) noexcept : Super(props) {}
|
|
230
235
|
|
|
231
236
|
winrt::Windows::Foundation::Collections::IVectorView<winrt::Microsoft::ReactNative::ImageSource>
|
|
@@ -99,6 +99,7 @@ struct ViewProps : ViewPropsT<ViewProps> {
|
|
|
99
99
|
winrt::Microsoft::ReactNative::Color BackgroundColor() noexcept;
|
|
100
100
|
winrt::hstring TestId() noexcept;
|
|
101
101
|
winrt::hstring AccessibilityLabel() noexcept;
|
|
102
|
+
winrt::Microsoft::ReactNative::Overflow Overflow() noexcept;
|
|
102
103
|
|
|
103
104
|
protected:
|
|
104
105
|
facebook::react::SharedViewProps m_props;
|
|
@@ -986,8 +986,6 @@ void CompositionEventHandler::UpdateActiveTouch(
|
|
|
986
986
|
// activeTouch.touch.shiftKey = false;
|
|
987
987
|
// activeTouch.touch.ctrlKey = false;
|
|
988
988
|
// activeTouch.touch.altKey = false;
|
|
989
|
-
|
|
990
|
-
// activeTouch.touch.isPrimary = true;
|
|
991
989
|
}
|
|
992
990
|
|
|
993
991
|
facebook::react::PointerEvent CreatePointerEventFromIncompleteHoverData(
|
|
@@ -1246,7 +1244,7 @@ void CompositionEventHandler::onPointerPressed(
|
|
|
1246
1244
|
->eventEmitterAtPoint(ptLocal)) {
|
|
1247
1245
|
activeTouch.eventEmitter = eventEmitter;
|
|
1248
1246
|
activeTouch.touch.target = targetComponentView.Tag();
|
|
1249
|
-
|
|
1247
|
+
activeTouch.initialComponentView = targetComponentView;
|
|
1250
1248
|
break;
|
|
1251
1249
|
}
|
|
1252
1250
|
targetComponentView = targetComponentView.Parent();
|
|
@@ -1254,7 +1252,7 @@ void CompositionEventHandler::onPointerPressed(
|
|
|
1254
1252
|
|
|
1255
1253
|
UpdateActiveTouch(activeTouch, ptScaled, ptLocal);
|
|
1256
1254
|
|
|
1257
|
-
|
|
1255
|
+
activeTouch.isPrimary = pointerId == 1;
|
|
1258
1256
|
activeTouch.touch.identifier = pointerId;
|
|
1259
1257
|
|
|
1260
1258
|
// If the pointer has not been marked as hovering over views before the touch started, we register
|
|
@@ -1459,11 +1457,26 @@ facebook::react::PointerEvent CompositionEventHandler::CreatePointerEventFromAct
|
|
|
1459
1457
|
|
|
1460
1458
|
// event.tangentialPressure = 0.0;
|
|
1461
1459
|
// event.twist = 0;
|
|
1462
|
-
|
|
1460
|
+
event.isPrimary = activeTouch.isPrimary;
|
|
1463
1461
|
|
|
1464
1462
|
return event;
|
|
1465
1463
|
}
|
|
1466
1464
|
|
|
1465
|
+
bool CompositionEventHandler::IsPointerWithinInitialTree(const ActiveTouch &activeTouch) noexcept {
|
|
1466
|
+
auto initialComponentView = activeTouch.initialComponentView.view();
|
|
1467
|
+
if (!initialComponentView)
|
|
1468
|
+
return false;
|
|
1469
|
+
|
|
1470
|
+
auto initialViewSet = GetTouchableViewsInPathToRoot(initialComponentView);
|
|
1471
|
+
|
|
1472
|
+
for (const auto &view : initialViewSet) {
|
|
1473
|
+
if (view.Tag() == activeTouch.touch.target)
|
|
1474
|
+
return true;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
return false;
|
|
1478
|
+
}
|
|
1479
|
+
|
|
1467
1480
|
// If we have events that include multiple pointer updates, we should change arg from pointerId to vector<pointerId>
|
|
1468
1481
|
void CompositionEventHandler::DispatchTouchEvent(
|
|
1469
1482
|
TouchEventType eventType,
|
|
@@ -1520,6 +1533,13 @@ void CompositionEventHandler::DispatchTouchEvent(
|
|
|
1520
1533
|
}
|
|
1521
1534
|
case TouchEventType::End:
|
|
1522
1535
|
activeTouch.eventEmitter->onPointerUp(pointerEvent);
|
|
1536
|
+
if (pointerEvent.isPrimary && pointerEvent.button == 0) {
|
|
1537
|
+
if (IsPointerWithinInitialTree(activeTouch)) {
|
|
1538
|
+
activeTouch.eventEmitter->onClick(pointerEvent);
|
|
1539
|
+
}
|
|
1540
|
+
} /* else if (IsPointerWithinInitialTree(activeTouch)) {
|
|
1541
|
+
activeTouch.eventEmitter->onAuxClick(pointerEvent);
|
|
1542
|
+
} */
|
|
1523
1543
|
break;
|
|
1524
1544
|
case TouchEventType::Cancel:
|
|
1525
1545
|
case TouchEventType::CaptureLost:
|
|
@@ -138,9 +138,10 @@ class CompositionEventHandler : public std::enable_shared_from_this<CompositionE
|
|
|
138
138
|
/*
|
|
139
139
|
* A component view on which the touch was begun.
|
|
140
140
|
*/
|
|
141
|
-
|
|
141
|
+
ReactTaggedView initialComponentView{nullptr};
|
|
142
142
|
};
|
|
143
143
|
|
|
144
|
+
static bool IsPointerWithinInitialTree(const ActiveTouch &activeTouch) noexcept;
|
|
144
145
|
static bool IsEndishEventType(TouchEventType eventType) noexcept;
|
|
145
146
|
static const char *PointerTypeCStringFromUITouchType(UITouchType type) noexcept;
|
|
146
147
|
static facebook::react::PointerEvent CreatePointerEventFromActiveTouch(
|
|
@@ -1180,15 +1180,17 @@ facebook::react::Tag ViewComponentView::hitTest(
|
|
|
1180
1180
|
|
|
1181
1181
|
facebook::react::Tag targetTag = -1;
|
|
1182
1182
|
|
|
1183
|
+
bool isPointInside = ptLocal.x >= 0 && ptLocal.x <= m_layoutMetrics.frame.size.width && ptLocal.y >= 0 &&
|
|
1184
|
+
ptLocal.y <= m_layoutMetrics.frame.size.height;
|
|
1185
|
+
|
|
1183
1186
|
if ((ignorePointerEvents || m_props->pointerEvents == facebook::react::PointerEventsMode::Auto ||
|
|
1184
1187
|
m_props->pointerEvents == facebook::react::PointerEventsMode::BoxNone) &&
|
|
1185
|
-
anyHitTestHelper(targetTag, ptLocal, localPt))
|
|
1188
|
+
(isPointInside || !viewProps()->getClipsContentToBounds()) && anyHitTestHelper(targetTag, ptLocal, localPt))
|
|
1186
1189
|
return targetTag;
|
|
1187
1190
|
|
|
1188
1191
|
if ((ignorePointerEvents || m_props->pointerEvents == facebook::react::PointerEventsMode::Auto ||
|
|
1189
1192
|
m_props->pointerEvents == facebook::react::PointerEventsMode::BoxOnly) &&
|
|
1190
|
-
|
|
1191
|
-
ptLocal.y <= m_layoutMetrics.frame.size.height) {
|
|
1193
|
+
isPointInside) {
|
|
1192
1194
|
localPt = ptLocal;
|
|
1193
1195
|
return Tag();
|
|
1194
1196
|
}
|
|
@@ -1346,6 +1348,10 @@ void ViewComponentView::updateLayoutMetrics(
|
|
|
1346
1348
|
void ViewComponentView::updateChildrenClippingPath(
|
|
1347
1349
|
facebook::react::LayoutMetrics const &layoutMetrics,
|
|
1348
1350
|
const facebook::react::ViewProps &viewProps) noexcept {
|
|
1351
|
+
// Views with a custom visual to mount children into should to do their own handling of children clipping path
|
|
1352
|
+
if (m_builder && m_builder->VisualToMountChildrenIntoHandler())
|
|
1353
|
+
return;
|
|
1354
|
+
|
|
1349
1355
|
const float scale = layoutMetrics.pointScaleFactor;
|
|
1350
1356
|
const float viewWidth = layoutMetrics.frame.size.width * scale;
|
|
1351
1357
|
const float viewHeight = layoutMetrics.frame.size.height * scale;
|
|
@@ -148,9 +148,8 @@ void FabricUIManager::startSurface(
|
|
|
148
148
|
|
|
149
149
|
{
|
|
150
150
|
std::unique_lock lock(m_handlerMutex);
|
|
151
|
-
auto
|
|
152
|
-
|
|
153
|
-
m_handlerRegistry.emplace(surfaceId, std::move(surfaceHandler));
|
|
151
|
+
auto [it, _] = m_handlerRegistry.try_emplace(surfaceId, moduleName, surfaceId);
|
|
152
|
+
it->second.setContextContainer(m_scheduler->getContextContainer());
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
visit(surfaceId, [&](const facebook::react::SurfaceHandler &surfaceHandler) {
|
|
@@ -18,7 +18,7 @@ struct ReactTaggedView {
|
|
|
18
18
|
ReactTaggedView(const winrt::Microsoft::ReactNative::ComponentView &componentView)
|
|
19
19
|
: m_view(componentView), m_tag(componentView ? componentView.Tag() : -1) {}
|
|
20
20
|
|
|
21
|
-
winrt::Microsoft::ReactNative::ComponentView view() noexcept {
|
|
21
|
+
winrt::Microsoft::ReactNative::ComponentView view() const noexcept {
|
|
22
22
|
if (!m_view) {
|
|
23
23
|
return nullptr;
|
|
24
24
|
}
|
|
@@ -37,7 +37,7 @@ struct ReactTaggedView {
|
|
|
37
37
|
|
|
38
38
|
private:
|
|
39
39
|
facebook::react::Tag m_tag;
|
|
40
|
-
winrt::weak_ref<winrt::Microsoft::ReactNative::ComponentView> m_view;
|
|
40
|
+
mutable winrt::weak_ref<winrt::Microsoft::ReactNative::ComponentView> m_view;
|
|
41
41
|
};
|
|
42
42
|
|
|
43
43
|
} // namespace Microsoft::ReactNative
|
|
@@ -73,6 +73,8 @@ namespace Microsoft.ReactNative.Composition
|
|
|
73
73
|
void SetCreateVisualHandler(CreateVisualDelegate impl);
|
|
74
74
|
void SetViewFeatures(ComponentViewFeatures viewFeatures);
|
|
75
75
|
void SetUpdateLayoutMetricsHandler(UpdateLayoutMetricsDelegate impl);
|
|
76
|
+
|
|
77
|
+
DOC_STRING("Provides a customized ContainerVisual that this components children will be mounted into. When overriding this, a clip is no longer automatically applied for overflow:\"hidden\"")
|
|
76
78
|
void SetVisualToMountChildrenIntoHandler(VisualToMountChildrenIntoDelegate impl);
|
|
77
79
|
};
|
|
78
80
|
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
|
2
2
|
// Licensed under the MIT License.
|
|
3
3
|
|
|
4
|
+
#if _MSC_VER
|
|
5
|
+
#pragma warning(push)
|
|
6
|
+
#pragma warning(disable : 4996) // deprecated APIs
|
|
7
|
+
#endif
|
|
8
|
+
|
|
4
9
|
#include "ReactInstanceWin.h"
|
|
5
10
|
|
|
6
11
|
#include <AppModelHelpers.h>
|
|
@@ -57,6 +62,7 @@
|
|
|
57
62
|
#include <react/nativemodule/core/ReactCommon/TurboModuleBinding.h>
|
|
58
63
|
#include <react/renderer/componentregistry/componentNameByReactViewName.h>
|
|
59
64
|
#include <react/renderer/componentregistry/native/NativeComponentRegistryBinding.h>
|
|
65
|
+
#include <react/runtime/JSRuntimeBindings.h>
|
|
60
66
|
#include <react/runtime/PlatformTimerRegistry.h>
|
|
61
67
|
#include <react/runtime/TimerManager.h>
|
|
62
68
|
#include <react/threading/MessageQueueThreadImpl.h>
|
|
@@ -30,6 +30,14 @@ namespace Microsoft.ReactNative {
|
|
|
30
30
|
static void WriteValue(IJSValueWriter writer, Color color);
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
[experimental]
|
|
34
|
+
enum Overflow
|
|
35
|
+
{
|
|
36
|
+
Visible,
|
|
37
|
+
Hidden,
|
|
38
|
+
Scroll,
|
|
39
|
+
};
|
|
40
|
+
|
|
33
41
|
[webhosthidden]
|
|
34
42
|
[experimental]
|
|
35
43
|
DOC_STRING("Interface to implement custom view component properties.")
|
|
@@ -51,6 +59,7 @@ namespace Microsoft.ReactNative {
|
|
|
51
59
|
Color BackgroundColor { get; };
|
|
52
60
|
String TestId { get; };
|
|
53
61
|
String AccessibilityLabel { get; };
|
|
62
|
+
Overflow Overflow { get; };
|
|
54
63
|
|
|
55
64
|
// TODO add accessors to all the properties on ViewProps
|
|
56
65
|
};
|
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
#include <ReactCommon/CallInvoker.h>
|
|
17
17
|
#include <react/bridging/EventEmitter.h>
|
|
18
18
|
|
|
19
|
+
#if _MSC_VER
|
|
20
|
+
#pragma warning(push)
|
|
21
|
+
#pragma warning(disable : 4996) // deprecated APIs
|
|
22
|
+
#endif
|
|
23
|
+
|
|
19
24
|
namespace facebook::react {
|
|
20
25
|
|
|
21
26
|
/**
|
|
@@ -38,7 +43,6 @@ enum TurboModuleMethodValueKind {
|
|
|
38
43
|
*/
|
|
39
44
|
TurboModuleMethodValueKind getTurboModuleMethodValueKind(jsi::Runtime &rt, const jsi::Value *value);
|
|
40
45
|
|
|
41
|
-
class TurboCxxModule;
|
|
42
46
|
class TurboModuleBinding;
|
|
43
47
|
|
|
44
48
|
/**
|
|
@@ -147,7 +151,13 @@ class JSI_EXPORT TurboModule : public jsi::HostObject {
|
|
|
147
151
|
/**
|
|
148
152
|
* An app/platform-specific provider function to get an instance of a module
|
|
149
153
|
* given a name.
|
|
154
|
+
*
|
|
155
|
+
* @deprecated Use TurboModuleProviderFunctionTypeWithRuntime instead.
|
|
156
|
+
* Remove after React Native 0.84 is released.
|
|
150
157
|
*/
|
|
151
|
-
using TurboModuleProviderFunctionType
|
|
158
|
+
using TurboModuleProviderFunctionType [[deprecated("Use TurboModuleProviderFunctionTypeWithRuntime instead")]] =
|
|
159
|
+
std::function<std::shared_ptr<TurboModule>(const std::string &name)>;
|
|
160
|
+
using TurboModuleProviderFunctionTypeWithRuntime =
|
|
161
|
+
std::function<std::shared_ptr<TurboModule>(jsi::Runtime &runtime, const std::string &name)>;
|
|
152
162
|
|
|
153
163
|
} // namespace facebook::react
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.
|
|
13
|
+
<ReactNativeWindowsVersion>0.84.0-preview.2</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
|
-
<ReactNativeWindowsMinor>
|
|
15
|
+
<ReactNativeWindowsMinor>84</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>eec445b81f53fa5dbd9fa27b2f5f3aa26d452c50</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -146,8 +146,11 @@
|
|
|
146
146
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\RuntimeSamplingProfileTraceEventSerializer.cpp" />
|
|
147
147
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\PerformanceTracer.cpp" />
|
|
148
148
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\TraceEventSerializer.cpp" />
|
|
149
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\HostTracingProfileSerializer.cpp" />
|
|
150
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\TraceEventGenerator.cpp" />
|
|
149
151
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\tracing\ConsoleTimeStamp.cpp" />
|
|
150
152
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsitooling\react\runtime\JSRuntimeFactory.cpp" />
|
|
153
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsitooling\react\runtime\JSRuntimeBindings.cpp" />
|
|
151
154
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp" />
|
|
152
155
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\fusebox\FuseboxTracer.cpp" />
|
|
153
156
|
<CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\BridgeNativeModulePerfLogger.cpp" />
|
|
@@ -191,6 +194,9 @@
|
|
|
191
194
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\NetworkHandler.cpp" />
|
|
192
195
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\BoundedRequestBuffer.cpp" />
|
|
193
196
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\CdpNetwork.cpp" />
|
|
197
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleTaskContext.cpp" />
|
|
198
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleTask.cpp" />
|
|
199
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\ConsoleTaskOrchestrator.cpp" />
|
|
194
200
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector-modern\network\HttpUtils.cpp" />
|
|
195
201
|
<ClCompile Include="$(YogaDir)\yoga\event\event.cpp" />
|
|
196
202
|
<ClCompile Include="pch.cpp">
|
|
@@ -227,7 +233,7 @@
|
|
|
227
233
|
<ClInclude Include="$(ReactNativeDir)\ReactCommon\react\renderer\graphics\Rect.h" />
|
|
228
234
|
<ClInclude Include="$(ReactNativeDir)\ReactCommon\react\timing\primitives.h" />
|
|
229
235
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\bridging\LongLivedObject.cpp" />
|
|
230
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\
|
|
236
|
+
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\DynamicPointerEvent.cpp" />
|
|
231
237
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModule.cpp" />
|
|
232
238
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModuleBinding.cpp" />
|
|
233
239
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModuleUtils.cpp" />
|
|
@@ -159,9 +159,6 @@
|
|
|
159
159
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\bridging\LongLivedObject.cpp">
|
|
160
160
|
<Filter>turbomodule\core</Filter>
|
|
161
161
|
</ClCompile>
|
|
162
|
-
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboCxxModule.cpp">
|
|
163
|
-
<Filter>turbomodule\core</Filter>
|
|
164
|
-
</ClCompile>
|
|
165
162
|
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\nativemodule\core\ReactCommon\TurboModule.cpp">
|
|
166
163
|
<Filter>turbomodule\core</Filter>
|
|
167
164
|
</ClCompile>
|
|
@@ -65,8 +65,8 @@ void JSIndexedRAMBundle::init() {
|
|
|
65
65
|
"header size must exactly match the input file format");
|
|
66
66
|
|
|
67
67
|
readBundle(reinterpret_cast<char*>(header), sizeof(header));
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
size_t numTableEntries = folly::Endian::little(header[1]);
|
|
69
|
+
std::streamsize startupCodeSize = folly::Endian::little(header[2]);
|
|
70
70
|
|
|
71
71
|
// allocate memory for meta data and lookup table.
|
|
72
72
|
m_table = ModuleTable(numTableEntries);
|
|
@@ -76,9 +76,9 @@ void JSIndexedRAMBundle::init() {
|
|
|
76
76
|
readBundle(reinterpret_cast<char*>(m_table.data.get()), m_table.byteLength());
|
|
77
77
|
|
|
78
78
|
// read the startup code
|
|
79
|
-
m_startupCode = std::make_unique<JSBigBufferString>(startupCodeSize - 1);
|
|
79
|
+
m_startupCode = std::make_unique<JSBigBufferString>(static_cast<size_t>(startupCodeSize - 1)); //Windows #15782
|
|
80
80
|
|
|
81
|
-
readBundle(m_startupCode->
|
|
81
|
+
readBundle(m_startupCode->mutableData(), startupCodeSize - 1);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
JSIndexedRAMBundle::Module JSIndexedRAMBundle::getModule(
|
|
@@ -114,7 +114,7 @@ std::string JSIndexedRAMBundle::getModuleCode(const uint32_t id) const {
|
|
|
114
114
|
return ret;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
void JSIndexedRAMBundle::readBundle(char* buffer,
|
|
117
|
+
void JSIndexedRAMBundle::readBundle(char* buffer, std::streamsize bytes)
|
|
118
118
|
const {
|
|
119
119
|
if (!m_bundle->read(buffer, bytes)) {
|
|
120
120
|
if ((m_bundle->rdstate() & std::ios::eofbit) != 0) {
|
|
@@ -173,8 +173,7 @@ void JSIExecutor::loadBundle(
|
|
|
173
173
|
ReactMarker::logTaggedMarker(
|
|
174
174
|
ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str());
|
|
175
175
|
}
|
|
176
|
-
runtime_->evaluateJavaScript(
|
|
177
|
-
std::make_unique<BigStringBuffer>(std::move(script)), sourceURL);
|
|
176
|
+
runtime_->evaluateJavaScript(std::move(script), sourceURL);
|
|
178
177
|
flush();
|
|
179
178
|
if (hasLogger) {
|
|
180
179
|
ReactMarker::logTaggedMarker(
|
|
@@ -217,7 +216,7 @@ void JSIExecutor::registerBundle(
|
|
|
217
216
|
"Empty bundle registered with ID " + tag + " from " + bundlePath);
|
|
218
217
|
}
|
|
219
218
|
runtime_->evaluateJavaScript(
|
|
220
|
-
std::
|
|
219
|
+
std::move(script),
|
|
221
220
|
JSExecutor::getSyntheticBundlePath(bundleId, bundlePath));
|
|
222
221
|
}
|
|
223
222
|
ReactMarker::logTaggedMarker(
|
|
@@ -582,46 +581,6 @@ void JSIExecutor::flush() {}
|
|
|
582
581
|
|
|
583
582
|
#endif // RCT_REMOVE_LEGACY_ARCH
|
|
584
583
|
|
|
585
|
-
void bindNativeLogger(Runtime& runtime, Logger logger) {
|
|
586
|
-
runtime.global().setProperty(
|
|
587
|
-
runtime,
|
|
588
|
-
"nativeLoggingHook",
|
|
589
|
-
Function::createFromHostFunction(
|
|
590
|
-
runtime,
|
|
591
|
-
PropNameID::forAscii(runtime, "nativeLoggingHook"),
|
|
592
|
-
2,
|
|
593
|
-
[logger = std::move(logger)](
|
|
594
|
-
jsi::Runtime& runtime,
|
|
595
|
-
const jsi::Value&,
|
|
596
|
-
const jsi::Value* args,
|
|
597
|
-
size_t count) {
|
|
598
|
-
if (count != 2) {
|
|
599
|
-
throw std::invalid_argument(
|
|
600
|
-
"nativeLoggingHook takes 2 arguments");
|
|
601
|
-
}
|
|
602
|
-
logger(
|
|
603
|
-
args[0].asString(runtime).utf8(runtime),
|
|
604
|
-
static_cast<unsigned int>(args[1].asNumber()));
|
|
605
|
-
return Value::undefined();
|
|
606
|
-
}));
|
|
607
|
-
}
|
|
608
|
-
|
|
609
|
-
void bindNativePerformanceNow(Runtime& runtime) {
|
|
610
|
-
runtime.global().setProperty(
|
|
611
|
-
runtime,
|
|
612
|
-
"nativePerformanceNow",
|
|
613
|
-
Function::createFromHostFunction(
|
|
614
|
-
runtime,
|
|
615
|
-
PropNameID::forAscii(runtime, "nativePerformanceNow"),
|
|
616
|
-
0,
|
|
617
|
-
[](jsi::Runtime& runtime,
|
|
618
|
-
const jsi::Value&,
|
|
619
|
-
const jsi::Value* args,
|
|
620
|
-
size_t /*count*/) {
|
|
621
|
-
return HighResTimeStamp::now().toDOMHighResTimeStamp();
|
|
622
|
-
}));
|
|
623
|
-
}
|
|
624
|
-
|
|
625
584
|
} // namespace facebook::react
|
|
626
585
|
|
|
627
586
|
#if _MSC_VER
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h
CHANGED
|
@@ -16,6 +16,11 @@
|
|
|
16
16
|
#include <ReactCommon/CallInvoker.h>
|
|
17
17
|
#include <react/bridging/EventEmitter.h>
|
|
18
18
|
|
|
19
|
+
#if _MSC_VER
|
|
20
|
+
#pragma warning(push)
|
|
21
|
+
#pragma warning(disable : 4996) // deprecated APIs
|
|
22
|
+
#endif
|
|
23
|
+
|
|
19
24
|
namespace facebook::react {
|
|
20
25
|
|
|
21
26
|
/**
|
|
@@ -38,7 +43,6 @@ enum TurboModuleMethodValueKind {
|
|
|
38
43
|
*/
|
|
39
44
|
TurboModuleMethodValueKind getTurboModuleMethodValueKind(jsi::Runtime &rt, const jsi::Value *value);
|
|
40
45
|
|
|
41
|
-
class TurboCxxModule;
|
|
42
46
|
class TurboModuleBinding;
|
|
43
47
|
|
|
44
48
|
/**
|
|
@@ -147,7 +151,13 @@ class JSI_EXPORT TurboModule : public jsi::HostObject {
|
|
|
147
151
|
/**
|
|
148
152
|
* An app/platform-specific provider function to get an instance of a module
|
|
149
153
|
* given a name.
|
|
154
|
+
*
|
|
155
|
+
* @deprecated Use TurboModuleProviderFunctionTypeWithRuntime instead.
|
|
156
|
+
* Remove after React Native 0.84 is released.
|
|
150
157
|
*/
|
|
151
|
-
using TurboModuleProviderFunctionType
|
|
158
|
+
using TurboModuleProviderFunctionType [[deprecated("Use TurboModuleProviderFunctionTypeWithRuntime instead")]] =
|
|
159
|
+
std::function<std::shared_ptr<TurboModule>(const std::string &name)>;
|
|
160
|
+
using TurboModuleProviderFunctionTypeWithRuntime =
|
|
161
|
+
std::function<std::shared_ptr<TurboModule>(jsi::Runtime &runtime, const std::string &name)>;
|
|
152
162
|
|
|
153
163
|
} // namespace facebook::react
|