react-native-tvos 0.73.1-1 → 0.73.1-2

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.
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 73,
15
15
  patch: 1,
16
- prerelease: '1',
16
+ prerelease: '2',
17
17
  };
@@ -41,11 +41,11 @@ import {
41
41
  VirtualizedListCellContextProvider,
42
42
  VirtualizedListContext,
43
43
  VirtualizedListContextProvider,
44
- } from './VirtualizedListContext.js';
44
+ } from '@react-native/virtualized-lists/Lists/VirtualizedListContext';
45
45
  import {
46
46
  computeWindowedRenderLimits,
47
47
  keyExtractor as defaultKeyExtractor,
48
- } from './VirtualizeUtils';
48
+ } from '@react-native/virtualized-lists/Lists/VirtualizeUtils';
49
49
  import invariant from 'invariant';
50
50
  import nullthrows from 'nullthrows';
51
51
  import * as React from 'react';
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(73),
26
26
  RCTVersionPatch: @(1),
27
- RCTVersionPrerelease: @"1",
27
+ RCTVersionPrerelease: @"2",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -19,6 +19,9 @@
19
19
 
20
20
  NS_ASSUME_NONNULL_BEGIN
21
21
 
22
+ #ifndef _RCT_VIEW_COMPONENT_VIEW_
23
+ #define _RCT_VIEW_COMPONENT_VIEW_
24
+
22
25
  /**
23
26
  * UIView class for <View> component.
24
27
  */
@@ -90,4 +93,6 @@ NS_ASSUME_NONNULL_BEGIN
90
93
 
91
94
  @end
92
95
 
96
+ #endif // _RCT_VIEW_COMPONENT_VIEW_
97
+
93
98
  NS_ASSUME_NONNULL_END
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.73.1-1
1
+ VERSION_NAME=0.73.1-2
2
2
 
3
3
  # react.internal.publishingGroup=com.facebook.react
4
4
  # For TV use this group
@@ -18,5 +18,5 @@ public class ReactNativeVersion {
18
18
  "major", 0,
19
19
  "minor", 73,
20
20
  "patch", 1,
21
- "prerelease", "1");
21
+ "prerelease", "2");
22
22
  }
@@ -204,6 +204,11 @@ import java.util.Map;
204
204
  mDefaultValue = defaultValue;
205
205
  }
206
206
 
207
+ public ColorPropSetter(ReactPropGroup prop, Method setter, int index, int defaultValue) {
208
+ super(prop, "mixed", setter, index);
209
+ mDefaultValue = defaultValue;
210
+ }
211
+
207
212
  @Override
208
213
  protected Object getValueOrDefault(Object value, Context context) {
209
214
  if (value == null) {
@@ -331,6 +336,10 @@ import java.util.Map;
331
336
  super(prop, "mixed", setter);
332
337
  }
333
338
 
339
+ public BoxedColorPropSetter(ReactPropGroup prop, Method setter, int index) {
340
+ super(prop, "mixed", setter, index);
341
+ }
342
+
334
343
  @Override
335
344
  protected @Nullable Object getValueOrDefault(Object value, Context context) {
336
345
  if (value != null) {
@@ -468,7 +477,11 @@ import java.util.Map;
468
477
  }
469
478
  } else if (propTypeClass == int.class) {
470
479
  for (int i = 0; i < names.length; i++) {
471
- props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt()));
480
+ if ("Color".equals(annotation.customType())) {
481
+ props.put(names[i], new ColorPropSetter(annotation, method, i, annotation.defaultInt()));
482
+ } else {
483
+ props.put(names[i], new IntPropSetter(annotation, method, i, annotation.defaultInt()));
484
+ }
472
485
  }
