@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.
Files changed (73) hide show
  1. package/.flowconfig +3 -3
  2. package/CHANGELOG.json +55 -1
  3. package/CHANGELOG.md +28 -8
  4. package/Libraries/Alert/Alert.js +3 -0
  5. package/Libraries/Animated/nodes/AnimatedValue.js +1 -0
  6. package/Libraries/Animated/useAnimatedProps.js +68 -3
  7. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  8. package/Libraries/Components/ScrollView/ScrollView.js +124 -165
  9. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
  10. package/Libraries/Components/TextInput/TextInput.js +204 -73
  11. package/Libraries/Components/TextInput/TextInput.win32.js +204 -79
  12. package/Libraries/Components/View/ReactNativeStyleAttributes.js +11 -0
  13. package/Libraries/Core/ErrorHandlers.js +9 -0
  14. package/Libraries/Core/ExceptionsManager.js +2 -0
  15. package/Libraries/Core/InitializeCore.js +2 -0
  16. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  17. package/Libraries/Core/ReactNativeVersion.js +3 -3
  18. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
  19. package/Libraries/Core/setUpGlobals.js +1 -0
  20. package/Libraries/Core/setUpReactRefresh.js +0 -4
  21. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  22. package/Libraries/Interaction/TaskQueue.js +1 -0
  23. package/Libraries/Lists/SectionList.js +1 -1
  24. package/Libraries/LogBox/Data/LogBoxData.js +1 -0
  25. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +20 -8
  26. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +20 -8
  27. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  28. package/Libraries/NativeComponent/BaseViewConfig.ios.js +3 -0
  29. package/Libraries/NativeComponent/BaseViewConfig.win32.js +3 -0
  30. package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
  31. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  32. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  33. package/Libraries/ReactNative/AppContainer.js +0 -1
  34. package/Libraries/ReactNative/AppRegistry.js +0 -6
  35. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  36. package/Libraries/ReactNative/renderApplication.js +0 -2
  37. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
  38. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +46 -0
  39. package/Libraries/StyleSheet/StyleSheetTypes.js +48 -5
  40. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  41. package/Libraries/StyleSheet/processFilter.js +226 -41
  42. package/Libraries/Text/Text.js +393 -196
  43. package/Libraries/Text/Text.win32.js +440 -228
  44. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  45. package/Libraries/Types/CodegenTypes.js +3 -1
  46. package/Libraries/Utilities/HMRClient.js +1 -0
  47. package/Libraries/Utilities/Platform.android.js +1 -1
  48. package/Libraries/Utilities/Platform.d.ts +1 -1
  49. package/Libraries/Utilities/Platform.flow.js +2 -2
  50. package/Libraries/Utilities/Platform.flow.win32.js +3 -3
  51. package/Libraries/Utilities/Platform.ios.js +1 -1
  52. package/Libraries/Utilities/Platform.win32.js +1 -1
  53. package/Libraries/vendor/emitter/EventEmitter.js +1 -0
  54. package/index.js +1 -0
  55. package/index.win32.js +1 -0
  56. package/jest/mockComponent.js +4 -1
  57. package/jest/setup.js +8 -1
  58. package/overrides.json +11 -11
  59. package/package.json +23 -23
  60. package/src/private/core/components/HScrollViewNativeComponents.js +55 -0
  61. package/src/private/core/components/VScrollViewNativeComponents.js +47 -0
  62. package/src/private/core/components/useSyncOnScroll.js +48 -0
  63. package/src/private/featureflags/ReactNativeFeatureFlags.js +70 -12
  64. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +12 -4
  65. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  66. package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
  67. package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
  68. package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
  69. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  70. package/src/private/webapis/performance/PerformanceEntry.js +1 -1
  71. package/src/private/webapis/performance/RawPerformanceEntry.js +5 -0
  72. package/types/experimental.d.ts +12 -1
  73. package/Libraries/Text/TextOptimized.js +0 -538
