@react-native-oh/react-native-harmony 0.77.18-1 → 0.77.22

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.
@@ -16,6 +16,7 @@ import useMergeRefs from '../Utilities/useMergeRefs';
16
16
  import useAnimatedProps from './useAnimatedProps';
17
17
  import * as React from 'react';
18
18
  import {useMemo} from 'react';
19
+ import * as DELEGATE from './delegates/createAnimatedComponentDelegate'
19
20
 
20
21
  export type AnimatedProps<Props: {...}> = {
21
22
  // eslint-disable-next-line no-unused-vars
@@ -88,7 +89,7 @@ export function unstable_createAnimatedComponentWithAllowlist<
88
89
  {...reducedProps}
89
90
  {...passthroughAnimatedPropExplicitValues}
90
91
  style={mergedStyle}
91
- ref={ref}
92
+ ref={DELEGATE.processRef(ref)}
92
93
  />
93
94
  );
94
95
  });
@@ -0,0 +1,3 @@
1
+ export function processRef(ref) {
2
+ return ref;
3
+ }
@@ -12,6 +12,7 @@ import type {ViewProps} from './ViewPropTypes';
12
12
 
13
13
  import TextAncestor from '../../Text/TextAncestor';
14
14
  import ViewNativeComponent from './ViewNativeComponent';
15
+ import * as DELEGATE from './delegates/ViewDelegate'
15
16
  import * as React from 'react';
16
17
 
17
18
  export type Props = ViewProps;
@@ -94,15 +95,21 @@ const View: component(
94
95
  };
95
96
  }
96
97
 
98
+ // Interop-61: map legacy accessibilityStates -> accessibilityState
99
+ const convertedProps = DELEGATE.convertAccessibilityStates(otherProps);
100
+
97
101
  const actualView = (
98
102
  <ViewNativeComponent
99
- {...otherProps}
103
+ {...convertedProps}
100
104
  accessibilityLiveRegion={
101
105
  ariaLive === 'off' ? 'none' : ariaLive ?? accessibilityLiveRegion
102
106
  }
103
107
  accessibilityLabel={ariaLabel ?? accessibilityLabel}
104
108
  focusable={tabIndex !== undefined ? !tabIndex : focusable}
105
- accessibilityState={_accessibilityState}
109
+ accessibilityState={{
110
+ ..._accessibilityState,
111
+ ...((convertedProps && convertedProps.accessibilityState) || {}),
112
+ }}
106
113
  accessibilityElementsHidden={ariaHidden ?? accessibilityElementsHidden}
107
114
  accessibilityLabelledBy={_accessibilityLabelledBy}
108
115
  accessibilityValue={_accessibilityValue}
@@ -0,0 +1,3 @@
1
+ export function convertAccessibilityStates(props) {
2
+ return props;
3
+ }
package/metro.config.js CHANGED
@@ -136,6 +136,10 @@ function createHarmonyMetroConfig(options) {
136
136
  }
137
137
 
138
138
  try {
139
+ const maybeResult = resolveRequestOnlyForHarmony(ctx, moduleName);
140
+ if (maybeResult) {
141
+ return maybeResult;
142
+ }
139
143
  return ctx.resolveRequest(ctx, moduleName, HARMONY_PLATFORM_NAME);
140
144
  } catch {
141
145
  return ctx.resolveRequest(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-oh/react-native-harmony",
3
- "version": "0.77.18-1",
3
+ "version": "0.77.22",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/",
Binary file