Compare commits

..
Author SHA1 Message Date
Riccardo Cipolleschi c863979abc fix: reset Podfile 2025-06-19 17:13:30 +02:00
Riccardo Cipolleschi 27d152cd82 Update snapshot of ReactCodegen.podspec.template 2025-06-19 16:50:40 +02:00
Riccardo Cipolleschi b7b0013348 fix: support build rn core from source with prebuild rn dep 2025-06-19 16:36:30 +02:00
Christian Falch 325217371f [ios][prebuild] fixed header search paths in ReactCodegen template
Added a few missing search paths
2025-06-19 16:07:09 +02:00
Christian Falch 6f1e48d34d [ios][prebuild] fixed missing changes to ReactCodegen.podspec.template
Added support for prebuilt.
2025-06-19 15:54:18 +02:00
0aa79897e6 fix: revert change to dSYM path
Co-authored-by: Christian Falch <875252+chrfalch@users.noreply.github.com>
2025-06-19 15:19:59 +02:00
Riccardo Cipolleschi 08a6a1ae65 chore: add task to TODO 2025-06-19 15:17:14 +02:00
Riccardo Cipolleschi ad732b84ab fix: fix build from source 2025-06-19 15:11:45 +02:00
Riccardo Cipolleschi 284a20b0de refactor: abort if use local rndeps when no file is present 2025-06-19 14:51:38 +02:00
Riccardo Cipolleschi 742c205e52 fix: remove resolve_redirect from rndependencies as it is not used 2025-06-19 14:49:39 +02:00
Riccardo Cipolleschi 93dc62ac08 fix: remove resolve_redirect as it is not used 2025-06-19 14:49:04 +02:00
Riccardo Cipolleschi e0b07568fe fix: handle XML requests properly 2025-06-19 14:48:01 +02:00
Riccardo Cipolleschi 5adfe16ad2 rename: release_tarball_url to stable 2025-06-19 14:46:37 +02:00
Riccardo Cipolleschi 7b456c0e3f refactor: rename podspec_source_download_prebuild_release_tarball to stable 2025-06-19 14:45:59 +02:00
Riccardo Cipolleschi 0e91eadc12 refactor: simplify if check 2025-06-19 14:44:59 +02:00
Riccardo Cipolleschi 1e8c9639a0 refactor: extract abort code to helper function 2025-06-19 14:44:39 +02:00
Christian Falch 269456cf55 [ios-prebuild] Implemented support for prebuilt in cocoapods
This introduces the first working version of building React Native apps on iOS using prebuilt RNCore and cocoapods.

- Added React-Core-prebuilt.podspec for installing/consuming XCFrameworks
- Added logic in react_native_pods.rb for switching between build from source and using prebuilts
- Added rncore.rb - utilities for the ReactCore prebuilts
- Updated rndependencies with some extra error handling modelled after rncode.rb
- Added support for hard linking headers and modules in each inner framework in the XCFramework in xcframework.js

Swift:
To enable support for the objective-c types from swift, the swift compiler uses a module map to gather exports from the framework (module.modulemap). This file basically points to an umbrella header file that exports the valid objective-c types (non c++) to Swift. In addition these files are read from the DerivedData and not the project source - so it is a bit hard to control everyting.

