react-native-windows 0.77.0 → 0.78.0-preview.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/.flowconfig +1 -1
- package/Chakra/ChakraTracing.cpp +1 -1
- package/Libraries/Animated/animations/Animation.js +22 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -0
- package/Libraries/Animated/animations/SpringAnimation.js +1 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/nodes/AnimatedAddition.js +9 -2
- package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
- package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
- package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
- package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
- package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
- package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
- package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
- package/Libraries/Animated/useAnimatedProps.js +0 -43
- package/Libraries/Components/Button.windows.js +3 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +9 -0
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +2 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -0
- package/Libraries/Components/View/View.windows.js +3 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +7 -2
- package/Libraries/Components/View/ViewAccessibility.windows.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
- package/Libraries/Components/View/ViewPropTypes.js +0 -9
- package/Libraries/Components/View/ViewPropTypes.windows.js +1 -9
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpBatchedBridge.js +1 -16
- package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
- package/Libraries/Image/AssetSourceResolver.js +11 -0
- package/Libraries/Image/AssetSourceResolver.windows.js +11 -0
- package/Libraries/Image/Image.windows.js +2 -0
- package/Libraries/Inspector/BorderBox.js +26 -14
- package/Libraries/Inspector/BoxInspector.js +60 -42
- package/Libraries/Inspector/ElementBox.js +55 -48
- package/Libraries/Inspector/StyleInspector.js +36 -30
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Lists/FlatList.d.ts +1 -1
- package/Libraries/Modal/Modal.js +2 -0
- package/Libraries/Modal/Modal.windows.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +0 -2
- package/Libraries/Network/RCTNetworking.android.js +24 -16
- package/Libraries/Network/RCTNetworking.ios.js +1 -46
- package/Libraries/Network/RCTNetworking.windows.js +1 -46
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
- package/Libraries/ReactNative/UIManagerProperties.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
- package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
- package/Libraries/StyleSheet/processTransform.js +6 -0
- package/Libraries/Text/Text.d.ts +6 -1
- package/Libraries/Text/Text.windows.js +4 -0
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.windows.js +3 -2
- package/Libraries/Utilities/BackHandler.android.js +5 -4
- package/Libraries/Utilities/BackHandler.ios.js +4 -5
- package/Libraries/Utilities/BackHandler.windows.js +5 -4
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +92 -17
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -33
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -10
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +11 -9
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +191 -329
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +66 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +21 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -4
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +71 -17
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +5 -10
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +4 -4
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +138 -110
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +27 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -33
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +0 -2
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -16
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/ImageManager.cpp +9 -0
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +5 -0
- package/Microsoft.ReactNative/IReactContext.cpp +2 -2
- package/Microsoft.ReactNative/IReactContext.h +1 -1
- package/Microsoft.ReactNative/IReactContext.idl +2 -2
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
- package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
- package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
- package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
- package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
- package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +10 -10
- package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +24 -24
- package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
- package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
- package/Microsoft.ReactNative/ReactHost/React.h +0 -3
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +39 -16
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +4 -2
- package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
- package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
- package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
- package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
- package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
- package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +2 -2
- package/Microsoft.ReactNative/Views/ViewPanel.cpp +1 -1
- package/Microsoft.ReactNative/Views/ViewViewManager.cpp +2 -2
- package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
- package/Microsoft.ReactNative/XamlUIService.h +4 -1
- package/Microsoft.ReactNative/XamlUIService.idl +2 -0
- package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
- package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/React.Cpp.props +3 -0
- package/PropertySheets/WebView2.props +1 -1
- package/PropertySheets/WinUI.props +5 -4
- package/ReactCommon/ReactCommon.vcxproj +5 -1
- package/ReactCommon/ReactCommon.vcxproj.filters +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +3 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +91 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -12
- package/{Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h → ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h} +37 -35
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -3
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +43 -57
- package/Shared/HermesRuntimeHolder.cpp +2 -2
- package/Shared/Shared.vcxitems +8 -14
- package/Shared/Shared.vcxitems.filters +4 -16
- package/Shared/Threading/BatchingQueueThread.cpp +3 -3
- package/codegen/NativeCPUTimeSpec.g.h +41 -0
- package/codegen/NativeFantomSpec.g.h +78 -0
- package/codegen/NativePerformanceSpec.g.h +31 -43
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +84 -84
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/codegen/rnwcoreJSI-generated.cpp +90 -57
- package/codegen/rnwcoreJSI.h +241 -104
- package/index.js +5 -0
- package/index.windows.js +5 -0
- package/just-task.js +1 -1
- package/package.json +25 -26
- package/src/private/animated/NativeAnimatedValidation.js +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +33 -27
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
- package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
- package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
- package/src/private/specs/modules/NativeFantom.js +37 -0
- package/src/private/utilities/ensureInstance.js +21 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/performance/Performance.js +0 -12
- package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
- package/types/index.d.ts +1 -0
- package/Libraries/HeapCapture/HeapCapture.js +0 -29
- package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
- package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
- package/Libraries/Performance/SamplingProfiler.js +0 -39
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -34
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +0 -53
- package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +0 -26
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +0 -363
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -35
- package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
- package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
14
15
|
|
|
15
16
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
16
17
|
import {validateTransform} from '../../../src/private/animated/NativeAnimatedValidation';
|
|
@@ -70,8 +71,9 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
70
71
|
constructor(
|
|
71
72
|
nodes: $ReadOnlyArray<AnimatedNode>,
|
|
72
73
|
transforms: $ReadOnlyArray<Transform<>>,
|
|
74
|
+
config?: ?AnimatedNodeConfig,
|
|
73
75
|
) {
|
|
74
|
-
super();
|
|
76
|
+
super(config);
|
|
75
77
|
this.#nodes = nodes;
|
|
76
78
|
this._transforms = transforms;
|
|
77
79
|
}
|
|
@@ -115,6 +117,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
115
117
|
const node = nodes[ii];
|
|
116
118
|
node.__addChild(this);
|
|
117
119
|
}
|
|
120
|
+
super.__attach();
|
|
118
121
|
}
|
|
119
122
|
|
|
120
123
|
__detach(): void {
|
|
@@ -160,6 +163,7 @@ export default class AnimatedTransform extends AnimatedWithChildren {
|
|
|
160
163
|
return {
|
|
161
164
|
type: 'transform',
|
|
162
165
|
transforms: transformsConfig,
|
|
166
|
+
debugID: this.__getDebugID(),
|
|
163
167
|
};
|
|
164
168
|
}
|
|
165
169
|
}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
import type {EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
13
12
|
import type Animation, {EndCallback} from '../animations/Animation';
|
|
14
13
|
import type {InterpolationConfigType} from './AnimatedInterpolation';
|
|
15
14
|
import type AnimatedNode from './AnimatedNode';
|
|
15
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
16
16
|
import type AnimatedTracking from './AnimatedTracking';
|
|
17
17
|
|
|
18
18
|
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
|
|
@@ -21,6 +21,7 @@ import AnimatedInterpolation from './AnimatedInterpolation';
|
|
|
21
21
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
22
22
|
|
|
23
23
|
export type AnimatedValueConfig = $ReadOnly<{
|
|
24
|
+
...AnimatedNodeConfig,
|
|
24
25
|
useNativeDriver: boolean,
|
|
25
26
|
}>;
|
|
26
27
|
|
|
@@ -83,6 +84,8 @@ function _executeAsAnimatedBatch(id: string, operation: () => void) {
|
|
|
83
84
|
* See https://reactnative.dev/docs/animatedvalue
|
|
84
85
|
*/
|
|
85
86
|
export default class AnimatedValue extends AnimatedWithChildren {
|
|
87
|
+
#updateSubscription: ?EventSubscription = null;
|
|
88
|
+
|
|
86
89
|
_value: number;
|
|
87
90
|
_startingValue: number;
|
|
88
91
|
_offset: number;
|
|
@@ -90,7 +93,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
90
93
|
_tracking: ?AnimatedTracking;
|
|
91
94
|
|
|
92
95
|
constructor(value: number, config?: ?AnimatedValueConfig) {
|
|
93
|
-
super();
|
|
96
|
+
super(config);
|
|
94
97
|
if (typeof value !== 'number') {
|
|
95
98
|
throw new Error('AnimatedValue: Attempting to set value to undefined');
|
|
96
99
|
}
|
|
@@ -102,8 +105,20 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
102
105
|
}
|
|
103
106
|
}
|
|
104
107
|
|
|
105
|
-
|
|
108
|
+
__attach(): void {
|
|
106
109
|
if (this.__isNative) {
|
|
110
|
+
// NOTE: In theory, we should only need to call this when any listeners
|
|
111
|
+
// are added. However, there is a global `onUserDrivenAnimationEnded`
|
|
112
|
+
// listener that relies on `onAnimatedValueUpdate` having fired to update
|
|
113
|
+
// the values in JavaScript. If that listener is removed, this could be
|
|
114
|
+
// re-optimized.
|
|
115
|
+
this.#ensureUpdateSubscriptionExists();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
__detach(): void {
|
|
120
|
+
if (this.__isNative) {
|
|
121
|
+
this.#updateSubscription?.remove();
|
|
107
122
|
NativeAnimatedAPI.getValue(this.__getNativeTag(), value => {
|
|
108
123
|
this._value = value - this._offset;
|
|
109
124
|
});
|
|
@@ -116,6 +131,35 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
116
131
|
return this._value + this._offset;
|
|
117
132
|
}
|
|
118
133
|
|
|
134
|
+
#ensureUpdateSubscriptionExists(): void {
|
|
135
|
+
if (this.#updateSubscription != null) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const nativeTag = this.__getNativeTag();
|
|
139
|
+
NativeAnimatedAPI.startListeningToAnimatedNodeValue(nativeTag);
|
|
140
|
+
const subscription: EventSubscription =
|
|
141
|
+
NativeAnimatedHelper.nativeEventEmitter.addListener(
|
|
142
|
+
'onAnimatedValueUpdate',
|
|
143
|
+
data => {
|
|
144
|
+
if (data.tag === nativeTag) {
|
|
145
|
+
this.__onAnimatedValueUpdateReceived(data.value);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
this.#updateSubscription = {
|
|
151
|
+
remove: () => {
|
|
152
|
+
// Only this function assigns to `this.#updateSubscription`.
|
|
153
|
+
if (this.#updateSubscription == null) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.#updateSubscription = null;
|
|
157
|
+
subscription.remove();
|
|
158
|
+
NativeAnimatedAPI.stopListeningToAnimatedNodeValue(nativeTag);
|
|
159
|
+
},
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
119
163
|
/**
|
|
120
164
|
* Directly set the value. This will stop any animations running on the value
|
|
121
165
|
* and update all the bound properties.
|
|
@@ -298,6 +342,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
|
|
|
298
342
|
type: 'value',
|
|
299
343
|
value: this._value,
|
|
300
344
|
offset: this._offset,
|
|
345
|
+
debugID: this.__getDebugID(),
|
|
301
346
|
};
|
|
302
347
|
}
|
|
303
348
|
}
|
|
@@ -11,12 +11,14 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type {PlatformConfig} from '../AnimatedPlatformConfig';
|
|
14
|
+
import type {AnimatedNodeConfig} from './AnimatedNode';
|
|
14
15
|
|
|
15
16
|
import AnimatedValue from './AnimatedValue';
|
|
16
17
|
import AnimatedWithChildren from './AnimatedWithChildren';
|
|
17
18
|
import invariant from 'invariant';
|
|
18
19
|
|
|
19
20
|
export type AnimatedValueXYConfig = $ReadOnly<{
|
|
21
|
+
...AnimatedNodeConfig,
|
|
20
22
|
useNativeDriver: boolean,
|
|
21
23
|
}>;
|
|
22
24
|
type ValueXYListenerCallback = (value: {x: number, y: number, ...}) => mixed;
|
|
@@ -49,7 +51,7 @@ export default class AnimatedValueXY extends AnimatedWithChildren {
|
|
|
49
51
|
},
|
|
50
52
|
config?: ?AnimatedValueXYConfig,
|
|
51
53
|
) {
|
|
52
|
-
super();
|
|
54
|
+
super(config);
|
|
53
55
|
const value: any = valueIn || {x: 0, y: 0}; // @flowfixme: shouldn't need `: any`
|
|
54
56
|
if (typeof value.x === 'number' && typeof value.y === 'number') {
|
|
55
57
|
this.x = new AnimatedValue(value.x);
|
|
@@ -17,9 +17,7 @@ import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNa
|
|
|
17
17
|
import {isPublicInstance as isFabricPublicInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstanceUtils';
|
|
18
18
|
import useRefEffect from '../Utilities/useRefEffect';
|
|
19
19
|
import {AnimatedEvent} from './AnimatedEvent';
|
|
20
|
-
import AnimatedNode from './nodes/AnimatedNode';
|
|
21
20
|
import AnimatedProps from './nodes/AnimatedProps';
|
|
22
|
-
import AnimatedValue from './nodes/AnimatedValue';
|
|
23
21
|
import {
|
|
24
22
|
useCallback,
|
|
25
23
|
useEffect,
|
|
@@ -39,11 +37,6 @@ type CallbackRef<T> = T => mixed;
|
|
|
39
37
|
|
|
40
38
|
type UpdateCallback = () => void;
|
|
41
39
|
|
|
42
|
-
type AnimatedValueListeners = Array<{
|
|
43
|
-
propValue: AnimatedValue,
|
|
44
|
-
listenerId: string,
|
|
45
|
-
}>;
|
|
46
|
-
|
|
47
40
|
const useMemoOrAnimatedPropsMemo =
|
|
48
41
|
ReactNativeFeatureFlags.enableAnimatedPropsMemo()
|
|
49
42
|
? useAnimatedPropsMemo
|
|
@@ -169,7 +162,6 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
169
162
|
|
|
170
163
|
const target = getEventTarget(instance);
|
|
171
164
|
const events = [];
|
|
172
|
-
const animatedValueListeners: AnimatedValueListeners = [];
|
|
173
165
|
|
|
174
166
|
for (const propName in props) {
|
|
175
167
|
// $FlowFixMe[invalid-computed-prop]
|
|
@@ -177,8 +169,6 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
177
169
|
if (propValue instanceof AnimatedEvent && propValue.__isNative) {
|
|
178
170
|
propValue.__attach(target, propName);
|
|
179
171
|
events.push([propName, propValue]);
|
|
180
|
-
// $FlowFixMe[incompatible-call] - the `addListenersToPropsValue` drills down the propValue.
|
|
181
|
-
addListenersToPropsValue(propValue, animatedValueListeners);
|
|
182
172
|
}
|
|
183
173
|
}
|
|
184
174
|
|
|
@@ -188,10 +178,6 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
188
178
|
for (const [propName, propValue] of events) {
|
|
189
179
|
propValue.__detach(target, propName);
|
|
190
180
|
}
|
|
191
|
-
|
|
192
|
-
for (const {propValue, listenerId} of animatedValueListeners) {
|
|
193
|
-
propValue.removeListener(listenerId);
|
|
194
|
-
}
|
|
195
181
|
};
|
|
196
182
|
},
|
|
197
183
|
[node, useNativePropsInFabric, props],
|
|
@@ -215,35 +201,6 @@ function reduceAnimatedProps<TProps>(
|
|
|
215
201
|
};
|
|
216
202
|
}
|
|
217
203
|
|
|
218
|
-
function addListenersToPropsValue(
|
|
219
|
-
propValue: AnimatedValue,
|
|
220
|
-
accumulator: AnimatedValueListeners,
|
|
221
|
-
) {
|
|
222
|
-
// propValue can be a scalar value, an array or an object.
|
|
223
|
-
if (propValue instanceof AnimatedValue) {
|
|
224
|
-
const listenerId = propValue.addListener(() => {});
|
|
225
|
-
accumulator.push({propValue, listenerId});
|
|
226
|
-
} else if (Array.isArray(propValue)) {
|
|
227
|
-
// An array can be an array of scalar values, arrays of arrays, or arrays of objects
|
|
228
|
-
for (const prop of propValue) {
|
|
229
|
-
addListenersToPropsValue(prop, accumulator);
|
|
230
|
-
}
|
|
231
|
-
} else if (propValue instanceof Object) {
|
|
232
|
-
addAnimatedValuesListenersToProps(propValue, accumulator);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function addAnimatedValuesListenersToProps(
|
|
237
|
-
props: AnimatedNode,
|
|
238
|
-
accumulator: AnimatedValueListeners,
|
|
239
|
-
) {
|
|
240
|
-
for (const propName in props) {
|
|
241
|
-
// $FlowFixMe[prop-missing] - This is an object contained in a prop, but we don't know the exact type.
|
|
242
|
-
const propValue = props[propName];
|
|
243
|
-
addListenersToPropsValue(propValue, accumulator);
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
|
|
247
204
|
/**
|
|
248
205
|
* Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`
|
|
249
206
|
* and `__detach`. However, this is more complicated because `AnimatedProps`
|
|
@@ -164,6 +164,7 @@ type ButtonProps = $ReadOnly<{|
|
|
|
164
164
|
'aria-disabled'?: ?boolean,
|
|
165
165
|
'aria-expanded'?: ?boolean,
|
|
166
166
|
'aria-selected'?: ?boolean,
|
|
167
|
+
'aria-readonly'?: ?boolean, // Windows
|
|
167
168
|
'aria-multiselectable'?: ?boolean, // Windows
|
|
168
169
|
'aria-required'?: ?boolean, // Windows
|
|
169
170
|
|
|
@@ -312,6 +313,7 @@ const Button: component(
|
|
|
312
313
|
'aria-expanded': ariaExpanded,
|
|
313
314
|
'aria-label': ariaLabel,
|
|
314
315
|
'aria-selected': ariaSelected,
|
|
316
|
+
'aria-readonly': ariaReadOnly, // Windows
|
|
315
317
|
'aria-multiselectable': ariaMultiselectable, // Windows
|
|
316
318
|
'aria-required': ariaRequired, // Windows
|
|
317
319
|
importantForAccessibility,
|
|
@@ -349,6 +351,7 @@ const Button: component(
|
|
|
349
351
|
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
350
352
|
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
351
353
|
selected: ariaSelected ?? accessibilityState?.selected,
|
|
354
|
+
readOnly: ariaReadOnly ?? accessibilityState?.readOnly, // Windows
|
|
352
355
|
multiselectable: ariaMultiselectable ?? accessibilityState?.multiselectable, // Windows
|
|
353
356
|
required: ariaRequired ?? accessibilityState?.required, // Windows
|
|
354
357
|
};
|
|
@@ -105,7 +105,7 @@ export interface DrawerLayoutAndroidProps extends ViewProps {
|
|
|
105
105
|
* The navigation view that will be rendered to the side of the
|
|
106
106
|
* screen and can be pulled in.
|
|
107
107
|
*/
|
|
108
|
-
renderNavigationView: () => JSX.Element;
|
|
108
|
+
renderNavigationView: () => React.JSX.Element;
|
|
109
109
|
|
|
110
110
|
/**
|
|
111
111
|
* Make the drawer take the entire screen and draw the background of
|
|
@@ -10,5 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import typeof DrawerLayoutAndroid from './DrawerLayoutAndroid.android';
|
|
14
|
+
|
|
13
15
|
module.exports =
|
|
14
|
-
require('../UnimplementedViews/UnimplementedView') as $FlowFixMe;
|
|
16
|
+
require('../UnimplementedViews/UnimplementedView') as $FlowFixMe as DrawerLayoutAndroid;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type * as React from 'react';
|
|
11
|
+
|
|
12
|
+
type LayoutConformanceProps = {
|
|
13
|
+
/**
|
|
14
|
+
* strict: Layout in accordance with W3C spec, even when breaking
|
|
15
|
+
* compatibility: Layout with the same behavior as previous versions of React Native
|
|
16
|
+
*/
|
|
17
|
+
mode: 'strict' | 'compatibility';
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const experimental_LayoutConformance: React.ComponentType<LayoutConformanceProps>;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
* @oncall react_native
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import StyleSheet from '../../StyleSheet/StyleSheet';
|
|
13
|
+
import LayoutConformanceNativeComponent from './LayoutConformanceNativeComponent';
|
|
14
|
+
import * as React from 'react';
|
|
15
|
+
|
|
16
|
+
type Props = $ReadOnly<{
|
|
17
|
+
/**
|
|
18
|
+
* strict: Layout in accordance with W3C spec, even when breaking
|
|
19
|
+
* compatibility: Layout with the same behavior as previous versions of React Native
|
|
20
|
+
*/
|
|
21
|
+
mode: 'strict' | 'compatibility',
|
|
22
|
+
|
|
23
|
+
children: React.Node,
|
|
24
|
+
}>;
|
|
25
|
+
|
|
26
|
+
// We want a graceful fallback for apps using legacy arch, but need to know
|
|
27
|
+
// ahead of time whether the component is available, so we test for global.
|
|
28
|
+
// This does not correctly handle mixed arch apps (which is okay, since we just
|
|
29
|
+
// degrade the error experience).
|
|
30
|
+
const isFabricUIManagerInstalled = global?.nativeFabricUIManager != null;
|
|
31
|
+
|
|
32
|
+
function LayoutConformance(props: Props): React.Node {
|
|
33
|
+
return (
|
|
34
|
+
<LayoutConformanceNativeComponent {...props} style={styles.container} />
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function UnimplementedLayoutConformance(props: Props): React.Node {
|
|
39
|
+
if (__DEV__) {
|
|
40
|
+
const warnOnce = require('../../Utilities/warnOnce');
|
|
41
|
+
|
|
42
|
+
warnOnce(
|
|
43
|
+
'layoutconformance-unsupported',
|
|
44
|
+
'"LayoutConformance" is only supported in the New Architecture',
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return props.children;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export default (isFabricUIManagerInstalled
|
|
52
|
+
? LayoutConformance
|
|
53
|
+
: UnimplementedLayoutConformance) as component(...Props);
|
|
54
|
+
|
|
55
|
+
const styles = StyleSheet.create({
|
|
56
|
+
container: {
|
|
57
|
+
display: 'contents',
|
|
58
|
+
},
|
|
59
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
|
12
|
+
import type {ViewProps} from '../View/ViewPropTypes';
|
|
13
|
+
|
|
14
|
+
import * as NativeComponentRegistry from '../../NativeComponent/NativeComponentRegistry';
|
|
15
|
+
|
|
16
|
+
type Props = $ReadOnly<{
|
|
17
|
+
mode: 'strict' | 'compatibility',
|
|
18
|
+
...ViewProps,
|
|
19
|
+
}>;
|
|
20
|
+
|
|
21
|
+
const LayoutConformanceNativeComponent: HostComponent<Props> =
|
|
22
|
+
NativeComponentRegistry.get<Props>('LayoutConformance', () => ({
|
|
23
|
+
uiViewClassName: 'LayoutConformance',
|
|
24
|
+
validAttributes: {
|
|
25
|
+
mode: true,
|
|
26
|
+
},
|
|
27
|
+
}));
|
|
28
|
+
|
|
29
|
+
export default LayoutConformanceNativeComponent;
|
|
@@ -75,6 +75,7 @@ type Props = $ReadOnly<{|
|
|
|
75
75
|
'aria-disabled'?: ?boolean,
|
|
76
76
|
'aria-expanded'?: ?boolean,
|
|
77
77
|
'aria-selected'?: ?boolean,
|
|
78
|
+
'aria-readonly'?: ?boolean, // Windows
|
|
78
79
|
'aria-multiselectable'?: ?boolean, // Windows
|
|
79
80
|
'aria-required'?: ?boolean, // Windows
|
|
80
81
|
/**
|
|
@@ -264,6 +265,7 @@ function Pressable(
|
|
|
264
265
|
'aria-expanded': ariaExpanded,
|
|
265
266
|
'aria-label': ariaLabel,
|
|
266
267
|
'aria-selected': ariaSelected,
|
|
268
|
+
'aria-readonly': ariaReadOnly,
|
|
267
269
|
'aria-multiselectable': ariaMultiselectable, // Windows
|
|
268
270
|
'aria-required': ariaRequired, // Windows
|
|
269
271
|
cancelable,
|
|
@@ -309,6 +311,7 @@ function Pressable(
|
|
|
309
311
|
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
310
312
|
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
311
313
|
selected: ariaSelected ?? accessibilityState?.selected,
|
|
314
|
+
readOnly: ariaReadOnly ?? accessibilityState?.readOnly,
|
|
312
315
|
multiselectable: ariaMultiselectable ?? accessibilityState?.multiselectable, // Windows
|
|
313
316
|
required: ariaRequired ?? accessibilityState?.required, // Windows
|
|
314
317
|
};
|
|
@@ -136,6 +136,11 @@ export interface DocumentSelectionState extends EventEmitter {
|
|
|
136
136
|
* @see https://reactnative.dev/docs/textinput#props
|
|
137
137
|
*/
|
|
138
138
|
export interface TextInputIOSProps {
|
|
139
|
+
/**
|
|
140
|
+
* If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
|
|
141
|
+
*/
|
|
142
|
+
disableKeyboardShortcuts?: boolean | undefined;
|
|
143
|
+
|
|
139
144
|
/**
|
|
140
145
|
* enum('never', 'while-editing', 'unless-editing', 'always')
|
|
141
146
|
* When the clear button should appear on the right side of the text view
|
|
@@ -216,6 +216,12 @@ export type enterKeyHintType =
|
|
|
216
216
|
type PasswordRules = string;
|
|
217
217
|
|
|
218
218
|
type IOSProps = $ReadOnly<{|
|
|
219
|
+
/**
|
|
220
|
+
* If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
|
|
221
|
+
* @platform ios
|
|
222
|
+
*/
|
|
223
|
+
disableKeyboardShortcuts?: ?boolean,
|
|
224
|
+
|
|
219
225
|
/**
|
|
220
226
|
* When the clear button should appear on the right side of the text view.
|
|
221
227
|
* This property is supported only for single-line TextInput component.
|
|
@@ -260,6 +260,12 @@ export type enterKeyHintType =
|
|
|
260
260
|
type PasswordRules = string;
|
|
261
261
|
|
|
262
262
|
type IOSProps = $ReadOnly<{|
|
|
263
|
+
/**
|
|
264
|
+
* If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
|
|
265
|
+
* @platform ios
|
|
266
|
+
*/
|
|
267
|
+
disableKeyboardShortcuts?: ?boolean,
|
|
268
|
+
|
|
263
269
|
/**
|
|
264
270
|
* When the clear button should appear on the right side of the text view.
|
|
265
271
|
* This property is supported only for single-line TextInput component.
|
|
@@ -272,6 +272,12 @@ export type enterKeyHintType =
|
|
|
272
272
|
type PasswordRules = string;
|
|
273
273
|
|
|
274
274
|
type IOSProps = $ReadOnly<{|
|
|
275
|
+
/**
|
|
276
|
+
* If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false.
|
|
277
|
+
* @platform ios
|
|
278
|
+
*/
|
|
279
|
+
disableKeyboardShortcuts?: ?boolean,
|
|
280
|
+
|
|
275
281
|
/**
|
|
276
282
|
* When the clear button should appear on the right side of the text view.
|
|
277
283
|
* This property is supported only for single-line TextInput component.
|
|
@@ -1360,6 +1366,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1360
1366
|
'aria-disabled': ariaDisabled,
|
|
1361
1367
|
'aria-expanded': ariaExpanded,
|
|
1362
1368
|
'aria-selected': ariaSelected,
|
|
1369
|
+
'aria-readonly': ariaReadOnly, // Windows
|
|
1363
1370
|
'aria-multiselectable': ariaMultiselectable, // Windows
|
|
1364
1371
|
'aria-required': ariaRequired, // Windows
|
|
1365
1372
|
accessibilityState,
|
|
@@ -1691,6 +1698,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1691
1698
|
ariaDisabled != null ||
|
|
1692
1699
|
ariaExpanded != null ||
|
|
1693
1700
|
ariaSelected != null ||
|
|
1701
|
+
ariaReadOnly != null || // Windows
|
|
1694
1702
|
ariaMultiselectable != null || // Windows
|
|
1695
1703
|
ariaRequired != null // Windows
|
|
1696
1704
|
) {
|
|
@@ -1700,6 +1708,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1700
1708
|
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
1701
1709
|
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
1702
1710
|
selected: ariaSelected ?? accessibilityState?.selected,
|
|
1711
|
+
readOnly: ariaReadOnly ?? accessibilityState?.readOnly, // Windows
|
|
1703
1712
|
multiselectable:
|
|
1704
1713
|
ariaMultiselectable ?? accessibilityState?.multiselectable, // Windows
|
|
1705
1714
|
required: ariaRequired ?? accessibilityState?.required, // Windows
|
|
@@ -146,6 +146,8 @@ class TouchableBounce extends React.Component<Props, State> {
|
|
|
146
146
|
this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded,
|
|
147
147
|
selected:
|
|
148
148
|
this.props['aria-selected'] ?? this.props.accessibilityState?.selected,
|
|
149
|
+
readOnly:
|
|
150
|
+
this.props['aria-readonly'] ?? this.props.accessibilityState?.readOnly, // Windows
|
|
149
151
|
multiselectable:
|
|
150
152
|
this.props['aria-multiselectable'] ??
|
|
151
153
|
this.props.accessibilityState?.multiselectable, // Windows
|
|
@@ -265,6 +265,8 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
|
|
|
265
265
|
this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded,
|
|
266
266
|
selected:
|
|
267
267
|
this.props['aria-selected'] ?? this.props.accessibilityState?.selected,
|
|
268
|
+
readOnly:
|
|
269
|
+
this.props['aria-readonly'] ?? this.props.accessibilityState?.readOnly,
|
|
268
270
|
multiselectable:
|
|
269
271
|
this.props['aria-multiselectable'] ??
|
|
270
272
|
this.props.accessibilityState?.multiselectable, // Windows
|
|
@@ -235,6 +235,8 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|
|
235
235
|
this.props['aria-expanded'] ?? this.props.accessibilityState?.expanded,
|
|
236
236
|
selected:
|
|
237
237
|
this.props['aria-selected'] ?? this.props.accessibilityState?.selected,
|
|
238
|
+
readOnly:
|
|
239
|
+
this.props['aria-readonly'] ?? this.props.accessibilityState?.readOnly, // Windows
|
|
238
240
|
multiselectable:
|
|
239
241
|
this.props['aria-multiselectable'] ??
|
|
240
242
|
this.props.accessibilityState?.multiselectable, // Windows
|
|
@@ -59,6 +59,7 @@ type Props = $ReadOnly<{|
|
|
|
59
59
|
'aria-disabled'?: ?boolean,
|
|
60
60
|
'aria-expanded'?: ?boolean,
|
|
61
61
|
'aria-selected'?: ?boolean,
|
|
62
|
+
'aria-readonly'?: ?boolean, // Windows
|
|
62
63
|
'aria-multiselectable'?: ?boolean, // Windows
|
|
63
64
|
'aria-required'?: ?boolean, // Windows
|
|
64
65
|
'aria-hidden'?: ?boolean,
|
|
@@ -224,6 +225,7 @@ const TouchableWithoutFeedback: React.AbstractComponent<
|
|
|
224
225
|
disabled: props['aria-disabled'] ?? props.accessibilityState?.disabled,
|
|
225
226
|
expanded: props['aria-expanded'] ?? props.accessibilityState?.expanded,
|
|
226
227
|
selected: props['aria-selected'] ?? props.accessibilityState?.selected,
|
|
228
|
+
readonly: props['aria-readonly'] ?? props.accessibilityState?.readOnly, // Windows
|
|
227
229
|
multiselectable:
|
|
228
230
|
props['aria-multiselectable'] ??
|
|
229
231
|
props.accessibilityState?.multiselectable, // Windows
|
|
@@ -84,6 +84,7 @@ const View: component(
|
|
|
84
84
|
'aria-level': ariaLevel,
|
|
85
85
|
'aria-live': ariaLive,
|
|
86
86
|
'aria-posinset': ariaPosinset, // Windows
|
|
87
|
+
'aria-readonly': ariaReadOnly, // Windows
|
|
87
88
|
'aria-selected': ariaSelected,
|
|
88
89
|
'aria-setsize': ariaSetsize, // Windows
|
|
89
90
|
'aria-valuemax': ariaValueMax,
|
|
@@ -111,6 +112,7 @@ const View: component(
|
|
|
111
112
|
ariaDisabled != null ||
|
|
112
113
|
ariaExpanded != null ||
|
|
113
114
|
ariaSelected != null ||
|
|
115
|
+
ariaReadOnly != null || // Windows
|
|
114
116
|
ariaMultiselectable != null || // Windows
|
|
115
117
|
ariaRequired != null // Windows
|
|
116
118
|
) {
|
|
@@ -120,6 +122,7 @@ const View: component(
|
|
|
120
122
|
disabled: ariaDisabled ?? accessibilityState?.disabled,
|
|
121
123
|
expanded: ariaExpanded ?? accessibilityState?.expanded,
|
|
122
124
|
selected: ariaSelected ?? accessibilityState?.selected,
|
|
125
|
+
readOnly: ariaReadOnly ?? accessibilityState?.readOnly, // Windows
|
|
123
126
|
multiselectable:
|
|
124
127
|
ariaMultiselectable ?? accessibilityState?.multiselectable, // Windows
|
|
125
128
|
required: ariaRequired ?? accessibilityState?.required, // Windows
|
|
@@ -183,14 +183,19 @@ export interface AccessibilityState {
|
|
|
183
183
|
* When present, informs accessible tools the element is expanded or collapsed
|
|
184
184
|
*/
|
|
185
185
|
expanded?: boolean | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* When present, informs accessible tools the element is read only
|
|
188
|
+
* @platform windows
|
|
189
|
+
*/
|
|
190
|
+
readOnly?: boolean | undefined;
|
|
186
191
|
/**
|
|
187
192
|
* When present, informs accessible tools the element can have multiple items selected
|
|
188
|
-
*
|
|
193
|
+
* @platform windows
|
|
189
194
|
*/
|
|
190
195
|
multiselectable?: boolean | undefined;
|
|
191
196
|
/**
|
|
192
197
|
* When present, informs accessible tools the element requires selection
|
|
193
|
-
*
|
|
198
|
+
* @platform windows
|
|
194
199
|
*/
|
|
195
200
|
required?: boolean | undefined;
|
|
196
201
|
}
|
|
@@ -318,11 +318,4 @@ export interface ViewProps
|
|
|
318
318
|
* Used to reference react managed views from native code.
|
|
319
319
|
*/
|
|
320
320
|
nativeID?: string | undefined;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Contols whether this view, and its transitive children, are laid in a way
|
|
324
|
-
* consistent with web browsers ('strict'), or consistent with existing
|
|
325
|
-
* React Native code which may rely on incorrect behavior ('classic').
|
|
326
|
-
*/
|
|
327
|
-
experimental_layoutConformance?: 'strict' | 'classic' | undefined;
|
|
328
321
|
}
|
|
@@ -578,15 +578,6 @@ export type ViewProps = $ReadOnly<{|
|
|
|
578
578
|
*/
|
|
579
579
|
collapsableChildren?: ?boolean,
|
|
580
580
|
|
|
581
|
-
/**
|
|
582
|
-
* Contols whether this view, and its transitive children, are laid in a way
|
|
583
|
-
* consistent with web browsers ('strict'), or consistent with existing
|
|
584
|
-
* React Native code which may rely on incorrect behavior ('classic').
|
|
585
|
-
*
|
|
586
|
-
* This prop only works when using Fabric.
|
|
587
|
-
*/
|
|
588
|
-
experimental_layoutConformance?: ?('strict' | 'classic'),
|
|
589
|
-
|
|
590
581
|
/**
|
|
591
582
|
* Used to locate this view from native classes. Has precedence over `nativeID` prop.
|
|
592
583
|
*
|