Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
d8af579
Upgrade dependency Metro bundler to v0.60.0
Jul 1, 2020
df6d2c5
Daily `arc lint --take GOOGLEJAVAFORMAT`
Jul 1, 2020
a36d9cd
Deploy 0.128 to xplat/js
jbrown215 Jul 1, 2020
c6b9cc3
Document early ViewCommand dispatch, since it is no longer gated
JoshuaGross Jul 2, 2020
7d8aeb4
do not call setHyphenationFrequency on AndroidSdk < 23 (#29258)
fabOnReact Jul 2, 2020
9a72702
Fabric: On-demand view mounting for <ScrollView>
shergin Jul 2, 2020
e223f2c
Fabric: Gating for on-demand view mounting in ScrollView
shergin Jul 2, 2020
8320ad3
Fabric: Using `overflowInset` in on-demain view mounting in <ScrollView>
shergin Jul 2, 2020
f23fece
Fix font variant crash on Android < 4.4 (#29176)
Almouro Jul 2, 2020
26d8d41
Fabric: More asserts in iOS mounting infra
shergin Jul 2, 2020
3c69a9e
Fabric: `display: none` nodes do not create views anymore
shergin Jul 2, 2020
4776ebd
Fabric: A demo in RNTester for `display: none`
shergin Jul 2, 2020
e255748
Codegen: Enable generation of ObjC FBReactNativeSpec with CocoaPods
hramos Jul 2, 2020
7e7706c
Codegen: Generate ObjC structs for type aliases
hramos Jul 2, 2020
e559aee
bump gradle to 6.5 (#29043)
dulmandakh Jul 2, 2020
e881b24
Remove JSDeltaBundleClient
cpojer Jul 2, 2020
ffa0725
Build the framework for RCTParagraphComponentAccessibilityProvider
ZHUANGPP Jul 2, 2020
40f37b9
Temporarily disable support for transformations in findNodeAtPoint in…
sammy-SC Jul 2, 2020
8fb1bb8
Add accessibilityRole to TextAttributes
ZHUANGPP Jul 2, 2020
c4de0c7
Move ART out of OSS
mdvacca Jul 2, 2020
6d6c68c
"The Metro Server" -> Metro
cpojer Jul 2, 2020
b2c775c
Small cleanup of package.json
cpojer Jul 3, 2020
42c8dea
Restore contentOffset from state if necesarry
sammy-SC Jul 3, 2020
4716d22
Fabric: Fixes in computing visible frame in `RCTScrollViewComponentView`
shergin Jul 4, 2020
8a14b98
Don't call config->setLogger(nullptr) directly to avoid having no log…
amir-shalem Jul 6, 2020
3d88249
Check whether packager is running in RCTBundleURLProvider for saved J…
jimmy623 Jul 6, 2020
10a800d
Complete the basic RCTParagraphComponentAccessibilityProvider
ZHUANGPP Jul 6, 2020
96708d5
Add getRectWithAttributedString() to RCTTextLayoutManager
ZHUANGPP Jul 6, 2020
c4c6204
Add accessibilityRole to RCTAttributedTextUtils
ZHUANGPP Jul 6, 2020
ac0f4b4
Add additional accessibilityElements for embedded links
ZHUANGPP Jul 6, 2020
824d3a9
Move iOS CameraRoll files into FB internal
seanyusa Jul 7, 2020
e23e932
Fabric: Geometry.h is spit to several separate files
shergin Jul 7, 2020
f2fdc1a
Fabric: Simplifying RCTPerformMountInstructions
shergin Jul 7, 2020
8c42c01
Fix debugging on android for 0.63 (#29204)
devon94 Jul 7, 2020
90287ca
Make ShadowTreeRegistry `remove` API safer
JoshuaGross Jul 7, 2020
5c24746
Correct JSRequireEnding marker start in RCTModuleData gatherConstants
RSNara Jul 7, 2020
103c863
Eagerly initialize TurboModules before executing JS bundle
RSNara Jul 7, 2020
a27c295
Rename RCTTurboModuleLookupDelegate to RCTTurboModuleRegistry
RSNara Jul 7, 2020
e96f1e1
Refactor: Attach TurboModuleRegistry to bridge in FBReactModule
RSNara Jul 7, 2020
cfa4260
Add support for shadowColor on Android (API >= 28) (#28650)
IjzerenHein Jul 8, 2020
e206e34
Add a warning if TurboModule init uses dispatch_sync for main queue
RSNara Jul 8, 2020
a5151c2
Deploy 0.129 to xplat/js
jbrown215 Jul 8, 2020
ffa3d7f
Build macOS framework and add CocoaPods podspec (#285)
alloy Jul 9, 2020
f28c750
Fix LogBox.ignoreAllLogs used with no argument (#29310)
rickhanlonii Jul 9, 2020
1930039
Move CameraRoll Android files to FB Internal
SantiagoMunoz Jul 9, 2020
ae19394
RN: Remove `fbjs/{keyMirror,keyOf}` Dependencies
yungsters Jul 9, 2020
caf0109
RN: Remove `fbjs/performanceNow` Dependency
yungsters Jul 9, 2020
e549f69
Gate TurboModule eager initialization
RSNara Jul 9, 2020
3503d72
Fix race between teardown and PreAllocateView/CreateView MountItem cr…
JoshuaGross Jul 10, 2020
d5bc0a7
Fix inconsistency on AndroidTextInput view configs
mdvacca Jul 10, 2020
34ff9b7
Add view hierarchy drawings to tests
sammy-SC Jul 10, 2020
120ff7c
Disable Detox tests on Circle CI (#29329)
hramos Jul 10, 2020
ac87e90
Update React Hooks rule
gaearon Jul 10, 2020
8e6e83b
Switch to react-shallow-renderer
rickhanlonii Jul 10, 2020
95d05fc
NativeAnimatedModule: subscribe to Fabric lifecycle events in more cases
JoshuaGross Jul 11, 2020
80f1341
Expose `resolveCustomDirectEventName` from UIManager interface
JoshuaGross Jul 11, 2020
7bf56e1
NativeAnimatedModule: don't restore default values when disconnected …
JoshuaGross Jul 11, 2020
46d6e7f
NativeAnimatedModule: animations should still run if there isn't a Fa…
JoshuaGross Jul 11, 2020
c0dd11e
Introduce JNativeModulePerfLogger
RSNara Jul 11, 2020
41d948c
Introduce TurboModulePerfLogger Java class
RSNara Jul 11, 2020
ec18e35
Instrument events emitted by TurboModuleManager
RSNara Jul 11, 2020
320398a
Test fixes related to changes in Jest's Fake Timer behavior (#29011)
makitake2013 Jul 12, 2020
f898bb6
Fix alert screen crash in android in RNTester app (#29150)
anku255 Jul 13, 2020
0060b5d
Introducing LayoutableShadownode::getContentOriginOffset and use it i…
sammy-SC Jul 13, 2020
4a97791
Fix eslint-plugin README.md (#29337)
vpicone Jul 14, 2020
1c634a9
move Hermes badge from template to NewAppScreen library (#28783)
Simek Jul 14, 2020
e5a8f42
fix StatusBar showHideTransition flow type issue (#29034)
Simek Jul 14, 2020
fd660fd
Add `importantForAccessibility` to `AccessibilityProps` and wire with…
ZHUANGPP Jul 14, 2020
8c602e2
Solve truncation attributed string case
ZHUANGPP Jul 14, 2020
550c66e
Change accessibilityRole to an enum
ZHUANGPP Jul 14, 2020
4320359
Reword the guide words
ZHUANGPP Jul 14, 2020
7694b32
Exclude okhttp from flipper dependency (#29260)
Shywim Jul 14, 2020
9f3b608
Only show deadlock warning when TM eager init is on
RSNara Jul 14, 2020
a71f37b
Fix error message for DebugCorePackage.getModule IllegalArgumentExc… …
Jul 14, 2020
d3fb036
Using `YGPositionTypeAbsolute` value where we compare `absolute` vs `…
shergin Jul 14, 2020
c0e7e1b
Back out "Introducing LayoutableShadownode::getContentOriginOffset an…
JoshuaGross Jul 15, 2020
61cd596
Remove unused dependency
mdvacca Jul 15, 2020
7485e93
Back out "Change accessibilityRole to an enum"
ZHUANGPP Jul 15, 2020
9b8ffee
Fix the redbox when running Metro with Venice enabled.
luluwu2032 Jul 15, 2020
45954ac
keyboardDidHide wrong screenY coordinates with windowTranslucentStatu…
fabOnReact Jul 15, 2020
a7818dd
Format react-native-codegen/DEFS.bzl (#29372)
Jul 15, 2020
db365b8
Fix the accessibilityRole crash by updating values in the enum
ZHUANGPP Jul 15, 2020
d61a8b7
Pressable Views should not be flattened
JoshuaGross Jul 16, 2020
fc285f2
Add support for bridgeless mode to UIManagerHelper.getUIManager()
Jul 16, 2020
11990c5
NativeAnimatedModule: ensure that all operations execute in order whe…
JoshuaGross Jul 16, 2020
242c3c8
Fabric: Introducing `SurfaceTelemetry`
shergin Jul 16, 2020
35f2cd2
Fabric: Introducing `TelemetryController` as part of `MountingManager`
shergin Jul 16, 2020
9f699ae
Fabric: Using TelemetryController in RCTMountingManager on iOS
shergin Jul 16, 2020
6ffb983
Minor fix in Hermes Inspector cli tool help message
Jul 16, 2020
5ac524b
Add a condition to exclude accessibilityRole that not currently used
ZHUANGPP Jul 16, 2020
e12cf7d
Add bridgeless check so that we notify listeners if activity is alrea…
Jul 16, 2020
e629e94
Update Android build tools to 29.0.3 (#29350)
friederbluemle Jul 16, 2020
de09439
Update InitialLifeCycleState used when initializing RN in FB4A
mdvacca Jul 16, 2020
3d1e127
Refactor destruction of ReactInstanceManager during Memory Pressure i…
mdvacca Jul 16, 2020
3137c44
Use more inclusive language in Animated
Jul 16, 2020
15dda0a
Fix multiline TextInput crash when inserting/removing lots of text (#…
tido64 Jul 17, 2020
980900c
Workaround for NativeAnimatedModule queue race condition
JoshuaGross Jul 17, 2020
ee8a0cf
Fix ConcurrentModificationException while registering events
mdvacca Jul 17, 2020
f00795d
Prevent NPE in measure during measure/teardown race
JoshuaGross Jul 17, 2020
c30a62d
Merge commit 'e23e9328aa164d0a70fe4f16042c982e7801d924' into amgleitm…
amgleitman Aug 25, 2021
dcc19c9
Merge commit '5c24746a4837b785fa18831a3740a3a5bdd1f304' into amgleitm…
amgleitman Aug 26, 2021
46dbb8e
Merge commit 'a27c295f5338cd7f68a6601b928f109574b91dc7' into amgleitm…
amgleitman Aug 26, 2021
0105e0e
Merge commit 'e96f1e1d830d20f88f020afa9a34a8f3b710b30e' into amgleitm…
amgleitman Aug 27, 2021
f6122d7
Fix RNTester TurboModules loading (#29538)
amgleitman Aug 27, 2021
07fa0d3
Call -[RCTBridge setRCTTurboModuleRegistry:] in RNTester-macOS
amgleitman Aug 27, 2021
ea581e6
Merge commit 'f00795dc90d05180014eeea4b3215b0166a90692' into amgleitm…
amgleitman Aug 27, 2021
1b425ac
Fix Android patch files
amgleitman Aug 30, 2021
defd1a9
Bring back macOS _blurOnSubmit check for -[RCTBaseTextInputView textI…
amgleitman Aug 30, 2021
5215906
nit: fix spacing in -[RCTBaseTextInputView textInputShouldReturn]
amgleitman Aug 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/Dockerfiles/scripts/run-ci-e2e-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ function e2e_suite() {
return 1
fi

echo "Starting packager server"
echo "Starting Metro"
npm start >> /dev/null &
SERVER_PID=$!
sleep 15
Expand Down
34 changes: 17 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ commands:
description: Homebrew package to install
type: string
steps:
- run:
- run:
name: "Brew: Install << parameters.package >>"
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install << parameters.package >> >/dev/null

Expand Down Expand Up @@ -410,7 +410,7 @@ jobs:
name: Fetch CocoaPods Specs
command: |
curl https://cocoapods-specs.circleci.com/fetch-cocoapods-repo-from-s3.sh | bash -s cf
- run:
- run:
name: Setup the CocoaPods environment
command: pod setup

Expand All @@ -429,7 +429,7 @@ jobs:
- when:
condition: << parameters.run_unit_tests >>
steps:
- run:
- run:
name: "Run Tests: iOS Unit and Integration Tests"
command: yarn test-ios
# Runs iOS Detox e2e tests
Expand Down Expand Up @@ -473,7 +473,7 @@ jobs:
parameters:
run_disabled_tests:
type: boolean
default: false
default: false
steps:
- restore_cache_checkout:
checkout_type: android
Expand Down Expand Up @@ -606,7 +606,7 @@ jobs:
- ANDROID_HOME: "C:\\Android\\android-sdk"
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\19.2.5345600"
- ANDROID_BUILD_VERSION: 28
- ANDROID_TOOLS_VERSION: 29.0.2
- ANDROID_TOOLS_VERSION: 29.0.3
- GRADLE_OPTS: -Dorg.gradle.daemon=false
- NDK_VERSION: 19.2.5345600
steps:
Expand Down Expand Up @@ -783,18 +783,18 @@ workflows:
run_unit_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_detox
run_disabled_tests: false
run_detox_tests: true
requires:
- setup_ios
- test_ios:
name: test_ios_detox_frameworks
use_frameworks: true
run_detox_tests: true
requires:
- setup_ios
# - test_ios:
# name: test_ios_detox
# run_disabled_tests: false
# run_detox_tests: true
# requires:
# - setup_ios
# - test_ios:
# name: test_ios_detox_frameworks
# use_frameworks: true
# run_detox_tests: true
# requires:
# - setup_ios
- test_js:
name: test_js_prev_lts
executor: nodeprevlts
Expand Down
6 changes: 3 additions & 3 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.well_formed_exports=true
experimental.types_first=true
well_formed_exports=true
types_first=true
experimental.abstract_locations=true

[lints]
Expand All @@ -86,4 +86,4 @@ untyped-import
untyped-type-import

[version]
^0.127.0
^0.129.0
6 changes: 3 additions & 3 deletions .flowconfig.android
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.well_formed_exports=true
experimental.types_first=true
well_formed_exports=true
types_first=true
experimental.abstract_locations=true

[lints]
Expand All @@ -89,4 +89,4 @@ untyped-import
untyped-type-import

[version]
^0.127.0
^0.129.0
6 changes: 3 additions & 3 deletions .flowconfig.macos
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_type=$FlowFixMeEmpty

experimental.well_formed_exports=true
experimental.types_first=true
well_formed_exports=true
types_first=true
experimental.abstract_locations=true

[lints]
Expand All @@ -85,4 +85,4 @@ untyped-import
untyped-type-import

[version]
^0.127.0
^0.129.0
12 changes: 6 additions & 6 deletions Libraries/Animated/src/NativeAnimatedHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ const API = {
* In general native animated implementation should support any numeric property that doesn't need
* to be updated through the shadow view hierarchy (all non-layout properties).
*/
const STYLES_WHITELIST = {
const SUPPORTED_STYLES = {
opacity: true,
transform: true,
borderRadius: true,
Expand All @@ -192,7 +192,7 @@ const STYLES_WHITELIST = {
translateY: true,
};

const TRANSFORM_WHITELIST = {
const SUPPORTED_TRANSFORMS = {
translateX: true,
translateY: true,
scale: true,
Expand All @@ -214,11 +214,11 @@ const SUPPORTED_INTERPOLATION_PARAMS = {
};

function addWhitelistedStyleProp(prop: string): void {
STYLES_WHITELIST[prop] = true;
SUPPORTED_STYLES[prop] = true;
}

function addWhitelistedTransformProp(prop: string): void {
TRANSFORM_WHITELIST[prop] = true;
SUPPORTED_TRANSFORMS[prop] = true;
}

function addWhitelistedInterpolationParam(param: string): void {
Expand All @@ -242,7 +242,7 @@ function validateTransform(
>,
): void {
configs.forEach(config => {
if (!TRANSFORM_WHITELIST.hasOwnProperty(config.property)) {
if (!SUPPORTED_TRANSFORMS.hasOwnProperty(config.property)) {
throw new Error(
`Property '${config.property}' is not supported by native animated module`,
);
Expand All @@ -252,7 +252,7 @@ function validateTransform(

function validateStyles(styles: {[key: string]: ?number, ...}): void {
for (const key in styles) {
if (!STYLES_WHITELIST.hasOwnProperty(key)) {
if (!SUPPORTED_STYLES.hasOwnProperty(key)) {
throw new Error(
`Style property '${key}' is not supported by native animated module`,
);
Expand Down
4 changes: 2 additions & 2 deletions Libraries/Blob/RCTBlobManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ @implementation RCTBlobManager

@synthesize bridge = _bridge;
@synthesize methodQueue = _methodQueue;
@synthesize turboModuleLookupDelegate = _turboModuleLookupDelegate;
@synthesize turboModuleRegistry = _turboModuleRegistry;

- (void)setBridge:(RCTBridge *)bridge
{
Expand Down Expand Up @@ -140,7 +140,7 @@ - (void)remove:(NSString *)blobId

RCT_EXPORT_METHOD(addNetworkingHandler)
{
RCTNetworking *const networking = _bridge ? _bridge.networking : [_turboModuleLookupDelegate moduleForName:"RCTNetworking"];
RCTNetworking *const networking = _bridge ? _bridge.networking : [_turboModuleRegistry moduleForName:"RCTNetworking"];

// TODO(T63516227): Why can methodQueue be nil here?
// We don't want to do anything when methodQueue is nil.
Expand Down
3 changes: 2 additions & 1 deletion Libraries/Components/Pressable/Pressable.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ function Pressable(props: Props, forwardedRef): React.Node {
focusable={focusable !== false}
hitSlop={hitSlop}
ref={viewRef}
style={typeof style === 'function' ? style({pressed}) : style}>
style={typeof style === 'function' ? style({pressed}) : style}
collapsable={false}>
{typeof children === 'function' ? children({pressed}) : children}
{__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}
</View>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ exports[`<Pressable /> should render as expected: should deep render when mocked
<View
acceptsFirstMouse={true}
accessible={true}
collapsable={false}
enableFocusRing={true}
focusable={true}
onBlur={[Function]}
Expand All @@ -26,6 +27,7 @@ exports[`<Pressable /> should render as expected: should deep render when not mo
<View
acceptsFirstMouse={true}
accessible={true}
collapsable={false}
enableFocusRing={true}
focusable={true}
onBlur={[Function]}
Expand Down
7 changes: 3 additions & 4 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const TextInputState = require('./TextInput/TextInputState');
const UIManager = require('../ReactNative/UIManager');

const invariant = require('invariant');
const performanceNow = require('fbjs/lib/performanceNow');

import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
import type {PressEvent, ScrollEvent} from '../Types/CoreEventTypes';
Expand Down Expand Up @@ -385,7 +384,7 @@ const ScrollResponderMixin = {
* Invoke this from an `onMomentumScrollBegin` event.
*/
scrollResponderHandleMomentumScrollBegin: function(e: ScrollEvent) {
this.state.lastMomentumScrollBeginTime = performanceNow();
this.state.lastMomentumScrollBeginTime = global.performance.now();
this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
},

Expand All @@ -394,7 +393,7 @@ const ScrollResponderMixin = {
*/
scrollResponderHandleMomentumScrollEnd: function(e: ScrollEvent) {
FrameRateLogger.endScroll();
this.state.lastMomentumScrollEndTime = performanceNow();
this.state.lastMomentumScrollEndTime = global.performance.now();
this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
},

Expand Down Expand Up @@ -435,7 +434,7 @@ const ScrollResponderMixin = {
* a touch has just started or ended.
*/
scrollResponderIsAnimating: function(): boolean {
const now = performanceNow();
const now = global.performance.now();
const timeSinceLastMomentumScrollEnd =
now - this.state.lastMomentumScrollEndTime;
const isAnimating =
Expand Down
2 changes: 1 addition & 1 deletion Libraries/Components/StatusBar/StatusBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ type IOSProps = $ReadOnly<{|
*
* @platform ios
*/
showHideTransition?: ?('fade' | 'slide'),
showHideTransition?: ?('fade' | 'slide' | 'none'),
|}>;

type Props = $ReadOnly<{|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import type {ColorValue} from '../../StyleSheet/StyleSheet';
import requireNativeComponent from '../../ReactNative/requireNativeComponent';
import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
import type {TextInputNativeCommands} from './TextInputNativeCommands';
import * as React from 'react';
import AndroidTextInputViewConfig from './AndroidTextInputViewConfig';
const ReactNativeViewConfigRegistry = require('../../Renderer/shims/ReactNativeViewConfigRegistry');

Expand Down
30 changes: 30 additions & 0 deletions Libraries/Components/TextInput/AndroidTextInputViewConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,36 @@ import type {ReactNativeBaseComponentViewConfig} from '../../Renderer/shims/Reac
const AndroidTextInputViewConfig = {
uiViewClassName: 'AndroidTextInput',
bubblingEventTypes: {
topBlur: {
phasedRegistrationNames: {
bubbled: 'onBlur',
captured: 'onBlurCapture',
},
},
topEndEditing: {
phasedRegistrationNames: {
bubbled: 'onEndEditing',
captured: 'onEndEditingCapture',
},
},
topFocus: {
phasedRegistrationNames: {
bubbled: 'onFocus',
captured: 'onFocusCapture',
},
},
topKeyPress: {
phasedRegistrationNames: {
bubbled: 'onKeyPress',
captured: 'onKeyPressCapture',
},
},
topSubmitEditing: {
phasedRegistrationNames: {
bubbled: 'onSubmitEditing',
captured: 'onSubmitEditingCapture',
},
},
topTextInput: {
phasedRegistrationNames: {
bubbled: 'onTextInput',
Expand Down
39 changes: 19 additions & 20 deletions Libraries/Components/Touchable/Touchable.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ const UIManager = require('../../ReactNative/UIManager');
const View = require('../View/View');
const SoundManager = require('../Sound/SoundManager');

const keyMirror = require('fbjs/lib/keyMirror');
const normalizeColor = require('../../StyleSheet/normalizeColor');

import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
Expand Down Expand Up @@ -129,16 +128,16 @@ const extractSingleTouch = nativeEvent => {
* Touchable states.
*/

const States = keyMirror({
NOT_RESPONDER: null, // Not the responder
RESPONDER_INACTIVE_PRESS_IN: null, // Responder, inactive, in the `PressRect`
RESPONDER_INACTIVE_PRESS_OUT: null, // Responder, inactive, out of `PressRect`
RESPONDER_ACTIVE_PRESS_IN: null, // Responder, active, in the `PressRect`
RESPONDER_ACTIVE_PRESS_OUT: null, // Responder, active, out of `PressRect`
RESPONDER_ACTIVE_LONG_PRESS_IN: null, // Responder, active, in the `PressRect`, after long press threshold
RESPONDER_ACTIVE_LONG_PRESS_OUT: null, // Responder, active, out of `PressRect`, after long press threshold
ERROR: null,
});
const States = {
NOT_RESPONDER: 'NOT_RESPONDER', // Not the responder
RESPONDER_INACTIVE_PRESS_IN: 'RESPONDER_INACTIVE_PRESS_IN', // Responder, inactive, in the `PressRect`
RESPONDER_INACTIVE_PRESS_OUT: 'RESPONDER_INACTIVE_PRESS_OUT', // Responder, inactive, out of `PressRect`
RESPONDER_ACTIVE_PRESS_IN: 'RESPONDER_ACTIVE_PRESS_IN', // Responder, active, in the `PressRect`
RESPONDER_ACTIVE_PRESS_OUT: 'RESPONDER_ACTIVE_PRESS_OUT', // Responder, active, out of `PressRect`
RESPONDER_ACTIVE_LONG_PRESS_IN: 'RESPONDER_ACTIVE_LONG_PRESS_IN', // Responder, active, in the `PressRect`, after long press threshold
RESPONDER_ACTIVE_LONG_PRESS_OUT: 'RESPONDER_ACTIVE_LONG_PRESS_OUT', // Responder, active, out of `PressRect`, after long press threshold
ERROR: 'ERROR',
};

type State =
| typeof States.NOT_RESPONDER
Expand Down Expand Up @@ -190,15 +189,15 @@ const IsLongPressingIn = {
/**
* Inputs to the state machine.
*/
const Signals = keyMirror({
DELAY: null,
RESPONDER_GRANT: null,
RESPONDER_RELEASE: null,
RESPONDER_TERMINATED: null,
ENTER_PRESS_RECT: null,
LEAVE_PRESS_RECT: null,
LONG_PRESS_DETECTED: null,
});
const Signals = {
DELAY: 'DELAY',
RESPONDER_GRANT: 'RESPONDER_GRANT',
RESPONDER_RELEASE: 'RESPONDER_RELEASE',
RESPONDER_TERMINATED: 'RESPONDER_TERMINATED',
ENTER_PRESS_RECT: 'ENTER_PRESS_RECT',
LEAVE_PRESS_RECT: 'LEAVE_PRESS_RECT',
LONG_PRESS_DETECTED: 'LONG_PRESS_DETECTED',
};

type Signal =
| typeof Signals.DELAY
Expand Down
Loading