I was initially not able to use cocoapods own module definitions (module_name, module_file props) to use a custom module map. I finally found that these files are expected in the deriveddata (build folder) where only the active inner framework is copied - so then I had to hard link both module map and header files for each arch.
2025-06-18 17:36:33 +02:00
720 changed files with 23306 additions and 33626 deletions
+1 -2
View File
@@ -47,7 +47,6 @@ packages/react-native/flow/
[options]
enums=true
experimental.pattern_matching=true
casting_syntax=both
component_syntax=true
@@ -104,4 +103,4 @@ untyped-import
untyped-type-import
[version]
^0.274.2
^0.273.1
+1 -1
View File
@@ -129,7 +129,7 @@ runs:
run: yarn build
- name: Build types
shell: bash
run: yarn build-types --skip-snapshot
run: yarn build-types
# Continue with publish steps
- name: Set npm credentials
if: ${{ inputs.release-type == 'release' ||
@@ -1,23 +0,0 @@
name: diff-js-api-breaking-changes
description: Check for breaking changes in the public React Native JS API
runs:
using: composite
steps:
- name: Fetch snapshot from PR head
shell: bash
env:
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
run: |
mkdir $SCRATCH_DIR
git fetch --depth=1 origin ${{ github.event.pull_request.head.sha }}
git show ${{ github.event.pull_request.head.sha }}:packages/react-native/ReactNativeApi.d.ts > $SCRATCH_DIR/ReactNativeApi-after.d.ts \
|| echo "" > $SCRATCH_DIR/ReactNativeApi.d.ts
- name: Run breaking change detection
shell: bash
env:
SCRATCH_DIR: ${{ runner.temp }}/diff-js-api-breaking-changes
run: |
node ./scripts/diff-api-snapshot \
${{ github.workspace }}/packages/react-native/ReactNativeApi.d.ts \
$SCRATCH_DIR/ReactNativeApi-after.d.ts \
> $SCRATCH_DIR/output.json
+1 -1
View File
@@ -49,7 +49,7 @@ runs:
run: yarn run lint-markdown
- name: Build types
shell: bash
run: yarn build-types --skip-snapshot
run: yarn build-types
- name: Run typescript check of generated types
shell: bash
run: yarn test-generated-typescript
-2
View File
@@ -22,8 +22,6 @@ jobs:
uses: ./.github/actions/setup-node
- name: Run yarn install
uses: ./.github/actions/yarn-install
- name: Run diff-js-api-breaking-changes
uses: ./.github/actions/diff-js-api-breaking-changes
- name: Danger
run: yarn danger ci --use-github-checks --failOnErrors
working-directory: private/react-native-bots
@@ -21,7 +21,7 @@ jobs:
- name: Build packages
run: yarn build
- name: Build types
run: yarn build-types --skip-snapshot
run: yarn build-types
- name: Set NPM auth token
run: echo "//registry.npmjs.org/:_authToken=$GHA_NPM_TOKEN" > ~/.npmrc
- name: Find and publish all bumped packages
+2 -2
View File
@@ -14,8 +14,8 @@ jobs:
with:
repo-token: ${{ secrets.REACT_NATIVE_BOT_GITHUB_TOKEN }}
days-before-stale: 180
stale-issue-message: 'This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.'
stale-pr-message: 'This PR is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.'
stale-issue-message: 'This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
stale-pr-message: 'This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.'
close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.'
close-pr-message: 'This PR was closed because it has been stalled for 7 days with no activity.'
exempt-issue-labels: 'Help Wanted :octocat:, Good first issue, Never gets stale, Issue: Author Provided Repro'
-3
View File
@@ -175,6 +175,3 @@ fix_*.patch
# [Experimental] Generated TS type definitions
/packages/**/types_generated/
/packages/debugger-shell/build/
/packages/*/dist/
-4877
View File
File diff suppressed because it is too large Load Diff
+4836 -855
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -124,7 +124,7 @@ if (project.findProperty("react.internal.useHermesNightly")?.toString()?.toBoole
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute(project(":packages:react-native:ReactAndroid:hermes-engine"))
.using(module("com.facebook.react:hermes-android:0.+"))
.using(module("com.facebook.react:hermes-android:0.0.0-+"))
.because("Users opted to use hermes from nightly")
}
}
-149
View File
@@ -1,149 +0,0 @@
/**
* 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.
*
* @flow strict-local
* @format
*/
declare module '@electron/packager' {
declare export type AsarOptions = $FlowFixMe;
declare export type ElectronDownloadRequestOptions = $FlowFixMe;
declare export type TargetDefinition = {
arch: TargetArch,
platform: TargetPlatform,
};
declare export type FinalizePackageTargetsHookFunction = (
targets: TargetDefinition[],
callback: HookFunctionErrorCallback,
) => void;
declare export type HookFunction = (
buildPath: string,
electronVersion: string,
platform: TargetPlatform,
arch: TargetArch,
callback: HookFunctionErrorCallback,
) => void;
declare export type IgnoreFunction = (path: string) => boolean;
declare export type HookFunctionErrorCallback = (err?: Error | null) => void;
declare export interface MacOSProtocol {
name: string;
schemes: string[];
}
declare export type NotaryToolCredentials = $FlowFixMe;
declare export type OsxSignOptions = $FlowFixMe;
declare export type OsxUniversalOptions = $FlowFixMe;
declare export type Win32MetadataOptions = $ReadOnly<{
CompanyName?: string,
FileDescription?: string,
OriginalFilename?: string,
ProductName?: string,
InternalName?: string,
'requested-execution-level'?:
| 'asInvoker'
| 'highestAvailable'
| 'requireAdministrator',
'application-manifest'?: string,
}>;
declare export type WindowsSignOptions = $FlowFixMe;
declare export type OfficialArch =
| 'ia32'
| 'x64'
| 'armv7l'
| 'arm64'
| 'mips64el'
| 'universal';
declare export type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
declare export type TargetArch = OfficialArch | string;
declare export type TargetPlatform = OfficialPlatform | string;
declare export type ArchOption = TargetArch | 'all';
declare export type PlatformOption = TargetPlatform | 'all';
declare export interface Options {
dir: string;
afterAsar?: HookFunction[];
afterComplete?: HookFunction[];
afterCopy?: HookFunction[];
afterCopyExtraResources?: HookFunction[];
afterExtract?: HookFunction[];
afterFinalizePackageTargets?: FinalizePackageTargetsHookFunction[];
afterInitialize?: HookFunction[];
afterPrune?: HookFunction[];
all?: boolean;
appBundleId?: string;
appCategoryType?: string;
appCopyright?: string;
appVersion?: string;
arch?: ArchOption | ArchOption[];
asar?: boolean | AsarOptions;
beforeAsar?: HookFunction[];
beforeCopy?: HookFunction[];
beforeCopyExtraResources?: HookFunction[];
buildVersion?: string;
darwinDarkModeSupport?: boolean;
derefSymlinks?: boolean;
download?: ElectronDownloadRequestOptions;
electronVersion?: string;
electronZipDir?: string;
executableName?: string;
extendHelperInfo?:
| string
| {
[property: string]: any,
};
extendInfo?:
| string
| {
[property: string]: any,
};
extraResource?: string | string[];
helperBundleId?: string;
icon?: string;
ignore?: RegExp | (string | RegExp)[] | IgnoreFunction;
junk?: boolean;
name?: string;
osxNotarize?: NotaryToolCredentials;
osxSign?: true | OsxSignOptions;
osxUniversal?: OsxUniversalOptions;
out?: string;
overwrite?: boolean;
platform?: TargetPlatform | 'all' | Array<TargetPlatform | 'all'>;
prebuiltAsar?: string;
protocols?: MacOSProtocol[];
prune?: boolean;
quiet?: boolean;
tmpdir?: string | false;
usageDescription?: {
[property: string]: string,
};
win32metadata?: Win32MetadataOptions;
windowsSign?: true | WindowsSignOptions;
}
declare function packager(options: Options): Promise<string[]>;
declare module.exports: typeof packager & {
packager: typeof packager,
default: typeof packager,
};
}
+9 -10
View File
@@ -32,7 +32,7 @@
"test-typescript": "tsc -p packages/react-native/types/tsconfig.json",
"test-generated-typescript": "tsc -p packages/react-native/types_generated/tsconfig.test.json",
"test": "jest",
"fantom": "./scripts/fantom.sh",
"fantom": "JS_DIR='..' yarn jest --config private/react-native-fantom/config/jest.config.js",
"trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js",
"update-lock": "npx yarn-deduplicate"
},
@@ -49,17 +49,16 @@
"@babel/plugin-transform-regenerator": "^7.24.7",
"@babel/preset-env": "^7.25.3",
"@babel/preset-flow": "^7.24.7",
"@electron/packager": "^18.3.6",
"@jest/create-cache-key-function": "^29.7.0",
"@microsoft/api-extractor": "^7.52.2",
"@react-native/metro-babel-transformer": "0.81.0-main",
"@react-native/metro-config": "0.81.0-main",
"@react-native/metro-babel-transformer": "0.80.0-main",
"@react-native/metro-config": "0.80.0-main",
"@tsconfig/node22": "22.0.2",
"@types/react": "^19.1.0",
"@typescript-eslint/parser": "^7.1.1",
"ansi-styles": "^4.2.1",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-syntax-hermes-parser": "0.29.1",
"babel-plugin-syntax-hermes-parser": "0.28.1",
"babel-plugin-transform-define": "^2.1.4",
"babel-plugin-transform-flow-enums": "^0.0.2",
"clang-format": "^1.8.0",
@@ -77,11 +76,11 @@
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-api-translator": "0.29.1",
"flow-bin": "^0.274.2",
"flow-api-translator": "0.28.1",
"flow-bin": "^0.273.1",
"glob": "^7.1.1",
"hermes-eslint": "0.29.1",
"hermes-transform": "0.29.1",
"hermes-eslint": "0.28.1",
"hermes-transform": "0.28.1",
"inquirer": "^7.1.0",
"jest": "^29.7.0",
"jest-config": "^29.7.0",
@@ -97,7 +96,7 @@
"node-fetch": "^2.2.0",
"nullthrows": "^1.1.1",
"prettier": "2.8.8",
"prettier-plugin-hermes-parser": "0.29.1",
"prettier-plugin-hermes-parser": "0.28.1",
"react": "19.1.0",
"react-test-renderer": "19.1.0",
"rimraf": "^3.0.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/assets-registry",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Asset support code for React Native.",
"license": "MIT",
"repository": {
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-plugin-codegen",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Babel plugin to generate native module and view manager code for React Native.",
"license": "MIT",
"repository": {
@@ -26,7 +26,7 @@
],
"dependencies": {
"@babel/traverse": "^7.25.3",
"@react-native/codegen": "0.81.0-main"
"@react-native/codegen": "0.80.0-main"
},
"devDependencies": {
"@babel/core": "^7.25.2"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/community-cli-plugin",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Core CLI commands for React Native",
"keywords": [
"react-native",
@@ -22,7 +22,7 @@
"dist"
],
"dependencies": {
"@react-native/dev-middleware": "0.81.0-main",
"@react-native/dev-middleware": "0.80.0-main",
"debug": "^4.4.0",
"invariant": "^2.2.4",
"metro": "^0.82.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/core-cli-utils",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "React Native CLI library for Frameworks to build on",
"license": "MIT",
"main": "./src/index.flow.js",
+1 -1
View File
@@ -125,7 +125,7 @@ export const tasks = {
}),
),
installDependencies: task(FIFTH, 'Install CocoaPods dependencies', () => {
const env: {[string]: string | void} = {
const env = {
RCT_NEW_ARCH_ENABLED: options.newArchitecture ? '1' : '0',
USE_FRAMEWORKS: options.frameworks,
USE_HERMES: options.hermes ? '1' : '0',
+2 -2
View File
@@ -1,5 +1,5 @@
@generated SignedSource<<634e06e29a06ec6a22c087e7f8b01796>>
Git revision: 35c4630bd58bbcbc6f4c54c084b4e52994dc4940
@generated SignedSource<<9ada78dff12dcfc7937c8934261f47f4>>
Git revision: 68cfd0ae84acb0ed8e47b421afd64ae3b0b5b727
Built with --nohooks: false
Is local checkout: false
Remote URL: https://github.com/facebook/react-native-devtools-frontend
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-frontend",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Debugger frontend for React Native based on Chrome DevTools",
"keywords": [
"react-native",
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/debugger-shell",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Experimental debugger shell for React Native for use with @react-native/debugger-frontend",
"keywords": [
"react-native",
@@ -8,7 +8,7 @@
],
"homepage": "https://github.com/facebook/react-native/tree/HEAD/packages/debugger-shell#readme",
"bugs": "https://github.com/facebook/react-native/issues",
"main": "./src/index.js",
"main": "./src/node/index.js",
"exports": {
".": {
"node": "./src/node/index.js",
@@ -27,11 +27,11 @@
"license": "MIT",
"engines": {
"node": ">= 22.14.0",
"electron": ">=36.3.0"
"electron": ">=36.2.0"
},
"dependencies": {
"cross-spawn": "^7.0.6",
"electron": "36.3.0"
"electron": "36.2.0"
},
"devDependencies": {
"semver": "^7.1.3"
@@ -10,7 +10,6 @@
// $FlowFixMe[unclear-type] We have no Flow types for the Electron API.
const {BrowserWindow, app, shell, ipcMain} = require('electron') as any;
const path = require('path');
const util = require('util');
const windowMetadata = new WeakMap<
@@ -69,8 +68,6 @@ function handleLaunchArgs(argv: string[]) {
partition: 'persist:react-native-devtools',
preload: require.resolve('./preload.js'),
},
// Icon for Linux
icon: path.join(__dirname, 'resources', 'icon.png'),
});
// Open links in the default browser instead of in new Electron windows.
@@ -93,7 +90,7 @@ function handleLaunchArgs(argv: string[]) {
}
app.whenReady().then(() => {
handleLaunchArgs(process.argv.slice(app.isPackaged ? 1 : 2));
handleLaunchArgs(process.argv.slice(2));
app.on(
'second-instance',
Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

-26
View File
@@ -1,26 +0,0 @@
/**
* 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.
*
* @flow strict-local
* @format
*/
// As far as Flow is concerned, this package is Node-only.
/*::
export type * from './node';
const Node = require('./node');
declare module.exports: typeof Node;
*/
// Because Electron doesn't support package.json `exports`, we need to
// switch at runtime.
if ('electron' in process.versions) {
// $FlowIgnore[invalid-export]
module.exports = require('./electron');
} else {
// $FlowIgnore[invalid-export]
module.exports = require('./node');
}
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/dev-middleware",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Dev server middleware for React Native",
"keywords": [
"react-native",
@@ -23,7 +23,7 @@
],
"dependencies": {
"@isaacs/ttlcache": "^1.4.1",
"@react-native/debugger-frontend": "0.81.0-main",
"@react-native/debugger-frontend": "0.80.0-main",
"chrome-launcher": "^0.15.2",
"chromium-edge-launcher": "^0.2.0",
"connect": "^3.6.5",
@@ -9,7 +9,6 @@
*/
import type {JsonPagesListResponse} from '../inspector-proxy/types';
import type {BrowserLauncher} from '../types/BrowserLauncher';
import DefaultBrowserLauncher from '../utils/DefaultBrowserLauncher';
import {fetchJson, requestLocal} from './FetchUtils';
@@ -23,7 +22,7 @@ const PAGES_POLLING_DELAY = 2100;
jest.useFakeTimers();
describe('enableStandaloneFuseboxShell experiment', () => {
const BrowserLauncherWithFuseboxShell: BrowserLauncher = {
const BrowserLauncherWithFuseboxShell = {
...DefaultBrowserLauncher,
unstable_showFuseboxShell: () => {
throw new Error('Not implemented');
@@ -81,7 +81,6 @@ export default function createDevMiddleware({
projectRoot,
serverBaseUrl,
logger,
// $FlowFixMe[prop-missing]
unstable_browserLauncher = DefaultBrowserLauncher,
unstable_eventReporter,
unstable_experiments: experimentConfig = {},
@@ -22,7 +22,6 @@ import type {
import type {IncomingMessage, ServerResponse} from 'http';
import getBaseUrlFromRequest from '../utils/getBaseUrlFromRequest';
import getDevToolsFrontendUrl from '../utils/getDevToolsFrontendUrl';
import Device from './Device';
import EventLoopPerfTracker from './EventLoopPerfTracker';
import InspectorProxyHeartbeat from './InspectorProxyHeartbeat';
@@ -250,15 +249,13 @@ export default class InspectorProxy implements InspectorProxyQueries {
const webSocketUrlWithoutProtocol = `${host}${WS_DEBUGGER_URL}?device=${deviceId}&page=${page.id}`;
const webSocketDebuggerUrl = `${webSocketScheme}://${webSocketUrlWithoutProtocol}`;
const devtoolsFrontendUrl = getDevToolsFrontendUrl(
this.#experiments,
webSocketDebuggerUrl,
this.#serverBaseUrl.origin,
{
relative: true,
useFuseboxEntryPoint: page.capabilities.prefersFuseboxFrontend,
},
);
// For now, `/json/list` returns the legacy built-in `devtools://` URL, to
// preserve existing handling by Flipper. This may return a placeholder in
// future -- please use the `/open-debugger` endpoint.
const devtoolsFrontendUrl =
`devtools://devtools/bundled/js_app.html?experiments=true&v8only=true&${webSocketScheme}=` +
encodeURIComponent(webSocketUrlWithoutProtocol);
return {
id: `${deviceId}-${page.id}`,
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-config",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "ESLint config for React Native",
"license": "MIT",
"repository": {
@@ -22,7 +22,7 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "^7.25.1",
"@react-native/eslint-plugin": "0.81.0-main",
"@react-native/eslint-plugin": "0.80.0-main",
"@typescript-eslint/eslint-plugin": "^7.1.1",
"@typescript-eslint/parser": "^7.1.1",
"eslint-config-prettier": "^8.5.0",
@@ -31,8 +31,6 @@ eslintTester.run('../no-deep-imports', rule, {
"import Foo from 'react/native/Foo';",
"import 'react-native/Libraries/Core/InitializeCore';",
"require('react-native/Libraries/Core/InitializeCore');",
"import Foo from 'react-native/src/fb_internal/Foo'",
"require('react-native/src/fb_internal/Foo')",
],
invalid: [
{
@@ -105,25 +103,5 @@ eslintTester.run('../no-deep-imports', rule, {
],
output: null,
},
{
code: "import type {RootTag} from 'react-native/Libraries/Types/RootTagTypes';",
errors: [
{
messageId: 'deepImport',
data: {importPath: 'react-native/Libraries/Types/RootTagTypes'},
},
],
output: "import type {RootTag} from 'react-native';",
},
{
code: "import type {ModalBaseProps, Foo} from 'react-native/Libraries/Modal/Modal';",
errors: [
{
messageId: 'deepImport',
data: {importPath: 'react-native/Libraries/Modal/Modal'},
},
],
output: null,
},
],
});
@@ -31,8 +31,7 @@ module.exports = {
ImportDeclaration(node) {
if (
!isDeepReactNativeImport(node.source) ||
isInitializeCoreImport(node.source) ||
isFbInternalImport(node.source)
isInitializeCoreImport(node.source)
) {
return;
}
@@ -41,55 +40,25 @@ module.exports = {
'react-native/'.length,
);
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
if (publicAPIDefaultComponent) {
context.report({
...getStandardReport(node.source),
fix(fixer) {
return fixer.replaceText(
node,
`import {${publicAPIDefaultComponent.default}} from 'react-native';`,
`import {${publicAPIDefaultComponent}} from 'react-native';`,
);
},
});
} else {
context.report(getStandardReport(node.source));
}
} else if (isTypeImport(node)) {
const reactNativeSource = node.source.value.slice(
'react-native/'.length,
);
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
if (publicAPIDefaultComponent && publicAPIDefaultComponent.types) {
const typeNames = [];
for (const specifier of node.specifiers) {
const importedName = specifier.imported.name;
if (!publicAPIDefaultComponent.types.includes(importedName)) {
context.report(getStandardReport(node.source));
return;
}
typeNames.push(importedName);
}
context.report({
...getStandardReport(node.source),
fix(fixer) {
return fixer.replaceText(
node,
`import type {${typeNames.join(', ')}} from 'react-native';`,
);
},
});
}
} else {
context.report(getStandardReport(node.source));
}
},
CallExpression(node) {
if (
!isDeepRequire(node) ||
isInitializeCoreImport(node.arguments[0]) ||
isFbInternalImport(node.arguments[0])
) {
if (!isDeepRequire(node) || isInitializeCoreImport(node.arguments[0])) {
return;
}
@@ -102,13 +71,13 @@ module.exports = {
) {
const reactNativeSource = importPath.slice('react-native/'.length);
const publicAPIDefaultComponent = publicAPIMapping[reactNativeSource];
if (publicAPIDefaultComponent && publicAPIDefaultComponent.default) {
if (publicAPIDefaultComponent) {
context.report({
...getStandardReport(node.arguments[0]),
fix(fixer) {
return fixer.replaceText(
parent,
`{${publicAPIDefaultComponent.default}} = require('react-native')`,
`{${publicAPIDefaultComponent}} = require('react-native')`,
);
},
});
@@ -140,10 +109,6 @@ module.exports = {
);
}
function isTypeImport(node) {
return node.type === 'ImportDeclaration' && node.importKind === 'type';
}
function isDeepRequire(node) {
return (
node.callee.type === 'Identifier' &&
@@ -172,13 +137,5 @@ module.exports = {
return source.value === 'react-native/Libraries/Core/InitializeCore';
}
function isFbInternalImport(source) {
if (source.type !== 'Literal' || typeof source.value !== 'string') {
return false;
}
return source.value.startsWith('react-native/src/fb_internal/');
}
},
};
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "ESLint rules for @react-native/eslint-config",
"license": "MIT",
"repository": {
@@ -18,8 +18,8 @@
"bugs": "https://github.com/facebook/react-native/issues",
"main": "index.js",
"devDependencies": {
"babel-plugin-syntax-hermes-parser": "0.29.1",
"hermes-eslint": "0.29.1"
"babel-plugin-syntax-hermes-parser": "0.28.1",
"hermes-eslint": "0.28.1"
},
"engines": {
"node": ">= 22.14.0"
+86 -507
View File
@@ -17,513 +17,92 @@
* If the path is not matched, the auto-fix won't be suggested.
*/
const publicAPIMapping = {
'Libraries/Components/AccessibilityInfo/AccessibilityInfo': {
default: 'AccessibilityInfo',
types: null,
},
'Libraries/Components/ActivityIndicator/ActivityIndicator': {
default: 'ActivityIndicator',
types: ['ActivityIndicatorProps'],
},
'Libraries/Components/Button': {
default: 'Button',
types: ['ButtonProps'],
},
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid': {
default: 'DrawerLayoutAndroid',
types: ['DrawerLayoutAndroidProps', 'DrawerSlideEvent'],
},
'Libraries/Components/LayoutConformance/LayoutConformance': {
default: 'experimental_LayoutConformance',
types: ['LayoutConformanceProps'],
},
'Libraries/Lists/FlatList': {
default: 'FlatList',
types: ['FlatListProps'],
},
'Libraries/Image/Image': {
default: 'Image',
types: [
'ImageBackgroundProps',
'ImageErrorEvent',
'ImageLoadEvent',
'ImageProgressEventIOS',
'ImageProps',
'ImagePropsAndroid',
'ImagePropsBase',
'ImagePropsIOS',
'ImageResolvedAssetSource',
'ImageSize',
'ImageSourcePropType',
],
},
'Libraries/Image/ImageSource': {
default: null,
types: ['ImageRequireSource', 'ImageSource', 'ImageURISource'],
},
'Libraries/Image/ImageBackground': {
default: 'ImageBackground',
types: null,
},
'Libraries/Components/TextInput/InputAccessoryView': {
default: 'InputAccessoryView',
types: ['InputAccessoryViewProps'],
},
'Libraries/Components/Keyboard/KeyboardAvoidingView': {
default: 'KeyboardAvoidingView',
types: ['KeyboardAvoidingViewProps'],
},
'Libraries/Modal/Modal': {
default: 'Modal',
types: [
'ModalBaseProps',
'ModalProps',
'ModalPropsAndroid',
'ModalPropsIOS',
],
},
'Libraries/Components/Pressable/Pressable': {
default: 'Pressable',
types: [
'PressableAndroidRippleConfig',
'PressableProps',
'PressableStateCallbackType',
],
},
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid': {
default: 'ProgressBarAndroid',
types: ['ProgressBarAndroidProps'],
},
'Libraries/Components/RefreshControl/RefreshControl': {
default: 'RefreshControl',
types: [
'RefreshControlProps',
'RefreshControlPropsAndroid',
'RefreshControlPropsIOS',
],
},
'Libraries/Components/SafeAreaView/SafeAreaView': {
default: 'SafeAreaView',
types: null,
},
'Libraries/Components/ScrollView/ScrollView': {
default: 'ScrollView',
types: [
'ScrollResponderType',
'ScrollViewProps',
'ScrollViewPropsAndroid',
'ScrollViewPropsIOS',
'ScrollViewImperativeMethods',
'ScrollViewScrollToOptions',
],
},
'Libraries/Lists/SectionList': {
default: 'SectionList',
types: [
'SectionListProps',
'SectionListRenderItem',
'SectionListRenderItemInfo',
'SectionListData',
],
},
'Libraries/Components/StatusBar/StatusBar': {
default: 'StatusBar',
types: ['StatusBarAnimation', 'StatusBarProps', 'StatusBarStyle'],
},
'Libraries/Components/Switch/Switch': {
default: 'Switch',
types: ['SwitchChangeEvent', 'SwitchProps'],
},
'Libraries/Text/Text': {
default: 'Text',
types: ['TextProps'],
},
'Libraries/Components/TextInput/TextInput': {
default: 'TextInput',
types: [
'AutoCapitalize',
'EnterKeyHintTypeOptions',
'KeyboardTypeOptions',
'InputModeOptions',
'TextContentType',
'TextInputAndroidProps',
'TextInputIOSProps',
'TextInputProps',
'TextInputChangeEvent',
'TextInputContentSizeChangeEvent',
'TextInputEndEditingEvent',
'TextInputFocusEvent',
'TextInputKeyPressEvent',
'TextInputSelectionChangeEvent',
'TextInputSubmitEditingEvent',
'ReturnKeyTypeOptions',
'SubmitBehavior',
],
},
'Libraries/Components/Touchable/Touchable': {
default: 'Touchable',
types: null,
},
'Libraries/Components/Touchable/TouchableHighlight': {
default: 'TouchableHighlight',
types: ['TouchableHighlightProps'],
},
'Libraries/Components/Touchable/TouchableNativeFeedback': {
default: 'TouchableNativeFeedback',
types: ['TouchableNativeFeedbackProps'],
},
'Libraries/Components/Touchable/TouchableOpacity': {
default: 'TouchableOpacity',
types: ['TouchableOpacityProps'],
},
'Libraries/Components/Touchable/TouchableWithoutFeedback': {
default: 'TouchableWithoutFeedback',
types: ['TouchableWithoutFeedbackProps'],
},
'Libraries/Components/View/View': {
default: 'View',
types: null,
},
'Libraries/Components/View/ViewAccessibility': {
default: null,
types: [
'AccessibilityActionEvent',
'AccessibilityProps',
'AccessibilityRole',
'AccessibilityState',
'AccessibilityValue',
'Role',
],
},
'Libraries/Components/View/ViewPropTypes': {
default: null,
types: [
'GestureResponderHandlers',
'TVViewPropsIOS',
'ViewProps',
'ViewPropsAndroid',
'ViewPropsIOS',
],
},
'Libraries/Lists/VirtualizedList': {
default: 'VirtualizedList',
types: [
'ListRenderItemInfo',
'ListRenderItem',
'Separators',
'VirtualizedListProps',
],
},
'Libraries/Lists/VirtualizedSectionList': {
default: 'VirtualizedSectionList',
types: [
'ScrollToLocationParamsType',
'SectionBase',
'VirtualizedSectionListProps',
],
},
'Libraries/ActionSheetIOS/ActionSheetIOS': {
default: 'ActionSheetIOS',
types: [
'ActionSheetIOSOptions',
'ShareActionSheetIOSOptions',
'ShareActionSheetError',
],
},
'Libraries/Alert/Alert': {
default: 'Alert',
types: ['AlertType', 'AlertButtonStyle', 'AlertButton', 'AlertOptions'],
},
'Libraries/Animated/Animated': {
default: 'Animated',
types: null,
},
'Libraries/Utilities/Appearance': {
default: 'Appearance',
types: null,
},
'Libraries/ReactNative/AppRegistry': {
default: 'AppRegistry',
types: [
'TaskProvider',
'ComponentProvider',
'ComponentProviderInstrumentationHook',
'AppConfig',
'Runnable',
'Runnables',
'Registry',
'WrapperComponentProvider',
'RootViewStyleProvider',
],
},
'Libraries/AppState/AppState': {
default: 'AppState',
types: ['AppStateStatus', 'AppStateEvent'],
},
'Libraries/Utilities/BackHandler': {
default: 'BackHandler',
types: ['BackPressEventName'],
},
'Libraries/Components/Clipboard/Clipboard': {
default: 'Clipboard',
types: null,
},
'Libraries/Utilities/DeviceInfo': {
default: 'DeviceInfo',
types: ['DeviceInfoConstants'],
},
'src/private/devsupport/devmenu/DevMenu': {
default: 'DevMenu',
types: null,
},
'Libraries/Utilities/DevSettings': {
default: 'DevSettings',
types: null,
},
'Libraries/Utilities/Dimensions': {
default: 'Dimensions',
types: [
'DimensionsPayload',
'DisplayMetrics',
'DisplayMetricsAndroid',
'ScaledSize',
],
},
'Libraries/Animated/Easing': {
default: 'Easing',
types: ['EasingFunction'],
},
'Libraries/ReactNative/I18nManager': {
default: 'I18nManager',
types: null,
},
'Libraries/Interaction/InteractionManager': {
default: 'InteractionManager',
types: ['Handle', 'PromiseTask', 'SimpleTask'],
},
'Libraries/Components/Keyboard/Keyboard': {
default: 'Keyboard',
types: [
'AndroidKeyboardEvent',
'IOSKeyboardEvent',
'KeyboardEvent',
'KeyboardEventEasing',
'KeyboardEventName',
'KeyboardMetrics',
],
},
'Libraries/LayoutAnimation/LayoutAnimation': {
default: 'LayoutAnimation',
types: [
'LayoutAnimationAnim',
'LayoutAnimationConfig',
'LayoutAnimationProperties',
'LayoutAnimationProperty',
'LayoutAnimationType',
'LayoutAnimationTypes',
],
},
'Libraries/Linking/Linking': {
default: 'Linking',
types: null,
},
'Libraries/LogBox/LogBox': {
default: 'LogBox',
types: ['ExtendedExceptionData', 'IgnorePattern', 'LogData'],
},
'Libraries/NativeModules/specs/NativeDialogManagerAndroid': {
default: 'NativeDialogManagerAndroid',
types: null,
},
'Libraries/EventEmitter/NativeEventEmitter': {
default: 'NativeEventEmitter',
types: [
'EventSubscription',
'EmitterSubscription',
'NativeEventSubscription',
],
},
'Libraries/Network/RCTNetworking': {
default: 'Networking',
types: null,
},
'Libraries/Interaction/PanResponder': {
default: 'PanResponder',
types: [
'PanResponderCallbacks',
'PanResponderGestureState',
'PanResponderInstance',
],
},
'Libraries/PermissionsAndroid/PermissionsAndroid': {
default: 'PermissionsAndroid',
types: ['Permission', 'PermissionStatus', 'Rationale'],
},
'Libraries/Utilities/PixelRatio': {
default: 'PixelRatio',
types: null,
},
'Libraries/PushNotificationIOS/PushNotificationIOS': {
default: 'PushNotificationIOS',
types: ['PushNotificationEventName', 'PushNotificationPermissions'],
},
'Libraries/Settings/Settings': {
default: 'Settings',
types: null,
},
'Libraries/Share/Share': {
default: 'Share',
types: ['ShareAction', 'ShareContent', 'ShareOptions'],
},
'Libraries/StyleSheet/StyleSheet': {
default: 'StyleSheet',
types: [
'ColorValue',
'ImageStyle',
'FilterFunction',
'FontVariant',
'NativeColorValue',
'OpaqueColorValue',
'StyleProp',
'TextStyle',
'TransformsStyle',
'ViewStyle',
],
},
'Libraries/StyleSheet/StyleSheetTypes': {
default: null,
types: [
'BoxShadowValue',
'CursorValue',
'DimensionValue',
'DropShadowValue',
'EdgeInsetsValue',
'PointValue',
],
},
'Libraries/StyleSheet/Rect': {
default: null,
types: ['Insets'],
},
'Libraries/Performance/Systrace': {
default: 'Systrace',
types: null,
},
'Libraries/Components/ToastAndroid/ToastAndroid': {
default: 'ToastAndroid',
types: null,
},
'Libraries/TurboModule/TurboModuleRegistry': {
default: 'TurboModuleRegistry',
types: null,
},
'Libraries/TurboModule/RCTExport': {
default: null,
types: ['TurboModule'],
},
'Libraries/ReactNative/UIManager': {
default: 'UIManager',
types: null,
},
'Libraries/Animated/useAnimatedValue': {
default: 'useAnimatedValue',
types: null,
},
'Libraries/Utilities/useColorScheme': {
default: 'useColorScheme',
types: null,
},
'src/private/specs_DEPRECATED/modules/NativeAppearance': {
default: null,
types: ['ColorSchemeName'],
},
'Libraries/Utilities/useWindowDimensions': {
default: 'useWindowDimensions',
types: null,
},
'Libraries/UTFSequence': {
default: 'UTFSequence',
types: null,
},
'Libraries/Vibration/Vibration': {
default: 'Vibration',
types: null,
},
'Libraries/Utilities/codegenNativeComponent': {
default: 'codegenNativeComponent',
types: null,
},
'Libraries/Utilities/codegenNativeCommands': {
default: 'codegenNativeCommands',
types: null,
},
'Libraries/EventEmitter/RCTDeviceEventEmitter': {
default: 'DeviceEventEmitter',
types: null,
},
'Libraries/StyleSheet/PlatformColorValueTypesIOS': {
default: 'DynamicColorIOS',
types: ['DynamicColorIOSTuple'],
},
'Libraries/EventEmitter/RCTNativeAppEventEmitter': {
default: 'NativeAppEventEmitter',
types: null,
},
'Libraries/BatchedBridge/NativeModules': {
default: 'NativeModules',
types: null,
},
'Libraries/Utilities/Platform': {
default: 'Platform',
types: null,
},
'./Libraries/Utilities/PlatformTypes': {
default: null,
types: ['PlatformOSType', 'PlatformSelectSpec'],
},
'Libraries/StyleSheet/PlatformColorValueTypes': {
default: 'PlatformColor',
types: null,
},
'Libraries/StyleSheet/processColor': {
default: 'processColor',
types: ['ProcessedColorValue'],
},
'Libraries/ReactNative/requireNativeComponent': {
default: 'requireNativeComponent',
types: null,
},
'Libraries/ReactNative/RootTag': {
default: 'RootTagContext',
types: ['RootTag'],
},
'Libraries/Types/RootTagTypes': {
default: null,
types: ['RootTag'],
},
'src/private/types/HostInstance': {
default: null,
types: [
'HostInstance',
'NativeMethods',
'NativeMethodsMixin',
'MeasureInWindowOnSuccessCallback',
'MeasureLayoutOnSuccessCallback',
'MeasureOnSuccessCallback',
],
},
'src/private/types/HostComponent': {
default: null,
types: ['HostComponent'],
},
'Libraries/vendor/core/ErrorUtils': {
default: null,
types: ['ErrorUtils'],
},
'Libraries/ReactPrivate/ReactNativePrivateInterface': {
default: null,
types: ['PublicRootInstance', 'PublicTextInstance'],
},
'Libraries/Components/AccessibilityInfo/AccessibilityInfo':
'AccessibilityInfo',
'Libraries/Components/ActivityIndicator/ActivityIndicator':
'ActivityIndicator',
'Libraries/Components/Button': 'Button',
'Libraries/Components/DrawerAndroid/DrawerLayoutAndroid':
'DrawerLayoutAndroid',
'Libraries/Components/LayoutConformance/LayoutConformance':
'experimental_LayoutConformance',
'Libraries/Lists/FlatList': 'FlatList',
'Libraries/Image/Image': 'Image',
'Libraries/Image/ImageBackground': 'ImageBackground',
'Libraries/Components/TextInput/InputAccessoryView': 'InputAccessoryView',
'Libraries/Components/Keyboard/KeyboardAvoidingView': 'KeyboardAvoidingView',
'Libraries/Modal/Modal': 'Modal',
'Libraries/Components/Pressable/Pressable': 'Pressable',
'Libraries/Components/ProgressBarAndroid/ProgressBarAndroid':
'ProgressBarAndroid',
'Libraries/Components/RefreshControl/RefreshControl': 'RefreshControl',
'Libraries/Components/SafeAreaView/SafeAreaView': 'SafeAreaView',
'Libraries/Components/ScrollView/ScrollView': 'ScrollView',
'Libraries/Lists/SectionList': 'SectionList',
'Libraries/Components/StatusBar/StatusBar': 'StatusBar',
'Libraries/Components/Switch/Switch': 'Switch',
'Libraries/Text/Text': 'Text',
'Libraries/Components/TextInput/TextInput': 'TextInput',
'Libraries/Components/Touchable/Touchable': 'Touchable',
'Libraries/Components/Touchable/TouchableHighlight': 'TouchableHighlight',
'Libraries/Components/Touchable/TouchableNativeFeedback':
'TouchableNativeFeedback',
'Libraries/Components/Touchable/TouchableOpacity': 'TouchableOpacity',
'Libraries/Components/Touchable/TouchableWithoutFeedback':
'TouchableWithoutFeedback',
'Libraries/Components/View/View': 'View',
'Libraries/Lists/VirtualizedList': 'VirtualizedList',
'Libraries/Lists/VirtualizedSectionList': 'VirtualizedSectionList',
'Libraries/ActionSheetIOS/ActionSheetIOS': 'ActionSheetIOS',
'Libraries/Alert/Alert': 'Alert',
'Libraries/Animated/Animated': 'Animated',
'Libraries/Utilities/Appearance': 'Appearance',
'Libraries/ReactNative/AppRegistry': 'AppRegistry',
'Libraries/AppState/AppState': 'AppState',
'Libraries/Utilities/BackHandler': 'BackHandler',
'Libraries/Components/Clipboard/Clipboard': 'Clipboard',
'Libraries/Utilities/DeviceInfo': 'DeviceInfo',
'src/private/devsupport/devmenu/DevMenu': 'DevMenu',
'Libraries/Utilities/DevSettings': 'DevSettings',
'Libraries/Utilities/Dimensions': 'Dimensions',
'Libraries/Animated/Easing': 'Easing',
'Libraries/ReactNative/I18nManager': 'I18nManager',
'Libraries/Interaction/InteractionManager': 'InteractionManager',
'Libraries/Components/Keyboard/Keyboard': 'Keyboard',
'Libraries/LayoutAnimation/LayoutAnimation': 'LayoutAnimation',
'Libraries/Linking/Linking': 'Linking',
'Libraries/LogBox/LogBox': 'LogBox',
'Libraries/NativeModules/specs/NativeDialogManagerAndroid':
'NativeDialogManagerAndroid',
'Libraries/EventEmitter/NativeEventEmitter': 'NativeEventEmitter',
'Libraries/Network/RCTNetworking': 'Networking',
'Libraries/Interaction/PanResponder': 'PanResponder',
'Libraries/PermissionsAndroid/PermissionsAndroid': 'PermissionsAndroid',
'Libraries/Utilities/PixelRatio': 'PixelRatio',
'Libraries/PushNotificationIOS/PushNotificationIOS': 'PushNotificationIOS',
'Libraries/Settings/Settings': 'Settings',
'Libraries/Share/Share': 'Share',
'Libraries/StyleSheet/StyleSheet': 'StyleSheet',
'Libraries/Performance/Systrace': 'Systrace',
'Libraries/Components/ToastAndroid/ToastAndroid': 'ToastAndroid',
'Libraries/TurboModule/TurboModuleRegistry': 'TurboModuleRegistry',
'Libraries/ReactNative/UIManager': 'UIManager',
'Libraries/Animated/useAnimatedValue': 'useAnimatedValue',
'Libraries/Utilities/useColorScheme': 'useColorScheme',
'Libraries/Utilities/useWindowDimensions': 'useWindowDimensions',
'Libraries/UTFSequence': 'UTFSequence',
'Libraries/Vibration/Vibration': 'Vibration',
'Libraries/Utilities/codegenNativeComponent': 'codegenNativeComponent',
'Libraries/Utilities/codegenNativeCommands': 'codegenNativeCommands',
'Libraries/EventEmitter/RCTDeviceEventEmitter': 'DeviceEventEmitter',
'Libraries/StyleSheet/PlatformColorValueTypesIOS': 'DynamicColorIOS',
'Libraries/EventEmitter/RCTNativeAppEventEmitter': 'NativeAppEventEmitter',
'Libraries/BatchedBridge/NativeModules': 'NativeModules',
'Libraries/Utilities/Platform': 'Platform',
'Libraries/StyleSheet/PlatformColorValueTypes': 'PlatformColor',
'Libraries/StyleSheet/processColor': 'processColor',
'Libraries/ReactNative/requireNativeComponent': 'requireNativeComponent',
'Libraries/ReactNative/RootTag': 'RootTagContext',
};
module.exports = {
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/eslint-plugin-specs",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "ESLint rules to validate NativeModule and Component Specs",
"license": "MIT",
"repository": {
@@ -26,14 +26,14 @@
"dependencies": {
"@babel/core": "^7.25.2",
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@react-native/codegen": "0.81.0-main",
"@react-native/codegen": "0.80.0-main",
"make-dir": "^2.1.0",
"pirates": "^4.0.1",
"source-map-support": "0.5.0"
},
"devDependencies": {
"babel-plugin-syntax-hermes-parser": "0.29.1",
"hermes-eslint": "0.29.1"
"babel-plugin-syntax-hermes-parser": "0.28.1",
"hermes-eslint": "0.28.1"
},
"engines": {
"node": ">= 22.14.0"
@@ -1,5 +1,5 @@
[versions]
agp = "8.11.0"
agp = "8.10.1"
gson = "2.8.9"
guava = "31.0.1-jre"
javapoet = "1.13.0"
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/gradle-plugin",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Gradle Plugin for React Native",
"license": "MIT",
"repository": {
@@ -70,7 +70,6 @@ abstract class GenerateEntryPointTask : DefaultTask() {
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
import com.facebook.react.views.view.WindowUtilKt;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
@@ -94,10 +93,6 @@ abstract class GenerateEntryPointTask : DefaultTask() {
if ({{packageName}}.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
DefaultNewArchitectureEntryPoint.load();
}
if ({{packageName}}.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
}
}
}
"""
@@ -11,7 +11,6 @@ import com.android.build.api.variant.ApplicationAndroidComponentsExtension
import com.android.build.api.variant.LibraryAndroidComponentsExtension
import com.android.build.gradle.LibraryExtension
import com.facebook.react.ReactExtension
import com.facebook.react.utils.ProjectUtils.isEdgeToEdgeEnabled
import com.facebook.react.utils.ProjectUtils.isHermesEnabled
import com.facebook.react.utils.ProjectUtils.isNewArchEnabled
import java.io.File
@@ -40,8 +39,6 @@ internal object AgpConfiguratorUtils {
project.isNewArchEnabled(extension).toString())
ext.defaultConfig.buildConfigField(
"boolean", "IS_HERMES_ENABLED", project.isHermesEnabled.toString())
ext.defaultConfig.buildConfigField(
"boolean", "IS_EDGE_TO_EDGE_ENABLED", project.isEdgeToEdgeEnabled.toString())
}
}
project.pluginManager.withPlugin("com.android.application", action)
@@ -8,14 +8,12 @@
package com.facebook.react.utils
import com.facebook.react.utils.PropertyUtils.DEFAULT_INTERNAL_PUBLISHING_GROUP
import com.facebook.react.utils.PropertyUtils.EXCLUSIVE_ENTEPRISE_REPOSITORY
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY
import com.facebook.react.utils.PropertyUtils.INCLUDE_JITPACK_REPOSITORY_DEFAULT
import com.facebook.react.utils.PropertyUtils.INTERNAL_PUBLISHING_GROUP
import com.facebook.react.utils.PropertyUtils.INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO
import com.facebook.react.utils.PropertyUtils.INTERNAL_USE_HERMES_NIGHTLY
import com.facebook.react.utils.PropertyUtils.INTERNAL_VERSION_NAME
import com.facebook.react.utils.PropertyUtils.SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY
import com.facebook.react.utils.PropertyUtils.SCOPED_INCLUDE_JITPACK_REPOSITORY
import java.io.File
import java.net.URI
@@ -30,12 +28,6 @@ internal object DependencyUtils {
* party libraries which are auto-linked.
*/
fun configureRepositories(project: Project) {
val exclusiveEnterpriseRepository = project.rootProject.exclusiveEnterpriseRepository()
if (exclusiveEnterpriseRepository != null) {
project.logger.lifecycle(
"Replacing ALL Maven Repositories with: $exclusiveEnterpriseRepository")
}
project.rootProject.allprojects { eachProject ->
with(eachProject) {
if (hasProperty(INTERNAL_REACT_NATIVE_MAVEN_LOCAL_REPO)) {
@@ -44,16 +36,6 @@ internal object DependencyUtils {
repo.content { it.excludeGroup("org.webkit") }
}
}
if (exclusiveEnterpriseRepository != null) {
// We remove all previously set repositories and only configure the proxy provided by the
// user.
rootProject.repositories.clear()
mavenRepoFromUrl(exclusiveEnterpriseRepository)
// We return here as we don't want to configure other repositories as well.
return@allprojects
}
// We add the snapshot for users on nightlies.
mavenRepoFromUrl("https://central.sonatype.com/repository/maven-snapshots/") { repo ->
repo.content { it.excludeGroup("org.webkit") }
@@ -199,13 +181,4 @@ internal object DependencyUtils {
property(INCLUDE_JITPACK_REPOSITORY).toString().toBoolean()
else -> INCLUDE_JITPACK_REPOSITORY_DEFAULT
}
internal fun Project.exclusiveEnterpriseRepository() =
when {
hasProperty(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
property(SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
hasProperty(EXCLUSIVE_ENTEPRISE_REPOSITORY) ->
property(EXCLUSIVE_ENTEPRISE_REPOSITORY).toString()
else -> null
}
}
@@ -11,11 +11,9 @@ import com.facebook.react.ReactExtension
import com.facebook.react.model.ModelPackageJson
import com.facebook.react.utils.KotlinStdlibCompatUtils.lowercaseCompat
import com.facebook.react.utils.KotlinStdlibCompatUtils.toBooleanStrictOrNullCompat
import com.facebook.react.utils.PropertyUtils.EDGE_TO_EDGE_ENABLED
import com.facebook.react.utils.PropertyUtils.HERMES_ENABLED
import com.facebook.react.utils.PropertyUtils.NEW_ARCH_ENABLED
import com.facebook.react.utils.PropertyUtils.REACT_NATIVE_ARCHITECTURES
import com.facebook.react.utils.PropertyUtils.SCOPED_EDGE_TO_EDGE_ENABLED
import com.facebook.react.utils.PropertyUtils.SCOPED_HERMES_ENABLED
import com.facebook.react.utils.PropertyUtils.SCOPED_NEW_ARCH_ENABLED
import com.facebook.react.utils.PropertyUtils.SCOPED_REACT_NATIVE_ARCHITECTURES
@@ -61,13 +59,6 @@ internal object ProjectUtils {
HERMES_FALLBACK
}
internal val Project.isEdgeToEdgeEnabled: Boolean
get() =
(project.hasProperty(EDGE_TO_EDGE_ENABLED) &&
project.property(EDGE_TO_EDGE_ENABLED).toString().toBoolean()) ||
(project.hasProperty(SCOPED_EDGE_TO_EDGE_ENABLED) &&
project.property(SCOPED_EDGE_TO_EDGE_ENABLED).toString().toBoolean())
internal val Project.useThirdPartyJSC: Boolean
get() =
(project.hasProperty(USE_THIRD_PARTY_JSC) &&
@@ -14,14 +14,10 @@ object PropertyUtils {
const val NEW_ARCH_ENABLED = "newArchEnabled"
const val SCOPED_NEW_ARCH_ENABLED = "react.newArchEnabled"
/** Public property that toggles Hermes */
/** Public property that toggles the New Architecture */
const val HERMES_ENABLED = "hermesEnabled"
const val SCOPED_HERMES_ENABLED = "react.hermesEnabled"
/** Public property that toggles edge-to-edge */
const val EDGE_TO_EDGE_ENABLED = "edgeToEdgeEnabled"
const val SCOPED_EDGE_TO_EDGE_ENABLED = "react.edgeToEdgeEnabled"
/** Public property that excludes jsctooling from core */
const val USE_THIRD_PARTY_JSC = "useThirdPartyJSC"
const val SCOPED_USE_THIRD_PARTY_JSC = "react.useThirdPartyJSC"
@@ -34,12 +30,6 @@ object PropertyUtils {
const val INCLUDE_JITPACK_REPOSITORY = "includeJitpackRepository"
const val SCOPED_INCLUDE_JITPACK_REPOSITORY = "react.includeJitpackRepository"
/**
* Public property that allows to configure an enterprise repository proxy as exclusive repository
*/
const val EXCLUSIVE_ENTEPRISE_REPOSITORY = "exclusiveEnterpriseRepository"
const val SCOPED_EXCLUSIVE_ENTEPRISE_REPOSITORY = "react.exclusiveEnterpriseRepository"
/** By default we include JitPack to avoid breaking user builds */
internal const val INCLUDE_JITPACK_REPOSITORY_DEFAULT = true
@@ -55,7 +55,6 @@ class GenerateEntryPointTaskTest {
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint;
import com.facebook.react.common.annotations.internal.LegacyArchitectureLogger;
import com.facebook.react.views.view.WindowUtilKt;
import com.facebook.react.soloader.OpenSourceMergedSoMapping;
import com.facebook.soloader.SoLoader;
@@ -79,10 +78,6 @@ class GenerateEntryPointTaskTest {
if (com.facebook.react.BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
DefaultNewArchitectureEntryPoint.load();
}
if (com.facebook.react.BuildConfig.IS_EDGE_TO_EDGE_ENABLED) {
WindowUtilKt.setEdgeToEdgeFeatureFlagOn();
}
}
}
"""
@@ -10,7 +10,6 @@ package com.facebook.react.utils
import com.facebook.react.tests.createProject
import com.facebook.react.utils.DependencyUtils.configureDependencies
import com.facebook.react.utils.DependencyUtils.configureRepositories
import com.facebook.react.utils.DependencyUtils.exclusiveEnterpriseRepository
import com.facebook.react.utils.DependencyUtils.getDependencySubstitutions
import com.facebook.react.utils.DependencyUtils.mavenRepoFromURI
import com.facebook.react.utils.DependencyUtils.mavenRepoFromUrl
@@ -100,24 +99,6 @@ class DependencyUtilsTest {
.isNotNull()
}
@Test
fun configureRepositories_withExclusiveEnterpriseRepository_replacesAllRepositories() {
val repositoryURI = URI.create("https://maven.myfabolousorganization.it")
val project = createProject()
project.rootProject.extensions.extraProperties.set(
"exclusiveEnterpriseRepository", repositoryURI.toString())
configureRepositories(project)
assertThat(project.repositories).hasSize(1)
assertThat(
project.repositories.firstOrNull {
it is MavenArtifactRepository && it.url == repositoryURI
})
.isNotNull()
}
@Test
fun configureRepositories_withIncludeJitpackRepositoryFalse_doesNotContainJitPack() {
val repositoryURI = URI.create("https://www.jitpack.io")
@@ -489,7 +470,7 @@ class DependencyUtilsTest {
@Test
fun shouldAddJitPack_withUnscopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set("includeJitpackRepository", "false")
project.extensions.extraProperties.set("react.includeJitpackRepository", "false")
assertThat(project.shouldAddJitPack()).isFalse()
}
@@ -498,28 +479,4 @@ class DependencyUtilsTest {
val project = createProject(tempFolder.root)
assertThat(project.shouldAddJitPack()).isTrue()
}
@Test
fun exclusiveEnterpriseRepository_withScopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set(
"react.exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
assertThat(project.exclusiveEnterpriseRepository())
.isEqualTo("https://maven.myfabolousorganization.it")
}
@Test
fun exclusiveEnterpriseRepository_withUnscopedProperty() {
val project = createProject(tempFolder.root)
project.extensions.extraProperties.set(
"exclusiveEnterpriseRepository", "https://maven.myfabolousorganization.it")
assertThat(project.exclusiveEnterpriseRepository())
.isEqualTo("https://maven.myfabolousorganization.it")
}
@Test
fun exclusiveEnterpriseRepository_defaultIsTrue() {
val project = createProject(tempFolder.root)
assertThat(project.exclusiveEnterpriseRepository()).isNull()
}
}
@@ -12,7 +12,6 @@ import com.facebook.react.model.ModelCodegenConfig
import com.facebook.react.model.ModelPackageJson
import com.facebook.react.tests.createProject
import com.facebook.react.utils.ProjectUtils.getReactNativeArchitectures
import com.facebook.react.utils.ProjectUtils.isEdgeToEdgeEnabled
import com.facebook.react.utils.ProjectUtils.isHermesEnabled
import com.facebook.react.utils.ProjectUtils.isNewArchEnabled
import com.facebook.react.utils.ProjectUtils.needsCodegenFromPackageJson
@@ -99,7 +98,7 @@ class ProjectUtilsTest {
}
@Test
fun isHermesEnabled_withDisabledViaProperty_returnsFalse() {
fun isNewArchEnabled_withDisabledViaProperty_returnsFalse() {
val project = createProject()
project.extensions.extraProperties.set("hermesEnabled", "false")
assertThat(project.isHermesEnabled).isFalse()
@@ -151,32 +150,6 @@ class ProjectUtilsTest {
assertThat(project.isHermesEnabled).isTrue()
}
@Test
fun isEdgeToEdgeEnabled_returnsFalseByDefault() {
assertThat(createProject().isEdgeToEdgeEnabled).isFalse()
}
@Test
fun isEdgeToEdgeEnabled_withDisabledViaProperty_returnsFalse() {
val project = createProject()
project.extensions.extraProperties.set("edgeToEdgeEnabled", "false")
assertThat(project.isEdgeToEdgeEnabled).isFalse()
}
@Test
fun isEdgeToEdgeEnabled_withEnabledViaProperty_returnsTrue() {
val project = createProject()
project.extensions.extraProperties.set("edgeToEdgeEnabled", "true")
assertThat(project.isEdgeToEdgeEnabled).isTrue()
}
@Test
fun isEdgeToEdgeEnabled_withInvalidViaProperty_returnsFalse() {
val project = createProject()
project.extensions.extraProperties.set("edgeToEdgeEnabled", "¯\\_(ツ)_/¯")
assertThat(project.isEdgeToEdgeEnabled).isFalse()
}
@Test
fun needsCodegenFromPackageJson_withCodegenConfigInPackageJson_returnsTrue() {
val project = createProject()
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-config",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Metro configuration for React Native.",
"license": "MIT",
"repository": {
@@ -26,8 +26,8 @@
"dist"
],
"dependencies": {
"@react-native/js-polyfills": "0.81.0-main",
"@react-native/metro-babel-transformer": "0.81.0-main",
"@react-native/js-polyfills": "0.80.0-main",
"@react-native/metro-babel-transformer": "0.80.0-main",
"metro-config": "^0.82.4",
"metro-runtime": "^0.82.4"
}
+1 -1
View File
@@ -43,7 +43,7 @@ const INTERNAL_CALLSITES_REGEX = new RegExp(
export {mergeConfig} from 'metro-config';
let frameworkDefaults: InputConfigT = {};
let frameworkDefaults = {};
export function setFrameworkDefaults(config: InputConfigT) {
frameworkDefaults = config;
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/new-app-screen",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "NewAppScreen component for React Native",
"keywords": [
"react-native"
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/normalize-colors",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Color normalization for React Native.",
"license": "MIT",
"repository": {
@@ -0,0 +1,277 @@
/**
* 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.
*
* @flow strict-local
* @format
*/
const LOG_LEVELS = {
trace: 0,
info: 1,
warn: 2,
error: 3,
};
describe('console', () => {
describe('.table(data, rows)', () => {
let originalNativeLoggingHook;
let logFn;
beforeEach(() => {
originalNativeLoggingHook = global.nativeLoggingHook;
logFn = global.nativeLoggingHook = jest.fn();
});
afterEach(() => {
global.nativeLoggingHook = originalNativeLoggingHook;
});
it('should print the passed array as a Markdown table', () => {
console.table([
{name: 'First', value: 500},
{name: 'Second', value: 600},
{name: 'Third', value: 700},
{name: 'Fourth', value: 800, extraValue: true},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | extraValue |
| ------- | -------- | ----- | ---------- |
| 0 | 'First' | 500 | |
| 1 | 'Second' | 600 | |
| 2 | 'Third' | 700 | |
| 3 | 'Fourth' | 800 | true |`,
LOG_LEVELS.info,
]);
});
it('should print the passed dictionary as a Markdown table', () => {
console.table({
first: {name: 'First', value: 500},
second: {name: 'Second', value: 600},
third: {name: 'Third', value: 700},
fourth: {name: 'Fourth', value: 800, extraValue: true},
});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | extraValue |
| ------- | -------- | ----- | ---------- |
| first | 'First' | 500 | |
| second | 'Second' | 600 | |
| third | 'Third' | 700 | |
| fourth | 'Fourth' | 800 | true |`,
LOG_LEVELS.info,
]);
});
it('should work with different types of values', () => {
console.table([
{
string: '',
number: 0,
boolean: true,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'a',
number: 1,
boolean: true,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'aa',
number: 2,
boolean: false,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'aaa',
number: 3,
boolean: false,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | string | number | boolean | function | object | null | undefined |
| ------- | ------ | ------ | ------- | -------- | ------ | ---- | --------- |
| 0 | '' | 0 | true | ƒ | {} | null | undefined |
| 1 | 'a' | 1 | true | ƒ | {} | null | undefined |
| 2 | 'aa' | 2 | false | ƒ | {} | null | undefined |
| 3 | 'aaa' | 3 | false | ƒ | {} | null | undefined |`,
LOG_LEVELS.info,
]);
});
it('should print the keys in all the objects', () => {
console.table([
{name: 'foo'},
{name: 'bar', value: 1},
{value: 2, surname: 'baz'},
{address: 'other'},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | surname | address |
| ------- | ----- | ----- | ------- | ------- |
| 0 | 'foo' | | | |
| 1 | 'bar' | 1 | | |
| 2 | | 2 | 'baz' | |
| 3 | | | | 'other' |`,
LOG_LEVELS.info,
]);
});
it('should print an empty string for empty arrays', () => {
console.table([]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
});
it('should print an empty string for empty dictionaries', () => {
console.table({});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
});
// This test is currently failing
it('should print an indices table for an array of empty objects', () => {
console.table([{}, {}, {}, {}]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) |
| ------- |
| 0 |
| 1 |
| 2 |
| 3 |`,
LOG_LEVELS.info,
]);
});
it('should print an indices table for a dictionary of empty objects', () => {
console.table({
first: {},
second: {},
third: {},
fourth: {},
});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) |
| ------- |
| first |
| second |
| third |
| fourth |`,
LOG_LEVELS.info,
]);
});
it('should not modify the logged value', () => {
global.nativeLoggingHook = jest.fn();
const array = [
{name: 'First', value: 500},
{name: 'Second', value: 600},
{name: 'Third', value: 700},
{name: 'Fourth', value: 800, extraValue: true},
];
const originalArrayValue = JSON.parse(JSON.stringify(array));
console.table(array);
expect(array).toEqual(originalArrayValue);
const object = {
first: {name: 'First', value: 500},
second: {name: 'Second', value: 600},
third: {name: 'Third', value: 700},
fourth: {name: 'Fourth', value: 800, extraValue: true},
};
const originalObjectValue = JSON.parse(JSON.stringify(object));
console.table(object);
expect(object).toEqual(originalObjectValue);
});
it('should only print the selected columns, if specified (arrays)', () => {
console.table(
[
{first: 1, second: 2, third: 3},
{first: 4, second: 5},
{third: 7, fourth: 8},
{fifth: 9},
],
// $FlowExpectedError[extra-arg]
['first', 'fifth'],
);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | first | fifth |
| ------- | ----- | ----- |
| 0 | 1 | |
| 1 | 4 | |
| 2 | | |
| 3 | | 9 |`,
LOG_LEVELS.info,
]);
});
it('should only print the selected columns, if specified (dictionaries)', () => {
console.table(
{
a: {first: 1, second: 2, third: 3},
b: {first: 4, second: 5},
c: {third: 7, fourth: 8},
d: {fifth: 9},
},
// $FlowExpectedError[extra-arg]
['first', 'fifth'],
);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | first | fifth |
| ------- | ----- | ----- |
| a | 1 | |
| b | 4 | |
| c | | |
| d | | 9 |`,
LOG_LEVELS.info,
]);
});
});
});
@@ -1,275 +0,0 @@
/**
* 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.
*
* @flow strict-local
* @format
*/
const LOG_LEVELS = {
trace: 0,
info: 1,
warn: 2,
error: 3,
};
describe('console.table(data, rows)', () => {
let originalNativeLoggingHook;
let logFn;
beforeEach(() => {
originalNativeLoggingHook = global.nativeLoggingHook;
logFn = global.nativeLoggingHook = jest.fn();
});
afterEach(() => {
global.nativeLoggingHook = originalNativeLoggingHook;
});
it('should print the passed array as a Markdown table', () => {
console.table([
{name: 'First', value: 500},
{name: 'Second', value: 600},
{name: 'Third', value: 700},
{name: 'Fourth', value: 800, extraValue: true},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | extraValue |
| ------- | -------- | ----- | ---------- |
| 0 | 'First' | 500 | |
| 1 | 'Second' | 600 | |
| 2 | 'Third' | 700 | |
| 3 | 'Fourth' | 800 | true |`,
LOG_LEVELS.info,
]);
});
it('should print the passed dictionary as a Markdown table', () => {
console.table({
first: {name: 'First', value: 500},
second: {name: 'Second', value: 600},
third: {name: 'Third', value: 700},
fourth: {name: 'Fourth', value: 800, extraValue: true},
});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | extraValue |
| ------- | -------- | ----- | ---------- |
| first | 'First' | 500 | |
| second | 'Second' | 600 | |
| third | 'Third' | 700 | |
| fourth | 'Fourth' | 800 | true |`,
LOG_LEVELS.info,
]);
});
it('should work with different types of values', () => {
console.table([
{
string: '',
number: 0,
boolean: true,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'a',
number: 1,
boolean: true,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'aa',
number: 2,
boolean: false,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
{
string: 'aaa',
number: 3,
boolean: false,
function: () => {},
object: {a: 1, b: 2},
null: null,
undefined: undefined,
},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | string | number | boolean | function | object | null | undefined |
| ------- | ------ | ------ | ------- | -------- | ------ | ---- | --------- |
| 0 | '' | 0 | true | ƒ | {} | null | undefined |
| 1 | 'a' | 1 | true | ƒ | {} | null | undefined |
| 2 | 'aa' | 2 | false | ƒ | {} | null | undefined |
| 3 | 'aaa' | 3 | false | ƒ | {} | null | undefined |`,
LOG_LEVELS.info,
]);
});
it('should print the keys in all the objects', () => {
console.table([
{name: 'foo'},
{name: 'bar', value: 1},
{value: 2, surname: 'baz'},
{address: 'other'},
]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | name | value | surname | address |
| ------- | ----- | ----- | ------- | ------- |
| 0 | 'foo' | | | |
| 1 | 'bar' | 1 | | |
| 2 | | 2 | 'baz' | |
| 3 | | | | 'other' |`,
LOG_LEVELS.info,
]);
});
it('should print an empty string for empty arrays', () => {
console.table([]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
});
it('should print an empty string for empty dictionaries', () => {
console.table({});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([``, LOG_LEVELS.info]);
});
// This test is currently failing
it('should print an indices table for an array of empty objects', () => {
console.table([{}, {}, {}, {}]);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) |
| ------- |
| 0 |
| 1 |
| 2 |
| 3 |`,
LOG_LEVELS.info,
]);
});
it('should print an indices table for a dictionary of empty objects', () => {
console.table({
first: {},
second: {},
third: {},
fourth: {},
});
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) |
| ------- |
| first |
| second |
| third |
| fourth |`,
LOG_LEVELS.info,
]);
});
it('should not modify the logged value', () => {
global.nativeLoggingHook = jest.fn();
const array = [
{name: 'First', value: 500},
{name: 'Second', value: 600},
{name: 'Third', value: 700},
{name: 'Fourth', value: 800, extraValue: true},
];
const originalArrayValue = JSON.parse(JSON.stringify(array));
console.table(array);
expect(array).toEqual(originalArrayValue);
const object = {
first: {name: 'First', value: 500},
second: {name: 'Second', value: 600},
third: {name: 'Third', value: 700},
fourth: {name: 'Fourth', value: 800, extraValue: true},
};
const originalObjectValue = JSON.parse(JSON.stringify(object));
console.table(object);
expect(object).toEqual(originalObjectValue);
});
it('should only print the selected columns, if specified (arrays)', () => {
console.table(
[
{first: 1, second: 2, third: 3},
{first: 4, second: 5},
{third: 7, fourth: 8},
{fifth: 9},
],
// $FlowExpectedError[extra-arg]
['first', 'fifth'],
);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | first | fifth |
| ------- | ----- | ----- |
| 0 | 1 | |
| 1 | 4 | |
| 2 | | |
| 3 | | 9 |`,
LOG_LEVELS.info,
]);
});
it('should only print the selected columns, if specified (dictionaries)', () => {
console.table(
{
a: {first: 1, second: 2, third: 3},
b: {first: 4, second: 5},
c: {third: 7, fourth: 8},
d: {fifth: 9},
},
// $FlowExpectedError[extra-arg]
['first', 'fifth'],
);
expect(logFn).toHaveBeenCalledTimes(1);
expect(logFn.mock.lastCall).toEqual([
`
| (index) | first | fifth |
| ------- | ----- | ----- |
| a | 1 | |
| b | 4 | |
| c | | |
| d | | 9 |`,
LOG_LEVELS.info,
]);
});
});
@@ -1,41 +0,0 @@
/**
* 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.
*
* @flow strict-local
* @format
* @fantom_mode *
* @fantom_flags fuseboxEnabledRelease:*
*/
describe('console.timeStamp()', () => {
it('installed', () => {
expect(typeof console.timeStamp).toBe('function');
});
it("doesn't throw when label is not specified", () => {
expect(() => console.timeStamp()).not.toThrow();
});
it("doesn't throw when label is specified", () => {
expect(() => console.timeStamp('label')).not.toThrow();
});
it("doesn't throw when additional arguments are specified", () => {
expect(() =>
// $FlowExpectedError[extra-arg]
console.timeStamp('label', 100, 500, 'Track', 'Group', 'error'),
).not.toThrow();
});
it("doesn't throw when invalid arguments are specified", () => {
// $FlowExpectedError[incompatible-call]
expect(() => console.timeStamp({})).not.toThrow();
expect(() =>
// $FlowExpectedError[extra-arg]
console.timeStamp('label', true, null, {}, [], () => {}),
).not.toThrow();
});
});
-7
View File
@@ -569,11 +569,6 @@ function consoleAssertPolyfill(expression, label) {
}
}
// https://developer.mozilla.org/en-US/docs/Web/API/console/timeStamp_static.
// Non-standard API for recording markers on a timeline of the Performance instrumentation.
// The actual logging is not provided by definition.
function consoleTimeStampPolyfill() {}
if (global.nativeLoggingHook) {
const originalConsole = global.console;
// Preserve the original `console` as `originalConsole`
@@ -585,7 +580,6 @@ if (global.nativeLoggingHook) {
}
global.console = {
timeStamp: consoleTimeStampPolyfill,
...(originalConsole ?? {}),
error: getNativeLogFunction(LOG_LEVELS.error),
info: getNativeLogFunction(LOG_LEVELS.info),
@@ -700,7 +694,6 @@ if (global.nativeLoggingHook) {
profile: stub,
profileEnd: stub,
table: stub,
timeStamp: stub,
};
Object.defineProperty(console, '_isPolyfilled', {
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/js-polyfills",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Polyfills for React Native.",
"license": "MIT",
"repository": {
@@ -1,6 +1,6 @@
{
"name": "@react-native/babel-preset",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Babel preset for React Native applications",
"repository": {
"type": "git",
@@ -66,8 +66,8 @@
"@babel/plugin-transform-typescript": "^7.25.2",
"@babel/plugin-transform-unicode-regex": "^7.24.7",
"@babel/template": "^7.25.0",
"@react-native/babel-plugin-codegen": "0.81.0-main",
"babel-plugin-syntax-hermes-parser": "0.29.1",
"@react-native/babel-plugin-codegen": "0.80.0-main",
"babel-plugin-syntax-hermes-parser": "0.28.1",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.14.0"
},
@@ -1,6 +1,6 @@
{
"name": "@react-native/metro-babel-transformer",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Babel transformer for React Native applications.",
"repository": {
"type": "git",
@@ -27,8 +27,8 @@
],
"dependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.81.0-main",
"hermes-parser": "0.29.1",
"@react-native/babel-preset": "0.80.0-main",
"hermes-parser": "0.28.1",
"nullthrows": "^1.1.1"
},
"peerDependencies": {
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps(
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ArrayPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ArrayPropsNativeComponentView\\";
}
folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ArrayPropsNativeComponentViewProps();
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (names != oldProps->names) {
result[\\"names\\"] = toDynamic(names);
}
if (disableds != oldProps->disableds) {
result[\\"disableds\\"] = toDynamic(disableds);
}
if (progress != oldProps->progress) {
result[\\"progress\\"] = toDynamic(progress);
}
if (radii != oldProps->radii) {
result[\\"radii\\"] = toDynamic(radii);
}
if (colors != oldProps->colors) {
result[\\"colors\\"] = toDynamic(colors);
}
if (srcs != oldProps->srcs) {
result[\\"srcs\\"] = toDynamic(srcs);
}
if (points != oldProps->points) {
result[\\"points\\"] = toDynamic(points);
}
if (edgeInsets != oldProps->edgeInsets) {
result[\\"edgeInsets\\"] = toDynamic(edgeInsets);
}
if (dimensions != oldProps->dimensions) {
result[\\"dimensions\\"] = toDynamic(dimensions);
}
if (sizes != oldProps->sizes) {
result[\\"sizes\\"] = toDynamic(sizes);
}
if (object != oldProps->object) {
result[\\"object\\"] = toDynamic(object);
}
if (arrayOfObjects != oldProps->arrayOfObjects) {
result[\\"arrayOfObjects\\"] = toDynamic(arrayOfObjects);
}
if (arrayOfMixed != oldProps->arrayOfMixed) {
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
}
return result;
}
#endif
@@ -142,10 +99,6 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps(
disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName BooleanPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"BooleanPropNativeComponentView\\";
}
folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = BooleanPropNativeComponentViewProps();
@@ -199,10 +152,6 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps(
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ColorPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ColorPropNativeComponentView\\";
}
folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ColorPropNativeComponentViewProps();
@@ -253,10 +202,6 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps(
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName DimensionPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"DimensionPropNativeComponentView\\";
}
folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = DimensionPropNativeComponentViewProps();
@@ -268,9 +213,6 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (marginBack != oldProps->marginBack) {
result[\\"marginBack\\"] = toDynamic(marginBack);
}
return result;
}
#endif
@@ -306,10 +248,6 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EdgeInsetsPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EdgeInsetsPropNativeComponentView\\";
}
folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EdgeInsetsPropNativeComponentViewProps();
@@ -357,10 +295,6 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps(
intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EnumPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EnumPropNativeComponentView\\";
}
folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EnumPropNativeComponentViewProps();
@@ -372,13 +306,7 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (alignment != oldProps->alignment) {
result[\\"alignment\\"] = toDynamic(alignment);
}
if (intervals != oldProps->intervals) {
result[\\"intervals\\"] = toDynamic(intervals);
}
return result;
}
#endif
@@ -414,10 +342,6 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventNestedObjectPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EventNestedObjectPropsNativeComponentView\\";
}
folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventNestedObjectPropsNativeComponentViewProps();
@@ -467,10 +391,6 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EventPropsNativeComponentView\\";
}
folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventPropsNativeComponentViewProps();
@@ -526,10 +446,6 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps(
blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName FloatPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"FloatPropsNativeComponentView\\";
}
folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = FloatPropsNativeComponentViewProps();
@@ -604,10 +520,6 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps(
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ImagePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ImagePropNativeComponentView\\";
}
folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ImagePropNativeComponentViewProps();
@@ -620,7 +532,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
return result;
}
@@ -659,10 +571,6 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps(
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName IntegerPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"IntegerPropNativeComponentView\\";
}
folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = IntegerPropNativeComponentViewProps();
@@ -720,10 +628,6 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName InterfaceOnlyNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"InterfaceOnlyNativeComponentView\\";
}
folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = InterfaceOnlyNativeComponentViewProps();
@@ -774,10 +678,6 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps(
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MixedPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"MixedPropNativeComponentView\\";
}
folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MixedPropNativeComponentViewProps();
@@ -789,9 +689,6 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (mixedProp != oldProps->mixedProp) {
result[\\"mixedProp\\"] = mixedProp;
}
return result;
}
#endif
@@ -831,10 +728,6 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiNativePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"MultiNativePropNativeComponentView\\";
}
folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiNativePropNativeComponentViewProps();
@@ -847,7 +740,7 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
if (color != oldProps->color) {
@@ -859,7 +752,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
}
if (point != oldProps->point) {
result[\\"point\\"] = toDynamic(point);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = point.x;
pointResult[\\"y\\"] = point.y;
result[\\"point\\"] = pointResult;
}
return result;
}
@@ -896,10 +792,6 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName NoPropsNoEventsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"NoPropsNoEventsNativeComponentView\\";
}
folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = NoPropsNoEventsNativeComponentViewProps();
@@ -949,10 +841,6 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps(
objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ObjectPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ObjectPropsNativeComponent\\";
}
folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ObjectPropsNativeComponentProps();
@@ -964,17 +852,8 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (objectProp != oldProps->objectProp) {
result[\\"objectProp\\"] = toDynamic(objectProp);
}
if (objectArrayProp != oldProps->objectArrayProp) {
result[\\"objectArrayProp\\"] = toDynamic(objectArrayProp);
}
if (objectPrimitiveRequiredProp != oldProps->objectPrimitiveRequiredProp) {
result[\\"objectPrimitiveRequiredProp\\"] = toDynamic(objectPrimitiveRequiredProp);
}
return result;
}
#endif
@@ -1010,10 +889,6 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps(
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName PointPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"PointPropNativeComponentView\\";
}
folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = PointPropNativeComponentViewProps();
@@ -1026,7 +901,10 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (startPoint != oldProps->startPoint) {
result[\\"startPoint\\"] = toDynamic(startPoint);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = startPoint.x;
pointResult[\\"y\\"] = startPoint.y;
result[\\"startPoint\\"] = pointResult;
}
return result;
}
@@ -1064,10 +942,6 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps(
defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName StringPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"StringPropNativeComponentView\\";
}
folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = StringPropNativeComponentViewProps();
@@ -16,7 +16,6 @@ Object {
#include <cinttypes>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Point.h>
@@ -88,16 +87,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewSizesMaskW
}
struct ArrayPropsNativeComponentViewObjectStruct {
std::string prop{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentViewObjectStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"prop\\"] = prop;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) {
@@ -113,12 +102,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewObjectStru
return \\"[Object ArrayPropsNativeComponentViewObjectStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewObjectStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewObjectStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -132,17 +115,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ArrayPropsNativeComponentViewArrayOfObjectsStruct {
Float prop1{0.0};
int prop2{0};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentViewArrayOfObjectsStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"prop1\\"] = prop1;
result[\\"prop2\\"] = prop2;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewArrayOfObjectsStruct &result) {
@@ -162,12 +134,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewArrayOfObj
return \\"[Object ArrayPropsNativeComponentViewArrayOfObjectsStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewArrayOfObjectsStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewArrayOfObjectsStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -199,8 +165,6 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps {
std::vector<folly::dynamic> arrayOfMixed{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -239,8 +203,6 @@ class BooleanPropNativeComponentViewProps final : public ViewProps {
bool disabledNullable{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -279,8 +241,6 @@ class ColorPropNativeComponentViewProps final : public ViewProps {
SharedColor tintColor{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -305,7 +265,6 @@ Object {
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <yoga/Yoga.h>
namespace facebook::react {
@@ -320,8 +279,6 @@ class DimensionPropNativeComponentViewProps final : public ViewProps {
YGValue marginBack{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -359,8 +316,6 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -405,12 +360,6 @@ static inline std::string toString(const EnumPropNativeComponentViewAlignment &v
case EnumPropNativeComponentViewAlignment::BottomRight: return \\"bottom-right\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewAlignment &value) {
return toString(value);
}
#endif
enum class EnumPropNativeComponentViewIntervals { Intervals0 = 0, Intervals15 = 15, Intervals30 = 30, Intervals60 = 60 };
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewIntervals &result) {
@@ -442,17 +391,6 @@ static inline std::string toString(const EnumPropNativeComponentViewIntervals &v
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewIntervals &value) {
switch (value) {
case EnumPropNativeComponentViewIntervals::Intervals0: return 0;
case EnumPropNativeComponentViewIntervals::Intervals15: return 15;
case EnumPropNativeComponentViewIntervals::Intervals30: return 30;
case EnumPropNativeComponentViewIntervals::Intervals60: return 60;
}
}
#endif
class EnumPropNativeComponentViewProps final : public ViewProps {
public:
EnumPropNativeComponentViewProps() = default;
@@ -464,8 +402,6 @@ class EnumPropNativeComponentViewProps final : public ViewProps {
EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -503,8 +439,6 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -542,8 +476,6 @@ class EventPropsNativeComponentViewProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -587,8 +519,6 @@ class FloatPropsNativeComponentViewProps final : public ViewProps {
Float blurRadiusNullable{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -627,8 +557,6 @@ class ImagePropNativeComponentViewProps final : public ViewProps {
ImageSource thumbImage{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -668,8 +596,6 @@ class IntegerPropNativeComponentViewProps final : public ViewProps {
int progress3{10};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -707,8 +633,6 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps {
std::string title{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -746,8 +670,6 @@ class MixedPropNativeComponentViewProps final : public ViewProps {
folly::dynamic mixedProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -791,8 +713,6 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps {
Point point{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -830,8 +750,6 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -880,12 +798,6 @@ static inline std::string toString(const ObjectPropsNativeComponentStringEnumPro
case ObjectPropsNativeComponentStringEnumProp::Large: return \\"large\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentStringEnumProp &value) {
return toString(value);
}
#endif
enum class ObjectPropsNativeComponentIntEnumProp { IntEnumProp0 = 0, IntEnumProp1 = 1 };
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentIntEnumProp &result) {
@@ -908,15 +820,6 @@ static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp &
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return \\"1\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentIntEnumProp &value) {
switch (value) {
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp0: return 0;
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return 1;
}
}
#endif
struct ObjectPropsNativeComponentObjectPropStruct {
std::string stringProp{\\"\\"};
bool booleanProp{false};
@@ -924,21 +827,6 @@ struct ObjectPropsNativeComponentObjectPropStruct {
int intProp{0};
ObjectPropsNativeComponentStringEnumProp stringEnumProp{ObjectPropsNativeComponentStringEnumProp::Small};
ObjectPropsNativeComponentIntEnumProp intEnumProp{ObjectPropsNativeComponentIntEnumProp::IntEnumProp0};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
result[\\"booleanProp\\"] = booleanProp;
result[\\"floatProp\\"] = floatProp;
result[\\"intProp\\"] = intProp;
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) {
@@ -974,24 +862,8 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectPropStr
return \\"[Object ObjectPropsNativeComponentObjectPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsNativeComponentObjectArrayPropStruct {
std::vector<std::string> array{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectArrayPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"array\\"] = ::facebook::react::toDynamic(array);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) {
@@ -1007,28 +879,10 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPr
return \\"[Object ObjectPropsNativeComponentObjectArrayPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectArrayPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct {
ImageSource image{};
SharedColor color{};
Point point{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"image\\"] = ::facebook::react::toDynamic(image);
result[\\"color\\"] = ::facebook::react::toDynamic(color);
result[\\"point\\"] = ::facebook::react::toDynamic(point);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) {
@@ -1051,12 +905,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
static inline std::string toString(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
return \\"[Object ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
return value.toDynamic();
}
#endif
class ObjectPropsNativeComponentProps final : public ViewProps {
public:
ObjectPropsNativeComponentProps() = default;
@@ -1069,8 +917,6 @@ class ObjectPropsNativeComponentProps final : public ViewProps {
ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1109,8 +955,6 @@ class PointPropNativeComponentViewProps final : public ViewProps {
Point startPoint{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1149,8 +993,6 @@ class StringPropNativeComponentViewProps final : public ViewProps {
std::string defaultValue{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -2,7 +2,7 @@
exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -11,26 +11,27 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setNames(view: T, value: ReadableArray?): Unit
public fun setDisableds(view: T, value: ReadableArray?): Unit
public fun setProgress(view: T, value: ReadableArray?): Unit
public fun setRadii(view: T, value: ReadableArray?): Unit
public fun setColors(view: T, value: ReadableArray?): Unit
public fun setSrcs(view: T, value: ReadableArray?): Unit
public fun setPoints(view: T, value: ReadableArray?): Unit
public fun setEdgeInsets(view: T, value: ReadableArray?): Unit
public fun setDimensions(view: T, value: ReadableArray?): Unit
public fun setSizes(view: T, value: ReadableArray?): Unit
public fun setObject(view: T, value: ReadableArray?): Unit
public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
public interface ArrayPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setNames(T view, @Nullable ReadableArray value);
void setDisableds(T view, @Nullable ReadableArray value);
void setProgress(T view, @Nullable ReadableArray value);
void setRadii(T view, @Nullable ReadableArray value);
void setColors(T view, @Nullable ReadableArray value);
void setSrcs(T view, @Nullable ReadableArray value);
void setPoints(T view, @Nullable ReadableArray value);
void setEdgeInsets(T view, @Nullable ReadableArray value);
void setDimensions(T view, @Nullable ReadableArray value);
void setSizes(T view, @Nullable ReadableArray value);
void setObject(T view, @Nullable ReadableArray value);
void setArrayOfObjects(T view, @Nullable ReadableArray value);
void setArrayOfMixed(T view, @Nullable ReadableArray value);
}
",
}
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -47,14 +48,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public fun setDisabledNullable(view: T, value: Boolean?): Unit
public interface BooleanPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
void setDisabledNullable(T view, @Nullable Boolean value);
}
",
}
@@ -62,7 +64,7 @@ public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewMa
exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -71,13 +73,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setTintColor(view: T, value: Int?): Unit
public interface ColorPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setTintColor(T view, @Nullable Integer value);
}
",
}
@@ -85,7 +88,7 @@ public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -94,14 +97,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
import com.facebook.yoga.YogaValue;
public interface DimensionPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMarginBack(view: T, value: YogaValue?): Unit
public interface DimensionPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMarginBack(T view, @Nullable YogaValue value);
}
",
}
@@ -109,7 +113,7 @@ public interface DimensionPropNativeComponentViewManagerInterface<T: View>: View
exports[`GeneratePropsJavaInterface can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -118,12 +122,12 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -132,7 +136,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: Vie
exports[`GeneratePropsJavaInterface can generate for 'EnumPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -141,14 +145,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAlignment(view: T, value: String?): Unit
public fun setIntervals(view: T, value: Int?): Unit
public interface EnumPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAlignment(T view, @Nullable String value);
void setIntervals(T view, @Nullable Integer value);
}
",
}
@@ -156,7 +161,7 @@ public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManag
exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -165,13 +170,13 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -179,7 +184,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: Vi
exports[`GeneratePropsJavaInterface can generate for 'EventPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -188,13 +193,13 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -202,7 +207,7 @@ public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -211,19 +216,20 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setBlurRadius(view: T, value: Float): Unit
public fun setBlurRadius2(view: T, value: Float): Unit
public fun setBlurRadius3(view: T, value: Float): Unit
public fun setBlurRadius4(view: T, value: Float): Unit
public fun setBlurRadius5(view: T, value: Float): Unit
public fun setBlurRadius6(view: T, value: Float): Unit
public fun setBlurRadiusNullable(view: T, value: Float?): Unit
public interface FloatPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setBlurRadius(T view, float value);
void setBlurRadius2(T view, float value);
void setBlurRadius3(T view, float value);
void setBlurRadius4(T view, float value);
void setBlurRadius5(T view, float value);
void setBlurRadius6(T view, float value);
void setBlurRadiusNullable(T view, @Nullable Float value);
}
",
}
@@ -231,7 +237,7 @@ public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -240,14 +246,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public interface ImagePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
}
",
}
@@ -255,7 +262,7 @@ public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -264,15 +271,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setProgress1(view: T, value: Int): Unit
public fun setProgress2(view: T, value: Int): Unit
public fun setProgress3(view: T, value: Int): Unit
public interface IntegerPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setProgress1(T view, int value);
void setProgress2(T view, int value);
void setProgress3(T view, int value);
}
",
}
@@ -280,7 +287,7 @@ public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewMa
exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -289,13 +296,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setTitle(view: T, value: String?): Unit
public interface InterfaceOnlyNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setTitle(T view, @Nullable String value);
}
",
}
@@ -303,7 +311,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: View
exports[`GeneratePropsJavaInterface can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -312,14 +320,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMixedProp(view: T, value: Dynamic): Unit
public interface MixedPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMixedProp(T view, Dynamic value);
}
",
}
@@ -327,7 +335,7 @@ public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -336,17 +344,18 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public fun setColor(view: T, value: Int?): Unit
public fun setThumbTintColor(view: T, value: Int?): Unit
public fun setPoint(view: T, value: ReadableMap?): Unit
public interface MultiNativePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
void setColor(T view, @Nullable Integer value);
void setThumbTintColor(T view, @Nullable Integer value);
void setPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -354,7 +363,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: Vi
exports[`GeneratePropsJavaInterface can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -363,12 +372,12 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -377,7 +386,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: Vi
exports[`GeneratePropsJavaInterface can generate for 'ObjectPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -386,16 +395,17 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setObjectProp(view: T, value: ReadableMap?): Unit
public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit
public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit
public interface ObjectPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setObjectProp(T view, @Nullable ReadableMap value);
void setObjectArrayProp(T view, @Nullable ReadableMap value);
void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value);
}
",
}
@@ -403,7 +413,7 @@ public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManage
exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -412,14 +422,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setStartPoint(view: T, value: ReadableMap?): Unit
public interface PointPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setStartPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -427,7 +438,7 @@ public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -436,14 +447,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface StringPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setPlaceholder(view: T, value: String?): Unit
public fun setDefaultValue(view: T, value: String?): Unit
public interface StringPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setPlaceholder(T view, @Nullable String value);
void setDefaultValue(T view, @Nullable String value);
}
",
}
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentViewProps::ArrayPropsNativeComponentViewProps(
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ArrayPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ArrayPropsNativeComponentView\\";
}
folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ArrayPropsNativeComponentViewProps();
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (names != oldProps->names) {
result[\\"names\\"] = toDynamic(names);
}
if (disableds != oldProps->disableds) {
result[\\"disableds\\"] = toDynamic(disableds);
}
if (progress != oldProps->progress) {
result[\\"progress\\"] = toDynamic(progress);
}
if (radii != oldProps->radii) {
result[\\"radii\\"] = toDynamic(radii);
}
if (colors != oldProps->colors) {
result[\\"colors\\"] = toDynamic(colors);
}
if (srcs != oldProps->srcs) {
result[\\"srcs\\"] = toDynamic(srcs);
}
if (points != oldProps->points) {
result[\\"points\\"] = toDynamic(points);
}
if (edgeInsets != oldProps->edgeInsets) {
result[\\"edgeInsets\\"] = toDynamic(edgeInsets);
}
if (dimensions != oldProps->dimensions) {
result[\\"dimensions\\"] = toDynamic(dimensions);
}
if (sizes != oldProps->sizes) {
result[\\"sizes\\"] = toDynamic(sizes);
}
if (object != oldProps->object) {
result[\\"object\\"] = toDynamic(object);
}
if (arrayOfObjects != oldProps->arrayOfObjects) {
result[\\"arrayOfObjects\\"] = toDynamic(arrayOfObjects);
}
if (arrayOfMixed != oldProps->arrayOfMixed) {
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
}
return result;
}
#endif
@@ -142,10 +99,6 @@ BooleanPropNativeComponentViewProps::BooleanPropNativeComponentViewProps(
disabledNullable(convertRawProp(context, rawProps, \\"disabledNullable\\", sourceProps.disabledNullable, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName BooleanPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"BooleanPropNativeComponentView\\";
}
folly::dynamic BooleanPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = BooleanPropNativeComponentViewProps();
@@ -199,10 +152,6 @@ ColorPropNativeComponentViewProps::ColorPropNativeComponentViewProps(
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ColorPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ColorPropNativeComponentView\\";
}
folly::dynamic ColorPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ColorPropNativeComponentViewProps();
@@ -253,10 +202,6 @@ DimensionPropNativeComponentViewProps::DimensionPropNativeComponentViewProps(
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName DimensionPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"DimensionPropNativeComponentView\\";
}
folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = DimensionPropNativeComponentViewProps();
@@ -268,9 +213,6 @@ folly::dynamic DimensionPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (marginBack != oldProps->marginBack) {
result[\\"marginBack\\"] = toDynamic(marginBack);
}
return result;
}
#endif
@@ -306,10 +248,6 @@ EdgeInsetsPropNativeComponentViewProps::EdgeInsetsPropNativeComponentViewProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EdgeInsetsPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EdgeInsetsPropNativeComponentView\\";
}
folly::dynamic EdgeInsetsPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EdgeInsetsPropNativeComponentViewProps();
@@ -357,10 +295,6 @@ EnumPropNativeComponentViewProps::EnumPropNativeComponentViewProps(
intervals(convertRawProp(context, rawProps, \\"intervals\\", sourceProps.intervals, {EnumPropNativeComponentViewIntervals::Intervals0})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EnumPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EnumPropNativeComponentView\\";
}
folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EnumPropNativeComponentViewProps();
@@ -372,13 +306,7 @@ folly::dynamic EnumPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (alignment != oldProps->alignment) {
result[\\"alignment\\"] = toDynamic(alignment);
}
if (intervals != oldProps->intervals) {
result[\\"intervals\\"] = toDynamic(intervals);
}
return result;
}
#endif
@@ -414,10 +342,6 @@ EventNestedObjectPropsNativeComponentViewProps::EventNestedObjectPropsNativeComp
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventNestedObjectPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EventNestedObjectPropsNativeComponentView\\";
}
folly::dynamic EventNestedObjectPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventNestedObjectPropsNativeComponentViewProps();
@@ -467,10 +391,6 @@ EventPropsNativeComponentViewProps::EventPropsNativeComponentViewProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"EventPropsNativeComponentView\\";
}
folly::dynamic EventPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventPropsNativeComponentViewProps();
@@ -526,10 +446,6 @@ FloatPropsNativeComponentViewProps::FloatPropsNativeComponentViewProps(
blurRadiusNullable(convertRawProp(context, rawProps, \\"blurRadiusNullable\\", sourceProps.blurRadiusNullable, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName FloatPropsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"FloatPropsNativeComponentView\\";
}
folly::dynamic FloatPropsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = FloatPropsNativeComponentViewProps();
@@ -604,10 +520,6 @@ ImagePropNativeComponentViewProps::ImagePropNativeComponentViewProps(
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ImagePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"ImagePropNativeComponentView\\";
}
folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ImagePropNativeComponentViewProps();
@@ -620,7 +532,7 @@ folly::dynamic ImagePropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
return result;
}
@@ -659,10 +571,6 @@ IntegerPropNativeComponentViewProps::IntegerPropNativeComponentViewProps(
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName IntegerPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"IntegerPropNativeComponentView\\";
}
folly::dynamic IntegerPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = IntegerPropNativeComponentViewProps();
@@ -720,10 +628,6 @@ InterfaceOnlyNativeComponentViewProps::InterfaceOnlyNativeComponentViewProps(
title(convertRawProp(context, rawProps, \\"title\\", sourceProps.title, {\\"\\"})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName InterfaceOnlyNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"InterfaceOnlyNativeComponentView\\";
}
folly::dynamic InterfaceOnlyNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = InterfaceOnlyNativeComponentViewProps();
@@ -774,10 +678,6 @@ MixedPropNativeComponentViewProps::MixedPropNativeComponentViewProps(
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MixedPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"MixedPropNativeComponentView\\";
}
folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MixedPropNativeComponentViewProps();
@@ -789,9 +689,6 @@ folly::dynamic MixedPropNativeComponentViewProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (mixedProp != oldProps->mixedProp) {
result[\\"mixedProp\\"] = mixedProp;
}
return result;
}
#endif
@@ -831,10 +728,6 @@ MultiNativePropNativeComponentViewProps::MultiNativePropNativeComponentViewProps
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiNativePropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"MultiNativePropNativeComponentView\\";
}
folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiNativePropNativeComponentViewProps();
@@ -847,7 +740,7 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
if (color != oldProps->color) {
@@ -859,7 +752,10 @@ folly::dynamic MultiNativePropNativeComponentViewProps::getDiffProps(
}
if (point != oldProps->point) {
result[\\"point\\"] = toDynamic(point);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = point.x;
pointResult[\\"y\\"] = point.y;
result[\\"point\\"] = pointResult;
}
return result;
}
@@ -896,10 +792,6 @@ NoPropsNoEventsNativeComponentViewProps::NoPropsNoEventsNativeComponentViewProps
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName NoPropsNoEventsNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"NoPropsNoEventsNativeComponentView\\";
}
folly::dynamic NoPropsNoEventsNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = NoPropsNoEventsNativeComponentViewProps();
@@ -949,10 +841,6 @@ ObjectPropsNativeComponentProps::ObjectPropsNativeComponentProps(
objectPrimitiveRequiredProp(convertRawProp(context, rawProps, \\"objectPrimitiveRequiredProp\\", sourceProps.objectPrimitiveRequiredProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ObjectPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ObjectPropsNativeComponent\\";
}
folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ObjectPropsNativeComponentProps();
@@ -964,17 +852,8 @@ folly::dynamic ObjectPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (objectProp != oldProps->objectProp) {
result[\\"objectProp\\"] = toDynamic(objectProp);
}
if (objectArrayProp != oldProps->objectArrayProp) {
result[\\"objectArrayProp\\"] = toDynamic(objectArrayProp);
}
if (objectPrimitiveRequiredProp != oldProps->objectPrimitiveRequiredProp) {
result[\\"objectPrimitiveRequiredProp\\"] = toDynamic(objectPrimitiveRequiredProp);
}
return result;
}
#endif
@@ -1010,10 +889,6 @@ PointPropNativeComponentViewProps::PointPropNativeComponentViewProps(
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName PointPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"PointPropNativeComponentView\\";
}
folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = PointPropNativeComponentViewProps();
@@ -1026,7 +901,10 @@ folly::dynamic PointPropNativeComponentViewProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (startPoint != oldProps->startPoint) {
result[\\"startPoint\\"] = toDynamic(startPoint);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = startPoint.x;
pointResult[\\"y\\"] = startPoint.y;
result[\\"startPoint\\"] = pointResult;
}
return result;
}
@@ -1064,10 +942,6 @@ StringPropNativeComponentViewProps::StringPropNativeComponentViewProps(
defaultValue(convertRawProp(context, rawProps, \\"defaultValue\\", sourceProps.defaultValue, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName StringPropNativeComponentViewProps::getDiffPropsImplementationTarget() const {
return \\"StringPropNativeComponentView\\";
}
folly::dynamic StringPropNativeComponentViewProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = StringPropNativeComponentViewProps();
@@ -16,7 +16,6 @@ Object {
#include <cinttypes>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Point.h>
@@ -88,16 +87,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewSizesMaskW
}
struct ArrayPropsNativeComponentViewObjectStruct {
std::string prop{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentViewObjectStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"prop\\"] = prop;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewObjectStruct &result) {
@@ -113,12 +102,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewObjectStru
return \\"[Object ArrayPropsNativeComponentViewObjectStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewObjectStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewObjectStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -132,17 +115,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ArrayPropsNativeComponentViewArrayOfObjectsStruct {
Float prop1{0.0};
int prop2{0};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentViewArrayOfObjectsStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"prop1\\"] = prop1;
result[\\"prop2\\"] = prop2;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentViewArrayOfObjectsStruct &result) {
@@ -162,12 +134,6 @@ static inline std::string toString(const ArrayPropsNativeComponentViewArrayOfObj
return \\"[Object ArrayPropsNativeComponentViewArrayOfObjectsStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentViewArrayOfObjectsStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentViewArrayOfObjectsStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -199,8 +165,6 @@ class ArrayPropsNativeComponentViewProps final : public ViewProps {
std::vector<folly::dynamic> arrayOfMixed{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -239,8 +203,6 @@ class BooleanPropNativeComponentViewProps final : public ViewProps {
bool disabledNullable{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -279,8 +241,6 @@ class ColorPropNativeComponentViewProps final : public ViewProps {
SharedColor tintColor{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -305,7 +265,6 @@ Object {
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <yoga/Yoga.h>
namespace facebook::react {
@@ -320,8 +279,6 @@ class DimensionPropNativeComponentViewProps final : public ViewProps {
YGValue marginBack{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -359,8 +316,6 @@ class EdgeInsetsPropNativeComponentViewProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -405,12 +360,6 @@ static inline std::string toString(const EnumPropNativeComponentViewAlignment &v
case EnumPropNativeComponentViewAlignment::BottomRight: return \\"bottom-right\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewAlignment &value) {
return toString(value);
}
#endif
enum class EnumPropNativeComponentViewIntervals { Intervals0 = 0, Intervals15 = 15, Intervals30 = 30, Intervals60 = 60 };
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, EnumPropNativeComponentViewIntervals &result) {
@@ -442,17 +391,6 @@ static inline std::string toString(const EnumPropNativeComponentViewIntervals &v
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const EnumPropNativeComponentViewIntervals &value) {
switch (value) {
case EnumPropNativeComponentViewIntervals::Intervals0: return 0;
case EnumPropNativeComponentViewIntervals::Intervals15: return 15;
case EnumPropNativeComponentViewIntervals::Intervals30: return 30;
case EnumPropNativeComponentViewIntervals::Intervals60: return 60;
}
}
#endif
class EnumPropNativeComponentViewProps final : public ViewProps {
public:
EnumPropNativeComponentViewProps() = default;
@@ -464,8 +402,6 @@ class EnumPropNativeComponentViewProps final : public ViewProps {
EnumPropNativeComponentViewIntervals intervals{EnumPropNativeComponentViewIntervals::Intervals0};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -503,8 +439,6 @@ class EventNestedObjectPropsNativeComponentViewProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -542,8 +476,6 @@ class EventPropsNativeComponentViewProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -587,8 +519,6 @@ class FloatPropsNativeComponentViewProps final : public ViewProps {
Float blurRadiusNullable{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -627,8 +557,6 @@ class ImagePropNativeComponentViewProps final : public ViewProps {
ImageSource thumbImage{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -668,8 +596,6 @@ class IntegerPropNativeComponentViewProps final : public ViewProps {
int progress3{10};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -707,8 +633,6 @@ class InterfaceOnlyNativeComponentViewProps final : public ViewProps {
std::string title{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -746,8 +670,6 @@ class MixedPropNativeComponentViewProps final : public ViewProps {
folly::dynamic mixedProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -791,8 +713,6 @@ class MultiNativePropNativeComponentViewProps final : public ViewProps {
Point point{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -830,8 +750,6 @@ class NoPropsNoEventsNativeComponentViewProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -880,12 +798,6 @@ static inline std::string toString(const ObjectPropsNativeComponentStringEnumPro
case ObjectPropsNativeComponentStringEnumProp::Large: return \\"large\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentStringEnumProp &value) {
return toString(value);
}
#endif
enum class ObjectPropsNativeComponentIntEnumProp { IntEnumProp0 = 0, IntEnumProp1 = 1 };
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentIntEnumProp &result) {
@@ -908,15 +820,6 @@ static inline std::string toString(const ObjectPropsNativeComponentIntEnumProp &
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return \\"1\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentIntEnumProp &value) {
switch (value) {
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp0: return 0;
case ObjectPropsNativeComponentIntEnumProp::IntEnumProp1: return 1;
}
}
#endif
struct ObjectPropsNativeComponentObjectPropStruct {
std::string stringProp{\\"\\"};
bool booleanProp{false};
@@ -924,21 +827,6 @@ struct ObjectPropsNativeComponentObjectPropStruct {
int intProp{0};
ObjectPropsNativeComponentStringEnumProp stringEnumProp{ObjectPropsNativeComponentStringEnumProp::Small};
ObjectPropsNativeComponentIntEnumProp intEnumProp{ObjectPropsNativeComponentIntEnumProp::IntEnumProp0};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
result[\\"booleanProp\\"] = booleanProp;
result[\\"floatProp\\"] = floatProp;
result[\\"intProp\\"] = intProp;
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPropStruct &result) {
@@ -974,24 +862,8 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectPropStr
return \\"[Object ObjectPropsNativeComponentObjectPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsNativeComponentObjectArrayPropStruct {
std::vector<std::string> array{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectArrayPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"array\\"] = ::facebook::react::toDynamic(array);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectArrayPropStruct &result) {
@@ -1007,28 +879,10 @@ static inline std::string toString(const ObjectPropsNativeComponentObjectArrayPr
return \\"[Object ObjectPropsNativeComponentObjectArrayPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectArrayPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct {
ImageSource image{};
SharedColor color{};
Point point{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"image\\"] = ::facebook::react::toDynamic(image);
result[\\"color\\"] = ::facebook::react::toDynamic(color);
result[\\"point\\"] = ::facebook::react::toDynamic(point);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &result) {
@@ -1051,12 +905,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
static inline std::string toString(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
return \\"[Object ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct &value) {
return value.toDynamic();
}
#endif
class ObjectPropsNativeComponentProps final : public ViewProps {
public:
ObjectPropsNativeComponentProps() = default;
@@ -1069,8 +917,6 @@ class ObjectPropsNativeComponentProps final : public ViewProps {
ObjectPropsNativeComponentObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1109,8 +955,6 @@ class PointPropNativeComponentViewProps final : public ViewProps {
Point startPoint{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1149,8 +993,6 @@ class StringPropNativeComponentViewProps final : public ViewProps {
std::string defaultValue{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -2,7 +2,7 @@
exports[`GeneratePropsJavaInterface can generate for 'ArrayPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -11,26 +11,27 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setNames(view: T, value: ReadableArray?): Unit
public fun setDisableds(view: T, value: ReadableArray?): Unit
public fun setProgress(view: T, value: ReadableArray?): Unit
public fun setRadii(view: T, value: ReadableArray?): Unit
public fun setColors(view: T, value: ReadableArray?): Unit
public fun setSrcs(view: T, value: ReadableArray?): Unit
public fun setPoints(view: T, value: ReadableArray?): Unit
public fun setEdgeInsets(view: T, value: ReadableArray?): Unit
public fun setDimensions(view: T, value: ReadableArray?): Unit
public fun setSizes(view: T, value: ReadableArray?): Unit
public fun setObject(view: T, value: ReadableArray?): Unit
public fun setArrayOfObjects(view: T, value: ReadableArray?): Unit
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
public interface ArrayPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setNames(T view, @Nullable ReadableArray value);
void setDisableds(T view, @Nullable ReadableArray value);
void setProgress(T view, @Nullable ReadableArray value);
void setRadii(T view, @Nullable ReadableArray value);
void setColors(T view, @Nullable ReadableArray value);
void setSrcs(T view, @Nullable ReadableArray value);
void setPoints(T view, @Nullable ReadableArray value);
void setEdgeInsets(T view, @Nullable ReadableArray value);
void setDimensions(T view, @Nullable ReadableArray value);
void setSizes(T view, @Nullable ReadableArray value);
void setObject(T view, @Nullable ReadableArray value);
void setArrayOfObjects(T view, @Nullable ReadableArray value);
void setArrayOfMixed(T view, @Nullable ReadableArray value);
}
",
}
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'BooleanPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -47,14 +48,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public fun setDisabledNullable(view: T, value: Boolean?): Unit
public interface BooleanPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
void setDisabledNullable(T view, @Nullable Boolean value);
}
",
}
@@ -62,7 +64,7 @@ public interface BooleanPropNativeComponentViewManagerInterface<T: View>: ViewMa
exports[`GeneratePropsJavaInterface can generate for 'ColorPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -71,13 +73,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setTintColor(view: T, value: Int?): Unit
public interface ColorPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setTintColor(T view, @Nullable Integer value);
}
",
}
@@ -85,7 +88,7 @@ public interface ColorPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'DimensionPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -94,14 +97,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
import com.facebook.yoga.YogaValue;
public interface DimensionPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMarginBack(view: T, value: YogaValue?): Unit
public interface DimensionPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMarginBack(T view, @Nullable YogaValue value);
}
",
}
@@ -109,7 +113,7 @@ public interface DimensionPropNativeComponentViewManagerInterface<T: View>: View
exports[`GeneratePropsJavaInterface can generate for 'EdgeInsetsPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EdgeInsetsPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -118,12 +122,12 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface EdgeInsetsPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -132,7 +136,7 @@ public interface EdgeInsetsPropNativeComponentViewManagerInterface<T: View>: Vie
exports[`GeneratePropsJavaInterface can generate for 'EnumPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EnumPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -141,14 +145,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAlignment(view: T, value: String?): Unit
public fun setIntervals(view: T, value: Int?): Unit
public interface EnumPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAlignment(T view, @Nullable String value);
void setIntervals(T view, @Nullable Integer value);
}
",
}
@@ -156,7 +161,7 @@ public interface EnumPropNativeComponentViewManagerInterface<T: View>: ViewManag
exports[`GeneratePropsJavaInterface can generate for 'EventNestedObjectPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EventNestedObjectPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -165,13 +170,13 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -179,7 +184,7 @@ public interface EventNestedObjectPropsNativeComponentViewManagerInterface<T: Vi
exports[`GeneratePropsJavaInterface can generate for 'EventPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/EventPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -188,13 +193,13 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -202,7 +207,7 @@ public interface EventPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'FloatPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/FloatPropsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -211,19 +216,20 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setBlurRadius(view: T, value: Float): Unit
public fun setBlurRadius2(view: T, value: Float): Unit
public fun setBlurRadius3(view: T, value: Float): Unit
public fun setBlurRadius4(view: T, value: Float): Unit
public fun setBlurRadius5(view: T, value: Float): Unit
public fun setBlurRadius6(view: T, value: Float): Unit
public fun setBlurRadiusNullable(view: T, value: Float?): Unit
public interface FloatPropsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setBlurRadius(T view, float value);
void setBlurRadius2(T view, float value);
void setBlurRadius3(T view, float value);
void setBlurRadius4(T view, float value);
void setBlurRadius5(T view, float value);
void setBlurRadius6(T view, float value);
void setBlurRadiusNullable(T view, @Nullable Float value);
}
",
}
@@ -231,7 +237,7 @@ public interface FloatPropsNativeComponentViewManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate for 'ImagePropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -240,14 +246,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public interface ImagePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
}
",
}
@@ -255,7 +262,7 @@ public interface ImagePropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'IntegerPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -264,15 +271,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setProgress1(view: T, value: Int): Unit
public fun setProgress2(view: T, value: Int): Unit
public fun setProgress3(view: T, value: Int): Unit
public interface IntegerPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setProgress1(T view, int value);
void setProgress2(T view, int value);
void setProgress3(T view, int value);
}
",
}
@@ -280,7 +287,7 @@ public interface IntegerPropNativeComponentViewManagerInterface<T: View>: ViewMa
exports[`GeneratePropsJavaInterface can generate for 'InterfaceOnlyNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/InterfaceOnlyNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -289,13 +296,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setTitle(view: T, value: String?): Unit
public interface InterfaceOnlyNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setTitle(T view, @Nullable String value);
}
",
}
@@ -303,7 +311,7 @@ public interface InterfaceOnlyNativeComponentViewManagerInterface<T: View>: View
exports[`GeneratePropsJavaInterface can generate for 'MixedPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -312,14 +320,14 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMixedProp(view: T, value: Dynamic): Unit
public interface MixedPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMixedProp(T view, Dynamic value);
}
",
}
@@ -327,7 +335,7 @@ public interface MixedPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'MultiNativePropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/MultiNativePropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -336,17 +344,18 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public fun setColor(view: T, value: Int?): Unit
public fun setThumbTintColor(view: T, value: Int?): Unit
public fun setPoint(view: T, value: ReadableMap?): Unit
public interface MultiNativePropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
void setColor(T view, @Nullable Integer value);
void setThumbTintColor(T view, @Nullable Integer value);
void setPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -354,7 +363,7 @@ public interface MultiNativePropNativeComponentViewManagerInterface<T: View>: Vi
exports[`GeneratePropsJavaInterface can generate for 'NoPropsNoEventsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/NoPropsNoEventsNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -363,12 +372,12 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface NoPropsNoEventsNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -377,7 +386,7 @@ public interface NoPropsNoEventsNativeComponentViewManagerInterface<T: View>: Vi
exports[`GeneratePropsJavaInterface can generate for 'ObjectPropsNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/ObjectPropsNativeComponentManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -386,16 +395,17 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setObjectProp(view: T, value: ReadableMap?): Unit
public fun setObjectArrayProp(view: T, value: ReadableMap?): Unit
public fun setObjectPrimitiveRequiredProp(view: T, value: ReadableMap?): Unit
public interface ObjectPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setObjectProp(T view, @Nullable ReadableMap value);
void setObjectArrayProp(T view, @Nullable ReadableMap value);
void setObjectPrimitiveRequiredProp(T view, @Nullable ReadableMap value);
}
",
}
@@ -403,7 +413,7 @@ public interface ObjectPropsNativeComponentManagerInterface<T: View>: ViewManage
exports[`GeneratePropsJavaInterface can generate for 'PointPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/PointPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -412,14 +422,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setStartPoint(view: T, value: ReadableMap?): Unit
public interface PointPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setStartPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -427,7 +438,7 @@ public interface PointPropNativeComponentViewManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate for 'StringPropNativeComponent.js' 1`] = `
Object {
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.kt": "/**
"java/com/facebook/react/viewmanagers/StringPropNativeComponentViewManagerInterface.java": "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -436,14 +447,15 @@ Object {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface StringPropNativeComponentViewManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setPlaceholder(view: T, value: String?): Unit
public fun setDefaultValue(view: T, value: String?): Unit
public interface StringPropNativeComponentViewManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setPlaceholder(T view, @Nullable String value);
void setDefaultValue(T view, @Nullable String value);
}
",
}
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@react-native/codegen",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Code generation tools for React Native",
"license": "MIT",
"repository": {
@@ -30,7 +30,7 @@
],
"dependencies": {
"glob": "^7.1.1",
"hermes-parser": "0.29.1",
"hermes-parser": "0.28.1",
"invariant": "^2.2.4",
"nullthrows": "^1.1.1",
"yargs": "^17.6.2"
@@ -43,7 +43,7 @@
"@babel/plugin-transform-nullish-coalescing-operator": "^7.24.7",
"@babel/plugin-transform-optional-chaining": "^7.24.8",
"@babel/preset-env": "^7.25.3",
"hermes-estree": "0.29.1",
"hermes-estree": "0.28.1",
"micromatch": "^4.0.4",
"prettier": "2.8.8",
"rimraf": "^3.0.2"
@@ -245,7 +245,6 @@ function getLocalImports(
return;
case 'DimensionPrimitive':
imports.add('#include <yoga/Yoga.h>');
imports.add('#include <react/renderer/core/graphicsConversions.h>');
return;
default:
(name: empty);
@@ -105,7 +105,7 @@ function generatePropsDiffString(
case 'ImageSourcePrimitive':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
result["${prop.name}"] = ${prop.name}.toDynamic();
}`;
case 'ImageRequestPrimitive':
// Shouldn't be used in props
@@ -115,47 +115,24 @@ function generatePropsDiffString(
case 'PointPrimitive':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
folly::dynamic pointResult = folly::dynamic::object();
pointResult["x"] = ${prop.name}.x;
pointResult["y"] = ${prop.name}.y;
result["${prop.name}"] = pointResult;
}`;
case 'EdgeInsetsPrimitive':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
case 'DimensionPrimitive':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
// TODO: Implement diffProps for complex types
return '';
default:
(typeAnnotation.name: empty);
throw new Error('Received unknown ReservedPropTypeAnnotation');
}
case 'ArrayTypeAnnotation':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
case 'ObjectTypeAnnotation':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
case 'StringEnumTypeAnnotation':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
case 'Int32EnumTypeAnnotation':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = toDynamic(${prop.name});
}`;
case 'MixedTypeAnnotation':
return `
if (${prop.name} != oldProps->${prop.name}) {
result["${prop.name}"] = ${prop.name};
}`;
default:
// TODO: Implement diffProps for complex types
return '';
@@ -165,10 +142,6 @@ function generatePropsDiffString(
return `
#ifdef RN_SERIALIZABLE_STATE
ComponentName ${className}::getDiffPropsImplementationTarget() const {
return "${componentName}";
}
folly::dynamic ${className}::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ${className}();
@@ -85,8 +85,6 @@ class ${className} final${extendClasses} {
${props}
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -117,12 +115,6 @@ static inline std::string toString(const ${enumName} &value) {
${toCases}
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ${enumName} &value) {
return toString(value);
}
#endif
`.trim();
const IntEnumTemplate = ({
@@ -130,13 +122,11 @@ const IntEnumTemplate = ({
values,
fromCases,
toCases,
toDynamicCases,
}: {
enumName: string,
values: string,
fromCases: string,
toCases: string,
toDynamicCases: string,
}) =>
`
enum class ${enumName} { ${values} };
@@ -154,39 +144,19 @@ static inline std::string toString(const ${enumName} &value) {
${toCases}
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ${enumName} &value) {
switch (value) {
${toDynamicCases}
}
}
#endif
`.trim();
const StructTemplate = ({
structName,
fields,
fromCases,
toDynamicCases,
}: {
structName: string,
fields: string,
fromCases: string,
toDynamicCases: string,
}) =>
`struct ${structName} {
${fields}
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ${structName}&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
${toDynamicCases}
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ${structName} &result) {
@@ -198,12 +168,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
static inline std::string toString(const ${structName} &value) {
return "[Object ${structName}]";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ${structName} &value) {
return value.toDynamic();
}
#endif
`.trim();
const ArrayConversionFunctionTemplate = ({
@@ -437,16 +401,6 @@ function generateIntEnum(
)
.join('\n' + ' ');
const toDynamicCases = values
.map(
value =>
`case ${enumName}::${toIntEnumValueName(
prop.name,
value,
)}: return ${value};`,
)
.join('\n' + ' ');
const valueVariables = values
.map(val => `${toIntEnumValueName(prop.name, val)} = ${val}`)
.join(', ');
@@ -456,7 +410,6 @@ function generateIntEnum(
values: valueVariables,
fromCases,
toCases,
toDynamicCases,
});
}
@@ -748,30 +701,12 @@ function generateStruct(
})
.join('\n ');
const toDynamicCases = properties
.map((property: NamedShape<PropTypeAnnotation>) => {
const name = property.name;
switch (property.typeAnnotation.type) {
case 'BooleanTypeAnnotation':
case 'StringTypeAnnotation':
case 'Int32TypeAnnotation':
case 'DoubleTypeAnnotation':
case 'FloatTypeAnnotation':
case 'MixedTypeAnnotation':
return `result["${name}"] = ${name};`;
default:
return `result["${name}"] = ::facebook::react::toDynamic(${name});`;
}
})
.join('\n ');
structs.set(
structName,
StructTemplate({
structName,
fields,
fromCases,
toDynamicCases,
}),
);
}
@@ -48,15 +48,19 @@ const FileTemplate = ({
* ${'@'}generated by codegen project: GeneratePropsJavaInterface.js
*/
package ${packageName}
package ${packageName};
${imports}
public interface ${className}<T: ${extendClasses}>: ViewManagerWithGeneratedInterface {
public interface ${className}<T extends ${extendClasses}> extends ViewManagerWithGeneratedInterface {
${methods}
}
`;
function addNullable(imports: Set<string>) {
imports.add('import androidx.annotation.Nullable;');
}
function getJavaValueForProp(
prop: NamedShape<PropTypeAnnotation>,
imports: Set<string>,
@@ -66,52 +70,65 @@ function getJavaValueForProp(
switch (typeAnnotation.type) {
case 'BooleanTypeAnnotation':
if (typeAnnotation.default === null) {
return 'value: Boolean?';
addNullable(imports);
return '@Nullable Boolean value';
} else {
return 'value: Boolean';
return 'boolean value';
}
case 'StringTypeAnnotation':
return 'value: String?';
addNullable(imports);
return '@Nullable String value';
case 'Int32TypeAnnotation':
return 'value: Int';
return 'int value';
case 'DoubleTypeAnnotation':
return 'value: Double';
return 'double value';
case 'FloatTypeAnnotation':
if (typeAnnotation.default === null) {
return 'value: Float?';
addNullable(imports);
return '@Nullable Float value';
} else {
return 'value: Float';
return 'float value';
}
case 'ReservedPropTypeAnnotation':
switch (typeAnnotation.name) {
case 'ColorPrimitive':
return 'value: Int?';
addNullable(imports);
return '@Nullable Integer value';
case 'ImageSourcePrimitive':
return 'value: ReadableMap?';
addNullable(imports);
return '@Nullable ReadableMap value';
case 'ImageRequestPrimitive':
return 'value: ReadableMap?';
addNullable(imports);
return '@Nullable ReadableMap value';
case 'PointPrimitive':
return 'value: ReadableMap?';
addNullable(imports);
return '@Nullable ReadableMap value';
case 'EdgeInsetsPrimitive':
return 'value: ReadableMap?';
addNullable(imports);
return '@Nullable ReadableMap value';
case 'DimensionPrimitive':
return 'value: YogaValue?';
addNullable(imports);
return '@Nullable YogaValue value';
default:
(typeAnnotation.name: empty);
throw new Error('Received unknown ReservedPropTypeAnnotation');
}
case 'ArrayTypeAnnotation': {
return 'value: ReadableArray?';
addNullable(imports);
return '@Nullable ReadableArray value';
}
case 'ObjectTypeAnnotation': {
return 'value: ReadableMap?';
addNullable(imports);
return '@Nullable ReadableMap value';
}
case 'StringEnumTypeAnnotation':
return 'value: String?';
addNullable(imports);
return '@Nullable String value';
case 'Int32EnumTypeAnnotation':
return 'value: Int?';
addNullable(imports);
return '@Nullable Integer value';
case 'MixedTypeAnnotation':
return 'value: Dynamic';
return 'Dynamic value';
default:
(typeAnnotation: empty);
throw new Error('Received invalid typeAnnotation');
@@ -125,9 +142,9 @@ function generatePropsString(component: ComponentShape, imports: Set<string>) {
return component.props
.map(prop => {
return `public fun set${toSafeJavaString(
return `void set${toSafeJavaString(
prop.name,
)}(view: T, ${getJavaValueForProp(prop, imports)}): Unit`;
)}(T view, ${getJavaValueForProp(prop, imports)});`;
})
.join('\n' + ' ');
}
@@ -139,19 +156,19 @@ function getCommandArgJavaType(param: NamedShape<CommandParamTypeAnnotation>) {
case 'ReservedTypeAnnotation':
switch (typeAnnotation.name) {
case 'RootTag':
return 'Double';
return 'double';
default:
(typeAnnotation.name: empty);
throw new Error(`Receieved invalid type: ${typeAnnotation.name}`);
}
case 'BooleanTypeAnnotation':
return 'Boolean';
return 'boolean';
case 'DoubleTypeAnnotation':
return 'Double';
return 'double';
case 'FloatTypeAnnotation':
return 'Float';
return 'float';
case 'Int32TypeAnnotation':
return 'Int';
return 'int';
case 'StringTypeAnnotation':
return 'String';
case 'ArrayTypeAnnotation':
@@ -167,11 +184,11 @@ function getCommandArguments(
componentName: string,
): string {
return [
'view: T',
'T view',
...command.typeAnnotation.params.map(param => {
const commandArgJavaType = getCommandArgJavaType(param);
return `${param.name}: ${commandArgJavaType}`;
return `${commandArgJavaType} ${param.name}`;
}),
].join(', ');
}
@@ -184,10 +201,10 @@ function generateCommandsString(
.map(command => {
const safeJavaName = toSafeJavaString(command.name, false);
return `public fun ${safeJavaName}(${getCommandArguments(
return `void ${safeJavaName}(${getCommandArguments(
command,
componentName,
)}): Unit`;
)});`;
})
.join('\n' + ' ');
}
@@ -270,7 +287,7 @@ module.exports = {
.trimRight(),
});
files.set(`${outputDir}/${className}.kt`, replacedTemplate);
files.set(`${outputDir}/${className}.java`, replacedTemplate);
});
});
@@ -81,8 +81,8 @@ TEST(${componentName}_${testName}, etc) {
function getTestCasesForProp(
propName: string,
typeAnnotation: PropTypeAnnotation,
): Array<TestCase> {
const cases: Array<TestCase> = [];
) {
const cases = [];
if (typeAnnotation.type === 'StringEnumTypeAnnotation') {
typeAnnotation.options.forEach(option =>
cases.push({
@@ -40,10 +40,6 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps(
arrayOfMixed(convertRawProp(context, rawProps, \\"arrayOfMixed\\", sourceProps.arrayOfMixed, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ArrayPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ArrayPropsNativeComponent\\";
}
folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ArrayPropsNativeComponentProps();
@@ -55,57 +51,18 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (names != oldProps->names) {
result[\\"names\\"] = toDynamic(names);
}
if (disableds != oldProps->disableds) {
result[\\"disableds\\"] = toDynamic(disableds);
}
if (progress != oldProps->progress) {
result[\\"progress\\"] = toDynamic(progress);
}
if (radii != oldProps->radii) {
result[\\"radii\\"] = toDynamic(radii);
}
if (colors != oldProps->colors) {
result[\\"colors\\"] = toDynamic(colors);
}
if (srcs != oldProps->srcs) {
result[\\"srcs\\"] = toDynamic(srcs);
}
if (points != oldProps->points) {
result[\\"points\\"] = toDynamic(points);
}
if (dimensions != oldProps->dimensions) {
result[\\"dimensions\\"] = toDynamic(dimensions);
}
if (sizes != oldProps->sizes) {
result[\\"sizes\\"] = toDynamic(sizes);
}
if (object != oldProps->object) {
result[\\"object\\"] = toDynamic(object);
}
if (array != oldProps->array) {
result[\\"array\\"] = toDynamic(array);
}
if (arrayOfArrayOfObject != oldProps->arrayOfArrayOfObject) {
result[\\"arrayOfArrayOfObject\\"] = toDynamic(arrayOfArrayOfObject);
}
if (arrayOfMixed != oldProps->arrayOfMixed) {
result[\\"arrayOfMixed\\"] = toDynamic(arrayOfMixed);
}
return result;
}
#endif
@@ -141,10 +98,6 @@ ArrayPropsNativeComponentProps::ArrayPropsNativeComponentProps(
nativePrimitives(convertRawProp(context, rawProps, \\"nativePrimitives\\", sourceProps.nativePrimitives, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ArrayPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ArrayPropsNativeComponent\\";
}
folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ArrayPropsNativeComponentProps();
@@ -156,9 +109,6 @@ folly::dynamic ArrayPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (nativePrimitives != oldProps->nativePrimitives) {
result[\\"nativePrimitives\\"] = toDynamic(nativePrimitives);
}
return result;
}
#endif
@@ -194,10 +144,6 @@ BooleanPropNativeComponentProps::BooleanPropNativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName BooleanPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"BooleanPropNativeComponent\\";
}
folly::dynamic BooleanPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = BooleanPropNativeComponentProps();
@@ -247,10 +193,6 @@ ColorPropNativeComponentProps::ColorPropNativeComponentProps(
tintColor(convertRawProp(context, rawProps, \\"tintColor\\", sourceProps.tintColor, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ColorPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ColorPropNativeComponent\\";
}
folly::dynamic ColorPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ColorPropNativeComponentProps();
@@ -300,10 +242,6 @@ CommandNativeComponentProps::CommandNativeComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName CommandNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"CommandNativeComponent\\";
}
folly::dynamic CommandNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = CommandNativeComponentProps();
@@ -350,10 +288,6 @@ CommandNativeComponentProps::CommandNativeComponentProps(
accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName CommandNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"CommandNativeComponent\\";
}
folly::dynamic CommandNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = CommandNativeComponentProps();
@@ -404,10 +338,6 @@ DimensionPropNativeComponentProps::DimensionPropNativeComponentProps(
marginBack(convertRawProp(context, rawProps, \\"marginBack\\", sourceProps.marginBack, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName DimensionPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"DimensionPropNativeComponent\\";
}
folly::dynamic DimensionPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = DimensionPropNativeComponentProps();
@@ -419,9 +349,6 @@ folly::dynamic DimensionPropNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (marginBack != oldProps->marginBack) {
result[\\"marginBack\\"] = toDynamic(marginBack);
}
return result;
}
#endif
@@ -462,10 +389,6 @@ DoublePropNativeComponentProps::DoublePropNativeComponentProps(
blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName DoublePropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"DoublePropNativeComponent\\";
}
folly::dynamic DoublePropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = DoublePropNativeComponentProps();
@@ -535,10 +458,6 @@ EventsNestedObjectNativeComponentProps::EventsNestedObjectNativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventsNestedObjectNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"EventsNestedObjectNativeComponent\\";
}
folly::dynamic EventsNestedObjectNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventsNestedObjectNativeComponentProps();
@@ -588,10 +507,6 @@ EventsNativeComponentProps::EventsNativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName EventsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"EventsNativeComponent\\";
}
folly::dynamic EventsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = EventsNativeComponentProps();
@@ -641,10 +556,6 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName InterfaceOnlyComponentProps::getDiffPropsImplementationTarget() const {
return \\"InterfaceOnlyComponent\\";
}
folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = InterfaceOnlyComponentProps();
@@ -691,10 +602,6 @@ ExcludedAndroidComponentProps::ExcludedAndroidComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ExcludedAndroidComponentProps::getDiffPropsImplementationTarget() const {
return \\"ExcludedAndroidComponent\\";
}
folly::dynamic ExcludedAndroidComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ExcludedAndroidComponentProps();
@@ -741,10 +648,6 @@ ExcludedAndroidIosComponentProps::ExcludedAndroidIosComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ExcludedAndroidIosComponentProps::getDiffPropsImplementationTarget() const {
return \\"ExcludedAndroidIosComponent\\";
}
folly::dynamic ExcludedAndroidIosComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ExcludedAndroidIosComponentProps();
@@ -791,10 +694,6 @@ ExcludedIosComponentProps::ExcludedIosComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ExcludedIosComponentProps::getDiffPropsImplementationTarget() const {
return \\"ExcludedIosComponent\\";
}
folly::dynamic ExcludedIosComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ExcludedIosComponentProps();
@@ -817,10 +716,6 @@ MultiFileIncludedNativeComponentProps::MultiFileIncludedNativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiFileIncludedNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MultiFileIncludedNativeComponent\\";
}
folly::dynamic MultiFileIncludedNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiFileIncludedNativeComponentProps();
@@ -875,10 +770,6 @@ FloatPropNativeComponentProps::FloatPropNativeComponentProps(
blurRadius6(convertRawProp(context, rawProps, \\"blurRadius6\\", sourceProps.blurRadius6, {0.0})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName FloatPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"FloatPropNativeComponent\\";
}
folly::dynamic FloatPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = FloatPropNativeComponentProps();
@@ -949,10 +840,6 @@ ImagePropNativeComponentProps::ImagePropNativeComponentProps(
thumbImage(convertRawProp(context, rawProps, \\"thumbImage\\", sourceProps.thumbImage, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ImagePropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ImagePropNativeComponent\\";
}
folly::dynamic ImagePropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ImagePropNativeComponentProps();
@@ -965,7 +852,7 @@ folly::dynamic ImagePropNativeComponentProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
return result;
}
@@ -1002,10 +889,6 @@ InsetsPropNativeComponentProps::InsetsPropNativeComponentProps(
contentInset(convertRawProp(context, rawProps, \\"contentInset\\", sourceProps.contentInset, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName InsetsPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"InsetsPropNativeComponent\\";
}
folly::dynamic InsetsPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = InsetsPropNativeComponentProps();
@@ -1017,9 +900,6 @@ folly::dynamic InsetsPropNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (contentInset != oldProps->contentInset) {
result[\\"contentInset\\"] = toDynamic(contentInset);
}
return result;
}
#endif
@@ -1055,10 +935,6 @@ Int32EnumPropsNativeComponentProps::Int32EnumPropsNativeComponentProps(
maxInterval(convertRawProp(context, rawProps, \\"maxInterval\\", sourceProps.maxInterval, {Int32EnumPropsNativeComponentMaxInterval::MaxInterval0})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName Int32EnumPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"Int32EnumPropsNativeComponent\\";
}
folly::dynamic Int32EnumPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = Int32EnumPropsNativeComponentProps();
@@ -1070,9 +946,6 @@ folly::dynamic Int32EnumPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (maxInterval != oldProps->maxInterval) {
result[\\"maxInterval\\"] = toDynamic(maxInterval);
}
return result;
}
#endif
@@ -1110,10 +983,6 @@ IntegerPropNativeComponentProps::IntegerPropNativeComponentProps(
progress3(convertRawProp(context, rawProps, \\"progress3\\", sourceProps.progress3, {10})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName IntegerPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"IntegerPropNativeComponent\\";
}
folly::dynamic IntegerPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = IntegerPropNativeComponentProps();
@@ -1171,10 +1040,6 @@ InterfaceOnlyComponentProps::InterfaceOnlyComponentProps(
accessibilityHint(convertRawProp(context, rawProps, \\"accessibilityHint\\", sourceProps.accessibilityHint, {\\"\\"})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName InterfaceOnlyComponentProps::getDiffPropsImplementationTarget() const {
return \\"InterfaceOnlyComponent\\";
}
folly::dynamic InterfaceOnlyComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = InterfaceOnlyComponentProps();
@@ -1225,10 +1090,6 @@ MixedPropNativeComponentProps::MixedPropNativeComponentProps(
mixedProp(convertRawProp(context, rawProps, \\"mixedProp\\", sourceProps.mixedProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MixedPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MixedPropNativeComponent\\";
}
folly::dynamic MixedPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MixedPropNativeComponentProps();
@@ -1240,9 +1101,6 @@ folly::dynamic MixedPropNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (mixedProp != oldProps->mixedProp) {
result[\\"mixedProp\\"] = mixedProp;
}
return result;
}
#endif
@@ -1282,10 +1140,6 @@ ImageColorPropNativeComponentProps::ImageColorPropNativeComponentProps(
point(convertRawProp(context, rawProps, \\"point\\", sourceProps.point, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ImageColorPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"ImageColorPropNativeComponent\\";
}
folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ImageColorPropNativeComponentProps();
@@ -1298,7 +1152,7 @@ folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (thumbImage != oldProps->thumbImage) {
result[\\"thumbImage\\"] = toDynamic(thumbImage);
result[\\"thumbImage\\"] = thumbImage.toDynamic();
}
if (color != oldProps->color) {
@@ -1310,7 +1164,10 @@ folly::dynamic ImageColorPropNativeComponentProps::getDiffProps(
}
if (point != oldProps->point) {
result[\\"point\\"] = toDynamic(point);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = point.x;
pointResult[\\"y\\"] = point.y;
result[\\"point\\"] = pointResult;
}
return result;
}
@@ -1347,10 +1204,6 @@ NoPropsNoEventsComponentProps::NoPropsNoEventsComponentProps(
{}
#ifdef RN_SERIALIZABLE_STATE
ComponentName NoPropsNoEventsComponentProps::getDiffPropsImplementationTarget() const {
return \\"NoPropsNoEventsComponent\\";
}
folly::dynamic NoPropsNoEventsComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = NoPropsNoEventsComponentProps();
@@ -1398,10 +1251,6 @@ ObjectPropsProps::ObjectPropsProps(
objectProp(convertRawProp(context, rawProps, \\"objectProp\\", sourceProps.objectProp, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName ObjectPropsProps::getDiffPropsImplementationTarget() const {
return \\"ObjectProps\\";
}
folly::dynamic ObjectPropsProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = ObjectPropsProps();
@@ -1413,9 +1262,6 @@ folly::dynamic ObjectPropsProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (objectProp != oldProps->objectProp) {
result[\\"objectProp\\"] = toDynamic(objectProp);
}
return result;
}
#endif
@@ -1451,10 +1297,6 @@ PointPropNativeComponentProps::PointPropNativeComponentProps(
startPoint(convertRawProp(context, rawProps, \\"startPoint\\", sourceProps.startPoint, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName PointPropNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"PointPropNativeComponent\\";
}
folly::dynamic PointPropNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = PointPropNativeComponentProps();
@@ -1467,7 +1309,10 @@ folly::dynamic PointPropNativeComponentProps::getDiffProps(
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (startPoint != oldProps->startPoint) {
result[\\"startPoint\\"] = toDynamic(startPoint);
folly::dynamic pointResult = folly::dynamic::object();
pointResult[\\"x\\"] = startPoint.x;
pointResult[\\"y\\"] = startPoint.y;
result[\\"startPoint\\"] = pointResult;
}
return result;
}
@@ -1504,10 +1349,6 @@ StringEnumPropsNativeComponentProps::StringEnumPropsNativeComponentProps(
alignment(convertRawProp(context, rawProps, \\"alignment\\", sourceProps.alignment, {StringEnumPropsNativeComponentAlignment::Center})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName StringEnumPropsNativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"StringEnumPropsNativeComponent\\";
}
folly::dynamic StringEnumPropsNativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = StringEnumPropsNativeComponentProps();
@@ -1519,9 +1360,6 @@ folly::dynamic StringEnumPropsNativeComponentProps::getDiffProps(
}
folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
if (alignment != oldProps->alignment) {
result[\\"alignment\\"] = toDynamic(alignment);
}
return result;
}
#endif
@@ -1558,10 +1396,6 @@ StringPropComponentProps::StringPropComponentProps(
accessibilityRole(convertRawProp(context, rawProps, \\"accessibilityRole\\", sourceProps.accessibilityRole, {})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName StringPropComponentProps::getDiffPropsImplementationTarget() const {
return \\"StringPropComponent\\";
}
folly::dynamic StringPropComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = StringPropComponentProps();
@@ -1615,10 +1449,6 @@ MultiFile1NativeComponentProps::MultiFile1NativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiFile1NativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MultiFile1NativeComponent\\";
}
folly::dynamic MultiFile1NativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiFile1NativeComponentProps();
@@ -1644,10 +1474,6 @@ MultiFile2NativeComponentProps::MultiFile2NativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiFile2NativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MultiFile2NativeComponent\\";
}
folly::dynamic MultiFile2NativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiFile2NativeComponentProps();
@@ -1697,10 +1523,6 @@ MultiComponent1NativeComponentProps::MultiComponent1NativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {false})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiComponent1NativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MultiComponent1NativeComponent\\";
}
folly::dynamic MultiComponent1NativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiComponent1NativeComponentProps();
@@ -1726,10 +1548,6 @@ MultiComponent2NativeComponentProps::MultiComponent2NativeComponentProps(
disabled(convertRawProp(context, rawProps, \\"disabled\\", sourceProps.disabled, {true})) {}
#ifdef RN_SERIALIZABLE_STATE
ComponentName MultiComponent2NativeComponentProps::getDiffPropsImplementationTarget() const {
return \\"MultiComponent2NativeComponent\\";
}
folly::dynamic MultiComponent2NativeComponentProps::getDiffProps(
const Props* prevProps) const {
static const auto defaultProps = MultiComponent2NativeComponentProps();
@@ -16,7 +16,6 @@ Map {
#include <cinttypes>
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <react/renderer/core/propsConversions.h>
#include <react/renderer/graphics/Color.h>
#include <react/renderer/graphics/Point.h>
@@ -87,16 +86,6 @@ static inline std::string toString(const ArrayPropsNativeComponentSizesMaskWrapp
}
struct ArrayPropsNativeComponentObjectStruct {
std::string stringProp{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentObjectStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentObjectStruct &result) {
@@ -112,12 +101,6 @@ static inline std::string toString(const ArrayPropsNativeComponentObjectStruct &
return \\"[Object ArrayPropsNativeComponentObjectStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentObjectStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentObjectStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -130,16 +113,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ArrayPropsNativeComponentArrayObjectStruct {
std::string stringProp{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentArrayObjectStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayObjectStruct &result) {
@@ -155,12 +128,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayObjectStr
return \\"[Object ArrayPropsNativeComponentArrayObjectStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayObjectStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentArrayObjectStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -173,16 +140,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ArrayPropsNativeComponentArrayStruct {
std::vector<ArrayPropsNativeComponentArrayObjectStruct> object{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentArrayStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"object\\"] = ::facebook::react::toDynamic(object);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayStruct &result) {
@@ -198,12 +155,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayStruct &v
return \\"[Object ArrayPropsNativeComponentArrayStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentArrayStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -216,16 +167,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ArrayPropsNativeComponentArrayOfArrayOfObjectStruct {
std::string stringProp{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentArrayOfArrayOfObjectStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentArrayOfArrayOfObjectStruct &result) {
@@ -241,12 +182,6 @@ static inline std::string toString(const ArrayPropsNativeComponentArrayOfArrayOf
return \\"[Object ArrayPropsNativeComponentArrayOfArrayOfObjectStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentArrayOfArrayOfObjectStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<std::vector<ArrayPropsNativeComponentArrayOfArrayOfObjectStruct>> &result) {
auto items = (std::vector<std::vector<RawValue>>)value;
for (const std::vector<RawValue> &item : items) {
@@ -282,8 +217,6 @@ class ArrayPropsNativeComponentProps final : public ViewProps {
std::vector<folly::dynamic> arrayOfMixed{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -321,18 +254,6 @@ struct ArrayPropsNativeComponentNativePrimitivesStruct {
std::vector<SharedColor> colors{};
std::vector<ImageSource> srcs{};
std::vector<Point> points{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ArrayPropsNativeComponentNativePrimitivesStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"colors\\"] = ::facebook::react::toDynamic(colors);
result[\\"srcs\\"] = ::facebook::react::toDynamic(srcs);
result[\\"points\\"] = ::facebook::react::toDynamic(points);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ArrayPropsNativeComponentNativePrimitivesStruct &result) {
@@ -356,12 +277,6 @@ static inline std::string toString(const ArrayPropsNativeComponentNativePrimitiv
return \\"[Object ArrayPropsNativeComponentNativePrimitivesStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ArrayPropsNativeComponentNativePrimitivesStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ArrayPropsNativeComponentNativePrimitivesStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -381,8 +296,6 @@ class ArrayPropsNativeComponentProps final : public ViewProps {
std::vector<ArrayPropsNativeComponentNativePrimitivesStruct> nativePrimitives{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -420,8 +333,6 @@ class BooleanPropNativeComponentProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -460,8 +371,6 @@ class ColorPropNativeComponentProps final : public ViewProps {
SharedColor tintColor{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -499,8 +408,6 @@ class CommandNativeComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -538,8 +445,6 @@ class CommandNativeComponentProps final : public ViewProps {
std::string accessibilityHint{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -564,7 +469,6 @@ Map {
#include <react/renderer/components/view/ViewProps.h>
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/graphicsConversions.h>
#include <yoga/Yoga.h>
namespace facebook::react {
@@ -579,8 +483,6 @@ class DimensionPropNativeComponentProps final : public ViewProps {
YGValue marginBack{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -623,8 +525,6 @@ class DoublePropNativeComponentProps final : public ViewProps {
double blurRadius6{0.0};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -662,8 +562,6 @@ class EventsNestedObjectNativeComponentProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -701,8 +599,6 @@ class EventsNativeComponentProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -740,8 +636,6 @@ class InterfaceOnlyComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -779,8 +673,6 @@ class ExcludedAndroidComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -818,8 +710,6 @@ class ExcludedAndroidIosComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -857,8 +747,6 @@ class ExcludedIosComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -873,8 +761,6 @@ class MultiFileIncludedNativeComponentProps final : public ViewProps {
bool disabled{true};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -917,8 +803,6 @@ class FloatPropNativeComponentProps final : public ViewProps {
Float blurRadius6{0.0};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -957,8 +841,6 @@ class ImagePropNativeComponentProps final : public ViewProps {
ImageSource thumbImage{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -997,8 +879,6 @@ class InsetsPropNativeComponentProps final : public ViewProps {
EdgeInsets contentInset{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1053,16 +933,6 @@ static inline std::string toString(const Int32EnumPropsNativeComponentMaxInterva
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const Int32EnumPropsNativeComponentMaxInterval &value) {
switch (value) {
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval0: return 0;
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval1: return 1;
case Int32EnumPropsNativeComponentMaxInterval::MaxInterval2: return 2;
}
}
#endif
class Int32EnumPropsNativeComponentProps final : public ViewProps {
public:
Int32EnumPropsNativeComponentProps() = default;
@@ -1073,8 +943,6 @@ class Int32EnumPropsNativeComponentProps final : public ViewProps {
Int32EnumPropsNativeComponentMaxInterval maxInterval{Int32EnumPropsNativeComponentMaxInterval::MaxInterval0};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1114,8 +982,6 @@ class IntegerPropNativeComponentProps final : public ViewProps {
int progress3{10};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1153,8 +1019,6 @@ class InterfaceOnlyComponentProps final : public ViewProps {
std::string accessibilityHint{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1192,8 +1056,6 @@ class MixedPropNativeComponentProps final : public ViewProps {
folly::dynamic mixedProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1237,8 +1099,6 @@ class ImageColorPropNativeComponentProps final : public ViewProps {
Point point{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1276,8 +1136,6 @@ class NoPropsNoEventsComponentProps final : public ViewProps {
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1324,12 +1182,6 @@ static inline std::string toString(const ObjectPropsStringEnumProp &value) {
case ObjectPropsStringEnumProp::Option1: return \\"option1\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsStringEnumProp &value) {
return toString(value);
}
#endif
enum class ObjectPropsIntEnumProp { IntEnumProp0 = 0 };
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsIntEnumProp &result) {
@@ -1348,26 +1200,8 @@ static inline std::string toString(const ObjectPropsIntEnumProp &value) {
case ObjectPropsIntEnumProp::IntEnumProp0: return \\"0\\";
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsIntEnumProp &value) {
switch (value) {
case ObjectPropsIntEnumProp::IntEnumProp0: return 0;
}
}
#endif
struct ObjectPropsObjectPropObjectArrayPropStruct {
std::vector<std::string> array{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropObjectArrayPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"array\\"] = ::facebook::react::toDynamic(array);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectArrayPropStruct &result) {
@@ -1383,28 +1217,10 @@ static inline std::string toString(const ObjectPropsObjectPropObjectArrayPropStr
return \\"[Object ObjectPropsObjectPropObjectArrayPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropObjectArrayPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct {
ImageSource image{};
SharedColor color{};
Point point{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"image\\"] = ::facebook::react::toDynamic(image);
result[\\"color\\"] = ::facebook::react::toDynamic(color);
result[\\"point\\"] = ::facebook::react::toDynamic(point);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct &result) {
@@ -1428,24 +1244,8 @@ static inline std::string toString(const ObjectPropsObjectPropObjectPrimitiveReq
return \\"[Object ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsObjectPropNestedPropANestedPropBStruct {
std::string nestedPropC{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropNestedPropANestedPropBStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"nestedPropC\\"] = nestedPropC;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropANestedPropBStruct &result) {
@@ -1461,24 +1261,8 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropANestedP
return \\"[Object ObjectPropsObjectPropNestedPropANestedPropBStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedPropANestedPropBStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsObjectPropNestedPropAStruct {
ObjectPropsObjectPropNestedPropANestedPropBStruct nestedPropB{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropNestedPropAStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"nestedPropB\\"] = ::facebook::react::toDynamic(nestedPropB);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedPropAStruct &result) {
@@ -1494,24 +1278,8 @@ static inline std::string toString(const ObjectPropsObjectPropNestedPropAStruct
return \\"[Object ObjectPropsObjectPropNestedPropAStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedPropAStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct {
std::string stringProp{\\"\\"};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct &result) {
@@ -1527,12 +1295,6 @@ static inline std::string toString(const ObjectPropsObjectPropNestedArrayAsPrope
return \\"[Object ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct &value) {
return value.toDynamic();
}
#endif
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, std::vector<ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct> &result) {
auto items = (std::vector<RawValue>)value;
for (const auto &item : items) {
@@ -1545,16 +1307,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
struct ObjectPropsObjectPropNestedArrayAsPropertyStruct {
std::vector<ObjectPropsObjectPropNestedArrayAsPropertyArrayPropStruct> arrayProp{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropNestedArrayAsPropertyStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"arrayProp\\"] = ::facebook::react::toDynamic(arrayProp);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropNestedArrayAsPropertyStruct &result) {
@@ -1570,12 +1322,6 @@ static inline std::string toString(const ObjectPropsObjectPropNestedArrayAsPrope
return \\"[Object ObjectPropsObjectPropNestedArrayAsPropertyStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropNestedArrayAsPropertyStruct &value) {
return value.toDynamic();
}
#endif
struct ObjectPropsObjectPropStruct {
std::string stringProp{\\"\\"};
bool booleanProp{false};
@@ -1591,29 +1337,6 @@ struct ObjectPropsObjectPropStruct {
ObjectPropsObjectPropObjectPrimitiveRequiredPropStruct objectPrimitiveRequiredProp{};
ObjectPropsObjectPropNestedPropAStruct nestedPropA{};
ObjectPropsObjectPropNestedArrayAsPropertyStruct nestedArrayAsProperty{};
#ifdef RN_SERIALIZABLE_STATE
bool operator==(const ObjectPropsObjectPropStruct&) const = default;
folly::dynamic toDynamic() const {
folly::dynamic result = folly::dynamic::object();
result[\\"stringProp\\"] = stringProp;
result[\\"booleanProp\\"] = booleanProp;
result[\\"floatProp\\"] = floatProp;
result[\\"intProp\\"] = intProp;
result[\\"stringUserDefaultProp\\"] = stringUserDefaultProp;
result[\\"booleanUserDefaultProp\\"] = booleanUserDefaultProp;
result[\\"floatUserDefaultProp\\"] = floatUserDefaultProp;
result[\\"intUserDefaultProp\\"] = intUserDefaultProp;
result[\\"stringEnumProp\\"] = ::facebook::react::toDynamic(stringEnumProp);
result[\\"intEnumProp\\"] = ::facebook::react::toDynamic(intEnumProp);
result[\\"objectArrayProp\\"] = ::facebook::react::toDynamic(objectArrayProp);
result[\\"objectPrimitiveRequiredProp\\"] = ::facebook::react::toDynamic(objectPrimitiveRequiredProp);
result[\\"nestedPropA\\"] = ::facebook::react::toDynamic(nestedPropA);
result[\\"nestedArrayAsProperty\\"] = ::facebook::react::toDynamic(nestedArrayAsProperty);
return result;
}
#endif
};
static inline void fromRawValue(const PropsParserContext& context, const RawValue &value, ObjectPropsObjectPropStruct &result) {
@@ -1680,12 +1403,6 @@ static inline void fromRawValue(const PropsParserContext& context, const RawValu
static inline std::string toString(const ObjectPropsObjectPropStruct &value) {
return \\"[Object ObjectPropsObjectPropStruct]\\";
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const ObjectPropsObjectPropStruct &value) {
return value.toDynamic();
}
#endif
class ObjectPropsProps final : public ViewProps {
public:
ObjectPropsProps() = default;
@@ -1696,8 +1413,6 @@ class ObjectPropsProps final : public ViewProps {
ObjectPropsObjectPropStruct objectProp{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1736,8 +1451,6 @@ class PointPropNativeComponentProps final : public ViewProps {
Point startPoint{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1783,12 +1496,6 @@ static inline std::string toString(const StringEnumPropsNativeComponentAlignment
}
}
#ifdef RN_SERIALIZABLE_STATE
static inline folly::dynamic toDynamic(const StringEnumPropsNativeComponentAlignment &value) {
return toString(value);
}
#endif
class StringEnumPropsNativeComponentProps final : public ViewProps {
public:
StringEnumPropsNativeComponentProps() = default;
@@ -1799,8 +1506,6 @@ class StringEnumPropsNativeComponentProps final : public ViewProps {
StringEnumPropsNativeComponentAlignment alignment{StringEnumPropsNativeComponentAlignment::Center};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1839,8 +1544,6 @@ class StringPropComponentProps final : public ViewProps {
std::string accessibilityRole{};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1878,8 +1581,6 @@ class MultiFile1NativeComponentProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1894,8 +1595,6 @@ class MultiFile2NativeComponentProps final : public ViewProps {
bool disabled{true};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1933,8 +1632,6 @@ class MultiComponent1NativeComponentProps final : public ViewProps {
bool disabled{false};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -1949,8 +1646,6 @@ class MultiComponent2NativeComponentProps final : public ViewProps {
bool disabled{true};
#ifdef RN_SERIALIZABLE_STATE
ComponentName getDiffPropsImplementationTarget() const override;
folly::dynamic getDiffProps(const Props* prevProps) const override;
#endif
};
@@ -2,7 +2,7 @@
exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -11,26 +11,27 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setNames(view: T, value: ReadableArray?): Unit
public fun setDisableds(view: T, value: ReadableArray?): Unit
public fun setProgress(view: T, value: ReadableArray?): Unit
public fun setRadii(view: T, value: ReadableArray?): Unit
public fun setColors(view: T, value: ReadableArray?): Unit
public fun setSrcs(view: T, value: ReadableArray?): Unit
public fun setPoints(view: T, value: ReadableArray?): Unit
public fun setDimensions(view: T, value: ReadableArray?): Unit
public fun setSizes(view: T, value: ReadableArray?): Unit
public fun setObject(view: T, value: ReadableArray?): Unit
public fun setArray(view: T, value: ReadableArray?): Unit
public fun setArrayOfArrayOfObject(view: T, value: ReadableArray?): Unit
public fun setArrayOfMixed(view: T, value: ReadableArray?): Unit
public interface ArrayPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setNames(T view, @Nullable ReadableArray value);
void setDisableds(T view, @Nullable ReadableArray value);
void setProgress(T view, @Nullable ReadableArray value);
void setRadii(T view, @Nullable ReadableArray value);
void setColors(T view, @Nullable ReadableArray value);
void setSrcs(T view, @Nullable ReadableArray value);
void setPoints(T view, @Nullable ReadableArray value);
void setDimensions(T view, @Nullable ReadableArray value);
void setSizes(T view, @Nullable ReadableArray value);
void setObject(T view, @Nullable ReadableArray value);
void setArray(T view, @Nullable ReadableArray value);
void setArrayOfArrayOfObject(T view, @Nullable ReadableArray value);
void setArrayOfMixed(T view, @Nullable ReadableArray value);
}
",
}
@@ -38,7 +39,7 @@ public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManager
exports[`GeneratePropsJavaInterface can generate fixture ARRAY_PROPS_WITH_NESTED_OBJECT 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ArrayPropsNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -47,14 +48,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setNativePrimitives(view: T, value: ReadableArray?): Unit
public interface ArrayPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setNativePrimitives(T view, @Nullable ReadableArray value);
}
",
}
@@ -62,7 +64,7 @@ public interface ArrayPropsNativeComponentManagerInterface<T: View>: ViewManager
exports[`GeneratePropsJavaInterface can generate fixture BOOLEAN_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/BooleanPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -71,13 +73,13 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface BooleanPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface BooleanPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -85,7 +87,7 @@ public interface BooleanPropNativeComponentManagerInterface<T: View>: ViewManage
exports[`GeneratePropsJavaInterface can generate fixture COLOR_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ColorPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -94,13 +96,14 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ColorPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setTintColor(view: T, value: Int?): Unit
public interface ColorPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setTintColor(T view, @Nullable Integer value);
}
",
}
@@ -108,7 +111,7 @@ public interface ColorPropNativeComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture COMMANDS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -117,16 +120,16 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface CommandNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
public fun flashScrollIndicators(view: T): Unit
public fun allTypes(view: T, x: Int, y: Float, z: Double, message: String, animated: Boolean, locations: ReadableArray): Unit
void flashScrollIndicators(T view);
void allTypes(T view, int x, float y, double z, String message, boolean animated, ReadableArray locations);
}
",
}
@@ -134,7 +137,7 @@ public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWit
exports[`GeneratePropsJavaInterface can generate fixture COMMANDS_AND_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/CommandNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -143,17 +146,18 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAccessibilityHint(view: T, value: String?): Unit
public fun handleRootTag(view: T, rootTag: Double): Unit
public fun hotspotUpdate(view: T, x: Int, y: Int): Unit
public fun addItems(view: T, items: ReadableArray): Unit
public interface CommandNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAccessibilityHint(T view, @Nullable String value);
void handleRootTag(T view, double rootTag);
void hotspotUpdate(T view, int x, int y);
void addItems(T view, ReadableArray items);
}
",
}
@@ -161,7 +165,7 @@ public interface CommandNativeComponentManagerInterface<T: View>: ViewManagerWit
exports[`GeneratePropsJavaInterface can generate fixture DIMENSION_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/DimensionPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -170,14 +174,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
import com.facebook.yoga.YogaValue;
public interface DimensionPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMarginBack(view: T, value: YogaValue?): Unit
public interface DimensionPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMarginBack(T view, @Nullable YogaValue value);
}
",
}
@@ -185,7 +190,7 @@ public interface DimensionPropNativeComponentManagerInterface<T: View>: ViewMana
exports[`GeneratePropsJavaInterface can generate fixture DOUBLE_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/DoublePropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -194,18 +199,18 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface DoublePropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setBlurRadius(view: T, value: Double): Unit
public fun setBlurRadius2(view: T, value: Double): Unit
public fun setBlurRadius3(view: T, value: Double): Unit
public fun setBlurRadius4(view: T, value: Double): Unit
public fun setBlurRadius5(view: T, value: Double): Unit
public fun setBlurRadius6(view: T, value: Double): Unit
public interface DoublePropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setBlurRadius(T view, double value);
void setBlurRadius2(T view, double value);
void setBlurRadius3(T view, double value);
void setBlurRadius4(T view, double value);
void setBlurRadius5(T view, double value);
void setBlurRadius6(T view, double value);
}
",
}
@@ -213,7 +218,7 @@ public interface DoublePropNativeComponentManagerInterface<T: View>: ViewManager
exports[`GeneratePropsJavaInterface can generate fixture EVENT_NESTED_OBJECT_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/EventsNestedObjectNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -222,13 +227,13 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventsNestedObjectNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventsNestedObjectNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -236,7 +241,7 @@ public interface EventsNestedObjectNativeComponentManagerInterface<T: View>: Vie
exports[`GeneratePropsJavaInterface can generate fixture EVENT_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/EventsNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/EventsNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -245,13 +250,13 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface EventsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface EventsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -259,7 +264,7 @@ public interface EventsNativeComponentManagerInterface<T: View>: ViewManagerWith
exports[`GeneratePropsJavaInterface can generate fixture EVENTS_WITH_PAPER_NAME 1`] = `
Map {
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -268,12 +273,12 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface InterfaceOnlyComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -286,7 +291,7 @@ exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_ANDROID_IOS 1`]
exports[`GeneratePropsJavaInterface can generate fixture EXCLUDE_IOS_TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ExcludedIosComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -295,16 +300,16 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ExcludedIosComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface ExcludedIosComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
"java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MultiFileIncludedNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -313,13 +318,13 @@ public interface ExcludedIosComponentManagerInterface<T: View>: ViewManagerWithG
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiFileIncludedNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface MultiFileIncludedNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -327,7 +332,7 @@ public interface MultiFileIncludedNativeComponentManagerInterface<T: View>: View
exports[`GeneratePropsJavaInterface can generate fixture FLOAT_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/FloatPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/FloatPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -336,18 +341,18 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface FloatPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setBlurRadius(view: T, value: Float): Unit
public fun setBlurRadius2(view: T, value: Float): Unit
public fun setBlurRadius3(view: T, value: Float): Unit
public fun setBlurRadius4(view: T, value: Float): Unit
public fun setBlurRadius5(view: T, value: Float): Unit
public fun setBlurRadius6(view: T, value: Float): Unit
public interface FloatPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setBlurRadius(T view, float value);
void setBlurRadius2(T view, float value);
void setBlurRadius3(T view, float value);
void setBlurRadius4(T view, float value);
void setBlurRadius5(T view, float value);
void setBlurRadius6(T view, float value);
}
",
}
@@ -355,7 +360,7 @@ public interface FloatPropNativeComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture IMAGE_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ImagePropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -364,14 +369,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ImagePropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public interface ImagePropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
}
",
}
@@ -379,7 +385,7 @@ public interface ImagePropNativeComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture INSETS_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/InsetsPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -388,14 +394,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface InsetsPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setContentInset(view: T, value: ReadableMap?): Unit
public interface InsetsPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setContentInset(T view, @Nullable ReadableMap value);
}
",
}
@@ -403,7 +410,7 @@ public interface InsetsPropNativeComponentManagerInterface<T: View>: ViewManager
exports[`GeneratePropsJavaInterface can generate fixture INT32_ENUM_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/Int32EnumPropsNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -412,13 +419,14 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface Int32EnumPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMaxInterval(view: T, value: Int?): Unit
public interface Int32EnumPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMaxInterval(T view, @Nullable Integer value);
}
",
}
@@ -426,7 +434,7 @@ public interface Int32EnumPropsNativeComponentManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate fixture INTEGER_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/IntegerPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -435,15 +443,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface IntegerPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setProgress1(view: T, value: Int): Unit
public fun setProgress2(view: T, value: Int): Unit
public fun setProgress3(view: T, value: Int): Unit
public interface IntegerPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setProgress1(T view, int value);
void setProgress2(T view, int value);
void setProgress3(T view, int value);
}
",
}
@@ -451,7 +459,7 @@ public interface IntegerPropNativeComponentManagerInterface<T: View>: ViewManage
exports[`GeneratePropsJavaInterface can generate fixture INTERFACE_ONLY 1`] = `
Map {
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/InterfaceOnlyComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -460,13 +468,14 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAccessibilityHint(view: T, value: String?): Unit
public interface InterfaceOnlyComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAccessibilityHint(T view, @Nullable String value);
}
",
}
@@ -474,7 +483,7 @@ public interface InterfaceOnlyComponentManagerInterface<T: View>: ViewManagerWit
exports[`GeneratePropsJavaInterface can generate fixture MIXED_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MixedPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -483,14 +492,14 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MixedPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setMixedProp(view: T, value: Dynamic): Unit
public interface MixedPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setMixedProp(T view, Dynamic value);
}
",
}
@@ -498,7 +507,7 @@ public interface MixedPropNativeComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture MULTI_NATIVE_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ImageColorPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -507,17 +516,18 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ImageColorPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setThumbImage(view: T, value: ReadableMap?): Unit
public fun setColor(view: T, value: Int?): Unit
public fun setThumbTintColor(view: T, value: Int?): Unit
public fun setPoint(view: T, value: ReadableMap?): Unit
public interface ImageColorPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setThumbImage(T view, @Nullable ReadableMap value);
void setColor(T view, @Nullable Integer value);
void setThumbTintColor(T view, @Nullable Integer value);
void setPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -525,7 +535,7 @@ public interface ImageColorPropNativeComponentManagerInterface<T: View>: ViewMan
exports[`GeneratePropsJavaInterface can generate fixture NO_PROPS_NO_EVENTS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/NoPropsNoEventsComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -534,12 +544,12 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface NoPropsNoEventsComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public interface NoPropsNoEventsComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
// No props
}
",
@@ -548,7 +558,7 @@ public interface NoPropsNoEventsComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture OBJECT_PROPS 1`] = `
Map {
"java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/ObjectPropsManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -557,14 +567,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface ObjectPropsManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setObjectProp(view: T, value: ReadableMap?): Unit
public interface ObjectPropsManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setObjectProp(T view, @Nullable ReadableMap value);
}
",
}
@@ -572,7 +583,7 @@ public interface ObjectPropsManagerInterface<T: View>: ViewManagerWithGeneratedI
exports[`GeneratePropsJavaInterface can generate fixture POINT_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/PointPropNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -581,14 +592,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.bridge.ReadableMap;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface PointPropNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setStartPoint(view: T, value: ReadableMap?): Unit
public interface PointPropNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setStartPoint(T view, @Nullable ReadableMap value);
}
",
}
@@ -596,7 +608,7 @@ public interface PointPropNativeComponentManagerInterface<T: View>: ViewManagerW
exports[`GeneratePropsJavaInterface can generate fixture STRING_ENUM_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/StringEnumPropsNativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -605,13 +617,14 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface StringEnumPropsNativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAlignment(view: T, value: String?): Unit
public interface StringEnumPropsNativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAlignment(T view, @Nullable String value);
}
",
}
@@ -619,7 +632,7 @@ public interface StringEnumPropsNativeComponentManagerInterface<T: View>: ViewMa
exports[`GeneratePropsJavaInterface can generate fixture STRING_PROP 1`] = `
Map {
"java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/StringPropComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -628,14 +641,15 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import androidx.annotation.Nullable;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface StringPropComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setAccessibilityHint(view: T, value: String?): Unit
public fun setAccessibilityRole(view: T, value: String?): Unit
public interface StringPropComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setAccessibilityHint(T view, @Nullable String value);
void setAccessibilityRole(T view, @Nullable String value);
}
",
}
@@ -643,7 +657,7 @@ public interface StringPropComponentManagerInterface<T: View>: ViewManagerWithGe
exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_DIFFERENT_FILES 1`] = `
Map {
"java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MultiFile1NativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -652,16 +666,16 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiFile1NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface MultiFile1NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
"java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MultiFile2NativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -670,13 +684,13 @@ public interface MultiFile1NativeComponentManagerInterface<T: View>: ViewManager
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiFile2NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface MultiFile2NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -684,7 +698,7 @@ public interface MultiFile2NativeComponentManagerInterface<T: View>: ViewManager
exports[`GeneratePropsJavaInterface can generate fixture TWO_COMPONENTS_SAME_FILE 1`] = `
Map {
"java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MultiComponent1NativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -693,16 +707,16 @@ Map {
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiComponent1NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface MultiComponent1NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
"java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.kt" => "/**
"java/com/facebook/react/viewmanagers/MultiComponent2NativeComponentManagerInterface.java" => "/**
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
*
* Do not edit this file as changes may cause incorrect behavior and will be lost
@@ -711,13 +725,13 @@ public interface MultiComponent1NativeComponentManagerInterface<T: View>: ViewMa
* @generated by codegen project: GeneratePropsJavaInterface.js
*/
package com.facebook.react.viewmanagers
package com.facebook.react.viewmanagers;
import android.view.View;
import com.facebook.react.uimanager.ViewManagerWithGeneratedInterface;
public interface MultiComponent2NativeComponentManagerInterface<T: View>: ViewManagerWithGeneratedInterface {
public fun setDisabled(view: T, value: Boolean): Unit
public interface MultiComponent2NativeComponentManagerInterface<T extends View> extends ViewManagerWithGeneratedInterface {
void setDisabled(T view, boolean value);
}
",
}
@@ -1,6 +1,6 @@
{
"name": "@react-native/compatibility-check",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "Check a React Native app's boundary between JS and Native for incompatibilities",
"license": "MIT",
"repository": {
@@ -29,7 +29,7 @@
"dist"
],
"dependencies": {
"@react-native/codegen": "0.81.0-main"
"@react-native/codegen": "0.80.0-main"
},
"devDependencies": {
"flow-remove-types": "^2.237.2",
@@ -1,6 +1,6 @@
{
"name": "@react-native/popup-menu-android",
"version": "0.81.0-main",
"version": "0.80.0-main",
"description": "PopupMenu for the Android platform",
"main": "index.js",
"files": [
@@ -21,7 +21,7 @@
},
"license": "MIT",
"devDependencies": {
"@react-native/codegen": "0.81.0-main"
"@react-native/codegen": "0.80.0-main"
},
"peerDependencies": {
"@types/react": "^19.1.0",
@@ -9,8 +9,6 @@
#import <React/RCTUIManager.h>
#import <React/RCTViewManager.h>
#import <string>
static UIColor *UIColorFromHexString(const std::string hexString)
{
unsigned rgbValue = 0;
@@ -1,6 +1,6 @@
{
"name": "@react-native/oss-library-example",
"version": "0.81.0-main",
"version": "0.80.0-main",
"private": true,
"description": "Package that includes native module exapmle, native component example, targets both the old and the new architecture. It should serve as an example of a real-world OSS library.",
"license": "MIT",
@@ -26,7 +26,7 @@
],
"devDependencies": {
"@babel/core": "^7.25.2",
"@react-native/babel-preset": "0.81.0-main",
"@react-native/babel-preset": "0.80.0-main",
"react-native": "1000.0.0"
},
"peerDependencies": {
@@ -26,7 +26,7 @@ Pod::Spec.new do |s|
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("*.{m}", "")
s.source_files = "*.{m}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTActionSheet"
+3 -4
View File
@@ -12,7 +12,6 @@
import type {NativeSyntheticEvent} from '../Types/CoreEventTypes';
import type {PlatformConfig} from './AnimatedPlatformConfig';
import type {EventMapping} from './NativeAnimatedModule';
import NativeAnimatedHelper from '../../src/private/animated/NativeAnimatedHelper';
import {findNodeHandle} from '../ReactNative/RendererProxy';
@@ -30,7 +29,7 @@ export type EventConfig<T> = {
platformConfig?: PlatformConfig,
};
export function attachNativeEventImpl(
export function attachNativeEvent(
viewRef: any,
eventName: string,
argMapping: $ReadOnlyArray<?Mapping>,
@@ -38,7 +37,7 @@ export function attachNativeEventImpl(
): {detach: () => void} {
// Find animated values in `argMapping` and create an array representing their
// key path inside the `nativeEvent` object. Ex.: ['contentOffset', 'x'].
const eventMappings: Array<EventMapping> = [];
const eventMappings = [];
const traverse = (value: mixed, path: Array<string>) => {
if (value instanceof AnimatedValue) {
@@ -182,7 +181,7 @@ export class AnimatedEvent {
'Only native driven events need to be attached.',
);
this._attachedEvent = attachNativeEventImpl(
this._attachedEvent = attachNativeEvent(
viewRef,
eventName,
this._argMapping,
@@ -10,10 +10,6 @@
import AnimatedImplementation from './AnimatedImplementation';
export type {DecayAnimationConfig} from './animations/DecayAnimation';
export type {SpringAnimationConfig} from './animations/SpringAnimation';
export type {TimingAnimationConfig} from './animations/TimingAnimation';
export {default as FlatList} from './components/AnimatedFlatList';
export {default as Image} from './components/AnimatedImage';
export {default as ScrollView} from './components/AnimatedScrollView';
@@ -37,7 +33,6 @@ export type {default as AnimatedNode} from './nodes/AnimatedNode';
export type {default as AnimatedAddition} from './nodes/AnimatedAddition';
export type {default as AnimatedDiffClamp} from './nodes/AnimatedDiffClamp';
export type {default as AnimatedDivision} from './nodes/AnimatedDivision';
export type {InterpolationConfigType as InterpolationConfig} from './nodes/AnimatedInterpolation';
export type {default as AnimatedModulo} from './nodes/AnimatedModulo';
export type {default as AnimatedMultiplication} from './nodes/AnimatedMultiplication';
export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction';
@@ -20,7 +20,7 @@ import type {DecayAnimationConfig} from './animations/DecayAnimation';
import type {SpringAnimationConfig} from './animations/SpringAnimation';
import type {TimingAnimationConfig} from './animations/TimingAnimation';
import {AnimatedEvent, attachNativeEventImpl} from './AnimatedEvent';
import {AnimatedEvent, attachNativeEvent} from './AnimatedEvent';
import DecayAnimation from './animations/DecayAnimation';
import SpringAnimation from './animations/SpringAnimation';
import TimingAnimation from './animations/TimingAnimation';
@@ -47,39 +47,39 @@ export type CompositeAnimation = {
...
};
const addImpl = function (
const add = function (
a: AnimatedNode | number,
b: AnimatedNode | number,
): AnimatedAddition {
return new AnimatedAddition(a, b);
};
const subtractImpl = function (
const subtract = function (
a: AnimatedNode | number,
b: AnimatedNode | number,
): AnimatedSubtraction {
return new AnimatedSubtraction(a, b);
};
const divideImpl = function (
const divide = function (
a: AnimatedNode | number,
b: AnimatedNode | number,
): AnimatedDivision {
return new AnimatedDivision(a, b);
};
const multiplyImpl = function (
const multiply = function (
a: AnimatedNode | number,
b: AnimatedNode | number,
): AnimatedMultiplication {
return new AnimatedMultiplication(a, b);
};
const moduloImpl = function (a: AnimatedNode, modulus: number): AnimatedModulo {
const modulo = function (a: AnimatedNode, modulus: number): AnimatedModulo {
return new AnimatedModulo(a, modulus);
};
const diffClampImpl = function (
const diffClamp = function (
a: AnimatedNode,
min: number,
max: number,
@@ -120,7 +120,7 @@ const maybeVectorAnim = function (
const aY = anim((value: AnimatedValueXY).y, configY);
// We use `stopTogether: false` here because otherwise tracking will break
// because the second animation will get stopped before it can update.
return parallelImpl([aX, aY], {stopTogether: false});
return parallel([aX, aY], {stopTogether: false});
} else if (value instanceof AnimatedColor) {
const configR = {...config};
const configG = {...config};
@@ -146,12 +146,12 @@ const maybeVectorAnim = function (
const aA = anim((value: AnimatedColor).a, configA);
// We use `stopTogether: false` here because otherwise tracking will break
// because the second animation will get stopped before it can update.
return parallelImpl([aR, aG, aB, aA], {stopTogether: false});
return parallel([aR, aG, aB, aA], {stopTogether: false});
}
return null;
};
const springImpl = function (
const spring = function (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: SpringAnimationConfig,
): CompositeAnimation {
@@ -179,7 +179,7 @@ const springImpl = function (
}
};
return (
maybeVectorAnim(value, config, springImpl) || {
maybeVectorAnim(value, config, spring) || {
start: function (callback?: ?EndCallback): void {
start(value, config, callback);
},
@@ -204,7 +204,7 @@ const springImpl = function (
);
};
const timingImpl = function (
const timing = function (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: TimingAnimationConfig,
): CompositeAnimation {
@@ -233,7 +233,7 @@ const timingImpl = function (
};
return (
maybeVectorAnim(value, config, timingImpl) || {
maybeVectorAnim(value, config, timing) || {
start: function (callback?: ?EndCallback, isLooping?: boolean): void {
start(value, {...config, isLooping}, callback);
},
@@ -258,7 +258,7 @@ const timingImpl = function (
);
};
const decayImpl = function (
const decay = function (
value: AnimatedValue | AnimatedValueXY | AnimatedColor,
config: DecayAnimationConfig,
): CompositeAnimation {
@@ -275,7 +275,7 @@ const decayImpl = function (
};
return (
maybeVectorAnim(value, config, decayImpl) || {
maybeVectorAnim(value, config, decay) || {
start: function (callback?: ?EndCallback): void {
start(value, config, callback);
},
@@ -300,7 +300,7 @@ const decayImpl = function (
);
};
const sequenceImpl = function (
const sequence = function (
animations: Array<CompositeAnimation>,
): CompositeAnimation {
let current = 0;
@@ -363,7 +363,7 @@ type ParallelConfig = {
stopTogether?: boolean,
...
};
const parallelImpl = function (
const parallel = function (
animations: Array<CompositeAnimation>,
config?: ?ParallelConfig,
): CompositeAnimation {
@@ -431,9 +431,9 @@ const parallelImpl = function (
return result;
};
const delayImpl = function (time: number): CompositeAnimation {
const delay = function (time: number): CompositeAnimation {
// Would be nice to make a specialized implementation
return timingImpl(new AnimatedValue(0), {
return timing(new AnimatedValue(0), {
toValue: 0,
delay: time,
duration: 0,
@@ -441,13 +441,13 @@ const delayImpl = function (time: number): CompositeAnimation {
});
};
const staggerImpl = function (
const stagger = function (
time: number,
animations: Array<CompositeAnimation>,
): CompositeAnimation {
return parallelImpl(
return parallel(
animations.map((animation, i) => {
return sequenceImpl([delayImpl(time * i), animation]);
return sequence([delay(time * i), animation]);
}),
);
};
@@ -458,7 +458,7 @@ type LoopAnimationConfig = {
...
};
const loopImpl = function (
const loop = function (
animation: CompositeAnimation,
// $FlowFixMe[prop-missing]
{iterations = -1, resetBeforeIteration = true}: LoopAnimationConfig = {},
@@ -514,7 +514,7 @@ const loopImpl = function (
};
};
function forkEventImpl(
function forkEvent(
event: ?AnimatedEvent | ?Function,
listener: Function,
): AnimatedEvent | Function {
@@ -531,7 +531,7 @@ function forkEventImpl(
}
}
function unforkEventImpl(
function unforkEvent(
event: ?AnimatedEvent | ?Function,
listener: Function,
): void {
@@ -540,7 +540,7 @@ function unforkEventImpl(
}
}
const eventImpl = function <T>(
const event = function <T>(
argMapping: $ReadOnlyArray<?Mapping>,
config: EventConfig<T>,
): any {
@@ -606,25 +606,25 @@ export default {
* See https://reactnative.dev/docs/animated#node
*/
Node: AnimatedNode,
decay: decayImpl,
timing: timingImpl,
spring: springImpl,
add: addImpl,
subtract: subtractImpl,
divide: divideImpl,
multiply: multiplyImpl,
modulo: moduloImpl,
diffClamp: diffClampImpl,
delay: delayImpl,
sequence: sequenceImpl,
parallel: parallelImpl,
stagger: staggerImpl,
loop: loopImpl,
event: eventImpl,
decay,
timing,
spring,
add,
subtract,
divide,
multiply,
modulo,
diffClamp,
delay,
sequence,
parallel,
stagger,
loop,
event,
createAnimatedComponent,
attachNativeEvent: attachNativeEventImpl,
forkEvent: forkEventImpl,
unforkEvent: unforkEventImpl,
attachNativeEvent,
forkEvent,
unforkEvent,
/**
* Expose Event class, so it can be used as a type for type checkers.
+2 -2
View File
@@ -17,7 +17,7 @@ import type {DecayAnimationConfig} from './animations/DecayAnimation';
import type {SpringAnimationConfig} from './animations/SpringAnimation';
import type {TimingAnimationConfig} from './animations/TimingAnimation';
import {AnimatedEvent, attachNativeEventImpl} from './AnimatedEvent';
import {AnimatedEvent, attachNativeEvent} from './AnimatedEvent';
import AnimatedImplementation from './AnimatedImplementation';
import createAnimatedComponent from './createAnimatedComponent';
import AnimatedColor from './nodes/AnimatedColor';
@@ -188,7 +188,7 @@ export default {
loop,
event: AnimatedImplementation.event,
createAnimatedComponent,
attachNativeEvent: attachNativeEventImpl,
attachNativeEvent,
forkEvent: AnimatedImplementation.forkEvent,
unforkEvent: AnimatedImplementation.unforkEvent,
Event: AnimatedEvent,
@@ -17,7 +17,6 @@ import ensureInstance from '../../../src/private/__tests__/utilities/ensureInsta
import * as Fantom from '@react-native/fantom';
import {createRef} from 'react';
import {Animated, View, useAnimatedValue} from 'react-native';
import {allowStyleProp} from 'react-native/Libraries/Animated/NativeAnimatedAllowlist';
import * as ReactNativeFeatureFlags from 'react-native/src/private/featureflags/ReactNativeFeatureFlags';
import ReactNativeElement from 'react-native/src/private/webapis/dom/nodes/ReactNativeElement';
@@ -153,7 +152,6 @@ test('animation driven by onScroll event', () => {
test('animated opacity', () => {
let _opacity;
let _opacityAnimation;
const viewRef = createRef<HostInstance>();
function MyApp() {
@@ -184,7 +182,7 @@ test('animated opacity', () => {
expect(viewElement.getBoundingClientRect().x).toBe(0);
Fantom.runTask(() => {
_opacityAnimation = Animated.timing(_opacity, {
Animated.timing(_opacity, {
toValue: 0,
duration: 30,
useNativeDriver: true,
@@ -196,10 +194,8 @@ test('animated opacity', () => {
0,
);
// TODO: this shouldn't be neccessary since animation should be stopped after duration
Fantom.runTask(() => {
_opacityAnimation?.stop();
});
// TODO(T223344928): this shouldn't be neccessary with cxxNativeAnimatedRemoveJsSync:true
Fantom.runWorkLoop();
expect(root.getRenderedOutput({props: ['opacity']}).toJSX()).toEqual(
<rn-view opacity="0" />,
@@ -479,61 +475,3 @@ describe('Value.extractOffset', () => {
Fantom.runWorkLoop();
});
});
test('animate layout props', () => {
const viewRef = createRef<HostInstance>();
allowStyleProp('height');
let _animatedHeight;
let _heightAnimation;
function MyApp() {
const animatedHeight = useAnimatedValue(0);
_animatedHeight = animatedHeight;
return (
<Animated.View
ref={viewRef}
style={[
{
width: 100,
height: animatedHeight,
},
]}
/>
);
}
const root = Fantom.createRoot();
Fantom.runTask(() => {
root.render(<MyApp />);
});
const viewElement = ensureInstance(viewRef.current, ReactNativeElement);
Fantom.runTask(() => {
_heightAnimation = Animated.timing(_animatedHeight, {
toValue: 100,
duration: 10,
useNativeDriver: true,
}).start();
});
Fantom.unstable_produceFramesForDuration(10);
// TODO: this shouldn't be neccessary since animation should be stopped after duration
Fantom.runTask(() => {
_heightAnimation?.stop();
});
// $FlowFixMe[incompatible-use]
expect(Fantom.unstable_getDirectManipulationProps(viewElement).height).toBe(
100,
);
expect(Fantom.unstable_getFabricUpdateProps(viewElement).height).toBe(100);
expect(root.getRenderedOutput({props: ['height']}).toJSX()).toEqual(
<rn-view height="100.000000" />,
);
});
@@ -247,6 +247,10 @@ describe('Animated', () => {
});
it('renders animated and primitive style correctly', () => {
ReactNativeFeatureFlags.override({
alwaysFlattenAnimatedStyles: () => true,
});
const anim = new Animated.Value(0);
const staticProps = {
style: [
@@ -372,7 +376,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn()};
const cb = jest.fn();
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.sequence([anim1, anim2]);
expect(anim1.start).not.toBeCalled();
expect(anim2.start).not.toBeCalled();
@@ -397,7 +402,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn()};
const cb = jest.fn();
Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]).start(cb);
// $FlowFixMe[prop-missing]
Animated.sequence([anim1, anim2]).start(cb);
anim1.start.mock.calls[0][0]({finished: false});
@@ -411,7 +417,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.sequence([anim1, anim2]);
seq.start(cb);
seq.stop();
@@ -429,7 +436,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.sequence([anim1, anim2]);
seq.start(cb);
@@ -452,7 +460,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.sequence([anim1, anim2]);
seq.start(cb);
anim1.start.mock.calls[0][0]({finished: true});
@@ -478,7 +487,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe);
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation);
expect(animation.start).not.toBeCalled();
@@ -509,7 +519,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe, {iterations: -1});
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {iterations: -1});
expect(animation.start).not.toBeCalled();
@@ -540,10 +551,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(
animation as $FlowFixMe,
{anotherKey: 'value'} as $FlowFixMe,
);
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {anotherKey: 'value'});
expect(animation.start).not.toBeCalled();
@@ -574,7 +583,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 3});
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {iterations: 3});
expect(animation.start).not.toBeCalled();
@@ -605,7 +615,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 1});
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {iterations: 1});
expect(animation.start).not.toBeCalled();
@@ -626,7 +637,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe, {iterations: 0});
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {iterations: 0});
expect(animation.start).not.toBeCalled();
@@ -644,7 +656,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
Animated.loop(animation as $FlowFixMe).start(cb);
// $FlowFixMe[prop-missing]
Animated.loop(animation).start(cb);
expect(animation.start).toBeCalled();
expect(animation.reset).toHaveBeenCalledTimes(1);
expect(cb).not.toBeCalled();
@@ -667,7 +680,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(animation as $FlowFixMe);
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation);
loop.start(cb);
loop.stop();
@@ -689,10 +703,8 @@ describe('Animated', () => {
};
const cb = jest.fn();
const loop = Animated.loop(
animation as $FlowFixMe,
{resetBeforeIteration: false} as $FlowFixMe,
);
// $FlowFixMe[prop-missing]
const loop = Animated.loop(animation, {resetBeforeIteration: false});
expect(animation.start).not.toBeCalled();
@@ -718,7 +730,8 @@ describe('Animated', () => {
it('restarts sequence normally in a loop if resetBeforeIteration is false', () => {
const anim1 = {start: jest.fn(), stop: jest.fn()};
const anim2 = {start: jest.fn(), stop: jest.fn()};
const seq = Animated.sequence([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.sequence([anim1, anim2]);
// $FlowFixMe[prop-missing]
const loop = Animated.loop(seq, {resetBeforeIteration: false});
@@ -748,7 +761,9 @@ describe('Animated', () => {
it('works with an empty element in array', () => {
const anim1 = {start: jest.fn()};
const cb = jest.fn();
Animated.parallel([null as $FlowFixMe, anim1 as $FlowFixMe]).start(cb);
// $FlowFixMe[incompatible-call]
// $FlowFixMe[prop-missing]
Animated.parallel([null, anim1]).start(cb);
expect(anim1.start).toBeCalled();
anim1.start.mock.calls[0][0]({finished: true});
@@ -761,7 +776,9 @@ describe('Animated', () => {
const anim2 = {start: jest.fn()};
const cb = jest.fn();
const par = Animated.parallel([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
// $FlowFixMe[prop-missing]
const par = Animated.parallel([anim1, anim2]);
expect(anim1.start).not.toBeCalled();
expect(anim2.start).not.toBeCalled();
@@ -784,7 +801,8 @@ describe('Animated', () => {
const anim2 = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
const seq = Animated.parallel([anim1 as $FlowFixMe, anim2 as $FlowFixMe]);
// $FlowFixMe[prop-missing]
const seq = Animated.parallel([anim1, anim2]);
seq.start(cb);
seq.stop();
@@ -805,11 +823,8 @@ describe('Animated', () => {
const anim3 = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
const seq = Animated.parallel([
anim1 as $FlowFixMe,
anim2 as $FlowFixMe,
anim3 as $FlowFixMe,
]);
// $FlowFixMe[prop-missing]
const seq = Animated.parallel([anim1, anim2, anim3]);
seq.start(cb);
anim1.start.mock.calls[0][0]({finished: false});
@@ -836,7 +851,8 @@ describe('Animated', () => {
it('should call anim after delay in sequence', () => {
const anim = {start: jest.fn(), stop: jest.fn()};
const cb = jest.fn();
Animated.sequence([Animated.delay(1000), anim as $FlowFixMe]).start(cb);
// $FlowFixMe[prop-missing]
Animated.sequence([Animated.delay(1000), anim]).start(cb);
jest.runAllTimers();
expect(anim.start.mock.calls.length).toBe(1);
expect(cb).not.toBeCalled();
@@ -15,9 +15,7 @@ import type {
} from '../createAnimatedComponent';
import RefreshControl from '../../Components/RefreshControl/RefreshControl';
import ScrollView, {
type ScrollViewProps,
} from '../../Components/ScrollView/ScrollView';
import ScrollView from '../../Components/ScrollView/ScrollView';
import flattenStyle from '../../StyleSheet/flattenStyle';
import splitLayoutProps from '../../StyleSheet/splitLayoutProps';
import StyleSheet from '../../StyleSheet/StyleSheet';
@@ -28,20 +26,21 @@ import useAnimatedProps from '../useAnimatedProps';
import * as React from 'react';
import {cloneElement, useMemo} from 'react';
type AnimatedScrollViewProps = React.ElementConfig<typeof ScrollView>;
type AnimatedScrollViewInstance = React.ElementRef<typeof ScrollView>;
/**
* @see https://github.com/facebook/react-native/commit/b8c8562
*/
const AnimatedScrollView: AnimatedComponentType<
ScrollViewProps,
AnimatedScrollViewProps,
AnimatedScrollViewInstance,
> = function AnimatedScrollViewWithOrWithoutInvertedRefreshControl({
ref: forwardedRef,
...props
}: {
ref?: React.RefSetter<AnimatedScrollViewInstance>,
...AnimatedProps<ScrollViewProps>,
...AnimatedProps<AnimatedScrollViewProps>,
}) {
// (Android only) When a ScrollView has a RefreshControl and
// any `style` property set with an Animated.Value, the CSS
@@ -112,7 +111,7 @@ const AnimatedScrollViewWithInvertedRefreshControl =
// Handle animated props on `NativeDirectionalScrollView`.
const [scrollViewAnimatedProps, scrollViewRef] = useAnimatedProps<
ScrollViewProps,
AnimatedScrollViewProps,
AnimatedScrollViewInstance,
>(intermediatePropsForScrollView);
const ref = useMergeRefs<AnimatedScrollViewInstance>(
@@ -10,10 +10,13 @@
import type {AnimatedComponentType} from '../createAnimatedComponent';
import Text, {type TextProps} from '../../Text/Text';
import Text from '../../Text/Text';
import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(
(Text: $FlowFixMe),
): AnimatedComponentType<TextProps, React.ElementRef<typeof Text>>);
): AnimatedComponentType<
React.ElementConfig<typeof Text>,
React.ElementRef<typeof Text>,
>);
@@ -8,7 +8,6 @@
* @format
*/
import type {ViewProps} from '../../Components/View/ViewPropTypes';
import type {AnimatedComponentType} from '../createAnimatedComponent';
import View from '../../Components/View/View';
@@ -16,6 +15,6 @@ import createAnimatedComponent from '../createAnimatedComponent';
import * as React from 'react';
export default (createAnimatedComponent(View): AnimatedComponentType<
ViewProps,
React.ElementConfig<typeof View>,
React.ElementRef<typeof View>,
>);
@@ -21,7 +21,7 @@ import type AnimatedValue from './nodes/AnimatedValue';
import createAnimatedPropsHook from '../../src/private/animated/createAnimatedPropsHook';
import composeStyles from '../../src/private/styles/composeStyles';
import {type ViewProps} from '../Components/View/ViewPropTypes';
import View from '../Components/View/View';
import useMergeRefs from '../Utilities/useMergeRefs';
import * as React from 'react';
import {useMemo} from 'react';
@@ -60,7 +60,9 @@ type NonAnimatedProps =
| 'disabled'
| 'accessibilityLabel';
type PassThroughProps = $ReadOnly<{
passthroughAnimatedPropExplicitValues?: ViewProps | null,
passthroughAnimatedPropExplicitValues?: React.ElementConfig<
typeof View,
> | null,
}>;
export type AnimatedProps<Props: {...}> = {
@@ -13,6 +13,7 @@ import type {AnimatedNodeConfig} from './AnimatedNode';
import type {AnimatedStyleAllowlist} from './AnimatedStyle';
import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
import {findNodeHandle} from '../../ReactNative/RendererProxy';
import flattenStyle from '../../StyleSheet/flattenStyle';
import {AnimatedEvent} from '../AnimatedEvent';
@@ -57,7 +58,9 @@ function createAnimatedProps(
// we propagate the flattened `style` object to the `props` object.
const flatStyle = flattenStyle(value as $FlowFixMe);
node = AnimatedStyle.from(flatStyle, allowlist?.style, value);
staticValue = flatStyle;
if (ReactNativeFeatureFlags.alwaysFlattenAnimatedStyles()) {
staticValue = flatStyle;
}
}
} else if (value instanceof AnimatedNode) {
node = value;
@@ -161,7 +164,9 @@ export default class AnimatedProps extends AnimatedNode {
maybeNode.__replaceAnimatedNodeWithValues(mutableStyle);
props[key] = maybeNode.__getValueForStyle(mutableStyle);
} else {
props[key] = flatStaticStyle;
if (ReactNativeFeatureFlags.alwaysFlattenAnimatedStyles()) {
props[key] = flatStaticStyle;
}
}
} else if (maybeNode instanceof AnimatedNode) {
props[key] = maybeNode.__getValue();
@@ -42,7 +42,7 @@ Pod::Spec.new do |s|
s.author = "Meta Platforms, Inc. and its affiliates"
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("**/*.{c,h,m,mm,S,cpp}", "**/*.h")
s.source_files = "**/*.{c,h,m,mm,S,cpp}"
# This guard prevent to install the dependencies when we run `pod install` in the old architecture.
s.compiler_flags = other_cflags
@@ -30,7 +30,7 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.compiler_flags = '-Wno-nullability-completeness'
s.source = source
s.source_files = podspec_sources("*.{h,m,mm}", "**/*.h")
s.source_files = "*.{h,m,mm}"
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
s.header_dir = "RCTBlob"
s.pod_target_xcconfig = {
+4 -6
View File
@@ -281,12 +281,10 @@ export type ButtonProps = $ReadOnly<{
```
*/
const NativeTouchable:
| typeof TouchableNativeFeedback
| typeof TouchableOpacity =
const Touchable: typeof TouchableNativeFeedback | typeof TouchableOpacity =
Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity;
type ButtonRef = React.ElementRef<typeof NativeTouchable>;
type ButtonRef = React.ElementRef<typeof Touchable>;
const Button: component(
ref?: React.RefSetter<ButtonRef>,
@@ -364,7 +362,7 @@ const Button: component(
: importantForAccessibility;
return (
<NativeTouchable
<Touchable
accessible={accessible}
accessibilityActions={accessibilityActions}
onAccessibilityAction={onAccessibilityAction}
@@ -393,7 +391,7 @@ const Button: component(
{formattedTitle}
</Text>
</View>
</NativeTouchable>
</Touchable>
);
};
@@ -8,7 +8,6 @@
* @format
*/
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
import type {
GestureResponderEvent,
LayoutChangeEvent,
@@ -27,6 +26,8 @@ import useAndroidRippleForView, {
import * as React from 'react';
import {memo, useMemo, useRef, useState} from 'react';
type ViewStyleProp = React.ElementConfig<typeof View>['style'];
export type {PressableAndroidRippleConfig};
export type PressableStateCallbackType = $ReadOnly<{
@@ -24,7 +24,7 @@ import * as React from 'react';
* sensor housing area on iPhone X).
* @deprecated Use `react-native-safe-area-context` instead. This component will be removed in a future release.
*/
const SafeAreaView: component(
const exported: component(
ref?: React.RefSetter<React.ElementRef<typeof View>>,
...props: ViewProps
) = Platform.select({
@@ -32,4 +32,4 @@ const SafeAreaView: component(
default: View,
});
export default SafeAreaView;
export default exported;
@@ -10,7 +10,6 @@
import type * as React from 'react';
import {Constructor} from '../../../types/private/Utilities';
import {Insets} from '../../../types/public/Insets';
import {HostInstance} from '../../../types/public/ReactNativeTypes';
import {ColorValue, StyleProp} from '../../StyleSheet/StyleSheet';
import {ViewStyle} from '../../StyleSheet/StyleSheetTypes';
import {
@@ -678,9 +677,7 @@ export interface ScrollViewProps
* It's implemented using onLayout handler attached to the content container which this ScrollView renders.
*
*/
onContentSizeChange?:
| ((contentWidth: number, contentHeight: number) => void)
| undefined;
onContentSizeChange?: ((w: number, h: number) => void) | undefined;
/**
* Fires at most once per frame during scrolling.
@@ -881,12 +878,6 @@ export class ScrollView extends ScrollViewBase {
// Undocumented
getInnerViewNode(): any;
/**
* Returns a reference to the underlying native scroll view, or null if the
* native instance is not mounted.
*/
getNativeScrollRef: () => HostInstance | null;
/**
* @deprecated Use scrollTo instead
*/

Some files were not shown because too many files have changed in this diff Show More