@office-iss/react-native-win32 0.81.0-preview.5 → 0.81.0-preview.6
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 -0
- package/CHANGELOG.json +16 -1
- package/CHANGELOG.md +13 -5
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TextInput/TextInput.js +6 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +5 -0
- package/Libraries/Components/View/View.js +5 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/flow/HermesInternalType.js +114 -0
- package/flow/Stringish.js +14 -0
- package/flow/bom.js.flow +489 -0
- package/flow/console.js +49 -0
- package/flow/cssom.js.flow +575 -0
- package/flow/dom.js.flow +6289 -0
- package/flow/global.js +88 -0
- package/flow/streams.js.flow +140 -0
- package/overrides.json +3 -3
- package/package.json +11 -11
- package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -0
package/flow/global.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
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
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `global` is a object containing all the global variables for React Native.
|
|
13
|
+
*
|
|
14
|
+
* NOTE: Consider cross-platform as well as JS environments compatibility
|
|
15
|
+
* when defining the types here. Consider both presence (`?`) as well as
|
|
16
|
+
* writeability (`+`) when defining types.
|
|
17
|
+
*/
|
|
18
|
+
// $FlowFixMe[libdef-override]
|
|
19
|
+
declare var global: {
|
|
20
|
+
// setUpGlobals
|
|
21
|
+
+window: typeof global,
|
|
22
|
+
+self: typeof global,
|
|
23
|
+
+process: {
|
|
24
|
+
+env: {
|
|
25
|
+
+NODE_ENV: 'development' | 'production',
|
|
26
|
+
},
|
|
27
|
+
+argv?: $ReadOnlyArray<string>,
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
// setUpPerformance
|
|
31
|
+
+performance: Performance,
|
|
32
|
+
|
|
33
|
+
// setUpXHR
|
|
34
|
+
+XMLHttpRequest: typeof XMLHttpRequest,
|
|
35
|
+
+FormData: typeof FormData,
|
|
36
|
+
+fetch: typeof fetch,
|
|
37
|
+
+Headers: typeof Headers,
|
|
38
|
+
+Request: typeof Request,
|
|
39
|
+
+Response: typeof Response,
|
|
40
|
+
+WebSocket: typeof WebSocket,
|
|
41
|
+
+Blob: typeof Blob,
|
|
42
|
+
+File: typeof File,
|
|
43
|
+
+FileReader: typeof FileReader,
|
|
44
|
+
+URL: typeof URL,
|
|
45
|
+
+URLSearchParams: typeof URLSearchParams,
|
|
46
|
+
+AbortController: typeof AbortController,
|
|
47
|
+
+AbortSignal: typeof AbortSignal,
|
|
48
|
+
|
|
49
|
+
// setUpAlert
|
|
50
|
+
+alert: typeof alert,
|
|
51
|
+
|
|
52
|
+
// setUpNavigator
|
|
53
|
+
+navigator: {
|
|
54
|
+
+product: 'ReactNative',
|
|
55
|
+
+appName?: ?string,
|
|
56
|
+
...
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
// setUpTimers
|
|
60
|
+
+setInterval: typeof setInterval,
|
|
61
|
+
+clearInterval: typeof clearInterval,
|
|
62
|
+
+setTimeout: typeof setTimeout,
|
|
63
|
+
+clearTimeout: typeof clearTimeout,
|
|
64
|
+
+requestAnimationFrame: typeof requestAnimationFrame,
|
|
65
|
+
+cancelAnimationFrame: typeof cancelAnimationFrame,
|
|
66
|
+
+requestIdleCallback: typeof requestIdleCallback,
|
|
67
|
+
+cancelIdleCallback: typeof cancelIdleCallback,
|
|
68
|
+
+queueMicrotask: typeof queueMicrotask,
|
|
69
|
+
+setImmediate: typeof setImmediate,
|
|
70
|
+
+clearImmediate: typeof clearImmediate,
|
|
71
|
+
|
|
72
|
+
// Polyfills
|
|
73
|
+
+console: typeof console,
|
|
74
|
+
|
|
75
|
+
// JavaScript environments specific
|
|
76
|
+
+HermesInternal: ?$HermesInternalType,
|
|
77
|
+
|
|
78
|
+
// Internal-specific
|
|
79
|
+
+__DEV__?: boolean,
|
|
80
|
+
+RN$Bridgeless?: boolean,
|
|
81
|
+
|
|
82
|
+
// setupDOM
|
|
83
|
+
+DOMRect: typeof DOMRect,
|
|
84
|
+
+DOMRectReadOnly: typeof DOMRectReadOnly,
|
|
85
|
+
|
|
86
|
+
// Undeclared properties are implicitly `any`.
|
|
87
|
+
[string | symbol]: any,
|
|
88
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
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
|
+
// Adapted from https://github.com/flow-typed/flow-typed/blob/main/definitions/environments/streams/flow_v0.261.x-/streams.js
|
|
12
|
+
|
|
13
|
+
type TextEncodeOptions = {options?: boolean, ...};
|
|
14
|
+
|
|
15
|
+
declare class TextEncoder {
|
|
16
|
+
encode(buffer: string, options?: TextEncodeOptions): Uint8Array;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare class ReadableStreamController {
|
|
20
|
+
close(): void;
|
|
21
|
+
|
|
22
|
+
constructor(
|
|
23
|
+
stream: ReadableStream,
|
|
24
|
+
underlyingSource: UnderlyingSource,
|
|
25
|
+
size: number,
|
|
26
|
+
highWaterMark: number,
|
|
27
|
+
): void;
|
|
28
|
+
|
|
29
|
+
desiredSize: number;
|
|
30
|
+
// $FlowFixMe[unclear-type]
|
|
31
|
+
enqueue(chunk: any): void;
|
|
32
|
+
error(error: Error): void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare class ReadableStreamReader {
|
|
36
|
+
cancel(reason: string): void;
|
|
37
|
+
|
|
38
|
+
closed: boolean;
|
|
39
|
+
|
|
40
|
+
constructor(stream: ReadableStream): void;
|
|
41
|
+
read(): Promise<{
|
|
42
|
+
done: boolean,
|
|
43
|
+
// $FlowFixMe[unclear-type]
|
|
44
|
+
value: ?any,
|
|
45
|
+
...
|
|
46
|
+
}>;
|
|
47
|
+
releaseLock(): void;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
declare interface UnderlyingSource {
|
|
51
|
+
autoAllocateChunkSize?: number;
|
|
52
|
+
cancel?: (reason: string) => ?Promise<void>;
|
|
53
|
+
|
|
54
|
+
pull?: (controller: ReadableStreamController) => ?Promise<void>;
|
|
55
|
+
start?: (controller: ReadableStreamController) => ?Promise<void>;
|
|
56
|
+
type?: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
declare class TransformStream {
|
|
60
|
+
readable: ReadableStream;
|
|
61
|
+
writable: WritableStream;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
interface PipeThroughTransformStream {
|
|
65
|
+
readable: ReadableStream;
|
|
66
|
+
writable: WritableStream;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
type PipeToOptions = {
|
|
70
|
+
preventAbort?: boolean,
|
|
71
|
+
preventCancel?: boolean,
|
|
72
|
+
preventClose?: boolean,
|
|
73
|
+
...
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
type QueuingStrategy = {
|
|
77
|
+
highWaterMark: number,
|
|
78
|
+
// $FlowFixMe[unclear-type]
|
|
79
|
+
size(chunk: ?any): number,
|
|
80
|
+
...
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
declare class ReadableStream {
|
|
84
|
+
cancel(reason: string): void;
|
|
85
|
+
|
|
86
|
+
constructor(
|
|
87
|
+
underlyingSource: ?UnderlyingSource,
|
|
88
|
+
queuingStrategy: ?QueuingStrategy,
|
|
89
|
+
): void;
|
|
90
|
+
|
|
91
|
+
getReader(): ReadableStreamReader;
|
|
92
|
+
locked: boolean;
|
|
93
|
+
// $FlowFixMe[unclear-type]
|
|
94
|
+
pipeThrough(transform: PipeThroughTransformStream, options: ?any): void;
|
|
95
|
+
pipeTo(dest: WritableStream, options: ?PipeToOptions): Promise<void>;
|
|
96
|
+
tee(): [ReadableStream, ReadableStream];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
declare interface WritableStreamController {
|
|
100
|
+
error(error: Error): void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare interface UnderlyingSink {
|
|
104
|
+
abort?: (reason: string) => ?Promise<void>;
|
|
105
|
+
autoAllocateChunkSize?: number;
|
|
106
|
+
|
|
107
|
+
close?: (controller: WritableStreamController) => ?Promise<void>;
|
|
108
|
+
start?: (controller: WritableStreamController) => ?Promise<void>;
|
|
109
|
+
type?: string;
|
|
110
|
+
// $FlowFixMe[unclear-type]
|
|
111
|
+
write?: (chunk: any, controller: WritableStreamController) => ?Promise<void>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
declare interface WritableStreamWriter {
|
|
115
|
+
// $FlowFixMe[unclear-type]
|
|
116
|
+
abort(reason: string): ?Promise<any>;
|
|
117
|
+
// $FlowFixMe[unclear-type]
|
|
118
|
+
close(): Promise<any>;
|
|
119
|
+
// $FlowFixMe[unclear-type]
|
|
120
|
+
closed: Promise<any>;
|
|
121
|
+
|
|
122
|
+
desiredSize?: number;
|
|
123
|
+
// $FlowFixMe[unclear-type]
|
|
124
|
+
ready: Promise<any>;
|
|
125
|
+
releaseLock(): void;
|
|
126
|
+
// $FlowFixMe[unclear-type]
|
|
127
|
+
write(chunk: any): Promise<any>;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare class WritableStream {
|
|
131
|
+
abort(reason: string): void;
|
|
132
|
+
|
|
133
|
+
constructor(
|
|
134
|
+
underlyingSink: ?UnderlyingSink,
|
|
135
|
+
queuingStrategy: QueuingStrategy,
|
|
136
|
+
): void;
|
|
137
|
+
|
|
138
|
+
getWriter(): WritableStreamWriter;
|
|
139
|
+
locked: boolean;
|
|
140
|
+
}
|
package/overrides.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.81.
|
|
10
|
+
"baseVersion": "0.81.5",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"type": "derived",
|
|
115
115
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
116
116
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
117
|
-
"baseHash": "
|
|
117
|
+
"baseHash": "6ead80870e2e165d1f5ea0fa48f2c6c647ccfa5b"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"type": "patch",
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
"type": "patch",
|
|
178
178
|
"file": "src-win/Libraries/Components/View/View.win32.js",
|
|
179
179
|
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
|
|
180
|
-
"baseHash": "
|
|
180
|
+
"baseHash": "455c75f23e4fc099376cc8cc37016ac1fa09ed66"
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
183
|
"type": "derived",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.81.0-preview.
|
|
3
|
+
"version": "0.81.0-preview.6",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "17.0.0",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "17.0.0",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.81.
|
|
34
|
-
"@react-native/codegen": "0.81.
|
|
35
|
-
"@react-native/community-cli-plugin": "0.81.
|
|
36
|
-
"@react-native/gradle-plugin": "0.81.
|
|
37
|
-
"@react-native/js-polyfills": "0.81.
|
|
38
|
-
"@react-native/normalize-colors": "0.81.
|
|
39
|
-
"@react-native/virtualized-lists": "0.81.
|
|
33
|
+
"@react-native/assets-registry": "0.81.5",
|
|
34
|
+
"@react-native/codegen": "0.81.5",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.81.5",
|
|
36
|
+
"@react-native/gradle-plugin": "0.81.5",
|
|
37
|
+
"@react-native/js-polyfills": "0.81.5",
|
|
38
|
+
"@react-native/normalize-colors": "0.81.5",
|
|
39
|
+
"@react-native/virtualized-lists": "0.81.5",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@babel/core": "^7.25.2",
|
|
74
74
|
"@babel/eslint-parser": "^7.25.1",
|
|
75
|
-
"@react-native/metro-config": "0.81.
|
|
75
|
+
"@react-native/metro-config": "0.81.5",
|
|
76
76
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
77
77
|
"@rnw-scripts/eslint-config": "1.2.37",
|
|
78
78
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.41",
|
|
@@ -88,14 +88,14 @@
|
|
|
88
88
|
"just-scripts": "^1.3.3",
|
|
89
89
|
"prettier": "2.8.8",
|
|
90
90
|
"react": "19.1.0",
|
|
91
|
-
"react-native": "0.81.
|
|
91
|
+
"react-native": "0.81.5",
|
|
92
92
|
"react-native-platform-override": "0.81.0-preview.10",
|
|
93
93
|
"typescript": "5.0.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependencies": {
|
|
96
96
|
"@types/react": "^19.1.0",
|
|
97
97
|
"react": "^19.1.0",
|
|
98
|
-
"react-native": "0.81.
|
|
98
|
+
"react-native": "0.81.5"
|
|
99
99
|
},
|
|
100
100
|
"beachball": {
|
|
101
101
|
"defaultNpmTag": "preview",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<f17b8e4e33228e19b346837e7a33a2dd>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -98,10 +98,13 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
98
98
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
99
99
|
hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
|
|
100
100
|
preparedTextCacheSize: Getter<number>,
|
|
101
|
+
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
101
102
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
102
103
|
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
|
103
104
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
104
105
|
useFabricInterop: Getter<boolean>,
|
|
106
|
+
useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean>,
|
|
107
|
+
useNativeTransformHelperAndroid: Getter<boolean>,
|
|
105
108
|
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
|
106
109
|
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
|
107
110
|
useRawPropsJsiValue: Getter<boolean>,
|
|
@@ -383,6 +386,10 @@ export const hideOffscreenVirtualViewsOnIOS: Getter<boolean> = createNativeFlagG
|
|
|
383
386
|
* Number cached PreparedLayouts in TextLayoutManager cache
|
|
384
387
|
*/
|
|
385
388
|
export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('preparedTextCacheSize', 200);
|
|
389
|
+
/**
|
|
390
|
+
* Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
|
|
391
|
+
*/
|
|
392
|
+
export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
|
|
386
393
|
/**
|
|
387
394
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
388
395
|
*/
|
|
@@ -399,6 +406,14 @@ export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFl
|
|
|
399
406
|
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
|
|
400
407
|
*/
|
|
401
408
|
export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabricInterop', true);
|
|
409
|
+
/**
|
|
410
|
+
* Use a native implementation of equals in NativeReadableArray.
|
|
411
|
+
*/
|
|
412
|
+
export const useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean> = createNativeFlagGetter('useNativeEqualsInNativeReadableArrayAndroid', false);
|
|
413
|
+
/**
|
|
414
|
+
* Use a native implementation of TransformHelper
|
|
415
|
+
*/
|
|
416
|
+
export const useNativeTransformHelperAndroid: Getter<boolean> = createNativeFlagGetter('useNativeTransformHelperAndroid', false);
|
|
402
417
|
/**
|
|
403
418
|
* When enabled, the native view configs are used in bridgeless mode.
|
|
404
419
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<8b4f1275a16d5b83f5594da1eb89c6c1>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -72,10 +72,13 @@ export interface Spec extends TurboModule {
|
|
|
72
72
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
73
73
|
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
74
74
|
+preparedTextCacheSize?: () => number;
|
|
75
|
+
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
75
76
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
76
77
|
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
77
78
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
78
79
|
+useFabricInterop?: () => boolean;
|
|
80
|
+
+useNativeEqualsInNativeReadableArrayAndroid?: () => boolean;
|
|
81
|
+
+useNativeTransformHelperAndroid?: () => boolean;
|
|
79
82
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
|
80
83
|
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
|
81
84
|
+useRawPropsJsiValue?: () => boolean;
|
|
@@ -58,4 +58,5 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
|
58
58
|
export default (codegenNativeComponent<SwitchNativeProps>('Switch', {
|
|
59
59
|
paperComponentName: 'RCTSwitch',
|
|
60
60
|
excludedPlatforms: ['android'],
|
|
61
|
+
interfaceOnly: true,
|
|
61
62
|
}): ComponentType);
|