@office-iss/react-native-win32 0.0.0-canary.256 → 0.0.0-canary.257

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 (43) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +40 -1
  3. package/CHANGELOG.md +20 -8
  4. package/Libraries/Core/ReactNativeVersion.js +1 -1
  5. package/Libraries/Core/setUpTimers.js +19 -0
  6. package/Libraries/LogBox/Data/LogBoxData.js +39 -4
  7. package/Libraries/LogBox/Data/LogBoxLog.js +5 -2
  8. package/Libraries/LogBox/Data/parseLogBoxLog.js +22 -1
  9. package/Libraries/LogBox/LogBox.js +29 -12
  10. package/Libraries/LogBox/LogBoxNotificationContainer.js +4 -0
  11. package/Libraries/LogBox/UI/LogBoxInspector.js +8 -70
  12. package/Libraries/LogBox/UI/LogBoxInspectorBody.js +87 -0
  13. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +6 -42
  14. package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +58 -0
  15. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +5 -66
  16. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +7 -72
  17. package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +76 -0
  18. package/Libraries/LogBox/UI/LogBoxNotification.js +13 -152
  19. package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +63 -0
  20. package/Libraries/LogBox/UI/LogBoxNotificationDismissButton.js +67 -0
  21. package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +57 -0
  22. package/Libraries/Renderer/implementations/ReactFabric-dev.js +15690 -26405
  23. package/Libraries/Renderer/implementations/ReactFabric-prod.js +2675 -1630
  24. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +2945 -1682
  25. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16141 -27018
  26. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2723 -1666
  27. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +2984 -1737
  28. package/Libraries/Share/Share.d.ts +16 -10
  29. package/Libraries/Share/Share.js +14 -15
  30. package/Libraries/Text/Text.js +25 -20
  31. package/Libraries/Text/Text.win32.js +25 -20
  32. package/Libraries/Text/TextNativeComponent.js +1 -1
  33. package/Libraries/Text/TextNativeComponent.win32.js +1 -1
  34. package/Libraries/Text/TextOptimized.js +538 -0
  35. package/Libraries/Utilities/ReactNativeTestTools.js +7 -24
  36. package/Libraries/__tests__/ButtonWin32-test.js +7 -6
  37. package/Libraries/promiseRejectionTrackingOptions.js +1 -0
  38. package/jest/renderer.js +25 -14
  39. package/jest/setup.js +5 -0
  40. package/overrides.json +5 -5
  41. package/package.json +19 -19
  42. package/src/private/specs/modules/NativeDevSettings.js +1 -0
  43. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +34 -0