473
486
  } else if (propTypeClass == float.class) {
474
487
  for (int i = 0; i < names.length; i++) {
@@ -481,7 +494,11 @@ import java.util.Map;
481
494
  }
482
495
  } else if (propTypeClass == Integer.class) {
483
496
  for (int i = 0; i < names.length; i++) {
484
- props.put(names[i], new BoxedIntPropSetter(annotation, method, i));
497
+ if ("Color".equals(annotation.customType())) {
498
+ props.put(names[i], new BoxedColorPropSetter(annotation, method, i));
499
+ } else {
500
+ props.put(names[i], new BoxedIntPropSetter(annotation, method, i));
501
+ }
485
502
  }
486
503
  } else {
487
504
  throw new RuntimeException(
@@ -89,6 +89,8 @@ public class ReactModalHostView extends ViewGroup implements LifecycleEventListe
89
89
  private boolean mPropertyRequiresNewDialog;
90
90
  private @Nullable DialogInterface.OnShowListener mOnShowListener;
91
91
  private @Nullable OnRequestCloseListener mOnRequestCloseListener;
92
+ private final ReactAndroidHWInputDeviceHelper mAndroidHWInputDeviceHelper =
93
+ new ReactAndroidHWInputDeviceHelper();
92
94
 
93
95
  public ReactModalHostView(ThemedReactContext context) {
94
96
  super(context);
@@ -300,6 +302,9 @@ public class ReactModalHostView extends ViewGroup implements LifecycleEventListe
300
302
  new DialogInterface.OnKeyListener() {
301
303
  @Override
302
304
  public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
305
+ // Modal needs to send the key event to its own TV event handler
306
+ // https://github.com/react-native-tvos/react-native-tvos/issues/609
307
+ mAndroidHWInputDeviceHelper.handleKeyEvent(event, mHostView.mReactContext);
303
308
  if (event.getAction() == KeyEvent.ACTION_UP) {
304
309
  // We need to stop the BACK button and ESCAPE key from closing the dialog by default
305
310
  // so we capture that event and instead inform JS so that it can make the decision as
@@ -18,7 +18,7 @@ constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 73;
20
20
  int32_t Patch = 1;
21
- std::string_view Prerelease = "1";
21
+ std::string_view Prerelease = "2";
22
22
  } ReactNativeVersion;
23
23
 
24
24
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-tvos",
3
- "version": "0.73.1-1",
3
+ "version": "0.73.1-2",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -97,13 +97,13 @@
97
97
  "@react-native-community/cli": "12.3.0",
98
98
  "@react-native-community/cli-platform-android": "12.3.0",
99
99
  "@react-native-community/cli-platform-ios": "12.3.0",
100
- "@react-native/assets-registry": "^0.73.1",
100
+ "@react-native/assets-registry": "0.73.1",
101
101
  "@react-native/community-cli-plugin": "0.73.11",
102
- "@react-native/codegen": "^0.73.2",
103
- "@react-native/gradle-plugin": "^0.73.4",
104
- "@react-native/js-polyfills": "^0.73.1",
105
- "@react-native/normalize-colors": "^0.73.2",
106
- "@react-native/virtualized-lists": "^0.73.4",
102
+ "@react-native/codegen": "0.73.2",
103
+ "@react-native/gradle-plugin": "0.73.4",
104
+ "@react-native/js-polyfills": "0.73.1",
105
+ "@react-native/normalize-colors": "0.73.2",
106
+ "@react-native/virtualized-lists": "0.73.4",
107
107
  "abort-controller": "^3.0.0",
108
108
  "anser": "^1.4.9",
109
109
  "ansi-regex": "^5.0.0",
@@ -15,7 +15,7 @@ DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH
15
15
  # Enables iOS devices to get the IP address of the machine running Metro
16
16
  if [[ ! "$SKIP_BUNDLING_METRO_IP" && "$CONFIGURATION" = *Debug* && ! "$PLATFORM_NAME" == *simulator ]]; then
17
17
  for num in 0 1 2 3 4 5 6 7 8; do
18
- IP=$(ipconfig getifaddr en${num})
18
+ IP=$(ipconfig getifaddr en${num} || echo "")
19
19
  if [ ! -z "$IP" ]; then
20
20
  break
21
21
  fi
@@ -15,11 +15,11 @@ class MainApplication : Application(), ReactApplication {
15
15
 
16
16
  override val reactNativeHost: ReactNativeHost =
17
17
  object : DefaultReactNativeHost(this) {
18
- override fun getPackages(): List<ReactPackage> {
19
- // Packages that cannot be autolinked yet can be added manually here, for example:
20
- // packages.add(new MyReactNativePackage());
21
- return PackageList(this).packages
22
- }
18
+ override fun getPackages(): List<ReactPackage> =
19
+ PackageList(this).packages.apply {
20
+ // Packages that cannot be autolinked yet can be added manually here, for example:
21
+ // add(MyReactNativePackage())
22
+ }
23
23
 
24
24
  override fun getJSMainModuleName(): String = "index"
25
25
 
@@ -13,16 +13,16 @@
13
13
  "dependencies": {
14
14
  "expo": "^50.0.0-preview.4",
15
15
  "react": "18.2.0",
16
- "react-native": "npm:react-native-tvos@0.73.1-1"
16
+ "react-native": "npm:react-native-tvos@0.73.1-2"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/core": "^7.20.0",
20
20
  "@babel/preset-env": "^7.20.0",
21
21
  "@babel/runtime": "^7.20.0",
22
- "@react-native/babel-preset": "^0.73.18",
23
- "@react-native/eslint-config": "^0.73.1",
24
- "@react-native/metro-config": "^0.73.2",
25
- "@react-native/typescript-config": "^0.73.1",
22
+ "@react-native/babel-preset": "0.73.18",
23
+ "@react-native/eslint-config": "0.73.1",
24
+ "@react-native/metro-config": "0.73.2",
25
+ "@react-native/typescript-config": "0.73.1",
26
26
  "@types/react": "^18.2.6",
27
27
  "@types/react-test-renderer": "^18.0.0",
28
28
  "babel-jest": "^29.6.3",
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: cb_IQ -->
5
- <resources exclude-from-buck-resource-map="true">
6
- </resources>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: fb_HA -->
5
- <resources exclude-from-buck-resource-map="true">
6
- <string name="catalyst_dev_menu_header" gender="unknown">[React Native Dev Menu (%1$s)#f560753940a8856cdc2de8717c0295df:1]</string>
7
- <string name="catalyst_dev_menu_sub_header" gender="unknown">[Running %1$s#c566f94d6bbe163799a3235b4b55f9d1:1]</string>
8
- </resources>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: fb_LS -->
5
- <resources exclude-from-buck-resource-map="true">
6
- <string name="catalyst_dev_menu_header" gender="unknown">React Native Dev Menu (%1$s)\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@</string>
7
- <string name="catalyst_dev_menu_sub_header" gender="unknown">Running %1$s\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@\@</string>
8
- </resources>
@@ -1,13 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: cb_IQ -->
5
- <resources exclude-from-buck-resource-map="true">
6
- <string name="link_description" gender="unknown">بەستەر</string>
7
- <string name="image_description" gender="unknown">وێنە</string>
8
- <string name="imagebutton_description" gender="unknown">دوگمە، وێنە</string>
9
- <string name="combobox_description" gender="unknown">خشتەی دیاریکردن</string>
10
- <string name="menu_description" gender="unknown">پێڕست</string>
11
- <string name="state_on_description" gender="unknown">کارا</string>
12
- <string name="state_off_description" gender="unknown">کوژاندنەوە</string>
13
- </resources>
@@ -1,31 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: fb_HA -->
5
- <resources exclude-from-buck-resource-map="true">
6
- <string name="link_description" gender="unknown">[Link#a31d26668a679e44a0843994a6744274:1]</string>
7
- <string name="image_description" gender="unknown">[Image#d8aa55c15c7118a635092b092bcf1d33:1]</string>
8
- <string name="imagebutton_description" gender="unknown">[Button, Image#2b5b423bf3daff8f8b188f5d5733ec14:1]</string>
9
- <string name="header_description" gender="unknown">[Heading#03d19d231fd31bc5dae409f337e4fea3:1]</string>
10
- <string name="alert_description" gender="unknown">[Alert#f230077c00a8397fcc7138dfd8b37405:1]</string>
11
- <string name="combobox_description" gender="unknown">[Combo Box#c399e5a30d2d764efcced424465cacc4:1]</string>
12
- <string name="menu_description" gender="unknown">[Menu#a2c49a9b7c94c31d6f53f5f59329a558:1]</string>
13
- <string name="menubar_description" gender="unknown">[Menu Bar#9ede63b4972815fe4810781f1f15770c:1]</string>
14
- <string name="menuitem_description" gender="unknown">[Menu Item#ba3a1d642e7bfae7a60f57181ff5a91f:1]</string>
15
- <string name="progressbar_description" gender="unknown">[Progress Bar#fc1ee5dacc16eb35a88ca3aff9355683:1]</string>
16
- <string name="radiogroup_description" gender="unknown">[Radio Group#382586bc34074311334bc929c63f69e4:1]</string>
17
- <string name="scrollbar_description" gender="unknown">[Scroll Bar#8c5cb8c1bbbac0ed64bb63c240b9a415:1]</string>
18
- <string name="spinbutton_description" gender="unknown">[Spin Button#8af18737c08f4adab8e7103876d29955:1]</string>
19
- <string name="rn_tab_description" gender="unknown">[Tab#60c56bd22945b4d1532f474bfc568a66:1]</string>
20
- <string name="tablist_description" gender="unknown">[Tab List#8daaf7f9316191f0e35f3ba31ed11aec:1]</string>
21
- <string name="timer_description" gender="unknown">[Timer#2f3aa4d3a05064a96945540d06072632:1]</string>
22
- <string name="toolbar_description" gender="unknown">[Tool Bar#13851684ac57a6612b478471e4894082:1]</string>
23
- <string name="summary_description" gender="unknown">[Summary#12f17d5316cde76d270ad4534e1d9f35:1]</string>
24
- <string name="state_busy_description" gender="unknown">[busy#c38a44fbc4bbf985a9e846c05e60b947:1]</string>
25
- <string name="state_expanded_description" gender="unknown">[expanded#45ee23081f04143c5be90131a7b0e3c5:1]</string>
26
- <string name="state_collapsed_description" gender="unknown">[collapsed#850739bd3f1cb1a9b82c3a6f68399233:1]</string>
27
- <string name="state_unselected_description" gender="unknown">[unselected#815cb61a1bc6c57ed0a65707d8c0c2d2:1]</string>
28
- <string name="state_on_description" gender="unknown">[on#86ddae449e2a1cb3b1fc5fed82bfc660:1]</string>
29
- <string name="state_off_description" gender="unknown">[off#f1ca5b210c9adef0fe7f14fe85ba521d:1]</string>
30
- <string name="state_mixed_description" gender="unknown">[mixed#30d19e1c3c088ba70e30538143bad3a8:1]</string>
31
- </resources>
@@ -1,26 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!-- See fburl.com/140690840 for information about i18n on Android -->
3
- <!-- @generated -->
4
- <!-- FB Locale: fb_LS -->
5
- <resources exclude-from-buck-resource-map="true">
6
- <string name="image_description" gender="unknown">Image \@\@\@</string>
7
- <string name="imagebutton_description" gender="unknown">Button, Image\@\@\@\@\@\@</string>
8
- <string name="header_description" gender="unknown">Heading \@\@\@ \@\@\@</string>
9
- <string name="combobox_description" gender="unknown">Combo Box \@\@\@</string>
10
- <string name="menu_description" gender="unknown">Menu \@\@\@</string>
11
- <string name="menubar_description" gender="unknown">Menu Bar \@\@\@</string>
12
- <string name="menuitem_description" gender="unknown">Menu Item\@\@\@\@\@\@</string>
13
- <string name="progressbar_description" gender="unknown">Progress Bar\@\@\@\@\@\@</string>
14
- <string name="radiogroup_description" gender="unknown">Radio Group\@\@\@\@\@\@\@\@\@</string>
15
- <string name="scrollbar_description" gender="unknown">Scroll Bar\@\@\@\@\@\@\@\@\@</string>
16
- <string name="spinbutton_description" gender="unknown">Spin Button \@\@\@ \@\@\@</string>
17
- <string name="tablist_description" gender="unknown">Tab List\@\@\@</string>
18
- <string name="timer_description" gender="unknown">Timer \@\@\@</string>
19
- <string name="toolbar_description" gender="unknown">Tool Bar\@\@\@\@\@\@</string>
20
- <string name="summary_description" gender="unknown">Summary\@\@\@\@\@\@</string>
21
- <string name="state_expanded_description" gender="unknown">expanded \@\@\@ \@\@\@</string>
22
- <string name="state_collapsed_description" gender="unknown">collapsed \@\@\@ \@\@\@ \@\@\@</string>
23
- <string name="state_unselected_description" gender="unknown">unselected\@\@\@</string>
24
- <string name="state_off_description" gender="unknown">off \@\@\@</string>
25
- <string name="state_mixed_description" gender="unknown">mixed\@\@\@</string>
26
- </resources>