@@ -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<<870e25c844e692bb04ee49fe20cd3baf>>
7
+ * @generated SignedSource<<7421319910b210753a1eddcf079aa151>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -34,6 +34,9 @@ export type ReactNativeFeatureFlagsJsOnly = {
34
34
  shouldUseAnimatedObjectForTransform: Getter<boolean>,
35
35
  shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
36
36
  shouldUseSetNativePropsInFabric: Getter<boolean>,
37
+ shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
38
+ usePassiveEffectsForAnimations: Getter<boolean>,
39
+ useRefsForTextInputState: Getter<boolean>,
37
40
  };
38
41
 
39
42
  export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureFlagsJsOnly>;
@@ -44,23 +47,31 @@ export type ReactNativeFeatureFlags = {
44
47
  allowCollapsableChildren: Getter<boolean>,
45
48
  allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
46
49
  batchRenderingUpdatesInEventLoop: Getter<boolean>,
50
+ changeOrderOfMountingInstructionsOnAndroid: Getter<boolean>,
47
51
  destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
48
- enableBackgroundExecutor: Getter<boolean>,
52
+ enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
49
53
  enableCleanTextInputYogaNode: Getter<boolean>,
50
54
  enableGranularShadowTreeStateReconciliation: Getter<boolean>,
55
+ enableLongTaskAPI: Getter<boolean>,
51
56
  enableMicrotasks: Getter<boolean>,
57
+ enablePropsUpdateReconciliationAndroid: Getter<boolean>,
52
58
  enableSynchronousStateUpdates: Getter<boolean>,
53
59
  enableUIConsistency: Getter<boolean>,
54
- fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolean>,
60
+ fetchImagesInViewPreallocation: Getter<boolean>,
61
+ fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean>,
62
+ fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
63
+ fixMissedFabricStateUpdatesOnAndroid: Getter<boolean>,
55
64
  forceBatchingMountItemsOnAndroid: Getter<boolean>,
56
65
  fuseboxEnabledDebug: Getter<boolean>,
57
66
  fuseboxEnabledRelease: Getter<boolean>,
67
+ initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
58
68
  lazyAnimationCallbacks: Getter<boolean>,
59
- preventDoubleTextMeasure: Getter<boolean>,
69
+ loadVectorDrawablesOnImages: Getter<boolean>,
60
70
  setAndroidLayoutDirection: Getter<boolean>,
61
71
  useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
62
72
  useModernRuntimeScheduler: Getter<boolean>,
63
73
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
74
+ useNewReactImageViewBackgroundDrawing: Getter<boolean>,
64
75
  useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
65
76
  useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean>,
66
77
  useStateAlignmentMechanism: Getter<boolean>,
@@ -106,6 +117,21 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
106
117
  */
107
118
  export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
108
119
 
120
+ /**
121
+ * Enables use of setNativeProps in Native driven animations in Fabric.
122
+ */
123
+ export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false);
124
+
125
+ /**
126
+ * Enable a variant of useAnimatedPropsLifecycle hook that constructs the animation graph in passive effect instead of layout effect
127
+ */
128
+ export const usePassiveEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('usePassiveEffectsForAnimations', false);
129
+
130
+ /**
131
+ * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
132
+ */
133
+ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGetter('useRefsForTextInputState', false);
134
+
109
135
  /**
110
136
  * Common flag for testing. Do NOT modify.
111
137
  */
@@ -122,14 +148,18 @@ export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>
122
148
  * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
123
149
  */
124
150
  export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
151
+ /**
152
+ * When enabled, insert of views on Android will be moved from the beginning of the IntBufferBatchMountItem to be after layout updates.
153
+ */
154
+ export const changeOrderOfMountingInstructionsOnAndroid: Getter<boolean> = createNativeFlagGetter('changeOrderOfMountingInstructionsOnAndroid', false);
125
155
  /**
126
156
  * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
127
157
  */
128
158
  export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);
129
159
  /**
130
- * Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).
160
+ * Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
131
161
  */
