react-native-tvos 0.72.5-0 → 0.72.6-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/Animated/NativeAnimatedHelper.js +6 -3
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +6 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +2 -1
- package/Libraries/promiseRejectionTrackingOptions.js +21 -7
- package/Libraries/vendor/emitter/EventEmitter.js +3 -1
- package/React/Base/RCTTouchHandlerTV.m +35 -0
- package/React/Base/RCTVersion.m +2 -2
- package/React/Fabric/RCTSurfacePointerHandlerTV.mm +37 -0
- package/React/Fabric/RCTSurfaceTouchHandlerTV.mm +30 -0
- package/React/React-RCTFabric.podspec +5 -1
- package/React/Views/RCTTVView.m +2 -2
- package/React-Core.podspec +4 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.java +5 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java +19 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +22 -6
- package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +4 -0
- package/package.json +5 -5
- package/scripts/cocoapods/utils.rb +17 -11
- package/scripts/codegen/generate-legacy-interop-components.js +8 -2
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/Gemfile +2 -1
- package/template/package.json +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +25 -25
- package/React/Fabric/RCTThirdPartyFabricComponentsProvider.h +0 -29
- package/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm +0 -29
- package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.java +0 -98
- package/ReactCommon/react/renderer/components/rncore/ComponentDescriptors.h +0 -29
- package/ReactCommon/react/renderer/components/rncore/EventEmitters.cpp +0 -111
- package/ReactCommon/react/renderer/components/rncore/EventEmitters.h +0 -186
- package/ReactCommon/react/renderer/components/rncore/Props.cpp +0 -157
- package/ReactCommon/react/renderer/components/rncore/Props.h +0 -395
- package/ReactCommon/react/renderer/components/rncore/RCTComponentViewHelpers.h +0 -257
- package/ReactCommon/react/renderer/components/rncore/ShadowNodes.cpp +0 -26
- package/ReactCommon/react/renderer/components/rncore/ShadowNodes.h +0 -111
- package/ReactCommon/react/renderer/components/rncore/States.cpp +0 -18
- package/ReactCommon/react/renderer/components/rncore/States.h +0 -141
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { View, ScrollViewProps, HostComponent, TVParallaxProperties } from 'react-native';
|
|
3
3
|
|
|
4
4
|
declare module 'react-native' {
|
|
5
5
|
interface ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* TV next focus down (see documentation for the View component).
|
|
8
8
|
*/
|
|
9
|
-
nextFocusDown?: number,
|
|
9
|
+
nextFocusDown?: number | undefined,
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* TV next focus forward (see documentation for the View component).
|
|
13
13
|
*
|
|
14
14
|
* @platform android
|
|
15
15
|
*/
|
|
16
|
-
nextFocusForward?: number,
|
|
16
|
+
nextFocusForward?: number | undefined,
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* TV next focus left (see documentation for the View component).
|
|
20
20
|
*/
|
|
21
|
-
nextFocusLeft?: number,
|
|
21
|
+
nextFocusLeft?: number | undefined,
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* TV next focus right (see documentation for the View component).
|
|
25
25
|
*/
|
|
26
|
-
nextFocusRight?: number,
|
|
26
|
+
nextFocusRight?: number | undefined,
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* TV next focus up (see documentation for the View component).
|
|
30
30
|
*/
|
|
31
|
-
nextFocusUp?: number,
|
|
31
|
+
nextFocusUp?: number | undefined,
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
export interface NativeMethods {
|
|
@@ -48,15 +48,15 @@ declare module 'react-native' {
|
|
|
48
48
|
|
|
49
49
|
export type HWEvent = {
|
|
50
50
|
eventType: 'up' | 'down' | 'right' | 'left' | 'longUp' | 'longDown' | 'longRight' | 'longLeft' | 'blur' | 'focus' | 'pan' | string;
|
|
51
|
-
eventKeyAction?: -1 | 1 | 0 | number;
|
|
52
|
-
tag?: number;
|
|
51
|
+
eventKeyAction?: -1 | 1 | 0 | number | undefined;
|
|
52
|
+
tag?: number | undefined;
|
|
53
53
|
body?: {
|
|
54
|
-
state:
|
|
54
|
+
state: 'Began' | 'Changed' | 'Ended',
|
|
55
55
|
x: number,
|
|
56
56
|
y: number,
|
|
57
57
|
velocityx: number,
|
|
58
58
|
velocityy: number
|
|
59
|
-
}
|
|
59
|
+
} | undefined
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
export class TVEventHandler {
|
|
@@ -72,11 +72,11 @@ declare module 'react-native' {
|
|
|
72
72
|
* If the view should be "visible". display "flex" if visible, otherwise "none".
|
|
73
73
|
* Defaults to true
|
|
74
74
|
*/
|
|
75
|
-
enabled?: boolean;
|
|
75
|
+
enabled?: boolean | undefined;
|
|
76
76
|
/**
|
|
77
77
|
* Array of `Component`s to register as destinations with `UIFocusGuide`
|
|
78
78
|
*/
|
|
79
|
-
destinations?: (null | number | React.Component<any, any> | React.ComponentClass<any>)[];
|
|
79
|
+
destinations?: (null | number | React.Component<any, any> | React.ComponentClass<any>)[] | undefined;
|
|
80
80
|
/**
|
|
81
81
|
* If true, `TVFocusGuide` will automatically manage focus for you.
|
|
82
82
|
* It will redirect the focus to the first focusable child on the first visit.
|
|
@@ -87,27 +87,27 @@ declare module 'react-native' {
|
|
|
87
87
|
*
|
|
88
88
|
* @default false
|
|
89
89
|
*/
|
|
90
|
-
autoFocus?: boolean;
|
|
90
|
+
autoFocus?: boolean | undefined;
|
|
91
91
|
/**
|
|
92
92
|
* Enables focus trapping for the focus guide (see README).
|
|
93
93
|
*/
|
|
94
|
-
trapFocusUp?: boolean;
|
|
94
|
+
trapFocusUp?: boolean | undefined;
|
|
95
95
|
/**
|
|
96
96
|
* Enables focus trapping for the focus guide (see README).
|
|
97
97
|
*/
|
|
98
|
-
trapFocusDown?: boolean;
|
|
98
|
+
trapFocusDown?: boolean | undefined;
|
|
99
99
|
/**
|
|
100
100
|
* Enables focus trapping for the focus guide (see README).
|
|
101
101
|
*/
|
|
102
|
-
trapFocusLeft?: boolean;
|
|
102
|
+
trapFocusLeft?: boolean | undefined;
|
|
103
103
|
/**
|
|
104
104
|
* Enables focus trapping for the focus guide (see README).
|
|
105
105
|
*/
|
|
106
|
-
trapFocusRight?: boolean;
|
|
106
|
+
trapFocusRight?: boolean | undefined;
|
|
107
107
|
/**
|
|
108
108
|
* @deprecated Don't use it, no longer necessary.
|
|
109
109
|
*/
|
|
110
|
-
safePadding?: 'both' | 'vertical' | 'horizontal' | null;
|
|
110
|
+
safePadding?: 'both' | 'vertical' | 'horizontal' | null | undefined;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
export type FocusGuideMethods = {
|
|
@@ -129,25 +129,25 @@ declare module 'react-native' {
|
|
|
129
129
|
* The duration of the scroll animation when a swipe is detected.
|
|
130
130
|
* Default value is 0.3 s
|
|
131
131
|
*/
|
|
132
|
-
scrollDuration?: number;
|
|
132
|
+
scrollDuration?: number | undefined;
|
|
133
133
|
/**
|
|
134
134
|
* Scrolling distance when a swipe is detected
|
|
135
135
|
* Default value is half the visible height (vertical scroller)
|
|
136
136
|
* or width (horizontal scroller)
|
|
137
137
|
*/
|
|
138
|
-
pageSize?: number;
|
|
138
|
+
pageSize?: number | undefined;
|
|
139
139
|
/**
|
|
140
140
|
* If true, will scroll to start when focus moves out past the beginning
|
|
141
141
|
* of the scroller
|
|
142
142
|
* Defaults to true
|
|
143
143
|
*/
|
|
144
|
-
snapToStart?: boolean;
|
|
144
|
+
snapToStart?: boolean | undefined;
|
|
145
145
|
/**
|
|
146
146
|
* If true, will scroll to end when focus moves out past the end of the
|
|
147
147
|
* scroller
|
|
148
148
|
* Defaults to true
|
|
149
149
|
*/
|
|
150
|
-
snapToEnd?: boolean;
|
|
150
|
+
snapToEnd?: boolean | undefined;
|
|
151
151
|
/**
|
|
152
152
|
* Called when the scroller comes into focus (e.g. for highlighting)
|
|
153
153
|
*/
|
|
@@ -170,7 +170,7 @@ declare module 'react-native' {
|
|
|
170
170
|
*
|
|
171
171
|
* @platform ios
|
|
172
172
|
*/
|
|
173
|
-
hasTVPreferredFocus?: boolean;
|
|
173
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
174
174
|
|
|
175
175
|
/**
|
|
176
176
|
* *(Apple TV only)* Object with properties to control Apple TV parallax effects.
|
|
@@ -186,7 +186,7 @@ declare module 'react-native' {
|
|
|
186
186
|
*
|
|
187
187
|
* @platform ios
|
|
188
188
|
*/
|
|
189
|
-
tvParallaxProperties?: TVParallaxProperties;
|
|
189
|
+
tvParallaxProperties?: TVParallaxProperties | undefined;
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by GenerateRCTThirdPartyFabricComponentsProviderH
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma GCC diagnostic push
|
|
12
|
-
#pragma GCC diagnostic ignored "-Wreturn-type-c-linkage"
|
|
13
|
-
|
|
14
|
-
#import <React/RCTComponentViewProtocol.h>
|
|
15
|
-
|
|
16
|
-
#ifdef __cplusplus
|
|
17
|
-
extern "C" {
|
|
18
|
-
#endif
|
|
19
|
-
|
|
20
|
-
Class<RCTComponentViewProtocol> RCTThirdPartyFabricComponentsProvider(const char *name);
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
#ifdef __cplusplus
|
|
25
|
-
}
|
|
26
|
-
#endif
|
|
27
|
-
|
|
28
|
-
#pragma GCC diagnostic pop
|
|
29
|
-
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by GenerateRCTThirdPartyFabricComponentsProviderCpp
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
// OSS-compatibility layer
|
|
12
|
-
|
|
13
|
-
#import "RCTThirdPartyFabricComponentsProvider.h"
|
|
14
|
-
|
|
15
|
-
#import <string>
|
|
16
|
-
#import <unordered_map>
|
|
17
|
-
|
|
18
|
-
Class<RCTComponentViewProtocol> RCTThirdPartyFabricComponentsProvider(const char *name) {
|
|
19
|
-
static std::unordered_map<std::string, Class (*)(void)> sFabricComponentsClassMap = {
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
auto p = sFabricComponentsClassMap.find(name);
|
|
24
|
-
if (p != sFabricComponentsClassMap.end()) {
|
|
25
|
-
auto classFunc = p->second;
|
|
26
|
-
return classFunc();
|
|
27
|
-
}
|
|
28
|
-
return nil;
|
|
29
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
package com.facebook.react;
|
|
9
|
-
|
|
10
|
-
import android.view.KeyEvent;
|
|
11
|
-
import android.view.View;
|
|
12
|
-
import com.facebook.react.bridge.WritableMap;
|
|
13
|
-
import com.facebook.react.bridge.WritableNativeMap;
|
|
14
|
-
import com.facebook.react.common.MapBuilder;
|
|
15
|
-
import java.util.Map;
|
|
16
|
-
|
|
17
|
-
/** Responsible for dispatching events specific for hardware inputs. */
|
|
18
|
-
public class ReactAndroidHWInputDeviceHelper {
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Contains a mapping between handled KeyEvents and the corresponding navigation event that should
|
|
22
|
-
* be fired when the KeyEvent is received.
|
|
23
|
-
*/
|
|
24
|
-
private static final Map<Integer, String> KEY_EVENTS_ACTIONS =
|
|
25
|
-
MapBuilder.<Integer, String>builder()
|
|
26
|
-
.put(KeyEvent.KEYCODE_DPAD_CENTER, "select")
|
|
27
|
-
.put(KeyEvent.KEYCODE_ENTER, "select")
|
|
28
|
-
.put(KeyEvent.KEYCODE_SPACE, "select")
|
|
29
|
-
.put(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE, "playPause")
|
|
30
|
-
.put(KeyEvent.KEYCODE_MEDIA_REWIND, "rewind")
|
|
31
|
-
.put(KeyEvent.KEYCODE_MEDIA_FAST_FORWARD, "fastForward")
|
|
32
|
-
.put(KeyEvent.KEYCODE_MEDIA_STOP, "stop")
|
|
33
|
-
.put(KeyEvent.KEYCODE_MEDIA_NEXT, "next")
|
|
34
|
-
.put(KeyEvent.KEYCODE_MEDIA_PREVIOUS, "previous")
|
|
35
|
-
.put(KeyEvent.KEYCODE_DPAD_UP, "up")
|
|
36
|
-
.put(KeyEvent.KEYCODE_DPAD_RIGHT, "right")
|
|
37
|
-
.put(KeyEvent.KEYCODE_DPAD_DOWN, "down")
|
|
38
|
-
.put(KeyEvent.KEYCODE_DPAD_LEFT, "left")
|
|
39
|
-
.put(KeyEvent.KEYCODE_INFO, "info")
|
|
40
|
-
.put(KeyEvent.KEYCODE_MENU, "menu")
|
|
41
|
-
.build();
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* We keep a reference to the last focused view id so that we can send it as a target for key
|
|
45
|
-
* events and be able to send a blur event when focus changes.
|
|
46
|
-
*/
|
|
47
|
-
private int mLastFocusedViewId = View.NO_ID;
|
|
48
|
-
|
|
49
|
-
private final ReactRootView mReactRootView;
|
|
50
|
-
|
|
51
|
-
ReactAndroidHWInputDeviceHelper(ReactRootView mReactRootView) {
|
|
52
|
-
this.mReactRootView = mReactRootView;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Called from {@link ReactRootView}. This is the main place the key events are handled. */
|
|
56
|
-
public void handleKeyEvent(KeyEvent ev) {
|
|
57
|
-
int eventKeyCode = ev.getKeyCode();
|
|
58
|
-
int eventKeyAction = ev.getAction();
|
|
59
|
-
if ((eventKeyAction == KeyEvent.ACTION_UP || eventKeyAction == KeyEvent.ACTION_DOWN)
|
|
60
|
-
&& KEY_EVENTS_ACTIONS.containsKey(eventKeyCode)) {
|
|
61
|
-
dispatchEvent(KEY_EVENTS_ACTIONS.get(eventKeyCode), mLastFocusedViewId, eventKeyAction);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/** Called from {@link ReactRootView} when focused view changes. */
|
|
66
|
-
public void onFocusChanged(View newFocusedView) {
|
|
67
|
-
if (mLastFocusedViewId == newFocusedView.getId()) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (mLastFocusedViewId != View.NO_ID) {
|
|
71
|
-
dispatchEvent("blur", mLastFocusedViewId);
|
|
72
|
-
}
|
|
73
|
-
mLastFocusedViewId = newFocusedView.getId();
|
|
74
|
-
dispatchEvent("focus", newFocusedView.getId());
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
/** Called from {@link ReactRootView} when the whole view hierarchy looses focus. */
|
|
78
|
-
public void clearFocus() {
|
|
79
|
-
if (mLastFocusedViewId != View.NO_ID) {
|
|
80
|
-
dispatchEvent("blur", mLastFocusedViewId);
|
|
81
|
-
}
|
|
82
|
-
mLastFocusedViewId = View.NO_ID;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private void dispatchEvent(String eventType, int targetViewId) {
|
|
86
|
-
dispatchEvent(eventType, targetViewId, -1);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
private void dispatchEvent(String eventType, int targetViewId, int eventKeyAction) {
|
|
90
|
-
WritableMap event = new WritableNativeMap();
|
|
91
|
-
event.putString("eventType", eventType);
|
|
92
|
-
event.putInt("eventKeyAction", eventKeyAction);
|
|
93
|
-
if (targetViewId != View.NO_ID) {
|
|
94
|
-
event.putInt("tag", targetViewId);
|
|
95
|
-
}
|
|
96
|
-
mReactRootView.sendEvent("onHWKeyEvent", event);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#pragma once
|
|
12
|
-
|
|
13
|
-
#include <react/renderer/components/rncore/ShadowNodes.h>
|
|
14
|
-
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
-
|
|
16
|
-
namespace facebook {
|
|
17
|
-
namespace react {
|
|
18
|
-
|
|
19
|
-
using AndroidHorizontalScrollContentViewComponentDescriptor = ConcreteComponentDescriptor<AndroidHorizontalScrollContentViewShadowNode>;
|
|
20
|
-
using AndroidSwipeRefreshLayoutComponentDescriptor = ConcreteComponentDescriptor<AndroidSwipeRefreshLayoutShadowNode>;
|
|
21
|
-
using PullToRefreshViewComponentDescriptor = ConcreteComponentDescriptor<PullToRefreshViewShadowNode>;
|
|
22
|
-
using AndroidDrawerLayoutComponentDescriptor = ConcreteComponentDescriptor<AndroidDrawerLayoutShadowNode>;
|
|
23
|
-
using ActivityIndicatorViewComponentDescriptor = ConcreteComponentDescriptor<ActivityIndicatorViewShadowNode>;
|
|
24
|
-
using UnimplementedNativeViewComponentDescriptor = ConcreteComponentDescriptor<UnimplementedNativeViewShadowNode>;
|
|
25
|
-
using SwitchComponentDescriptor = ConcreteComponentDescriptor<SwitchShadowNode>;
|
|
26
|
-
using TraceUpdateOverlayComponentDescriptor = ConcreteComponentDescriptor<TraceUpdateOverlayShadowNode>;
|
|
27
|
-
|
|
28
|
-
} // namespace react
|
|
29
|
-
} // namespace facebook
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
#include <react/renderer/components/rncore/EventEmitters.h>
|
|
12
|
-
|
|
13
|
-
namespace facebook {
|
|
14
|
-
namespace react {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
void AndroidSwipeRefreshLayoutEventEmitter::onRefresh(OnRefresh event) const {
|
|
20
|
-
dispatchEvent("refresh", [](jsi::Runtime &runtime) {
|
|
21
|
-
auto payload = jsi::Object(runtime);
|
|
22
|
-
|
|
23
|
-
return payload;
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
void PullToRefreshViewEventEmitter::onRefresh(OnRefresh event) const {
|
|
27
|
-
dispatchEvent("refresh", [](jsi::Runtime &runtime) {
|
|
28
|
-
auto payload = jsi::Object(runtime);
|
|
29
|
-
|
|
30
|
-
return payload;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
void AndroidDrawerLayoutEventEmitter::onDrawerSlide(OnDrawerSlide event) const {
|
|
35
|
-
dispatchEvent("drawerSlide", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
36
|
-
auto payload = jsi::Object(runtime);
|
|
37
|
-
payload.setProperty(runtime, "offset", event.offset);
|
|
38
|
-
return payload;
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
void AndroidDrawerLayoutEventEmitter::onDrawerStateChanged(OnDrawerStateChanged event) const {
|
|
42
|
-
dispatchEvent("drawerStateChanged", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
43
|
-
auto payload = jsi::Object(runtime);
|
|
44
|
-
payload.setProperty(runtime, "drawerState", event.drawerState);
|
|
45
|
-
return payload;
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
void AndroidDrawerLayoutEventEmitter::onDrawerOpen(OnDrawerOpen event) const {
|
|
49
|
-
dispatchEvent("drawerOpen", [](jsi::Runtime &runtime) {
|
|
50
|
-
auto payload = jsi::Object(runtime);
|
|
51
|
-
|
|
52
|
-
return payload;
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
void AndroidDrawerLayoutEventEmitter::onDrawerClose(OnDrawerClose event) const {
|
|
56
|
-
dispatchEvent("drawerClose", [](jsi::Runtime &runtime) {
|
|
57
|
-
auto payload = jsi::Object(runtime);
|
|
58
|
-
|
|
59
|
-
return payload;
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
void SwitchEventEmitter::onChange(OnChange event) const {
|
|
65
|
-
dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
66
|
-
auto payload = jsi::Object(runtime);
|
|
67
|
-
payload.setProperty(runtime, "value", event.value);
|
|
68
|
-
payload.setProperty(runtime, "target", event.target);
|
|
69
|
-
return payload;
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
void AndroidSwitchEventEmitter::onChange(OnChange event) const {
|
|
73
|
-
dispatchEvent("change", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
74
|
-
auto payload = jsi::Object(runtime);
|
|
75
|
-
payload.setProperty(runtime, "value", event.value);
|
|
76
|
-
payload.setProperty(runtime, "target", event.target);
|
|
77
|
-
return payload;
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
void ModalHostViewEventEmitter::onRequestClose(OnRequestClose event) const {
|
|
82
|
-
dispatchEvent("requestClose", [](jsi::Runtime &runtime) {
|
|
83
|
-
auto payload = jsi::Object(runtime);
|
|
84
|
-
|
|
85
|
-
return payload;
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
void ModalHostViewEventEmitter::onShow(OnShow event) const {
|
|
89
|
-
dispatchEvent("show", [](jsi::Runtime &runtime) {
|
|
90
|
-
auto payload = jsi::Object(runtime);
|
|
91
|
-
|
|
92
|
-
return payload;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
void ModalHostViewEventEmitter::onDismiss(OnDismiss event) const {
|
|
96
|
-
dispatchEvent("dismiss", [](jsi::Runtime &runtime) {
|
|
97
|
-
auto payload = jsi::Object(runtime);
|
|
98
|
-
|
|
99
|
-
return payload;
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
void ModalHostViewEventEmitter::onOrientationChange(OnOrientationChange event) const {
|
|
103
|
-
dispatchEvent("orientationChange", [event=std::move(event)](jsi::Runtime &runtime) {
|
|
104
|
-
auto payload = jsi::Object(runtime);
|
|
105
|
-
payload.setProperty(runtime, "orientation", toString(event.orientation));
|
|
106
|
-
return payload;
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
} // namespace react
|
|
111
|
-
} // namespace facebook
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
-
*
|
|
5
|
-
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
-
* once the code is regenerated.
|
|
7
|
-
*
|
|
8
|
-
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
-
*/
|
|
10
|
-
#pragma once
|
|
11
|
-
|
|
12
|
-
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
-
#include <jsi/jsi.h>
|
|
14
|
-
|
|
15
|
-
namespace facebook {
|
|
16
|
-
namespace react {
|
|
17
|
-
|
|
18
|
-
class JSI_EXPORT SafeAreaViewEventEmitter : public ViewEventEmitter {
|
|
19
|
-
public:
|
|
20
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
class JSI_EXPORT AndroidHorizontalScrollContentViewEventEmitter : public ViewEventEmitter {
|
|
27
|
-
public:
|
|
28
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
class JSI_EXPORT AndroidProgressBarEventEmitter : public ViewEventEmitter {
|
|
35
|
-
public:
|
|
36
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
};
|
|
42
|
-
class JSI_EXPORT AndroidSwipeRefreshLayoutEventEmitter : public ViewEventEmitter {
|
|
43
|
-
public:
|
|
44
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
45
|
-
|
|
46
|
-
struct OnRefresh {
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
void onRefresh(OnRefresh value) const;
|
|
51
|
-
};
|
|
52
|
-
class JSI_EXPORT PullToRefreshViewEventEmitter : public ViewEventEmitter {
|
|
53
|
-
public:
|
|
54
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
55
|
-
|
|
56
|
-
struct OnRefresh {
|
|
57
|
-
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
void onRefresh(OnRefresh value) const;
|
|
61
|
-
};
|
|
62
|
-
class JSI_EXPORT InputAccessoryEventEmitter : public ViewEventEmitter {
|
|
63
|
-
public:
|
|
64
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
class JSI_EXPORT AndroidDrawerLayoutEventEmitter : public ViewEventEmitter {
|
|
71
|
-
public:
|
|
72
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
73
|
-
|
|
74
|
-
struct OnDrawerSlide {
|
|
75
|
-
Float offset;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
struct OnDrawerStateChanged {
|
|
79
|
-
int drawerState;
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
struct OnDrawerOpen {
|
|
83
|
-
|
|
84
|
-
};
|
|
85
|
-
|
|
86
|
-
struct OnDrawerClose {
|
|
87
|
-
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
void onDrawerSlide(OnDrawerSlide value) const;
|
|
91
|
-
|
|
92
|
-
void onDrawerStateChanged(OnDrawerStateChanged value) const;
|
|
93
|
-
|
|
94
|
-
void onDrawerOpen(OnDrawerOpen value) const;
|
|
95
|
-
|
|
96
|
-
void onDrawerClose(OnDrawerClose value) const;
|
|
97
|
-
};
|
|
98
|
-
class JSI_EXPORT ActivityIndicatorViewEventEmitter : public ViewEventEmitter {
|
|
99
|
-
public:
|
|
100
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
};
|
|
106
|
-
class JSI_EXPORT UnimplementedNativeViewEventEmitter : public ViewEventEmitter {
|
|
107
|
-
public:
|
|
108
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
};
|
|
114
|
-
class JSI_EXPORT SwitchEventEmitter : public ViewEventEmitter {
|
|
115
|
-
public:
|
|
116
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
117
|
-
|
|
118
|
-
struct OnChange {
|
|
119
|
-
bool value;
|
|
120
|
-
int target;
|
|
121
|
-
};
|
|
122
|
-
|
|
123
|
-
void onChange(OnChange value) const;
|
|
124
|
-
};
|
|
125
|
-
class JSI_EXPORT AndroidSwitchEventEmitter : public ViewEventEmitter {
|
|
126
|
-
public:
|
|
127
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
128
|
-
|
|
129
|
-
struct OnChange {
|
|
130
|
-
bool value;
|
|
131
|
-
int target;
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
void onChange(OnChange value) const;
|
|
135
|
-
};
|
|
136
|
-
class JSI_EXPORT TraceUpdateOverlayEventEmitter : public ViewEventEmitter {
|
|
137
|
-
public:
|
|
138
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
};
|
|
144
|
-
class JSI_EXPORT ModalHostViewEventEmitter : public ViewEventEmitter {
|
|
145
|
-
public:
|
|
146
|
-
using ViewEventEmitter::ViewEventEmitter;
|
|
147
|
-
|
|
148
|
-
struct OnRequestClose {
|
|
149
|
-
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
struct OnShow {
|
|
153
|
-
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
struct OnDismiss {
|
|
157
|
-
|
|
158
|
-
};
|
|
159
|
-
|
|
160
|
-
enum class OnOrientationChangeOrientation {
|
|
161
|
-
Portrait,
|
|
162
|
-
Landscape
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
static char const *toString(const OnOrientationChangeOrientation value) {
|
|
166
|
-
switch (value) {
|
|
167
|
-
case OnOrientationChangeOrientation::Portrait: return "portrait";
|
|
168
|
-
case OnOrientationChangeOrientation::Landscape: return "landscape";
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
struct OnOrientationChange {
|
|
173
|
-
OnOrientationChangeOrientation orientation;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
void onRequestClose(OnRequestClose value) const;
|
|
177
|
-
|
|
178
|
-
void onShow(OnShow value) const;
|
|
179
|
-
|
|
180
|
-
void onDismiss(OnDismiss value) const;
|
|
181
|
-
|
|
182
|
-
void onOrientationChange(OnOrientationChange value) const;
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
} // namespace react
|
|
186
|
-
} // namespace facebook
|