Skip to content

Update react-native to v0.71.3 #793

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

Merged
merged 41 commits into from
Apr 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
32e7410
Update `react-native` to 0.71.3
reck753 Mar 1, 2023
9f0531f
Add v0.70.2 changes
reck753 Mar 1, 2023
b14bd2c
Add missing permissions in `PermissionsAndroid`
reck753 Mar 1, 2023
08a1034
Add v0.70.7 changes
reck753 Mar 1, 2023
8f6728b
v0.71.0 - Remove `AsyncStorage`
reck753 Mar 1, 2023
f1d8c92
v0.71.0 - Remove `MaskedViewIOS`
reck753 Mar 1, 2023
a3292dc
v0.71.0 - Add `gap`, `columnGap` and `rowGap` styles
reck753 Mar 1, 2023
66faca4
Add missing roles in `Accessibility`
reck753 Mar 1, 2023
d54200d
v0.71.0 - Add `option` in `Accessibility.role`
reck753 Mar 1, 2023
602374d
v0.71.0 - Add a todo comment about `aria-checked`
reck753 Mar 1, 2023
f206be2
v0.71.0 - Add `role` prop to `View` and `Text`
reck753 Mar 1, 2023
8a9c649
v0.71.0 - Introduce `useAnimatedValue` hook
reck753 Mar 1, 2023
e89870e
v0.71.0 - Add string support for `aspectRatio`
reck753 Mar 1, 2023
c688807
v0.71.0 - Add `alt` prop to `Image`
reck753 Mar 1, 2023
2da4ce0
v0.71.0 - Add string support for `fontVariant`
reck753 Mar 1, 2023
769505f
v0.71.0 - Simplify `fontWeight` since it can be number
reck753 Mar 1, 2023
94c2785
v0.71.0 - Add `objectFit` Image style
reck753 Mar 1, 2023
92198d7
v0.71.0 - Add `tintColor` prop to `Image`
reck753 Mar 1, 2023
4eeeedc
v0.71.0 - Add `inputMode` prop to `TextInput`
reck753 Mar 1, 2023
4c1bcd2
v0.71.0 - Add `enterKeyHint` prop to `TextInput`
reck753 Mar 1, 2023
5fb9b6b
v0.71.0 - Add `readOnly` prop to `TextInput`
reck753 Mar 1, 2023
3db420b
v0.71.0 - Add `verticalAlign` text style
reck753 Mar 1, 2023
20c22ed
v0.71.0 - Add `rows` prop to `TextInput`
reck753 Mar 1, 2023
76f62c2
v0.71.0 - Add `anchor` option support for `Share`
reck753 Mar 1, 2023
bf5b3f9
v0.71.0 - Add `lineBreakStrategyIOS` prop
reck753 Mar 1, 2023
7c55912
v0.71.0 - Add a comment about more `fontVariant` options
reck753 Mar 1, 2023
1dc5679
v0.71.0 - Add `isPreferred` to `Alert.button`
reck753 Mar 1, 2023
f275f01
v0.71.0 - Add `borderCurve` style
reck753 Mar 1, 2023
1986341
v0.71.0 - Add `referrerPolicy` prop to `Image`
reck753 Mar 1, 2023
46e6b38
v0.71.0 - Add `crossOrigin` prop to `Image`
reck753 Mar 1, 2023
9b14410
v0.71.0 - Add `width` prop to `Image`
reck753 Mar 1, 2023
b2077b3
v0.71.0 - Add `height` prop to `Image`
reck753 Mar 1, 2023
049909e
v0.71.0 - Add `srcSet` prop to `Image`
reck753 Mar 1, 2023
1bcef90
v0.71.2 - Add `options` to `Alert.prompt`
reck753 Mar 2, 2023
3976e3b
Format the code with `format` script
reck753 Mar 2, 2023
242bd37
Revert changes made to `Accessibility.role` and create `Role.t`
reck753 Mar 2, 2023
5275c1e
Update src/apis/PermissionsAndroid.res
reck753 Apr 10, 2023
b1d7422
Update src/apis/Animated.res
reck753 Apr 10, 2023
026930a
Add role prop to all modules which have View-like props
reck753 Apr 10, 2023
9f497a4
Revert `fontVariant` style to simpler API
reck753 Apr 10, 2023
2d38d7c
Revert `aspectRatio` style to simpler API
reck753 Apr 10, 2023
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
4,569 changes: 3,197 additions & 1,372 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "0.70.0",
"peerDependencies": {
"@rescript/react": ">=0.10.0",
"react-native": ">=0.70.0",
"react-native": ">=0.71.3",
"rescript": ">=10.0.0"
},
"overrides": {
Expand Down
3 changes: 3 additions & 0 deletions src/apis/AccessibilityInfo.res
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ external removeEventListener: @string

@scope("AccessibilityInfo") @module("react-native")
external setAccessibilityFocus: NativeTypes.nodeHandle => unit = "setAccessibilityFocus"

@scope("AccessibilityInfo") @module("react-native")
external prefersCrossFadeTransitions: unit => Js.Promise.t<bool> = "prefersCrossFadeTransitions"
10 changes: 6 additions & 4 deletions src/apis/ActionSheetIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ type options = {
cancelButtonTintColor?: Color.t,
}

@obj // @deprecated("Directly create record instead")
external options: (
@obj
external // @deprecated("Directly create record instead")
options: (
~options: array<string>,
~cancelButtonIndex: int=?,
~destructiveButtonIndex: array<int>=?,
Expand All @@ -32,8 +33,9 @@ type shareOptions = {
excludedActivityTypes?: array<string>,
}

@obj // @deprecated("Directly create record instead")
external shareOptions: (
@obj
external // @deprecated("Directly create record instead")
shareOptions: (
~url: string=?,
~message: string=?,
~subject: string=?,
Expand Down
12 changes: 8 additions & 4 deletions src/apis/Alert.res
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,22 @@ type options = {
onDismiss?: unit => unit,
}

@obj // @deprecated("Directly create record instead")
external options: (~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options = ""
@obj
external // @deprecated("Directly create record instead")
options: (~cancelable: bool=?, ~onDismiss: unit => unit=?, unit) => options = ""

type style = [#default | #cancel | #destructive]

type button = {
text?: string,
onPress?: unit => unit,
style?: style,
isPreferred?: bool,
}

@obj // @deprecated("Directly create record instead")
external button: (~text: string=?, ~onPress: unit => unit=?, ~style: style=?, unit) => button = ""
@obj
external // @deprecated("Directly create record instead")
button: (~text: string=?, ~onPress: unit => unit=?, ~style: style=?, unit) => button = ""

@scope("Alert") @module("react-native")
external alert: (
Expand Down Expand Up @@ -45,5 +48,6 @@ external prompt: (
~type_: type_=?,
~defaultValue: string=?,
~keyboardType: string=?,
~options: options=?,
unit,
) => unit = "prompt"
26 changes: 18 additions & 8 deletions src/apis/Animated.res
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,9 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@obj // @deprecated("Directly create record instead")
external config: (
@obj
external // @deprecated("Directly create record instead")
config: (
~velocity: Val.rawValue,
~deceleration: float=?,
~isInteraction: bool=?,
Expand Down Expand Up @@ -72,8 +73,9 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@obj // @deprecated("Directly create record instead")
external config: (
@obj
external // @deprecated("Directly create record instead")
config: (
~toValue: toValue,
~restDisplacementThreshold: float=?,
~overshootClamping: bool=?,
Expand Down Expand Up @@ -115,8 +117,9 @@ module ValueAnimations = (Val: Value) => {
iterations?: int,
}

@obj // @deprecated("Directly create record instead")
external config: (
@obj
external // @deprecated("Directly create record instead")
config: (
~toValue: toValue,
~easing: Easing.t=?,
~duration: float=?,
Expand Down Expand Up @@ -150,8 +153,9 @@ module Interpolation = {
extrapolateRight?: extrapolate,
}

@obj // @deprecated("Directly create record instead")
external config: (
@obj
external // @deprecated("Directly create record instead")
config: (
~inputRange: array<float>,
~outputRange: outputRange,
~easing: Easing.t=?,
Expand Down Expand Up @@ -367,3 +371,9 @@ module View = {

let make = createAnimatedComponent(make)
}

type config = {useNativeDriver: bool}

@module("react-native")
external useAnimatedValue: (~initialValue: float, ~config: config=?, unit) => Value.t =
"useAnimatedValue"
34 changes: 0 additions & 34 deletions src/apis/AsyncStorage.res

This file was deleted.

5 changes: 3 additions & 2 deletions src/apis/DynamicColorIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ type t = {
highContrastDark?: Color.t,
}

@obj // @deprecated("Directly create record instead")
external dynamicColor: (
@obj
external // @deprecated("Directly create record instead")
dynamicColor: (
~dark: Color.t,
~light: Color.t,
~highContrastLight: option<Color.t>=?,
Expand Down
14 changes: 6 additions & 8 deletions src/apis/ImagePickerIOS.res
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,18 @@ external canRecordVideos: (bool => unit) => unit = "canRecordVideos"

type cameraDialogConfig = {videoMode?: bool}

@obj // @deprecated("Directly create record instead")
external cameraDialogConfig: (~videoMode: bool=?, unit) => cameraDialogConfig = ""
@obj
external // @deprecated("Directly create record instead")
cameraDialogConfig: (~videoMode: bool=?, unit) => cameraDialogConfig = ""

type selectDialogConfig = {
showImages?: bool,
showVideos?: bool,
}

@obj // @deprecated("Directly create record instead")
external selectDialogConfig: (
~showImages: bool=?,
~showVideos: bool=?,
unit,
) => selectDialogConfig = ""
@obj
external // @deprecated("Directly create record instead")
selectDialogConfig: (~showImages: bool=?, ~showVideos: bool=?, unit) => selectDialogConfig = ""

@module("react-native") @scope("ImagePickerIOS")
external openCameraDialog: (
Expand Down
10 changes: 6 additions & 4 deletions src/apis/LayoutAnimation.res
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ type animationConfig = {
property?: property,
}

@obj // @deprecated("Directly create record instead")
external animationConfig: (
@obj
external // @deprecated("Directly create record instead")
animationConfig: (
~duration: float=?,
~delay: float=?,
~springDamping: float=?,
Expand All @@ -36,8 +37,9 @@ type layoutAnimationConfig = {
delete?: animationConfig,
}

@obj // @deprecated("Directly create record instead")
external layoutAnimationConfig: (
@obj
external // @deprecated("Directly create record instead")
layoutAnimationConfig: (
~duration: float,
~create: animationConfig=?,
~update: animationConfig=?,
Expand Down
5 changes: 3 additions & 2 deletions src/apis/Linking.res
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ type extraValue = ExtraValue.t

type extra = {key: string, value: extraValue}

@obj // @deprecated("Directly create record instead")
external extra: (~key: string, ~value: extraValue) => extra = ""
@obj
external // @deprecated("Directly create record instead")
extra: (~key: string, ~value: extraValue) => extra = ""

@scope("Linking") @module("react-native")
external openURL: string => Js.Promise.t<unit> = "openURL"
Expand Down
5 changes: 3 additions & 2 deletions src/apis/PanResponder.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ type config = {
onShouldBlockNativeResponder?: (Event.pressEvent, gestureState) => bool,
}

@obj // @deprecated("Directly create record instead")
external config: (
@obj
external // @deprecated("Directly create record instead")
config: (
~onMoveShouldSetPanResponder: (Event.pressEvent, gestureState) => bool=?,
~onMoveShouldSetPanResponderCapture: (Event.pressEvent, gestureState) => bool=?,
~onStartShouldSetPanResponder: (Event.pressEvent, gestureState) => bool=?,
Expand Down
55 changes: 53 additions & 2 deletions src/apis/PermissionsAndroid.res
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
module Permission = {
type t = string

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external acceptHandover: t = "ACCEPT_HANDOVER"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external accessBackgroundLocation: t = "ACCESS_BACKGROUND_LOCATION"

Expand All @@ -13,15 +16,30 @@ module Permission = {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external accessMediaLocation: t = "ACCESS_MEDIA_LOCATION"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external activityRecognition: t = "ACTIVITY_RECOGNITION"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external addVoicemail: t = "ADD_VOICEMAIL"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external answerPhoneCalls: t = "ANSWER_PHONE_CALLS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external bluetoothAdvertise: t = "BLUETOOTH_ADVERTISE"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external bluetoothConnect: t = "BLUETOOTH_CONNECT"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external bluetoothScan: t = "BLUETOOTH_SCAN"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external bodySensors: t = "BODY_SENSORS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external bodySensorsBackground: t = "BODY_SENSORS_BACKGROUND"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external callPhone: t = "CALL_PHONE"

Expand All @@ -31,6 +49,17 @@ module Permission = {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external getAccounts: t = "GET_ACCOUNTS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external nearbyWifiDevices: t = "NEARBY_WIFI_DEVICES"

@module("react-native")
@scope(("PermissionsAndroid", "PERMISSIONS"))
@deprecated("Use `postNotifications` instead")
external postNotification: t = "POST_NOTIFICATION"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external postNotifications: t = "POST_NOTIFICATIONS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external processOutgoingCalls: t = "PROCESS_OUTGOING_CALLS"

Expand All @@ -46,12 +75,27 @@ module Permission = {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readExternalStorage: t = "READ_EXTERNAL_STORAGE"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readMediaAudio: t = "READ_MEDIA_AUDIO"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readMediaImages: t = "READ_MEDIA_IMAGES"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readMediaVideo: t = "READ_MEDIA_VIDEO"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readPhoneNumbers: t = "READ_PHONE_NUMBERS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readPhoneState: t = "READ_PHONE_STATE"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readSms: t = "READ_SMS"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external readVoicemail: t = "READ_VOICEMAIL"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external receiveMms: t = "RECEIVE_MMS"

Expand All @@ -70,6 +114,9 @@ module Permission = {
@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external useSip: t = "USE_SIP"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external uwbRanging: t = "UWB_RANGING"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external writeCalendar: t = "WRITE_CALENDAR"

Expand All @@ -81,6 +128,9 @@ module Permission = {

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external writeExternalStorage: t = "WRITE_EXTERNAL_STORAGE"

@module("react-native") @scope(("PermissionsAndroid", "PERMISSIONS"))
external writeVoicemail: t = "WRITE_VOICEMAIL"
}

module Result = {
Expand All @@ -104,8 +154,9 @@ type rationale = {
buttonNeutral?: string,
}

@obj // @deprecated("Directly create record instead")
external rationale: (
@obj
external // @deprecated("Directly create record instead")
rationale: (
~title: string,
~message: string,
~buttonPositive: string,
Expand Down
Loading