forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge from upstream through 2020-05-09 #806
Merged
amgleitman
merged 241 commits into
microsoft:master
from
amgleitman:amgleitman/0.64-merge-2020-05-09
Aug 4, 2021
Merged
Changes from 240 commits
Commits
Show all changes
241 commits
Select commit
Hold shift + click to select a range
cd13c99
Update default Podfile to not depend on a path (#28572)
grabbou cd347a7
Upgrade Prettier in Xplat to version 1.19.1
gkz ccb7dbe
Stop using get_fbobjc_enable_exception_lang_compiler_flags_DEPRECATEDβ¦
swolchok 449dc37
Add ProGuard rule for hermes (#28571)
radko93 dff17ef
Move CheckBox JS files to FB Internal
poteto 44ec762
fix: ripple should be applied even when borderless == false (#28526)
vonovak 411c344
Remove ColorAndroid function as it adds no value over PlatfromColor (β¦
tom-un d4d6dff
iOS: mark some old NativeModule targets with depslint_never_remove
fkgozali 8988a07
Update Gradle Wrapper to 6.3 (#28173)
friederbluemle 46c77dc
Fix crash inside RCTRedBox when trying to present same UIViewControllβ¦
sammy-SC be78673
Animated: Early detection of division by zero in AnimatedDivision
shergin d7d585f
Fabric: Controlling DifferentiatorMode via ReactNativeConfig
shergin 4305a29
Upgrade Hermes dependency to 0.5.0
willholen 49c90e9
Set width/height also to Undefined when we change the measure mode toβ¦
SidharthGuglani-zz 9c54bf4
Remove redundant input from TextInput
sammy-SC e0da72a
Update RNTester AppDelegate for changes made to SurfacePresenter API β¦
empyrical 9bc7a07
Retryable ViewCommand exceptions shouldn't crash
JoshuaGross b861782
Remove setMostRecentEventCount from TextInput view commands
sammy-SC e6ed5b2
label-actions: Add canned response for upgrade issues
hramos eaba383
Yoga Podspec: Export YGNode and YGStyle headers (#997)
empyrical 8901d95
Add logging to catch null TurboModules
RSNara 36688d3
Remove module cache from ReactPackageTurboModuleManagerDelegate
RSNara bc99a32
Control concurrent calls into TMMDelegate from TMM
RSNara 78266b8
Bump eslint-plugin-react-native-community version to 1.1.0
elicwhite 75a6178
Update Babel to 7.8.x/7.9.x
cpojer 992e0ce
fix: do not throw on missing `cliPath`, use the default value (#28625)
grabbou 1908d50
Fix CIRCLE_PR_NUMBER may not always be set (#28640)
tido64 a9bac17
Add "Open Debugger" and "Open React DevTools" to iOS dev menu
rickhanlonii 33b3a1a
Changed iOS LaunchScreen from xib to storyboard (#28239)
jeswinsimon 25ed045
Switch over to JavaTurboModule::InitParams
RSNara dda7f82
RN: Shrinkwrap Text Layout (Android)
yungsters b2d10bc
(eslint-config) update community eslint plugin in eslint config (#28642)
Naturalclar ddc3300
chore: update CLI to the latest version (#28623)
grabbou 7cedccd
Add "Open Debugger" and "Open React DevTools" to Android dev menu
rickhanlonii 44beb2a
Remove the post install step (#28651)
priteshrnandgaonkar fb04237
Revert D21064653: Remove the post install step
elicwhite 56583c6
Remove out of date TODO
rickhanlonii 1ee8c0c
RNTester LayoutAnimation example: add more options
JoshuaGross b2ccfac
Add a "reparenting" LayoutAnimation example that animates flattening/β¦
JoshuaGross f5d00e5
Fix jsi cmake include dirs (#207)
ryantrem abde015
Resolve `kind-of` vulnerability by bumping to 6.0.3
elicwhite 8c9c402
Move CheckBox Android files to FB internal (#28658)
poteto 251ff1b
Part 1: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams
RSNara 03bd7d7
Part 2: Update ObjC++ codegen classes to use ObjCTurboModule::InitParams
RSNara d75401a
Part 3: Update RCTTurboModuleManagerDelegate to use ObjCTurboModule::β¦
RSNara 90f60a8
chore: update `./scripts/test-manual-e2e.sh` (#28653)
grabbou 49e16bd
use default value of enums YGDirection and YGMeasureMode instead of -1
SidharthGuglani-zz 04de69a
fix typo as there is no file called YGJNI.cpp (#990)
acton393 894f6b3
Remove unused packages from xplat/js/package.json
cpojer 0a67133
Make ColorValue public in StyleSheet.js
4c538fc
Fabric: `LayoutableShadowNode:getLayoutMetrics` is not a virtual methβ¦
shergin 62544c0
Fabric: Proper traits for `ImageShadowNode` and `ViewShadowNode`
shergin cc07baa
Fabric: "Attempt to mutate a sealed object." is now an assert (not exβ¦
shergin e1eef24
Fabric: Implementation of `getDebugDescription` for `std::array`
shergin e56950d
Fabric: `componentregistry` module was decoupled from `uimanager`
shergin 599f1ed
Fabric: `scheduler` module was decoupled from `uimanager`
shergin 7a2c685
Fabric: `templateprocessor` module was decoupled from `uimanager`
shergin 335f3aa
Migrate deprecated frameInterval to preferredFramesPerSecond (#28675)
safaiyeh de188a2
Fabric: Fix case of Glog include in MountingTest.cpp (#28616)
empyrical b000664
Fabric: Add Unicode prefix to AttachmentCharacter (#28617)
empyrical 6694ce0
Fabric: Fixed incorrect early-return in `UIView+ComponentViewProtocolβ¦
shergin 7757ad0
Fix border-stroke drawing after resetting border-radius (#28356)
IjzerenHein 5dc6ede
Fabric: Using proper clock in MountingTelemetryTest
shergin 28dce36
Fix rounded border drawing when border-radius is smaller than border-β¦
IjzerenHein 7cc791b
Fabric: `ComponentDescriptor::cloneProps()` now never returns the basβ¦
shergin f248ba1
Upgrade to Jest 25
cpojer 5709996
Apply placeholderColor to TextInput component
sammy-SC e7ef35c
Fix mistake in swapping left/right layout properties
sammy-SC 8057550
Fixed incorrect owner assignment in YGNode move constructor
shergin 854f637
Easy diff to add a TODO
mdvacca 04bc315
Add support for generating custom messages
willholen 33ccc0a
Implement Hermes.setPauseOnLoad
willholen 7701275
Switch isPackagerRunning to a class method.
rickhanlonii 4afb836
Fabric: Fixed `getDirtied` vs `isDirty` in `YogaLayoutableShadowNode`
shergin d639063
Fabric: More strict policies to dirty Yoga nodes in YogaLayoutableShaβ¦
shergin 25793ea
Allow iOS PlatformColor strings to be ObjC or Swift UIColor selectorsβ¦
tom-un 1fdb9ac
Update Differ test
JoshuaGross 8c4efc9
Enable Yoga logging in Fabric Debug
mdvacca 05c76be
Easy diff to document in code how to enable logging of Shadow Tree inβ¦
mdvacca a136b34
Flip text alignment in case layout direction is RTL
sammy-SC 19658a1
Daily `arc lint --take GOOGLEJAVAFORMAT`
17f025b
Upgrade Flipper to 0.37.0 (#28545)
sunnylqm 0b68f3c
Upgrade babel-eslint in xplat/js
gkz a850d11
RN: Create `RootTag` Type
yungsters 5242ad9
RN: Add `RootTag` Type to TurboModule
yungsters 6aab3f8
RN: Fix Codegen Schema Buck Dependency (#28719)
yungsters 57fee33
Flow 0.123.0 in xplat/js
panagosg7 2ad827b
Remove outdated metro type definitions
cpojer bf5f3c6
Daily `arc lint --take CLANGFORMAT`
df03228
remove tvOS from template (#28706)
Naturalclar 3246eae
Fabric: `ConcreteShadowNode::initialStateData()` now accepts a `Shadoβ¦
shergin f64b39e
Fabric: Introducting `ShadowNodeFamilyFragment::Value`
shergin 2c473e1
Overhaul RCTTurboModule creation and initialization
RSNara d06ee3d
Fix folly::dynamic crash when attaching a debugger to Hermes
willholen a2f8b9c
Set black as default text color for <TextInput/> on iOS (#28708)
JonnyBurger ca16256
Daily `arc lint --take CLANGFORMAT`
ab9b212
RN: Rename `{ => Event}ObjectPropertyType` in Codegen
yungsters 1b2bcb1
RN: Rename `{NativePrimitive => ReservedProp}TypeAnnotation` in Codegen
yungsters b8bfc50
RN: Rename `{ => NativeModule}MethodTypeShape` in Codegen
yungsters 064cb12
RN: Add `RootTag` Codegen Parser Test (and Cleanup)
yungsters 310b0c3
RN: Add `RootTag` to New NativeModule Codegen
yungsters 4d9fa4b
RN: Add `RootTag` to New Commands Codegen
yungsters a903d1b
BackHandler: specify function return type for handler (#28192)
Naturalclar 78b1c85
Fabric: Simplifying Yoga and Fabric integration
shergin 17adf54
Clean up comments about null state wrappers
JoshuaGross bda8aae
Modal: disable view flattening explicitly for the children of Modal, β¦
JoshuaGross ed29ba1
Support `contentOffset` property in Android's ScrollView and Horizontβ¦
JoshuaGross 025be81
RN: Fix Text Layout Ignoring Parent Bounds
yungsters 4ae2de2
Remove unnecessary cast to int in TextInlineView measure functions
mdvacca fa69356
Use RTL in RTLExample when Platform != android (#28742)
kmelmon 2b56011
Add Dark Mode support to the App template and NewAppScreen componentsβ¦
Simek 8173427
Allow use of std::tuple<> with decorators directly
mhorowitz fef8bc3
Fabric: Added assert in ShadowNode
shergin aad9960
Fabric: Test for State Reconciliation mechanism
shergin 30cc158
ScrollView, HorizontalScrollView: support `null` contentOffset
JoshuaGross 8ca5594
All `measure*` calls should use the latest committed version of a Shaβ¦
JoshuaGross dfdbf41
chore: remove tvOS from the e2e CI tests (#28743)
Simek b020e7c
Fix calculating View position within a Window in split-screen mode onβ¦
e3e9008
Fix image instrumentation internal lifecycle
p-sun e68f9bf
Calling Paper TextInput setTextAndSelection view command now dirties β¦
sammy-SC 5cf327e
Blur image in Image component if blurRadius prop is provided
sammy-SC a4b15a4
Fabric: Marking TextInput as a leaf Yoga node
shergin 79d5b20
Move RuntimeExecutor to its own BUCK module (#28730)
027e8f9
Send key when onKeyPress event is fired from TextInput
sammy-SC b871979
Do not send events for changes coming from JavaScript
sammy-SC 26d3bca
Fabric: Increasing threshold for MountingTelemetryTest
shergin 702ff6d
iOS: Fix refreshControl layouting (#28236)
yogevbd fc5a626
Fix rounding error using double instead of float
SidharthGuglani-zz 81bdead
Fix broken touches on all Fabric surfaces
sammy-SC 423b55b
Move ART Android files to FB internal
luluwu2032 b2b23a2
Check en0..en8 when generating ip.txt for iOS debug builds (#28764)
malord 1cef72a
Part 1: Make CatalystInstanceImpl.getNativeModule Nullable
RSNara 9263eb5
Part 2: Make CatalystInstanceImpl.getNativeModule Nullable
RSNara 79bc7f9
Revert D20587945: iOS: Fix refreshControl layouting
shergin 3d20f49
Back out "Control concurrent calls into TMMDelegate from TMM"
RSNara 6de9f37
Resolve RNTester Xcode warnings (#28676)
safaiyeh afdcdc7
Update react.gradle (#28776)
grabbou 00b3cbf
Fix cleanup bug
RSNara e171c2b
Fix cleanup bug
RSNara 23d6b8d
Create JRuntimeExecutor (#28779)
78d2b3c
refine invariant error message at scrollToIndex (#28464)
sasurau4 e9f29a3
Reject promise when if an error occurs while processing prefetching rβ¦
mdvacca 9699933
Add hostname to loading banner on iOS
rickhanlonii 3729fe8
Update loading banner text and colors
rickhanlonii 131c497
Do not update loading banner message while hiding
rickhanlonii 2b771b0
Delay loading banner inital message by 200ms to prevent flashing
rickhanlonii 3fb37b4
Speed up loading banner animations
rickhanlonii 97bc084
Guard all debug logs behind an MC
RSNara e27542b
Don't allow download percentage to exceed expectations
rickhanlonii d7299e8
cleanup unused TODO
mdvacca d8e6c45
Move DevSettingsActivity from main to debug (#28770)
7566bb4
Delete .clang-tidy for jscallinvoker
RSNara f7e8838
Enable Animated in Venice
mdvacca afc3c97
Fabric: Changes in State reconciliation
shergin f746119
Fabric: Gating for new state reconciliation
shergin d20ac69
Replace duplicate code in AndroidInfoModule with call to AndroidInfoHβ¦
ide 673cbb3
Daily `arc lint --take GOOGLEJAVAFORMAT`
0569221
Set contentView's frame in setter
sammy-SC f0dfd35
Smaller loading bar based on feedback
rickhanlonii f82a6d7
Reduce exposure of UIManagerModule in the NativeAnimatedNodesManager β¦
mdvacca 919554f
Cleanup scheduleMountItem method
mdvacca 09487e4
Cleanup ReactRootView
mdvacca 65d52a5
Set layout metrics during initial render of Fabric
mdvacca 2047041
Use InteropLayer for ReactART
sammy-SC 12f8b25
fix duration calculation for RCTUIImageViewAnimated
c25911b
Update cocoapods, fix RNTester
780f06c
Bump @react-native-community/eslint-config in new app template
elicwhite 56592c5
Fabric: Fixing `executeSynchronouslyOnSameThread_CAN_DEADLOCK`
shergin bf0539f
Revert D21336180: Update cocoapods, fix RNTester
8c45255
Refactor ReactCallerContextFactory to recive surfaceID as a parameter
mdvacca 3da8103
Inject Fresco.ImagePipeline into ImageLoaderModule
mdvacca eb60019
Extend logging of image prefetching to include react_native contextChain
mdvacca 03385ac
Fix Fb4aReactPackageTest.testGetNativeModulesByName test
mdvacca 1787c16
Remove `docs` from `jscodeshift`
cpojer 8ad8107
iOS: when the bridge has been invalidated, NativeModule lookup shouldβ¦
fkgozali 87d000f
Fix invalid type annotations
cpojer 9cdc19a
Fixes TextInput shaking when typing Chinese (#28805)
zhongwuzw 7bd694f
VirtualizedList: Migrate to React.Context
yungsters ddea7c7
VirtualizedList: Remove `PropTypes` Dependency
yungsters 8acb2b3
Remove `@babel/preset-env`
cpojer 577fdea
Add prepareForReuse to RCTSafeAreaViewComponentView
sammy-SC ced959b
chore: remove Kotlin version from the default template (#28626)
grabbou d815be1
Fix Optimized Differ (was generating extraneous Create mutations)
JoshuaGross 7f2515e
Add warning when scrollRef does not have a scrollTo method
kacieb 30a89f3
Don't use #import in C++ Code (#28825)
NickGerleman ca144fc
Fix unit test compilation on Android
JoshuaGross aae38c3
Support calling LayoutAnimation APIs in Fabric from JS
JoshuaGross bb5d043
Differ: fix TinyMap to prevent possible crashes in `find()` and `begiβ¦
JoshuaGross 0348953
Allow passing partial contentOffset to ScrollView on Android (#28817)
janicduplessis 4f5a092
Pass initial props to WrapperComponent
rubennorte 1740233
Upgrade to Jest 26
cpojer 4459c08
Make column match fuzzy
willholen de7f69a
Fix type of exported Touchables: ComponentType -> AbstractComponent (β¦
draperunner e8060ae
Import folly and adjust whitespace to match old codegen
hramos edfd965
Update native module specs
10314fe
Smoother scrolling in ScrollView, HorizontalScrollView
JoshuaGross 530dffa
Cleanup unused dependencies
cpojer b0d0e51
iOS: Animated image should animate at the same speed regardless of frβ¦
p-sun 5066b66
LogBox - Always display the first fatal error
rickhanlonii 41f0d9b
Rename error titles
rickhanlonii de667ff
Moved some NativeModule JS specs to OSS
fkgozali 0c2c4bf
Deploy Flow v0.124.0 to xplat/js
nmote d14b89b
RN: Workaround Fabric + Virtual Text Press Bug
yungsters fa5b4c9
Fabric: Backward-compatible behaviour of `measureInWindow` and `measure`
shergin 21d7a35
Upgrade to Yargs 15
cpojer ff0c625
Ez Extend logging of Fabric
mdvacca 5c48c94
Fix measureLayout function for Virtual Nodes
mdvacca ca105f8
Update cocoapods (#28833)
d76e03f
Fabric: Introducing `RunLoopObserver`
shergin 025b6a7
Fabric: Cross-platform implementation of `SynchronousEventBeat` and `β¦
shergin f4815fb
third-party | Move glog from xplat/third-party to third-party and creβ¦
nlutsenko 851644c
Fix Animated type
rijn e566c7e
Add virtual destructor to JSError
javache 26c120c
Handle initialProps as optional in renderApplication
rubennorte 7bb1c4e
Enable with CocoaPods `:configuration` (#28796)
alloy 16ea9ba
Support excluding multiple platforms.
joaovieira 4e59508
Extend ParagraphAttribute to store the includeFontPadding prop
mdvacca 561a97f
Extend Text measurement to support includeFontPadding prop
mdvacca 11b9bad
Small refactor on text measure method
mdvacca 853dc04
Handle optional return types/values
hramos 6e88ab6
Avoid redefining id when a property is named 'id'
hramos 14a0f3f
Eager initialize Fabric Android classes
mdvacca 938aa86
Remove Hermes.setPauseOnLoad message
willholen bf837d6
Add support for Debugger.setInstrumentationBreakpoint
willholen 164d47f
label react-native-github targets
fkgozali 91a49d8
Add script to generate native modules specs with react-native-codegen
hramos 69ce9c2
Update .gitignore (#28789)
enesozturk c67e1fe
Codegen: Add prepublish script to build Flow files (#28827)
empyrical 77d1380
Remove RCTLogError from RCTScrollViewManager.calculateChildFrames
sammy-SC 13ee5c4
Enable animations in bridgeless mode on iOS
a4a47b9
Expose RuntimeExecutor on CatalystInstance (#28851)
f535c8b
Inject ImagePipeline into FrescoModule
mdvacca aece57b
Fabric: Calling JSVM GC on memory pressure event on iOS
shergin a1ac251
TextInput: Default `blurOnSubmit` in JS
yungsters fd34ef0
Merge commit '17f025bc26da13da795845a3f7daee65563420c0' into amgleitmβ¦
amgleitman 8f6b9fb
Merge commit '30cc158a875a0414cf53d4d5155410eea5d5aeea' into amgleitmβ¦
amgleitman 78a3b4b
Merge commit 'f0dfd35108dd3f092d46b65e77560c35477bf6ba' into amgleitmβ¦
amgleitman eea1457
Merge commit '03489539146556ec5ba6ba07ac338ce200f5b0f4' into amgleitmβ¦
amgleitman a0e38c7
Merge commit 'a1ac2518a364ebcd3cc024a22229cadc1791e1c4' into amgleitmβ¦
amgleitman e715297
Merge branch 'master' into amgleitman/0.64-merge-2020-05-09
amgleitman f092770
(Temporarily) remove droid-node-patching portions of Apple verification
amgleitman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,4 +90,4 @@ untyped-import | |
untyped-type-import | ||
|
||
[version] | ||
^0.123.0 | ||
^0.124.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,4 +93,4 @@ untyped-import | |
untyped-type-import | ||
|
||
[version] | ||
^0.123.0 | ||
^0.124.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -89,4 +89,4 @@ untyped-import | |
untyped-type-import | ||
|
||
[version] | ||
^0.123.0 | ||
^0.124.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/** | ||
* (c) Facebook, Inc. and its affiliates. Confidential and proprietary. | ||
* | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import type {TurboModule} from '../TurboModule/RCTExport'; | ||
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; | ||
|
||
type Options = {| | ||
+offset: {| | ||
+x: number, | ||
+y: number, | ||
|}, | ||
+size: {| | ||
+width: number, | ||
+height: number, | ||
|}, | ||
+displaySize?: ?{| | ||
+width: number, | ||
+height: number, | ||
|}, | ||
/** | ||
* Enum with potential values: | ||
* - cover | ||
* - contain | ||
* - stretch | ||
* - center | ||
* - repeat | ||
*/ | ||
+resizeMode?: ?string, | ||
+allowExternalStorage?: boolean, | ||
|}; | ||
|
||
export interface Spec extends TurboModule { | ||
+getConstants: () => {||}; | ||
+cropImage: ( | ||
uri: string, | ||
// eslint-disable-next-line lint/react-native-modules | ||
cropData: Options, | ||
successCallback: (uri: string) => void, | ||
errorCallback: (error: string) => void, | ||
) => void; | ||
} | ||
|
||
export default (TurboModuleRegistry.getEnforcing<Spec>( | ||
'ImageEditingManager', | ||
): Spec); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* (c) Facebook, Inc. and its affiliates. Confidential and proprietary. | ||
* | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import type {TurboModule} from '../TurboModule/RCTExport'; | ||
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; | ||
|
||
export interface Spec extends TurboModule { | ||
+getConstants: () => {||}; | ||
// Common | ||
+getBase64ForTag: ( | ||
uri: string, | ||
successCallback: (base64ImageData: string) => void, | ||
|
||
/** | ||
* On Android, the failure callback is called with a string. | ||
* On iOS, the failure callback is called with an error object. | ||
* | ||
* TODO(T47527939) Unify this inconsistency | ||
*/ | ||
errorCallback: (error: {|message: string|} | string) => void, | ||
) => void; | ||
|
||
// iOS-only | ||
+hasImageForTag: (uri: string, callback: (hasImage: boolean) => void) => void; | ||
+removeImageForTag: (uri: string) => void; | ||
+addImageFromBase64: ( | ||
base64ImageData: string, | ||
successCallback: (uri: string) => void, | ||
errorCallback: (error: {|message: string|}) => void, | ||
) => void; | ||
} | ||
|
||
export default (TurboModuleRegistry.getEnforcing<Spec>( | ||
'ImageStoreManager', | ||
): Spec); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you add this? If so can we be explicit exactly what lines we're adding and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only thing I changed is replacing
UIView
withRCTPlatformView
.