132
- export const enableBackgroundExecutor: Getter<boolean> = createNativeFlagGetter('enableBackgroundExecutor', false);
162
+ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNativeFlagGetter('enableAlignItemsBaselineOnFabricIOS', true);
133
163
  /**
134
164
  * Clean yoga node when <TextInput /> does not change.
135
165
  */
@@ -138,10 +168,18 @@ export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGet
138
168
  * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
139
169
  */
140
170
  export const enableGranularShadowTreeStateReconciliation: Getter<boolean> = createNativeFlagGetter('enableGranularShadowTreeStateReconciliation', false);
171
+ /**
172
+ * Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
173
+ */
174
+ export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
141
175
  /**
142
176
  * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
143
177
  */
144
178
  export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
179
+ /**
180
+ * When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
181
+ */
182
+ export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNativeFlagGetter('enablePropsUpdateReconciliationAndroid', false);
145
183
  /**
146
184
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
147
185
  */
@@ -151,9 +189,21 @@ export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGe
151
189
  */
152
190
  export const enableUIConsistency: Getter<boolean> = createNativeFlagGetter('enableUIConsistency', false);
153
191
  /**
154
- * Fixes a leak in SurfaceMountingManager.mRemoveDeleteTreeUIFrameCallback
192
+ * Start image fetching during view preallocation instead of waiting for layout pass
193
+ */
194
+ export const fetchImagesInViewPreallocation: Getter<boolean> = createNativeFlagGetter('fetchImagesInViewPreallocation', false);
195
+ /**
196
+ * When doing a smooth scroll animation, it stops setting the state with the final scroll position in Fabric before the animation starts.
197
+ */
198
+ export const fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean> = createNativeFlagGetter('fixIncorrectScrollViewStateUpdateOnAndroid', false);
199
+ /**
200
+ * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
155
201
  */
156
- export const fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak: Getter<boolean> = createNativeFlagGetter('fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak', false);
202
+ export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
203
+ /**
204
+ * Enables a fix to prevent the possibility of state updates in Fabric being missed due to race conditions with previous state updates.
205
+ */
206
+ export const fixMissedFabricStateUpdatesOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMissedFabricStateUpdatesOnAndroid', false);
157
207
  /**
158
208
  * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
159
209
  */
@@ -161,23 +211,27 @@ export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFla
161
211
  /**
162
212
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.
163
213
  */
164
- export const fuseboxEnabledDebug: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledDebug', false);
214
+ export const fuseboxEnabledDebug: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledDebug', true);
165
215
  /**
166
216
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
167
217
  */
168
218
  export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledRelease', false);
219
+ /**
220
+ * Construct modules that requires eager init on the dedicate native modules thread
221
+ */
222
+ export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', false);
169
223
  /**
170
224
  * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
171
225
  */
172
226
  export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
173
227
  /**
174
- * When enabled, ParagraphShadowNode will no longer call measure twice.
228
+ * Adds support for loading vector drawable assets in the Image component (only on Android)
175
229
  */
176
- export const preventDoubleTextMeasure: Getter<boolean> = createNativeFlagGetter('preventDoubleTextMeasure', true);
230
+ export const loadVectorDrawablesOnImages: Getter<boolean> = createNativeFlagGetter('loadVectorDrawablesOnImages', false);
177
231
  /**
178
232
  * Propagate layout direction to Android views.
179
233
  */
180
- export const setAndroidLayoutDirection: Getter<boolean> = createNativeFlagGetter('setAndroidLayoutDirection', false);
234
+ export const setAndroidLayoutDirection: Getter<boolean> = createNativeFlagGetter('setAndroidLayoutDirection', true);
181
235
  /**
182
236
  * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
183
237
  */
@@ -190,6 +244,10 @@ export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter
190
244
  * When enabled, the native view configs are used in bridgeless mode.
191
245
  */
192
246
  export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
247
+ /**
248
+ * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
249
+ */
250
+ export const useNewReactImageViewBackgroundDrawing: Getter<boolean> = createNativeFlagGetter('useNewReactImageViewBackgroundDrawing', false);
193
251
  /**
194
252
  * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
195
253
  */
