@office-iss/react-native-win32 0.0.0-canary.257 → 0.0.0-canary.259
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 +3 -3
- package/CHANGELOG.json +55 -1
- package/CHANGELOG.md +28 -8
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -0
- package/Libraries/Animated/useAnimatedProps.js +68 -3
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Components/ScrollView/ScrollView.js +124 -165
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/TextInput.js +204 -73
- package/Libraries/Components/TextInput/TextInput.win32.js +204 -79
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +11 -0
- package/Libraries/Core/ErrorHandlers.js +9 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +2 -0
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +1 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +20 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +20 -8
- package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +3 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +3 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +0 -6
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/renderApplication.js +0 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +46 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +48 -5
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +226 -41
- package/Libraries/Text/Text.js +393 -196
- package/Libraries/Text/Text.win32.js +440 -228
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/HMRClient.js +1 -0
- package/Libraries/Utilities/Platform.android.js +1 -1
- package/Libraries/Utilities/Platform.d.ts +1 -1
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +1 -0
- package/index.js +1 -0
- package/index.win32.js +1 -0
- package/jest/mockComponent.js +4 -1
- package/jest/setup.js +8 -1
- package/overrides.json +11 -11
- package/package.json +23 -23
- package/src/private/core/components/HScrollViewNativeComponents.js +55 -0
- package/src/private/core/components/VScrollViewNativeComponents.js +47 -0
- package/src/private/core/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +70 -12
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -4
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/RawPerformanceEntry.js +5 -0
- package/types/experimental.d.ts +12 -1
- package/Libraries/Text/TextOptimized.js +0 -538
package/.flowconfig
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
.*/node_modules/sample-apps/.*
|
|
55
55
|
.*/node_modules/playground/.*
|
|
56
56
|
|
|
57
|
-
; Ignore templates for 'react-native init'
|
|
57
|
+
; Ignore templates for 'npx @react-native-community/cli init'
|
|
58
58
|
<PROJECT_ROOT>/packages/react-native/template/.*
|
|
59
59
|
<PROJECT_ROOT>/packages/react-native/sdks/.*
|
|
60
60
|
|
|
@@ -127,7 +127,7 @@ module.name_mapper='^@office-iss/react-native-win32$' -> '<PROJECT_ROOT>/index.w
|
|
|
127
127
|
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
|
|
128
128
|
module.name_mapper='^@office-iss/react-native-win32/\(.*\)$' -> '<PROJECT_ROOT>\/1'
|
|
129
129
|
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
|
|
130
|
-
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
130
|
+
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\|xml\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
|
|
131
131
|
|
|
132
132
|
suppress_type=$FlowIssue
|
|
133
133
|
suppress_type=$FlowFixMe
|
|
@@ -159,4 +159,4 @@ untyped-import
|
|
|
159
159
|
untyped-type-import
|
|
160
160
|
|
|
161
161
|
[version]
|
|
162
|
-
^0.
|
|
162
|
+
^0.241.0
|
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,61 @@
|
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 22 Aug 2024 05:23:05 GMT",
|
|
6
|
+
"version": "0.0.0-canary.259",
|
|
7
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.259",
|
|
8
|
+
"comments": {
|
|
9
|
+
"prerelease": [
|
|
10
|
+
{
|
|
11
|
+
"author": "tatianakapos@microsoft.com",
|
|
12
|
+
"package": "@office-iss/react-native-win32",
|
|
13
|
+
"commit": "bccbec07eeeda80b870765f2b207a6616b69732b",
|
|
14
|
+
"comment": "integrate react native nightly 7-19"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"date": "Thu, 08 Aug 2024 05:16:47 GMT",
|
|
21
|
+
"version": "0.0.0-canary.258",
|
|
22
|
+
"tag": "@office-iss/react-native-win32_v0.0.0-canary.258",
|
|
23
|
+
"comments": {
|
|
24
|
+
"prerelease": [
|
|
25
|
+
{
|
|
26
|
+
"author": "jthysell@microsoft.com",
|
|
27
|
+
"package": "@office-iss/react-native-win32",
|
|
28
|
+
"commit": "c5dff02edd12aa4a9529b325c7630eb558d375f7",
|
|
29
|
+
"comment": "Integrate 7/1"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"author": "beachball",
|
|
33
|
+
"package": "@office-iss/react-native-win32",
|
|
34
|
+
"comment": "Bump @rnw-scripts/eslint-config to v1.2.26",
|
|
35
|
+
"commit": "not available"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"author": "beachball",
|
|
39
|
+
"package": "@office-iss/react-native-win32",
|
|
40
|
+
"comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.30",
|
|
41
|
+
"commit": "not available"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"author": "beachball",
|
|
45
|
+
"package": "@office-iss/react-native-win32",
|
|
46
|
+
"comment": "Bump @rnw-scripts/just-task to v2.3.43",
|
|
47
|
+
"commit": "not available"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"author": "beachball",
|
|
51
|
+
"package": "@office-iss/react-native-win32",
|
|
52
|
+
"comment": "Bump react-native-platform-override to v1.9.45",
|
|
53
|
+
"commit": "not available"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"date": "Wed, 24 Jul 2024 05:24:34 GMT",
|
|
6
60
|
"version": "0.0.0-canary.257",
|
|
7
61
|
"tag": "@office-iss/react-native-win32_v0.0.0-canary.257",
|
|
8
62
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,41 @@
|
|
|
1
1
|
# Change Log - @office-iss/react-native-win32
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 22 Aug 2024 05:23:05 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## 0.0.0-canary.
|
|
7
|
+
## 0.0.0-canary.259
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Thu, 22 Aug 2024 05:23:05 GMT
|
|
10
10
|
|
|
11
11
|
### Changes
|
|
12
12
|
|
|
13
|
-
- integrate
|
|
14
|
-
- Bump @rnw-scripts/eslint-config to v1.2.25
|
|
15
|
-
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.29
|
|
16
|
-
- Bump @rnw-scripts/just-task to v2.3.42
|
|
17
|
-
- Bump react-native-platform-override to v1.9.44
|
|
13
|
+
- integrate react native nightly 7-19 (tatianakapos@microsoft.com)
|
|
18
14
|
|
|
15
|
+
## 0.0.0-canary.258
|
|
16
|
+
|
|
17
|
+
Thu, 08 Aug 2024 05:16:47 GMT
|
|
18
|
+
|
|
19
|
+
### Changes
|
|
20
|
+
|
|
21
|
+
- Integrate 7/1 (jthysell@microsoft.com)
|
|
22
|
+
- Bump @rnw-scripts/eslint-config to v1.2.26
|
|
23
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.30
|
|
24
|
+
- Bump @rnw-scripts/just-task to v2.3.43
|
|
25
|
+
- Bump react-native-platform-override to v1.9.45
|
|
26
|
+
|
|
27
|
+
## 0.0.0-canary.257
|
|
28
|
+
|
|
29
|
+
Wed, 24 Jul 2024 05:24:34 GMT
|
|
30
|
+
|
|
31
|
+
### Changes
|
|
32
|
+
|
|
33
|
+
- integrate 6/14 (yajurgrover24@gmail.com)
|
|
34
|
+
- Bump @rnw-scripts/eslint-config to v1.2.25
|
|
35
|
+
- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.29
|
|
36
|
+
- Bump @rnw-scripts/just-task to v2.3.42
|
|
37
|
+
- Bump react-native-platform-override to v1.9.44
|
|
38
|
+
|
|
19
39
|
## 0.0.0-canary.256
|
|
20
40
|
|
|
21
41
|
Wed, 10 Jul 2024 05:15:28 GMT
|
package/Libraries/Alert/Alert.js
CHANGED
|
@@ -98,10 +98,13 @@ class Alert {
|
|
|
98
98
|
const onAction = (action, buttonKey) => {
|
|
99
99
|
if (action === constants.buttonClicked) {
|
|
100
100
|
if (buttonKey === constants.buttonNeutral) {
|
|
101
|
+
// $FlowFixMe[incompatible-type]
|
|
101
102
|
buttonNeutral.onPress && buttonNeutral.onPress();
|
|
102
103
|
} else if (buttonKey === constants.buttonNegative) {
|
|
104
|
+
// $FlowFixMe[incompatible-type]
|
|
103
105
|
buttonNegative.onPress && buttonNegative.onPress();
|
|
104
106
|
} else if (buttonKey === constants.buttonPositive) {
|
|
107
|
+
// $FlowFixMe[incompatible-type]
|
|
105
108
|
buttonPositive.onPress && buttonPositive.onPress();
|
|
106
109
|
}
|
|
107
110
|
} else if (action === constants.dismissed) {
|
|
@@ -49,6 +49,7 @@ const NativeAnimatedAPI = NativeAnimatedHelper.API;
|
|
|
49
49
|
* transform which can receive values from multiple parents.
|
|
50
50
|
*/
|
|
51
51
|
export function flushValue(rootNode: AnimatedNode): void {
|
|
52
|
+
// eslint-disable-next-line func-call-spacing
|
|
52
53
|
const leaves = new Set<{update: () => void, ...}>();
|
|
53
54
|
function findAnimatedStyles(node: AnimatedNode) {
|
|
54
55
|
// $FlowFixMe[prop-missing]
|
|
@@ -49,6 +49,14 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
49
49
|
);
|
|
50
50
|
const useNativePropsInFabric =
|
|
51
51
|
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
|
52
|
+
const useSetNativePropsInNativeAnimationsInFabric =
|
|
53
|
+
ReactNativeFeatureFlags.shouldUseSetNativePropsInNativeAnimationsInFabric();
|
|
54
|
+
|
|
55
|
+
const useAnimatedPropsLifecycle =
|
|
56
|
+
ReactNativeFeatureFlags.usePassiveEffectsForAnimations()
|
|
57
|
+
? useAnimatedPropsLifecycle_passiveEffects
|
|
58
|
+
: useAnimatedPropsLifecycle_layoutEffects;
|
|
59
|
+
|
|
52
60
|
useAnimatedPropsLifecycle(node);
|
|
53
61
|
|
|
54
62
|
// TODO: This "effect" does three things:
|
|
@@ -87,7 +95,12 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
87
95
|
if (isFabricNode) {
|
|
88
96
|
// Call `scheduleUpdate` to synchronise Fiber and Shadow tree.
|
|
89
97
|
// Must not be called in Paper.
|
|
90
|
-
|
|
98
|
+
if (useSetNativePropsInNativeAnimationsInFabric) {
|
|
99
|
+
// $FlowFixMe[incompatible-use]
|
|
100
|
+
instance.setNativeProps(node.__getAnimatedValue());
|
|
101
|
+
} else {
|
|
102
|
+
scheduleUpdate();
|
|
103
|
+
}
|
|
91
104
|
}
|
|
92
105
|
return;
|
|
93
106
|
}
|
|
@@ -157,7 +170,12 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
|
|
|
157
170
|
}
|
|
158
171
|
};
|
|
159
172
|
},
|
|
160
|
-
[
|
|
173
|
+
[
|
|
174
|
+
node,
|
|
175
|
+
useNativePropsInFabric,
|
|
176
|
+
useSetNativePropsInNativeAnimationsInFabric,
|
|
177
|
+
props,
|
|
178
|
+
],
|
|
161
179
|
);
|
|
162
180
|
const callbackRef = useRefEffect<TInstance>(refEffect);
|
|
163
181
|
|
|
@@ -182,7 +200,7 @@ function reduceAnimatedProps<TProps>(
|
|
|
182
200
|
* nodes. So in order to optimize this, we avoid detaching until the next attach
|
|
183
201
|
* unless we are unmounting.
|
|
184
202
|
*/
|
|
185
|
-
function
|
|
203
|
+
function useAnimatedPropsLifecycle_layoutEffects(node: AnimatedProps): void {
|
|
186
204
|
const prevNodeRef = useRef<?AnimatedProps>(null);
|
|
187
205
|
const isUnmountingRef = useRef<boolean>(false);
|
|
188
206
|
|
|
@@ -220,6 +238,53 @@ function useAnimatedPropsLifecycle(node: AnimatedProps): void {
|
|
|
220
238
|
}, [node]);
|
|
221
239
|
}
|
|
222
240
|
|
|
241
|
+
/**
|
|
242
|
+
* Manages the lifecycle of the supplied `AnimatedProps` by invoking `__attach`
|
|
243
|
+
* and `__detach`. However, this is more complicated because `AnimatedProps`
|
|
244
|
+
* uses reference counting to determine when to recursively detach its children
|
|
245
|
+
* nodes. So in order to optimize this, we avoid detaching until the next attach
|
|
246
|
+
* unless we are unmounting.
|
|
247
|
+
*
|
|
248
|
+
* NOTE: unlike `useAnimatedPropsLifecycle_layoutEffects`, this version uses passive effects to setup animation graph.
|
|
249
|
+
*/
|
|
250
|
+
function useAnimatedPropsLifecycle_passiveEffects(node: AnimatedProps): void {
|
|
251
|
+
const prevNodeRef = useRef<?AnimatedProps>(null);
|
|
252
|
+
const isUnmountingRef = useRef<boolean>(false);
|
|
253
|
+
|
|
254
|
+
useEffect(() => {
|
|
255
|
+
// It is ok for multiple components to call `flushQueue` because it noops
|
|
256
|
+
// if the queue is empty. When multiple animated components are mounted at
|
|
257
|
+
// the same time. Only first component flushes the queue and the others will noop.
|
|
258
|
+
NativeAnimatedHelper.API.flushQueue();
|
|
259
|
+
});
|
|
260
|
+
|
|
261
|
+
useEffect(() => {
|
|
262
|
+
isUnmountingRef.current = false;
|
|
263
|
+
return () => {
|
|
264
|
+
isUnmountingRef.current = true;
|
|
265
|
+
};
|
|
266
|
+
}, []);
|
|
267
|
+
|
|
268
|
+
useEffect(() => {
|
|
269
|
+
node.__attach();
|
|
270
|
+
if (prevNodeRef.current != null) {
|
|
271
|
+
const prevNode = prevNodeRef.current;
|
|
272
|
+
// TODO: Stop restoring default values (unless `reset` is called).
|
|
273
|
+
prevNode.__restoreDefaultValues();
|
|
274
|
+
prevNode.__detach();
|
|
275
|
+
prevNodeRef.current = null;
|
|
276
|
+
}
|
|
277
|
+
return () => {
|
|
278
|
+
if (isUnmountingRef.current) {
|
|
279
|
+
// NOTE: Do not restore default values on unmount, see D18197735.
|
|
280
|
+
node.__detach();
|
|
281
|
+
} else {
|
|
282
|
+
prevNodeRef.current = node;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}, [node]);
|
|
286
|
+
}
|
|
287
|
+
|
|
223
288
|
function getEventTarget<TInstance>(instance: TInstance): TInstance {
|
|
224
289
|
return typeof instance === 'object' &&
|
|
225
290
|
typeof instance?.getScrollableNode === 'function'
|
|
@@ -102,6 +102,7 @@ function genMethod(moduleID: number, methodID: number, type: MethodType) {
|
|
|
102
102
|
// In case we reject, capture a useful stack trace here.
|
|
103
103
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
104
104
|
* this parameters */
|
|
105
|
+
// $FlowFixMe[incompatible-type]
|
|
105
106
|
const enqueueingFrameError: ExtendedError = new Error();
|
|
106
107
|
return new Promise((resolve, reject) => {
|
|
107
108
|
BatchedBridge.enqueueNativeCall(
|
|
@@ -171,6 +172,7 @@ function updateErrorWithErrorData(
|
|
|
171
172
|
): ExtendedError {
|
|
172
173
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
173
174
|
* parameters */
|
|
175
|
+
// $FlowFixMe[incompatible-return]
|
|
174
176
|
return Object.assign(error, errorData || {});
|
|
175
177
|
}
|
|
176
178
|
|