mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Compare commits
44
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3ab6be778d | ||
|
|
f94ca27986 | ||
|
|
fddf7aaad1 | ||
|
|
bed778fa5a | ||
|
|
b4a24a163c | ||
|
|
496b0a8729 | ||
|
|
4a119c4c3a | ||
|
|
5c3c1524dd | ||
|
|
b7ec7523cc | ||
|
|
39dfbadd5d | ||
|
|
ef6b6f315c | ||
|
|
120a12f01a | ||
|
|
2dcffef5c4 | ||
|
|
a72c35f98c | ||
|
|
c4f58d2452 | ||
|
|
d2a91617da | ||
|
|
bbe714e487 | ||
|
|
72bd840dd3 | ||
|
|
2168dca4ac | ||
|
|
d8cfd98070 | ||
|
|
d7d5de9f96 | ||
|
|
d1fb01cd85 | ||
|
|
19b0acf754 | ||
|
|
06071c68d5 | ||
|
|
ba41228a66 | ||
|
|
f489944051 | ||
|
|
8c50bf0beb | ||
|
|
287e200332 | ||
|
|
1f62529dc4 | ||
|
|
3956955eaa | ||
|
|
83d38501b8 | ||
|
|
d7d5535fe1 | ||
|
|
0e7ba9094e | ||
|
|
5a6a42c7d0 | ||
|
|
fe656be26e | ||
|
|
c9a96715ef | ||
|
|
027b8032c2 | ||
|
|
35f0e1cca2 | ||
|
|
dd472101b7 | ||
|
|
623d481991 | ||
|
|
cba1d4bae7 | ||
|
|
44f2a08371 | ||
|
|
d7550293a2 | ||
|
|
cc1d2853fb |
@@ -8,7 +8,7 @@ runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
with:
|
||||
gradle-version: wrapper
|
||||
# We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`).
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
name: test-library-on-nightly
|
||||
description: Tests a library on a nightly
|
||||
inputs:
|
||||
library-npm-package:
|
||||
description: The library npm package to add
|
||||
required: true
|
||||
platform:
|
||||
description: whether we want to build for iOS or Android
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Create new app
|
||||
shell: bash
|
||||
run: |
|
||||
cd /tmp
|
||||
npx @react-native-community/cli init RNApp --skip-install --version nightly
|
||||
- name: Add library
|
||||
shell: bash
|
||||
run: |
|
||||
cd /tmp/RNApp
|
||||
yarn add ${{ inputs.library-npm-package }}
|
||||
|
||||
- name: Build iOS
|
||||
shell: bash
|
||||
if: ${{ inputs.platform == 'ios' }}
|
||||
run: |
|
||||
cd /tmp/RNApp/ios
|
||||
bundle install
|
||||
bundle exec pod install
|
||||
cd ..
|
||||
yarn ios
|
||||
- name: Setup Java for Android
|
||||
if: ${{ inputs.platform == 'android' }}
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'zulu'
|
||||
- name: Build Android
|
||||
shell: bash
|
||||
if: ${{ inputs.platform == 'android' }}
|
||||
run: |
|
||||
cd /tmp/RNApp/android
|
||||
./gradlew assembleDebug
|
||||
@@ -48,96 +48,84 @@ module.exports = async (github, context, labelWithContext) => {
|
||||
switch (labelWithContext.label) {
|
||||
case 'Type: Invalid':
|
||||
await addComment(
|
||||
`| :warning: | Issue is Invalid |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | This issue doesn't match any of the expected types for this repository - closing. |`,
|
||||
`> [!CAUTION]` +
|
||||
`> **Invalid issue**: This issue is not valid, either is not a bug in React Native, it doesn't match any of the issue template, or we can't help further with this.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Question':
|
||||
await addComment(
|
||||
`| :warning: | Issue is a Question |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/). |`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Docs':
|
||||
await addComment(
|
||||
`| :warning: | Documentation Issue |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | Please report documentation issues in the [react-native-website](https://github.com/facebook/react-native-website/issues) repository. |`,
|
||||
`> [!NOTE]` +
|
||||
`> **Not a bug report**: This issue looks like a question. We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/).`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Resolution: For Stack Overflow':
|
||||
await addComment(
|
||||
`| :warning: | Issue is a Question |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We are using GitHub issues exclusively to track bugs in the core React Native library. Please try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) as it is better suited for this type of question. |`,
|
||||
`> [!NOTE]` +
|
||||
`> **Not a bug report**: This issue looks like a question. We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/).`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Docs':
|
||||
await addComment(
|
||||
`> [!NOTE]` +
|
||||
`> **Docs issue**: This issue looks like an issue related to our docs. Please report documentation issues in the [react-native-website](https://github.com/facebook/react-native-website/issues) repository.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Type: Expo':
|
||||
await addComment(
|
||||
`| :warning: | Issue is Related to Expo |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue is related to Expo and not React Native core. Please open your issue in [Expo's repository](https://github.com/expo/expo/issues/new). If you are able to create a repro that showcases that this issue is also happening in React Native vanilla, we will be happy to re-open. |`,
|
||||
`> [!NOTE]` +
|
||||
`> **Expo related**: It looks like your issue is related to Expo and not React Native core. Please open your issue in [Expo's repository](https://github.com/expo/expo/issues/new). If you are able to create a repro that showcases that this issue is also happening in React Native vanilla, we will be happy to re-open.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
case 'Needs: Issue Template':
|
||||
await addComment(
|
||||
`| :warning: | Missing Required Fields |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a [new issue is created](https://github.com/facebook/react-native/issues/new?template=bug_report.md). Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one. |`,
|
||||
`> [!WARNING]` +
|
||||
`> **Missing issue template**: It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a [new issue is created](https://github.com/facebook/react-native/issues/new?assignees=&labels=Needs%3A+Triage+%3Amag%3A&projects=&template=bug_report.yml). Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Needs: Environment Info':
|
||||
await addComment(
|
||||
`| :warning: | Missing Environment Information |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running <code>react-native info</code> in a console. |`,
|
||||
`> [!WARNING]` +
|
||||
`> **Missing info**: It looks like your issue may be missing information about your development environment. You can obtain the missing information by running <code>react-native info</code> in a console.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Newer Patch Available':
|
||||
await addComment(
|
||||
`| :warning: | Newer Version of React Native is Available! |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases. |`,
|
||||
`> [!TIP]` +
|
||||
`> **Newer version available**: You are on a supported minor version, but it looks like there's a newer patch available - ${labelWithContext.newestPatch}. Please [upgrade](https://reactnative.dev/docs/upgrading) to the highest patch for your minor or latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If it does not repro, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the most recent releases.`,
|
||||
);
|
||||
return;
|
||||
case 'Needs: Version Info':
|
||||
await addComment(
|
||||
`| :warning: | Add or Reformat Version Info |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.70.2 |`,
|
||||
`> [!WARNING]` +
|
||||
`> **Could not parse version**: We could not find or parse the version number of React Native in your issue report. Please use the template, and report your version including major, minor, and patch numbers - e.g. 0.76.2.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Needs: Repro':
|
||||
await addComment(
|
||||
`| :warning: | Missing Reproducible Example |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not detect a reproducible example in your issue report. Please provide either: <br /><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/update related: use our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li></ul> |`,
|
||||
`> [!WARNING]` +
|
||||
`> **Missing reproducer**: We could not detect a reproducible example in your issue report. Please provide either: <br/><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/upgrade related: a project using our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate)</li><li>Otherwise send us a Pull Request with the [RNTesterPlayground.js](https://github.com/facebook/react-native/blob/main/packages/rn-tester/js/examples/Playground/RNTesterPlayground.js) edited to reproduce your bug.</li></ul>`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Type: Unsupported Version':
|
||||
await addComment(
|
||||
`| :warning: | Unsupported Version of React Native |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue or the example you provided uses an [unsupported version of React Native](https://github.com/reactwg/react-native-releases/blob/main/README.md#releases-support-policy).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support. |`,
|
||||
`> [!WARNING]` +
|
||||
`> **Unsupported version**: It looks like your issue or the example you provided uses an [unsupported version of React Native](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support.`,
|
||||
);
|
||||
await requestAuthorFeedback();
|
||||
return;
|
||||
case 'Type: Too Old Version':
|
||||
await addComment(
|
||||
`| :warning: | Too Old Version of React Native |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | It looks like your issue or the example you provided uses a [**Too Old Version of React Native**](https://github.com/reactwg/react-native-releases/blob/main/README.md#releases-support-policy).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support. |`,
|
||||
`> [!CAUTION]` +
|
||||
`> **Too old version**: It looks like your issue or the example you provided uses a [**Too Old Version of React Native**](https://github.com/reactwg/react-native-releases/blob/main/docs/support.md).<br/><br/>Due to the number of issues we receive, we're currently only accepting new issues against one of the supported versions. Please [upgrade](https://reactnative.dev/docs/upgrading) to latest and verify if the issue persists (alternatively, create a new project and repro the issue in it). If you cannot upgrade, please open your issue on [StackOverflow](https://stackoverflow.com/questions/tagged/react-native) to get further community support.`,
|
||||
);
|
||||
await closeIssue();
|
||||
return;
|
||||
|
||||
@@ -9,11 +9,6 @@
|
||||
|
||||
const NEEDS_REPRO_LABEL = 'Needs: Repro';
|
||||
const NEEDS_AUTHOR_FEEDBACK_LABEL = 'Needs: Author Feedback';
|
||||
const NEEDS_REPRO_HEADER = 'Missing Reproducible Example';
|
||||
const NEEDS_REPRO_MESSAGE =
|
||||
`| :warning: | Missing Reproducible Example |\n` +
|
||||
`| --- | --- |\n` +
|
||||
`| :information_source: | We could not detect a reproducible example in your issue report. Please provide either: <br /><ul><li>If your bug is UI related: a [Snack](https://snack.expo.dev)</li><li> If your bug is build/update related: use our [Reproducer Template](https://github.com/react-native-community/reproducer-react-native/generate). A reproducer needs to be in a GitHub repository under your username.</li></ul> |`;
|
||||
const SKIP_ISSUES_OLDER_THAN = '2023-07-01T00:00:00Z';
|
||||
|
||||
module.exports = async (github, context) => {
|
||||
@@ -25,7 +20,6 @@ module.exports = async (github, context) => {
|
||||
|
||||
const issue = await github.rest.issues.get(issueData);
|
||||
const comments = await github.rest.issues.listComments(issueData);
|
||||
|
||||
const author = issue.data.user.login;
|
||||
|
||||
const issueDate = issue.data.created_at;
|
||||
@@ -43,10 +37,6 @@ module.exports = async (github, context) => {
|
||||
return;
|
||||
}
|
||||
|
||||
const botComment = comments.data.find(comment =>
|
||||
comment.body.includes(NEEDS_REPRO_HEADER),
|
||||
);
|
||||
|
||||
const entities = [issue.data, ...comments.data];
|
||||
|
||||
// Look for Snack or a GH repo associated with the user that added an issue or comment
|
||||
@@ -74,25 +64,11 @@ module.exports = async (github, context) => {
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
if (!botComment) return;
|
||||
|
||||
await github.rest.issues.deleteComment({
|
||||
...issueData,
|
||||
comment_id: botComment.id,
|
||||
});
|
||||
} else {
|
||||
await github.rest.issues.addLabels({
|
||||
...issueData,
|
||||
labels: [NEEDS_REPRO_LABEL, NEEDS_AUTHOR_FEEDBACK_LABEL],
|
||||
});
|
||||
|
||||
if (botComment) return;
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
...issueData,
|
||||
body: NEEDS_REPRO_MESSAGE,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -101,7 +77,7 @@ function containsPattern(body, pattern) {
|
||||
return body.search(regexp) !== -1;
|
||||
}
|
||||
|
||||
// Prevents the bot from responding when maintainer has changed Needs: Repro the label
|
||||
// Prevents the bot from responding when maintainer has changed the 'Needs: Repro' label
|
||||
async function hasMaintainerChangedLabel(github, issueData, author) {
|
||||
const timeline = await github.rest.issues.listEventsForTimeline(issueData);
|
||||
|
||||
|
||||
@@ -10,11 +10,6 @@
|
||||
module.exports = async (github, context) => {
|
||||
const issue = context.payload.issue;
|
||||
|
||||
// Ignore issues using upgrade template (they use a special label)
|
||||
if (issue.labels.find(label => label.name === 'Type: Upgrade Issue')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const issueVersionUnparsed =
|
||||
getReactNativeVersionFromIssueBodyIfExists(issue);
|
||||
const issueVersion = parseVersionFromString(issueVersionUnparsed);
|
||||
|
||||
@@ -24,3 +24,5 @@ jobs:
|
||||
else
|
||||
echo 'Nightly Worked, All Good!'
|
||||
fi
|
||||
- name: Test Libraries
|
||||
uses: ./.github/workflows/test-libraries-on-nightlies.yml
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
name: "Validate Gradle Wrapper"
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
validation:
|
||||
name: "Validation"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: gradle/actions/wrapper-validation@v3
|
||||
@@ -0,0 +1,75 @@
|
||||
name: Test Libraries on Nightlies
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
test-library-on-nightly-android:
|
||||
name: "[Android] ${{ matrix.library }}"
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
library: [
|
||||
"react-native-async-storage",
|
||||
"react-native-blob-util",
|
||||
"@react-native-clipboard/clipboard",
|
||||
"@react-native-community/datetimepicker",
|
||||
"react-native-gesture-handler",
|
||||
"react-native-image-picker",
|
||||
"react-native-linear-gradient",
|
||||
"@react-native-masked-view/masked-view",
|
||||
"react-native-maps",
|
||||
"@react-native-community/netinfo",
|
||||
"react-native-reanimated",
|
||||
"react-native-svg",
|
||||
"react-native-video",
|
||||
"react-native-webview",
|
||||
"react-native-mmkv",
|
||||
"react-native-screens",
|
||||
"react-native-pager-view",
|
||||
"@react-native-community/slider"
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Test ${{ inputs.library-name }}
|
||||
uses: ./.github/actions/test-library-on-nightly
|
||||
with:
|
||||
library-npm-package: ${{ matrix.library }}
|
||||
platform: android
|
||||
|
||||
test-library-on-nightly-ios:
|
||||
name: "[iOS] ${{ matrix.library }}"
|
||||
runs-on: macos-13-large
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
library: [
|
||||
"react-native-async-storage",
|
||||
"react-native-blob-util",
|
||||
"@react-native-clipboard/clipboard",
|
||||
"@react-native-community/datetimepicker",
|
||||
"react-native-gesture-handler",
|
||||
"react-native-image-picker",
|
||||
"react-native-linear-gradient",
|
||||
"@react-native-masked-view/masked-view",
|
||||
"react-native-maps",
|
||||
"@react-native-community/netinfo",
|
||||
"react-native-reanimated",
|
||||
"react-native-svg",
|
||||
"react-native-video",
|
||||
"react-native-webview",
|
||||
"react-native-mmkv",
|
||||
"react-native-screens",
|
||||
"react-native-pager-view",
|
||||
"@react-native-community/slider"
|
||||
]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Test ${{ inputs.library-name }}
|
||||
uses: ./.github/actions/test-library-on-nightly
|
||||
with:
|
||||
library-npm-package: ${{ matrix.library }}
|
||||
platform: ios
|
||||
@@ -22,7 +22,7 @@ import attachKeyHandlers from './attachKeyHandlers';
|
||||
import {
|
||||
createDevServerMiddleware,
|
||||
indexPageMiddleware,
|
||||
} from '@react-native-community/cli-server-api';
|
||||
} from './middleware';
|
||||
import {createDevMiddleware} from '@react-native/dev-middleware';
|
||||
import chalk from 'chalk';
|
||||
import Metro from 'metro';
|
||||
|
||||
+7
-4
@@ -59,15 +59,15 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
|
||||
val cxxModuleCMakeListsPath = dep.cxxModuleCMakeListsPath
|
||||
if (libraryName != null && cmakeListsPath != null) {
|
||||
// If user provided a custom cmakeListsPath, let's honor it.
|
||||
val nativeFolderPath = cmakeListsPath.replace("CMakeLists.txt", "")
|
||||
val nativeFolderPath = sanitizeCmakeListsPath(cmakeListsPath)
|
||||
addDirectoryString +=
|
||||
"add_subdirectory($nativeFolderPath ${libraryName}_autolinked_build)"
|
||||
"add_subdirectory(\"$nativeFolderPath\" ${libraryName}_autolinked_build)"
|
||||
}
|
||||
if (cxxModuleCMakeListsPath != null) {
|
||||
// If user provided a custom cxxModuleCMakeListsPath, let's honor it.
|
||||
val nativeFolderPath = cxxModuleCMakeListsPath.replace("CMakeLists.txt", "")
|
||||
val nativeFolderPath = sanitizeCmakeListsPath(cxxModuleCMakeListsPath)
|
||||
addDirectoryString +=
|
||||
"\nadd_subdirectory($nativeFolderPath ${libraryName}_cxxmodule_autolinked_build)"
|
||||
"\nadd_subdirectory(\"$nativeFolderPath\" ${libraryName}_cxxmodule_autolinked_build)"
|
||||
}
|
||||
addDirectoryString
|
||||
}
|
||||
@@ -159,6 +159,9 @@ abstract class GenerateAutolinkingNewArchitecturesFileTask : DefaultTask() {
|
||||
const val COMPONENT_DESCRIPTOR_FILENAME = "ComponentDescriptors.h"
|
||||
const val COMPONENT_INCLUDE_PATH = "react/renderer/components"
|
||||
|
||||
internal fun sanitizeCmakeListsPath(cmakeListsPath: String): String =
|
||||
cmakeListsPath.replace("CMakeLists.txt", "").replace(" ", "\\ ")
|
||||
|
||||
// language=cmake
|
||||
val CMAKE_TEMPLATE =
|
||||
"""
|
||||
|
||||
+23
-4
@@ -11,6 +11,7 @@ import com.facebook.react.model.ModelAutolinkingConfigJson
|
||||
import com.facebook.react.model.ModelAutolinkingDependenciesJson
|
||||
import com.facebook.react.model.ModelAutolinkingDependenciesPlatformAndroidJson
|
||||
import com.facebook.react.model.ModelAutolinkingDependenciesPlatformJson
|
||||
import com.facebook.react.tasks.GenerateAutolinkingNewArchitecturesFileTask.Companion.sanitizeCmakeListsPath
|
||||
import com.facebook.react.tests.createTestTask
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.junit.Rule
|
||||
@@ -145,9 +146,9 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
# or link against a old prefab target (this is needed for React Native 0.76 on).
|
||||
set(REACTNATIVE_MERGED_SO true)
|
||||
|
||||
add_subdirectory(./a/directory/ aPackage_autolinked_build)
|
||||
add_subdirectory(./another/directory/ anotherPackage_autolinked_build)
|
||||
add_subdirectory(./another/directory/cxx/ anotherPackage_cxxmodule_autolinked_build)
|
||||
add_subdirectory("./a/directory/" aPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/with\ spaces/" anotherPackage_autolinked_build)
|
||||
add_subdirectory("./another/directory/cxx/" anotherPackage_cxxmodule_autolinked_build)
|
||||
|
||||
set(AUTOLINKED_LIBRARIES
|
||||
react_codegen_aPackage
|
||||
@@ -258,6 +259,24 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
.trimIndent())
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sanitizeCmakeListsPath_withPathEndingWithFileName_removesFilename() {
|
||||
val input = "./a/directory/CMakeLists.txt"
|
||||
assertThat(sanitizeCmakeListsPath(input)).isEqualTo("./a/directory/")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sanitizeCmakeListsPath_withSpaces_removesSpaces() {
|
||||
val input = "./a/dir ectory/with spaces/"
|
||||
assertThat(sanitizeCmakeListsPath(input)).isEqualTo("./a/dir\\ ectory/with\\ spaces/")
|
||||
}
|
||||
|
||||
@Test
|
||||
fun sanitizeCmakeListsPath_withPathEndingWithFileNameAndSpaces_sanitizesIt() {
|
||||
val input = "./a/dir ectory/CMakeLists.txt"
|
||||
assertThat(sanitizeCmakeListsPath(input)).isEqualTo("./a/dir\\ ectory/")
|
||||
}
|
||||
|
||||
private val testDependencies =
|
||||
listOf(
|
||||
ModelAutolinkingDependenciesPlatformAndroidJson(
|
||||
@@ -276,7 +295,7 @@ class GenerateAutolinkingNewArchitecturesFileTaskTest {
|
||||
buildTypes = emptyList(),
|
||||
libraryName = "anotherPackage",
|
||||
componentDescriptors = listOf("AnotherPackageComponentDescriptor"),
|
||||
cmakeListsPath = "./another/directory/CMakeLists.txt",
|
||||
cmakeListsPath = "./another/directory/with spaces/CMakeLists.txt",
|
||||
cxxModuleCMakeListsPath = "./another/directory/cxx/CMakeLists.txt",
|
||||
cxxModuleHeaderName = "AnotherCxxModule",
|
||||
cxxModuleCMakeListsModuleName = "another_cxxModule",
|
||||
|
||||
+10
-3
@@ -286,6 +286,11 @@ export interface UnsafeAnyTypeAnnotation {
|
||||
readonly type: 'AnyTypeAnnotation',
|
||||
}
|
||||
|
||||
export interface NativeModuleNumberLiteralTypeAnnotation {
|
||||
readonly type: 'NumberLiteralTypeAnnotation';
|
||||
readonly value: number;
|
||||
}
|
||||
|
||||
export interface NativeModuleStringTypeAnnotation {
|
||||
readonly type: 'StringTypeAnnotation';
|
||||
}
|
||||
@@ -320,10 +325,10 @@ export interface NativeModuleBooleanTypeAnnotation {
|
||||
readonly type: 'BooleanTypeAnnotation';
|
||||
}
|
||||
|
||||
export type NativeModuleEnumMembers = readonly {
|
||||
export type NativeModuleEnumMember = {
|
||||
readonly name: string;
|
||||
readonly value: string | number;
|
||||
}[];
|
||||
};
|
||||
|
||||
export type NativeModuleEnumMemberType =
|
||||
| 'NumberTypeAnnotation'
|
||||
@@ -339,7 +344,7 @@ export interface NativeModuleEnumDeclarationWithMembers {
|
||||
name: string;
|
||||
type: 'EnumDeclarationWithMembers';
|
||||
memberType: NativeModuleEnumMemberType;
|
||||
members: NativeModuleEnumMembers;
|
||||
members: readonly NativeModuleEnumMember[];
|
||||
}
|
||||
|
||||
export interface NativeModuleGenericObjectTypeAnnotation {
|
||||
@@ -380,6 +385,7 @@ export type NativeModuleEventEmitterBaseTypeAnnotation =
|
||||
| NativeModuleFloatTypeAnnotation
|
||||
| NativeModuleInt32TypeAnnotation
|
||||
| NativeModuleNumberTypeAnnotation
|
||||
| NativeModuleNumberLiteralTypeAnnotation
|
||||
| NativeModuleStringTypeAnnotation
|
||||
| NativeModuleStringLiteralTypeAnnotation
|
||||
| NativeModuleStringLiteralUnionTypeAnnotation
|
||||
@@ -399,6 +405,7 @@ export type NativeModuleBaseTypeAnnotation =
|
||||
| NativeModuleStringLiteralTypeAnnotation
|
||||
| NativeModuleStringLiteralUnionTypeAnnotation
|
||||
| NativeModuleNumberTypeAnnotation
|
||||
| NativeModuleNumberLiteralTypeAnnotation
|
||||
| NativeModuleInt32TypeAnnotation
|
||||
| NativeModuleDoubleTypeAnnotation
|
||||
| NativeModuleFloatTypeAnnotation
|
||||
|
||||
+12
-7
@@ -37,6 +37,11 @@ export type Int32TypeAnnotation = $ReadOnly<{
|
||||
type: 'Int32TypeAnnotation',
|
||||
}>;
|
||||
|
||||
export type NumberLiteralTypeAnnotation = $ReadOnly<{
|
||||
type: 'NumberLiteralTypeAnnotation',
|
||||
value: number,
|
||||
}>;
|
||||
|
||||
export type StringTypeAnnotation = $ReadOnly<{
|
||||
type: 'StringTypeAnnotation',
|
||||
}>;
|
||||
@@ -304,12 +309,10 @@ export type NativeModuleNumberTypeAnnotation = $ReadOnly<{
|
||||
type: 'NumberTypeAnnotation',
|
||||
}>;
|
||||
|
||||
export type NativeModuleEnumMembers = $ReadOnlyArray<
|
||||
$ReadOnly<{
|
||||
name: string,
|
||||
value: string | number,
|
||||
}>,
|
||||
>;
|
||||
export type NativeModuleEnumMember = {
|
||||
name: string,
|
||||
value: string | number,
|
||||
};
|
||||
|
||||
export type NativeModuleEnumMemberType =
|
||||
| 'NumberTypeAnnotation'
|
||||
@@ -325,7 +328,7 @@ export type NativeModuleEnumDeclarationWithMembers = {
|
||||
name: string,
|
||||
type: 'EnumDeclarationWithMembers',
|
||||
memberType: NativeModuleEnumMemberType,
|
||||
members: NativeModuleEnumMembers,
|
||||
members: $ReadOnlyArray<NativeModuleEnumMember>,
|
||||
};
|
||||
|
||||
export type NativeModuleGenericObjectTypeAnnotation = $ReadOnly<{
|
||||
@@ -366,6 +369,7 @@ type NativeModuleEventEmitterBaseTypeAnnotation =
|
||||
| FloatTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| NativeModuleNumberTypeAnnotation
|
||||
| NumberLiteralTypeAnnotation
|
||||
| StringTypeAnnotation
|
||||
| StringLiteralTypeAnnotation
|
||||
| StringLiteralUnionTypeAnnotation
|
||||
@@ -385,6 +389,7 @@ export type NativeModuleBaseTypeAnnotation =
|
||||
| StringLiteralTypeAnnotation
|
||||
| StringLiteralUnionTypeAnnotation
|
||||
| NativeModuleNumberTypeAnnotation
|
||||
| NumberLiteralTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| DoubleTypeAnnotation
|
||||
| FloatTypeAnnotation
|
||||
|
||||
@@ -186,6 +186,8 @@ function serializeArg(
|
||||
return wrap(val => `${val}.asNumber()`);
|
||||
case 'Int32TypeAnnotation':
|
||||
return wrap(val => `${val}.asNumber()`);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrap(val => `${val}.asNumber()`);
|
||||
case 'ArrayTypeAnnotation':
|
||||
return wrap(val => `${val}.asObject(rt).asArray(rt)`);
|
||||
case 'FunctionTypeAnnotation':
|
||||
|
||||
@@ -16,7 +16,7 @@ import type {
|
||||
import type {
|
||||
NativeModuleAliasMap,
|
||||
NativeModuleEnumMap,
|
||||
NativeModuleEnumMembers,
|
||||
NativeModuleEnumMember,
|
||||
NativeModuleEnumMemberType,
|
||||
NativeModuleEventEmitterShape,
|
||||
NativeModuleFunctionTypeAnnotation,
|
||||
@@ -179,6 +179,8 @@ function translatePrimitiveJSTypeToCpp(
|
||||
return wrapOptional('jsi::String', isRequired);
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'DoubleTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
@@ -407,7 +409,7 @@ struct Bridging<${enumName}> {
|
||||
function generateEnum(
|
||||
hasteModuleName: string,
|
||||
origEnumName: string,
|
||||
members: NativeModuleEnumMembers,
|
||||
members: $ReadOnlyArray<NativeModuleEnumMember>,
|
||||
memberType: NativeModuleEnumMemberType,
|
||||
): string {
|
||||
const enumName = getEnumName(hasteModuleName, origEnumName);
|
||||
|
||||
+7
@@ -136,6 +136,7 @@ function translateEventEmitterTypeToJavaType(
|
||||
case 'StringLiteralUnionTypeAnnotation':
|
||||
return 'String';
|
||||
case 'NumberTypeAnnotation':
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
case 'FloatTypeAnnotation':
|
||||
case 'DoubleTypeAnnotation':
|
||||
case 'Int32TypeAnnotation':
|
||||
@@ -203,6 +204,8 @@ function translateFunctionParamToJavaType(
|
||||
return wrapOptional('String', isRequired);
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'DoubleTypeAnnotation':
|
||||
@@ -297,6 +300,8 @@ function translateFunctionReturnTypeToJavaType(
|
||||
return wrapOptional('String', isRequired);
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapOptional('double', isRequired);
|
||||
case 'DoubleTypeAnnotation':
|
||||
@@ -373,6 +378,8 @@ function getFalsyReturnStatementFromReturnType(
|
||||
return '';
|
||||
case 'NumberTypeAnnotation':
|
||||
return nullable ? 'return null;' : 'return 0;';
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return nullable ? 'return null;' : 'return 0;';
|
||||
case 'FloatTypeAnnotation':
|
||||
return nullable ? 'return null;' : 'return 0.0;';
|
||||
case 'DoubleTypeAnnotation':
|
||||
|
||||
@@ -197,6 +197,8 @@ function translateReturnTypeToKind(
|
||||
}
|
||||
case 'NumberTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'FloatTypeAnnotation':
|
||||
@@ -280,6 +282,8 @@ function translateParamTypeToJniType(
|
||||
}
|
||||
case 'NumberTypeAnnotation':
|
||||
return !isRequired ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return !isRequired ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return !isRequired ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'FloatTypeAnnotation':
|
||||
@@ -360,6 +364,8 @@ function translateReturnTypeToJniType(
|
||||
}
|
||||
case 'NumberTypeAnnotation':
|
||||
return nullable ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return nullable ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'DoubleTypeAnnotation':
|
||||
return nullable ? 'Ljava/lang/Double;' : 'D';
|
||||
case 'FloatTypeAnnotation':
|
||||
|
||||
Vendored
+2
@@ -23,6 +23,7 @@ import type {
|
||||
NativeModuleObjectTypeAnnotation,
|
||||
NativeModuleTypeAliasTypeAnnotation,
|
||||
Nullable,
|
||||
NumberLiteralTypeAnnotation,
|
||||
ReservedTypeAnnotation,
|
||||
StringLiteralTypeAnnotation,
|
||||
StringLiteralUnionTypeAnnotation,
|
||||
@@ -63,6 +64,7 @@ export type StructTypeAnnotation =
|
||||
| StringLiteralTypeAnnotation
|
||||
| StringLiteralUnionTypeAnnotation
|
||||
| NativeModuleNumberTypeAnnotation
|
||||
| NumberLiteralTypeAnnotation
|
||||
| Int32TypeAnnotation
|
||||
| DoubleTypeAnnotation
|
||||
| FloatTypeAnnotation
|
||||
|
||||
+4
@@ -100,6 +100,8 @@ function toObjCType(
|
||||
return 'NSString *';
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'Int32TypeAnnotation':
|
||||
@@ -183,6 +185,8 @@ function toObjCValue(
|
||||
return value;
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapPrimitive('double');
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapPrimitive('double');
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapPrimitive('double');
|
||||
case 'Int32TypeAnnotation':
|
||||
|
||||
+4
@@ -91,6 +91,8 @@ function toObjCType(
|
||||
return 'NSString *';
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapCxxOptional('double', isRequired);
|
||||
case 'Int32TypeAnnotation':
|
||||
@@ -173,6 +175,8 @@ function toObjCValue(
|
||||
return RCTBridgingTo('String');
|
||||
case 'NumberTypeAnnotation':
|
||||
return RCTBridgingTo('Double');
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return RCTBridgingTo('Double');
|
||||
case 'FloatTypeAnnotation':
|
||||
return RCTBridgingTo('Double');
|
||||
case 'Int32TypeAnnotation':
|
||||
|
||||
Vendored
+1
@@ -25,6 +25,7 @@ function getEventEmitterTypeObjCType(
|
||||
case 'StringLiteralUnionTypeAnnotation':
|
||||
return 'NSString *_Nonnull';
|
||||
case 'NumberTypeAnnotation':
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return 'NSNumber *_Nonnull';
|
||||
case 'BooleanTypeAnnotation':
|
||||
return 'BOOL';
|
||||
|
||||
Vendored
+6
@@ -263,6 +263,8 @@ function getParamObjCType(
|
||||
return notStruct(wrapOptional('NSString *', !nullable));
|
||||
case 'NumberTypeAnnotation':
|
||||
return notStruct(isRequired ? 'double' : 'NSNumber *');
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return notStruct(isRequired ? 'double' : 'NSNumber *');
|
||||
case 'FloatTypeAnnotation':
|
||||
return notStruct(isRequired ? 'float' : 'NSNumber *');
|
||||
case 'DoubleTypeAnnotation':
|
||||
@@ -344,6 +346,8 @@ function getReturnObjCType(
|
||||
return wrapOptional('NSString *', isRequired);
|
||||
case 'NumberTypeAnnotation':
|
||||
return wrapOptional('NSNumber *', isRequired);
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return wrapOptional('NSNumber *', isRequired);
|
||||
case 'FloatTypeAnnotation':
|
||||
return wrapOptional('NSNumber *', isRequired);
|
||||
case 'DoubleTypeAnnotation':
|
||||
@@ -414,6 +418,8 @@ function getReturnJSType(
|
||||
return 'StringKind';
|
||||
case 'NumberTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'NumberLiteralTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'FloatTypeAnnotation':
|
||||
return 'NumberKind';
|
||||
case 'DoubleTypeAnnotation':
|
||||
|
||||
+1
@@ -126,6 +126,7 @@ import * as TurboModuleRegistry from '../TurboModuleRegistry';
|
||||
export interface Spec extends TurboModule {
|
||||
+passBool?: (arg: boolean) => void;
|
||||
+passNumber: (arg: number) => void;
|
||||
+passNumberLiteral: (arg: 4) => void;
|
||||
+passString: (arg: string) => void;
|
||||
+passStringish: (arg: Stringish) => void;
|
||||
+passStringLiteral: (arg: 'A String Literal') => void;
|
||||
|
||||
+20
@@ -978,6 +978,26 @@ exports[`RN Codegen Flow Parser can generate fixture NATIVE_MODULE_WITH_BASIC_PA
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': 'passNumberLiteral',
|
||||
'optional': false,
|
||||
'typeAnnotation': {
|
||||
'type': 'FunctionTypeAnnotation',
|
||||
'returnTypeAnnotation': {
|
||||
'type': 'VoidTypeAnnotation'
|
||||
},
|
||||
'params': [
|
||||
{
|
||||
'name': 'arg',
|
||||
'optional': false,
|
||||
'typeAnnotation': {
|
||||
'type': 'NumberLiteralTypeAnnotation',
|
||||
'value': 4
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': 'passString',
|
||||
'optional': false,
|
||||
|
||||
@@ -38,6 +38,7 @@ const {
|
||||
emitCommonTypes,
|
||||
emitDictionary,
|
||||
emitFunction,
|
||||
emitNumberLiteral,
|
||||
emitPromise,
|
||||
emitRootTag,
|
||||
emitUnion,
|
||||
@@ -243,6 +244,9 @@ function translateTypeAnnotation(
|
||||
case 'UnionTypeAnnotation': {
|
||||
return emitUnion(nullable, hasteModuleName, typeAnnotation, parser);
|
||||
}
|
||||
case 'NumberLiteralTypeAnnotation': {
|
||||
return emitNumberLiteral(nullable, typeAnnotation.value);
|
||||
}
|
||||
case 'StringLiteralTypeAnnotation': {
|
||||
return wrapNullable(nullable, {
|
||||
type: 'StringLiteralTypeAnnotation',
|
||||
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
NamedShape,
|
||||
NativeModuleAliasMap,
|
||||
NativeModuleEnumMap,
|
||||
NativeModuleEnumMembers,
|
||||
NativeModuleEnumMember,
|
||||
NativeModuleEnumMemberType,
|
||||
NativeModuleParamTypeAnnotation,
|
||||
Nullable,
|
||||
@@ -227,7 +227,9 @@ class FlowParser implements Parser {
|
||||
});
|
||||
}
|
||||
|
||||
parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers {
|
||||
parseEnumMembers(
|
||||
typeAnnotation: $FlowFixMe,
|
||||
): $ReadOnlyArray<NativeModuleEnumMember> {
|
||||
return typeAnnotation.members.map(member => ({
|
||||
name: member.id.name,
|
||||
value: member.init?.value ?? member.id.name,
|
||||
|
||||
+4
-2
@@ -15,7 +15,7 @@ import type {
|
||||
NamedShape,
|
||||
NativeModuleAliasMap,
|
||||
NativeModuleEnumMap,
|
||||
NativeModuleEnumMembers,
|
||||
NativeModuleEnumMember,
|
||||
NativeModuleEnumMemberType,
|
||||
NativeModuleParamTypeAnnotation,
|
||||
Nullable,
|
||||
@@ -240,7 +240,9 @@ export interface Parser {
|
||||
/**
|
||||
* Calculates enum's members
|
||||
*/
|
||||
parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers;
|
||||
parseEnumMembers(
|
||||
typeAnnotation: $FlowFixMe,
|
||||
): $ReadOnlyArray<NativeModuleEnumMember>;
|
||||
|
||||
/**
|
||||
* Given a node, it returns true if it is a module interface
|
||||
|
||||
+4
-2
@@ -15,7 +15,7 @@ import type {
|
||||
NamedShape,
|
||||
NativeModuleAliasMap,
|
||||
NativeModuleEnumMap,
|
||||
NativeModuleEnumMembers,
|
||||
NativeModuleEnumMember,
|
||||
NativeModuleEnumMemberType,
|
||||
NativeModuleParamTypeAnnotation,
|
||||
Nullable,
|
||||
@@ -168,7 +168,9 @@ export class MockedParser implements Parser {
|
||||
return;
|
||||
}
|
||||
|
||||
parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers {
|
||||
parseEnumMembers(
|
||||
typeAnnotation: $FlowFixMe,
|
||||
): $ReadOnlyArray<NativeModuleEnumMember> {
|
||||
return typeAnnotation.type === 'StringTypeAnnotation'
|
||||
? [
|
||||
{
|
||||
|
||||
@@ -31,6 +31,7 @@ import type {
|
||||
NativeModuleTypeAnnotation,
|
||||
NativeModuleUnionTypeAnnotation,
|
||||
Nullable,
|
||||
NumberLiteralTypeAnnotation,
|
||||
ObjectTypeAnnotation,
|
||||
ReservedTypeAnnotation,
|
||||
StringLiteralTypeAnnotation,
|
||||
@@ -170,6 +171,16 @@ function emitMixed(
|
||||
});
|
||||
}
|
||||
|
||||
function emitNumberLiteral(
|
||||
nullable: boolean,
|
||||
value: number,
|
||||
): Nullable<NumberLiteralTypeAnnotation> {
|
||||
return wrapNullable(nullable, {
|
||||
type: 'NumberLiteralTypeAnnotation',
|
||||
value,
|
||||
});
|
||||
}
|
||||
|
||||
function emitString(nullable: boolean): Nullable<StringTypeAnnotation> {
|
||||
return wrapNullable(nullable, {
|
||||
type: 'StringTypeAnnotation',
|
||||
@@ -762,6 +773,7 @@ module.exports = {
|
||||
emitInt32Prop,
|
||||
emitMixedProp,
|
||||
emitNumber,
|
||||
emitNumberLiteral,
|
||||
emitGenericObject,
|
||||
emitDictionary,
|
||||
emitObject,
|
||||
|
||||
+1
@@ -113,6 +113,7 @@ import * as TurboModuleRegistry from '../TurboModuleRegistry';
|
||||
export interface Spec extends TurboModule {
|
||||
readonly passBool?: (arg: boolean) => void;
|
||||
readonly passNumber: (arg: number) => void;
|
||||
readonly passNumberLiteral: (arg: 4) => void;
|
||||
readonly passString: (arg: string) => void;
|
||||
readonly passStringish: (arg: Stringish) => void;
|
||||
readonly passStringLiteral: (arg: 'A String Literal') => void;
|
||||
|
||||
+20
@@ -1123,6 +1123,26 @@ exports[`RN Codegen TypeScript Parser can generate fixture NATIVE_MODULE_WITH_BA
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': 'passNumberLiteral',
|
||||
'optional': false,
|
||||
'typeAnnotation': {
|
||||
'type': 'FunctionTypeAnnotation',
|
||||
'returnTypeAnnotation': {
|
||||
'type': 'VoidTypeAnnotation'
|
||||
},
|
||||
'params': [
|
||||
{
|
||||
'name': 'arg',
|
||||
'optional': false,
|
||||
'typeAnnotation': {
|
||||
'type': 'NumberLiteralTypeAnnotation',
|
||||
'value': 4
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
'name': 'passString',
|
||||
'optional': false,
|
||||
|
||||
@@ -37,6 +37,7 @@ const {
|
||||
emitCommonTypes,
|
||||
emitDictionary,
|
||||
emitFunction,
|
||||
emitNumberLiteral,
|
||||
emitPromise,
|
||||
emitRootTag,
|
||||
emitStringLiteral,
|
||||
@@ -403,6 +404,9 @@ function translateTypeAnnotation(
|
||||
case 'StringLiteral': {
|
||||
return emitStringLiteral(nullable, literal.value);
|
||||
}
|
||||
case 'NumericLiteral': {
|
||||
return emitNumberLiteral(nullable, literal.value);
|
||||
}
|
||||
default: {
|
||||
throw new UnsupportedTypeAnnotationParserError(
|
||||
hasteModuleName,
|
||||
|
||||
@@ -15,7 +15,7 @@ import type {
|
||||
NamedShape,
|
||||
NativeModuleAliasMap,
|
||||
NativeModuleEnumMap,
|
||||
NativeModuleEnumMembers,
|
||||
NativeModuleEnumMember,
|
||||
NativeModuleEnumMemberType,
|
||||
NativeModuleParamTypeAnnotation,
|
||||
Nullable,
|
||||
@@ -223,7 +223,9 @@ class TypeScriptParser implements Parser {
|
||||
});
|
||||
}
|
||||
|
||||
parseEnumMembers(typeAnnotation: $FlowFixMe): NativeModuleEnumMembers {
|
||||
parseEnumMembers(
|
||||
typeAnnotation: $FlowFixMe,
|
||||
): $ReadOnlyArray<NativeModuleEnumMember> {
|
||||
return typeAnnotation.members.map(member => ({
|
||||
name: member.id.name,
|
||||
value: member.initializer?.value ?? member.id.name,
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
#import <React/RCTFabricSurface.h>
|
||||
#import <React/RCTSurfaceHostingProxyRootView.h>
|
||||
#import <React/RCTSurfacePresenter.h>
|
||||
#import <ReactCommon/RCTContextContainerHandling.h>
|
||||
#if USE_HERMES
|
||||
#import <ReactCommon/RCTHermesInstance.h>
|
||||
#else
|
||||
@@ -35,7 +34,6 @@
|
||||
#import <ReactCommon/RCTHost+Internal.h>
|
||||
#import <ReactCommon/RCTHost.h>
|
||||
#import <ReactCommon/RCTTurboModuleManager.h>
|
||||
#import <react/config/ReactNativeConfig.h>
|
||||
#import <react/renderer/runtimescheduler/RuntimeScheduler.h>
|
||||
#import <react/renderer/runtimescheduler/RuntimeSchedulerCallInvoker.h>
|
||||
#import <react/runtime/JSRuntimeFactory.h>
|
||||
@@ -99,13 +97,8 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
|
||||
@end
|
||||
|
||||
@interface RCTRootViewFactory () <RCTContextContainerHandling> {
|
||||
std::shared_ptr<const facebook::react::ReactNativeConfig> _reactNativeConfig;
|
||||
facebook::react::ContextContainer::Shared _contextContainer;
|
||||
}
|
||||
@end
|
||||
|
||||
@interface RCTRootViewFactory () <RCTCxxBridgeDelegate> {
|
||||
facebook::react::ContextContainer::Shared _contextContainer;
|
||||
std::shared_ptr<facebook::react::RuntimeScheduler> _runtimeScheduler;
|
||||
}
|
||||
@end
|
||||
@@ -124,8 +117,6 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
_configuration = configuration;
|
||||
_hostDelegate = hostdelegate;
|
||||
_contextContainer = std::make_shared<const facebook::react::ContextContainer>();
|
||||
_reactNativeConfig = std::make_shared<const facebook::react::EmptyReactNativeConfig>();
|
||||
_contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||
_turboModuleManagerDelegate = turboModuleManagerDelegate;
|
||||
}
|
||||
return self;
|
||||
@@ -281,7 +272,6 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
[reactHost setBundleURLProvider:^NSURL *() {
|
||||
return [weakSelf bundleURL];
|
||||
}];
|
||||
[reactHost setContextContainerHandler:self];
|
||||
[reactHost start];
|
||||
return reactHost;
|
||||
}
|
||||
@@ -289,18 +279,12 @@ static NSDictionary *updateInitialProps(NSDictionary *initialProps, BOOL isFabri
|
||||
- (std::shared_ptr<facebook::react::JSRuntimeFactory>)createJSRuntimeFactory
|
||||
{
|
||||
#if USE_HERMES
|
||||
return std::make_shared<facebook::react::RCTHermesInstance>(
|
||||
_reactNativeConfig, nullptr, /* allocInOldGenBeforeTTI */ false);
|
||||
return std::make_shared<facebook::react::RCTHermesInstance>(nullptr, nullptr, /* allocInOldGenBeforeTTI */ false);
|
||||
#else
|
||||
return std::make_shared<facebook::react::RCTJscInstance>();
|
||||
#endif
|
||||
}
|
||||
|
||||
- (void)didCreateContextContainer:(std::shared_ptr<facebook::react::ContextContainer>)contextContainer
|
||||
{
|
||||
contextContainer->insert("ReactNativeConfig", _reactNativeConfig);
|
||||
}
|
||||
|
||||
- (NSArray<id<RCTBridgeModule>> *)extraModulesForBridge:(RCTBridge *)bridge
|
||||
{
|
||||
if (_configuration.extraModulesForBridge != nil) {
|
||||
|
||||
+8
-1
@@ -55,6 +55,7 @@ const EventNames: Map<
|
||||
['highTextContrastChanged', 'highTextContrastDidChange'],
|
||||
['screenReaderChanged', 'touchExplorationDidChange'],
|
||||
['accessibilityServiceChanged', 'accessibilityServiceDidChange'],
|
||||
['invertColorsChanged', 'invertColorDidChange'],
|
||||
])
|
||||
: new Map([
|
||||
['announcementFinished', 'announcementFinished'],
|
||||
@@ -138,7 +139,13 @@ const AccessibilityInfo = {
|
||||
*/
|
||||
isInvertColorsEnabled(): Promise<boolean> {
|
||||
if (Platform.OS === 'android') {
|
||||
return Promise.resolve(false);
|
||||
return new Promise((resolve, reject) => {
|
||||
if (NativeAccessibilityInfoAndroid?.isInvertColorsEnabled != null) {
|
||||
NativeAccessibilityInfoAndroid.isInvertColorsEnabled(resolve);
|
||||
} else {
|
||||
reject(null);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (NativeAccessibilityManagerIOS != null) {
|
||||
|
||||
@@ -211,4 +211,11 @@ export interface ViewProps
|
||||
* Used to reference react managed views from native code.
|
||||
*/
|
||||
nativeID?: string | undefined;
|
||||
|
||||
/**
|
||||
* Contols whether this view, and its transitive children, are laid in a way
|
||||
* consistent with web browsers ('strict'), or consistent with existing
|
||||
* React Native code which may rely on incorrect behavior ('classic').
|
||||
*/
|
||||
experimental_layoutConformance?: 'strict' | 'classic' | undefined;
|
||||
}
|
||||
|
||||
@@ -200,6 +200,8 @@ export interface ImagePropsBase
|
||||
* 'center': Scale the image down so that it is completely visible,
|
||||
* if bigger than the area of the view.
|
||||
* The image will not be scaled up.
|
||||
*
|
||||
* 'none': Do not resize the image. The image will be displayed at its intrinsic size.
|
||||
*/
|
||||
resizeMode?: ImageResizeMode | undefined;
|
||||
|
||||
|
||||
+2
-1
@@ -19,6 +19,7 @@ import type {
|
||||
} from '../StyleSheet/StyleSheet';
|
||||
import type {LayoutEvent, SyntheticEvent} from '../Types/CoreEventTypes';
|
||||
import typeof Image from './Image';
|
||||
import type {ImageResizeMode} from './ImageResizeMode';
|
||||
import type {ImageSource} from './ImageSource';
|
||||
import type {ElementRef, Node, RefSetter} from 'react';
|
||||
|
||||
@@ -234,7 +235,7 @@ export type ImageProps = $ReadOnly<{|
|
||||
*
|
||||
* See https://reactnative.dev/docs/image#resizemode
|
||||
*/
|
||||
resizeMode?: ?('cover' | 'contain' | 'stretch' | 'repeat' | 'center'),
|
||||
resizeMode?: ?ImageResizeMode,
|
||||
|
||||
/**
|
||||
* A unique identifier for this element to be used in UI Automation
|
||||
|
||||
@@ -12,7 +12,8 @@ export type ImageResizeMode =
|
||||
| 'contain'
|
||||
| 'stretch'
|
||||
| 'repeat'
|
||||
| 'center';
|
||||
| 'center'
|
||||
| 'none';
|
||||
|
||||
/**
|
||||
* @see ImageResizeMode.js
|
||||
@@ -46,4 +47,10 @@ export interface ImageResizeModeStatic {
|
||||
* image will keep it's size and aspect ratio.
|
||||
*/
|
||||
repeat: ImageResizeMode;
|
||||
|
||||
/**
|
||||
* none - The image will be displayed at its intrinsic size, which means the
|
||||
* image will not be scaled up or down.
|
||||
*/
|
||||
none: ImageResizeMode;
|
||||
}
|
||||
|
||||
@@ -33,4 +33,7 @@ export type ImageResizeMode =
|
||||
|
||||
// Resize by stretching it to fill the entire frame of the view without
|
||||
// clipping. This may change the aspect ratio of the image, distorting it.
|
||||
| 'stretch';
|
||||
| 'stretch'
|
||||
|
||||
// The image will not be resized at all.
|
||||
| 'none';
|
||||
|
||||
+6
-3
@@ -8,15 +8,18 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
type ResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
|
||||
import type {ImageResizeMode} from './ImageResizeMode';
|
||||
|
||||
const objectFitMap: {[string]: ResizeMode} = {
|
||||
const objectFitMap: {[string]: ImageResizeMode} = {
|
||||
contain: 'contain',
|
||||
cover: 'cover',
|
||||
fill: 'stretch',
|
||||
'scale-down': 'contain',
|
||||
none: 'none',
|
||||
};
|
||||
|
||||
export function convertObjectFitToResizeMode(objectFit: ?string): ?ResizeMode {
|
||||
export function convertObjectFitToResizeMode(
|
||||
objectFit: ?string,
|
||||
): ?ImageResizeMode {
|
||||
return objectFit != null ? objectFitMap[objectFit] : undefined;
|
||||
}
|
||||
|
||||
@@ -85,6 +85,7 @@ CGRect RCTTargetRect(CGSize sourceSize, CGSize destSize, CGFloat destScale, RCTR
|
||||
switch (resizeMode) {
|
||||
case RCTResizeModeStretch:
|
||||
case RCTResizeModeRepeat:
|
||||
case RCTResizeModeNone:
|
||||
|
||||
return (CGRect){CGPointZero, RCTCeilSize(destSize, destScale)};
|
||||
|
||||
@@ -249,6 +250,7 @@ BOOL RCTUpscalingRequired(
|
||||
|
||||
case RCTResizeModeRepeat:
|
||||
case RCTResizeModeCenter:
|
||||
case RCTResizeModeNone:
|
||||
|
||||
return NO;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ typedef NS_ENUM(NSInteger, RCTResizeMode) {
|
||||
RCTResizeModeStretch = UIViewContentModeScaleToFill,
|
||||
RCTResizeModeCenter = UIViewContentModeCenter,
|
||||
RCTResizeModeRepeat = -1, // Use negative values to avoid conflicts with iOS enum values.
|
||||
RCTResizeModeNone = UIViewContentModeTopLeft,
|
||||
};
|
||||
|
||||
static inline RCTResizeMode RCTResizeModeFromUIViewContentMode(UIViewContentMode mode)
|
||||
@@ -30,12 +31,14 @@ static inline RCTResizeMode RCTResizeModeFromUIViewContentMode(UIViewContentMode
|
||||
case UIViewContentModeCenter:
|
||||
return RCTResizeModeCenter;
|
||||
break;
|
||||
case UIViewContentModeTopLeft:
|
||||
return RCTResizeModeNone;
|
||||
break;
|
||||
case UIViewContentModeRedraw:
|
||||
case UIViewContentModeTop:
|
||||
case UIViewContentModeBottom:
|
||||
case UIViewContentModeLeft:
|
||||
case UIViewContentModeRight:
|
||||
case UIViewContentModeTopLeft:
|
||||
case UIViewContentModeTopRight:
|
||||
case UIViewContentModeBottomLeft:
|
||||
case UIViewContentModeBottomRight:
|
||||
|
||||
@@ -17,6 +17,7 @@ RCT_ENUM_CONVERTER(
|
||||
@"stretch" : @(RCTResizeModeStretch),
|
||||
@"center" : @(RCTResizeModeCenter),
|
||||
@"repeat" : @(RCTResizeModeRepeat),
|
||||
@"none" : @(RCTResizeModeNone),
|
||||
}),
|
||||
RCTResizeModeStretch,
|
||||
integerValue)
|
||||
|
||||
@@ -434,6 +434,12 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
||||
cursor?: CursorValue | undefined;
|
||||
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
||||
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
||||
|
||||
mixBlendMode?: BlendMode | undefined;
|
||||
experimental_backgroundImage?:
|
||||
| ReadonlyArray<GradientValue>
|
||||
| string
|
||||
| undefined;
|
||||
}
|
||||
|
||||
export type FontVariant =
|
||||
@@ -562,6 +568,6 @@ export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
||||
overlayColor?: ColorValue | undefined;
|
||||
tintColor?: ColorValue | undefined;
|
||||
opacity?: AnimatableNumericValue | undefined;
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined;
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none' | undefined;
|
||||
cursor?: CursorValue | undefined;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
'use strict';
|
||||
|
||||
import type AnimatedNode from '../Animated/nodes/AnimatedNode';
|
||||
import type {ImageResizeMode} from './../Image/ImageResizeMode';
|
||||
import type {
|
||||
____DangerouslyImpreciseStyle_InternalOverrides,
|
||||
____ImageStyle_InternalOverrides,
|
||||
@@ -941,8 +942,8 @@ export type ____TextStyle_Internal = $ReadOnly<{
|
||||
|
||||
export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
@@ -954,8 +955,8 @@ export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
|
||||
export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____TextStyle_Internal>,
|
||||
resizeMode?: 'contain' | 'cover' | 'stretch' | 'center' | 'repeat',
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down',
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | 'none',
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
|
||||
@@ -4869,7 +4869,7 @@ export type ImageProps = $ReadOnly<{|
|
||||
| \\"strict-origin-when-cross-origin\\"
|
||||
| \\"unsafe-url\\"
|
||||
),
|
||||
resizeMode?: ?(\\"cover\\" | \\"contain\\" | \\"stretch\\" | \\"repeat\\" | \\"center\\"),
|
||||
resizeMode?: ?ImageResizeMode,
|
||||
testID?: ?string,
|
||||
tintColor?: ColorValue,
|
||||
src?: ?string,
|
||||
@@ -4892,7 +4892,8 @@ exports[`public API should not change unintentionally Libraries/Image/ImageResiz
|
||||
| \\"contain\\"
|
||||
| \\"cover\\"
|
||||
| \\"repeat\\"
|
||||
| \\"stretch\\";
|
||||
| \\"stretch\\"
|
||||
| \\"none\\";
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -4989,10 +4990,9 @@ export type { ImageProps } from \\"./ImageProps\\";
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Image/ImageUtils.js 1`] = `
|
||||
"type ResizeMode = \\"cover\\" | \\"contain\\" | \\"stretch\\" | \\"repeat\\" | \\"center\\";
|
||||
declare export function convertObjectFitToResizeMode(
|
||||
"declare export function convertObjectFitToResizeMode(
|
||||
objectFit: ?string
|
||||
): ?ResizeMode;
|
||||
): ?ImageResizeMode;
|
||||
"
|
||||
`;
|
||||
|
||||
@@ -8261,8 +8261,8 @@ export type ____TextStyle_Internal = $ReadOnly<{
|
||||
}>;
|
||||
export type ____ImageStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____ViewStyle_Internal>,
|
||||
resizeMode?: \\"contain\\" | \\"cover\\" | \\"stretch\\" | \\"center\\" | \\"repeat\\",
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\",
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
@@ -8272,8 +8272,8 @@ export type ____ImageStyle_Internal = $ReadOnly<{
|
||||
}>;
|
||||
export type ____DangerouslyImpreciseStyle_InternalCore = $ReadOnly<{
|
||||
...$Exact<____TextStyle_Internal>,
|
||||
resizeMode?: \\"contain\\" | \\"cover\\" | \\"stretch\\" | \\"center\\" | \\"repeat\\",
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\",
|
||||
resizeMode?: ImageResizeMode,
|
||||
objectFit?: \\"cover\\" | \\"contain\\" | \\"fill\\" | \\"scale-down\\" | \\"none\\",
|
||||
tintColor?: ____ColorValue_Internal,
|
||||
overlayColor?: string,
|
||||
}>;
|
||||
|
||||
@@ -207,7 +207,7 @@ class RCTBridgeHostTargetDelegate : public facebook::react::jsinspector_modern::
|
||||
void onReload(const PageReloadRequest &request) override
|
||||
{
|
||||
RCTAssertMainQueue();
|
||||
[bridge_ reload];
|
||||
RCTTriggerReloadCommandListeners(@"Reloading due to PageReloadRequest from DevTools.");
|
||||
}
|
||||
|
||||
void onSetPausedInDebuggerMessage(const OverlaySetPausedInDebuggerMessageRequest &request) override
|
||||
|
||||
@@ -239,7 +239,10 @@ NSString *RCTMD5Hash(NSString *string)
|
||||
{
|
||||
const char *str = string.UTF8String;
|
||||
unsigned char result[CC_MD5_DIGEST_LENGTH];
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||
CC_MD5(str, (CC_LONG)strlen(str), result);
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
return [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
|
||||
result[0],
|
||||
|
||||
@@ -19,6 +19,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
stack:(nullable NSArray *)stack
|
||||
exceptionId:(NSNumber *)exceptionId
|
||||
extraDataAsJSON:(nullable NSString *)extraDataAsJSON;
|
||||
|
||||
@optional
|
||||
- (NSDictionary<NSString *, id> *)decorateJSExceptionData:(NSDictionary<NSString *, id> *)exceptionData;
|
||||
@end
|
||||
|
||||
@interface RCTExceptionsManager : NSObject <RCTBridgeModule>
|
||||
|
||||
@@ -83,6 +83,7 @@ RCT_EXPORT_MODULE()
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77
|
||||
RCT_EXPORT_METHOD(reportSoftException
|
||||
: (NSString *)message stack
|
||||
: (NSArray<NSDictionary *> *)stack exceptionId
|
||||
@@ -91,6 +92,7 @@ RCT_EXPORT_METHOD(reportSoftException
|
||||
[self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:nil];
|
||||
}
|
||||
|
||||
// TODO(T205456329): This method is deprecated in favour of reportException. Delete in v0.77
|
||||
RCT_EXPORT_METHOD(reportFatalException
|
||||
: (NSString *)message stack
|
||||
: (NSArray<NSDictionary *> *)stack exceptionId
|
||||
@@ -103,15 +105,24 @@ RCT_EXPORT_METHOD(dismissRedbox) {}
|
||||
|
||||
RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData &)data)
|
||||
{
|
||||
NSString *message = data.message();
|
||||
double exceptionId = data.id_();
|
||||
NSMutableDictionary<NSString *, id> *mutableErrorData = [NSMutableDictionary new];
|
||||
mutableErrorData[@"message"] = data.message();
|
||||
if (data.originalMessage()) {
|
||||
mutableErrorData[@"originalMessage"] = data.originalMessage();
|
||||
}
|
||||
if (data.name()) {
|
||||
mutableErrorData[@"name"] = data.name();
|
||||
}
|
||||
if (data.componentStack()) {
|
||||
mutableErrorData[@"componentStack"] = data.componentStack();
|
||||
}
|
||||
|
||||
// Reserialize data.stack() into an array of untyped dictionaries.
|
||||
// TODO: (moti) T53588496 Replace `(NSArray<NSDictionary *> *)stack` in
|
||||
// reportFatalException etc with a typed interface.
|
||||
NSMutableArray<NSDictionary *> *stackArray = [NSMutableArray<NSDictionary *> new];
|
||||
NSMutableArray<NSDictionary<NSString *, id> *> *stackArray = [NSMutableArray<NSDictionary<NSString *, id> *> new];
|
||||
for (auto frame : data.stack()) {
|
||||
NSMutableDictionary *frameDict = [NSMutableDictionary new];
|
||||
NSMutableDictionary<NSString *, id> *frameDict = [NSMutableDictionary new];
|
||||
if (frame.column().has_value()) {
|
||||
frameDict[@"column"] = @(frame.column().value());
|
||||
}
|
||||
@@ -126,13 +137,28 @@ RCT_EXPORT_METHOD(reportException : (JS::NativeExceptionsManager::ExceptionData
|
||||
[stackArray addObject:frameDict];
|
||||
}
|
||||
|
||||
NSDictionary *extraData = (NSDictionary *)data.extraData();
|
||||
NSString *extraDataAsJSON = RCTJSONStringify(extraData, NULL);
|
||||
mutableErrorData[@"stack"] = stackArray;
|
||||
mutableErrorData[@"id"] = @(data.id_());
|
||||
mutableErrorData[@"isFatal"] = @(data.isFatal());
|
||||
|
||||
if (data.isFatal()) {
|
||||
[self reportFatal:message stack:stackArray exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
if (data.extraData()) {
|
||||
mutableErrorData[@"extraData"] = data.extraData();
|
||||
}
|
||||
|
||||
NSDictionary<NSString *, id> *errorData = mutableErrorData;
|
||||
if ([_delegate respondsToSelector:@selector(decorateJSExceptionData:)]) {
|
||||
errorData = [_delegate decorateJSExceptionData:errorData];
|
||||
}
|
||||
|
||||
NSString *extraDataAsJSON = RCTJSONStringify(errorData[@"extraData"], NULL);
|
||||
NSString *message = errorData[@"message"];
|
||||
NSArray<NSDictionary<NSString *, id> *> *stack = errorData[@"stack"];
|
||||
double exceptionId = [errorData[@"id"] doubleValue];
|
||||
|
||||
if (errorData[@"isFatal"]) {
|
||||
[self reportFatal:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
} else {
|
||||
[self reportSoft:message stack:stackArray exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
[self reportSoft:message stack:stack exceptionId:exceptionId extraDataAsJSON:extraDataAsJSON];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,11 @@
|
||||
UIButton *resumeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[resumeButton setImage:[UIImage systemImageNamed:@"forward.frame.fill"] forState:UIControlStateNormal];
|
||||
resumeButton.tintColor = [UIColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
|
||||
resumeButton.adjustsImageWhenDisabled = NO;
|
||||
|
||||
resumeButton.configurationUpdateHandler = ^(UIButton *button) {
|
||||
button.imageView.tintAdjustmentMode = UIViewTintAdjustmentModeNormal;
|
||||
};
|
||||
|
||||
resumeButton.enabled = NO;
|
||||
[NSLayoutConstraint activateConstraints:@[
|
||||
[resumeButton.widthAnchor constraintEqualToConstant:48],
|
||||
|
||||
@@ -121,8 +121,8 @@ using namespace facebook::react;
|
||||
auto &props = *sharedProps;
|
||||
props.layoutConstraints = LayoutConstraints{{0, 0}, {500, 500}};
|
||||
auto &yogaStyle = props.yogaStyle;
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(200));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
@@ -136,8 +136,8 @@ using namespace facebook::react;
|
||||
yogaStyle.setPositionType(yoga::PositionType::Absolute);
|
||||
yogaStyle.setPosition(yoga::Edge::Left, yoga::StyleLength::points(0));
|
||||
yogaStyle.setPosition(yoga::Edge::Top, yoga::StyleLength::points(0));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(200));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
@@ -216,8 +216,8 @@ using namespace facebook::react;
|
||||
yogaStyle.setPositionType(yoga::PositionType::Absolute);
|
||||
yogaStyle.setPosition(yoga::Edge::Left, yoga::StyleLength::points(0));
|
||||
yogaStyle.setPosition(yoga::Edge::Top, yoga::StyleLength::points(30));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(50));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(50));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
@@ -260,8 +260,8 @@ using namespace facebook::react;
|
||||
yogaStyle.setPositionType(yoga::PositionType::Absolute);
|
||||
yogaStyle.setPosition(yoga::Edge::Left, yoga::StyleLength::points(0));
|
||||
yogaStyle.setPosition(yoga::Edge::Top, yoga::StyleLength::points(90));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(50));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(50));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
@@ -418,8 +418,8 @@ static ParagraphShadowNode::ConcreteState::Shared stateWithShadowNode(
|
||||
auto &props = *sharedProps;
|
||||
props.layoutConstraints = LayoutConstraints{{0, 0}, {500, 500}};
|
||||
auto &yogaStyle = props.yogaStyle;
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(200));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
@@ -434,8 +434,8 @@ static ParagraphShadowNode::ConcreteState::Shared stateWithShadowNode(
|
||||
yogaStyle.setPositionType(yoga::PositionType::Absolute);
|
||||
yogaStyle.setPosition(yoga::Edge::Left, yoga::StyleLength::points(0));
|
||||
yogaStyle.setPosition(yoga::Edge::Top, yoga::StyleLength::points(90));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleLength::points(20));
|
||||
yogaStyle.setDimension(yoga::Dimension::Width, yoga::StyleSizeLength::points(200));
|
||||
yogaStyle.setDimension(yoga::Dimension::Height, yoga::StyleSizeLength::points(20));
|
||||
return sharedProps;
|
||||
})
|
||||
.children({
|
||||
|
||||
@@ -87,6 +87,9 @@ CGFloat RCTCoreGraphicsFloatFromYogaValue(YGValue value, CGFloat baseFloatValue)
|
||||
return RCTCoreGraphicsFloatFromYogaFloat(value.value) * baseFloatValue;
|
||||
case YGUnitAuto:
|
||||
case YGUnitUndefined:
|
||||
case YGUnitMaxContent:
|
||||
case YGUnitFitContent:
|
||||
case YGUnitStretch:
|
||||
return baseFloatValue;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,6 +63,9 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
|
||||
#define RCT_SET_YGVALUE(ygvalue, setter, ...) \
|
||||
switch (ygvalue.unit) { \
|
||||
case YGUnitAuto: \
|
||||
case YGUnitMaxContent: \
|
||||
case YGUnitFitContent: \
|
||||
case YGUnitStretch: \
|
||||
case YGUnitUndefined: \
|
||||
setter(__VA_ARGS__, YGUndefined); \
|
||||
break; \
|
||||
@@ -88,6 +91,35 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
|
||||
case YGUnitPercent: \
|
||||
setter##Percent(__VA_ARGS__, ygvalue.value); \
|
||||
break; \
|
||||
case YGUnitMaxContent: \
|
||||
case YGUnitFitContent: \
|
||||
case YGUnitStretch: \
|
||||
break; \
|
||||
}
|
||||
|
||||
#define RCT_SET_YGVALUE_AUTO_INTRINSIC(ygvalue, setter, ...) \
|
||||
switch (ygvalue.unit) { \
|
||||
case YGUnitAuto: \
|
||||
setter##Auto(__VA_ARGS__); \
|
||||
break; \
|
||||
case YGUnitMaxContent: \
|
||||
setter##MaxContent(__VA_ARGS__); \
|
||||
break; \
|
||||
case YGUnitFitContent: \
|
||||
setter##FitContent(__VA_ARGS__); \
|
||||
break; \
|
||||
case YGUnitStretch: \
|
||||
setter##Stretch(__VA_ARGS__); \
|
||||
break; \
|
||||
case YGUnitUndefined: \
|
||||
setter(__VA_ARGS__, YGUndefined); \
|
||||
break; \
|
||||
case YGUnitPoint: \
|
||||
setter(__VA_ARGS__, ygvalue.value); \
|
||||
break; \
|
||||
case YGUnitPercent: \
|
||||
setter##Percent(__VA_ARGS__, ygvalue.value); \
|
||||
break; \
|
||||
}
|
||||
|
||||
static void RCTProcessMetaPropsPadding(const YGValue metaProps[META_PROP_COUNT], YGNodeRef node)
|
||||
@@ -483,14 +515,14 @@ RCT_BORDER_PROPERTY(Start, START)
|
||||
RCT_BORDER_PROPERTY(End, END)
|
||||
|
||||
// Dimensions
|
||||
#define RCT_DIMENSION_PROPERTY(setProp, getProp, cssProp) \
|
||||
-(void)set##setProp : (YGValue)value \
|
||||
{ \
|
||||
RCT_SET_YGVALUE_AUTO(value, YGNodeStyleSet##cssProp, _yogaNode); \
|
||||
} \
|
||||
-(YGValue)getProp \
|
||||
{ \
|
||||
return YGNodeStyleGet##cssProp(_yogaNode); \
|
||||
#define RCT_DIMENSION_PROPERTY(setProp, getProp, cssProp) \
|
||||
-(void)set##setProp : (YGValue)value \
|
||||
{ \
|
||||
RCT_SET_YGVALUE_AUTO_INTRINSIC(value, YGNodeStyleSet##cssProp, _yogaNode); \
|
||||
} \
|
||||
-(YGValue)getProp \
|
||||
{ \
|
||||
return YGNodeStyleGet##cssProp(_yogaNode); \
|
||||
}
|
||||
|
||||
#define RCT_MIN_MAX_DIMENSION_PROPERTY(setProp, getProp, cssProp) \
|
||||
@@ -634,7 +666,7 @@ RCTShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode,
|
||||
|
||||
- (void)setFlexBasis:(YGValue)value
|
||||
{
|
||||
RCT_SET_YGVALUE_AUTO(value, YGNodeStyleSetFlexBasis, _yogaNode);
|
||||
RCT_SET_YGVALUE_AUTO_INTRINSIC(value, YGNodeStyleSetFlexBasis, _yogaNode);
|
||||
}
|
||||
|
||||
- (YGValue)flexBasis
|
||||
|
||||
@@ -956,6 +956,7 @@ public class com/facebook/react/bridge/JavaOnlyMap : com/facebook/react/bridge/R
|
||||
public fun putMap (Ljava/lang/String;Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
public fun putNull (Ljava/lang/String;)V
|
||||
public fun putString (Ljava/lang/String;Ljava/lang/String;)V
|
||||
public fun remove (Ljava/lang/String;)V
|
||||
public fun toHashMap ()Ljava/util/HashMap;
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
@@ -1644,13 +1645,6 @@ public final class com/facebook/react/bridge/WritableNativeMap : com/facebook/re
|
||||
public fun putString (Ljava/lang/String;Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/bridge/interop/InteropModuleRegistry {
|
||||
public fun <init> ()V
|
||||
public fun getInteropModule (Ljava/lang/Class;)Lcom/facebook/react/bridge/JavaScriptModule;
|
||||
public fun registerInteropModule (Ljava/lang/Class;Ljava/lang/Object;)V
|
||||
public fun shouldReturnInteropModule (Ljava/lang/Class;)Z
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/bridge/queue/MessageQueueThread {
|
||||
public abstract fun assertIsOnThread ()V
|
||||
public abstract fun assertIsOnThread (Ljava/lang/String;)V
|
||||
@@ -2168,7 +2162,7 @@ public abstract class com/facebook/react/devsupport/DevSupportManagerBase : com/
|
||||
public fun fetchSplitBundleAndCreateBundleLoader (Ljava/lang/String;Lcom/facebook/react/devsupport/DevSupportManagerBase$CallbackWithBundleLoader;)V
|
||||
protected fun getApplicationContext ()Landroid/content/Context;
|
||||
public fun getCurrentActivity ()Landroid/app/Activity;
|
||||
protected fun getCurrentContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public fun getDevLoadingViewManager ()Lcom/facebook/react/devsupport/interfaces/DevLoadingViewManager;
|
||||
public fun getDevServerHelper ()Lcom/facebook/react/devsupport/DevServerHelper;
|
||||
public fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
|
||||
@@ -2341,6 +2335,7 @@ public class com/facebook/react/devsupport/ReleaseDevSupportManager : com/facebo
|
||||
public fun destroyRootView (Landroid/view/View;)V
|
||||
public fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
|
||||
public fun getCurrentActivity ()Landroid/app/Activity;
|
||||
public fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
|
||||
public fun getDevSupportEnabled ()Z
|
||||
public fun getDownloadedJSBundleFile ()Ljava/lang/String;
|
||||
@@ -2477,6 +2472,7 @@ public abstract interface class com/facebook/react/devsupport/interfaces/DevSupp
|
||||
public abstract fun destroyRootView (Landroid/view/View;)V
|
||||
public abstract fun downloadBundleResourceFromUrlSync (Ljava/lang/String;Ljava/io/File;)Ljava/io/File;
|
||||
public abstract fun getCurrentActivity ()Landroid/app/Activity;
|
||||
public abstract fun getCurrentReactContext ()Lcom/facebook/react/bridge/ReactContext;
|
||||
public abstract fun getDevSettings ()Lcom/facebook/react/modules/debug/interfaces/DeveloperSettings;
|
||||
public abstract fun getDevSupportEnabled ()Z
|
||||
public abstract fun getDownloadedJSBundleFile ()Ljava/lang/String;
|
||||
@@ -3308,28 +3304,6 @@ public final class com/facebook/react/modules/deviceinfo/DeviceInfoModule : com/
|
||||
public fun onHostResume ()V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devloading/DevLoadingModule : com/facebook/fbreact/specs/NativeDevLoadingViewSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/devloading/DevLoadingModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun hide ()V
|
||||
public fun showMessage (Ljava/lang/String;Ljava/lang/Double;Ljava/lang/Double;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devloading/DevLoadingModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devtoolsruntimesettings/ReactDevToolsRuntimeSettingsModule : com/facebook/fbreact/specs/NativeReactDevToolsRuntimeSettingsModuleSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/devtoolsruntimesettings/ReactDevToolsRuntimeSettingsModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun getReloadAndProfileConfig ()Lcom/facebook/react/bridge/WritableMap;
|
||||
public fun setReloadAndProfileConfig (Lcom/facebook/react/bridge/ReadableMap;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/devtoolsruntimesettings/ReactDevToolsRuntimeSettingsModule$Companion {
|
||||
}
|
||||
|
||||
public class com/facebook/react/modules/dialog/AlertFragment : androidx/fragment/app/DialogFragment, android/content/DialogInterface$OnClickListener {
|
||||
public fun <init> ()V
|
||||
public fun <init> (Lcom/facebook/react/modules/dialog/DialogModule$AlertFragmentListener;Landroid/os/Bundle;)V
|
||||
@@ -3616,17 +3590,6 @@ public final class com/facebook/react/modules/permissions/PermissionsModule : co
|
||||
public final class com/facebook/react/modules/permissions/PermissionsModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/reactdevtoolssettings/ReactDevToolsSettingsManagerModule : com/facebook/fbreact/specs/NativeReactDevToolsSettingsManagerSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/reactdevtoolssettings/ReactDevToolsSettingsManagerModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun getGlobalHookSettings ()Ljava/lang/String;
|
||||
public fun setGlobalHookSettings (Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/reactdevtoolssettings/ReactDevToolsSettingsManagerModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/share/ShareModule : com/facebook/fbreact/specs/NativeShareModuleSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/share/ShareModule$Companion;
|
||||
public static final field ERROR_INVALID_CONTENT Ljava/lang/String;
|
||||
@@ -3700,18 +3663,6 @@ public final class com/facebook/react/modules/toast/ToastModule : com/facebook/f
|
||||
public final class com/facebook/react/modules/toast/ToastModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/vibration/VibrationModule : com/facebook/fbreact/specs/NativeVibrationSpec {
|
||||
public static final field Companion Lcom/facebook/react/modules/vibration/VibrationModule$Companion;
|
||||
public static final field NAME Ljava/lang/String;
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun cancel ()V
|
||||
public fun vibrate (D)V
|
||||
public fun vibrateByPattern (Lcom/facebook/react/bridge/ReadableArray;D)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/vibration/VibrationModule$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/modules/websocket/WebSocketModule : com/facebook/fbreact/specs/NativeWebSocketModuleSpec {
|
||||
public fun <init> (Lcom/facebook/react/bridge/ReactApplicationContext;)V
|
||||
public fun addListener (Ljava/lang/String;)V
|
||||
@@ -3801,22 +3752,6 @@ public abstract interface class com/facebook/react/packagerconnection/Responder
|
||||
public abstract fun respond (Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/reactperflogger/NativeModulePerfLogger {
|
||||
protected fun <init> ()V
|
||||
protected abstract fun initHybrid ()Lcom/facebook/jni/HybridData;
|
||||
protected final fun maybeLoadOtherSoLibraries ()V
|
||||
public abstract fun moduleCreateCacheHit (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateConstructEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateConstructStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateFail (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateSetUpEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateSetUpStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleCreateStart (Ljava/lang/String;I)V
|
||||
public abstract fun moduleDataCreateEnd (Ljava/lang/String;I)V
|
||||
public abstract fun moduleDataCreateStart (Ljava/lang/String;I)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/runtime/BindingsInstaller {
|
||||
public fun <init> (Lcom/facebook/jni/HybridData;)V
|
||||
}
|
||||
@@ -4323,13 +4258,6 @@ public class com/facebook/react/uimanager/LayoutShadowNode : com/facebook/react/
|
||||
public fun setWidth (Lcom/facebook/react/bridge/Dynamic;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/LayoutShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/LayoutShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/uimanager/LengthPercentage {
|
||||
public static final field Companion Lcom/facebook/react/uimanager/LengthPercentage$Companion;
|
||||
public fun <init> ()V
|
||||
@@ -4983,13 +4911,6 @@ public class com/facebook/react/uimanager/ReactShadowNodeImpl : com/facebook/rea
|
||||
public final fun updateProperties (Lcom/facebook/react/uimanager/ReactStylesDiffMap;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/ReactShadowNodeImpl$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNodeImpl;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface annotation class com/facebook/react/uimanager/ReactStage : java/lang/annotation/Annotation {
|
||||
public static final field BRIDGE_DID_LOAD I
|
||||
public static final field MODULE_DID_LOAD I
|
||||
@@ -5043,13 +4964,6 @@ public final class com/facebook/react/uimanager/RootViewManager : com/facebook/r
|
||||
public fun getName ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/uimanager/RootViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public fun setProperty (Lcom/facebook/react/uimanager/RootViewManager;Landroid/view/ViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/uimanager/RootViewManager$Companion {
|
||||
}
|
||||
|
||||
@@ -5685,11 +5599,6 @@ public final class com/facebook/react/uimanager/common/ViewUtil {
|
||||
public static final fun isRootTag (I)Z
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/debug/NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
public abstract fun onViewHierarchyUpdateEnqueued ()V
|
||||
public abstract fun onViewHierarchyUpdateFinished ()V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/uimanager/events/BatchEventDispatchedListener {
|
||||
public abstract fun onBatchEventDispatched ()V
|
||||
}
|
||||
@@ -6426,24 +6335,24 @@ public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlay :
|
||||
public final fun setTraceUpdates (Ljava/util/List;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager : com/facebook/react/uimanager/SimpleViewManager {
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager : com/facebook/react/uimanager/SimpleViewManager, com/facebook/react/viewmanagers/DebuggingOverlayManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public synthetic fun clearElementsHighlights (Landroid/view/View;)V
|
||||
public fun clearElementsHighlights (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;)V
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;
|
||||
public fun getDelegate ()Lcom/facebook/react/uimanager/ViewManagerDelegate;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public synthetic fun highlightElements (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun highlightElements (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun highlightTraceUpdates (Landroid/view/View;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun highlightTraceUpdates (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public synthetic fun receiveCommand (Landroid/view/View;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
public fun receiveCommand (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Ljava/lang/String;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlayManager;Lcom/facebook/react/views/debuggingoverlay/DebuggingOverlay;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/debuggingoverlay/DebuggingOverlayManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6505,13 +6414,6 @@ public final class com/facebook/react/views/drawer/ReactDrawerLayoutManager : co
|
||||
public fun setStatusBarBackgroundColor (Lcom/facebook/react/views/drawer/ReactDrawerLayout;Ljava/lang/Integer;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/drawer/ReactDrawerLayoutManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/drawer/ReactDrawerLayoutManager;Lcom/facebook/react/views/drawer/ReactDrawerLayout;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/drawer/ReactDrawerLayoutManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6673,13 +6575,6 @@ public final class com/facebook/react/views/image/ReactImageManager : com/facebo
|
||||
public final fun setTintColor (Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/Integer;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/image/ReactImageManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/image/ReactImageManager;Lcom/facebook/react/views/image/ReactImageView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/image/ReactImageManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6761,13 +6656,6 @@ public final class com/facebook/react/views/imagehelper/ResourceDrawableIdHelper
|
||||
public final fun getInstance ()Lcom/facebook/react/views/imagehelper/ResourceDrawableIdHelper;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/modal/ModalHostShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/modal/ModalHostShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/modal/ReactModalHostManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/ModalHostViewManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/modal/ReactModalHostManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
@@ -6802,13 +6690,6 @@ public final class com/facebook/react/views/modal/ReactModalHostManager : com/fa
|
||||
public fun updateState (Lcom/facebook/react/views/modal/ReactModalHostView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/modal/ReactModalHostManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/modal/ReactModalHostManager;Lcom/facebook/react/views/modal/ReactModalHostView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/modal/ReactModalHostManager$Companion {
|
||||
}
|
||||
|
||||
@@ -6874,13 +6755,6 @@ public final class com/facebook/react/views/progressbar/ProgressBarShadowNode :
|
||||
public final fun setStyle (Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/progressbar/ProgressBarShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/progressbar/ProgressBarShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ReactProgressBarViewManager : com/facebook/react/uimanager/BaseViewManager, com/facebook/react/viewmanagers/AndroidProgressBarManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/progressbar/ReactProgressBarViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
@@ -6910,52 +6784,10 @@ public final class com/facebook/react/views/progressbar/ReactProgressBarViewMana
|
||||
public fun updateExtraData (Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/progressbar/ReactProgressBarViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/progressbar/ReactProgressBarViewManager;Lcom/facebook/react/views/progressbar/ProgressBarContainerView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/progressbar/ReactProgressBarViewManager$Companion {
|
||||
public final fun createProgressBar (Landroid/content/Context;I)Landroid/widget/ProgressBar;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaView : android/view/ViewGroup {
|
||||
public fun <init> (Lcom/facebook/react/uimanager/ThemedReactContext;)V
|
||||
public final fun getReactContext ()Lcom/facebook/react/uimanager/ThemedReactContext;
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager : com/facebook/react/uimanager/ViewGroupManager, com/facebook/react/viewmanagers/SafeAreaViewManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/LayoutShadowNode;
|
||||
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public synthetic fun updateState (Landroid/view/View;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
public fun updateState (Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewManager;Lcom/facebook/react/views/safeareaview/ReactSafeAreaView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/safeareaview/ReactSafeAreaViewManager$Companion {
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/safeareaview/ReactSafeAreaViewShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/scroll/FpsListener {
|
||||
public abstract fun disable (Ljava/lang/String;)V
|
||||
public abstract fun enable (Ljava/lang/String;)V
|
||||
@@ -6969,21 +6801,16 @@ public final class com/facebook/react/views/scroll/OnScrollDispatchHelper {
|
||||
public final fun onScrollChanged (II)Z
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager : com/facebook/react/views/view/ReactViewManager {
|
||||
public final class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager : com/facebook/react/views/view/ReactViewManager, com/facebook/react/viewmanagers/AndroidHorizontalScrollContentViewManagerInterface {
|
||||
public static final field Companion Lcom/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public synthetic fun createViewInstance (ILcom/facebook/react/uimanager/ThemedReactContext;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Landroid/view/View;
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Lcom/facebook/react/views/view/ReactViewGroup;
|
||||
public fun getDelegate ()Lcom/facebook/react/uimanager/ViewManagerDelegate;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager;Lcom/facebook/react/views/view/ReactViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public synthetic fun setRemoveClippedSubviews (Landroid/view/View;Z)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager$Companion {
|
||||
@@ -7115,13 +6942,6 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollViewManager :
|
||||
public fun updateState (Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactHorizontalScrollViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactHorizontalScrollViewManager;Lcom/facebook/react/views/scroll/ReactHorizontalScrollView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactScrollView : android/widget/ScrollView, android/view/View$OnLayoutChangeListener, android/view/ViewGroup$OnHierarchyChangeListener, com/facebook/react/uimanager/ReactClippingViewGroup, com/facebook/react/uimanager/ReactOverflowViewWithInset, com/facebook/react/views/scroll/ReactScrollViewHelper$HasFlingAnimator, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollEventThrottle, com/facebook/react/views/scroll/ReactScrollViewHelper$HasScrollState, com/facebook/react/views/scroll/ReactScrollViewHelper$HasSmoothScroll, com/facebook/react/views/scroll/ReactScrollViewHelper$HasStateWrapper {
|
||||
public fun <init> (Landroid/content/Context;)V
|
||||
public fun <init> (Landroid/content/Context;Lcom/facebook/react/views/scroll/FpsListener;)V
|
||||
@@ -7363,13 +7183,6 @@ public class com/facebook/react/views/scroll/ReactScrollViewManager : com/facebo
|
||||
public fun updateState (Lcom/facebook/react/views/scroll/ReactScrollView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/scroll/ReactScrollViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/scroll/ReactScrollViewManager;Lcom/facebook/react/views/scroll/ReactScrollView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/scroll/ScrollEvent : com/facebook/react/uimanager/events/Event {
|
||||
public static final field Companion Lcom/facebook/react/views/scroll/ScrollEvent$Companion;
|
||||
public fun canCoalesce ()Z
|
||||
@@ -7443,13 +7256,6 @@ public class com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager : c
|
||||
public fun setSize (Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/swiperefresh/SwipeRefreshLayoutManager;Lcom/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager : com/facebook/react/uimanager/SimpleViewManager, com/facebook/react/viewmanagers/AndroidSwitchManagerInterface {
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
@@ -7489,20 +7295,6 @@ public class com/facebook/react/views/switchview/ReactSwitchManager : com/facebo
|
||||
public fun setValue (Lcom/facebook/react/views/switchview/ReactSwitch;Z)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/switchview/ReactSwitchManager;Lcom/facebook/react/views/switchview/ReactSwitch;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/switchview/ReactSwitchManager$ReactSwitchShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/text/DefaultStyleValuesUtil {
|
||||
public static final field INSTANCE Lcom/facebook/react/views/text/DefaultStyleValuesUtil;
|
||||
public static final fun getDefaultTextColor (Landroid/content/Context;)Landroid/content/res/ColorStateList;
|
||||
@@ -7602,13 +7394,6 @@ public class com/facebook/react/views/text/ReactRawTextManager : com/facebook/re
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactRawTextManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextShadowNode : com/facebook/react/uimanager/ReactShadowNodeImpl {
|
||||
public fun <init> ()V
|
||||
public fun getText ()Ljava/lang/String;
|
||||
@@ -7617,13 +7402,6 @@ public class com/facebook/react/views/text/ReactRawTextShadowNode : com/facebook
|
||||
public fun toString ()Ljava/lang/String;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactRawTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactRawTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract class com/facebook/react/views/text/ReactTextAnchorViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
public fun <init> ()V
|
||||
public fun setAccessible (Lcom/facebook/react/views/text/ReactTextView;Z)V
|
||||
@@ -7658,13 +7436,6 @@ public class com/facebook/react/views/text/ReactTextShadowNode : com/facebook/re
|
||||
public fun setShouldNotifyOnTextLayout (Z)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextUpdate {
|
||||
public fun <init> (Landroid/text/Spannable;IZFFFFI)V
|
||||
public fun <init> (Landroid/text/Spannable;IZFFFFIII)V
|
||||
@@ -7748,13 +7519,6 @@ public class com/facebook/react/views/text/ReactTextViewManager : com/facebook/r
|
||||
public fun updateState (Lcom/facebook/react/views/text/ReactTextView;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactTextViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactTextViewManager;Lcom/facebook/react/views/text/ReactTextView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/text/ReactTextViewManagerCallback {
|
||||
public abstract fun onPostProcessSpannable (Landroid/text/Spannable;)V
|
||||
}
|
||||
@@ -7767,35 +7531,6 @@ public class com/facebook/react/views/text/ReactTypefaceUtils {
|
||||
public static fun parseFontWeight (Ljava/lang/String;)I
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextShadowNode : com/facebook/react/views/text/ReactBaseTextShadowNode {
|
||||
public fun <init> ()V
|
||||
public fun isVirtual ()Z
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
public fun <init> ()V
|
||||
public synthetic fun createShadowNodeInstance ()Lcom/facebook/react/uimanager/ReactShadowNode;
|
||||
public fun createShadowNodeInstance ()Lcom/facebook/react/views/text/ReactVirtualTextShadowNode;
|
||||
public fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public fun getShadowNodeClass ()Ljava/lang/Class;
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/ReactVirtualTextViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/TextAttributeProps {
|
||||
public static final field TA_KEY_ACCESSIBILITY_ROLE S
|
||||
public static final field TA_KEY_ALIGNMENT S
|
||||
@@ -7952,13 +7687,6 @@ public final class com/facebook/react/views/text/TextTransform : java/lang/Enum
|
||||
public static fun values ()[Lcom/facebook/react/views/text/TextTransform;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager : com/facebook/react/uimanager/BaseViewManager {
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
@@ -7971,13 +7699,6 @@ public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInl
|
||||
public fun updateExtraData (Landroid/view/View;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/text/frescosupport/FrescoBasedReactTextInlineImageViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/textinput/ContentSizeWatcher {
|
||||
public abstract fun onLayout ()V
|
||||
}
|
||||
@@ -8165,48 +7886,10 @@ public class com/facebook/react/views/textinput/ReactTextInputManager : com/face
|
||||
public fun updateState (Lcom/facebook/react/views/textinput/ReactEditText;Lcom/facebook/react/uimanager/ReactStylesDiffMap;Lcom/facebook/react/uimanager/StateWrapper;)Ljava/lang/Object;
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/textinput/ReactTextInputManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/textinput/ReactTextInputManager;Lcom/facebook/react/views/textinput/ReactEditText;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/textinput/ReactTextInputShadowNode$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ShadowNodeSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ReactShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/textinput/ReactTextInputShadowNode;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public abstract interface class com/facebook/react/views/textinput/ScrollWatcher {
|
||||
public abstract fun onScrollChanged (IIII)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/unimplementedview/ReactUnimplementedView : android/widget/LinearLayout {
|
||||
public fun <init> (Landroid/content/Context;)V
|
||||
public final fun setName (Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager : com/facebook/react/uimanager/ViewGroupManager {
|
||||
public static final field Companion Lcom/facebook/react/views/unimplementedview/ReactUnimplementedViewManager$Companion;
|
||||
public static final field REACT_CLASS Ljava/lang/String;
|
||||
public fun <init> ()V
|
||||
public synthetic fun createViewInstance (Lcom/facebook/react/uimanager/ThemedReactContext;)Landroid/view/View;
|
||||
public fun getName ()Ljava/lang/String;
|
||||
public final fun setName (Lcom/facebook/react/views/unimplementedview/ReactUnimplementedView;Ljava/lang/String;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/unimplementedview/ReactUnimplementedViewManager;Lcom/facebook/react/views/unimplementedview/ReactUnimplementedView;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/unimplementedview/ReactUnimplementedViewManager$Companion {
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/view/ColorUtil {
|
||||
public static final field INSTANCE Lcom/facebook/react/views/view/ColorUtil;
|
||||
public static final fun normalize (DDDD)I
|
||||
@@ -8339,13 +8022,6 @@ public class com/facebook/react/views/view/ReactViewManager : com/facebook/react
|
||||
protected fun setTransformProperty (Lcom/facebook/react/views/view/ReactViewGroup;Lcom/facebook/react/bridge/ReadableArray;Lcom/facebook/react/bridge/ReadableArray;)V
|
||||
}
|
||||
|
||||
public class com/facebook/react/views/view/ReactViewManager$$PropsSetter : com/facebook/react/uimanager/ViewManagerPropertyUpdater$ViewManagerSetter {
|
||||
public fun <init> ()V
|
||||
public fun getProperties (Ljava/util/Map;)V
|
||||
public synthetic fun setProperty (Lcom/facebook/react/uimanager/ViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
public fun setProperty (Lcom/facebook/react/views/view/ReactViewManager;Lcom/facebook/react/views/view/ReactViewGroup;Ljava/lang/String;Ljava/lang/Object;)V
|
||||
}
|
||||
|
||||
public final class com/facebook/react/views/view/ReactViewManager$Companion {
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ if (PROJECT_ROOT_DIR)
|
||||
endif ()
|
||||
|
||||
file(GLOB input_SRC CONFIGURE_DEPENDS
|
||||
*.cpp
|
||||
${REACT_ANDROID_DIR}/cmake-utils/default-app-setup/*.cpp
|
||||
${BUILD_DIR}/generated/autolinking/src/main/jni/*.cpp)
|
||||
|
||||
add_library(${CMAKE_PROJECT_NAME} SHARED ${input_SRC})
|
||||
|
||||
@@ -8,7 +8,11 @@ android.useAndroidX=true
|
||||
react.internal.disableJavaVersionAlignment=true
|
||||
|
||||
# Binary Compatibility Validator properties
|
||||
|
||||
# We ignore:
|
||||
# - BuildConfig classes because they are generated and not part of the public API
|
||||
binaryCompatibilityValidator.ignoredClasses=com.facebook.react.BuildConfig
|
||||
|
||||
binaryCompatibilityValidator.ignoredPackages=com.facebook.debug,\
|
||||
com.facebook.fbreact,\
|
||||
com.facebook.hermes,\
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ package com.facebook.debug.debugoverlay.model
|
||||
* @param description Description to display in settings.
|
||||
* @param color Color for tag display.
|
||||
*/
|
||||
public class DebugOverlayTag(
|
||||
internal class DebugOverlayTag(
|
||||
public val name: String,
|
||||
public val description: String,
|
||||
public val color: Int,
|
||||
|
||||
+4
-5
@@ -10,12 +10,11 @@ package com.facebook.debug.holder
|
||||
import com.facebook.debug.debugoverlay.model.DebugOverlayTag
|
||||
|
||||
/** No-op implementation of [Printer]. */
|
||||
public object NoopPrinter : Printer {
|
||||
internal object NoopPrinter : Printer {
|
||||
|
||||
public override fun logMessage(tag: DebugOverlayTag, message: String, vararg args: Any?): Unit =
|
||||
Unit
|
||||
override fun logMessage(tag: DebugOverlayTag, message: String, vararg args: Any?): Unit = Unit
|
||||
|
||||
public override fun logMessage(tag: DebugOverlayTag, message: String): Unit = Unit
|
||||
override fun logMessage(tag: DebugOverlayTag, message: String): Unit = Unit
|
||||
|
||||
public override fun shouldDisplayLogMessage(tag: DebugOverlayTag): Boolean = false
|
||||
override fun shouldDisplayLogMessage(tag: DebugOverlayTag): Boolean = false
|
||||
}
|
||||
|
||||
+4
-4
@@ -10,11 +10,11 @@ package com.facebook.debug.holder
|
||||
import com.facebook.debug.debugoverlay.model.DebugOverlayTag
|
||||
|
||||
/** Interface to debugging tool. */
|
||||
public interface Printer {
|
||||
internal interface Printer {
|
||||
|
||||
public fun logMessage(tag: DebugOverlayTag, message: String, vararg args: Any?)
|
||||
fun logMessage(tag: DebugOverlayTag, message: String, vararg args: Any?)
|
||||
|
||||
public fun logMessage(tag: DebugOverlayTag, message: String)
|
||||
fun logMessage(tag: DebugOverlayTag, message: String)
|
||||
|
||||
public fun shouldDisplayLogMessage(tag: DebugOverlayTag): Boolean
|
||||
fun shouldDisplayLogMessage(tag: DebugOverlayTag): Boolean
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,6 +8,6 @@
|
||||
package com.facebook.debug.holder
|
||||
|
||||
/** Holder for debugging tool instance. */
|
||||
public object PrinterHolder {
|
||||
@JvmStatic public var printer: Printer = NoopPrinter
|
||||
internal object PrinterHolder {
|
||||
@JvmStatic var printer: Printer = NoopPrinter
|
||||
}
|
||||
|
||||
+10
-10
@@ -11,35 +11,35 @@ import android.graphics.Color
|
||||
import com.facebook.debug.debugoverlay.model.DebugOverlayTag
|
||||
|
||||
/** Category for debug overlays. */
|
||||
public object ReactDebugOverlayTags {
|
||||
internal object ReactDebugOverlayTags {
|
||||
@JvmField
|
||||
public val PERFORMANCE: DebugOverlayTag =
|
||||
val PERFORMANCE: DebugOverlayTag =
|
||||
DebugOverlayTag("Performance", "Markers for Performance", Color.GREEN)
|
||||
@JvmField
|
||||
public val NAVIGATION: DebugOverlayTag =
|
||||
val NAVIGATION: DebugOverlayTag =
|
||||
DebugOverlayTag("Navigation", "Tag for navigation", Color.rgb(0x9C, 0x27, 0xB0))
|
||||
@JvmField
|
||||
public val RN_CORE: DebugOverlayTag =
|
||||
val RN_CORE: DebugOverlayTag =
|
||||
DebugOverlayTag("RN Core", "Tag for React Native Core", Color.BLACK)
|
||||
@JvmField
|
||||
public val BRIDGE_CALLS: DebugOverlayTag =
|
||||
val BRIDGE_CALLS: DebugOverlayTag =
|
||||
DebugOverlayTag("Bridge Calls", "JS to Java calls (warning: this is spammy)", Color.MAGENTA)
|
||||
@JvmField
|
||||
public val NATIVE_MODULE: DebugOverlayTag =
|
||||
val NATIVE_MODULE: DebugOverlayTag =
|
||||
DebugOverlayTag("Native Module", "Native Module init", Color.rgb(0x80, 0x00, 0x80))
|
||||
@JvmField
|
||||
public val UI_MANAGER: DebugOverlayTag =
|
||||
val UI_MANAGER: DebugOverlayTag =
|
||||
DebugOverlayTag(
|
||||
"UI Manager",
|
||||
"UI Manager View Operations (requires restart\nwarning: this is spammy)",
|
||||
Color.CYAN)
|
||||
@JvmField
|
||||
public val FABRIC_UI_MANAGER: DebugOverlayTag =
|
||||
val FABRIC_UI_MANAGER: DebugOverlayTag =
|
||||
DebugOverlayTag("FabricUIManager", "Fabric UI Manager View Operations", Color.CYAN)
|
||||
@JvmField
|
||||
public val FABRIC_RECONCILER: DebugOverlayTag =
|
||||
val FABRIC_RECONCILER: DebugOverlayTag =
|
||||
DebugOverlayTag("FabricReconciler", "Reconciler for Fabric", Color.CYAN)
|
||||
@JvmField
|
||||
public val RELAY: DebugOverlayTag =
|
||||
val RELAY: DebugOverlayTag =
|
||||
DebugOverlayTag("Relay", "including prefetching", Color.rgb(0xFF, 0x99, 0x00))
|
||||
}
|
||||
|
||||
+4
@@ -246,6 +246,10 @@ public class JavaOnlyMap implements ReadableMap, WritableMap {
|
||||
return mBackingMap.toString();
|
||||
}
|
||||
|
||||
public void remove(@NonNull String key) {
|
||||
mBackingMap.remove(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
+2
@@ -63,6 +63,8 @@ public abstract class ReactContext extends ContextWrapper {
|
||||
private @Nullable JSExceptionHandler mExceptionHandlerWrapper;
|
||||
private @Nullable WeakReference<Activity> mCurrentActivity;
|
||||
|
||||
// NOTE: When converted to Kotlin, this field should be made internal due to
|
||||
// visibility restriction on InteropModuleRegistry otherwise it will be exposed to the public API.
|
||||
protected @Nullable InteropModuleRegistry mInteropModuleRegistry;
|
||||
private boolean mIsInitialized = false;
|
||||
|
||||
|
||||
-57
@@ -1,57 +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.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge.interop;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.react.bridge.JavaScriptModule;
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* A utility class that takes care of returning {@link JavaScriptModule} which are used for the
|
||||
* Fabric Interop Layer. This allows us to override the returned classes once the user is invoking
|
||||
* `ReactContext.getJsModule()`.
|
||||
*
|
||||
* <p>Currently we only support a `RCTEventEmitter` re-implementation, being `InteropEventEmitter`
|
||||
* but this class can support other re-implementation in the future.
|
||||
*/
|
||||
public class InteropModuleRegistry {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private final HashMap<Class, Object> supportedModules;
|
||||
|
||||
public InteropModuleRegistry() {
|
||||
supportedModules = new HashMap<>();
|
||||
}
|
||||
|
||||
public <T extends JavaScriptModule> boolean shouldReturnInteropModule(Class<T> requestedModule) {
|
||||
return checkReactFeatureFlagsConditions() && supportedModules.containsKey(requestedModule);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public <T extends JavaScriptModule> T getInteropModule(Class<T> requestedModule) {
|
||||
if (checkReactFeatureFlagsConditions()) {
|
||||
//noinspection unchecked
|
||||
return (T) supportedModules.get(requestedModule);
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public <T extends JavaScriptModule> void registerInteropModule(
|
||||
Class<T> interopModuleInterface, Object interopModule) {
|
||||
if (checkReactFeatureFlagsConditions()) {
|
||||
supportedModules.put(interopModuleInterface, interopModule);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkReactFeatureFlagsConditions() {
|
||||
return ReactNativeFeatureFlags.enableFabricRenderer()
|
||||
&& ReactNativeFeatureFlags.useFabricInterop();
|
||||
}
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.react.bridge.interop
|
||||
|
||||
import com.facebook.react.bridge.JavaScriptModule
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags.enableFabricRenderer
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags.useFabricInterop
|
||||
|
||||
/**
|
||||
* A utility class that takes care of returning [JavaScriptModule] which are used for the Fabric
|
||||
* Interop Layer. This allows us to override the returned classes once the user is invoking
|
||||
* `ReactContext.getJsModule()`.
|
||||
*
|
||||
* Currently we only support a `RCTEventEmitter` re-implementation, being `InteropEventEmitter` but
|
||||
* this class can support other re-implementation in the future.
|
||||
*/
|
||||
internal class InteropModuleRegistry {
|
||||
private val supportedModules = mutableMapOf<Class<*>, Any?>()
|
||||
|
||||
fun <T : JavaScriptModule?> shouldReturnInteropModule(requestedModule: Class<T>): Boolean {
|
||||
return checkReactFeatureFlagsConditions() && supportedModules.containsKey(requestedModule)
|
||||
}
|
||||
|
||||
fun <T : JavaScriptModule?> getInteropModule(requestedModule: Class<T>): T? {
|
||||
return if (checkReactFeatureFlagsConditions()) {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
supportedModules[requestedModule] as? T?
|
||||
} else {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
fun <T : JavaScriptModule?> registerInteropModule(
|
||||
interopModuleInterface: Class<T>,
|
||||
interopModule: Any
|
||||
) {
|
||||
if (checkReactFeatureFlagsConditions()) {
|
||||
supportedModules[interopModuleInterface] = interopModule
|
||||
}
|
||||
}
|
||||
|
||||
private fun checkReactFeatureFlagsConditions(): Boolean =
|
||||
enableFabricRenderer() && useFabricInterop()
|
||||
}
|
||||
+2
-2
@@ -97,8 +97,8 @@ public final class BridgeDevSupportManager extends DevSupportManagerBase {
|
||||
new CallbackWithBundleLoader() {
|
||||
@Override
|
||||
public void onSuccess(JSBundleLoader bundleLoader) {
|
||||
bundleLoader.loadScript(getCurrentContext().getCatalystInstance());
|
||||
getCurrentContext()
|
||||
bundleLoader.loadScript(getCurrentReactContext().getCatalystInstance());
|
||||
getCurrentReactContext()
|
||||
.getJSModule(HMRClient.class)
|
||||
.registerBundle(getDevServerHelper().getDevServerSplitBundleURL(bundlePath));
|
||||
callback.onSuccess();
|
||||
|
||||
+19
-17
@@ -107,7 +107,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
private @Nullable DebugOverlayController mDebugOverlayController;
|
||||
private boolean mDevLoadingViewVisible = false;
|
||||
private int mPendingJSSplitBundleRequests = 0;
|
||||
private @Nullable ReactContext mCurrentContext;
|
||||
private @Nullable ReactContext mCurrentReactContext;
|
||||
private final DeveloperSettings mDevSettings;
|
||||
private boolean mIsReceiverRegistered = false;
|
||||
private boolean mIsShakeDetectorStarted = false;
|
||||
@@ -429,11 +429,11 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
() -> {
|
||||
boolean nextEnabled = !mDevSettings.isHotModuleReplacementEnabled();
|
||||
mDevSettings.setHotModuleReplacementEnabled(nextEnabled);
|
||||
if (mCurrentContext != null) {
|
||||
if (mCurrentReactContext != null) {
|
||||
if (nextEnabled) {
|
||||
mCurrentContext.getJSModule(HMRClient.class).enable();
|
||||
mCurrentReactContext.getJSModule(HMRClient.class).enable();
|
||||
} else {
|
||||
mCurrentContext.getJSModule(HMRClient.class).disable();
|
||||
mCurrentReactContext.getJSModule(HMRClient.class).disable();
|
||||
}
|
||||
}
|
||||
if (nextEnabled && !mDevSettings.isJSDevModeEnabled()) {
|
||||
@@ -542,8 +542,10 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
.setOnCancelListener(dialog -> mDevOptionsDialog = null)
|
||||
.create();
|
||||
mDevOptionsDialog.show();
|
||||
if (mCurrentContext != null) {
|
||||
mCurrentContext.getJSModule(RCTNativeAppEventEmitter.class).emit("RCTDevMenuShown", null);
|
||||
if (mCurrentReactContext != null) {
|
||||
mCurrentReactContext
|
||||
.getJSModule(RCTNativeAppEventEmitter.class)
|
||||
.emit("RCTDevMenuShown", null);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -588,7 +590,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
|
||||
@Override
|
||||
public void onReactInstanceDestroyed(ReactContext reactContext) {
|
||||
if (reactContext == mCurrentContext) {
|
||||
if (reactContext == mCurrentReactContext) {
|
||||
// only call reset context when the destroyed context matches the one that is currently set
|
||||
// for this manager
|
||||
resetCurrentContext(null);
|
||||
@@ -664,12 +666,12 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
}
|
||||
|
||||
private void resetCurrentContext(@Nullable ReactContext reactContext) {
|
||||
if (mCurrentContext == reactContext) {
|
||||
if (mCurrentReactContext == reactContext) {
|
||||
// new context is the same as the old one - do nothing
|
||||
return;
|
||||
}
|
||||
|
||||
mCurrentContext = reactContext;
|
||||
mCurrentReactContext = reactContext;
|
||||
|
||||
// Recreate debug overlay controller with new CatalystInstance object
|
||||
if (mDebugOverlayController != null) {
|
||||
@@ -679,13 +681,13 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
mDebugOverlayController = new DebugOverlayController(reactContext);
|
||||
}
|
||||
|
||||
if (mCurrentContext != null) {
|
||||
if (mCurrentReactContext != null) {
|
||||
try {
|
||||
URL sourceUrl = new URL(getSourceUrl());
|
||||
String path = sourceUrl.getPath().substring(1); // strip initial slash in path
|
||||
String host = sourceUrl.getHost();
|
||||
int port = sourceUrl.getPort() != -1 ? sourceUrl.getPort() : sourceUrl.getDefaultPort();
|
||||
mCurrentContext
|
||||
mCurrentReactContext
|
||||
.getJSModule(HMRClient.class)
|
||||
.setup("android", path, host, port, mDevSettings.isHotModuleReplacementEnabled());
|
||||
} catch (MalformedURLException e) {
|
||||
@@ -705,8 +707,8 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
}
|
||||
}
|
||||
|
||||
protected @Nullable ReactContext getCurrentContext() {
|
||||
return mCurrentContext;
|
||||
public @Nullable ReactContext getCurrentReactContext() {
|
||||
return mCurrentReactContext;
|
||||
}
|
||||
|
||||
public @Nullable String getJSAppBundleName() {
|
||||
@@ -783,7 +785,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
public void onSuccess() {
|
||||
UiThreadUtil.runOnUiThread(() -> hideSplitBundleDevLoadingView());
|
||||
|
||||
@Nullable ReactContext context = mCurrentContext;
|
||||
@Nullable ReactContext context = mCurrentReactContext;
|
||||
if (context == null || !context.hasActiveReactInstance()) {
|
||||
return;
|
||||
}
|
||||
@@ -864,10 +866,10 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
}
|
||||
|
||||
private void handleCaptureHeap(final Responder responder) {
|
||||
if (mCurrentContext == null) {
|
||||
if (mCurrentReactContext == null) {
|
||||
return;
|
||||
}
|
||||
JSCHeapCapture heapCapture = mCurrentContext.getNativeModule(JSCHeapCapture.class);
|
||||
JSCHeapCapture heapCapture = mCurrentReactContext.getNativeModule(JSCHeapCapture.class);
|
||||
|
||||
if (heapCapture != null) {
|
||||
heapCapture.captureHeap(
|
||||
@@ -1160,7 +1162,7 @@ public abstract class DevSupportManagerBase implements DevSupportManager {
|
||||
@Override
|
||||
public void openDebugger() {
|
||||
mDevServerHelper.openDebugger(
|
||||
mCurrentContext, mApplicationContext.getString(R.string.catalyst_open_debugger_error));
|
||||
mCurrentReactContext, mApplicationContext.getString(R.string.catalyst_open_debugger_error));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+31
-2
@@ -21,6 +21,8 @@ import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import com.facebook.common.logging.FLog;
|
||||
import com.facebook.react.R;
|
||||
import com.facebook.react.bridge.LifecycleEventListener;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.SurfaceDelegate;
|
||||
import com.facebook.react.devsupport.interfaces.DevSupportManager;
|
||||
@@ -55,7 +57,7 @@ class RedBoxDialogSurfaceDelegate implements SurfaceDelegate {
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"Unable to launch redbox because react activity "
|
||||
+ "is not available, here is the error that redbox would've displayed: "
|
||||
+ "are not available, here is the error that redbox would've displayed: "
|
||||
+ (message != null ? message : "N/A"));
|
||||
return;
|
||||
}
|
||||
@@ -82,9 +84,19 @@ class RedBoxDialogSurfaceDelegate implements SurfaceDelegate {
|
||||
@Nullable String message = mDevSupportManager.getLastErrorTitle();
|
||||
Activity context = mDevSupportManager.getCurrentActivity();
|
||||
if (context == null || context.isFinishing()) {
|
||||
final @Nullable ReactContext reactContext = mDevSupportManager.getCurrentReactContext();
|
||||
if (reactContext != null) {
|
||||
/**
|
||||
* If the activity isn't available, try again after the next onHostResume(). onHostResume()
|
||||
* is when the activity gets attached to the react native.
|
||||
*/
|
||||
runAfterHostResume(reactContext, this::show);
|
||||
return;
|
||||
}
|
||||
|
||||
FLog.e(
|
||||
ReactConstants.TAG,
|
||||
"Unable to launch redbox because react activity "
|
||||
"Unable to launch redbox because react activity and react context "
|
||||
+ "is not available, here is the error that redbox would've displayed: "
|
||||
+ (message != null ? message : "N/A"));
|
||||
return;
|
||||
@@ -140,6 +152,23 @@ class RedBoxDialogSurfaceDelegate implements SurfaceDelegate {
|
||||
mDialog.show();
|
||||
}
|
||||
|
||||
private static void runAfterHostResume(ReactContext reactContext, Runnable runnable) {
|
||||
reactContext.addLifecycleEventListener(
|
||||
new LifecycleEventListener() {
|
||||
@Override
|
||||
public void onHostResume() {
|
||||
runnable.run();
|
||||
reactContext.removeLifecycleEventListener(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onHostPause() {}
|
||||
|
||||
@Override
|
||||
public void onHostDestroy() {}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void hide() {
|
||||
// dismiss redbox if exists
|
||||
|
||||
+3
@@ -147,6 +147,9 @@ public open class ReleaseDevSupportManager : DevSupportManager {
|
||||
override public val currentActivity: Activity?
|
||||
get() = null
|
||||
|
||||
override public val currentReactContext: ReactContext?
|
||||
get() = null
|
||||
|
||||
override public fun createSurfaceDelegate(moduleName: String?): SurfaceDelegate? = null
|
||||
|
||||
override public fun openDebugger(): Unit = Unit
|
||||
|
||||
+1
@@ -35,6 +35,7 @@ public interface DevSupportManager : JSExceptionHandler {
|
||||
public val lastErrorType: ErrorType?
|
||||
public val lastErrorCookie: Int
|
||||
public val currentActivity: Activity?
|
||||
public val currentReactContext: ReactContext?
|
||||
|
||||
public var devSupportEnabled: Boolean
|
||||
|
||||
|
||||
+29
@@ -86,6 +86,7 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
private var touchExplorationEnabled = false
|
||||
private var accessibilityServiceEnabled = false
|
||||
private var recommendedTimeout = 0
|
||||
private var invertColorsEnabled = false
|
||||
|
||||
init {
|
||||
val appContext = context.applicationContext
|
||||
@@ -111,6 +112,17 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
return parsedValue == 0f
|
||||
}
|
||||
|
||||
@get:TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private val isInvertColorsEnabledValue: Boolean
|
||||
get() {
|
||||
try {
|
||||
return Settings.Secure.getInt(
|
||||
contentResolver, Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED) == 1
|
||||
} catch (e: Settings.SettingNotFoundException) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
@get:TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
private val isHighTextContrastEnabledValue: Boolean
|
||||
get() {
|
||||
@@ -125,6 +137,10 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
successCallback.invoke(reduceMotionEnabled)
|
||||
}
|
||||
|
||||
override fun isInvertColorsEnabled(successCallback: Callback) {
|
||||
successCallback.invoke(invertColorsEnabled)
|
||||
}
|
||||
|
||||
override fun isHighTextContrastEnabled(successCallback: Callback) {
|
||||
successCallback.invoke(highTextContrastEnabled)
|
||||
}
|
||||
@@ -148,6 +164,17 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateAndSendInvertColorsChangeEvent() {
|
||||
val isInvertColorsEnabled = isInvertColorsEnabledValue
|
||||
if (invertColorsEnabled != isInvertColorsEnabled) {
|
||||
invertColorsEnabled = isInvertColorsEnabled
|
||||
val reactApplicationContext = getReactApplicationContextIfActiveOrWarn()
|
||||
if (reactApplicationContext != null) {
|
||||
reactApplicationContext.emitDeviceEvent(INVERT_COLOR_EVENT_NAME, invertColorsEnabled)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateAndSendHighTextContrastChangeEvent() {
|
||||
val isHighTextContrastEnabled = isHighTextContrastEnabledValue
|
||||
if (highTextContrastEnabled != isHighTextContrastEnabled) {
|
||||
@@ -199,6 +226,7 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
updateAndSendAccessibilityServiceChangeEvent(accessibilityManager?.isEnabled == true)
|
||||
updateAndSendReduceMotionChangeEvent()
|
||||
updateAndSendHighTextContrastChangeEvent()
|
||||
updateAndSendInvertColorsChangeEvent()
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
|
||||
@@ -263,5 +291,6 @@ internal class AccessibilityInfoModule(context: ReactApplicationContext) :
|
||||
private const val ACCESSIBILITY_SERVICE_EVENT_NAME = "accessibilityServiceDidChange"
|
||||
private const val ACCESSIBILITY_HIGH_TEXT_CONTRAST_ENABLED_CONSTANT =
|
||||
"high_text_contrast_enabled" // constant is marked with @hide
|
||||
private const val INVERT_COLOR_EVENT_NAME = "invertColorDidChange"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
/** [NativeModule] that allows JS to show dev loading view. */
|
||||
@ReactModule(name = NativeDevLoadingViewSpec.NAME)
|
||||
public class DevLoadingModule(reactContext: ReactApplicationContext) :
|
||||
internal class DevLoadingModule(reactContext: ReactApplicationContext) :
|
||||
NativeDevLoadingViewSpec(reactContext) {
|
||||
|
||||
private val jsExceptionHandler: JSExceptionHandler? = reactContext.jsExceptionHandler
|
||||
|
||||
+3
-3
@@ -22,13 +22,13 @@ private class Settings {
|
||||
|
||||
@DoNotStripAny
|
||||
@ReactModule(name = NativeReactDevToolsRuntimeSettingsModuleSpec.NAME)
|
||||
public class ReactDevToolsRuntimeSettingsModule(reactContext: ReactApplicationContext?) :
|
||||
internal class ReactDevToolsRuntimeSettingsModule(reactContext: ReactApplicationContext?) :
|
||||
NativeReactDevToolsRuntimeSettingsModuleSpec(reactContext) {
|
||||
|
||||
public companion object {
|
||||
companion object {
|
||||
// static to persist across Turbo Module reloads
|
||||
private val settings = Settings()
|
||||
public const val NAME: String = NativeReactDevToolsRuntimeSettingsModuleSpec.NAME
|
||||
const val NAME: String = NativeReactDevToolsRuntimeSettingsModuleSpec.NAME
|
||||
}
|
||||
|
||||
override fun setReloadAndProfileConfig(map: ReadableMap) {
|
||||
|
||||
+5
-5
@@ -14,20 +14,20 @@ import com.facebook.react.bridge.ReactApplicationContext
|
||||
import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
@ReactModule(name = NativeReactDevToolsSettingsManagerSpec.NAME)
|
||||
public class ReactDevToolsSettingsManagerModule(reactContext: ReactApplicationContext) :
|
||||
internal class ReactDevToolsSettingsManagerModule(reactContext: ReactApplicationContext) :
|
||||
NativeReactDevToolsSettingsManagerSpec(reactContext) {
|
||||
|
||||
private val sharedPreferences: SharedPreferences =
|
||||
reactContext.getSharedPreferences(SHARED_PREFERENCES_PREFIX, Context.MODE_PRIVATE)
|
||||
|
||||
public override fun setGlobalHookSettings(settings: String): Unit =
|
||||
override fun setGlobalHookSettings(settings: String): Unit =
|
||||
sharedPreferences.edit().putString(KEY_HOOK_SETTINGS, settings).apply()
|
||||
|
||||
public override fun getGlobalHookSettings(): String? =
|
||||
override fun getGlobalHookSettings(): String? =
|
||||
sharedPreferences.getString(KEY_HOOK_SETTINGS, null)
|
||||
|
||||
public companion object {
|
||||
public const val NAME: String = NativeReactDevToolsSettingsManagerSpec.NAME
|
||||
companion object {
|
||||
const val NAME: String = NativeReactDevToolsSettingsManagerSpec.NAME
|
||||
private const val SHARED_PREFERENCES_PREFIX = "ReactNative__DevToolsSettings"
|
||||
private const val KEY_HOOK_SETTINGS = "HookSettings"
|
||||
}
|
||||
|
||||
+6
-6
@@ -20,10 +20,10 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
@ReactModule(name = NativeVibrationSpec.NAME)
|
||||
public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
internal class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
NativeVibrationSpec(reactContext) {
|
||||
|
||||
public override fun vibrate(durationDouble: Double) {
|
||||
override fun vibrate(durationDouble: Double) {
|
||||
val duration = durationDouble.toInt()
|
||||
val v = getVibrator() ?: return
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
@@ -33,7 +33,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
public override fun vibrateByPattern(pattern: ReadableArray, repeatDouble: Double) {
|
||||
override fun vibrateByPattern(pattern: ReadableArray, repeatDouble: Double) {
|
||||
val repeat = repeatDouble.toInt()
|
||||
val v = getVibrator() ?: return
|
||||
val patternLong = LongArray(pattern.size())
|
||||
@@ -47,7 +47,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
}
|
||||
}
|
||||
|
||||
public override fun cancel() {
|
||||
override fun cancel() {
|
||||
getVibrator()?.cancel()
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ public class VibrationModule(reactContext: ReactApplicationContext) :
|
||||
getReactApplicationContext().getSystemService(Context.VIBRATOR_SERVICE) as Vibrator?
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val NAME: String = NativeVibrationSpec.NAME
|
||||
companion object {
|
||||
const val NAME: String = NativeVibrationSpec.NAME
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -19,6 +19,7 @@ import com.facebook.react.bridge.Dynamic;
|
||||
import com.facebook.react.bridge.DynamicFromObject;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.common.annotations.UnstableReactNativeAPI;
|
||||
import com.facebook.react.uimanager.annotations.ReactProp;
|
||||
import com.facebook.react.uimanager.annotations.ReactPropGroup;
|
||||
import com.facebook.react.uimanager.annotations.ReactPropertyHolder;
|
||||
@@ -268,6 +269,7 @@ public class ReactPropertyProcessor extends ProcessorBase {
|
||||
TypeSpec holderClass =
|
||||
TypeSpec.classBuilder(holderClassName)
|
||||
.addSuperinterface(superType)
|
||||
.addAnnotation(UnstableReactNativeAPI.class)
|
||||
.addModifiers(PUBLIC)
|
||||
.addMethod(generateSetPropertySpec(classInfo, properties))
|
||||
.addMethod(getMethods)
|
||||
|
||||
+11
-11
@@ -9,7 +9,7 @@ package com.facebook.react.reactperflogger
|
||||
|
||||
import com.facebook.jni.HybridData
|
||||
|
||||
public abstract class NativeModulePerfLogger protected constructor() {
|
||||
internal abstract class NativeModulePerfLogger protected constructor() {
|
||||
|
||||
@Suppress("NoHungarianNotation") private val mHybridData: HybridData
|
||||
|
||||
@@ -20,25 +20,25 @@ public abstract class NativeModulePerfLogger protected constructor() {
|
||||
|
||||
protected abstract fun initHybrid(): HybridData
|
||||
|
||||
public abstract fun moduleDataCreateStart(moduleName: String, id: Int)
|
||||
abstract fun moduleDataCreateStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleDataCreateEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleDataCreateEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateCacheHit(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateCacheHit(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateConstructStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateConstructStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateConstructEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateConstructEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateSetUpStart(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateSetUpStart(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateSetUpEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateSetUpEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateEnd(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateEnd(moduleName: String, id: Int)
|
||||
|
||||
public abstract fun moduleCreateFail(moduleName: String, id: Int)
|
||||
abstract fun moduleCreateFail(moduleName: String, id: Int)
|
||||
|
||||
/** Subclasses will override this method to load their own SO libraries. */
|
||||
@Synchronized
|
||||
|
||||
+9
-8
@@ -21,14 +21,15 @@ import com.facebook.react.bridge.RuntimeExecutor
|
||||
import com.facebook.react.bridge.RuntimeScheduler
|
||||
import com.facebook.react.bridge.UIManager
|
||||
import com.facebook.react.bridge.queue.ReactQueueConfiguration
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
|
||||
import com.facebook.react.common.annotations.VisibleForTesting
|
||||
import com.facebook.react.internal.turbomodule.core.interfaces.TurboModuleRegistry
|
||||
import com.facebook.react.turbomodule.core.interfaces.CallInvokerHolder
|
||||
import com.facebook.react.turbomodule.core.interfaces.NativeMethodCallInvokerHolder
|
||||
|
||||
@DoNotStrip
|
||||
@DeprecatedInNewArchitecture
|
||||
@Deprecated(
|
||||
message =
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) : CatalystInstance {
|
||||
|
||||
override fun handleMemoryPressure(level: Int) {
|
||||
@@ -147,23 +148,23 @@ public class BridgelessCatalystInstance(private val reactHost: ReactHostImpl) :
|
||||
throw UnsupportedOperationException("Unimplemented method 'setGlobalVariable'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun setTurboModuleRegistry(turboModuleRegistry: TurboModuleRegistry) {
|
||||
throw UnsupportedOperationException("Unimplemented method 'setTurboModuleRegistry'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun setFabricUIManager(fabricUIManager: UIManager) {
|
||||
throw UnsupportedOperationException("Unimplemented method 'setFabricUIManager'")
|
||||
}
|
||||
|
||||
@DeprecatedInNewArchitecture(
|
||||
@Deprecated(
|
||||
message =
|
||||
"This method will be deprecated later as part of Stable APIs with bridge removal and not encouraged usage.")
|
||||
"This class is deprecated, please to migrate to new architecture using [com.facebook.react.defaults.DefaultReactHost] instead.")
|
||||
override fun getFabricUIManager(): UIManager {
|
||||
throw UnsupportedOperationException("Unimplemented method 'getFabricUIManager'")
|
||||
}
|
||||
|
||||
+2
@@ -774,6 +774,8 @@ public class UIImplementation {
|
||||
mViewManagers.invalidate();
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mOperationsQueue.setViewHierarchyUpdateDebugListener(listener);
|
||||
|
||||
+2
@@ -687,6 +687,8 @@ public class UIManagerModule extends ReactContextBaseJavaModule
|
||||
}
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mUIImplementation.setViewHierarchyUpdateDebugListener(listener);
|
||||
|
||||
+2
@@ -609,6 +609,8 @@ public class UIViewOperationQueue {
|
||||
return mNativeViewHierarchyManager;
|
||||
}
|
||||
|
||||
// NOTE: When converted to Kotlin this method should be `internal` due to
|
||||
// visibility restriction for `NotThreadSafeViewHierarchyUpdateDebugListener`
|
||||
public void setViewHierarchyUpdateDebugListener(
|
||||
@Nullable NotThreadSafeViewHierarchyUpdateDebugListener listener) {
|
||||
mViewHierarchyUpdateDebugListener = listener;
|
||||
|
||||
+7
-11
@@ -5,26 +5,22 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.uimanager.debug;
|
||||
package com.facebook.react.uimanager.debug
|
||||
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
|
||||
import com.facebook.react.uimanager.UIManagerModule;
|
||||
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture
|
||||
|
||||
/**
|
||||
* A listener that is notified about view hierarchy update events. This listener should only be used
|
||||
* for debug purposes and should not affect application state.
|
||||
*
|
||||
* <p>NB: while onViewHierarchyUpdateFinished will always be called from the UI thread, there are no
|
||||
* NB: while [onViewHierarchyUpdateFinished] will always be called from the UI thread, there are no
|
||||
* guarantees what thread onViewHierarchyUpdateEnqueued is called on.
|
||||
*/
|
||||
@DeprecatedInNewArchitecture
|
||||
public interface NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
|
||||
/**
|
||||
* Called when {@link UIManagerModule} enqueues a UI batch to be dispatched to the main thread.
|
||||
*/
|
||||
void onViewHierarchyUpdateEnqueued();
|
||||
internal interface NotThreadSafeViewHierarchyUpdateDebugListener {
|
||||
/** Called when `UIManagerModule` enqueues a UI batch to be dispatched to the main thread. */
|
||||
fun onViewHierarchyUpdateEnqueued()
|
||||
|
||||
/** Called from the main thread after a UI batch has been applied to all root views. */
|
||||
void onViewHierarchyUpdateFinished();
|
||||
fun onViewHierarchyUpdateFinished()
|
||||
}
|
||||
+113
-98
@@ -17,108 +17,24 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
||||
import com.facebook.react.uimanager.SimpleViewManager
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate
|
||||
import com.facebook.react.viewmanagers.DebuggingOverlayManagerDelegate
|
||||
import com.facebook.react.viewmanagers.DebuggingOverlayManagerInterface
|
||||
|
||||
@ReactModule(name = DebuggingOverlayManager.REACT_CLASS)
|
||||
public class DebuggingOverlayManager : SimpleViewManager<DebuggingOverlay>() {
|
||||
public class DebuggingOverlayManager :
|
||||
SimpleViewManager<DebuggingOverlay>(), DebuggingOverlayManagerInterface<DebuggingOverlay> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<DebuggingOverlay> =
|
||||
DebuggingOverlayManagerDelegate(this)
|
||||
|
||||
public override fun getDelegate(): ViewManagerDelegate<DebuggingOverlay> = delegate
|
||||
|
||||
override fun receiveCommand(view: DebuggingOverlay, commandId: String, args: ReadableArray?) {
|
||||
when (commandId) {
|
||||
"highlightTraceUpdates" -> {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedTraceUpdates = args.getArray(0)
|
||||
val formattedTraceUpdates = mutableListOf<TraceUpdate>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedTraceUpdates.size()) {
|
||||
val traceUpdate = providedTraceUpdates.getMap(i)
|
||||
val serializedRectangle = traceUpdate.getMap("rectangle")
|
||||
if (serializedRectangle == null) {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field is" +
|
||||
" null"))
|
||||
successfullyParsedPayload = false
|
||||
break
|
||||
}
|
||||
|
||||
val id = traceUpdate.getInt("id")
|
||||
val color = traceUpdate.getInt("color")
|
||||
|
||||
try {
|
||||
val left = serializedRectangle.getDouble("x").toFloat()
|
||||
val top = serializedRectangle.getDouble("y").toFloat()
|
||||
val right = (left + serializedRectangle.getDouble("width")).toFloat()
|
||||
val bottom = (top + serializedRectangle.getDouble("height")).toFloat()
|
||||
|
||||
val rectangle = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
formattedTraceUpdates.add(TraceUpdate(id, rectangle, color))
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field should" +
|
||||
" have x, y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setTraceUpdates(formattedTraceUpdates)
|
||||
}
|
||||
}
|
||||
"highlightElements" -> {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedElements = args.getArray(0)
|
||||
val elementsRectangles = mutableListOf<RectF>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedElements.size()) {
|
||||
val element = providedElements.getMap(i)
|
||||
|
||||
try {
|
||||
val left = element.getDouble("x").toFloat()
|
||||
val top = element.getDouble("y").toFloat()
|
||||
val right = (left + element.getDouble("width")).toFloat()
|
||||
val bottom = (top + element.getDouble("height")).toFloat()
|
||||
val rect = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
elementsRectangles.add(rect)
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting elements: every element should have x," +
|
||||
" y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setHighlightedElementsRectangles(elementsRectangles)
|
||||
}
|
||||
}
|
||||
"clearElementsHighlights" -> {
|
||||
view.clearElementsHighlights()
|
||||
}
|
||||
"highlightTraceUpdates" -> highlightTraceUpdates(view, args)
|
||||
"highlightElements" -> highlightElements(view, args)
|
||||
"clearElementsHighlights" -> clearElementsHighlights(view)
|
||||
else -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
@@ -127,6 +43,105 @@ public class DebuggingOverlayManager : SimpleViewManager<DebuggingOverlay>() {
|
||||
}
|
||||
}
|
||||
|
||||
public override fun highlightTraceUpdates(view: DebuggingOverlay, args: ReadableArray?): Unit {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedTraceUpdates = args.getArray(0)
|
||||
val formattedTraceUpdates = mutableListOf<TraceUpdate>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedTraceUpdates.size()) {
|
||||
val traceUpdate = providedTraceUpdates.getMap(i)
|
||||
val serializedRectangle = traceUpdate.getMap("rectangle")
|
||||
if (serializedRectangle == null) {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field is null"))
|
||||
successfullyParsedPayload = false
|
||||
break
|
||||
}
|
||||
|
||||
val id = traceUpdate.getInt("id")
|
||||
val color = traceUpdate.getInt("color")
|
||||
|
||||
try {
|
||||
val left = serializedRectangle.getDouble("x").toFloat()
|
||||
val top = serializedRectangle.getDouble("y").toFloat()
|
||||
val right = (left + serializedRectangle.getDouble("width")).toFloat()
|
||||
val bottom = (top + serializedRectangle.getDouble("height")).toFloat()
|
||||
|
||||
val rectangle = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
formattedTraceUpdates.add(TraceUpdate(id, rectangle, color))
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting trace updates: rectangle field should" +
|
||||
" have x, y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setTraceUpdates(formattedTraceUpdates)
|
||||
}
|
||||
}
|
||||
|
||||
public override fun highlightElements(view: DebuggingOverlay, args: ReadableArray?): Unit {
|
||||
if (args == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val providedElements = args.getArray(0)
|
||||
val elementsRectangles = mutableListOf<RectF>()
|
||||
|
||||
var successfullyParsedPayload = true
|
||||
for (i in 0 until providedElements.size()) {
|
||||
val element = providedElements.getMap(i)
|
||||
|
||||
try {
|
||||
val left = element.getDouble("x").toFloat()
|
||||
val top = element.getDouble("y").toFloat()
|
||||
val right = (left + element.getDouble("width")).toFloat()
|
||||
val bottom = (top + element.getDouble("height")).toFloat()
|
||||
val rect = RectF(left.dpToPx(), top.dpToPx(), right.dpToPx(), bottom.dpToPx())
|
||||
|
||||
elementsRectangles.add(rect)
|
||||
} catch (ex: Exception) {
|
||||
when (ex) {
|
||||
is NoSuchKeyException,
|
||||
is UnexpectedNativeTypeException -> {
|
||||
ReactSoftExceptionLogger.logSoftException(
|
||||
REACT_CLASS,
|
||||
ReactNoCrashSoftException(
|
||||
"Unexpected payload for highlighting elements: every element should have x," +
|
||||
" y, width, height fields"))
|
||||
successfullyParsedPayload = false
|
||||
}
|
||||
else -> throw ex
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (successfullyParsedPayload) {
|
||||
view.setHighlightedElementsRectangles(elementsRectangles)
|
||||
}
|
||||
}
|
||||
|
||||
public override fun clearElementsHighlights(view: DebuggingOverlay): Unit {
|
||||
view.clearElementsHighlights()
|
||||
}
|
||||
|
||||
public override fun createViewInstance(context: ThemedReactContext): DebuggingOverlay {
|
||||
return DebuggingOverlay(context)
|
||||
}
|
||||
|
||||
+4
-1
@@ -19,6 +19,7 @@ public object ImageResizeMode {
|
||||
private const val RESIZE_MODE_STRETCH = "stretch"
|
||||
private const val RESIZE_MODE_CENTER = "center"
|
||||
private const val RESIZE_MODE_REPEAT = "repeat"
|
||||
private const val RESIZE_MODE_NONE = "none"
|
||||
|
||||
/** Converts JS resize modes into `ScalingUtils.ScaleType`. See `ImageResizeMode.js`. */
|
||||
@JvmStatic
|
||||
@@ -30,6 +31,7 @@ public object ImageResizeMode {
|
||||
RESIZE_MODE_CENTER -> return ScalingUtils.ScaleType.CENTER_INSIDE
|
||||
// Handled via a combination of ScaleType and TileMode
|
||||
RESIZE_MODE_REPEAT -> return ScaleTypeStartInside.INSTANCE
|
||||
RESIZE_MODE_NONE -> return ScaleTypeStartInside.INSTANCE
|
||||
}
|
||||
|
||||
if (resizeModeValue != null) {
|
||||
@@ -45,7 +47,8 @@ public object ImageResizeMode {
|
||||
if (RESIZE_MODE_CONTAIN == resizeModeValue ||
|
||||
RESIZE_MODE_COVER == resizeModeValue ||
|
||||
RESIZE_MODE_STRETCH == resizeModeValue ||
|
||||
RESIZE_MODE_CENTER == resizeModeValue) {
|
||||
RESIZE_MODE_CENTER == resizeModeValue ||
|
||||
RESIZE_MODE_NONE == resizeModeValue) {
|
||||
return TileMode.CLAMP
|
||||
}
|
||||
if (RESIZE_MODE_REPEAT == resizeModeValue) {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import com.facebook.react.uimanager.StateWrapper
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.UIManagerModule
|
||||
|
||||
public class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
|
||||
internal class ReactSafeAreaView(public val reactContext: ThemedReactContext) :
|
||||
ViewGroup(reactContext) {
|
||||
internal var stateWrapper: StateWrapper? = null
|
||||
|
||||
|
||||
+3
-3
@@ -19,7 +19,7 @@ import com.facebook.react.viewmanagers.SafeAreaViewManagerInterface
|
||||
|
||||
/** View manager for [ReactSafeAreaView] components. */
|
||||
@ReactModule(name = ReactSafeAreaViewManager.REACT_CLASS)
|
||||
public class ReactSafeAreaViewManager() :
|
||||
internal class ReactSafeAreaViewManager() :
|
||||
ViewGroupManager<ReactSafeAreaView>(), SafeAreaViewManagerInterface<ReactSafeAreaView> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<ReactSafeAreaView> = SafeAreaViewManagerDelegate(this)
|
||||
@@ -45,7 +45,7 @@ public class ReactSafeAreaViewManager() :
|
||||
return null
|
||||
}
|
||||
|
||||
public companion object {
|
||||
public const val REACT_CLASS: String = "RCTSafeAreaView"
|
||||
internal companion object {
|
||||
const val REACT_CLASS: String = "RCTSafeAreaView"
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -11,16 +11,25 @@ import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.ReactStylesDiffMap
|
||||
import com.facebook.react.uimanager.StateWrapper
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate
|
||||
import com.facebook.react.uimanager.common.UIManagerType
|
||||
import com.facebook.react.uimanager.common.ViewUtil
|
||||
import com.facebook.react.viewmanagers.AndroidHorizontalScrollContentViewManagerDelegate
|
||||
import com.facebook.react.viewmanagers.AndroidHorizontalScrollContentViewManagerInterface
|
||||
import com.facebook.react.views.view.ReactViewGroup
|
||||
import com.facebook.react.views.view.ReactViewManager
|
||||
|
||||
/** View manager for {@link ReactHorizontalScrollContainerView} components. */
|
||||
@ReactModule(name = ReactHorizontalScrollContainerViewManager.REACT_CLASS)
|
||||
public class ReactHorizontalScrollContainerViewManager : ReactViewManager() {
|
||||
public class ReactHorizontalScrollContainerViewManager :
|
||||
ReactViewManager(), AndroidHorizontalScrollContentViewManagerInterface<ReactViewGroup> {
|
||||
override public fun getName(): String = REACT_CLASS
|
||||
|
||||
private val delegate: ViewManagerDelegate<ReactViewGroup> =
|
||||
AndroidHorizontalScrollContentViewManagerDelegate(this)
|
||||
|
||||
public override fun getDelegate(): ViewManagerDelegate<ReactViewGroup> = delegate
|
||||
|
||||
protected override fun createViewInstance(
|
||||
reactTag: Int,
|
||||
context: ThemedReactContext,
|
||||
|
||||
+3
-8
@@ -5,15 +5,10 @@
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text;
|
||||
package com.facebook.react.views.text
|
||||
|
||||
/** A virtual text node. */
|
||||
public class ReactVirtualTextShadowNode extends ReactBaseTextShadowNode {
|
||||
internal class ReactVirtualTextShadowNode : ReactBaseTextShadowNode() {
|
||||
|
||||
@Override
|
||||
public boolean isVirtual() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public ReactVirtualTextShadowNode() {}
|
||||
override fun isVirtual(): Boolean = true
|
||||
}
|
||||
-47
@@ -1,47 +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.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text;
|
||||
|
||||
import android.view.View;
|
||||
import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.BaseViewManager;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
|
||||
/**
|
||||
* Manages raw text nodes. Since they are used only as a virtual nodes any type of native view
|
||||
* operation will throw an {@link IllegalStateException}
|
||||
*/
|
||||
@ReactModule(name = ReactVirtualTextViewManager.REACT_CLASS)
|
||||
public class ReactVirtualTextViewManager extends BaseViewManager<View, ReactVirtualTextShadowNode> {
|
||||
|
||||
@VisibleForTesting public static final String REACT_CLASS = "RCTVirtualText";
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return REACT_CLASS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public View createViewInstance(ThemedReactContext context) {
|
||||
throw new IllegalStateException("Attempt to create a native view for RCTVirtualText");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateExtraData(View view, Object extraData) {}
|
||||
|
||||
@Override
|
||||
public Class<ReactVirtualTextShadowNode> getShadowNodeClass() {
|
||||
return ReactVirtualTextShadowNode.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ReactVirtualTextShadowNode createShadowNodeInstance() {
|
||||
return new ReactVirtualTextShadowNode();
|
||||
}
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text
|
||||
|
||||
import android.view.View
|
||||
import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.BaseViewManager
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
|
||||
/**
|
||||
* Manages raw text nodes. Since they are used only as a virtual nodes any type of native view
|
||||
* operation will throw an [IllegalStateException]
|
||||
*/
|
||||
@ReactModule(name = ReactVirtualTextViewManager.REACT_CLASS)
|
||||
internal class ReactVirtualTextViewManager : BaseViewManager<View, ReactVirtualTextShadowNode>() {
|
||||
|
||||
public override fun getName(): String = REACT_CLASS
|
||||
|
||||
protected override fun createViewInstance(context: ThemedReactContext): View {
|
||||
throw IllegalStateException("Attempt to create a native view for RCTVirtualText")
|
||||
}
|
||||
|
||||
public override fun updateExtraData(view: View, extraData: Any): Unit {}
|
||||
|
||||
public override fun getShadowNodeClass(): Class<ReactVirtualTextShadowNode> =
|
||||
ReactVirtualTextShadowNode::class.java
|
||||
|
||||
override fun createShadowNodeInstance(): ReactVirtualTextShadowNode = ReactVirtualTextShadowNode()
|
||||
|
||||
internal companion object {
|
||||
public const val REACT_CLASS: String = "RCTVirtualText"
|
||||
}
|
||||
}
|
||||
+2
@@ -11,6 +11,7 @@ import android.view.View;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.facebook.drawee.backends.pipeline.Fresco;
|
||||
import com.facebook.drawee.controller.AbstractDraweeControllerBuilder;
|
||||
import com.facebook.infer.annotation.Nullsafe;
|
||||
import com.facebook.react.module.annotations.ReactModule;
|
||||
import com.facebook.react.uimanager.BaseViewManager;
|
||||
import com.facebook.react.uimanager.ThemedReactContext;
|
||||
@@ -19,6 +20,7 @@ import com.facebook.react.uimanager.ThemedReactContext;
|
||||
* Manages Images embedded in Text nodes using Fresco. Since they are used only as a virtual nodes
|
||||
* any type of native view operation will throw an {@link IllegalStateException}.
|
||||
*/
|
||||
@Nullsafe(Nullsafe.Mode.LOCAL)
|
||||
@ReactModule(name = FrescoBasedReactTextInlineImageViewManager.REACT_CLASS)
|
||||
public class FrescoBasedReactTextInlineImageViewManager
|
||||
extends BaseViewManager<View, FrescoBasedReactTextInlineImageShadowNode> {
|
||||
|
||||
+2
-2
@@ -13,7 +13,7 @@ import android.view.Gravity
|
||||
import android.widget.LinearLayout
|
||||
import androidx.appcompat.widget.AppCompatTextView
|
||||
|
||||
public class ReactUnimplementedView(context: Context) : LinearLayout(context) {
|
||||
internal class ReactUnimplementedView(context: Context) : LinearLayout(context) {
|
||||
|
||||
private val textView: AppCompatTextView
|
||||
|
||||
@@ -31,7 +31,7 @@ public class ReactUnimplementedView(context: Context) : LinearLayout(context) {
|
||||
addView(textView)
|
||||
}
|
||||
|
||||
public fun setName(name: String) {
|
||||
internal fun setName(name: String) {
|
||||
textView.setText("'$name' is not Fabric compatible yet.")
|
||||
}
|
||||
}
|
||||
|
||||
+14
-4
@@ -10,11 +10,21 @@ package com.facebook.react.views.unimplementedview
|
||||
import com.facebook.react.module.annotations.ReactModule
|
||||
import com.facebook.react.uimanager.ThemedReactContext
|
||||
import com.facebook.react.uimanager.ViewGroupManager
|
||||
import com.facebook.react.uimanager.ViewManagerDelegate
|
||||
import com.facebook.react.uimanager.annotations.ReactProp
|
||||
import com.facebook.react.viewmanagers.UnimplementedNativeViewManagerDelegate
|
||||
import com.facebook.react.viewmanagers.UnimplementedNativeViewManagerInterface
|
||||
|
||||
/** ViewManager for [ReactUnimplementedView] to represent a component that is not yet supported. */
|
||||
@ReactModule(name = ReactUnimplementedViewManager.REACT_CLASS)
|
||||
public class ReactUnimplementedViewManager : ViewGroupManager<ReactUnimplementedView>() {
|
||||
internal class ReactUnimplementedViewManager :
|
||||
ViewGroupManager<ReactUnimplementedView>(),
|
||||
UnimplementedNativeViewManagerInterface<ReactUnimplementedView> {
|
||||
|
||||
private val delegate: ViewManagerDelegate<ReactUnimplementedView> =
|
||||
UnimplementedNativeViewManagerDelegate(this)
|
||||
|
||||
public override fun getDelegate(): ViewManagerDelegate<ReactUnimplementedView> = delegate
|
||||
|
||||
protected override fun createViewInstance(
|
||||
reactContext: ThemedReactContext
|
||||
@@ -23,11 +33,11 @@ public class ReactUnimplementedViewManager : ViewGroupManager<ReactUnimplemented
|
||||
public override fun getName(): String = REACT_CLASS
|
||||
|
||||
@ReactProp(name = "name")
|
||||
public fun setName(view: ReactUnimplementedView, name: String) {
|
||||
view.setName(name)
|
||||
public override fun setName(view: ReactUnimplementedView, name: String?): Unit {
|
||||
view.setName(name ?: "<null component name>")
|
||||
}
|
||||
|
||||
public companion object {
|
||||
internal companion object {
|
||||
public const val REACT_CLASS: String = "UnimplementedNativeView"
|
||||
}
|
||||
}
|
||||
|
||||
+7
-1
@@ -143,7 +143,13 @@ public class ReactViewGroup extends ViewGroup
|
||||
private float mBackfaceOpacity;
|
||||
private String mBackfaceVisibility;
|
||||
|
||||
public ReactViewGroup(Context context) {
|
||||
/**
|
||||
* Creates a new `ReactViewGroup` instance.
|
||||
*
|
||||
* @param context A {@link Context} instance. It's Nullable to not break compatibility with OSS
|
||||
* users (could be made non-null in the future but requires proper comms).
|
||||
*/
|
||||
public ReactViewGroup(@Nullable Context context) {
|
||||
super(context);
|
||||
initView();
|
||||
}
|
||||
|
||||
@@ -74,6 +74,9 @@ public class YogaNative {
|
||||
static native void jni_YGNodeStyleSetFlexBasisJNI(long nativePointer, float flexBasis);
|
||||
static native void jni_YGNodeStyleSetFlexBasisPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetFlexBasisAutoJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetFlexBasisMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetFlexBasisFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetFlexBasisStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetMarginJNI(long nativePointer, int edge);
|
||||
static native void jni_YGNodeStyleSetMarginJNI(long nativePointer, int edge, float margin);
|
||||
static native void jni_YGNodeStyleSetMarginPercentJNI(long nativePointer, int edge, float percent);
|
||||
@@ -91,22 +94,40 @@ public class YogaNative {
|
||||
static native void jni_YGNodeStyleSetWidthJNI(long nativePointer, float width);
|
||||
static native void jni_YGNodeStyleSetWidthPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetWidthAutoJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetWidthMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetWidthFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetWidthStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetHeightJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetHeightJNI(long nativePointer, float height);
|
||||
static native void jni_YGNodeStyleSetHeightPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetHeightAutoJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetHeightMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetHeightFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetHeightStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetMinWidthJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinWidthJNI(long nativePointer, float minWidth);
|
||||
static native void jni_YGNodeStyleSetMinWidthPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetMinWidthMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinWidthFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinWidthStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetMinHeightJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinHeightJNI(long nativePointer, float minHeight);
|
||||
static native void jni_YGNodeStyleSetMinHeightPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetMinHeightMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinHeightFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMinHeightStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetMaxWidthJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxWidthJNI(long nativePointer, float maxWidth);
|
||||
static native void jni_YGNodeStyleSetMaxWidthPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetMaxWidthMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxWidthFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxWidthStretchJNI(long nativePointer);
|
||||
static native long jni_YGNodeStyleGetMaxHeightJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxHeightJNI(long nativePointer, float maxheight);
|
||||
static native void jni_YGNodeStyleSetMaxHeightPercentJNI(long nativePointer, float percent);
|
||||
static native void jni_YGNodeStyleSetMaxHeightMaxContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxHeightFitContentJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetMaxHeightStretchJNI(long nativePointer);
|
||||
static native float jni_YGNodeStyleGetAspectRatioJNI(long nativePointer);
|
||||
static native void jni_YGNodeStyleSetAspectRatioJNI(long nativePointer, float aspectRatio);
|
||||
static native float jni_YGNodeStyleGetGapJNI(long nativePointer, int gutter);
|
||||
|
||||
@@ -124,6 +124,12 @@ public abstract class YogaNode implements YogaProps {
|
||||
|
||||
public abstract void setFlexBasisAuto();
|
||||
|
||||
public abstract void setFlexBasisMaxContent();
|
||||
|
||||
public abstract void setFlexBasisFitContent();
|
||||
|
||||
public abstract void setFlexBasisStretch();
|
||||
|
||||
public abstract YogaValue getMargin(YogaEdge edge);
|
||||
|
||||
public abstract void setMargin(YogaEdge edge, float margin);
|
||||
@@ -158,6 +164,12 @@ public abstract class YogaNode implements YogaProps {
|
||||
|
||||
public abstract void setWidthAuto();
|
||||
|
||||
public abstract void setWidthMaxContent();
|
||||
|
||||
public abstract void setWidthFitContent();
|
||||
|
||||
public abstract void setWidthStretch();
|
||||
|
||||
public abstract YogaValue getHeight();
|
||||
|
||||
public abstract void setHeight(float height);
|
||||
@@ -166,30 +178,60 @@ public abstract class YogaNode implements YogaProps {
|
||||
|
||||
public abstract void setHeightAuto();
|
||||
|
||||
public abstract void setHeightMaxContent();
|
||||
|
||||
public abstract void setHeightFitContent();
|
||||
|
||||
public abstract void setHeightStretch();
|
||||
|
||||
public abstract YogaValue getMinWidth();
|
||||
|
||||
public abstract void setMinWidth(float minWidth);
|
||||
|
||||
public abstract void setMinWidthPercent(float percent);
|
||||
|
||||
public abstract void setMinWidthMaxContent();
|
||||
|
||||
public abstract void setMinWidthFitContent();
|
||||
|
||||
public abstract void setMinWidthStretch();
|
||||
|
||||
public abstract YogaValue getMinHeight();
|
||||
|
||||
public abstract void setMinHeight(float minHeight);
|
||||
|
||||
public abstract void setMinHeightPercent(float percent);
|
||||
|
||||
public abstract void setMinHeightMaxContent();
|
||||
|
||||
public abstract void setMinHeightFitContent();
|
||||
|
||||
public abstract void setMinHeightStretch();
|
||||
|
||||
public abstract YogaValue getMaxWidth();
|
||||
|
||||
public abstract void setMaxWidth(float maxWidth);
|
||||
|
||||
public abstract void setMaxWidthPercent(float percent);
|
||||
|
||||
public abstract void setMaxWidthMaxContent();
|
||||
|
||||
public abstract void setMaxWidthFitContent();
|
||||
|
||||
public abstract void setMaxWidthStretch();
|
||||
|
||||
public abstract YogaValue getMaxHeight();
|
||||
|
||||
public abstract void setMaxHeight(float maxheight);
|
||||
|
||||
public abstract void setMaxHeightPercent(float percent);
|
||||
|
||||
public abstract void setMaxHeightMaxContent();
|
||||
|
||||
public abstract void setMaxHeightFitContent();
|
||||
|
||||
public abstract void setMaxHeightStretch();
|
||||
|
||||
public abstract float getAspectRatio();
|
||||
|
||||
public abstract void setAspectRatio(float aspectRatio);
|
||||
|
||||
+84
@@ -373,6 +373,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlexBasisMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlexBasisFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setFlexBasisStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetFlexBasisStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMargin(YogaEdge edge) {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMarginJNI(mNativePointer, edge.intValue()));
|
||||
}
|
||||
@@ -441,6 +453,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetWidthAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setWidthMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetWidthMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setWidthFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetWidthFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setWidthStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetWidthStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getHeight() {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetHeightJNI(mNativePointer));
|
||||
}
|
||||
@@ -457,6 +481,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetHeightAutoJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setHeightMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetHeightMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setHeightFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetHeightFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setHeightStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetHeightStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMinWidth() {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMinWidthJNI(mNativePointer));
|
||||
}
|
||||
@@ -469,6 +505,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setMinWidthMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMinWidthFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMinWidthStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetMinWidthStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMinHeight() {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMinHeightJNI(mNativePointer));
|
||||
}
|
||||
@@ -481,6 +529,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setMinHeightMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMinHeightFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMinHeightStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetMinHeightStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMaxWidth() {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMaxWidthJNI(mNativePointer));
|
||||
}
|
||||
@@ -493,6 +553,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setMaxWidthMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMaxWidthFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMaxWidthStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxWidthStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public YogaValue getMaxHeight() {
|
||||
return valueFromLong(YogaNative.jni_YGNodeStyleGetMaxHeightJNI(mNativePointer));
|
||||
}
|
||||
@@ -505,6 +577,18 @@ public abstract class YogaNodeJNIBase extends YogaNode implements Cloneable {
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightPercentJNI(mNativePointer, percent);
|
||||
}
|
||||
|
||||
public void setMaxHeightMaxContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightMaxContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMaxHeightFitContent() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightFitContentJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public void setMaxHeightStretch() {
|
||||
YogaNative.jni_YGNodeStyleSetMaxHeightStretchJNI(mNativePointer);
|
||||
}
|
||||
|
||||
public float getAspectRatio() {
|
||||
return YogaNative.jni_YGNodeStyleGetAspectRatioJNI(mNativePointer);
|
||||
}
|
||||
|
||||
@@ -15,15 +15,33 @@ public interface YogaProps {
|
||||
|
||||
void setWidthPercent(float percent);
|
||||
|
||||
void setWidthAuto();
|
||||
|
||||
void setWidthMaxContent();
|
||||
|
||||
void setWidthFitContent();
|
||||
|
||||
void setWidthStretch();
|
||||
|
||||
void setMinWidth(float minWidth);
|
||||
|
||||
void setMinWidthPercent(float percent);
|
||||
|
||||
void setMinWidthMaxContent();
|
||||
|
||||
void setMinWidthFitContent();
|
||||
|
||||
void setMinWidthStretch();
|
||||
|
||||
void setMaxWidth(float maxWidth);
|
||||
|
||||
void setMaxWidthPercent(float percent);
|
||||
|
||||
void setWidthAuto();
|
||||
void setMaxWidthMaxContent();
|
||||
|
||||
void setMaxWidthFitContent();
|
||||
|
||||
void setMaxWidthStretch();
|
||||
|
||||
/* Height properties */
|
||||
|
||||
@@ -31,15 +49,33 @@ public interface YogaProps {
|
||||
|
||||
void setHeightPercent(float percent);
|
||||
|
||||
void setHeightAuto();
|
||||
|
||||
void setHeightMaxContent();
|
||||
|
||||
void setHeightFitContent();
|
||||
|
||||
void setHeightStretch();
|
||||
|
||||
void setMinHeight(float minHeight);
|
||||
|
||||
void setMinHeightPercent(float percent);
|
||||
|
||||
void setMinHeightMaxContent();
|
||||
|
||||
void setMinHeightFitContent();
|
||||
|
||||
void setMinHeightStretch();
|
||||
|
||||
void setMaxHeight(float maxHeight);
|
||||
|
||||
void setMaxHeightPercent(float percent);
|
||||
|
||||
void setHeightAuto();
|
||||
void setMaxHeightMaxContent();
|
||||
|
||||
void setMaxHeightFitContent();
|
||||
|
||||
void setMaxHeightStretch();
|
||||
|
||||
/* Margin properties */
|
||||
|
||||
@@ -81,6 +117,12 @@ public interface YogaProps {
|
||||
|
||||
void setFlexBasis(float flexBasis);
|
||||
|
||||
void setFlexBasisMaxContent();
|
||||
|
||||
void setFlexBasisFitContent();
|
||||
|
||||
void setFlexBasisStretch();
|
||||
|
||||
void setFlexDirection(YogaFlexDirection direction);
|
||||
|
||||
void setFlexGrow(float flexGrow);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user