@@ -0,0 +1,63 @@
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 View from '../../Components/View/View';
12
+ import StyleSheet from '../../StyleSheet/StyleSheet';
13
+ import Text from '../../Text/Text';
14
+ import * as LogBoxStyle from './LogBoxStyle';
15
+ import * as React from 'react';
16
+
17
+ export default function LogBoxNotificationCountBadge(props: {
18
+ count: number,
19
+ level: 'error' | 'warn',
20
+ }): React.Node {
21
+ return (
22
+ <View style={styles.outside}>
23
+ {/* $FlowFixMe[incompatible-type] (>=0.114.0) This suppression was added
24
+ * when fixing the type of `StyleSheet.create`. Remove this comment to
25
+ * see the error. */}
26
+ <View style={[styles.inside, styles[props.level]]}>
27
+ <Text style={styles.text}>{props.count <= 1 ? '!' : props.count}</Text>
28
+ </View>
29
+ </View>
30
+ );
31
+ }
32
+
33
+ const styles = StyleSheet.create({
34
+ warn: {
35
+ backgroundColor: LogBoxStyle.getWarningColor(1),
36
+ },
37
+ error: {
38
+ backgroundColor: LogBoxStyle.getErrorColor(1),
39
+ },
40
+ outside: {
41
+ padding: 2,
42
+ borderRadius: 25,
43
+ backgroundColor: '#fff',
44
+ marginRight: 8,
45
+ },
46
+ inside: {
47
+ minWidth: 18,
48
+ paddingLeft: 4,
49
+ paddingRight: 4,
50
+ borderRadius: 25,
51
+ fontWeight: '600',
52
+ },
53
+ text: {
54
+ color: LogBoxStyle.getTextColor(1),
55
+ fontSize: 14,
56
+ lineHeight: 18,
57
+ textAlign: 'center',
58
+ fontWeight: '600',
59
+ textShadowColor: LogBoxStyle.getBackgroundColor(0.4),
60
+ textShadowOffset: {width: 0, height: 0},
61
+ textShadowRadius: 3,
62
+ },
63
+ });
@@ -0,0 +1,67 @@
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 View from '../../Components/View/View';
12
+ import Image from '../../Image/Image';
13
+ import StyleSheet from '../../StyleSheet/StyleSheet';
14
+ import LogBoxButton from './LogBoxButton';
15
+ import * as LogBoxStyle from './LogBoxStyle';
16
+ import * as React from 'react';
17
+
18
+ export default function LogBoxNotificationDismissButton(props: {
19
+ onPress: () => void,
20
+ }): React.Node {
21
+ return (
22
+ <View style={styles.container}>
23
+ <LogBoxButton
24
+ backgroundColor={{
25
+ default: LogBoxStyle.getTextColor(0.3),
26
+ pressed: LogBoxStyle.getTextColor(0.5),
27
+ }}
28
+ hitSlop={{
29
+ top: 12,
30
+ right: 10,
31
+ bottom: 12,
32
+ left: 10,
33
+ }}
34
+ onPress={props.onPress}
35
+ style={styles.press}>
36
+ <Image
37
+ source={require('./LogBoxImages/close.png')}
38
+ style={styles.image}
39
+ />
40
+ </LogBoxButton>
41
+ </View>
42
+ );
43
+ }
44
+
45
+ const styles = StyleSheet.create({
46
+ container: {
47
+ alignSelf: 'center',
48
+ flexDirection: 'row',
49
+ flexGrow: 0,
50
+ flexShrink: 0,
51
+ flexBasis: 'auto',
52
+ marginLeft: 5,
53
+ },
54
+ press: {
55
+ height: 20,
56
+ width: 20,
57
+ borderRadius: 25,
58
+ alignSelf: 'flex-end',
59
+ alignItems: 'center',
60
+ justifyContent: 'center',
61
+ },
62
+ image: {
63
+ height: 8,
64
+ width: 8,
65
+ tintColor: LogBoxStyle.getBackgroundColor(1),
66
+ },
67
+ });
@@ -0,0 +1,57 @@
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 {Message as MessageType} from '../Data/parseLogBoxLog';
12
+
13
+ import View from '../../Components/View/View';
14
+ import StyleSheet from '../../StyleSheet/StyleSheet';
15
+ import Text from '../../Text/Text';
16
+ import LogBoxMessage from './LogBoxMessage';
17
+ import * as LogBoxStyle from './LogBoxStyle';
18
+ import * as React from 'react';
19
+
20
+ export default function LogBoxNotificationMessage(props: {
21
+ message: MessageType,
22
+ }): React.Node {
23
+ return (
24
+ <View style={styles.container}>
25
+ <Text numberOfLines={1} style={styles.text}>
26
+ {props.message && (
27
+ <LogBoxMessage
28
+ plaintext
29
+ message={props.message}
30
+ style={styles.substitutionText}
31
+ />
32
+ )}
33
+ </Text>
34
+ </View>
35
+ );
36
+ }
37
+
38
+ const styles = StyleSheet.create({
39
+ container: {
40
+ alignSelf: 'stretch',
41
+ flexGrow: 1,
42
+ flexShrink: 1,
43
+ flexBasis: 'auto',
44
+ borderLeftColor: LogBoxStyle.getTextColor(0.2),
45
+ borderLeftWidth: 1,
46
+ paddingLeft: 8,
47
+ },
48
+ text: {
49
+ color: LogBoxStyle.getTextColor(1),
50
+ flex: 1,
51
+ fontSize: 14,
52
+ lineHeight: 22,
53
+ },
54
+ substitutionText: {
55
+ color: LogBoxStyle.getTextColor(0.6),
56
+ },
57
+ });