@@ -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<<6922b452333fc62a263bd77d42afbbbe>>
7
+ * @generated SignedSource<<29f4ec3c941708dc99dd38adac52d6dc>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -27,23 +27,31 @@ export interface Spec extends TurboModule {
27
27
  +allowCollapsableChildren?: () => boolean;
28
28
  +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
29
29
  +batchRenderingUpdatesInEventLoop?: () => boolean;
30
+ +changeOrderOfMountingInstructionsOnAndroid?: () => boolean;
30
31
  +destroyFabricSurfacesInReactInstanceManager?: () => boolean;
31
- +enableBackgroundExecutor?: () => boolean;
32
+ +enableAlignItemsBaselineOnFabricIOS?: () => boolean;
32
33
  +enableCleanTextInputYogaNode?: () => boolean;
33
34
  +enableGranularShadowTreeStateReconciliation?: () => boolean;
35
+ +enableLongTaskAPI?: () => boolean;
34
36
  +enableMicrotasks?: () => boolean;
37
+ +enablePropsUpdateReconciliationAndroid?: () => boolean;
35
38
  +enableSynchronousStateUpdates?: () => boolean;
36
39
  +enableUIConsistency?: () => boolean;
37
- +fixStoppedSurfaceRemoveDeleteTreeUIFrameCallbackLeak?: () => boolean;
40
+ +fetchImagesInViewPreallocation?: () => boolean;
41
+ +fixIncorrectScrollViewStateUpdateOnAndroid?: () => boolean;
42
+ +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
43
+ +fixMissedFabricStateUpdatesOnAndroid?: () => boolean;
38
44
  +forceBatchingMountItemsOnAndroid?: () => boolean;
39
45
  +fuseboxEnabledDebug?: () => boolean;
40
46
  +fuseboxEnabledRelease?: () => boolean;
47
+ +initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
41
48
  +lazyAnimationCallbacks?: () => boolean;
42
- +preventDoubleTextMeasure?: () => boolean;
49
+ +loadVectorDrawablesOnImages?: () => boolean;
43
50
  +setAndroidLayoutDirection?: () => boolean;
44
51
  +useImmediateExecutorInAndroidBridgeless?: () => boolean;
45
52
  +useModernRuntimeScheduler?: () => boolean;
46
53
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
54
+ +useNewReactImageViewBackgroundDrawing?: () => boolean;
47
55
  +useRuntimeShadowNodeReferenceUpdate?: () => boolean;
48
56
  +useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean;
49
57
  +useStateAlignmentMechanism?: () => boolean;
@@ -14,7 +14,7 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
14
14
 
15
15
  export interface Spec extends TurboModule {
16
16
  // Common interface
17
- +getInitialURL: () => Promise<string>;
17
+ +getInitialURL: () => Promise<?string>;
18
18
  +canOpenURL: (url: string) => Promise<boolean>;
19
19
  +openURL: (url: string) => Promise<void>;
20
20
  +openSettings: () => Promise<void>;
@@ -16,7 +16,7 @@ export type ReactNativeVersionAndroid = {|
16
16
  major: number,
17
17
  minor: number,
18
18
  patch: number,
19
- prerelease: ?number,
19
+ prerelease: ?string,
20
20
  |};
21
21
 
22
22
  export type PlatformConstantsAndroid = {|
@@ -19,7 +19,7 @@ export type PlatformConstantsIOS = {|
19
19
  major: number,
20
20
  minor: number,
21
21
  patch: number,
22
- prerelease: ?number,
22
+ prerelease: ?string,
23
23
  |},
24
24
  forceTouchAvailable: boolean,
25
25
  osVersion: string,
@@ -12,6 +12,13 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
12
12
 
13
13
  import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
14
14
 
15
+ export type ReactNativeVersionAndroid = {|
16
+ major: number,
17
+ minor: number,
18
+ patch: number,
19
+ prerelease: ?string,
20
+ |};
21
+
15
22
  export type PlatformConstantsWin32 = {|
16
23
  isTesting: boolean,
17
24
  isDisableAnimations?: boolean,
@@ -19,7 +26,7 @@ export type PlatformConstantsWin32 = {|
19
26
  major: number,
20
27
  minor: number,
21
28
  patch: number,
22
- prerelease: ?string | number,
29
+ prerelease: ?string,
23
30
  |},
24
31
  forceTouchAvailable: boolean,
25
32
  osVersion: number,
@@ -12,7 +12,10 @@ import type {
12
12
  RootTag,
13
13
  TurboModule,
14
14
  } from '../../../../Libraries/TurboModule/RCTExport';
15
- import type {UnsafeObject} from '../../../../Libraries/Types/CodegenTypes';
15
+ import type {
16
+ EventEmitter,
17
+ UnsafeObject,
18
+ } from '../../../../Libraries/Types/CodegenTypes';
16
19
 
17
20
  import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
18
21
 
@@ -21,7 +24,17 @@ export enum EnumInt {
21
24
  B = 42,
22
25
  }
23
26
 
27
+ export type ObjectStruct = {
28
+ a: number,
29
+ b: string,
30
+ c?: ?string,
31
+ };
32
+
24
33
  export interface Spec extends TurboModule {
34
+ +onPress: EventEmitter<void>;
35
+ +onClick: EventEmitter<string>;
36
+ +onChange: EventEmitter<ObjectStruct>;
37
+ +onSubmit: EventEmitter<ObjectStruct[]>;
25
38
  // Exported methods.
26
39
  +getConstants: () => {|
27
40
  const1: boolean,
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  export type HighResTimeStamp = number;
12
- export type PerformanceEntryType = 'mark' | 'measure' | 'event';
12
+ export type PerformanceEntryType = 'mark' | 'measure' | 'event' | 'longtask';
13
13
 
14
14
  export type PerformanceEntryJSON = {
15
15
  name: string,
@@ -21,6 +21,7 @@ export const RawPerformanceEntryTypeValues = {
21
21
  MARK: 1,
22
22
  MEASURE: 2,
23
23
  EVENT: 3,
24
+ LONGTASK: 4,
24
25
  };
25
26
 
26
27
  export function rawToPerformanceEntry(
@@ -55,6 +56,8 @@ export function rawToPerformanceEntryType(
55
56
  return 'measure';
56
57
  case RawPerformanceEntryTypeValues.EVENT:
57
58
  return 'event';
59
+ case RawPerformanceEntryTypeValues.LONGTASK:
60
+ return 'longtask';
58
61
  default:
59
62
  throw new TypeError(
60
63
  `rawToPerformanceEntryType: unexpected performance entry type received: ${type}`,
@@ -72,6 +75,8 @@ export function performanceEntryTypeToRaw(
72
75
  return RawPerformanceEntryTypeValues.MEASURE;
73
76
  case 'event':
74
77
  return RawPerformanceEntryTypeValues.EVENT;
78
+ case 'longtask':
79
+ return RawPerformanceEntryTypeValues.LONGTASK;
75
80
  default:
76
81
  // Verify exhaustive check with Flow
77
82
  (type: empty);
@@ -32,7 +32,12 @@
32
32
  * Either the import or the reference only needs to appear once, anywhere in the project.
33
33
  */
34
34
 
35
- import {DimensionValue} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
35
+ import {
36
+ BlendMode,
37
+ BoxShadowPrimitive,
38
+ DimensionValue,
39
+ FilterFunction,
40
+ } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
36
41
 
37
42
  export {};
38
43
 
@@ -142,4 +147,10 @@ declare module '.' {
142
147
  */
143
148
  experimental_layoutConformance?: 'strict' | 'classic' | undefined;
144
149
  }
150
+
151
+ export interface ViewStyle {
152
+ experimental_boxShadow?: BoxShadowPrimitive | undefined;
153
+ experimental_filter?: ReadonlyArray<FilterFunction> | undefined;
154
+ experimental_mixBlendMode?: BlendMode | undefined;
155
+ }
145
156
  }