Integrate RN Nightly 10/16 (#12532)
* Change files * testing 10/10 * fixed change files * fixed include * yoga fix * integrated 10/12 * uimanager changes * integrate 10/13 * disabled prop change * integrate 10/14 * integrate 10/15 * integrate 10/16 * fixed formatting 10/16 * lint fix * cherry-pick 'Implement JSI native state support' * Use static_pointer_cast instead of dynamic_pointer_cast * Fix x86 tests * fix merge * fix merge * add hasNativeState change --------- Co-authored-by: Vladimir Morozov <vmorozov@microsoft.com>
This commit is contained in:
Родитель
6fe7a66601
Коммит
6efa6bff7d
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "prerelease",
|
||||
"comment": "testing integration",
|
||||
"packageName": "@office-iss/react-native-win32",
|
||||
"email": "yajurgrover24@gmail.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "patch",
|
||||
"comment": "testing integration",
|
||||
"packageName": "@react-native-windows/automation-channel",
|
||||
"email": "yajurgrover24@gmail.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"type": "prerelease",
|
||||
"comment": "testing integration",
|
||||
"packageName": "react-native-windows",
|
||||
"email": "yajurgrover24@gmail.com",
|
||||
"dependentChangeType": "patch"
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
"excludePatterns": [
|
||||
"src/js/examples-win32/**"
|
||||
],
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "patch",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"peerDependencies": {
|
||||
"@office-iss/react-native-win32": "^0.0.0-canary.222",
|
||||
"react": "18.0.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3"
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@office-iss/react-native-win32": "^0.0.0-canary.222",
|
||||
|
@ -30,7 +30,7 @@
|
|||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
"just-scripts": "^1.3.3",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
|
|
|
@ -147,4 +147,4 @@ untyped-import
|
|||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.217.2
|
||||
^0.218.0
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
"**/__snapshots__/**",
|
||||
"src/rntypes/**"
|
||||
],
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "derived",
|
||||
"file": ".flowconfig",
|
||||
"baseFile": ".flowconfig",
|
||||
"baseHash": "f44aee31438c1225f42664e9359e72272c08bb1d"
|
||||
"baseHash": "671a34717020278b7888dafa3b4fa88375e3d29b"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -112,7 +112,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Components/ScrollView/ScrollView.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js",
|
||||
"baseHash": "87a276aff215fedb38d7ced5d9aef61224ebe0c2"
|
||||
"baseHash": "6e3e4933173d1f910232f3f46602e2f525127eb5"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -130,7 +130,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Components/TextInput/TextInput.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
||||
"baseHash": "0a0b60aee76438543e8f2e62d48849d5c33753bd"
|
||||
"baseHash": "4431d2d4ea39a5ce9b9fad8ed22c7896b77ca9d2"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
|
@ -170,7 +170,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js",
|
||||
"baseHash": "fa5b3198efddd86eca7965aa90104408ed53fbbf"
|
||||
"baseHash": "2082604bf871d04091717d7808ebf0b2355fc8ae"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -194,7 +194,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/Components/View/View.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
|
||||
"baseHash": "f25ca9bd8f25d1dd05d98d40946a41b19fac87f1"
|
||||
"baseHash": "d621a2fb669bbc2fc0657db1233c9a930a073fba"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -252,7 +252,7 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Image/Image.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Image/Image.ios.js",
|
||||
"baseHash": "ead4aaa048a5ae0186d3f8ade054b970a2115a3a",
|
||||
"baseHash": "bccd20ad47baa18b187bd8eb92b7627135be29fd",
|
||||
"issue": 4320
|
||||
},
|
||||
{
|
||||
|
@ -410,7 +410,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/ReactNative/PaperUIManager.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/ReactNative/PaperUIManager.js",
|
||||
"baseHash": "64504c716b2c64116d1ec74702ce7754fa651c6f"
|
||||
"baseHash": "d5bbe5273211e4f39e6468f0c90ec42e5fe0a9c0"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -434,7 +434,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/StyleSheet/StyleSheet.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
||||
"baseHash": "e73098e3a22f8f74328e0a9f387839bb03322bb6"
|
||||
"baseHash": "7c42da708bc5cf4e3135ae81a45dddae48e0bfec"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -493,13 +493,13 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Utilities/NativePlatformConstantsWin.js",
|
||||
"baseFile": "packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js",
|
||||
"baseHash": "77a07a52a5d20150d5596574e251aba1b767a9cd"
|
||||
"baseHash": "d618776f5251597b9fa13c55be27e09f3ceccdf3"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
"file": "src/Libraries/Utilities/Platform.flow.win32.js",
|
||||
"baseFile": "packages/react-native/Libraries/Utilities/Platform.flow.js",
|
||||
"baseHash": "c0a203e8d15f99ff00edaab6c4a40a49606a99f0"
|
||||
"baseHash": "48e0b6dd625aa58347266a362eb404ddd47b59d4"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
|
|
@ -30,20 +30,20 @@
|
|||
"@react-native-community/cli-platform-android": "12.0.0-alpha.15",
|
||||
"@react-native-community/cli-platform-ios": "12.0.0-alpha.15",
|
||||
"@react-native/assets": "1.0.0",
|
||||
"@react-native/assets-registry": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/codegen": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/community-cli-plugin": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/gradle-plugin": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/js-polyfills": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/assets-registry": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/codegen": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/community-cli-plugin": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/gradle-plugin": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/js-polyfills": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/metro-config": "^0.73.0",
|
||||
"@react-native/normalize-colors": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/virtualized-lists": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/normalize-colors": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/virtualized-lists": "0.74.0-nightly-20231016-44660019e",
|
||||
"abort-controller": "^3.0.0",
|
||||
"anser": "^1.4.9",
|
||||
"ansi-regex": "^5.0.0",
|
||||
"art": "^0.10.0",
|
||||
"base64-js": "^1.5.1",
|
||||
"deprecated-react-native-prop-types": "4.2.1",
|
||||
"deprecated-react-native-prop-types": "^5.0.0",
|
||||
"event-target-shim": "^5.0.1",
|
||||
"flow-enums-runtime": "^0.0.6",
|
||||
"invariant": "^2.2.4",
|
||||
|
@ -85,13 +85,13 @@
|
|||
"just-scripts": "^1.3.3",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3"
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e"
|
||||
},
|
||||
"beachball": {
|
||||
"defaultNpmTag": "canary",
|
||||
|
|
|
@ -546,8 +546,6 @@ export type Props = $ReadOnly<{|
|
|||
* When true, the scroll view stops on multiples of the scroll view's size
|
||||
* when scrolling. This can be used for horizontal pagination. The default
|
||||
* value is false.
|
||||
*
|
||||
* Note: Vertical pagination is not supported on Android.
|
||||
*/
|
||||
pagingEnabled?: ?boolean,
|
||||
/**
|
||||
|
|
|
@ -148,6 +148,9 @@ type DataDetectorTypesType =
|
|||
| 'link'
|
||||
| 'address'
|
||||
| 'calendarEvent'
|
||||
| 'trackingNumber'
|
||||
| 'flightNumber'
|
||||
| 'lookupSuggestion'
|
||||
| 'none'
|
||||
| 'all';
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
import type {ViewProps} from './ViewPropTypes';
|
||||
|
||||
import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
|
||||
import flattenStyle from '../../StyleSheet/flattenStyle';
|
||||
import TextAncestor from '../../Text/TextAncestor';
|
||||
import ViewNativeComponent from './ViewNativeComponent';
|
||||
|
@ -124,15 +123,6 @@ const View: React.AbstractComponent<
|
|||
|
||||
// $FlowFixMe[sketchy-null-mixed]
|
||||
const newPointerEvents = style?.pointerEvents || pointerEvents;
|
||||
const collapsableOverride =
|
||||
ReactNativeFeatureFlags.shouldForceUnflattenForElevation()
|
||||
? {
|
||||
collapsable:
|
||||
style != null && style.elevation != null && style.elevation !== 0
|
||||
? false
|
||||
: otherProps.collapsable,
|
||||
}
|
||||
: {};
|
||||
|
||||
const _keyDown = (event: KeyEvent) => {
|
||||
if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
|
||||
|
@ -232,7 +222,6 @@ const View: React.AbstractComponent<
|
|||
return (
|
||||
<ViewNativeComponent
|
||||
{...otherProps}
|
||||
{...collapsableOverride}
|
||||
accessibilityControls={ariaControls ?? accessibilityControls} // Win32
|
||||
accessibilityDescribedBy={
|
||||
ariaDescribedBy ?? accessibilityDescribedBy
|
||||
|
|
|
@ -4,24 +4,25 @@
|
|||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {ImageIOS} from './Image.flow';
|
||||
import type {AbstractImageIOS, ImageIOS} from './ImageTypes.flow';
|
||||
import TextAncestor from '../Text/TextAncestor'; // [Windows]
|
||||
import invariant from 'invariant'; // [Windows]
|
||||
|
||||
import type {ImageProps as ImagePropsType} from './ImageProps';
|
||||
|
||||
import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {ImageStyle, ImageStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import NativeImageLoaderWin32 from './NativeImageLoaderWin32'; // [Win32] Replace iOS
|
||||
|
||||
import {createRootTag} from '../ReactNative/RootTag';
|
||||
import flattenStyle from '../StyleSheet/flattenStyle';
|
||||
import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
||||
import ImageInjection from './ImageInjection';
|
||||
import {unstable_getImageComponentDecorator} from './ImageInjection';
|
||||
import {getImageSourcesFromImageProps} from './ImageSourceUtils';
|
||||
import {convertObjectFitToResizeMode} from './ImageUtils';
|
||||
import ImageViewNativeComponent from './ImageViewNativeComponent';
|
||||
|
@ -31,6 +32,7 @@ import * as React from 'react';
|
|||
function getSize(
|
||||
uri: string,
|
||||
success: (width: number, height: number) => void,
|
||||
// $FlowFixMe[unclear-type]
|
||||
failure?: (error: any) => void,
|
||||
) {
|
||||
//[Win32
|
||||
|
@ -48,6 +50,7 @@ function getSize(
|
|||
NativeImageLoaderWin32.getSize(
|
||||
uri,
|
||||
(width: number, height: number, err?: string) => {
|
||||
// $FlowFixMe[sketchy-null-string]
|
||||
if (!err) {
|
||||
success(width, height);
|
||||
} else {
|
||||
|
@ -66,7 +69,8 @@ function getSizeWithHeaders(
|
|||
uri: string,
|
||||
headers: {[string]: string, ...},
|
||||
success: (width: number, height: number) => void,
|
||||
failure?: (error: any) => void,
|
||||
failure?: (error: mixed) => void,
|
||||
// $FlowFixMe[unclear-type]
|
||||
): any {
|
||||
return NativeImageLoaderWin32.getSizeWithHeaders(uri, headers)
|
||||
.then(function (sizes) {
|
||||
|
@ -84,41 +88,30 @@ function prefetchWithMetadata(
|
|||
url: string,
|
||||
queryRootName: string,
|
||||
rootTag?: ?RootTag,
|
||||
): any {
|
||||
): Promise<boolean> {
|
||||
if (NativeImageLoaderWin32.prefetchImageWithMetadata) {
|
||||
// number params like rootTag cannot be nullable before TurboModules is available
|
||||
return NativeImageLoaderWin32.prefetchImageWithMetadata(
|
||||
url,
|
||||
queryRootName,
|
||||
// NOTE: RootTag type
|
||||
// $FlowFixMe[incompatible-call] RootTag: number is incompatible with RootTag
|
||||
rootTag ? rootTag : 0,
|
||||
rootTag != null ? rootTag : createRootTag(0),
|
||||
);
|
||||
} else {
|
||||
return NativeImageLoaderWin32.prefetchImage(url);
|
||||
}
|
||||
}
|
||||
|
||||
function prefetch(url: string): any {
|
||||
function prefetch(url: string): Promise<boolean> {
|
||||
return NativeImageLoaderWin32.prefetchImage(url);
|
||||
}
|
||||
|
||||
async function queryCache(
|
||||
urls: Array<string>,
|
||||
): Promise<{[string]: 'memory' | 'disk' | 'disk/memory', ...}> {
|
||||
return await NativeImageLoaderWin32.queryCache(urls);
|
||||
return NativeImageLoaderWin32.queryCache(urls);
|
||||
}
|
||||
|
||||
export type ImageComponentStatics = $ReadOnly<{|
|
||||
getSize: typeof getSize,
|
||||
getSizeWithHeaders: typeof getSizeWithHeaders,
|
||||
prefetch: typeof prefetch,
|
||||
prefetchWithMetadata: typeof prefetchWithMetadata,
|
||||
abortPrefetch?: number => void,
|
||||
queryCache: typeof queryCache,
|
||||
resolveAssetSource: typeof resolveAssetSource,
|
||||
|}>;
|
||||
|
||||
/**
|
||||
* A React component for displaying different types of images,
|
||||
* including network images, static resources, temporary local images, and
|
||||
|
@ -126,9 +119,7 @@ export type ImageComponentStatics = $ReadOnly<{|
|
|||
*
|
||||
* See https://reactnative.dev/docs/image
|
||||
*/
|
||||
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
||||
* LTI update could not be added via codemod */
|
||||
const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
||||
let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
|
||||
const source = getImageSourcesFromImageProps(props) || {
|
||||
uri: undefined,
|
||||
width: undefined,
|
||||
|
@ -136,16 +127,23 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
};
|
||||
|
||||
let sources;
|
||||
let style: ImageStyleProp;
|
||||
let style: ImageStyle;
|
||||
|
||||
if (Array.isArray(source)) {
|
||||
// $FlowFixMe[underconstrained-implicit-instantiation]
|
||||
style = flattenStyle([styles.base, props.style]) || {};
|
||||
style =
|
||||
flattenStyle<ImageStyleProp>([styles.base, props.style]) ||
|
||||
({}: ImageStyle);
|
||||
sources = source;
|
||||
} else {
|
||||
// $FlowFixMe[incompatible-type]
|
||||
const {width = props.width, height = props.height, uri} = source;
|
||||
// $FlowFixMe[underconstrained-implicit-instantiation]
|
||||
style = flattenStyle([{width, height}, styles.base, props.style]) || {};
|
||||
const {uri} = source;
|
||||
const width = source.width ?? props.width;
|
||||
const height = source.height ?? props.height;
|
||||
style =
|
||||
flattenStyle<ImageStyleProp>([
|
||||
{width, height},
|
||||
styles.base,
|
||||
props.style,
|
||||
]) || ({}: ImageStyle);
|
||||
sources = [source];
|
||||
|
||||
if (uri === '') {
|
||||
|
@ -154,16 +152,12 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
}
|
||||
|
||||
const objectFit =
|
||||
// $FlowFixMe[prop-missing]
|
||||
style && style.objectFit
|
||||
? // $FlowFixMe[incompatible-call]
|
||||
convertObjectFitToResizeMode(style.objectFit)
|
||||
style.objectFit != null
|
||||
? convertObjectFitToResizeMode(style.objectFit)
|
||||
: null;
|
||||
const resizeMode =
|
||||
// $FlowFixMe[prop-missing]
|
||||
objectFit || props.resizeMode || (style && style.resizeMode) || 'cover';
|
||||
// $FlowFixMe[prop-missing]
|
||||
const tintColor = props.tintColor || style.tintColor;
|
||||
objectFit || props.resizeMode || style.resizeMode || 'cover';
|
||||
const tintColor = props.tintColor ?? style.tintColor;
|
||||
|
||||
if (props.children != null) {
|
||||
throw new Error(
|
||||
|
@ -217,7 +211,6 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
accessibilityLabel={accessibilityLabel ?? props.alt}
|
||||
ref={forwardedRef}
|
||||
style={style}
|
||||
// $FlowFixMe[incompatible-type]
|
||||
resizeMode={resizeMode}
|
||||
tintColor={tintColor}
|
||||
source={sources}
|
||||
|
@ -230,18 +223,16 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
}}
|
||||
</TextAncestor.Consumer>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const ImageForwardRef = React.forwardRef<
|
||||
ImagePropsType,
|
||||
React.ElementRef<typeof ImageViewNativeComponent>,
|
||||
>(BaseImage);
|
||||
|
||||
let Image = ImageForwardRef;
|
||||
if (ImageInjection.unstable_createImageComponent != null) {
|
||||
Image = ImageInjection.unstable_createImageComponent(Image);
|
||||
const imageComponentDecorator = unstable_getImageComponentDecorator();
|
||||
if (imageComponentDecorator != null) {
|
||||
BaseImage = imageComponentDecorator(BaseImage);
|
||||
}
|
||||
|
||||
// $FlowExpectedError[incompatible-type] Eventually we need to move these functions from statics of the component to exports in the module.
|
||||
const Image: ImageIOS = BaseImage;
|
||||
|
||||
Image.displayName = 'Image';
|
||||
|
||||
/**
|
||||
|
@ -249,9 +240,7 @@ Image.displayName = 'Image';
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#getsize
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.getSize = getSize;
|
||||
|
||||
/**
|
||||
|
@ -260,9 +249,7 @@ Image.getSize = getSize;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#getsizewithheaders
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.getSizeWithHeaders = getSizeWithHeaders;
|
||||
|
||||
/**
|
||||
|
@ -271,9 +258,7 @@ Image.getSizeWithHeaders = getSizeWithHeaders;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#prefetch
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.prefetch = prefetch;
|
||||
|
||||
/**
|
||||
|
@ -282,9 +267,7 @@ Image.prefetch = prefetch;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#prefetch
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.prefetchWithMetadata = prefetchWithMetadata;
|
||||
|
||||
/**
|
||||
|
@ -292,9 +275,7 @@ Image.prefetchWithMetadata = prefetchWithMetadata;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#querycache
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.queryCache = queryCache;
|
||||
|
||||
/**
|
||||
|
@ -302,9 +283,7 @@ Image.queryCache = queryCache;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#resolveassetsource
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.resolveAssetSource = resolveAssetSource;
|
||||
|
||||
/**
|
||||
|
@ -319,4 +298,4 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
});
|
||||
|
||||
module.exports = ((Image: any): ImageIOS);
|
||||
module.exports = Image;
|
||||
|
|
|
@ -156,6 +156,7 @@ class Inspector extends React.Component<
|
|||
|
||||
// [Win32 Avoid Dimensions call
|
||||
const node = ReactNative.findNodeHandle(this);
|
||||
// $FlowFixMe[incompatible-call]
|
||||
UIManager.measure(node, (x, y, width, height, left, top) => {
|
||||
this.setState({
|
||||
panelPos: pointerY > height / 2 ? 'top' : 'bottom',
|
||||
|
|
|
@ -13,6 +13,8 @@ const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty'
|
|||
const Platform = require('../Utilities/Platform');
|
||||
const UIManagerProperties = require('./UIManagerProperties');
|
||||
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';
|
||||
import NativeUIManager from './NativeUIManager';
|
||||
// import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes'; [Windows]
|
||||
|
||||
|
@ -76,8 +78,23 @@ function getViewManagerConfig(viewManagerName: string): any {
|
|||
return viewManagerConfigs[viewManagerName];
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
const UIManagerJS = {};
|
||||
// $FlowFixMe[cannot-spread-interface]
|
||||
const UIManagerJS: UIManagerJSInterface = {
|
||||
...NativeUIManager,
|
||||
createView(
|
||||
reactTag: ?number,
|
||||
viewName: string,
|
||||
rootTag: RootTag,
|
||||
props: Object,
|
||||
): void {
|
||||
if (Platform.OS === 'ios' && viewManagerConfigs[viewName] === undefined) {
|
||||
// This is necessary to force the initialization of native viewManager
|
||||
// classes in iOS when using static ViewConfigs
|
||||
getViewManagerConfig(viewName);
|
||||
}
|
||||
NativeUIManager.createView(reactTag, viewName, rootTag, props);
|
||||
},
|
||||
};
|
||||
|
||||
// [Windows The spread operator doesn't work on JSI turbomodules, so use this instead
|
||||
for (const propName of Object.getOwnPropertyNames(NativeUIManager)) {
|
||||
|
|
|
@ -214,16 +214,12 @@ if (__DEV__) {
|
|||
* Code quality:
|
||||
*
|
||||
* - By moving styles away from the render function, you're making the code
|
||||
* easier to understand.
|
||||
* easier to understand.
|
||||
* - Naming the styles is a good way to add meaning to the low level components
|
||||
* in the render function.
|
||||
* in the render function, and encourage reuse.
|
||||
* - In most IDEs, using `StyleSheet.create()` will offer static type checking
|
||||
* and suggestions to help you write valid styles.
|
||||
*
|
||||
* Performance:
|
||||
*
|
||||
* - Making a stylesheet from a style object makes it possible to refer to it
|
||||
* by ID instead of creating a new style object every time.
|
||||
* - It also allows to send the style only once through the bridge. All
|
||||
* subsequent uses are going to refer an id (not implemented yet).
|
||||
*/
|
||||
module.exports = {
|
||||
/**
|
||||
|
@ -287,14 +283,6 @@ module.exports = {
|
|||
|
||||
/**
|
||||
* Flattens an array of style objects, into one aggregated style object.
|
||||
* Alternatively, this method can be used to lookup IDs, returned by
|
||||
* StyleSheet.register.
|
||||
*
|
||||
* > **NOTE**: Exercise caution as abusing this can tax you in terms of
|
||||
* > optimizations.
|
||||
* >
|
||||
* > IDs enable optimizations through the bridge and memory in general. Referring
|
||||
* > to style objects directly will deprive you of these optimizations.
|
||||
*
|
||||
* Example:
|
||||
* ```
|
||||
|
@ -312,17 +300,6 @@ module.exports = {
|
|||
* StyleSheet.flatten([styles.listItem, styles.selectedListItem])
|
||||
* // returns { flex: 1, fontSize: 16, color: 'green' }
|
||||
* ```
|
||||
* Alternative use:
|
||||
* ```
|
||||
* StyleSheet.flatten(styles.listItem);
|
||||
* // return { flex: 1, fontSize: 16, color: 'white' }
|
||||
* // Simply styles.listItem would return its ID (number)
|
||||
* ```
|
||||
* This method internally uses `StyleSheetRegistry.getStyleByID(style)`
|
||||
* to resolve style objects represented by IDs. Thus, an array of style
|
||||
* objects (instances of StyleSheet.create), are individually resolved to,
|
||||
* their respective objects, merged as one and then returned. This also explains
|
||||
* the alternative use.
|
||||
*/
|
||||
flatten,
|
||||
|
||||
|
@ -363,7 +340,7 @@ module.exports = {
|
|||
},
|
||||
|
||||
/**
|
||||
* Creates a StyleSheet style reference from the given object.
|
||||
* An identity function for creating style sheets.
|
||||
*/
|
||||
// $FlowFixMe[unsupported-variance-annotation]
|
||||
create<+S: ____Styles_Internal>(obj: S): $ReadOnly<S> {
|
||||
|
|
|
@ -19,7 +19,11 @@ export type PlatformConstantsWin32 = {|
|
|||
patch: number,
|
||||
prerelease: ?string | number,
|
||||
|},
|
||||
forceTouchAvailable: boolean,
|
||||
osVersion: number,
|
||||
systemName: string,
|
||||
interfaceIdiom: string,
|
||||
isMacCatalyst?: boolean,
|
||||
|};
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
|
|
|
@ -21,21 +21,22 @@ type IOSPlatform = {
|
|||
__constants: null,
|
||||
OS: $TEMPORARY$string<'ios'>,
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get Version(): string,
|
||||
get Version(): number,
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get constants(): {|
|
||||
forceTouchAvailable: boolean,
|
||||
interfaceIdiom: string,
|
||||
isTesting: boolean,
|
||||
isDisableAnimations?: boolean,
|
||||
osVersion: string,
|
||||
osVersion: number,
|
||||
systemName: string,
|
||||
reactNativeVersion: {|
|
||||
major: number,
|
||||
minor: number,
|
||||
patch: number,
|
||||
prerelease: ?number,
|
||||
prerelease: ?string | number,
|
||||
|},
|
||||
systemName: string,
|
||||
isMacCatalyst?: boolean,
|
||||
|},
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get isPad(): boolean,
|
||||
|
@ -45,6 +46,8 @@ type IOSPlatform = {
|
|||
get isTesting(): boolean,
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get isDisableAnimations(): boolean,
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get isMacCatalyst(): boolean,
|
||||
select: <T>(spec: PlatformSelectSpec<T>) => T,
|
||||
};
|
||||
|
||||
|
@ -89,15 +92,19 @@ type Win32Platform = {
|
|||
get Version(): number,
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get constants(): {|
|
||||
forceTouchAvailable: boolean,
|
||||
interfaceIdiom: string,
|
||||
isTesting: boolean,
|
||||
isDisableAnimations?: boolean,
|
||||
osVersion: number,
|
||||
reactNativeVersion: {|
|
||||
major: number,
|
||||
minor: number,
|
||||
patch: number,
|
||||
prerelease: ?string | number,
|
||||
|},
|
||||
osVersion: number,
|
||||
systemName: string,
|
||||
isMacCatalyst?: boolean,
|
||||
|},
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get isTV(): boolean,
|
||||
|
|
|
@ -23,15 +23,19 @@ const Platform: PlatformType = {
|
|||
},
|
||||
// $FlowFixMe[unsafe-getters-setters]
|
||||
get constants(): {|
|
||||
forceTouchAvailable: boolean,
|
||||
interfaceIdiom: string,
|
||||
isTesting: boolean,
|
||||
isDisableAnimations?: boolean,
|
||||
osVersion: number,
|
||||
reactNativeVersion: {|
|
||||
major: number,
|
||||
minor: number,
|
||||
patch: number,
|
||||
prerelease: ?string | number,
|
||||
|},
|
||||
osVersion: number,
|
||||
systemName: string,
|
||||
isMacCatalyst?: boolean,
|
||||
|} {
|
||||
// $FlowFixMe[object-this-reference]
|
||||
if (this.__constants == null) {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"just-scripts": "^1.3.2",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
"excludePatterns": [
|
||||
"src/js/examples-win/**"
|
||||
],
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "patch",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"peerDependencies": {
|
||||
"@react-native-picker/picker": "2.4.10",
|
||||
"react": "18.0.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746",
|
||||
"react-native-xaml": "^0.0.50"
|
||||
},
|
||||
|
@ -31,7 +31,7 @@
|
|||
"@types/node": "^18.0.0",
|
||||
"eslint": "^8.19.0",
|
||||
"just-scripts": "^1.3.3",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"react-native-windows": "^0.0.0-canary.746",
|
||||
"typescript": "^4.9.5"
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "package.json",
|
||||
"baseFile": "package.json",
|
||||
"baseHash": "5c95fee6720baaafe7829a3078265e96cd1f2766"
|
||||
"baseHash": "6cc31ba918afb78f59ee8e67fe5a49f8375773a4"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -52,11 +52,11 @@
|
|||
"@definitelytyped/dtslint": "^0.0.127",
|
||||
"@jest/create-cache-key-function": "^29.6.3",
|
||||
"@pkgjs/parseargs": "^0.11.0",
|
||||
"@react-native/metro-babel-transformer": "^0.73.11",
|
||||
"@react-native/metro-config": "^0.73.0",
|
||||
"@react-native/metro-babel-transformer": "^0.74.0",
|
||||
"@react-native/metro-config": "^0.74.0",
|
||||
"@tsconfig/node18": "1.0.1",
|
||||
"@types/react": "^18.0.18",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"@typescript-eslint/parser": "^6.7.4",
|
||||
"ansi-styles": "^4.2.1",
|
||||
"async": "^3.2.2",
|
||||
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
|
||||
|
@ -80,10 +80,10 @@
|
|||
"eslint-plugin-react-native": "^4.0.0",
|
||||
"eslint-plugin-redundant-undefined": "^0.4.0",
|
||||
"eslint-plugin-relay": "^1.8.3",
|
||||
"flow-api-translator": "0.15.0",
|
||||
"flow-bin": "^0.217.2",
|
||||
"flow-api-translator": "0.16.0",
|
||||
"flow-bin": "^0.218.0",
|
||||
"glob": "^7.1.1",
|
||||
"hermes-eslint": "0.15.0",
|
||||
"hermes-eslint": "0.16.0",
|
||||
"inquirer": "^7.1.0",
|
||||
"jest": "^29.6.3",
|
||||
"jest-junit": "^10.0.0",
|
||||
|
@ -95,7 +95,7 @@
|
|||
"mock-fs": "^5.1.4",
|
||||
"nullthrows": "^1.1.1",
|
||||
"prettier": "2.8.8",
|
||||
"prettier-plugin-hermes-parser": "0.14.0",
|
||||
"prettier-plugin-hermes-parser": "0.16.0",
|
||||
"react": "18.2.0",
|
||||
"react-test-renderer": "18.2.0",
|
||||
"rimraf": "^3.0.2",
|
||||
|
|
|
@ -87,6 +87,7 @@ export default function MyNativeView(props: {}): React.Node {
|
|||
const ref = useRef<React.ElementRef<MyNativeViewType> | null>(null);
|
||||
const legacyRef = useRef<React.ElementRef<MyLegacyViewType> | null>(null);
|
||||
const [opacity, setOpacity] = useState(1.0);
|
||||
const [arrayValues, setArrayValues] = useState([1, 2, 3]);
|
||||
const [hsba, setHsba] = useState<HSBA>(new HSBA());
|
||||
const [cornerRadiusIndex, setCornerRadiusIndex] = useState<number>(0);
|
||||
const [legacyMeasure, setLegacyMeasure] =
|
||||
|
@ -102,7 +103,7 @@ export default function MyNativeView(props: {}): React.Node {
|
|||
ref={ref}
|
||||
style={{flex: 1}}
|
||||
opacity={opacity}
|
||||
values={[0, 1, 2, 3, 4]}
|
||||
values={arrayValues}
|
||||
onIntArrayChanged={event => {
|
||||
console.log(event.nativeEvent.values);
|
||||
console.log(event.nativeEvent.boolValues);
|
||||
|
@ -135,7 +136,7 @@ export default function MyNativeView(props: {}): React.Node {
|
|||
</Text>
|
||||
<Text style={{color: 'green', textAlign: 'center'}}>
|
||||
Constants From Interop Layer:{' '}
|
||||
{UIManager.RNTMyLegacyNativeView.Constants.PI}
|
||||
{UIManager.getViewManagerConfig('RNTMyLegacyNativeView').Constants.PI}
|
||||
</Text>
|
||||
<Button
|
||||
title="Change Background"
|
||||
|
@ -154,6 +155,11 @@ export default function MyNativeView(props: {}): React.Node {
|
|||
title="Set Opacity"
|
||||
onPress={() => {
|
||||
setOpacity(Math.random());
|
||||
setArrayValues([
|
||||
Math.floor(Math.random() * 100),
|
||||
Math.floor(Math.random() * 100),
|
||||
Math.floor(Math.random() * 100),
|
||||
]);
|
||||
}}
|
||||
/>
|
||||
<Button
|
||||
|
|
|
@ -82,6 +82,7 @@ class AppendingList extends React.Component<
|
|||
nestedScrollEnabled
|
||||
style={styles.scrollView}>
|
||||
{this.state.items.map(item =>
|
||||
// $FlowFixMe[prop-missing] React.Element internal inspection
|
||||
React.cloneElement(item, {key: item.props.msg}),
|
||||
)}
|
||||
</ScrollView>
|
||||
|
@ -94,6 +95,7 @@ class AppendingList extends React.Component<
|
|||
}}
|
||||
style={[styles.scrollView, styles.horizontalScrollView]}>
|
||||
{this.state.items.map(item =>
|
||||
// $FlowFixMe[prop-missing] React.Element internal inspection
|
||||
React.cloneElement(item, {key: item.props.msg, style: null}),
|
||||
)}
|
||||
</ScrollView>
|
||||
|
|
|
@ -50,6 +50,22 @@ function getSampleLegacyModule() {
|
|||
return module;
|
||||
}
|
||||
|
||||
function stringify(obj: mixed): string {
|
||||
function replacer(_: string, value: mixed) {
|
||||
if (value instanceof Object && !(value instanceof Array)) {
|
||||
return Object.keys(value ?? {})
|
||||
.sort()
|
||||
.reduce((sorted: {[key: string]: mixed}, key: string) => {
|
||||
sorted[key] = (value ?? {})[key];
|
||||
return sorted;
|
||||
}, {});
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
return (JSON.stringify(obj, replacer) || '').replaceAll('"', "'");
|
||||
}
|
||||
|
||||
class SampleLegacyModuleExample extends React.Component<{||}, State> {
|
||||
static contextType: React$Context<RootTag> = RootTagContext;
|
||||
|
||||
|
@ -119,7 +135,7 @@ class SampleLegacyModuleExample extends React.Component<{||}, State> {
|
|||
getObjectInteger: () => getSampleLegacyModule()?.getObjectInteger(99),
|
||||
getObjectFloat: () => getSampleLegacyModule()?.getObjectFloat(99.95),
|
||||
getString: () => getSampleLegacyModule()?.getString('Hello'),
|
||||
getRootTag: () => getSampleLegacyModule()?.getRootTag(this.context),
|
||||
getRootTag: () => getSampleLegacyModule()?.getRootTag(11),
|
||||
getObject: () =>
|
||||
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
|
||||
getUnsafeObject: () =>
|
||||
|
@ -171,7 +187,7 @@ class SampleLegacyModuleExample extends React.Component<{||}, State> {
|
|||
return (
|
||||
<View style={styles.result}>
|
||||
<Text testID={name + '-result'} style={[styles.value]}>
|
||||
{(JSON.stringify(result.value) || '').replaceAll('"', "'")}
|
||||
{stringify(result.value)}
|
||||
</Text>
|
||||
<Text style={[styles.type]}>{result.type}</Text>
|
||||
</View>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "copy",
|
||||
|
@ -320,7 +320,7 @@
|
|||
"type": "copy",
|
||||
"directory": "js/examples/ScrollView",
|
||||
"baseDirectory": "packages/rn-tester/js/examples/ScrollView",
|
||||
"baseHash": "b08c72fcc2839032d0395598c5c47940c5ec304f",
|
||||
"baseHash": "a753b85c3b4218aff1f47e51d6b297e1edead3fa",
|
||||
"issue": 4054
|
||||
},
|
||||
{
|
||||
|
@ -425,7 +425,7 @@
|
|||
"type": "copy",
|
||||
"directory": "js/examples/TurboModule",
|
||||
"baseDirectory": "packages/rn-tester/js/examples/TurboModule",
|
||||
"baseHash": "4840f6e3a1fc223ca176bc1e57499756f0fb1b5b",
|
||||
"baseHash": "f3a3463e3d5d78ae8624571504713bb46135f469",
|
||||
"issue": 4054
|
||||
},
|
||||
{
|
||||
|
@ -495,7 +495,7 @@
|
|||
"type": "copy",
|
||||
"file": "NativeComponentExample/js/MyNativeView.js",
|
||||
"baseFile": "packages/rn-tester/NativeComponentExample/js/MyNativeView.js",
|
||||
"baseHash": "8efce6893b6a054f0ce069c5ac6bd86d33945cde",
|
||||
"baseHash": "4c27c3b77e4260bfad8b920217ee6398806353a9",
|
||||
"issue": 4054
|
||||
},
|
||||
{
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||
"@typescript-eslint/parser": "^5.21.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||
"@typescript-eslint/parser": "^5.21.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746",
|
||||
"react-native-xaml": "^0.0.76"
|
||||
},
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
"Microsoft.NETCore.Platforms": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.1.0",
|
||||
"contentHash": "GmkKfoyerqmsHMn7OZj0AKpcBabD+GaafqphvX2Mw406IwiJRy1pKcKqdCfKJfYmkRyJ6+e+RaUylgdJoDa1jQ=="
|
||||
"contentHash": "ok+RPAtESz/9MUXeIEz6Lv5XAGQsaNmEYXMsgVALj4D7kqC8gveKWXWXbufLySR2fWrwZf8smyN5RmHu0e4BHA=="
|
||||
},
|
||||
"Microsoft.SourceLink.Common": {
|
||||
"type": "Transitive",
|
||||
|
@ -93,7 +93,7 @@
|
|||
"NETStandard.Library": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==",
|
||||
"contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
"@typescript-eslint/parser": "^5.21.0",
|
||||
"chai": "^4.2.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.21.0",
|
||||
"@typescript-eslint/parser": "^5.21.0",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
"@typescript-eslint/eslint-plugin": "^5.30.5",
|
||||
"@typescript-eslint/parser": "^5.57.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-windows": "^0.0.0-canary.746"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -139,4 +139,4 @@ untyped-import
|
|||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.217.2
|
||||
^0.218.0
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "pch.h"
|
||||
#include "JsiAbiApi.h"
|
||||
#include <utility>
|
||||
#include "ReactNonAbiValue.h"
|
||||
#include "winrt/Windows.Foundation.Collections.h"
|
||||
|
||||
using namespace facebook::jsi;
|
||||
|
@ -361,27 +362,31 @@ String JsiAbiRuntime::bigintToString(const BigInt &bigint, int radix) try {
|
|||
throw;
|
||||
}
|
||||
bool JsiAbiRuntime::hasNativeState(const Object &obj) try {
|
||||
// TODO: implement
|
||||
UNREFERENCED_PARAMETER(obj);
|
||||
VerifyElseCrash(false);
|
||||
JsiObjectRef ref = AsJsiObjectRef(obj);
|
||||
return m_runtime.HasNativeState(ref);
|
||||
} catch (hresult_error const &) {
|
||||
RethrowJsiError();
|
||||
throw;
|
||||
}
|
||||
std::shared_ptr<NativeState> JsiAbiRuntime::getNativeState(const Object &obj) try {
|
||||
// TODO: implement
|
||||
UNREFERENCED_PARAMETER(obj);
|
||||
VerifyElseCrash(false);
|
||||
JsiObjectRef ref = AsJsiObjectRef(obj);
|
||||
IReactNonAbiValue value = m_runtime.GetNativeState(ref);
|
||||
if (!value) {
|
||||
return nullptr;
|
||||
}
|
||||
ReactNonAbiValue<std::shared_ptr<NativeState>> *accessor =
|
||||
reinterpret_cast<ReactNonAbiValue<std::shared_ptr<NativeState>> *>(&value);
|
||||
return *accessor->GetPtr();
|
||||
} catch (hresult_error const &) {
|
||||
RethrowJsiError();
|
||||
throw;
|
||||
}
|
||||
|
||||
void JsiAbiRuntime::setNativeState(const Object &obj, std::shared_ptr<NativeState> state) try {
|
||||
// TODO: implement
|
||||
UNREFERENCED_PARAMETER(obj);
|
||||
UNREFERENCED_PARAMETER(state);
|
||||
VerifyElseCrash(false);
|
||||
JsiObjectRef ref = AsJsiObjectRef(obj);
|
||||
IReactNonAbiValue value =
|
||||
winrt::make<implementation::ReactNonAbiValue<std::shared_ptr<NativeState>>>(std::move(state));
|
||||
m_runtime.SetNativeState(ref, value);
|
||||
} catch (hresult_error const &) {
|
||||
RethrowJsiError();
|
||||
throw;
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace winrt::Microsoft::ReactNative {
|
|||
struct AbiCallInvoker final : facebook::react::CallInvoker {
|
||||
AbiCallInvoker(IReactDispatcher const &jsDispatcher) : m_jsDispatcher(jsDispatcher) {}
|
||||
|
||||
void invokeAsync(std::function<void()> &&func) override {
|
||||
void invokeAsync(std::function<void()> &&func) noexcept override {
|
||||
m_jsDispatcher.Post([func = std::move(func)]() { func(); });
|
||||
}
|
||||
|
||||
|
|
|
@ -52,11 +52,11 @@ namespace Microsoft.ReactNative.Managed.CodeGen.UnitTests
|
|||
}
|
||||
|
||||
var lkgContents = File.ReadAllText(lkgFile);
|
||||
if (!String.Equals(lkgContents, codeToCompare, StringComparison.Ordinal))
|
||||
if (!String.Equals(lkgContents.ReplaceLineEndings(), codeToCompare.ReplaceLineEndings(), StringComparison.Ordinal))
|
||||
{
|
||||
TraceEncountered(lkgContents, "Expected");
|
||||
TraceEncountered(codeToCompare, "Encountered");
|
||||
Assert.AreEqual(lkgContents, codeToCompare, $"Lkg file '{lkgFile}' does not match expected content. {generateMessage}");
|
||||
Assert.AreEqual(lkgContents.ReplaceLineEndings(), codeToCompare.ReplaceLineEndings(), $"Lkg file '{lkgFile}' does not match expected content. {generateMessage}");
|
||||
}
|
||||
#pragma warning restore CS0162
|
||||
}
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BundleOutputPath>$(OutputPath)</BundleOutputPath>
|
||||
<BundleSourceMapDir>$(OutputPath)sourcemaps\react</BundleSourceMapDir>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\Bundle.props" />
|
||||
<Target
|
||||
Name="MakeTestBundles"
|
||||
Condition="'$(DesignTimeBuild)' != 'true'"
|
||||
BeforeTargets="PrepareForBuild"
|
||||
Inputs="@(JsBundleEntry)"
|
||||
Outputs="@(JsBundleEntry->'$(OutputPath)%(Filename).bundle')">
|
||||
<MakeDir Directories="$(OutputPath)" Condition="!Exists('$(OutputPath)')" />
|
||||
<Exec Command="$(BundleCliCommand) --platform windows --entry-file %(JsBundleEntry.FullPath) --bundle-output $(OutputPath)%(JsBundleEntry.Filename).bundle" ConsoleToMSBuild="true" />
|
||||
Outputs="
|
||||
@(JsBundleEntry->'$(BundleOutputPath)\%(Filename).bundle');
|
||||
@(JsBundleEntry->'$(BundleSourceMapDir)\%(Filename).bundle.packager.map')">
|
||||
<MakeDir Directories="$(BundleOutputPath)" Condition="!Exists('$(BundleOutputPath)')" />
|
||||
<MakeDir Directories="$(BundleSourceMapDir)" Condition="!Exists('$(BundleSourceMapDir)')" />
|
||||
<Message Importance="High" Text="Running [$(BundleCliCommand) --platform windows --entry-file %(JsBundleEntry.FullPath) --bundle-output $(BundleOutputPath)\%(JsBundleEntry.Filename).bundle --dev $(UseDevBundle) --reset-cache --sourcemap-output $(BundleSourceMapDir)\%(JsBundleEntry.Filename).bundle.packager.map $(BundlerExtraArgs)] to build bundle file." />
|
||||
<Exec Command='$(BundleCliCommand) --platform windows --entry-file "%(JsBundleEntry.FullPath)" --bundle-output "$(BundleOutputPath)\%(JsBundleEntry.Filename).bundle" --dev $(UseDevBundle) --reset-cache --sourcemap-output "$(BundleSourceMapDir)\%(JsBundleEntry.Filename).bundle.packager.map" $(BundlerExtraArgs)' ConsoleToMSBuild="true" WorkingDirectory="$(BundleCommandWorkingDir)" />
|
||||
<ItemGroup>
|
||||
<Content Include="@(JsBundleEntry->'$(OutputPath)%(Filename).bundle')">
|
||||
<Content Include="@(JsBundleEntry->'$(BundleOutputPath)\%(Filename).bundle')">
|
||||
<Link>JSBundles\%(Filename).bundle</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
"Microsoft.NETCore.Platforms": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.1.0",
|
||||
"contentHash": "GmkKfoyerqmsHMn7OZj0AKpcBabD+GaafqphvX2Mw406IwiJRy1pKcKqdCfKJfYmkRyJ6+e+RaUylgdJoDa1jQ=="
|
||||
"contentHash": "ok+RPAtESz/9MUXeIEz6Lv5XAGQsaNmEYXMsgVALj4D7kqC8gveKWXWXbufLySR2fWrwZf8smyN5RmHu0e4BHA=="
|
||||
},
|
||||
"Microsoft.SourceLink.Common": {
|
||||
"type": "Transitive",
|
||||
|
@ -86,7 +86,7 @@
|
|||
"NETStandard.Library": {
|
||||
"type": "Transitive",
|
||||
"resolved": "2.0.3",
|
||||
"contentHash": "548M6mnBSJWxsIlkQHfbzoYxpiYFXZZSL00p4GHYv8PkiqFBnnT68mW5mGEsA/ch9fDO9GkPgkFQpWiXZN7mAQ==",
|
||||
"contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==",
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.Platforms": "1.1.0"
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ facebook::react::Props::Shared AbiViewComponentDescriptor::cloneProps(
|
|||
// Call old-style constructor
|
||||
// auto shadowNodeProps = std::make_shared<ShadowNodeT::Props>(context, rawProps, props);
|
||||
auto shadowNodeProps = std::make_shared<AbiViewProps>(
|
||||
context, props ? static_cast<AbiViewProps const &>(*props) : AbiViewProps(), rawProps);
|
||||
context, props ? static_cast<AbiViewProps const &>(*props) : *ShadowNodeT::defaultSharedProps(), rawProps);
|
||||
auto viewProps = winrt::make<winrt::Microsoft::ReactNative::implementation::UserViewProps>(shadowNodeProps);
|
||||
auto userProps =
|
||||
winrt::get_self<winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder>(m_builder)
|
||||
|
|
|
@ -280,7 +280,7 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPropertyValue(PROPERT
|
|||
}
|
||||
case UIA_IsEnabledPropertyId: {
|
||||
pRetVal->vt = VT_BOOL;
|
||||
pRetVal->boolVal = !props->accessibilityState.disabled ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
pRetVal->boolVal = !props->accessibilityState->disabled ? VARIANT_TRUE : VARIANT_FALSE;
|
||||
break;
|
||||
}
|
||||
case UIA_IsContentElementPropertyId: {
|
||||
|
|
|
@ -1303,8 +1303,8 @@ void CompositionBaseComponentView::updateAccessibilityProps(
|
|||
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
||||
m_uiaProvider,
|
||||
UIA_IsEnabledPropertyId,
|
||||
!oldViewProps.accessibilityState.disabled,
|
||||
!newViewProps.accessibilityState.disabled);
|
||||
!oldViewProps.accessibilityState->disabled,
|
||||
!newViewProps.accessibilityState->disabled);
|
||||
|
||||
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
||||
m_uiaProvider, UIA_ControlTypePropertyId, oldViewProps.accessibilityRole, newViewProps.accessibilityRole);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <react/renderer/core/LayoutConstraints.h>
|
||||
#include <react/renderer/core/LayoutContext.h>
|
||||
#include <react/renderer/core/conversions.h>
|
||||
#include <react/renderer/textlayoutmanager/TextLayoutContext.h>
|
||||
|
||||
#include <utility>
|
||||
|
||||
|
@ -151,7 +152,7 @@ void WindowsTextInputShadowNode::updateStateIfNeeded() {
|
|||
#pragma mark - LayoutableShadowNode
|
||||
|
||||
Size WindowsTextInputShadowNode::measureContent(
|
||||
const LayoutContext & /*layoutContext*/,
|
||||
const LayoutContext &layoutContext,
|
||||
const LayoutConstraints &layoutConstraints) const {
|
||||
if (getStateData().cachedAttributedStringId != 0) {
|
||||
return m_textLayoutManager
|
||||
|
@ -177,10 +178,13 @@ Size WindowsTextInputShadowNode::measureContent(
|
|||
return {0, 0};
|
||||
}
|
||||
|
||||
TextLayoutContext textLayoutContext;
|
||||
textLayoutContext.pointScaleFactor = layoutContext.pointScaleFactor;
|
||||
return m_textLayoutManager
|
||||
->measure(
|
||||
AttributedStringBox{attributedString},
|
||||
{}, // TODO getConcreteProps().paragraphAttributes,
|
||||
textLayoutContext,
|
||||
layoutConstraints,
|
||||
nullptr)
|
||||
.size;
|
||||
|
|
|
@ -132,6 +132,7 @@ void TextLayoutManager::GetTextLayout(
|
|||
TextMeasurement TextLayoutManager::measure(
|
||||
AttributedStringBox attributedStringBox,
|
||||
ParagraphAttributes paragraphAttributes,
|
||||
const TextLayoutContext &layoutContext,
|
||||
LayoutConstraints layoutConstraints,
|
||||
std::shared_ptr<void> /* hostTextStorage */) const {
|
||||
TextMeasurement measurement{};
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <react/renderer/attributedstring/AttributedStringBox.h>
|
||||
#include <react/renderer/attributedstring/ParagraphAttributes.h>
|
||||
#include <react/renderer/core/LayoutConstraints.h>
|
||||
#include <react/renderer/textlayoutmanager/TextLayoutContext.h>
|
||||
#include <react/renderer/textlayoutmanager/TextMeasureCache.h>
|
||||
#include <react/utils/ContextContainer.h>
|
||||
#include <memory>
|
||||
|
@ -36,6 +37,7 @@ class TextLayoutManager {
|
|||
TextMeasurement measure(
|
||||
AttributedStringBox attributedStringBox,
|
||||
ParagraphAttributes paragraphAttributes,
|
||||
const TextLayoutContext &layoutContext,
|
||||
LayoutConstraints layoutConstraints,
|
||||
std::shared_ptr<void> /* hostTextStorage */) const;
|
||||
|
||||
|
|
|
@ -39,6 +39,12 @@ struct JsiBufferWrapper : facebook::jsi::Buffer {
|
|||
array_view<const uint8_t> m_bytes;
|
||||
};
|
||||
|
||||
struct NonAbiValueNativeState : facebook::jsi::NativeState {
|
||||
NonAbiValueNativeState(IReactNonAbiValue const &value) : Value(value) {}
|
||||
|
||||
IReactNonAbiValue Value;
|
||||
};
|
||||
|
||||
//===========================================================================
|
||||
// Helper methods
|
||||
//===========================================================================
|
||||
|
@ -743,7 +749,6 @@ JsiObjectRef JsiRuntime::CreateObjectWithHostObject(IJsiHostObject const &hostOb
|
|||
IJsiHostObject JsiRuntime::GetHostObject(JsiObjectRef obj) try {
|
||||
auto objPtr = RuntimeAccessor::AsPointerValue(obj);
|
||||
auto hostObject = m_runtimeAccessor->getHostObject(RuntimeAccessor::AsObject(&objPtr));
|
||||
// TODO: using static_pointer_cast is unsafe here. How to use shared_ptr without RTTI?
|
||||
auto wrapper = std::static_pointer_cast<HostObjectWrapper>(hostObject);
|
||||
return wrapper ? wrapper->Get() : nullptr;
|
||||
} catch (JSI_SET_ERROR) {
|
||||
|
@ -911,16 +916,21 @@ bool JsiRuntime::HasNativeState(JsiObjectRef obj) try {
|
|||
throw;
|
||||
}
|
||||
|
||||
JsiObjectRef JsiRuntime::GetNativeState(JsiObjectRef obj) try {
|
||||
// TODO: implement
|
||||
VerifyElseCrash(false);
|
||||
IReactNonAbiValue JsiRuntime::GetNativeState(JsiObjectRef obj) try {
|
||||
auto objPtr = RuntimeAccessor::AsPointerValue(obj);
|
||||
std::shared_ptr<facebook::jsi::NativeState> nativeState =
|
||||
m_runtimeAccessor->getNativeState(RuntimeAccessor::AsObject(&objPtr));
|
||||
std::shared_ptr<NonAbiValueNativeState> valueState = std::static_pointer_cast<NonAbiValueNativeState>(nativeState);
|
||||
return valueState ? valueState->Value : nullptr;
|
||||
} catch (JSI_SET_ERROR) {
|
||||
throw;
|
||||
}
|
||||
|
||||
void JsiRuntime::SetNativeState(JsiObjectRef obj, JsiObjectRef state) try {
|
||||
// TODO: implement
|
||||
VerifyElseCrash(false);
|
||||
void JsiRuntime::SetNativeState(JsiObjectRef obj, IReactNonAbiValue const &state) try {
|
||||
auto objPtr = RuntimeAccessor::AsPointerValue(obj);
|
||||
std::shared_ptr<NonAbiValueNativeState> nativeState = std::make_shared<NonAbiValueNativeState>(state);
|
||||
m_runtimeAccessor->setNativeState(
|
||||
RuntimeAccessor::AsObject(&objPtr), std::static_pointer_cast<facebook::jsi::NativeState>(nativeState));
|
||||
} catch (JSI_SET_ERROR) {
|
||||
throw;
|
||||
}
|
||||
|
|
|
@ -107,8 +107,8 @@ struct JsiRuntime : JsiRuntimeT<JsiRuntime> {
|
|||
JsiStringRef BigintToString(JsiBigIntRef obj, int radix);
|
||||
|
||||
bool HasNativeState(JsiObjectRef obj);
|
||||
JsiObjectRef GetNativeState(JsiObjectRef obj);
|
||||
void SetNativeState(JsiObjectRef obj, JsiObjectRef state);
|
||||
IReactNonAbiValue GetNativeState(JsiObjectRef obj);
|
||||
void SetNativeState(JsiObjectRef obj, IReactNonAbiValue const &state);
|
||||
|
||||
JsiObjectRef CreateArrayBuffer(JsiObjectRef buffer);
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// Licensed under the MIT License.
|
||||
|
||||
#include "DocString.h"
|
||||
import "IReactNonAbiValue.idl";
|
||||
|
||||
namespace Microsoft.ReactNative
|
||||
{
|
||||
|
@ -286,10 +287,6 @@ namespace Microsoft.ReactNative
|
|||
UInt64 Truncate(JsiBigIntRef bigInt);
|
||||
JsiStringRef BigintToString(JsiBigIntRef bigInt, Int32 val);
|
||||
|
||||
Boolean HasNativeState(JsiObjectRef obj);
|
||||
JsiObjectRef GetNativeState(JsiObjectRef obj);
|
||||
void SetNativeState(JsiObjectRef obj, JsiObjectRef state);
|
||||
|
||||
JsiObjectRef CreateArrayBuffer(JsiObjectRef buffer);
|
||||
|
||||
JsiObjectRef CreateObject();
|
||||
|
@ -340,5 +337,9 @@ namespace Microsoft.ReactNative
|
|||
|
||||
JsiError GetAndClearError();
|
||||
void SetError(JsiErrorType errorType, String errorDetails, JsiValueRef value);
|
||||
|
||||
Boolean HasNativeState(JsiObjectRef obj);
|
||||
IReactNonAbiValue GetNativeState(JsiObjectRef obj);
|
||||
void SetNativeState(JsiObjectRef obj, IReactNonAbiValue state);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1452,6 +1452,74 @@ TEST_P(JSITest, MultilevelDecoratedHostObject) {
|
|||
EXPECT_EQ(ab.size(rt), 10);
|
||||
}*/
|
||||
|
||||
namespace {
|
||||
|
||||
struct IntState : public NativeState {
|
||||
explicit IntState(int value) : value(value) {}
|
||||
int value;
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
||||
TEST_P(JSITest, NativeState) {
|
||||
Object holder(rt);
|
||||
EXPECT_FALSE(holder.hasNativeState(rt));
|
||||
|
||||
auto stateValue = std::make_shared<IntState>(42);
|
||||
holder.setNativeState(rt, stateValue);
|
||||
EXPECT_TRUE(holder.hasNativeState(rt));
|
||||
EXPECT_EQ(
|
||||
std::dynamic_pointer_cast<IntState>(holder.getNativeState(rt))->value,
|
||||
42);
|
||||
|
||||
stateValue = std::make_shared<IntState>(21);
|
||||
holder.setNativeState(rt, stateValue);
|
||||
EXPECT_TRUE(holder.hasNativeState(rt));
|
||||
EXPECT_EQ(
|
||||
std::dynamic_pointer_cast<IntState>(holder.getNativeState(rt))->value,
|
||||
21);
|
||||
|
||||
// There's currently way to "delete" the native state of a component fully
|
||||
// Even when reset with nullptr, hasNativeState will still return true
|
||||
holder.setNativeState(rt, nullptr);
|
||||
EXPECT_TRUE(holder.hasNativeState(rt));
|
||||
EXPECT_TRUE(holder.getNativeState(rt) == nullptr);
|
||||
}
|
||||
|
||||
TEST_P(JSITest, NativeStateSymbolOverrides) {
|
||||
Object holder(rt);
|
||||
|
||||
auto stateValue = std::make_shared<IntState>(42);
|
||||
holder.setNativeState(rt, stateValue);
|
||||
|
||||
// Attempting to change configurable attribute of unconfigurable property
|
||||
try {
|
||||
function(
|
||||
"function (obj) {"
|
||||
" var mySymbol = Symbol();"
|
||||
" obj[mySymbol] = 'foo';"
|
||||
" var allSymbols = Object.getOwnPropertySymbols(obj);"
|
||||
" for (var sym of allSymbols) {"
|
||||
" Object.defineProperty(obj, sym, {configurable: true, writable: true});"
|
||||
" obj[sym] = 'bar';"
|
||||
" }"
|
||||
"}")
|
||||
.call(rt, holder);
|
||||
} catch (const JSError& ex) {
|
||||
// On JSC this throws, but it doesn't on Hermes
|
||||
std::string exc = ex.what();
|
||||
EXPECT_NE(
|
||||
exc.find(
|
||||
"Attempting to change configurable attribute of unconfigurable property"),
|
||||
std::string::npos);
|
||||
}
|
||||
|
||||
EXPECT_TRUE(holder.hasNativeState(rt));
|
||||
EXPECT_EQ(
|
||||
std::dynamic_pointer_cast<IntState>(holder.getNativeState(rt))->value,
|
||||
42);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Runtimes,
|
||||
JSITest,
|
||||
|
|
|
@ -368,7 +368,7 @@ void YogaLayoutableShadowNode::updateYogaChildren() {
|
|||
void YogaLayoutableShadowNode::updateYogaProps() {
|
||||
ensureUnsealed();
|
||||
|
||||
auto props = static_cast<const YogaStylableProps&>(*props_);
|
||||
auto& props = static_cast<const YogaStylableProps&>(*props_);
|
||||
auto styleResult = applyAliasedProps(props.yogaStyle, props);
|
||||
|
||||
// Resetting `dirty` flag only if `yogaStyle` portion of `Props` was changed.
|
||||
|
|
|
@ -195,10 +195,10 @@ static inline T const getFieldValue(
|
|||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER( \
|
||||
field, setter, yoga::Dimension::Height, heightStr);
|
||||
|
||||
#define REBUILD_FIELD_YG_GUTTER(field, rowGapStr, columnGapStr, gapStr) \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGGutterRow, rowGapStr); \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGGutterColumn, columnGapStr); \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGGutterAll, gapStr);
|
||||
#define REBUILD_FIELD_YG_GUTTER(field, setter, rowGapStr, columnGapStr, gapStr) \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER(field, setter, yoga::Gutter::Row, rowGapStr); \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER(field, setter, yoga::Gutter::Column, columnGapStr); \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER(field, setter, yoga::Gutter::All, gapStr);
|
||||
|
||||
#define REBUILD_FIELD_YG_EDGES(field, prefix, suffix) \
|
||||
REBUILD_YG_FIELD_SWITCH_CASE_INDEXED( \
|
||||
|
@ -250,7 +250,7 @@ void YogaStylableProps::setProp(
|
|||
REBUILD_FIELD_SWITCH_CASE_YSP(flexShrink);
|
||||
REBUILD_FIELD_SWITCH_CASE_YSP(flexBasis);
|
||||
REBUILD_FIELD_SWITCH_CASE2(positionType, "position");
|
||||
REBUILD_FIELD_YG_GUTTER(gap, "rowGap", "columnGap", "gap");
|
||||
REBUILD_FIELD_YG_GUTTER(gap, setGap, "rowGap", "columnGap", "gap");
|
||||
REBUILD_FIELD_SWITCH_CASE_YSP(aspectRatio);
|
||||
REBUILD_FIELD_YG_DIMENSION(dimension, setDimension, "width", "height");
|
||||
REBUILD_FIELD_YG_DIMENSION(
|
||||
|
@ -325,16 +325,16 @@ SharedDebugStringConvertibleList YogaStylableProps::getDebugProps() const {
|
|||
"flexGrow", yogaStyle.flexGrow(), defaultYogaStyle.flexGrow()),
|
||||
debugStringConvertibleItem(
|
||||
"rowGap",
|
||||
yogaStyle.gap()[YGGutterRow],
|
||||
defaultYogaStyle.gap()[YGGutterRow]),
|
||||
yogaStyle.gap(yoga::Gutter::Row),
|
||||
defaultYogaStyle.gap(yoga::Gutter::Row)),
|
||||
debugStringConvertibleItem(
|
||||
"columnGap",
|
||||
yogaStyle.gap()[YGGutterColumn],
|
||||
defaultYogaStyle.gap()[YGGutterColumn]),
|
||||
yogaStyle.gap(yoga::Gutter::Column),
|
||||
defaultYogaStyle.gap(yoga::Gutter::Column)),
|
||||
debugStringConvertibleItem(
|
||||
"gap",
|
||||
yogaStyle.gap()[YGGutterAll],
|
||||
defaultYogaStyle.gap()[YGGutterAll]),
|
||||
yogaStyle.gap(yoga::Gutter::All),
|
||||
defaultYogaStyle.gap(yoga::Gutter::All)),
|
||||
debugStringConvertibleItem(
|
||||
"flexShrink", yogaStyle.flexShrink(), defaultYogaStyle.flexShrink()),
|
||||
debugStringConvertibleItem(
|
||||
|
|
|
@ -201,7 +201,7 @@ void RawPropsParser::iterateOverValues(
|
|||
|
||||
auto name = nameValue.utf8(runtime);
|
||||
|
||||
auto nameHash = RAW_PROPS_KEY_HASH(name.c_str());
|
||||
auto nameHash = RAW_PROPS_KEY_HASH(name);
|
||||
auto rawValue = RawValue(jsi::dynamicFromValue(runtime, value));
|
||||
|
||||
visit(nameHash, name.c_str(), rawValue);
|
||||
|
@ -216,7 +216,7 @@ void RawPropsParser::iterateOverValues(
|
|||
for (const auto& pair : dynamic.items()) {
|
||||
auto name = pair.first.getString();
|
||||
|
||||
auto nameHash = RAW_PROPS_KEY_HASH(name.c_str());
|
||||
auto nameHash = RAW_PROPS_KEY_HASH(name);
|
||||
auto rawValue = RawValue{pair.second};
|
||||
visit(nameHash, name.c_str(), rawValue);
|
||||
}
|
||||
|
|
|
@ -352,7 +352,7 @@ CommitStatus ShadowTree::commit(
|
|||
const CommitOptions& commitOptions) const {
|
||||
SystraceSection s("ShadowTree::commit");
|
||||
|
||||
int attempts = 0;
|
||||
[[maybe_unused]] int attempts = 0;
|
||||
|
||||
while (true) {
|
||||
attempts++;
|
||||
|
|
|
@ -155,15 +155,14 @@ void UIManagerBinding::dispatchEventToJS(
|
|||
LOG(WARNING) << "instanceHandle is null, event will be dropped";
|
||||
}
|
||||
|
||||
auto& eventHandlerWrapper =
|
||||
static_cast<const EventHandlerWrapper&>(*eventHandler_);
|
||||
|
||||
currentEventPriority_ = priority;
|
||||
eventHandlerWrapper.callback.call(
|
||||
runtime,
|
||||
{std::move(instanceHandle),
|
||||
jsi::String::createFromUtf8(runtime, type),
|
||||
std::move(payload)});
|
||||
if (eventHandler_) {
|
||||
eventHandler_->call(
|
||||
runtime,
|
||||
std::move(instanceHandle),
|
||||
jsi::String::createFromUtf8(runtime, type),
|
||||
std::move(payload));
|
||||
}
|
||||
currentEventPriority_ = ReactEventPriority::Default;
|
||||
}
|
||||
|
||||
|
@ -327,25 +326,28 @@ jsi::Value UIManagerBinding::get(
|
|||
});
|
||||
}
|
||||
|
||||
// Semantic: Clones the node with *same* props and *empty* children.
|
||||
// Semantic: Clones the node with *same* props and *given* children.
|
||||
if (methodName == "cloneNodeWithNewChildren") {
|
||||
auto paramCount = 1;
|
||||
auto paramCount = 2;
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
name,
|
||||
paramCount,
|
||||
[uiManager, methodName, paramCount](
|
||||
[uiManager, methodName](
|
||||
jsi::Runtime& runtime,
|
||||
const jsi::Value& /*thisValue*/,
|
||||
const jsi::Value* arguments,
|
||||
size_t count) -> jsi::Value {
|
||||
validateArgumentCount(runtime, methodName, paramCount, count);
|
||||
// TODO: re-enable when passChildrenWhenCloningPersistedNodes is
|
||||
// rolled out
|
||||
// validateArgumentCount(runtime, methodName, paramCount, count);
|
||||
|
||||
return valueFromShadowNode(
|
||||
runtime,
|
||||
uiManager->cloneNode(
|
||||
*shadowNodeFromValue(runtime, arguments[0]),
|
||||
ShadowNode::emptySharedShadowNodeSharedList()));
|
||||
count > 1 ? shadowNodeListFromValue(runtime, arguments[1])
|
||||
: ShadowNode::emptySharedShadowNodeSharedList()));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -363,7 +365,7 @@ jsi::Value UIManagerBinding::get(
|
|||
size_t count) -> jsi::Value {
|
||||
validateArgumentCount(runtime, methodName, paramCount, count);
|
||||
|
||||
const auto& rawProps = RawProps(runtime, arguments[1]);
|
||||
RawProps rawProps(runtime, arguments[1]);
|
||||
return valueFromShadowNode(
|
||||
runtime,
|
||||
uiManager->cloneNode(
|
||||
|
@ -373,26 +375,31 @@ jsi::Value UIManagerBinding::get(
|
|||
});
|
||||
}
|
||||
|
||||
// Semantic: Clones the node with *given* props and *empty* children.
|
||||
// Semantic: Clones the node with *given* props and *given* children.
|
||||
if (methodName == "cloneNodeWithNewChildrenAndProps") {
|
||||
auto paramCount = 2;
|
||||
auto paramCount = 3;
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
name,
|
||||
paramCount,
|
||||
[uiManager, methodName, paramCount](
|
||||
[uiManager, methodName](
|
||||
jsi::Runtime& runtime,
|
||||
const jsi::Value& /*thisValue*/,
|
||||
const jsi::Value* arguments,
|
||||
size_t count) -> jsi::Value {
|
||||
validateArgumentCount(runtime, methodName, paramCount, count);
|
||||
// TODO: re-enable when passChildrenWhenCloningPersistedNodes is
|
||||
// rolled out
|
||||
// validateArgumentCount(runtime, methodName, paramCount, count);
|
||||
|
||||
const auto& rawProps = RawProps(runtime, arguments[1]);
|
||||
bool hasChildrenArg = count == 3;
|
||||
RawProps rawProps(runtime, arguments[hasChildrenArg ? 2 : 1]);
|
||||
return valueFromShadowNode(
|
||||
runtime,
|
||||
uiManager->cloneNode(
|
||||
*shadowNodeFromValue(runtime, arguments[0]),
|
||||
ShadowNode::emptySharedShadowNodeSharedList(),
|
||||
hasChildrenArg
|
||||
? shadowNodeListFromValue(runtime, arguments[1])
|
||||
: ShadowNode::emptySharedShadowNodeSharedList(),
|
||||
&rawProps));
|
||||
});
|
||||
}
|
||||
|
@ -417,6 +424,7 @@ jsi::Value UIManagerBinding::get(
|
|||
});
|
||||
}
|
||||
|
||||
// TODO: remove when passChildrenWhenCloningPersistedNodes is rolled out
|
||||
if (methodName == "createChildSet") {
|
||||
return jsi::Function::createFromHostFunction(
|
||||
runtime,
|
||||
|
@ -432,6 +440,7 @@ jsi::Value UIManagerBinding::get(
|
|||
});
|
||||
}
|
||||
|
||||
// TODO: remove when passChildrenWhenCloningPersistedNodes is rolled out
|
||||
if (methodName == "appendChildToSet") {
|
||||
auto paramCount = 2;
|
||||
return jsi::Function::createFromHostFunction(
|
||||
|
@ -476,16 +485,13 @@ jsi::Value UIManagerBinding::get(
|
|||
if (!uiManager->backgroundExecutor_ ||
|
||||
(runtimeSchedulerBinding &&
|
||||
runtimeSchedulerBinding->getIsSynchronous())) {
|
||||
auto weakShadowNodeList =
|
||||
weakShadowNodeListFromValue(runtime, arguments[1]);
|
||||
auto shadowNodeList =
|
||||
shadowNodeListFromWeakList(weakShadowNodeList);
|
||||
if (shadowNodeList) {
|
||||
uiManager->completeSurface(
|
||||
surfaceId,
|
||||
shadowNodeList,
|
||||
options);
|
||||
}
|
||||
shadowNodeListFromValue(runtime, arguments[1]);
|
||||
uiManager->completeSurface(
|
||||
surfaceId,
|
||||
shadowNodeList,
|
||||
{/* .enableStateReconciliation = */ true,
|
||||
/* .mountSynchronously = */ false});
|
||||
} else {
|
||||
auto weakShadowNodeList =
|
||||
weakShadowNodeListFromValue(runtime, arguments[1]);
|
||||
|
@ -538,7 +544,7 @@ jsi::Value UIManagerBinding::get(
|
|||
auto eventHandler =
|
||||
arguments[0].getObject(runtime).getFunction(runtime);
|
||||
eventHandler_ =
|
||||
std::make_unique<EventHandlerWrapper>(std::move(eventHandler));
|
||||
std::make_unique<jsi::Function>(std::move(eventHandler));
|
||||
return jsi::Value::undefined();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -59,156 +59,158 @@ void Node::print() {
|
|||
CompactValue Node::computeEdgeValueForRow(
|
||||
const Style::Edges& edges,
|
||||
YGEdge rowEdge,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue) {
|
||||
YGEdge edge) {
|
||||
if (!edges[rowEdge].isUndefined()) {
|
||||
return edges[rowEdge];
|
||||
} else if (!edges[edge].isUndefined()) {
|
||||
return edges[edge];
|
||||
} else if (!edges[YGEdgeHorizontal].isUndefined()) {
|
||||
return edges[YGEdgeHorizontal];
|
||||
} else if (!edges[YGEdgeAll].isUndefined()) {
|
||||
return edges[YGEdgeAll];
|
||||
} else {
|
||||
return defaultValue;
|
||||
return edges[YGEdgeAll];
|
||||
}
|
||||
}
|
||||
|
||||
CompactValue Node::computeEdgeValueForColumn(
|
||||
const Style::Edges& edges,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue) {
|
||||
YGEdge edge) {
|
||||
if (!edges[edge].isUndefined()) {
|
||||
return edges[edge];
|
||||
} else if (!edges[YGEdgeVertical].isUndefined()) {
|
||||
return edges[YGEdgeVertical];
|
||||
} else if (!edges[YGEdgeAll].isUndefined()) {
|
||||
} else {
|
||||
return edges[YGEdgeAll];
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
CompactValue Node::computeRowGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue) {
|
||||
if (!gutters[YGGutterRow].isUndefined()) {
|
||||
return gutters[YGGutterRow];
|
||||
} else if (!gutters[YGGutterAll].isUndefined()) {
|
||||
return gutters[YGGutterAll];
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
YGEdge Node::getLeadingLayoutEdgeUsingErrata(
|
||||
FlexDirection flexDirection,
|
||||
Direction direction) const {
|
||||
return hasErrata(Errata::StartingEndingEdgeFromFlexDirection)
|
||||
? leadingEdge(flexDirection)
|
||||
: leadingLayoutEdge(flexDirection, direction);
|
||||
}
|
||||
|
||||
CompactValue Node::computeColumnGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue) {
|
||||
if (!gutters[YGGutterColumn].isUndefined()) {
|
||||
return gutters[YGGutterColumn];
|
||||
} else if (!gutters[YGGutterAll].isUndefined()) {
|
||||
return gutters[YGGutterAll];
|
||||
} else {
|
||||
return defaultValue;
|
||||
}
|
||||
YGEdge Node::getTrailingLayoutEdgeUsingErrata(
|
||||
FlexDirection flexDirection,
|
||||
Direction direction) const {
|
||||
return hasErrata(Errata::StartingEndingEdgeFromFlexDirection)
|
||||
? trailingEdge(flexDirection)
|
||||
: trailingLayoutEdge(flexDirection, direction);
|
||||
}
|
||||
|
||||
FloatOptional Node::getLeadingPosition(
|
||||
const FlexDirection axis,
|
||||
const float axisSize) const {
|
||||
bool Node::isLeadingPositionDefined(FlexDirection axis) const {
|
||||
auto leadingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.position(),
|
||||
YGEdgeStart,
|
||||
leadingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.position(), leadingEdge(axis), CompactValue::ofZero());
|
||||
return yoga::resolveValue(leadingPosition, axisSize);
|
||||
}
|
||||
style_.position(), YGEdgeStart, leadingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.position(), leadingEdge(axis));
|
||||
|
||||
FloatOptional Node::getTrailingPosition(
|
||||
const FlexDirection axis,
|
||||
const float axisSize) const {
|
||||
auto trailingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.position(),
|
||||
YGEdgeEnd,
|
||||
trailingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.position(), trailingEdge(axis), CompactValue::ofZero());
|
||||
return yoga::resolveValue(trailingPosition, axisSize);
|
||||
}
|
||||
|
||||
bool Node::isLeadingPositionDefined(const FlexDirection axis) const {
|
||||
auto leadingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.position(),
|
||||
YGEdgeStart,
|
||||
leadingEdge(axis),
|
||||
CompactValue::ofUndefined())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.position(), leadingEdge(axis), CompactValue::ofUndefined());
|
||||
return !leadingPosition.isUndefined();
|
||||
}
|
||||
|
||||
bool Node::isTrailingPosDefined(const FlexDirection axis) const {
|
||||
bool Node::isTrailingPosDefined(FlexDirection axis) const {
|
||||
auto trailingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.position(),
|
||||
YGEdgeEnd,
|
||||
trailingEdge(axis),
|
||||
CompactValue::ofUndefined())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.position(), trailingEdge(axis), CompactValue::ofUndefined());
|
||||
? computeEdgeValueForRow(style_.position(), YGEdgeEnd, trailingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.position(), trailingEdge(axis));
|
||||
|
||||
return !trailingPosition.isUndefined();
|
||||
}
|
||||
|
||||
FloatOptional Node::getLeadingMargin(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
float Node::getLeadingPosition(FlexDirection axis, float axisSize) const {
|
||||
auto leadingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.position(), YGEdgeStart, leadingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.position(), leadingEdge(axis));
|
||||
|
||||
return resolveValue(leadingPosition, axisSize).unwrapOrDefault(0.0f);
|
||||
}
|
||||
|
||||
float Node::getTrailingPosition(FlexDirection axis, float axisSize) const {
|
||||
auto trailingPosition = isRow(axis)
|
||||
? computeEdgeValueForRow(style_.position(), YGEdgeEnd, trailingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.position(), trailingEdge(axis));
|
||||
|
||||
return resolveValue(trailingPosition, axisSize).unwrapOrDefault(0.0f);
|
||||
}
|
||||
|
||||
float Node::getLeadingMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float widthSize) const {
|
||||
const YGEdge startEdge = getLeadingLayoutEdgeUsingErrata(axis, direction);
|
||||
auto leadingMargin = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.margin(),
|
||||
YGEdgeStart,
|
||||
leadingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.margin(), leadingEdge(axis), CompactValue::ofZero());
|
||||
return leadingMargin.isAuto() ? FloatOptional{0}
|
||||
: yoga::resolveValue(leadingMargin, widthSize);
|
||||
? computeEdgeValueForRow(style_.margin(), YGEdgeStart, startEdge)
|
||||
: computeEdgeValueForColumn(style_.margin(), startEdge);
|
||||
|
||||
return resolveValue(leadingMargin, widthSize).unwrapOrDefault(0.0f);
|
||||
}
|
||||
|
||||
FloatOptional Node::getTrailingMargin(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
float Node::getTrailingMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float widthSize) const {
|
||||
const YGEdge endEdge = getTrailingLayoutEdgeUsingErrata(axis, direction);
|
||||
auto trailingMargin = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.margin(),
|
||||
YGEdgeEnd,
|
||||
trailingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.margin(), trailingEdge(axis), CompactValue::ofZero());
|
||||
return trailingMargin.isAuto()
|
||||
? FloatOptional{0}
|
||||
: yoga::resolveValue(trailingMargin, widthSize);
|
||||
? computeEdgeValueForRow(style_.margin(), YGEdgeEnd, endEdge)
|
||||
: computeEdgeValueForColumn(style_.margin(), endEdge);
|
||||
|
||||
return resolveValue(trailingMargin, widthSize).unwrapOrDefault(0.0f);
|
||||
}
|
||||
|
||||
FloatOptional Node::getMarginForAxis(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
return getLeadingMargin(axis, widthSize) + getTrailingMargin(axis, widthSize);
|
||||
float Node::getLeadingBorder(FlexDirection axis) const {
|
||||
YGValue leadingBorder = isRow(axis)
|
||||
? computeEdgeValueForRow(style_.border(), YGEdgeStart, leadingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.border(), leadingEdge(axis));
|
||||
|
||||
return maxOrDefined(leadingBorder.value, 0.0f);
|
||||
}
|
||||
|
||||
float Node::getGapForAxis(const FlexDirection axis, const float widthSize)
|
||||
float Node::getTrailingBorder(FlexDirection axis) const {
|
||||
YGValue trailingBorder = isRow(axis)
|
||||
? computeEdgeValueForRow(style_.border(), YGEdgeEnd, trailingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.border(), trailingEdge(axis));
|
||||
|
||||
return maxOrDefined(trailingBorder.value, 0.0f);
|
||||
}
|
||||
|
||||
float Node::getLeadingPadding(FlexDirection axis, float widthSize) const {
|
||||
auto leadingPadding = isRow(axis)
|
||||
? computeEdgeValueForRow(style_.padding(), YGEdgeStart, leadingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.padding(), leadingEdge(axis));
|
||||
|
||||
return maxOrDefined(resolveValue(leadingPadding, widthSize).unwrap(), 0.0f);
|
||||
}
|
||||
|
||||
float Node::getTrailingPadding(FlexDirection axis, float widthSize) const {
|
||||
auto trailingPadding = isRow(axis)
|
||||
? computeEdgeValueForRow(style_.padding(), YGEdgeEnd, trailingEdge(axis))
|
||||
: computeEdgeValueForColumn(style_.padding(), trailingEdge(axis));
|
||||
|
||||
return maxOrDefined(resolveValue(trailingPadding, widthSize).unwrap(), 0.0f);
|
||||
}
|
||||
|
||||
float Node::getLeadingPaddingAndBorder(FlexDirection axis, float widthSize)
|
||||
const {
|
||||
auto gap = isRow(axis)
|
||||
? computeColumnGap(style_.gap(), CompactValue::ofUndefined())
|
||||
: computeRowGap(style_.gap(), CompactValue::ofUndefined());
|
||||
auto resolvedGap = yoga::resolveValue(gap, widthSize);
|
||||
return maxOrDefined(resolvedGap.unwrap(), 0);
|
||||
return getLeadingPadding(axis, widthSize) + getLeadingBorder(axis);
|
||||
}
|
||||
|
||||
float Node::getTrailingPaddingAndBorder(FlexDirection axis, float widthSize)
|
||||
const {
|
||||
return getTrailingPadding(axis, widthSize) + getTrailingBorder(axis);
|
||||
}
|
||||
|
||||
float Node::getMarginForAxis(FlexDirection axis, float widthSize) const {
|
||||
// The total margin for a given axis does not depend on the direction
|
||||
// so hardcoding LTR here to avoid piping direction to this function
|
||||
return getLeadingMargin(axis, Direction::LTR, widthSize) +
|
||||
getTrailingMargin(axis, Direction::LTR, widthSize);
|
||||
}
|
||||
|
||||
float Node::getGapForAxis(FlexDirection axis) const {
|
||||
auto gap = isRow(axis) ? style_.resolveColumnGap() : style_.resolveRowGap();
|
||||
// TODO: Validate percentage gap, and expose ability to set percentage to
|
||||
// public API
|
||||
return maxOrDefined(resolveValue(gap, 0.0f /*ownerSize*/).unwrap(), 0.0f);
|
||||
}
|
||||
|
||||
YGSize Node::measure(
|
||||
|
@ -302,19 +304,22 @@ void Node::setLayoutDirection(Direction direction) {
|
|||
|
||||
void Node::setLayoutMargin(float margin, YGEdge edge) {
|
||||
assertFatal(
|
||||
edge < static_cast<int>(layout_.margin.size()), "Edge must be top/left/bottom/right");
|
||||
edge < static_cast<int>(layout_.margin.size()),
|
||||
"Edge must be top/left/bottom/right");
|
||||
layout_.margin[edge] = margin;
|
||||
}
|
||||
|
||||
void Node::setLayoutBorder(float border, YGEdge edge) {
|
||||
assertFatal(
|
||||
edge < static_cast<int>(layout_.border.size()), "Edge must be top/left/bottom/right");
|
||||
edge < static_cast<int>(layout_.border.size()),
|
||||
"Edge must be top/left/bottom/right");
|
||||
layout_.border[edge] = border;
|
||||
}
|
||||
|
||||
void Node::setLayoutPadding(float padding, YGEdge edge) {
|
||||
assertFatal(
|
||||
edge < static_cast<int>(layout_.padding.size()), "Edge must be top/left/bottom/right");
|
||||
edge < static_cast<int>(layout_.padding.size()),
|
||||
"Edge must be top/left/bottom/right");
|
||||
layout_.padding[edge] = padding;
|
||||
}
|
||||
|
||||
|
@ -328,7 +333,8 @@ void Node::setLayoutComputedFlexBasis(const FloatOptional computedFlexBasis) {
|
|||
|
||||
void Node::setLayoutPosition(float position, YGEdge edge) {
|
||||
assertFatal(
|
||||
edge < static_cast<int>(layout_.position.size()), "Edge must be top/left/bottom/right");
|
||||
edge < static_cast<int>(layout_.position.size()),
|
||||
"Edge must be top/left/bottom/right");
|
||||
layout_.position[edge] = position;
|
||||
}
|
||||
|
||||
|
@ -353,18 +359,12 @@ void Node::setLayoutDimension(float dimensionValue, Dimension dimension) {
|
|||
|
||||
// If both left and right are defined, then use left. Otherwise return +left or
|
||||
// -right depending on which is defined.
|
||||
FloatOptional Node::relativePosition(
|
||||
const FlexDirection axis,
|
||||
const float axisSize) const {
|
||||
float Node::relativePosition(FlexDirection axis, float axisSize) const {
|
||||
if (isLeadingPositionDefined(axis)) {
|
||||
return getLeadingPosition(axis, axisSize);
|
||||
}
|
||||
|
||||
FloatOptional trailingPosition = getTrailingPosition(axis, axisSize);
|
||||
if (!trailingPosition.isUndefined()) {
|
||||
trailingPosition = FloatOptional{-1 * trailingPosition.unwrap()};
|
||||
}
|
||||
return trailingPosition;
|
||||
return -1 * getTrailingPosition(axis, axisSize);
|
||||
}
|
||||
|
||||
void Node::setPosition(
|
||||
|
@ -384,28 +384,37 @@ void Node::setPosition(
|
|||
// Here we should check for `PositionType::Static` and in this case zero inset
|
||||
// properties (left, right, top, bottom, begin, end).
|
||||
// https://www.w3.org/TR/css-position-3/#valdef-position-static
|
||||
const FloatOptional relativePositionMain =
|
||||
relativePosition(mainAxis, mainSize);
|
||||
const FloatOptional relativePositionCross =
|
||||
relativePosition(crossAxis, crossSize);
|
||||
const float relativePositionMain = relativePosition(mainAxis, mainSize);
|
||||
const float relativePositionCross = relativePosition(crossAxis, crossSize);
|
||||
|
||||
const YGEdge mainAxisLeadingEdge =
|
||||
getLeadingLayoutEdgeUsingErrata(mainAxis, direction);
|
||||
const YGEdge mainAxisTrailingEdge =
|
||||
getTrailingLayoutEdgeUsingErrata(mainAxis, direction);
|
||||
const YGEdge crossAxisLeadingEdge =
|
||||
getLeadingLayoutEdgeUsingErrata(crossAxis, direction);
|
||||
const YGEdge crossAxisTrailingEdge =
|
||||
getTrailingLayoutEdgeUsingErrata(crossAxis, direction);
|
||||
|
||||
setLayoutPosition(
|
||||
(getLeadingMargin(mainAxis, ownerWidth) + relativePositionMain).unwrap(),
|
||||
leadingEdge(mainAxis));
|
||||
(getLeadingMargin(mainAxis, direction, ownerWidth) +
|
||||
relativePositionMain),
|
||||
mainAxisLeadingEdge);
|
||||
setLayoutPosition(
|
||||
(getTrailingMargin(mainAxis, ownerWidth) + relativePositionMain).unwrap(),
|
||||
trailingEdge(mainAxis));
|
||||
(getTrailingMargin(mainAxis, direction, ownerWidth) +
|
||||
relativePositionMain),
|
||||
mainAxisTrailingEdge);
|
||||
setLayoutPosition(
|
||||
(getLeadingMargin(crossAxis, ownerWidth) + relativePositionCross)
|
||||
.unwrap(),
|
||||
leadingEdge(crossAxis));
|
||||
(getLeadingMargin(crossAxis, direction, ownerWidth) +
|
||||
relativePositionCross),
|
||||
crossAxisLeadingEdge);
|
||||
setLayoutPosition(
|
||||
(getTrailingMargin(crossAxis, ownerWidth) + relativePositionCross)
|
||||
.unwrap(),
|
||||
trailingEdge(crossAxis));
|
||||
(getTrailingMargin(crossAxis, direction, ownerWidth) +
|
||||
relativePositionCross),
|
||||
crossAxisTrailingEdge);
|
||||
}
|
||||
|
||||
YGValue Node::marginLeadingValue(const FlexDirection axis) const {
|
||||
YGValue Node::marginLeadingValue(FlexDirection axis) const {
|
||||
if (isRow(axis) && !style_.margin()[YGEdgeStart].isUndefined()) {
|
||||
return style_.margin()[YGEdgeStart];
|
||||
} else {
|
||||
|
@ -413,7 +422,7 @@ YGValue Node::marginLeadingValue(const FlexDirection axis) const {
|
|||
}
|
||||
}
|
||||
|
||||
YGValue Node::marginTrailingValue(const FlexDirection axis) const {
|
||||
YGValue Node::marginTrailingValue(FlexDirection axis) const {
|
||||
if (isRow(axis) && !style_.margin()[YGEdgeEnd].isUndefined()) {
|
||||
return style_.margin()[YGEdgeEnd];
|
||||
} else {
|
||||
|
@ -523,74 +532,6 @@ bool Node::isNodeFlexible() {
|
|||
(resolveFlexGrow() != 0 || resolveFlexShrink() != 0));
|
||||
}
|
||||
|
||||
float Node::getLeadingBorder(const FlexDirection axis) const {
|
||||
YGValue leadingBorder = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.border(),
|
||||
YGEdgeStart,
|
||||
leadingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.border(), leadingEdge(axis), CompactValue::ofZero());
|
||||
return fmaxf(leadingBorder.value, 0.0f);
|
||||
}
|
||||
|
||||
float Node::getTrailingBorder(const FlexDirection axis) const {
|
||||
YGValue trailingBorder = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.border(),
|
||||
YGEdgeEnd,
|
||||
trailingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.border(), trailingEdge(axis), CompactValue::ofZero());
|
||||
return fmaxf(trailingBorder.value, 0.0f);
|
||||
}
|
||||
|
||||
FloatOptional Node::getLeadingPadding(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
auto leadingPadding = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.padding(),
|
||||
YGEdgeStart,
|
||||
leadingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.padding(), leadingEdge(axis), CompactValue::ofZero());
|
||||
return yoga::maxOrDefined(
|
||||
yoga::resolveValue(leadingPadding, widthSize), FloatOptional(0.0f));
|
||||
}
|
||||
|
||||
FloatOptional Node::getTrailingPadding(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
auto trailingPadding = isRow(axis)
|
||||
? computeEdgeValueForRow(
|
||||
style_.padding(),
|
||||
YGEdgeEnd,
|
||||
trailingEdge(axis),
|
||||
CompactValue::ofZero())
|
||||
: computeEdgeValueForColumn(
|
||||
style_.padding(), trailingEdge(axis), CompactValue::ofZero());
|
||||
return yoga::maxOrDefined(
|
||||
yoga::resolveValue(trailingPadding, widthSize), FloatOptional(0.0f));
|
||||
}
|
||||
|
||||
FloatOptional Node::getLeadingPaddingAndBorder(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
return getLeadingPadding(axis, widthSize) +
|
||||
FloatOptional(getLeadingBorder(axis));
|
||||
}
|
||||
|
||||
FloatOptional Node::getTrailingPaddingAndBorder(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const {
|
||||
return getTrailingPadding(axis, widthSize) +
|
||||
FloatOptional(getTrailingBorder(axis));
|
||||
}
|
||||
|
||||
void Node::reset() {
|
||||
yoga::assertFatalWithNode(
|
||||
this,
|
||||
|
|
|
@ -48,8 +48,14 @@ class YG_EXPORT Node : public ::YGNode {
|
|||
std::array<YGValue, 2> resolvedDimensions_ = {
|
||||
{YGValueUndefined, YGValueUndefined}};
|
||||
|
||||
FloatOptional relativePosition(const FlexDirection axis, const float axisSize)
|
||||
const;
|
||||
float relativePosition(FlexDirection axis, const float axisSize) const;
|
||||
|
||||
YGEdge getLeadingLayoutEdgeUsingErrata(
|
||||
FlexDirection flexDirection,
|
||||
Direction direction) const;
|
||||
YGEdge getTrailingLayoutEdgeUsingErrata(
|
||||
FlexDirection flexDirection,
|
||||
Direction direction) const;
|
||||
|
||||
void useWebDefaults() {
|
||||
style_.flexDirection() = FlexDirection::Row;
|
||||
|
@ -182,56 +188,34 @@ class YG_EXPORT Node : public ::YGNode {
|
|||
|
||||
static CompactValue computeEdgeValueForColumn(
|
||||
const Style::Edges& edges,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue);
|
||||
YGEdge edge);
|
||||
|
||||
static CompactValue computeEdgeValueForRow(
|
||||
const Style::Edges& edges,
|
||||
YGEdge rowEdge,
|
||||
YGEdge edge,
|
||||
CompactValue defaultValue);
|
||||
|
||||
static CompactValue computeRowGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue);
|
||||
|
||||
static CompactValue computeColumnGap(
|
||||
const Style::Gutters& gutters,
|
||||
CompactValue defaultValue);
|
||||
YGEdge edge);
|
||||
|
||||
// Methods related to positions, margin, padding and border
|
||||
FloatOptional getLeadingPosition(
|
||||
const FlexDirection axis,
|
||||
const float axisSize) const;
|
||||
bool isLeadingPositionDefined(const FlexDirection axis) const;
|
||||
bool isTrailingPosDefined(const FlexDirection axis) const;
|
||||
FloatOptional getTrailingPosition(
|
||||
const FlexDirection axis,
|
||||
const float axisSize) const;
|
||||
FloatOptional getLeadingMargin(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
FloatOptional getTrailingMargin(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
float getLeadingBorder(const FlexDirection flexDirection) const;
|
||||
float getTrailingBorder(const FlexDirection flexDirection) const;
|
||||
FloatOptional getLeadingPadding(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
FloatOptional getTrailingPadding(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
FloatOptional getLeadingPaddingAndBorder(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
FloatOptional getTrailingPaddingAndBorder(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
FloatOptional getMarginForAxis(
|
||||
const FlexDirection axis,
|
||||
const float widthSize) const;
|
||||
float getGapForAxis(const FlexDirection axis, const float widthSize) const;
|
||||
bool isLeadingPositionDefined(FlexDirection axis) const;
|
||||
bool isTrailingPosDefined(FlexDirection axis) const;
|
||||
float getLeadingPosition(FlexDirection axis, float axisSize) const;
|
||||
float getTrailingPosition(FlexDirection axis, float axisSize) const;
|
||||
float getLeadingMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float widthSize) const;
|
||||
float getTrailingMargin(
|
||||
FlexDirection axis,
|
||||
Direction direction,
|
||||
float widthSize) const;
|
||||
float getLeadingBorder(FlexDirection flexDirection) const;
|
||||
float getTrailingBorder(FlexDirection flexDirection) const;
|
||||
float getLeadingPadding(FlexDirection axis, float widthSize) const;
|
||||
float getTrailingPadding(FlexDirection axis, float widthSize) const;
|
||||
float getLeadingPaddingAndBorder(FlexDirection axis, float widthSize) const;
|
||||
float getTrailingPaddingAndBorder(FlexDirection axis, float widthSize) const;
|
||||
float getMarginForAxis(FlexDirection axis, float widthSize) const;
|
||||
float getGapForAxis(FlexDirection axis) const;
|
||||
// Setters
|
||||
|
||||
void setContext(void* context) {
|
||||
|
@ -309,8 +293,8 @@ class YG_EXPORT Node : public ::YGNode {
|
|||
void markDirtyAndPropagateDownwards();
|
||||
|
||||
// Other methods
|
||||
YGValue marginLeadingValue(const FlexDirection axis) const;
|
||||
YGValue marginTrailingValue(const FlexDirection axis) const;
|
||||
YGValue marginLeadingValue(FlexDirection axis) const;
|
||||
YGValue marginTrailingValue(FlexDirection axis) const;
|
||||
YGValue resolveFlexBasisPtr() const;
|
||||
void resolveDimension();
|
||||
Direction resolveDirection(const Direction ownerDirection);
|
||||
|
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <cmath>
|
||||
|
||||
#include <yoga/Yoga.h>
|
||||
|
||||
namespace facebook::yoga {
|
||||
|
||||
template <typename T>
|
||||
constexpr bool isUndefined(T value) {
|
||||
return value != value;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr auto maxOrDefined(T a, T b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return std::max(a, b);
|
||||
}
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
constexpr auto minOrDefined(T a, T b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return std::min(a, b);
|
||||
}
|
||||
|
||||
return yoga::isUndefined(a) ? b : a;
|
||||
}
|
||||
|
||||
// Custom equality functions using a hardcoded epsilon of 0.0001f, or returning
|
||||
// true if both floats are NaN.
|
||||
inline bool inexactEquals(float a, float b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return std::abs(a - b) < 0.0001f;
|
||||
}
|
||||
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
||||
}
|
||||
|
||||
inline bool inexactEquals(double a, double b) {
|
||||
if (!yoga::isUndefined(a) && !yoga::isUndefined(b)) {
|
||||
return std::abs(a - b) < 0.0001;
|
||||
}
|
||||
return yoga::isUndefined(a) && yoga::isUndefined(b);
|
||||
}
|
||||
|
||||
inline bool inexactEquals(const YGValue& a, const YGValue& b) {
|
||||
if (a.unit != b.unit) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (a.unit == YGUnitUndefined ||
|
||||
(yoga::isUndefined(a.value) && yoga::isUndefined(b.value))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return fabs(a.value - b.value) < 0.0001f;
|
||||
}
|
||||
|
||||
template <std::size_t Size, typename ElementT>
|
||||
bool inexactEquals(
|
||||
const std::array<ElementT, Size>& val1,
|
||||
const std::array<ElementT, Size>& val2) {
|
||||
bool areEqual = true;
|
||||
for (std::size_t i = 0; i < Size && areEqual; ++i) {
|
||||
areEqual = inexactEquals(val1[i], val2[i]);
|
||||
}
|
||||
return areEqual;
|
||||
}
|
||||
|
||||
} // namespace facebook::yoga
|
|
@ -634,11 +634,12 @@ void YGNodeStyleSetGap(
|
|||
const YGGutter gutter,
|
||||
const float gapLength) {
|
||||
auto length = CompactValue::ofMaybe<YGUnitPoint>(gapLength);
|
||||
updateIndexedStyleProp<MSVC_HINT(gap)>(node, &Style::gap, gutter, length);
|
||||
updateIndexedStyleProp<&Style::gap, &Style::setGap>(
|
||||
node, scopedEnum(gutter), length);
|
||||
}
|
||||
|
||||
float YGNodeStyleGetGap(const YGNodeConstRef node, const YGGutter gutter) {
|
||||
auto gapLength = resolveRef(node)->getStyle().gap()[gutter];
|
||||
auto gapLength = resolveRef(node)->getStyle().gap(scopedEnum(gutter));
|
||||
if (gapLength.isUndefined() || gapLength.isAuto()) {
|
||||
return YGUndefined;
|
||||
}
|
||||
|
|
|
@ -84,6 +84,7 @@ void ChakraRuntime::Init() noexcept {
|
|||
m_propertyId.enumerable = JsRefHolder{GetPropertyIdFromName(L"enumerable")};
|
||||
m_propertyId.get = JsRefHolder{GetPropertyIdFromName(L"get")};
|
||||
m_propertyId.getOwnPropertyDescriptor = JsRefHolder{GetPropertyIdFromName(L"getOwnPropertyDescriptor")};
|
||||
m_propertyId.has = JsRefHolder{GetPropertyIdFromName(L"has")};
|
||||
m_propertyId.hostFunctionSymbol = JsRefHolder{GetPropertyIdFromSymbol(L"hostFunctionSymbol")};
|
||||
m_propertyId.hostObjectSymbol = JsRefHolder{GetPropertyIdFromSymbol(L"hostObjectSymbol")};
|
||||
m_propertyId.length = JsRefHolder{GetPropertyIdFromName(L"length")};
|
||||
|
@ -97,9 +98,22 @@ void ChakraRuntime::Init() noexcept {
|
|||
m_propertyId.writable = JsRefHolder{GetPropertyIdFromName(L"writable")};
|
||||
|
||||
m_undefinedValue = JsRefHolder{GetUndefinedValue()};
|
||||
|
||||
JsValueRef global = GetGlobalObject();
|
||||
JsValueRef weakMapPropertyId = GetPropertyIdFromName(L"WeakMap");
|
||||
JsValueRef weakMapConstructor = GetProperty(global, weakMapPropertyId);
|
||||
JsValueRef weakMapPrototype = GetProperty(weakMapConstructor, m_propertyId.prototype);
|
||||
m_weakMapGet = JsRefHolder{GetProperty(weakMapPrototype, m_propertyId.get)};
|
||||
m_weakMapHas = JsRefHolder{GetProperty(weakMapPrototype, m_propertyId.has)};
|
||||
m_weakMapSet = JsRefHolder{GetProperty(weakMapPrototype, m_propertyId.set)};
|
||||
m_nativeStateMap = JsRefHolder{ConstructObject(weakMapConstructor, Span<JsValueRef>{m_undefinedValue})};
|
||||
}
|
||||
|
||||
/*virtual*/ ChakraRuntime::~ChakraRuntime() noexcept {
|
||||
m_nativeStateMap = {};
|
||||
m_weakMapSet = {};
|
||||
m_weakMapHas = {};
|
||||
m_weakMapGet = {};
|
||||
m_undefinedValue = {};
|
||||
m_propertyId = {};
|
||||
m_proxyConstructor = {};
|
||||
|
@ -189,8 +203,8 @@ facebook::jsi::Value ChakraRuntime::evaluateJavaScript(
|
|||
auto genPreparedScript = generatePreparedScript(sourceURL, *sharedScriptBuffer);
|
||||
if (!genPreparedScript)
|
||||
std::terminate(); // Cache generation can't fail unless something really
|
||||
// wrong. but we should get rid of this abort before
|
||||
// shipping.
|
||||
// wrong. but we should get rid of this abort before
|
||||
// shipping.
|
||||
|
||||
sharedPreparedScript = std::shared_ptr<const facebook::jsi::Buffer>(std::move(genPreparedScript));
|
||||
runtimeArgs().preparedScriptStore->persistPreparedScript(
|
||||
|
@ -345,16 +359,25 @@ facebook::jsi::String ChakraRuntime::bigintToString(const facebook::jsi::BigInt
|
|||
throw facebook::jsi::JSINativeException("Not implemented");
|
||||
}
|
||||
|
||||
bool ChakraRuntime::hasNativeState(const facebook::jsi::Object &) {
|
||||
throw facebook::jsi::JSINativeException("Not implemented");
|
||||
bool ChakraRuntime::hasNativeState(const facebook::jsi::Object &obj) {
|
||||
return BooleanToBool(CallFunction(m_weakMapHas, {m_nativeStateMap, GetJsRef(obj)}));
|
||||
}
|
||||
|
||||
std::shared_ptr<facebook::jsi::NativeState> ChakraRuntime::getNativeState(const facebook::jsi::Object &) {
|
||||
throw facebook::jsi::JSINativeException("Not implemented");
|
||||
std::shared_ptr<facebook::jsi::NativeState> ChakraRuntime::getNativeState(const facebook::jsi::Object &obj) {
|
||||
JsValueRef stateWrapper = CallFunction(m_weakMapGet, {m_nativeStateMap, GetJsRef(obj)});
|
||||
if (GetValueType(stateWrapper) == JsValueType::JsObject) {
|
||||
return *static_cast<std::shared_ptr<facebook::jsi::NativeState> *>(GetExternalData(stateWrapper));
|
||||
} else {
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void ChakraRuntime::setNativeState(const facebook::jsi::Object &, std::shared_ptr<facebook::jsi::NativeState> state) {
|
||||
throw facebook::jsi::JSINativeException("Not implemented");
|
||||
void ChakraRuntime::setNativeState(
|
||||
const facebook::jsi::Object &obj,
|
||||
std::shared_ptr<facebook::jsi::NativeState> state) {
|
||||
JsValueRef stateWrapper =
|
||||
CreateExternalObject(std::make_unique<std::shared_ptr<facebook::jsi::NativeState>>(std::move(state)));
|
||||
CallFunction(m_weakMapSet, {m_nativeStateMap, GetJsRef(obj), stateWrapper});
|
||||
}
|
||||
|
||||
facebook::jsi::ArrayBuffer ChakraRuntime::createArrayBuffer(std::shared_ptr<facebook::jsi::MutableBuffer> buffer) {
|
||||
|
|
|
@ -463,6 +463,7 @@ class ChakraRuntime : public facebook::jsi::Runtime, public ChakraApi, ChakraApi
|
|||
JsRefHolder enumerable;
|
||||
JsRefHolder get;
|
||||
JsRefHolder getOwnPropertyDescriptor;
|
||||
JsRefHolder has;
|
||||
JsRefHolder hostFunctionSymbol;
|
||||
JsRefHolder hostObjectSymbol;
|
||||
JsRefHolder length;
|
||||
|
@ -480,6 +481,11 @@ class ChakraRuntime : public facebook::jsi::Runtime, public ChakraApi, ChakraApi
|
|||
JsRefHolder m_proxyConstructor;
|
||||
JsRefHolder m_hostObjectProxyHandler;
|
||||
|
||||
JsRefHolder m_weakMapGet;
|
||||
JsRefHolder m_weakMapHas;
|
||||
JsRefHolder m_weakMapSet;
|
||||
JsRefHolder m_nativeStateMap;
|
||||
|
||||
static std::once_flag s_runtimeVersionInitFlag;
|
||||
static uint64_t s_runtimeVersion;
|
||||
|
||||
|
|
|
@ -283,7 +283,9 @@
|
|||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\textlayoutmanager\TextLayoutManager.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\ReactNativeConfigProperties.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\WindowsImageManager.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.h" />
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.h">
|
||||
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.idl</DependentUpon>
|
||||
</ClInclude>
|
||||
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\SchedulerSettings.h" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\DynamicReader.cpp">
|
||||
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueReader.idl</DependentUpon>
|
||||
|
@ -541,7 +543,6 @@
|
|||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\scheduler\SurfaceManager.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\SurfaceTelemetry.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\telemetry\TransactionTelemetry.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\templateprocessor\UITemplateProcessor.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\textlayoutmanager\TextMeasureCache.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\bindingUtils.cpp" />
|
||||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\PointerEventsProcessor.cpp" />
|
||||
|
@ -550,22 +551,22 @@
|
|||
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\uimanager\UIManagerBinding.cpp" DisableSpecificWarnings="4389;4715;%(DisableSpecificWarnings)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IJSValueReader.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IJSValueWriter.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactContext.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactDispatcher.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactModuleBuilder.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactNonAbiValue.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactNotificationService.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPackageBuilder.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPackageProvider.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPropertyBag.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\JsiApi.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\QuirkSettings.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactCoreInjection.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactInstanceSettings.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeHost.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\RedBoxHandler.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueReader.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueWriter.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactContext.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactDispatcher.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactModuleBuilder.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactNonAbiValue.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactNotificationService.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPackageBuilder.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPackageProvider.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPropertyBag.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\QuirkSettings.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactCoreInjection.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactInstanceSettings.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\RedBoxHandler.idl" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'">
|
||||
<Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\Composition.Input.idl" />
|
||||
|
|
|
@ -287,7 +287,7 @@
|
|||
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\platform\react\renderer\graphics\PlatformColorUtils.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiViewShadowNode.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiState.cpp" />
|
||||
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Utils\ThemeUtils.cpp" />
|
||||
<ClCompile Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\Utils\ThemeUtils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
|
@ -777,21 +777,21 @@
|
|||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IJSValueReader.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IJSValueWriter.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactContext.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactDispatcher.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactModuleBuilder.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactNonAbiValue.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactNotificationService.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPackageBuilder.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPackageProvider.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPropertyBag.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\JsiApi.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\QuirkSettings.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactCoreInjection.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactInstanceSettings.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeHost.idl" />
|
||||
<Midl Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\RedBoxHandler.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueReader.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueWriter.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactContext.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactDispatcher.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactModuleBuilder.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactNonAbiValue.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactNotificationService.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPackageBuilder.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPackageProvider.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IReactPropertyBag.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\JsiApi.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\QuirkSettings.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactCoreInjection.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactInstanceSettings.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeHost.idl" />
|
||||
<Midl Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\RedBoxHandler.idl" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -62,6 +62,7 @@ struct PerformanceObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec
|
|||
Method<void(double, double) noexcept>{7, L"setDurationThreshold"},
|
||||
Method<void(double, std::string) noexcept>{8, L"clearEntries"},
|
||||
SyncMethod<std::vector<PerformanceObserverSpec_RawPerformanceEntry>(double, std::string) noexcept>{9, L"getEntries"},
|
||||
SyncMethod<std::vector<double>() noexcept>{10, L"getSupportedPerformanceEntryTypes"},
|
||||
};
|
||||
|
||||
template <class TModule>
|
||||
|
@ -118,6 +119,11 @@ struct PerformanceObserverSpec : winrt::Microsoft::ReactNative::TurboModuleSpec
|
|||
"getEntries",
|
||||
" REACT_SYNC_METHOD(getEntries) std::vector<PerformanceObserverSpec_RawPerformanceEntry> getEntries(double entryType, std::string entryName) noexcept { /* implementation */ }\n"
|
||||
" REACT_SYNC_METHOD(getEntries) static std::vector<PerformanceObserverSpec_RawPerformanceEntry> getEntries(double entryType, std::string entryName) noexcept { /* implementation */ }\n");
|
||||
REACT_SHOW_METHOD_SPEC_ERRORS(
|
||||
10,
|
||||
"getSupportedPerformanceEntryTypes",
|
||||
" REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) std::vector<double> getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n"
|
||||
" REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) static std::vector<double> getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ struct PlatformConstantsIOSSpec_PlatformConstantsIOS {
|
|||
std::string osVersion;
|
||||
std::string systemName;
|
||||
std::string interfaceIdiom;
|
||||
std::optional<bool> isMacCatalyst;
|
||||
};
|
||||
|
||||
|
||||
|
@ -50,6 +51,7 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PlatformConstantsIO
|
|||
{L"osVersion", &PlatformConstantsIOSSpec_PlatformConstantsIOS::osVersion},
|
||||
{L"systemName", &PlatformConstantsIOSSpec_PlatformConstantsIOS::systemName},
|
||||
{L"interfaceIdiom", &PlatformConstantsIOSSpec_PlatformConstantsIOS::interfaceIdiom},
|
||||
{L"isMacCatalyst", &PlatformConstantsIOSSpec_PlatformConstantsIOS::isMacCatalyst},
|
||||
};
|
||||
return fieldMap;
|
||||
}
|
||||
|
|
|
@ -2023,6 +2023,11 @@ static jsi::Value __hostFunction_NativePerformanceObserverCxxSpecJSI_getEntries(
|
|||
count <= 1 || args[1].isNull() || args[1].isUndefined() ? std::nullopt : std::make_optional(args[1].asString(rt))
|
||||
);
|
||||
}
|
||||
static jsi::Value __hostFunction_NativePerformanceObserverCxxSpecJSI_getSupportedPerformanceEntryTypes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
||||
return static_cast<NativePerformanceObserverCxxSpecJSI *>(&turboModule)->getSupportedPerformanceEntryTypes(
|
||||
rt
|
||||
);
|
||||
}
|
||||
|
||||
NativePerformanceObserverCxxSpecJSI::NativePerformanceObserverCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
|
||||
: TurboModule("NativePerformanceObserverCxx", jsInvoker) {
|
||||
|
@ -2036,6 +2041,7 @@ NativePerformanceObserverCxxSpecJSI::NativePerformanceObserverCxxSpecJSI(std::sh
|
|||
methodMap_["setDurationThreshold"] = MethodMetadata {2, __hostFunction_NativePerformanceObserverCxxSpecJSI_setDurationThreshold};
|
||||
methodMap_["clearEntries"] = MethodMetadata {2, __hostFunction_NativePerformanceObserverCxxSpecJSI_clearEntries};
|
||||
methodMap_["getEntries"] = MethodMetadata {2, __hostFunction_NativePerformanceObserverCxxSpecJSI_getEntries};
|
||||
methodMap_["getSupportedPerformanceEntryTypes"] = MethodMetadata {0, __hostFunction_NativePerformanceObserverCxxSpecJSI_getSupportedPerformanceEntryTypes};
|
||||
}
|
||||
static jsi::Value __hostFunction_NativeWebSocketModuleCxxSpecJSI_connect(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
|
||||
static_cast<NativeWebSocketModuleCxxSpecJSI *>(&turboModule)->connect(
|
||||
|
|
|
@ -5068,7 +5068,7 @@ private:
|
|||
|
||||
#pragma mark - PlatformConstantsBasePlatformConstantsIOS
|
||||
|
||||
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
||||
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
|
||||
struct PlatformConstantsBasePlatformConstantsIOS {
|
||||
P0 isTesting;
|
||||
P1 isDisableAnimations;
|
||||
|
@ -5077,25 +5077,27 @@ struct PlatformConstantsBasePlatformConstantsIOS {
|
|||
P4 osVersion;
|
||||
P5 systemName;
|
||||
P6 interfaceIdiom;
|
||||
P7 isMacCatalyst;
|
||||
bool operator==(const PlatformConstantsBasePlatformConstantsIOS &other) const {
|
||||
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && forceTouchAvailable == other.forceTouchAvailable && osVersion == other.osVersion && systemName == other.systemName && interfaceIdiom == other.interfaceIdiom;
|
||||
return isTesting == other.isTesting && isDisableAnimations == other.isDisableAnimations && reactNativeVersion == other.reactNativeVersion && forceTouchAvailable == other.forceTouchAvailable && osVersion == other.osVersion && systemName == other.systemName && interfaceIdiom == other.interfaceIdiom && isMacCatalyst == other.isMacCatalyst;
|
||||
}
|
||||
};
|
||||
|
||||
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
|
||||
template <typename P0, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6, typename P7>
|
||||
struct PlatformConstantsBasePlatformConstantsIOSBridging {
|
||||
static PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> fromJs(
|
||||
static PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6, P7> fromJs(
|
||||
jsi::Runtime &rt,
|
||||
const jsi::Object &value,
|
||||
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
||||
PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> result{
|
||||
PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6, P7> result{
|
||||
bridging::fromJs<P0>(rt, value.getProperty(rt, "isTesting"), jsInvoker),
|
||||
bridging::fromJs<P1>(rt, value.getProperty(rt, "isDisableAnimations"), jsInvoker),
|
||||
bridging::fromJs<P2>(rt, value.getProperty(rt, "reactNativeVersion"), jsInvoker),
|
||||
bridging::fromJs<P3>(rt, value.getProperty(rt, "forceTouchAvailable"), jsInvoker),
|
||||
bridging::fromJs<P4>(rt, value.getProperty(rt, "osVersion"), jsInvoker),
|
||||
bridging::fromJs<P5>(rt, value.getProperty(rt, "systemName"), jsInvoker),
|
||||
bridging::fromJs<P6>(rt, value.getProperty(rt, "interfaceIdiom"), jsInvoker)};
|
||||
bridging::fromJs<P6>(rt, value.getProperty(rt, "interfaceIdiom"), jsInvoker),
|
||||
bridging::fromJs<P7>(rt, value.getProperty(rt, "isMacCatalyst"), jsInvoker)};
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -5127,11 +5129,15 @@ struct PlatformConstantsBasePlatformConstantsIOSBridging {
|
|||
static jsi::String interfaceIdiomToJs(jsi::Runtime &rt, P6 value) {
|
||||
return bridging::toJs(rt, value);
|
||||
}
|
||||
|
||||
static bool isMacCatalystToJs(jsi::Runtime &rt, P7 value) {
|
||||
return bridging::toJs(rt, value);
|
||||
}
|
||||
#endif
|
||||
|
||||
static jsi::Object toJs(
|
||||
jsi::Runtime &rt,
|
||||
const PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6> &value,
|
||||
const PlatformConstantsBasePlatformConstantsIOS<P0, P1, P2, P3, P4, P5, P6, P7> &value,
|
||||
const std::shared_ptr<CallInvoker> &jsInvoker) {
|
||||
auto result = facebook::jsi::Object(rt);
|
||||
result.setProperty(rt, "isTesting", bridging::toJs(rt, value.isTesting, jsInvoker));
|
||||
|
@ -5143,6 +5149,9 @@ struct PlatformConstantsBasePlatformConstantsIOSBridging {
|
|||
result.setProperty(rt, "osVersion", bridging::toJs(rt, value.osVersion, jsInvoker));
|
||||
result.setProperty(rt, "systemName", bridging::toJs(rt, value.systemName, jsInvoker));
|
||||
result.setProperty(rt, "interfaceIdiom", bridging::toJs(rt, value.interfaceIdiom, jsInvoker));
|
||||
if (value.isMacCatalyst) {
|
||||
result.setProperty(rt, "isMacCatalyst", bridging::toJs(rt, value.isMacCatalyst.value(), jsInvoker));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
@ -5593,6 +5602,7 @@ public:
|
|||
virtual void setDurationThreshold(jsi::Runtime &rt, double entryType, double durationThreshold) = 0;
|
||||
virtual void clearEntries(jsi::Runtime &rt, double entryType, std::optional<jsi::String> entryName) = 0;
|
||||
virtual jsi::Array getEntries(jsi::Runtime &rt, std::optional<double> entryType, std::optional<jsi::String> entryName) = 0;
|
||||
virtual jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
@ -5696,6 +5706,14 @@ private:
|
|||
return bridging::callFromJs<jsi::Array>(
|
||||
rt, &T::getEntries, jsInvoker_, instance_, std::move(entryType), std::move(entryName));
|
||||
}
|
||||
jsi::Array getSupportedPerformanceEntryTypes(jsi::Runtime &rt) override {
|
||||
static_assert(
|
||||
bridging::getParameterCount(&T::getSupportedPerformanceEntryTypes) == 1,
|
||||
"Expected getSupportedPerformanceEntryTypes(...) to have 1 parameters");
|
||||
|
||||
return bridging::callFromJs<jsi::Array>(
|
||||
rt, &T::getSupportedPerformanceEntryTypes, jsInvoker_, instance_);
|
||||
}
|
||||
|
||||
private:
|
||||
T *instance_;
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
"**/__snapshots__/**",
|
||||
"src/rntypes/**"
|
||||
],
|
||||
"baseVersion": "0.73.0-nightly-20231002-0371014a3",
|
||||
"baseVersion": "0.74.0-nightly-20231016-44660019e",
|
||||
"overrides": [
|
||||
{
|
||||
"type": "derived",
|
||||
"file": ".flowconfig",
|
||||
"baseFile": ".flowconfig",
|
||||
"baseHash": "f44aee31438c1225f42664e9359e72272c08bb1d"
|
||||
"baseHash": "671a34717020278b7888dafa3b4fa88375e3d29b"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -26,7 +26,7 @@
|
|||
"type": "derived",
|
||||
"file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp",
|
||||
"baseHash": "3101aa0b5e379fd414a0aa036286dffaf56cdd1a"
|
||||
"baseHash": "e43e6cb2df75b8f51422bdbef42e99f2c4f2018d"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -63,28 +63,14 @@
|
|||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUPdate/jsi/jsi/test/testlib.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp",
|
||||
"baseHash": "e9c021f2e7812ef254e9b30af0950becc3c7e9cd",
|
||||
"baseHash": "224ddd5bc92672790e8875bf3078f0529aca05d0",
|
||||
"issue": 12210
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/conversions.h",
|
||||
"baseHash": "bba752626a7f04ea611a8de6a64e6dea587be2b6",
|
||||
"issue": 12194
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp",
|
||||
"baseHash": "7d93c0d7f5f2b99c5bf9fcd800bfc1c1b306d4eb",
|
||||
"issue": 12194
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/RawPropsParser.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/core/RawPropsParser.cpp",
|
||||
"baseHash": "caa209ccd7c1eceb4bb34558720ebcbe43f3db5a",
|
||||
"baseHash": "acf75448d8b37fcd3c5c860c856adec1567c684d",
|
||||
"issue": 12300
|
||||
},
|
||||
{
|
||||
|
@ -105,14 +91,14 @@
|
|||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp",
|
||||
"baseHash": "6a1ef351833bd02ce27544dd3db205c1bf2c4139",
|
||||
"baseHash": "7e52068b21ba500a397e344c943a4f732f07e848",
|
||||
"issue": 12195
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManagerBinding.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp",
|
||||
"baseHash": "307bdef4d1e494461a8e19a4ac77763b68dd2f0c",
|
||||
"baseHash": "f830b73ce7e480a1d3c49623bc0e44d4c8834a01",
|
||||
"issue": 12195
|
||||
},
|
||||
{
|
||||
|
@ -136,25 +122,18 @@
|
|||
"baseHash": "052aadf02af395a25cea6703538e730e2c714cd6",
|
||||
"issue": 12195
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp",
|
||||
"baseHash": "f78c2800af3f9b726962235adc09989118459bdd",
|
||||
"issue": 12194
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.h",
|
||||
"baseFile": "packages/react-native/ReactCommon/yoga/yoga/node/Node.h",
|
||||
"baseHash": "1ab23f2dd1193bc0cd454a7920e6c5e0f93c6168",
|
||||
"baseHash": "d6cf4c67b92a230c874d7a9353fc9839fc9e5657",
|
||||
"issue": 12195
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "ReactCommon/Yoga.cpp",
|
||||
"baseFile": "packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp",
|
||||
"baseHash": "1effa64b066471ced3c4127394a47e13c374cde8",
|
||||
"baseHash": "2b44a95b03209a09825fa5d3476beb9e853b80bc",
|
||||
"issue": 3994
|
||||
},
|
||||
{
|
||||
|
@ -330,7 +309,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/Components/TextInput/TextInput.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
||||
"baseHash": "0a0b60aee76438543e8f2e62d48849d5c33753bd"
|
||||
"baseHash": "4431d2d4ea39a5ce9b9fad8ed22c7896b77ca9d2"
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
|
@ -378,7 +357,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/Components/View/View.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
|
||||
"baseHash": "f25ca9bd8f25d1dd05d98d40946a41b19fac87f1"
|
||||
"baseHash": "d621a2fb669bbc2fc0657db1233c9a930a073fba"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
@ -414,14 +393,14 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/Image/Image.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/Image/Image.ios.js",
|
||||
"baseHash": "ead4aaa048a5ae0186d3f8ade054b970a2115a3a",
|
||||
"baseHash": "bccd20ad47baa18b187bd8eb92b7627135be29fd",
|
||||
"issue": 4590
|
||||
},
|
||||
{
|
||||
"type": "patch",
|
||||
"file": "src/Libraries/Image/resolveAssetSource.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/Image/resolveAssetSource.js",
|
||||
"baseHash": "594d34126769664b671f742d0b73376de6507a04",
|
||||
"baseHash": "6a1fdee0fb94ff7c6647d75fdcdc9e4d25c5085f",
|
||||
"issue": 10619
|
||||
},
|
||||
{
|
||||
|
@ -494,7 +473,7 @@
|
|||
"type": "patch",
|
||||
"file": "src/Libraries/ReactNative/PaperUIManager.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/ReactNative/PaperUIManager.js",
|
||||
"baseHash": "64504c716b2c64116d1ec74702ce7754fa651c6f"
|
||||
"baseHash": "d5bbe5273211e4f39e6468f0c90ec42e5fe0a9c0"
|
||||
},
|
||||
{
|
||||
"type": "platform",
|
||||
|
@ -529,13 +508,13 @@
|
|||
"type": "derived",
|
||||
"file": "src/Libraries/Utilities/NativePlatformConstantsWin.js",
|
||||
"baseFile": "packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js",
|
||||
"baseHash": "77a07a52a5d20150d5596574e251aba1b767a9cd"
|
||||
"baseHash": "d618776f5251597b9fa13c55be27e09f3ceccdf3"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
"file": "src/Libraries/Utilities/Platform.flow.windows.js",
|
||||
"baseFile": "packages/react-native/Libraries/Utilities/Platform.flow.js",
|
||||
"baseHash": "c0a203e8d15f99ff00edaab6c4a40a49606a99f0"
|
||||
"baseHash": "48e0b6dd625aa58347266a362eb404ddd47b59d4"
|
||||
},
|
||||
{
|
||||
"type": "derived",
|
||||
|
|
|
@ -28,18 +28,18 @@
|
|||
"@react-native-community/cli-platform-ios": "12.0.0-alpha.15",
|
||||
"@react-native-windows/cli": "0.0.0-canary.194",
|
||||
"@react-native/assets": "1.0.0",
|
||||
"@react-native/assets-registry": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/codegen": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/community-cli-plugin": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/gradle-plugin": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/js-polyfills": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/normalize-colors": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/virtualized-lists": "0.73.0-nightly-20231002-0371014a3",
|
||||
"@react-native/assets-registry": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/codegen": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/community-cli-plugin": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/gradle-plugin": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/js-polyfills": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/normalize-colors": "0.74.0-nightly-20231016-44660019e",
|
||||
"@react-native/virtualized-lists": "0.74.0-nightly-20231016-44660019e",
|
||||
"abort-controller": "^3.0.0",
|
||||
"anser": "^1.4.9",
|
||||
"ansi-regex": "^5.0.0",
|
||||
"base64-js": "^1.5.1",
|
||||
"deprecated-react-native-prop-types": "4.2.1",
|
||||
"deprecated-react-native-prop-types": "^5.0.0",
|
||||
"event-target-shim": "^5.0.1",
|
||||
"flow-enums-runtime": "^0.0.6",
|
||||
"invariant": "^2.2.4",
|
||||
|
@ -81,14 +81,14 @@
|
|||
"just-scripts": "^1.3.3",
|
||||
"prettier": "^2.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3",
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e",
|
||||
"react-native-platform-override": "^1.9.17",
|
||||
"react-refresh": "^0.4.0",
|
||||
"typescript": "^4.9.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"react": "18.2.0",
|
||||
"react-native": "0.73.0-nightly-20231002-0371014a3"
|
||||
"react-native": "0.74.0-nightly-20231016-44660019e"
|
||||
},
|
||||
"beachball": {
|
||||
"defaultNpmTag": "canary",
|
||||
|
|
|
@ -149,6 +149,9 @@ type DataDetectorTypesType =
|
|||
| 'link'
|
||||
| 'address'
|
||||
| 'calendarEvent'
|
||||
| 'trackingNumber'
|
||||
| 'flightNumber'
|
||||
| 'lookupSuggestion'
|
||||
| 'none'
|
||||
| 'all';
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
import type {ViewProps} from './ViewPropTypes';
|
||||
|
||||
import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
|
||||
import flattenStyle from '../../StyleSheet/flattenStyle';
|
||||
import TextAncestor from '../../Text/TextAncestor';
|
||||
import ViewNativeComponent from './ViewNativeComponent';
|
||||
|
@ -112,15 +111,6 @@ const View: React.AbstractComponent<
|
|||
|
||||
// $FlowFixMe[sketchy-null-mixed]
|
||||
const newPointerEvents = style?.pointerEvents || pointerEvents;
|
||||
const collapsableOverride =
|
||||
ReactNativeFeatureFlags.shouldForceUnflattenForElevation()
|
||||
? {
|
||||
collapsable:
|
||||
style != null && style.elevation != null && style.elevation !== 0
|
||||
? false
|
||||
: otherProps.collapsable,
|
||||
}
|
||||
: {};
|
||||
|
||||
const _keyDown = (event: KeyEvent) => {
|
||||
if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
|
||||
|
@ -238,7 +228,6 @@ const View: React.AbstractComponent<
|
|||
return (
|
||||
<ViewNativeComponent
|
||||
{...otherProps}
|
||||
{...collapsableOverride}
|
||||
accessibilityLiveRegion={
|
||||
ariaLive === 'off'
|
||||
? 'none'
|
||||
|
|
|
@ -4,21 +4,21 @@
|
|||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow
|
||||
* @flow strict-local
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {ImageStyle, ImageStyleProp} from '../StyleSheet/StyleSheet';
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {ImageIOS} from './Image.flow';
|
||||
import type {ImageProps as ImagePropsType} from './ImageProps';
|
||||
import type {AbstractImageIOS, ImageIOS} from './ImageTypes.flow';
|
||||
|
||||
import {createRootTag} from '../ReactNative/RootTag';
|
||||
import TextAncestor from '../Text/TextAncestor'; // [Windows]
|
||||
import invariant from 'invariant'; // [Windows]
|
||||
import flattenStyle from '../StyleSheet/flattenStyle';
|
||||
import StyleSheet from '../StyleSheet/StyleSheet';
|
||||
import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
|
||||
import ImageInjection from './ImageInjection';
|
||||
import {unstable_getImageComponentDecorator} from './ImageInjection';
|
||||
import {getImageSourcesFromImageProps} from './ImageSourceUtils';
|
||||
import {convertObjectFitToResizeMode} from './ImageUtils';
|
||||
import ImageViewNativeComponent from './ImageViewNativeComponent';
|
||||
|
@ -29,8 +29,8 @@ import * as React from 'react';
|
|||
function getSize(
|
||||
uri: string,
|
||||
success: (width: number, height: number) => void,
|
||||
failure?: (error: any) => void,
|
||||
) {
|
||||
failure?: (error: mixed) => void,
|
||||
): void {
|
||||
NativeImageLoaderIOS.getSize(uri)
|
||||
.then(([width, height]) => success(width, height))
|
||||
.catch(
|
||||
|
@ -45,9 +45,9 @@ function getSizeWithHeaders(
|
|||
uri: string,
|
||||
headers: {[string]: string, ...},
|
||||
success: (width: number, height: number) => void,
|
||||
failure?: (error: any) => void,
|
||||
): any {
|
||||
return NativeImageLoaderIOS.getSizeWithHeaders(uri, headers)
|
||||
failure?: (error: mixed) => void,
|
||||
): void {
|
||||
NativeImageLoaderIOS.getSizeWithHeaders(uri, headers)
|
||||
.then(function (sizes) {
|
||||
success(sizes.width, sizes.height);
|
||||
})
|
||||
|
@ -63,41 +63,30 @@ function prefetchWithMetadata(
|
|||
url: string,
|
||||
queryRootName: string,
|
||||
rootTag?: ?RootTag,
|
||||
): any {
|
||||
): Promise<boolean> {
|
||||
if (NativeImageLoaderIOS.prefetchImageWithMetadata) {
|
||||
// number params like rootTag cannot be nullable before TurboModules is available
|
||||
return NativeImageLoaderIOS.prefetchImageWithMetadata(
|
||||
url,
|
||||
queryRootName,
|
||||
// NOTE: RootTag type
|
||||
// $FlowFixMe[incompatible-call] RootTag: number is incompatible with RootTag
|
||||
rootTag ? rootTag : 0,
|
||||
rootTag != null ? rootTag : createRootTag(0),
|
||||
);
|
||||
} else {
|
||||
return NativeImageLoaderIOS.prefetchImage(url);
|
||||
}
|
||||
}
|
||||
|
||||
function prefetch(url: string): any {
|
||||
function prefetch(url: string): Promise<boolean> {
|
||||
return NativeImageLoaderIOS.prefetchImage(url);
|
||||
}
|
||||
|
||||
async function queryCache(
|
||||
urls: Array<string>,
|
||||
): Promise<{[string]: 'memory' | 'disk' | 'disk/memory', ...}> {
|
||||
return await NativeImageLoaderIOS.queryCache(urls);
|
||||
return NativeImageLoaderIOS.queryCache(urls);
|
||||
}
|
||||
|
||||
export type ImageComponentStatics = $ReadOnly<{|
|
||||
getSize: typeof getSize,
|
||||
getSizeWithHeaders: typeof getSizeWithHeaders,
|
||||
prefetch: typeof prefetch,
|
||||
prefetchWithMetadata: typeof prefetchWithMetadata,
|
||||
abortPrefetch?: number => void,
|
||||
queryCache: typeof queryCache,
|
||||
resolveAssetSource: typeof resolveAssetSource,
|
||||
|}>;
|
||||
|
||||
/**
|
||||
* A React component for displaying different types of images,
|
||||
* including network images, static resources, temporary local images, and
|
||||
|
@ -105,9 +94,7 @@ export type ImageComponentStatics = $ReadOnly<{|
|
|||
*
|
||||
* See https://reactnative.dev/docs/image
|
||||
*/
|
||||
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
|
||||
* LTI update could not be added via codemod */
|
||||
const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
||||
let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
|
||||
const source = getImageSourcesFromImageProps(props) || {
|
||||
uri: undefined,
|
||||
width: undefined,
|
||||
|
@ -115,16 +102,23 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
};
|
||||
|
||||
let sources;
|
||||
let style: ImageStyleProp;
|
||||
let style: ImageStyle;
|
||||
|
||||
if (Array.isArray(source)) {
|
||||
// $FlowFixMe[underconstrained-implicit-instantiation]
|
||||
style = flattenStyle([styles.base, props.style]) || {};
|
||||
style =
|
||||
flattenStyle<ImageStyleProp>([styles.base, props.style]) ||
|
||||
({}: ImageStyle);
|
||||
sources = source;
|
||||
} else {
|
||||
// $FlowFixMe[incompatible-type]
|
||||
const {width = props.width, height = props.height, uri} = source;
|
||||
// $FlowFixMe[underconstrained-implicit-instantiation]
|
||||
style = flattenStyle([{width, height}, styles.base, props.style]) || {};
|
||||
const {uri} = source;
|
||||
const width = source.width ?? props.width;
|
||||
const height = source.height ?? props.height;
|
||||
style =
|
||||
flattenStyle<ImageStyleProp>([
|
||||
{width, height},
|
||||
styles.base,
|
||||
props.style,
|
||||
]) || ({}: ImageStyle);
|
||||
sources = [source];
|
||||
|
||||
if (uri === '') {
|
||||
|
@ -133,16 +127,12 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
}
|
||||
|
||||
const objectFit =
|
||||
// $FlowFixMe[prop-missing]
|
||||
style && style.objectFit
|
||||
? // $FlowFixMe[incompatible-call]
|
||||
convertObjectFitToResizeMode(style.objectFit)
|
||||
style.objectFit != null
|
||||
? convertObjectFitToResizeMode(style.objectFit)
|
||||
: null;
|
||||
const resizeMode =
|
||||
// $FlowFixMe[prop-missing]
|
||||
objectFit || props.resizeMode || (style && style.resizeMode) || 'cover';
|
||||
// $FlowFixMe[prop-missing]
|
||||
const tintColor = props.tintColor || style.tintColor;
|
||||
objectFit || props.resizeMode || style.resizeMode || 'cover';
|
||||
const tintColor = props.tintColor ?? style.tintColor;
|
||||
|
||||
if (props.children != null) {
|
||||
throw new Error(
|
||||
|
@ -191,7 +181,6 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
accessibilityLabel={accessibilityLabel ?? props.alt}
|
||||
ref={forwardedRef}
|
||||
style={style}
|
||||
// $FlowFixMe[incompatible-type]
|
||||
resizeMode={resizeMode}
|
||||
tintColor={tintColor}
|
||||
source={sources}
|
||||
|
@ -204,18 +193,16 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => {
|
|||
}}
|
||||
</TextAncestor.Consumer>
|
||||
);
|
||||
};
|
||||
});
|
||||
|
||||
const ImageForwardRef = React.forwardRef<
|
||||
ImagePropsType,
|
||||
React.ElementRef<typeof ImageViewNativeComponent>,
|
||||
>(BaseImage);
|
||||
|
||||
let Image = ImageForwardRef;
|
||||
if (ImageInjection.unstable_createImageComponent != null) {
|
||||
Image = ImageInjection.unstable_createImageComponent(Image);
|
||||
const imageComponentDecorator = unstable_getImageComponentDecorator();
|
||||
if (imageComponentDecorator != null) {
|
||||
BaseImage = imageComponentDecorator(BaseImage);
|
||||
}
|
||||
|
||||
// $FlowExpectedError[incompatible-type] Eventually we need to move these functions from statics of the component to exports in the module.
|
||||
const Image: ImageIOS = BaseImage;
|
||||
|
||||
Image.displayName = 'Image';
|
||||
|
||||
/**
|
||||
|
@ -223,9 +210,7 @@ Image.displayName = 'Image';
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#getsize
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.getSize = getSize;
|
||||
|
||||
/**
|
||||
|
@ -234,9 +219,7 @@ Image.getSize = getSize;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#getsizewithheaders
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.getSizeWithHeaders = getSizeWithHeaders;
|
||||
|
||||
/**
|
||||
|
@ -245,9 +228,7 @@ Image.getSizeWithHeaders = getSizeWithHeaders;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#prefetch
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.prefetch = prefetch;
|
||||
|
||||
/**
|
||||
|
@ -256,9 +237,7 @@ Image.prefetch = prefetch;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#prefetch
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.prefetchWithMetadata = prefetchWithMetadata;
|
||||
|
||||
/**
|
||||
|
@ -266,9 +245,7 @@ Image.prefetchWithMetadata = prefetchWithMetadata;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#querycache
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.queryCache = queryCache;
|
||||
|
||||
/**
|
||||
|
@ -276,9 +253,7 @@ Image.queryCache = queryCache;
|
|||
*
|
||||
* See https://reactnative.dev/docs/image#resolveassetsource
|
||||
*/
|
||||
/* $FlowFixMe[prop-missing] (>=0.89.0 site=react_native_ios_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
// $FlowFixMe[incompatible-use] This property isn't writable but we're actually defining it here for the first time.
|
||||
Image.resolveAssetSource = resolveAssetSource;
|
||||
|
||||
/**
|
||||
|
@ -293,4 +268,4 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
});
|
||||
|
||||
module.exports = ((Image: any): ImageIOS);
|
||||
module.exports = Image;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
// Resolves an asset into a `source` for `Image`.
|
||||
|
@ -13,6 +13,7 @@
|
|||
'use strict';
|
||||
|
||||
import type {ResolvedAssetSource} from './AssetSourceResolver';
|
||||
import type {ImageSource} from './ImageSource';
|
||||
|
||||
const AssetSourceResolver = require('./AssetSourceResolver');
|
||||
const Platform = require('../Utilities/Platform');
|
||||
|
@ -23,7 +24,7 @@ let _customSourceTransformer, _serverURL, _scriptURL;
|
|||
|
||||
let _sourceCodeScriptURL: ?string;
|
||||
function getSourceCodeScriptURL(): ?string {
|
||||
if (_sourceCodeScriptURL) {
|
||||
if (_sourceCodeScriptURL != null) {
|
||||
return _sourceCodeScriptURL;
|
||||
}
|
||||
|
||||
|
@ -39,8 +40,7 @@ function getSourceCodeScriptURL(): ?string {
|
|||
function getDevServerURL(): ?string {
|
||||
if (_serverURL === undefined) {
|
||||
const sourceCodeScriptURL = getSourceCodeScriptURL();
|
||||
const match =
|
||||
sourceCodeScriptURL && sourceCodeScriptURL.match(/^https?:\/\/.*?\//);
|
||||
const match = sourceCodeScriptURL?.match(/^https?:\/\/.*?\//);
|
||||
if (match) {
|
||||
// jsBundle was loaded from network
|
||||
_serverURL = match[0];
|
||||
|
@ -57,19 +57,25 @@ function _coerceLocalScriptURL(scriptURL: ?string): ?string {
|
|||
return scriptURL;
|
||||
}
|
||||
|
||||
if (scriptURL) {
|
||||
if (scriptURL.startsWith('assets://')) {
|
||||
let normalizedScriptURL = scriptURL;
|
||||
|
||||
if (normalizedScriptURL != null) {
|
||||
if (normalizedScriptURL.startsWith('assets://')) {
|
||||
// android: running from within assets, no offline path to use
|
||||
return null;
|
||||
}
|
||||
scriptURL = scriptURL.substring(0, scriptURL.lastIndexOf('/') + 1);
|
||||
if (!scriptURL.includes('://')) {
|
||||
normalizedScriptURL = normalizedScriptURL.substring(
|
||||
0,
|
||||
normalizedScriptURL.lastIndexOf('/') + 1,
|
||||
);
|
||||
if (!normalizedScriptURL.includes('://')) {
|
||||
// Add file protocol in case we have an absolute file path and not a URL.
|
||||
// This shouldn't really be necessary. scriptURL should be a URL.
|
||||
scriptURL = 'file://' + scriptURL;
|
||||
normalizedScriptURL = 'file://' + normalizedScriptURL;
|
||||
}
|
||||
}
|
||||
return scriptURL;
|
||||
|
||||
return normalizedScriptURL;
|
||||
}
|
||||
|
||||
function getScriptURL(): ?string {
|
||||
|
@ -89,8 +95,10 @@ function setCustomSourceTransformer(
|
|||
* `source` is either a number (opaque type returned by require('./foo.png'))
|
||||
* or an `ImageSource` like { uri: '<http location || file path>' }
|
||||
*/
|
||||
function resolveAssetSource(source: any): ?ResolvedAssetSource {
|
||||
if (typeof source === 'object') {
|
||||
function resolveAssetSource(source: ?ImageSource): ?ResolvedAssetSource {
|
||||
if (source == null || typeof source === 'object') {
|
||||
// $FlowFixMe[incompatible-exact] `source` doesn't exactly match `ResolvedAssetSource`
|
||||
// $FlowFixMe[incompatible-return] `source` doesn't exactly match `ResolvedAssetSource`
|
||||
return source;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,8 @@ const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty'
|
|||
const Platform = require('../Utilities/Platform');
|
||||
const UIManagerProperties = require('./UIManagerProperties');
|
||||
|
||||
import type {RootTag} from '../Types/RootTagTypes';
|
||||
import type {UIManagerJSInterface} from '../Types/UIManagerJSInterface';
|
||||
import NativeUIManager from './NativeUIManager';
|
||||
// import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes'; [Windows]
|
||||
|
||||
|
@ -76,8 +78,23 @@ function getViewManagerConfig(viewManagerName: string): any {
|
|||
return viewManagerConfigs[viewManagerName];
|
||||
}
|
||||
|
||||
// $FlowFixMe
|
||||
const UIManagerJS = {};
|
||||
// $FlowFixMe[cannot-spread-interface]
|
||||
const UIManagerJS: UIManagerJSInterface = {
|
||||
...NativeUIManager,
|
||||
createView(
|
||||
reactTag: ?number,
|
||||
viewName: string,
|
||||
rootTag: RootTag,
|
||||
props: Object,
|
||||
): void {
|
||||
if (Platform.OS === 'ios' && viewManagerConfigs[viewName] === undefined) {
|
||||
// This is necessary to force the initialization of native viewManager
|
||||
// classes in iOS when using static ViewConfigs
|
||||
getViewManagerConfig(viewName);
|
||||
}
|
||||
NativeUIManager.createView(reactTag, viewName, rootTag, props);
|
||||
},
|
||||
};
|
||||
|
||||
// [Windows The spread operator doesn't work on JSI turbomodules, so use this instead
|
||||
for (const propName of Object.getOwnPropertyNames(NativeUIManager)) {
|
||||
|
|
326
yarn.lock
326
yarn.lock
|
@ -2389,10 +2389,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@react-native-picker/picker/-/picker-2.6.1.tgz#3b20ddd1385fab0487db103dc6519570f8892e6d"
|
||||
integrity sha512-oJftvmLOj6Y6/bF4kPcK6L83yNBALGmqNYugf94BzP0FQGpHBwimVN2ygqkQ2Sn2ZU3pGUZMs0jV6+Gku2GyYg==
|
||||
|
||||
"@react-native/assets-registry@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.73.0-nightly-20231002-0371014a3.tgz#38eb633d1f3f36fedec98cc99e6d2b066a096463"
|
||||
integrity sha512-+kIkCPVWsQ/gluuQEqPpoU5TZWnBeQTQiOW2rT64zkCsOQzu0I5fhSomwo8XZTr38OTOZWq9LSDQwAVegVN07Q==
|
||||
"@react-native/assets-registry@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.74.0-nightly-20231016-44660019e.tgz#4c4f3f5f8c0afa521d3c3f885512aa8bd1c09f6e"
|
||||
integrity sha512-Wo1bpnW5p85WLDDYwVoogWC3cq8RCESkJGf6WrXvUWuFUDZZwp/DAeNuFQAHK6VmufQLZHaYUmJTrW19srDfHA==
|
||||
|
||||
"@react-native/assets@1.0.0":
|
||||
version "1.0.0"
|
||||
|
@ -2406,12 +2406,12 @@
|
|||
dependencies:
|
||||
"@react-native/codegen" "*"
|
||||
|
||||
"@react-native/babel-plugin-codegen@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.73.0-nightly-20231002-0371014a3.tgz#e8d1654fd570bce663498c4e1c2436bfe69f38bd"
|
||||
integrity sha512-awecaSoBqb0AY3qMw0Logv2T+A+bSY1nzDUe4H9D3+8Gbo/gR0+fJVs9Yhwnl5QlF8+81DJofjTjp5AIzc9KVQ==
|
||||
"@react-native/babel-plugin-codegen@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.74.0-nightly-20231016-44660019e.tgz#932ebe8b6b8b8cbe5997bc045feca6e64e89a7a4"
|
||||
integrity sha512-DXazHUNexHNbYlHA1uo2IVV+tM83T7CvHfcdJCofOvSPq1pH8yWiYyYJmj1wA/UJ9GY3Y4CI77q5PpjKh5N2YQ==
|
||||
dependencies:
|
||||
"@react-native/codegen" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/codegen" "0.74.0-nightly-20231016-44660019e"
|
||||
|
||||
"@react-native/babel-preset@*", "@react-native/babel-preset@0.73.16":
|
||||
version "0.73.16"
|
||||
|
@ -2459,10 +2459,10 @@
|
|||
babel-plugin-transform-flow-enums "^0.0.2"
|
||||
react-refresh "^0.4.0"
|
||||
|
||||
"@react-native/babel-preset@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.73.0-nightly-20231002-0371014a3.tgz#742c08938934f70717d39b00ab4d20889d55cd88"
|
||||
integrity sha512-junaacCXy0o+TBDf/B/F5k/EJ7v4r2tYCh36U95zKLyfU9BVSAKOuXikN38vXqxvNPy0aqH6cR1KmoXAvuMROw==
|
||||
"@react-native/babel-preset@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.74.0-nightly-20231016-44660019e.tgz#226cfb7a0de2b6b9192fa9293cd2baf817307be5"
|
||||
integrity sha512-Rf5e+dJt4/bA/NXIvue9qQvWTAYJYdgkB0PwgScaE2DqJBX0rh27yr00eJ1gjYsrzxpJuhNzHOnrpbE9yuttbA==
|
||||
dependencies:
|
||||
"@babel/core" "^7.20.0"
|
||||
"@babel/plugin-proposal-async-generator-functions" "^7.0.0"
|
||||
|
@ -2503,7 +2503,7 @@
|
|||
"@babel/plugin-transform-typescript" "^7.5.0"
|
||||
"@babel/plugin-transform-unicode-regex" "^7.0.0"
|
||||
"@babel/template" "^7.0.0"
|
||||
"@react-native/babel-plugin-codegen" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/babel-plugin-codegen" "0.74.0-nightly-20231016-44660019e"
|
||||
babel-plugin-transform-flow-enums "^0.0.2"
|
||||
react-refresh "^0.14.0"
|
||||
|
||||
|
@ -2517,25 +2517,25 @@
|
|||
jscodeshift "^0.14.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/codegen@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.73.0-nightly-20231002-0371014a3.tgz#a3ecf4b6a3602f273a6f03cf3bc3462418351c42"
|
||||
integrity sha512-DKHzeuaLH6XuBzOliTgILS0N8erGO98l9M4tbqTL0nCY7eighFwTNDBA3c4IcHB9+SrdVW9wug0wQ3aW/nO97g==
|
||||
"@react-native/codegen@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.74.0-nightly-20231016-44660019e.tgz#b9b4513e143bc10536f3bbed11524aed6d96e263"
|
||||
integrity sha512-M60JkLJl68BM9dk6fxNSqHVZ348sIryf60fmcSB5FYqe8gy8c4cAJWBkb3o5BFuzNIsTpG3uAa2d7pjRTbI36A==
|
||||
dependencies:
|
||||
"@babel/parser" "^7.20.0"
|
||||
flow-parser "^0.206.0"
|
||||
jscodeshift "^0.14.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/community-cli-plugin@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.73.0-nightly-20231002-0371014a3.tgz#6bcfb98357da210318d4c043279d59ce9ec8ee1b"
|
||||
integrity sha512-1uQluURUrGem+rBRUZ/P9BADt8Fm9mqAq3ZZ8iKDA32uS5CszTsp0ik6FdfuiYcKXPT20BKMxsaiAW7X1WNmsg==
|
||||
"@react-native/community-cli-plugin@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.74.0-nightly-20231016-44660019e.tgz#856d0998a8f378742fdcf98b95af0098099a91c4"
|
||||
integrity sha512-K9/RUV9kKKt7NkJg1C94uvS0RREnHxbcXYmKzAQTJfCQ2aYBwiJGW7HUMRQD2ntLnNv+HBmU6uRuObQCr7TGww==
|
||||
dependencies:
|
||||
"@react-native-community/cli-server-api" "12.0.0-alpha.15"
|
||||
"@react-native-community/cli-tools" "12.0.0-alpha.15"
|
||||
"@react-native/dev-middleware" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/metro-babel-transformer" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/dev-middleware" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/metro-babel-transformer" "0.74.0-nightly-20231016-44660019e"
|
||||
chalk "^4.0.0"
|
||||
execa "^5.1.1"
|
||||
metro "0.79.1"
|
||||
|
@ -2544,23 +2544,24 @@
|
|||
node-fetch "^2.2.0"
|
||||
readline "^1.3.0"
|
||||
|
||||
"@react-native/debugger-frontend@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.73.0-nightly-20231002-0371014a3.tgz#189474ce3ca1d9e82c77d64b3a30437bf82e64dc"
|
||||
integrity sha512-Y3ymHShoQjcPtmQohK3dLwfIY+uFxFKzr9Q/p1uFPDba5FMTk3g+6jfI+R1b+iR8oy0ypmh/ntZuEbdooaCIag==
|
||||
"@react-native/debugger-frontend@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.74.0-nightly-20231016-44660019e.tgz#d762b61403b32505510015950aa64d149c4053b3"
|
||||
integrity sha512-UGvA1kQdCe2uL/WNHo23q2lJWlhVagurTTM8/30zOCgpvNPIGQ5k9c1ieuYe11fse2DHLVjiwtNnLPkx9VVhyA==
|
||||
|
||||
"@react-native/dev-middleware@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.73.0-nightly-20231002-0371014a3.tgz#c01508e9c38eb48e8aec4dc5503515a137c0a1cc"
|
||||
integrity sha512-db9mp5uBMQPIETMMhqiptlvN+SpOA+KA+fh9qcMYfKbsSL5sbvzBz36Tuvlcd+tz6z/Rv/N3s6mI19LKVAUnmw==
|
||||
"@react-native/dev-middleware@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.74.0-nightly-20231016-44660019e.tgz#4d6107dd81fb567041b41203ee05848cccf97971"
|
||||
integrity sha512-acjRQ8AMLY2FZYyXFAeIrOzHnP2IsOMQvPh8M9tEJ40/Z18tmMz5UeT99Zq8biqHh0ejLpEtkOaXj/rnWg3qnw==
|
||||
dependencies:
|
||||
"@isaacs/ttlcache" "^1.4.1"
|
||||
"@react-native/debugger-frontend" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/debugger-frontend" "0.74.0-nightly-20231016-44660019e"
|
||||
chrome-launcher "^0.15.2"
|
||||
chromium-edge-launcher "^1.0.0"
|
||||
connect "^3.6.5"
|
||||
debug "^2.2.0"
|
||||
node-fetch "^2.2.0"
|
||||
open "^7.0.3"
|
||||
serve-static "^1.13.1"
|
||||
temp-dir "^2.0.0"
|
||||
|
||||
|
@ -2588,32 +2589,22 @@
|
|||
resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.73.1.tgz#79d2c4d90c80bfad8900db335bfbaf1ca599abdc"
|
||||
integrity sha512-8BNMFE8CAI7JLWLOs3u33wcwcJ821LYs5g53Xyx9GhSg0h8AygTwDrwmYb/pp04FkCNCPjKPBoaYRthQZmxgwA==
|
||||
|
||||
"@react-native/gradle-plugin@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.73.0-nightly-20231002-0371014a3.tgz#719dfb029879d015ddf2840dad118512ee465aab"
|
||||
integrity sha512-mVciocfayTgb7Dvzo3X0hC1dCXMNCyeTyQmuiEBobWTaydyV8MTsMvcLB9bGgyZPDVU1rV15IeHOZXaJonnz6A==
|
||||
"@react-native/gradle-plugin@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.74.0-nightly-20231016-44660019e.tgz#0f00021cb15767274e5fb199d7d871b102d17c86"
|
||||
integrity sha512-lMJYsa8WjQ5b6Z46hLnS0NUQ9AMOa67Z8jx9LTEnNk9W1H/3nsN3PrdDTeSGG7Rp3ktz0yURUp3MWG77onAEFA==
|
||||
|
||||
"@react-native/js-polyfills@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.73.0-nightly-20231002-0371014a3.tgz#b747459c9a94b73dcb22926555660ac4e4898ff2"
|
||||
integrity sha512-u6G64FixVBJKSIaQ2K2Jmw6jaPy22iVn5lw+xD7ign3zoUjIFCaUESp8ZquUX8EyuACsu0njH1l2Zu59w8fGbA==
|
||||
"@react-native/js-polyfills@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.74.0-nightly-20231016-44660019e.tgz#63a4048cfe578e090e72d8fc05f43dc2a9fad8e8"
|
||||
integrity sha512-sdnunPD2qD5nslfV8jdOJ0vIzRO9a+Uc/tDQo4js6NR58CyiQ0PCzGqbsr95DcSJe0y8YL9pJpZzTAvHNdbXYw==
|
||||
|
||||
"@react-native/js-polyfills@^0.73.1":
|
||||
version "0.73.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.73.1.tgz#730b0a7aaab947ae6f8e5aa9d995e788977191ed"
|
||||
integrity sha512-ewMwGcumrilnF87H4jjrnvGZEaPFCAC4ebraEK+CurDDmwST/bIicI4hrOAv+0Z0F7DEK4O4H7r8q9vH7IbN4g==
|
||||
|
||||
"@react-native/metro-babel-transformer@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.73.0-nightly-20231002-0371014a3.tgz#edcf7b2f1dbfecbee86afe2fa943ec4aa336965c"
|
||||
integrity sha512-c7pzwSZVk6I/ozcGD7l1YSmKtXgKx/XIGqAgWJVNt7cGbvH3/4g0qJJFS6pqDT9b5kO2mKd/v8lTT28zZmLo3g==
|
||||
dependencies:
|
||||
"@babel/core" "^7.20.0"
|
||||
"@react-native/babel-preset" "0.73.0-nightly-20231002-0371014a3"
|
||||
hermes-parser "0.15.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/metro-babel-transformer@0.73.12", "@react-native/metro-babel-transformer@^0.73.11", "@react-native/metro-babel-transformer@^0.73.12":
|
||||
"@react-native/metro-babel-transformer@0.73.12", "@react-native/metro-babel-transformer@^0.73.12":
|
||||
version "0.73.12"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.73.12.tgz#6b9c391285a4e376ea4c7bc42667bed015fdeb7c"
|
||||
integrity sha512-VmxN5aaoOprzDzUR+8c3XYhG0FoMOO6n0ToylCW6EeZCuf5RTY7HWVOhacabGoB1mHrWzJ0wWEsqX+eD4iFxoA==
|
||||
|
@ -2624,7 +2615,27 @@
|
|||
hermes-parser "0.15.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/metro-config@0.73.1", "@react-native/metro-config@^0.73.0":
|
||||
"@react-native/metro-babel-transformer@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.0-nightly-20231016-44660019e.tgz#a374ff8de03caa6bbaf5fd2c375e685b8a6aa397"
|
||||
integrity sha512-hevA78HDQ+W2CngHZPjUazLrVxuFTbd6l9msxcKX2uSfhAiWjA3fvmE5MAXZUfBZ7QZMBhVQjpq4sOoRHFlmcQ==
|
||||
dependencies:
|
||||
"@babel/core" "^7.20.0"
|
||||
"@react-native/babel-preset" "0.74.0-nightly-20231016-44660019e"
|
||||
hermes-parser "0.16.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/metro-babel-transformer@^0.74.0":
|
||||
version "0.74.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.74.0.tgz#ed84c03621ae0d9f985def55153fc35e8a062618"
|
||||
integrity sha512-zkVNO4/FLL+/rt+0iN3BeISYDxUxUElyUcbfaZP5TqOb8g4Nbp4XujPHhcgWjgR7swi9ylcGizynInNYy+h0lw==
|
||||
dependencies:
|
||||
"@babel/core" "^7.20.0"
|
||||
"@react-native/babel-preset" "*"
|
||||
hermes-parser "0.16.0"
|
||||
nullthrows "^1.1.1"
|
||||
|
||||
"@react-native/metro-config@0.73.1", "@react-native/metro-config@^0.73.0", "@react-native/metro-config@^0.74.0":
|
||||
version "0.73.1"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.73.1.tgz#653da799d126d667bdc4499d1ca17acc011523e7"
|
||||
integrity sha512-bnRcJ2a50XpQ3ZOrNuroGVDQleak6n/JhSxHrNHsiW4gKirVqxGJAryv+7uQg2zeYfGXgMl6ai5dk+gbUz+yxQ==
|
||||
|
@ -2634,20 +2645,20 @@
|
|||
metro-config "0.79.1"
|
||||
metro-runtime "0.79.1"
|
||||
|
||||
"@react-native/normalize-colors@*":
|
||||
version "0.73.0"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.0.tgz#23e15cf2a2b73ac7e5e6df8d5b86b173cfb35a3f"
|
||||
integrity sha512-EmSCmJ0djeMJadeFsms6Pl/R85i9xSJMc+tyJu/GEMkKXBVyYQyqanK4RHFU0v8MO90OWj+SiFXjCkKYiJ6mkg==
|
||||
"@react-native/normalize-colors@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.74.0-nightly-20231016-44660019e.tgz#7389e7b6823d2e21008a79c2337ab4554e4e3696"
|
||||
integrity sha512-MT6+Zkq8GdtCvUAyIX/tCzQefqcAZdydZxJwHGJa77M+a4s+QL6sr8QgQNRE2dRii7QRS0+F0+8bujvdSeJzwQ==
|
||||
|
||||
"@react-native/normalize-colors@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.0-nightly-20231002-0371014a3.tgz#93fe8ef1bb17ac281380cd72c2bff965cb0f5999"
|
||||
integrity sha512-xKb7xboVLyQqjEkZPO8SAo7pNUn6+3v3c/JL0JUJpwu0qjZqWc0lhtfnEHxd62sA9JbaM+RhB2y0+d/pSTlySw==
|
||||
"@react-native/normalize-colors@^0.73.0":
|
||||
version "0.73.2"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.73.2.tgz#cc8e48fbae2bbfff53e12f209369e8d2e4cf34ec"
|
||||
integrity sha512-bRBcb2T+I88aG74LMVHaKms2p/T8aQd8+BZ7LuuzXlRfog1bMWWn/C5i0HVuvW4RPtXQYgIlGiXVDy9Ir1So/w==
|
||||
|
||||
"@react-native/virtualized-lists@0.73.0-nightly-20231002-0371014a3":
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.73.0-nightly-20231002-0371014a3.tgz#08a9043d360fb194f9f55702e0138164c84c93d1"
|
||||
integrity sha512-l49x2B+omXVv2TsdlbELSImdfRvl1Y05HzNu28OnHw/KJ6miD7WAQA8lNYM3XQoTg96r2H3M1cNyyPSORk5K5A==
|
||||
"@react-native/virtualized-lists@0.74.0-nightly-20231016-44660019e":
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.74.0-nightly-20231016-44660019e.tgz#dff3e6e7359f5215160cdf794f7244720fc95e80"
|
||||
integrity sha512-d+ThtoeSESfikv2u3Bcnqnka11CAVB0F5/QTV20wmmRUIb0z6AsC5dbLA8XGHXEywbk9TSeizdgvsNmfY+Bgyw==
|
||||
dependencies:
|
||||
invariant "^2.2.4"
|
||||
nullthrows "^1.1.1"
|
||||
|
@ -3384,6 +3395,17 @@
|
|||
"@typescript-eslint/typescript-estree" "5.62.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/parser@^6.7.4":
|
||||
version "6.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.14.0.tgz#a2d6a732e0d2b95c73f6a26ae7362877cc1b4212"
|
||||
integrity sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "6.14.0"
|
||||
"@typescript-eslint/types" "6.14.0"
|
||||
"@typescript-eslint/typescript-estree" "6.14.0"
|
||||
"@typescript-eslint/visitor-keys" "6.14.0"
|
||||
debug "^4.3.4"
|
||||
|
||||
"@typescript-eslint/scope-manager@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.62.0.tgz#d9457ccc6a0b8d6b37d0eb252a23022478c5460c"
|
||||
|
@ -3392,6 +3414,14 @@
|
|||
"@typescript-eslint/types" "5.62.0"
|
||||
"@typescript-eslint/visitor-keys" "5.62.0"
|
||||
|
||||
"@typescript-eslint/scope-manager@6.14.0":
|
||||
version "6.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.14.0.tgz#53d24363fdb5ee0d1d8cda4ed5e5321272ab3d48"
|
||||
integrity sha512-VT7CFWHbZipPncAZtuALr9y3EuzY1b1t1AEkIq2bTXUPKw+pHoXflGNG5L+Gv6nKul1cz1VH8fz16IThIU0tdg==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "6.14.0"
|
||||
"@typescript-eslint/visitor-keys" "6.14.0"
|
||||
|
||||
"@typescript-eslint/type-utils@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.62.0.tgz#286f0389c41681376cdad96b309cedd17d70346a"
|
||||
|
@ -3407,6 +3437,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.62.0.tgz#258607e60effa309f067608931c3df6fed41fd2f"
|
||||
integrity sha512-87NVngcbVXUahrRTqIK27gD2t5Cu1yuCXxbLcFtCzZGlfyVWWh8mLHkoxzjsB6DDNnvdL+fW8MiwPEJyGJQDgQ==
|
||||
|
||||
"@typescript-eslint/types@6.14.0":
|
||||
version "6.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.14.0.tgz#935307f7a931016b7a5eb25d494ea3e1f613e929"
|
||||
integrity sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==
|
||||
|
||||
"@typescript-eslint/typescript-estree@5.62.0":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.62.0.tgz#7d17794b77fabcac615d6a48fb143330d962eb9b"
|
||||
|
@ -3420,6 +3455,19 @@
|
|||
semver "^7.3.7"
|
||||
tsutils "^3.21.0"
|
||||
|
||||
"@typescript-eslint/typescript-estree@6.14.0":
|
||||
version "6.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.14.0.tgz#90c7ddd45cd22139adf3d4577580d04c9189ac13"
|
||||
integrity sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "6.14.0"
|
||||
"@typescript-eslint/visitor-keys" "6.14.0"
|
||||
debug "^4.3.4"
|
||||
globby "^11.1.0"
|
||||
is-glob "^4.0.3"
|
||||
semver "^7.5.4"
|
||||
ts-api-utils "^1.0.1"
|
||||
|
||||
"@typescript-eslint/utils@5.62.0", "@typescript-eslint/utils@^5.10.0", "@typescript-eslint/utils@^5.30.0", "@typescript-eslint/utils@^5.47.1":
|
||||
version "5.62.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.62.0.tgz#141e809c71636e4a75daa39faed2fb5f4b10df86"
|
||||
|
@ -3442,6 +3490,14 @@
|
|||
"@typescript-eslint/types" "5.62.0"
|
||||
eslint-visitor-keys "^3.3.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@6.14.0":
|
||||
version "6.14.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.14.0.tgz#1d1d486581819287de824a56c22f32543561138e"
|
||||
integrity sha512-fB5cw6GRhJUz03MrROVuj5Zm/Q+XWlVdIsFj+Zb1Hvqouc8t+XP2H5y53QYU/MGtd2dPg6/vJJlhoX3xc2ehfw==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "6.14.0"
|
||||
eslint-visitor-keys "^3.4.1"
|
||||
|
||||
"@ungap/structured-clone@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz#756641adb587851b5ccb3e095daf27ae581c8406"
|
||||
|
@ -5446,14 +5502,14 @@ depd@^1.1.2:
|
|||
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
|
||||
integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
|
||||
|
||||
deprecated-react-native-prop-types@4.2.1:
|
||||
version "4.2.1"
|
||||
resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-4.2.1.tgz#8cc990ff5319fec8306e7e8f30389a92978a7231"
|
||||
integrity sha512-ef9AXisRrRhxuxd7d+noOEeGTtxIPVkfOQWf9WZUWuOqI+gs7P7hKTi49Rgb/dfvkmFULhwxO2UqAkH4nJsMfw==
|
||||
deprecated-react-native-prop-types@^5.0.0:
|
||||
version "5.0.0"
|
||||
resolved "https://registry.yarnpkg.com/deprecated-react-native-prop-types/-/deprecated-react-native-prop-types-5.0.0.tgz#02a12f090da7bd9e8c3ac53c31cf786a1315d302"
|
||||
integrity sha512-cIK8KYiiGVOFsKdPMmm1L3tA/Gl+JopXL6F5+C7x39MyPsQYnP57Im/D6bNUzcborD7fcMwiwZqcBdBXXZucYQ==
|
||||
dependencies:
|
||||
"@react-native/normalize-colors" "*"
|
||||
invariant "*"
|
||||
prop-types "*"
|
||||
"@react-native/normalize-colors" "^0.73.0"
|
||||
invariant "^2.2.4"
|
||||
prop-types "^15.8.1"
|
||||
|
||||
deprecation@^2.0.0, deprecation@^2.3.1:
|
||||
version "2.3.1"
|
||||
|
@ -6559,24 +6615,29 @@ flatted@^3.1.0:
|
|||
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3"
|
||||
integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==
|
||||
|
||||
flow-api-translator@0.15.0:
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-api-translator/-/flow-api-translator-0.15.0.tgz#3df5af2d45630251f12782679271dc2533bcf094"
|
||||
integrity sha512-cH5Fo08kQO0vucJfcQqMAPc2De8ooVX/9AhBUiRDhe+Ob98HOSBJamaiFLgTmC9UVnSyIFRKgpG+RRopHWtjwg==
|
||||
flow-api-translator@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-api-translator/-/flow-api-translator-0.16.0.tgz#c1f9a23ccf756d0b7cc7d168da1dc4203ee4fdc0"
|
||||
integrity sha512-wIaR2K/NfIa9YllPHO2m6TQPabMFFL8u08ix+aohul0F23+sTQyePGtqOuqWGm63E16sBgh/uPYcsw+/xZoFWA==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.16.0"
|
||||
"@typescript-eslint/visitor-keys" "^5.42.0"
|
||||
flow-enums-runtime "^0.0.6"
|
||||
hermes-eslint "0.15.0"
|
||||
hermes-estree "0.15.0"
|
||||
hermes-parser "0.15.0"
|
||||
hermes-transform "0.15.0"
|
||||
hermes-eslint "0.16.0"
|
||||
hermes-estree "0.16.0"
|
||||
hermes-parser "0.16.0"
|
||||
hermes-transform "0.16.0"
|
||||
|
||||
flow-bin@^0.217.2:
|
||||
version "0.217.2"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.217.2.tgz#96affa17f3cb303019f740bffeb28cfab7ce1250"
|
||||
integrity sha512-fk4NcfybYjzlww1sEsfk71nqXvonAYpMRFEjmZxibDWWBiaw8DGmqXWZ7XzSunVB15VkJfOstn/sYP1EYPPyWg==
|
||||
|
||||
flow-bin@^0.218.0:
|
||||
version "0.218.1"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.218.1.tgz#2d6c14509db57b3b3ab609cc87bef44faf2970db"
|
||||
integrity sha512-D0479Oxu6HWCBiALCTjf5RF99FkPODhbDQnLDK4f0FGS+L3+XVqFPZPdzOzWwe2k5jAWCfARLVjqKVa6brAgtg==
|
||||
|
||||
flow-enums-runtime@^0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/flow-enums-runtime/-/flow-enums-runtime-0.0.5.tgz#95884bfcc82edaf27eef7e1dd09732331cfbafbc"
|
||||
|
@ -7242,31 +7303,24 @@ hasown@^2.0.0:
|
|||
dependencies:
|
||||
function-bind "^1.1.2"
|
||||
|
||||
hermes-eslint@0.15.0:
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.15.0.tgz#4d7495cb5e0e9275a1fb0b465b88fccf0b6d8840"
|
||||
integrity sha512-Rd12uW9FZdOTDDwpVdYUxZGEApskUzBfKYy9RMtczm2uprX8yviPb9QVSVn2hl+xuRTA7Z0FnqDwOwXGiinsRQ==
|
||||
hermes-eslint@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-eslint/-/hermes-eslint-0.16.0.tgz#f377e7e0260c82d687f4efedff4ae1a4a193359f"
|
||||
integrity sha512-8EFCiVY5Sv7fYaje31HgaUIpe5DrRlx8luQ6Cgj9wyVpNpSMoVeoXHsWS2MEA4CHuWKItM1mACB5E4snBQxV/g==
|
||||
dependencies:
|
||||
esrecurse "^4.3.0"
|
||||
hermes-estree "0.15.0"
|
||||
hermes-parser "0.15.0"
|
||||
|
||||
hermes-estree@0.14.0:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.14.0.tgz#c663eea1400980802283338a09d0087c448729e7"
|
||||
integrity sha512-L6M67+0/eSEbt6Ha2XOBFXL++7MR34EOJMgm+j7YCaI4L/jZqrVAg6zYQKzbs1ZCFDLvEQpOgLlapTX4gpFriA==
|
||||
hermes-estree "0.16.0"
|
||||
hermes-parser "0.16.0"
|
||||
|
||||
hermes-estree@0.15.0:
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.15.0.tgz#e32f6210ab18c7b705bdcb375f7700f2db15d6ba"
|
||||
integrity sha512-lLYvAd+6BnOqWdnNbP/Q8xfl8LOGw4wVjfrNd9Gt8eoFzhNBRVD95n4l2ksfMVOoxuVyegs85g83KS9QOsxbVQ==
|
||||
|
||||
hermes-parser@0.14.0:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.14.0.tgz#edb2e7172fce996d2c8bbba250d140b70cc1aaaf"
|
||||
integrity sha512-pt+8uRiJhVlErY3fiXB3gKhZ72RxM6E1xRMpvfZ5n6Z5TQKQQXKorgRCRzoe02mmvLKBJFP5nPDGv75MWAgCTw==
|
||||
dependencies:
|
||||
hermes-estree "0.14.0"
|
||||
hermes-estree@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-estree/-/hermes-estree-0.16.0.tgz#e2c76a1e9d5a4d620790b9fe05fb01f2d53da07d"
|
||||
integrity sha512-XCoTuBU8S+Jg8nFzaqgy6pNEYo0WYkbMmuJldb3svzpJ2SNUYJDg28b1ltoDMo7k3YlJwPRg7ZS3JTWV3DkDZA==
|
||||
|
||||
hermes-parser@0.15.0:
|
||||
version "0.15.0"
|
||||
|
@ -7275,6 +7329,13 @@ hermes-parser@0.15.0:
|
|||
dependencies:
|
||||
hermes-estree "0.15.0"
|
||||
|
||||
hermes-parser@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-parser/-/hermes-parser-0.16.0.tgz#92d0a34ff4f9b7ffcb04511dfed0cc19df5038e0"
|
||||
integrity sha512-tdJJntb45DUpv8j7ybHfq8NfIQgz8AgaD+PVFyfjK+O+v2N5zbsSDtlvQN2uxCghoTkQL86BEs9oi8IPrUE9Pg==
|
||||
dependencies:
|
||||
hermes-estree "0.16.0"
|
||||
|
||||
hermes-profile-transformer@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/hermes-profile-transformer/-/hermes-profile-transformer-0.0.6.tgz#bd0f5ecceda80dd0ddaae443469ab26fb38fc27b"
|
||||
|
@ -7282,17 +7343,17 @@ hermes-profile-transformer@^0.0.6:
|
|||
dependencies:
|
||||
source-map "^0.7.3"
|
||||
|
||||
hermes-transform@0.15.0:
|
||||
version "0.15.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.15.0.tgz#5509cf6993abafbdc32528098d287f5c91eef52c"
|
||||
integrity sha512-ACGdssuE2mcu/qSwSfie1yWQs5IBRYy7yokPbdCkHd4M0jPqCiQbwrlRzQP0+XgyZPooINXWHxkhsI5Iffhppw==
|
||||
hermes-transform@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/hermes-transform/-/hermes-transform-0.16.0.tgz#f2ba027f558d5c59398f807683ade66adda37b69"
|
||||
integrity sha512-8jckjt5WG+k/zIFSFe1VyTn4xnAJy9Hdej1/9vx0LUEwHXqCwHSasatwuZiF3oKjXX+q92lc33Nrpv1Ixl1gBw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.16.0"
|
||||
esquery "^1.4.0"
|
||||
flow-enums-runtime "^0.0.6"
|
||||
hermes-eslint "0.15.0"
|
||||
hermes-estree "0.15.0"
|
||||
hermes-parser "0.15.0"
|
||||
hermes-eslint "0.16.0"
|
||||
hermes-estree "0.16.0"
|
||||
hermes-parser "0.16.0"
|
||||
|
||||
homedir-polyfill@^1.0.1:
|
||||
version "1.0.3"
|
||||
|
@ -7568,7 +7629,7 @@ interpret@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e"
|
||||
integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==
|
||||
|
||||
invariant@*, invariant@^2.2.4:
|
||||
invariant@^2.2.4:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
||||
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
|
||||
|
@ -7954,7 +8015,7 @@ is-wsl@^1.1.0:
|
|||
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
|
||||
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
|
||||
|
||||
is-wsl@^2.2.0:
|
||||
is-wsl@^2.1.1, is-wsl@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
|
||||
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
|
||||
|
@ -9972,6 +10033,14 @@ open@^6.2.0:
|
|||
dependencies:
|
||||
is-wsl "^1.1.0"
|
||||
|
||||
open@^7.0.3:
|
||||
version "7.4.2"
|
||||
resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321"
|
||||
integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q==
|
||||
dependencies:
|
||||
is-docker "^2.0.0"
|
||||
is-wsl "^2.1.1"
|
||||
|
||||
opencollective-postinstall@^2.0.2:
|
||||
version "2.0.3"
|
||||
resolved "https://registry.yarnpkg.com/opencollective-postinstall/-/opencollective-postinstall-2.0.3.tgz#7a0fff978f6dbfa4d006238fbac98ed4198c3259"
|
||||
|
@ -10331,14 +10400,14 @@ prettier-linter-helpers@^1.0.0:
|
|||
dependencies:
|
||||
fast-diff "^1.1.2"
|
||||
|
||||
prettier-plugin-hermes-parser@0.14.0:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.14.0.tgz#1b5122c14b949bfae96541bbeb39cdd15962a072"
|
||||
integrity sha512-L3QtrNCVYUhN56oAvlkSYnwdOPgYxjBo1Fg+ApXTFUSk+b3uKcMlUqo6j0WZk4QKYtTtDwZcTT1Zl9VIF/7nDg==
|
||||
prettier-plugin-hermes-parser@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/prettier-plugin-hermes-parser/-/prettier-plugin-hermes-parser-0.16.0.tgz#4393d43a4a6f4ed976493dccbbb93f62c44215c3"
|
||||
integrity sha512-J4HdSmlxf3a0nVHVi0G6JJJ7sDVtSb5a+QR52LpiQonpQzMkqgIqyCg+Gt1sGMTJqn19Z0yTHxwCmUicVYXUVg==
|
||||
dependencies:
|
||||
hermes-estree "0.14.0"
|
||||
hermes-parser "0.14.0"
|
||||
prettier-plugin-hermes-parser "0.14.0"
|
||||
hermes-estree "0.16.0"
|
||||
hermes-parser "0.16.0"
|
||||
prettier-plugin-hermes-parser "0.16.0"
|
||||
|
||||
prettier@2.8.8, prettier@^2.4.1:
|
||||
version "2.8.8"
|
||||
|
@ -10412,7 +10481,7 @@ prompts@^2.0.1, prompts@^2.4.0, prompts@^2.4.1, prompts@^2.4.2:
|
|||
kleur "^3.0.3"
|
||||
sisteransi "^1.0.5"
|
||||
|
||||
prop-types@*, prop-types@^15.8.1:
|
||||
prop-types@^15.8.1:
|
||||
version "15.8.1"
|
||||
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.8.1.tgz#67d87bf1a694f48435cf332c24af10214a3140b5"
|
||||
integrity sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==
|
||||
|
@ -10551,27 +10620,27 @@ react-native-xaml@^0.0.76:
|
|||
"@types/react-native" "*"
|
||||
typescript "^4.4.3"
|
||||
|
||||
react-native@0.73.0-nightly-20231002-0371014a3:
|
||||
version "0.73.0-nightly-20231002-0371014a3"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.73.0-nightly-20231002-0371014a3.tgz#55380bd8804e7bfe891af1dddd399acc2fd6ee78"
|
||||
integrity sha512-R5bSGw/H0y2t2PRf8YRoia+FqEixY1V+XIht1lF94m70w5NjFdiKt+UqmvzYmhWVeQgpjao1dwE1PEV0pnt8xw==
|
||||
react-native@0.74.0-nightly-20231016-44660019e:
|
||||
version "0.74.0-nightly-20231016-44660019e"
|
||||
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.74.0-nightly-20231016-44660019e.tgz#118a00532d1210c7148d54c6387aadba4e2e1f05"
|
||||
integrity sha512-SrQmP3yQzaqIP/4+vkhM1SVT+rTWOI/gvQ0lsRXM30+/d4ew2wlSxGCfGzwuvoVLEDVFreOEXC5nRjQdBA4Dgw==
|
||||
dependencies:
|
||||
"@jest/create-cache-key-function" "^29.6.3"
|
||||
"@react-native-community/cli" "12.0.0-alpha.15"
|
||||
"@react-native-community/cli-platform-android" "12.0.0-alpha.15"
|
||||
"@react-native-community/cli-platform-ios" "12.0.0-alpha.15"
|
||||
"@react-native/assets-registry" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/codegen" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/community-cli-plugin" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/gradle-plugin" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/js-polyfills" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/normalize-colors" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/virtualized-lists" "0.73.0-nightly-20231002-0371014a3"
|
||||
"@react-native/assets-registry" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/codegen" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/community-cli-plugin" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/gradle-plugin" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/js-polyfills" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/normalize-colors" "0.74.0-nightly-20231016-44660019e"
|
||||
"@react-native/virtualized-lists" "0.74.0-nightly-20231016-44660019e"
|
||||
abort-controller "^3.0.0"
|
||||
anser "^1.4.9"
|
||||
ansi-regex "^5.0.0"
|
||||
base64-js "^1.5.1"
|
||||
deprecated-react-native-prop-types "4.2.1"
|
||||
deprecated-react-native-prop-types "^5.0.0"
|
||||
event-target-shim "^5.0.1"
|
||||
flow-enums-runtime "^0.0.6"
|
||||
invariant "^2.2.4"
|
||||
|
@ -11951,6 +12020,11 @@ truncate-utf8-bytes@^1.0.0:
|
|||
dependencies:
|
||||
utf8-byte-length "^1.0.1"
|
||||
|
||||
ts-api-utils@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331"
|
||||
integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==
|
||||
|
||||
ts-jest@^29.0.3:
|
||||
version "29.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-29.1.1.tgz#f58fe62c63caf7bfcc5cc6472082f79180f0815b"
|
||||
|
|
Загрузка…
Ссылка в новой задаче