diff --git a/.eslintrc.js b/.eslintrc.js index 41821abb..ae6a46d8 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,6 +1,6 @@ module.exports = { root: true, - extends: ['@react-native'], + extends: ['@react-native', 'plugin:jest/recommended'], plugins: ['jest', 'import'], env: { browser: true, @@ -9,6 +9,7 @@ module.exports = { rules: { '@typescript-eslint/no-unused-vars': 'off', 'react-hooks/rules-of-hooks': 'off', + '@typescript-eslint/func-call-spacing': 'off', }, parserOptions: { project: ['./tsconfig.json'], diff --git a/.gitignore b/.gitignore index 5b4acc4b..c1b52f17 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ coverage !.yarn/releases !.yarn/sdks !.yarn/versions +example/.yarn +playground/.yarn/cache/ diff --git a/.prettierrc.js b/.prettierrc.js index 335ca394..62b564c3 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,10 +1,10 @@ module.exports = { - bracketSpacing: true, - jsxBracketSameLine: true, - singleQuote: true, - trailingComma: 'all', - arrowParens: 'avoid', - importOrder: ['', '^~(.*)/(.*)$', '^[./]'], - importOrderSeparation: true, - importOrderSortSpecifiers: true, + plugins: [require('@ianvs/prettier-plugin-sort-imports')], + bracketSpacing: true, + jsxBracketSameLine: true, + singleQuote: true, + trailingComma: 'all', + arrowParens: 'avoid', + importOrder: ['', '^~(.*)/(.*)$', '^[./]'], + parser: 'typescript', }; diff --git a/README.md b/README.md index d453e4bc..2d1f5ab0 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,12 @@ export const App = () => { }; ``` +### Playground + +You can use the playground app within this repository to see how AMA checks work in practice. +The playground can also be used to learn how to fix accessibility issues in your app. + + ## 📃 [Documentation](https://commerce.nearform.com/open-source/react-native-ama) The documentation contains everything you need to know about `@react-native-ama/...`. It contains several sections in order of importance when you first get started: diff --git a/examples/README.md b/examples/README.md deleted file mode 100644 index 5cbf5654..00000000 --- a/examples/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Examples - -Welcome to the examples directory! This directory contains a both an example app for expo and one for react-native bare workflow. - -These apps share a common `shared` package which contains all the testable code. When adding a new example, it should be added to the shared package and then pulled into both apps and tested. - -> [!IMPORTANT] -> Changes made to the library should be tested in both the expo and bare react-native apps. diff --git a/examples/bare/.bundle/config b/examples/bare/.bundle/config deleted file mode 100644 index 848943bb..00000000 --- a/examples/bare/.bundle/config +++ /dev/null @@ -1,2 +0,0 @@ -BUNDLE_PATH: "vendor/bundle" -BUNDLE_FORCE_RUBY_PLATFORM: 1 diff --git a/examples/bare/.eslintrc.js b/examples/bare/.eslintrc.js deleted file mode 100644 index 187894b6..00000000 --- a/examples/bare/.eslintrc.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = { - root: true, - extends: '@react-native', -}; diff --git a/examples/bare/.gitignore b/examples/bare/.gitignore deleted file mode 100644 index 188d2d24..00000000 --- a/examples/bare/.gitignore +++ /dev/null @@ -1,75 +0,0 @@ -# OSX -# -.DS_Store - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -**/.xcode.env.local - -# Android/IntelliJ -# -build/ -.idea -.gradle -local.properties -*.iml -*.hprof -.cxx/ -*.keystore -!debug.keystore - -# node.js -# -node_modules/ -npm-debug.log -yarn-error.log - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/ - -**/fastlane/report.xml -**/fastlane/Preview.html -**/fastlane/screenshots -**/fastlane/test_output - -# Bundle artifact -*.jsbundle - -# Ruby / CocoaPods -**/Pods/ -/vendor/bundle/ - -# Temporary files created by Metro to check the health of the file watcher -.metro-health-check* - -# testing -/coverage - -# Yarn -.yarn/* -!.yarn/patches -!.yarn/plugins -!.yarn/releases -!.yarn/sdks -!.yarn/versions - diff --git a/examples/bare/.prettierrc.js b/examples/bare/.prettierrc.js deleted file mode 100644 index 26419e47..00000000 --- a/examples/bare/.prettierrc.js +++ /dev/null @@ -1,4 +0,0 @@ -const baseConfig = require('../../.prettierrc.js'); -module.exports = { - ...baseConfig, -}; diff --git a/examples/bare/.watchmanconfig b/examples/bare/.watchmanconfig deleted file mode 100644 index 0967ef42..00000000 --- a/examples/bare/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/examples/bare/CHANGELOG.md b/examples/bare/CHANGELOG.md deleted file mode 100644 index f2597b51..00000000 --- a/examples/bare/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# amaexample - -## 1.1.0 - -### Minor Changes - -- Added `` component example screens ([#272](https://github.com/FormidableLabs/react-native-ama/pull/272)) - -## 0.0.2 - -### Patch Changes - -- Ignoring eslint on babel ([#253](https://github.com/FormidableLabs/react-native-ama/pull/253)) diff --git a/examples/bare/Gemfile b/examples/bare/Gemfile deleted file mode 100644 index 676766e0..00000000 --- a/examples/bare/Gemfile +++ /dev/null @@ -1,9 +0,0 @@ -source 'https://rubygems.org' - -# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version -ruby ">= 2.6.10" - -# Exclude problematic versions of cocoapods and activesupport that causes build failures. -gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' -gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' -gem 'xcodeproj', '< 1.26.0' \ No newline at end of file diff --git a/examples/bare/Gemfile.lock b/examples/bare/Gemfile.lock deleted file mode 100644 index 71ccde6e..00000000 --- a/examples/bare/Gemfile.lock +++ /dev/null @@ -1,100 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - CFPropertyList (3.0.6) - rexml - activesupport (6.1.7.6) - concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 1.6, < 2) - minitest (>= 5.1) - tzinfo (~> 2.0) - zeitwerk (~> 2.3) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - algoliasearch (1.27.5) - httpclient (~> 2.8, >= 2.8.3) - json (>= 1.5.1) - atomos (0.1.3) - claide (1.1.0) - cocoapods (1.12.1) - addressable (~> 2.8) - claide (>= 1.0.2, < 2.0) - cocoapods-core (= 1.12.1) - cocoapods-deintegrate (>= 1.0.3, < 2.0) - cocoapods-downloader (>= 1.6.0, < 2.0) - cocoapods-plugins (>= 1.0.0, < 2.0) - cocoapods-search (>= 1.0.0, < 2.0) - cocoapods-trunk (>= 1.6.0, < 2.0) - cocoapods-try (>= 1.1.0, < 2.0) - colored2 (~> 3.1) - escape (~> 0.0.4) - fourflusher (>= 2.3.0, < 3.0) - gh_inspector (~> 1.0) - molinillo (~> 0.8.0) - nap (~> 1.0) - ruby-macho (>= 2.3.0, < 3.0) - xcodeproj (>= 1.21.0, < 2.0) - cocoapods-core (1.12.1) - activesupport (>= 5.0, < 8) - addressable (~> 2.8) - algoliasearch (~> 1.0) - concurrent-ruby (~> 1.1) - fuzzy_match (~> 2.0.4) - nap (~> 1.0) - netrc (~> 0.11) - public_suffix (~> 4.0) - typhoeus (~> 1.0) - cocoapods-deintegrate (1.0.5) - cocoapods-downloader (1.6.3) - cocoapods-plugins (1.0.0) - nap - cocoapods-search (1.0.1) - cocoapods-trunk (1.6.0) - nap (>= 0.8, < 2.0) - netrc (~> 0.11) - cocoapods-try (1.2.0) - colored2 (3.1.2) - concurrent-ruby (1.2.2) - escape (0.0.4) - ethon (0.16.0) - ffi (>= 1.15.0) - ffi (1.15.5) - fourflusher (2.3.1) - fuzzy_match (2.0.4) - gh_inspector (1.1.3) - httpclient (2.8.3) - i18n (1.14.1) - concurrent-ruby (~> 1.0) - json (2.6.3) - minitest (5.20.0) - molinillo (0.8.0) - nanaimo (0.3.0) - nap (1.1.0) - netrc (0.11.0) - public_suffix (4.0.7) - rexml (3.2.6) - ruby-macho (2.5.1) - typhoeus (1.4.0) - ethon (>= 0.9.0) - tzinfo (2.0.6) - concurrent-ruby (~> 1.0) - xcodeproj (1.22.0) - CFPropertyList (>= 2.3.3, < 4.0) - atomos (~> 0.1.3) - claide (>= 1.0.2, < 2.0) - colored2 (~> 3.1) - nanaimo (~> 0.3.0) - rexml (~> 3.2.4) - zeitwerk (2.6.11) - -PLATFORMS - ruby - -DEPENDENCIES - cocoapods (~> 1.12) - -RUBY VERSION - ruby 2.6.10p210 - -BUNDLED WITH - 1.17.2 diff --git a/examples/bare/README.md b/examples/bare/README.md deleted file mode 100644 index 0fd08a88..00000000 --- a/examples/bare/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Getting Started - -Before getting started, make sure you have installed _node_modules_ by running `yarn` from the root of the project, then come back here. - -> **Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding. - -## Step 1: Start the Metro Server - -First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native. - -To start Metro, run the following command from the _root_ of your React Native project: - -```bash -yarn start -``` - -## Step 2: Start your Application - -Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app: - -### For Android - -```bash -yarn android -``` - -### For iOS - -```bash -yarn ios -``` - -If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly. - -This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively. diff --git a/examples/bare/__tests__/App.test.tsx b/examples/bare/__tests__/App.test.tsx deleted file mode 100644 index ef217ab4..00000000 --- a/examples/bare/__tests__/App.test.tsx +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @format - */ - -import 'react-native'; -import React from 'react'; -import App from '../App'; - -// Note: import explicitly to use the types shipped with jest. -import { it } from '@jest/globals'; - -// Note: test renderer must be required after react-native. -import renderer from 'react-test-renderer'; - -it('renders correctly', () => { - renderer.create(); -}); diff --git a/examples/bare/android/app/src/main/AndroidManifest.xml b/examples/bare/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index e1892528..00000000 --- a/examples/bare/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - diff --git a/examples/bare/android/app/src/main/java/com/example/rnama/MainActivity.kt b/examples/bare/android/app/src/main/java/com/example/rnama/MainActivity.kt deleted file mode 100644 index b31e4228..00000000 --- a/examples/bare/android/app/src/main/java/com/example/rnama/MainActivity.kt +++ /dev/null @@ -1,30 +0,0 @@ -package com.example.rnama; - -// react-native-screens import -import android.os.Bundle - -import com.facebook.react.ReactActivity -import com.facebook.react.ReactActivityDelegate -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.fabricEnabled -import com.facebook.react.defaults.DefaultReactActivityDelegate - -class MainActivity : ReactActivity() { - - /** - * Returns the name of the main component registered from JavaScript. This is used to schedule - * rendering of the component. - */ - override fun getMainComponentName(): String = "AMA Example" - - /** - * Returns the instance of the [ReactActivityDelegate]. We use [DefaultReactActivityDelegate] - * which allows you to enable New Architecture with a single boolean flags [fabricEnabled] - */ - override fun createReactActivityDelegate(): ReactActivityDelegate = - DefaultReactActivityDelegate(this, mainComponentName, fabricEnabled) - - //react-native-screens override - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(null) - } -} \ No newline at end of file diff --git a/examples/bare/android/app/src/main/java/com/example/rnama/MainApplication.kt b/examples/bare/android/app/src/main/java/com/example/rnama/MainApplication.kt deleted file mode 100644 index 4cb6cc55..00000000 --- a/examples/bare/android/app/src/main/java/com/example/rnama/MainApplication.kt +++ /dev/null @@ -1,44 +0,0 @@ -package com.example.rnama - -import android.app.Application -import com.facebook.react.PackageList -import com.facebook.react.ReactApplication -import com.facebook.react.ReactHost -import com.facebook.react.ReactNativeHost -import com.facebook.react.ReactPackage -import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load -import com.facebook.react.defaults.DefaultReactHost.getDefaultReactHost -import com.facebook.react.defaults.DefaultReactNativeHost -import com.facebook.react.soloader.OpenSourceMergedSoMapping -import com.facebook.soloader.SoLoader - -class MainApplication : Application(), ReactApplication { - - override val reactNativeHost: ReactNativeHost = - object : DefaultReactNativeHost(this) { - override fun getPackages(): List = - PackageList(this).packages.apply { - // Packages that cannot be autolinked yet can be added manually here, for example: - // add(MyReactNativePackage()) - } - - override fun getJSMainModuleName(): String = "index" - - override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG - - override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED - override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED - } - - override val reactHost: ReactHost - get() = getDefaultReactHost(applicationContext, reactNativeHost) - - override fun onCreate() { - super.onCreate() - SoLoader.init(this, OpenSourceMergedSoMapping) - if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { - // If you opted-in for the New Architecture, we load the native entry point for this app. - load() - } - } -} \ No newline at end of file diff --git a/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index 6cde17ab..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ded7aabf6a56b694e486e096efd89e2f0c9067d292b634663898e352c9491f10 -size 3056 diff --git a/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 08863165..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21304a0c9b00da6a72cfa31c7229c9528fc17b6e5eb4e68a969bce08c01a2fee -size 5024 diff --git a/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 3b1c1d23..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eef20f25fb1477d8c9df15757e764811cc503fb0777f18d0f7fb2d19178b5bf6 -size 2096 diff --git a/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index 33487015..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:520d05f978a15ba0ccf23006a1a5691a054a02478c70cafc5ebafae76e600f0d -size 2858 diff --git a/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index 65f75b81..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e77c5045bfdb6f4bbe955b3a793bfed3baa369ce4811ae2a9103d5480637cfff -size 4569 diff --git a/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 9e16d22d..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2846e1a703e519791fe22f41bcb243b82f908d12e5ebcb43f020ddf9982780b0 -size 7098 diff --git a/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index fcd544e4..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eb3a34b13632e0cb3b1c0f4273035866cbe81b1b17b7178ce29d19c78d394a5e -size 6464 diff --git a/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index f50c62c7..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:363a569beb72e8b007bf046454612148d4c9f782b9391352059fe83179f18e30 -size 10676 diff --git a/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 8d80ab4a..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9ff27328b6916b7f75b99ef36153f154bb4724946e5654635cba2e257352c69f -size 9250 diff --git a/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index fc01724b..00000000 --- a/examples/bare/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5bacd97a1b41e4413c6092cdbd83f65112a9124e823cfaa3a219c65e2761647b -size 15523 diff --git a/examples/bare/android/app/src/main/res/values/strings.xml b/examples/bare/android/app/src/main/res/values/strings.xml deleted file mode 100644 index a92a83b0..00000000 --- a/examples/bare/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - AMA Example - diff --git a/examples/bare/android/app/src/main/res/values/styles.xml b/examples/bare/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 7ba83a2a..00000000 --- a/examples/bare/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - diff --git a/examples/bare/android/build.gradle b/examples/bare/android/build.gradle deleted file mode 100644 index 15221462..00000000 --- a/examples/bare/android/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -buildscript { - ext { - buildToolsVersion = "35.0.0" - minSdkVersion = 24 - compileSdkVersion = 35 - targetSdkVersion = 34 - ndkVersion = "26.1.10909125" - kotlinVersion = "1.9.24" - } - repositories { - google() - mavenCentral() - } - dependencies { - classpath("com.android.tools.build:gradle") - classpath("com.facebook.react:react-native-gradle-plugin") - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") - } -} - -apply plugin: "com.facebook.react.rootproject" \ No newline at end of file diff --git a/examples/bare/android/settings.gradle b/examples/bare/android/settings.gradle deleted file mode 100644 index 0a0ea9c3..00000000 --- a/examples/bare/android/settings.gradle +++ /dev/null @@ -1,6 +0,0 @@ -pluginManagement { includeBuild("../../../node_modules/@react-native/gradle-plugin") } -plugins { id("com.facebook.react.settings") } -extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() } -rootProject.name = 'AMA Example' -include ':app' -includeBuild('../../../node_modules/@react-native/gradle-plugin') diff --git a/examples/bare/app.json b/examples/bare/app.json deleted file mode 100644 index 392ee8c1..00000000 --- a/examples/bare/app.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "AMA Example", - "displayName": "AMA Example" -} diff --git a/examples/bare/babel.config.js b/examples/bare/babel.config.js deleted file mode 100644 index a430c7f9..00000000 --- a/examples/bare/babel.config.js +++ /dev/null @@ -1,7 +0,0 @@ -// eslint-disable-next-line -module.exports = { - presets: ['module:@react-native/babel-preset'], - plugins: [ - 'react-native-reanimated/plugin', // reanimated plugin must be listed last - ], -}; diff --git a/examples/bare/index.js b/examples/bare/index.js deleted file mode 100644 index ebf66c0f..00000000 --- a/examples/bare/index.js +++ /dev/null @@ -1,8 +0,0 @@ -import 'react-native-gesture-handler'; - -import { AppRegistry } from 'react-native'; - -import { name as appName } from './app.json'; -import App from './src/App'; - -AppRegistry.registerComponent(appName, () => App); diff --git a/examples/bare/ios/AMAExample.xcodeproj/project.pbxproj b/examples/bare/ios/AMAExample.xcodeproj/project.pbxproj deleted file mode 100644 index 34c3428e..00000000 --- a/examples/bare/ios/AMAExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,719 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 54; - objects = { - -/* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* AMAExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* AMAExampleTests.m */; }; - 0C80B921A6F3F58F76C31292 /* libPods-AMAExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-AMAExample.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 7699B88040F8A987B510C191 /* libPods-AMAExample-AMAExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AMAExample-AMAExampleTests.a */; }; - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; - E40C58A134BE2E9DBA4A5A66 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3BE1C7BC2CD5DD090025DC5C /* PrivacyInfo.xcprivacy */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00E356F41AD99517003FC87E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 13B07F861A680F5B00A75B9A; - remoteInfo = AMAExample; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 00E356EE1AD99517003FC87E /* AMAExampleTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AMAExampleTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* AMAExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AMAExampleTests.m; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* AMAExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AMAExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = AMAExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = AMAExample/AppDelegate.mm; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = AMAExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = AMAExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = AMAExample/main.m; sourceTree = ""; }; - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AMAExample-AMAExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AMAExample-AMAExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3B4392A12AC88292D35C810B /* Pods-AMAExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AMAExample.debug.xcconfig"; path = "Target Support Files/Pods-AMAExample/Pods-AMAExample.debug.xcconfig"; sourceTree = ""; }; - 3BE1C7BC2CD5DD090025DC5C /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = AMAExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 5709B34CF0A7D63546082F79 /* Pods-AMAExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AMAExample.release.xcconfig"; path = "Target Support Files/Pods-AMAExample/Pods-AMAExample.release.xcconfig"; sourceTree = ""; }; - 5B7EB9410499542E8C5724F5 /* Pods-AMAExample-AMAExampleTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AMAExample-AMAExampleTests.debug.xcconfig"; path = "Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests.debug.xcconfig"; sourceTree = ""; }; - 5DCACB8F33CDC322A6C60F78 /* libPods-AMAExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-AMAExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = AMAExample/LaunchScreen.storyboard; sourceTree = ""; }; - 89C6BE57DB24E9ADA2F236DE /* Pods-AMAExample-AMAExampleTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AMAExample-AMAExampleTests.release.xcconfig"; path = "Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests.release.xcconfig"; sourceTree = ""; }; - ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 00E356EB1AD99517003FC87E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 7699B88040F8A987B510C191 /* libPods-AMAExample-AMAExampleTests.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 0C80B921A6F3F58F76C31292 /* libPods-AMAExample.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* AMAExampleTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* AMAExampleTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = AMAExampleTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* AMAExample */ = { - isa = PBXGroup; - children = ( - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.mm */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, - 13B07FB71A68108700A75B9A /* main.m */, - 3BE1C7BC2CD5DD090025DC5C /* PrivacyInfo.xcprivacy */, - ); - name = AMAExample; - sourceTree = ""; - }; - 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { - isa = PBXGroup; - children = ( - ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - 5DCACB8F33CDC322A6C60F78 /* libPods-AMAExample.a */, - 19F6CBCC0A4E27FBF8BF4A61 /* libPods-AMAExample-AMAExampleTests.a */, - ); - name = Frameworks; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - ); - name = Libraries; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* AMAExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* AMAExampleTests */, - 83CBBA001A601CBA00E9B192 /* Products */, - 2D16E6871FA4F8E400B85C8A /* Frameworks */, - BBD78D7AC51CEA395F1C20DB /* Pods */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - usesTabs = 0; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* AMAExample.app */, - 00E356EE1AD99517003FC87E /* AMAExampleTests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - BBD78D7AC51CEA395F1C20DB /* Pods */ = { - isa = PBXGroup; - children = ( - 3B4392A12AC88292D35C810B /* Pods-AMAExample.debug.xcconfig */, - 5709B34CF0A7D63546082F79 /* Pods-AMAExample.release.xcconfig */, - 5B7EB9410499542E8C5724F5 /* Pods-AMAExample-AMAExampleTests.debug.xcconfig */, - 89C6BE57DB24E9ADA2F236DE /* Pods-AMAExample-AMAExampleTests.release.xcconfig */, - ); - path = Pods; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 00E356ED1AD99517003FC87E /* AMAExampleTests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "AMAExampleTests" */; - buildPhases = ( - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */, - 00E356EA1AD99517003FC87E /* Sources */, - 00E356EB1AD99517003FC87E /* Frameworks */, - 00E356EC1AD99517003FC87E /* Resources */, - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */, - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - 00E356F51AD99517003FC87E /* PBXTargetDependency */, - ); - name = AMAExampleTests; - productName = AMAExampleTests; - productReference = 00E356EE1AD99517003FC87E /* AMAExampleTests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; - 13B07F861A680F5B00A75B9A /* AMAExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "AMAExample" */; - buildPhases = ( - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = AMAExample; - productName = AMAExample; - productReference = 13B07F961A680F5B00A75B9A /* AMAExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 1210; - TargetAttributes = { - 00E356ED1AD99517003FC87E = { - CreatedOnToolsVersion = 6.2; - TestTargetID = 13B07F861A680F5B00A75B9A; - }; - 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1120; - }; - }; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AMAExample" */; - compatibilityVersion = "Xcode 12.0"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* AMAExample */, - 00E356ED1AD99517003FC87E /* AMAExampleTests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 00E356EC1AD99517003FC87E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - E40C58A134BE2E9DBA4A5A66 /* PrivacyInfo.xcprivacy in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(SRCROOT)/.xcode.env.local", - "$(SRCROOT)/.xcode.env", - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; - }; - 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - A55EABD7B0C7F3A422A6CC61 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-AMAExample-AMAExampleTests-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( - ); - outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-AMAExample-checkManifestLockResult.txt", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; - showEnvVarsInLog = 0; - }; - C59DA0FBD6956966B86A3779 /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-frameworks-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Embed Pods Frameworks"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-frameworks-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AMAExample/Pods-AMAExample-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - F6A41C54EA430FDDC6A6ED99 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-resources-${CONFIGURATION}-input-files.xcfilelist", - ); - name = "[CP] Copy Pods Resources"; - outputFileListPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-resources-${CONFIGURATION}-output-files.xcfilelist", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AMAExample-AMAExampleTests/Pods-AMAExample-AMAExampleTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 00E356EA1AD99517003FC87E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 00E356F31AD99517003FC87E /* AMAExampleTests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 00E356F51AD99517003FC87E /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 13B07F861A680F5B00A75B9A /* AMAExample */; - targetProxy = 00E356F41AD99517003FC87E /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 00E356F61AD99517003FC87E /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5B7EB9410499542E8C5724F5 /* Pods-AMAExample-AMAExampleTests.debug.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = AMAExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.rnama; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AMAExample.app/AMAExample"; - }; - name = Debug; - }; - 00E356F71AD99517003FC87E /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 89C6BE57DB24E9ADA2F236DE /* Pods-AMAExample-AMAExampleTests.release.xcconfig */; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - COPY_PHASE_STRIP = NO; - INFOPLIST_FILE = AMAExampleTests/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - "@loader_path/Frameworks", - ); - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - "$(inherited)", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.rnama; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AMAExample.app/AMAExample"; - }; - name = Release; - }; - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-AMAExample.debug.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - ENABLE_BITCODE = NO; - INFOPLIST_FILE = AMAExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "AMA Example"; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.rnama; - PRODUCT_NAME = AMAExample; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-AMAExample.release.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 1; - DEVELOPMENT_TEAM = ""; - INFOPLIST_FILE = AMAExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "AMA Example"; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/Frameworks", - ); - MARKETING_VERSION = 1.0; - OTHER_LDFLAGS = ( - "$(inherited)", - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = com.example.rnama; - PRODUCT_NAME = AMAExample; - SWIFT_VERSION = 5.0; - VERSIONING_SYSTEM = "apple-generic"; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CC = ""; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - CXX = ""; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD = ""; - LDPLUSPLUS = ""; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native"; - SDKROOT = iphoneos; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; - USE_HERMES = true; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CC = ""; - CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; - CLANG_CXX_LANGUAGE_STANDARD = "c++20"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_COMMA = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_STRICT_PROTOTYPES = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - CXX = ""; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = i386; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 15.1; - LD = ""; - LDPLUSPLUS = ""; - LD_RUNPATH_SEARCH_PATHS = ( - /usr/lib/swift, - "$(inherited)", - ); - LIBRARY_SEARCH_PATHS = ( - "\"$(SDKROOT)/usr/lib/swift\"", - "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", - "\"$(inherited)\"", - ); - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = ( - "$(OTHER_CFLAGS)", - "-DFOLLY_NO_CONFIG", - "-DFOLLY_MOBILE=1", - "-DFOLLY_USE_LIBCPP=1", - "-DFOLLY_CFG_NO_COROUTINES=1", - "-DFOLLY_HAVE_CLOCK_GETTIME=1", - ); - OTHER_LDFLAGS = ( - "$(inherited)", - " ", - ); - REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native"; - SDKROOT = iphoneos; - USE_HERMES = true; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "AMAExampleTests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 00E356F61AD99517003FC87E /* Debug */, - 00E356F71AD99517003FC87E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "AMAExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "AMAExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/examples/bare/ios/AMAExample/AppDelegate.h b/examples/bare/ios/AMAExample/AppDelegate.h deleted file mode 100644 index 5d280825..00000000 --- a/examples/bare/ios/AMAExample/AppDelegate.h +++ /dev/null @@ -1,6 +0,0 @@ -#import -#import - -@interface AppDelegate : RCTAppDelegate - -@end diff --git a/examples/bare/ios/AMAExample/AppDelegate.mm b/examples/bare/ios/AMAExample/AppDelegate.mm deleted file mode 100644 index 914715ec..00000000 --- a/examples/bare/ios/AMAExample/AppDelegate.mm +++ /dev/null @@ -1,31 +0,0 @@ -#import "AppDelegate.h" - -#import - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.moduleName = @"AMA Example"; - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - -- (NSURL *)bundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -@end diff --git a/examples/bare/ios/AMAExample/Images.xcassets/AppIcon.appiconset/Contents.json b/examples/bare/ios/AMAExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 81213230..00000000 --- a/examples/bare/ios/AMAExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "20x20" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "29x29" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "40x40" - }, - { - "idiom" : "iphone", - "scale" : "2x", - "size" : "60x60" - }, - { - "idiom" : "iphone", - "scale" : "3x", - "size" : "60x60" - }, - { - "idiom" : "ios-marketing", - "scale" : "1x", - "size" : "1024x1024" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/examples/bare/ios/AMAExample/Info.plist b/examples/bare/ios/AMAExample/Info.plist deleted file mode 100644 index f7bda597..00000000 --- a/examples/bare/ios/AMAExample/Info.plist +++ /dev/null @@ -1,52 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - AMA Example - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(MARKETING_VERSION) - CFBundleSignature - ???? - CFBundleVersion - $(CURRENT_PROJECT_VERSION) - LSRequiresIPhoneOS - - NSAppTransportSecurity - - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - arm64 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/examples/bare/ios/AMAExample/LaunchScreen.storyboard b/examples/bare/ios/AMAExample/LaunchScreen.storyboard deleted file mode 100644 index 3fbf9752..00000000 --- a/examples/bare/ios/AMAExample/LaunchScreen.storyboard +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/bare/ios/AMAExample/main.m b/examples/bare/ios/AMAExample/main.m deleted file mode 100644 index d645c724..00000000 --- a/examples/bare/ios/AMAExample/main.m +++ /dev/null @@ -1,10 +0,0 @@ -#import - -#import "AppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/examples/bare/ios/AMAExampleTests/AMAExampleTests.m b/examples/bare/ios/AMAExampleTests/AMAExampleTests.m deleted file mode 100644 index 41edf552..00000000 --- a/examples/bare/ios/AMAExampleTests/AMAExampleTests.m +++ /dev/null @@ -1,66 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface AMAExampleTests : XCTestCase - -@end - -@implementation AMAExampleTests - -- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test -{ - if (test(view)) { - return YES; - } - for (UIView *subview in [view subviews]) { - if ([self findSubviewInView:subview matching:test]) { - return YES; - } - } - return NO; -} - -- (void)testRendersWelcomeScreen -{ - UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController]; - NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS]; - BOOL foundElement = NO; - - __block NSString *redboxError = nil; -#ifdef DEBUG - RCTSetLogFunction( - ^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) { - if (level >= RCTLogLevelError) { - redboxError = message; - } - }); -#endif - - while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) { - [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]]; - - foundElement = [self findSubviewInView:vc.view - matching:^BOOL(UIView *view) { - if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) { - return YES; - } - return NO; - }]; - } - -#ifdef DEBUG - RCTSetLogFunction(RCTDefaultLogFunction); -#endif - - XCTAssertNil(redboxError, @"RedBox error: %@", redboxError); - XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS); -} - -@end diff --git a/examples/bare/ios/AMAExampleTests/Info.plist b/examples/bare/ios/AMAExampleTests/Info.plist deleted file mode 100644 index ba72822e..00000000 --- a/examples/bare/ios/AMAExampleTests/Info.plist +++ /dev/null @@ -1,24 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/examples/bare/ios/Podfile b/examples/bare/ios/Podfile deleted file mode 100644 index 785767ba..00000000 --- a/examples/bare/ios/Podfile +++ /dev/null @@ -1,40 +0,0 @@ -# Resolve react_native_pods.rb with node to allow for hoisting -require Pod::Executable.execute_command('node', ['-p', - 'require.resolve( - "react-native/scripts/react_native_pods.rb", - {paths: [process.argv[1]]}, - )', __dir__]).strip - -platform :ios, min_ios_version_supported -prepare_react_native_project! - -linkage = ENV['USE_FRAMEWORKS'] -if linkage != nil - Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green - use_frameworks! :linkage => linkage.to_sym -end - -target 'AMAExample' do - config = use_native_modules! - - use_react_native!( - :path => config[:reactNativePath], - # An absolute path to your application root. - :app_path => "#{Pod::Config.instance.installation_root}/.." - ) - - target 'AMAExampleTests' do - inherit! :complete - # Pods for testing - end - - post_install do |installer| - # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 - react_native_post_install( - installer, - config[:reactNativePath], - :mac_catalyst_enabled => false, - # :ccache_enabled => true - ) - end -end diff --git a/examples/bare/ios/Podfile.lock b/examples/bare/ios/Podfile.lock deleted file mode 100644 index cf5e7e87..00000000 --- a/examples/bare/ios/Podfile.lock +++ /dev/null @@ -1,2065 +0,0 @@ -PODS: - - boost (1.84.0) - - DoubleConversion (1.1.6) - - FBLazyVector (0.76.2) - - fmt (9.1.0) - - glog (0.3.5) - - hermes-engine (0.76.2): - - hermes-engine/Pre-built (= 0.76.2) - - hermes-engine/Pre-built (0.76.2) - - RCT-Folly (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Default (= 2024.01.01.00) - - RCT-Folly/Default (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (2024.01.01.00): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCTDeprecation (0.76.2) - - RCTRequired (0.76.2) - - RCTTypeSafety (0.76.2): - - FBLazyVector (= 0.76.2) - - RCTRequired (= 0.76.2) - - React-Core (= 0.76.2) - - React (0.76.2): - - React-Core (= 0.76.2) - - React-Core/DevSupport (= 0.76.2) - - React-Core/RCTWebSocket (= 0.76.2) - - React-RCTActionSheet (= 0.76.2) - - React-RCTAnimation (= 0.76.2) - - React-RCTBlob (= 0.76.2) - - React-RCTImage (= 0.76.2) - - React-RCTLinking (= 0.76.2) - - React-RCTNetwork (= 0.76.2) - - React-RCTSettings (= 0.76.2) - - React-RCTText (= 0.76.2) - - React-RCTVibration (= 0.76.2) - - React-callinvoker (0.76.2) - - React-Core (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.2) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/CoreModulesHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/Default (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/DevSupport (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.2) - - React-Core/RCTWebSocket (= 0.76.2) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTActionSheetHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTAnimationHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTBlobHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTImageHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTLinkingHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTNetworkHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTSettingsHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTTextHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTVibrationHeaders (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-Core/RCTWebSocket (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTDeprecation - - React-Core/Default (= 0.76.2) - - React-cxxreact - - React-featureflags - - React-hermes - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-perflogger - - React-runtimescheduler - - React-utils - - SocketRocket (= 0.7.1) - - Yoga - - React-CoreModules (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety (= 0.76.2) - - React-Core/CoreModulesHeaders (= 0.76.2) - - React-jsi (= 0.76.2) - - React-jsinspector - - React-NativeModulesApple - - React-RCTBlob - - React-RCTImage (= 0.76.2) - - ReactCodegen - - ReactCommon - - SocketRocket (= 0.7.1) - - React-cxxreact (0.76.2): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.2) - - React-debug (= 0.76.2) - - React-jsi (= 0.76.2) - - React-jsinspector - - React-logger (= 0.76.2) - - React-perflogger (= 0.76.2) - - React-runtimeexecutor (= 0.76.2) - - React-timing (= 0.76.2) - - React-debug (0.76.2) - - React-defaultsnativemodule (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-domnativemodule - - React-Fabric - - React-featureflags - - React-featureflagsnativemodule - - React-graphics - - React-idlecallbacksnativemodule - - React-ImageManager - - React-microtasksnativemodule - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-domnativemodule (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/animations (= 0.76.2) - - React-Fabric/attributedstring (= 0.76.2) - - React-Fabric/componentregistry (= 0.76.2) - - React-Fabric/componentregistrynative (= 0.76.2) - - React-Fabric/components (= 0.76.2) - - React-Fabric/core (= 0.76.2) - - React-Fabric/dom (= 0.76.2) - - React-Fabric/imagemanager (= 0.76.2) - - React-Fabric/leakchecker (= 0.76.2) - - React-Fabric/mounting (= 0.76.2) - - React-Fabric/observers (= 0.76.2) - - React-Fabric/scheduler (= 0.76.2) - - React-Fabric/telemetry (= 0.76.2) - - React-Fabric/templateprocessor (= 0.76.2) - - React-Fabric/uimanager (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/animations (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/attributedstring (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistry (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/componentregistrynative (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/components/legacyviewmanagerinterop (= 0.76.2) - - React-Fabric/components/root (= 0.76.2) - - React-Fabric/components/view (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/legacyviewmanagerinterop (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/root (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/components/view (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - Yoga - - React-Fabric/core (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/dom (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/imagemanager (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/leakchecker (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/mounting (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/observers/events (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/scheduler (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/observers/events - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-performancetimeline - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/telemetry (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/templateprocessor (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric/uimanager/consistency (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-Fabric/uimanager/consistency (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCommon/turbomodule/core - - React-FabricComponents (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components (= 0.76.2) - - React-FabricComponents/textlayoutmanager (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-FabricComponents/components/inputaccessory (= 0.76.2) - - React-FabricComponents/components/iostextinput (= 0.76.2) - - React-FabricComponents/components/modal (= 0.76.2) - - React-FabricComponents/components/rncore (= 0.76.2) - - React-FabricComponents/components/safeareaview (= 0.76.2) - - React-FabricComponents/components/scrollview (= 0.76.2) - - React-FabricComponents/components/text (= 0.76.2) - - React-FabricComponents/components/textinput (= 0.76.2) - - React-FabricComponents/components/unimplementedview (= 0.76.2) - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/inputaccessory (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/iostextinput (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/modal (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/rncore (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/safeareaview (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/scrollview (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/text (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/textinput (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/components/unimplementedview (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricComponents/textlayoutmanager (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-cxxreact - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-logger - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/core - - Yoga - - React-FabricImage (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - RCTRequired (= 0.76.2) - - RCTTypeSafety (= 0.76.2) - - React-Fabric - - React-graphics - - React-ImageManager - - React-jsi - - React-jsiexecutor (= 0.76.2) - - React-logger - - React-rendererdebug - - React-utils - - ReactCommon - - Yoga - - React-featureflags (0.76.2) - - React-featureflagsnativemodule (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-graphics (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-jsi - - React-jsiexecutor - - React-utils - - React-hermes (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.2) - - React-jsi - - React-jsiexecutor (= 0.76.2) - - React-jsinspector - - React-perflogger (= 0.76.2) - - React-runtimeexecutor - - React-idlecallbacksnativemodule (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-ImageManager (0.76.2): - - glog - - RCT-Folly/Fabric - - React-Core/Default - - React-debug - - React-Fabric - - React-graphics - - React-rendererdebug - - React-utils - - React-jserrorhandler (0.76.2): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-debug - - React-jsi - - React-jsi (0.76.2): - - boost - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-jsiexecutor (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact (= 0.76.2) - - React-jsi (= 0.76.2) - - React-jsinspector - - React-perflogger (= 0.76.2) - - React-jsinspector (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-featureflags - - React-jsi - - React-perflogger (= 0.76.2) - - React-runtimeexecutor (= 0.76.2) - - React-jsitracing (0.76.2): - - React-jsi - - React-logger (0.76.2): - - glog - - React-Mapbuffer (0.76.2): - - glog - - React-debug - - React-microtasksnativemodule (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common (= 4.14.0) - - react-native-safe-area-context/fabric (= 4.14.0) - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/common (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - react-native-safe-area-context/fabric (4.14.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - react-native-safe-area-context/common - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - React-nativeconfig (0.76.2) - - React-NativeModulesApple (0.76.2): - - glog - - hermes-engine - - React-callinvoker - - React-Core - - React-cxxreact - - React-jsi - - React-jsinspector - - React-runtimeexecutor - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - React-perflogger (0.76.2): - - DoubleConversion - - RCT-Folly (= 2024.01.01.00) - - React-performancetimeline (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - React-cxxreact - - React-timing - - React-RCTActionSheet (0.76.2): - - React-Core/RCTActionSheetHeaders (= 0.76.2) - - React-RCTAnimation (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTAnimationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTAppDelegate (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-CoreModules - - React-debug - - React-defaultsnativemodule - - React-Fabric - - React-featureflags - - React-graphics - - React-hermes - - React-nativeconfig - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-RCTNetwork - - React-rendererdebug - - React-RuntimeApple - - React-RuntimeCore - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - ReactCodegen - - ReactCommon - - React-RCTBlob (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTBlobHeaders - - React-Core/RCTWebSocket - - React-jsi - - React-jsinspector - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTFabric (0.76.2): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-Core - - React-debug - - React-Fabric - - React-FabricComponents - - React-FabricImage - - React-featureflags - - React-graphics - - React-ImageManager - - React-jsi - - React-jsinspector - - React-nativeconfig - - React-performancetimeline - - React-RCTImage - - React-RCTText - - React-rendererconsistency - - React-rendererdebug - - React-runtimescheduler - - React-utils - - Yoga - - React-RCTImage (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTImageHeaders - - React-jsi - - React-NativeModulesApple - - React-RCTNetwork - - ReactCodegen - - ReactCommon - - React-RCTLinking (0.76.2): - - React-Core/RCTLinkingHeaders (= 0.76.2) - - React-jsi (= 0.76.2) - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - ReactCommon/turbomodule/core (= 0.76.2) - - React-RCTNetwork (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTNetworkHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTSettings (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - RCTTypeSafety - - React-Core/RCTSettingsHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-RCTText (0.76.2): - - React-Core/RCTTextHeaders (= 0.76.2) - - Yoga - - React-RCTVibration (0.76.2): - - RCT-Folly (= 2024.01.01.00) - - React-Core/RCTVibrationHeaders - - React-jsi - - React-NativeModulesApple - - ReactCodegen - - ReactCommon - - React-rendererconsistency (0.76.2) - - React-rendererdebug (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-rncore (0.76.2) - - React-RuntimeApple (0.76.2): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-callinvoker - - React-Core/Default - - React-CoreModules - - React-cxxreact - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-Mapbuffer - - React-NativeModulesApple - - React-RCTFabric - - React-RuntimeCore - - React-runtimeexecutor - - React-RuntimeHermes - - React-runtimescheduler - - React-utils - - React-RuntimeCore (0.76.2): - - glog - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-cxxreact - - React-featureflags - - React-jserrorhandler - - React-jsi - - React-jsiexecutor - - React-jsinspector - - React-performancetimeline - - React-runtimeexecutor - - React-runtimescheduler - - React-utils - - React-runtimeexecutor (0.76.2): - - React-jsi (= 0.76.2) - - React-RuntimeHermes (0.76.2): - - hermes-engine - - RCT-Folly/Fabric (= 2024.01.01.00) - - React-featureflags - - React-hermes - - React-jsi - - React-jsinspector - - React-jsitracing - - React-nativeconfig - - React-RuntimeCore - - React-utils - - React-runtimescheduler (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker - - React-cxxreact - - React-debug - - React-featureflags - - React-jsi - - React-performancetimeline - - React-rendererconsistency - - React-rendererdebug - - React-runtimeexecutor - - React-timing - - React-utils - - React-timing (0.76.2) - - React-utils (0.76.2): - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-debug - - React-jsi (= 0.76.2) - - ReactCodegen (0.76.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-FabricImage - - React-featureflags - - React-graphics - - React-jsi - - React-jsiexecutor - - React-NativeModulesApple - - React-rendererdebug - - React-utils - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - ReactCommon (0.76.2): - - ReactCommon/turbomodule (= 0.76.2) - - ReactCommon/turbomodule (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.2) - - React-cxxreact (= 0.76.2) - - React-jsi (= 0.76.2) - - React-logger (= 0.76.2) - - React-perflogger (= 0.76.2) - - ReactCommon/turbomodule/bridging (= 0.76.2) - - ReactCommon/turbomodule/core (= 0.76.2) - - ReactCommon/turbomodule/bridging (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.2) - - React-cxxreact (= 0.76.2) - - React-jsi (= 0.76.2) - - React-logger (= 0.76.2) - - React-perflogger (= 0.76.2) - - ReactCommon/turbomodule/core (0.76.2): - - DoubleConversion - - fmt (= 9.1.0) - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - React-callinvoker (= 0.76.2) - - React-cxxreact (= 0.76.2) - - React-debug (= 0.76.2) - - React-featureflags (= 0.76.2) - - React-jsi (= 0.76.2) - - React-logger (= 0.76.2) - - React-perflogger (= 0.76.2) - - React-utils (= 0.76.2) - - RNGestureHandler (2.21.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNReanimated (3.16.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNReanimated/reanimated (= 3.16.2) - - RNReanimated/worklets (= 3.16.2) - - Yoga - - RNReanimated/reanimated (3.16.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNReanimated/reanimated/apple (= 3.16.2) - - Yoga - - RNReanimated/reanimated/apple (3.16.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNReanimated/worklets (3.16.2): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNScreens (3.35.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNScreens/common (= 3.35.0) - - Yoga - - RNScreens/common (3.35.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-RCTImage - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - RNSVG (15.9.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - RNSVG/common (= 15.9.0) - - Yoga - - RNSVG/common (15.9.0): - - DoubleConversion - - glog - - hermes-engine - - RCT-Folly (= 2024.01.01.00) - - RCTRequired - - RCTTypeSafety - - React-Core - - React-debug - - React-Fabric - - React-featureflags - - React-graphics - - React-ImageManager - - React-NativeModulesApple - - React-RCTFabric - - React-rendererdebug - - React-utils - - ReactCodegen - - ReactCommon/turbomodule/bridging - - ReactCommon/turbomodule/core - - Yoga - - SocketRocket (0.7.1) - - Yoga (0.0.0) - -DEPENDENCIES: - - boost (from `../../../node_modules/react-native/third-party-podspecs/boost.podspec`) - - DoubleConversion (from `../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - - FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`) - - fmt (from `../../../node_modules/react-native/third-party-podspecs/fmt.podspec`) - - glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`) - - hermes-engine (from `../../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - - RCT-Folly (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCT-Folly/Fabric (from `../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - - RCTDeprecation (from `../../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) - - RCTRequired (from `../../../node_modules/react-native/Libraries/Required`) - - RCTTypeSafety (from `../../../node_modules/react-native/Libraries/TypeSafety`) - - React (from `../../../node_modules/react-native/`) - - React-callinvoker (from `../../../node_modules/react-native/ReactCommon/callinvoker`) - - React-Core (from `../../../node_modules/react-native/`) - - React-Core/RCTWebSocket (from `../../../node_modules/react-native/`) - - React-CoreModules (from `../../../node_modules/react-native/React/CoreModules`) - - React-cxxreact (from `../../../node_modules/react-native/ReactCommon/cxxreact`) - - React-debug (from `../../../node_modules/react-native/ReactCommon/react/debug`) - - React-defaultsnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/defaults`) - - React-domnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/dom`) - - React-Fabric (from `../../../node_modules/react-native/ReactCommon`) - - React-FabricComponents (from `../../../node_modules/react-native/ReactCommon`) - - React-FabricImage (from `../../../node_modules/react-native/ReactCommon`) - - React-featureflags (from `../../../node_modules/react-native/ReactCommon/react/featureflags`) - - React-featureflagsnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - - React-graphics (from `../../../node_modules/react-native/ReactCommon/react/renderer/graphics`) - - React-hermes (from `../../../node_modules/react-native/ReactCommon/hermes`) - - React-idlecallbacksnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - - React-ImageManager (from `../../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jserrorhandler (from `../../../node_modules/react-native/ReactCommon/jserrorhandler`) - - React-jsi (from `../../../node_modules/react-native/ReactCommon/jsi`) - - React-jsiexecutor (from `../../../node_modules/react-native/ReactCommon/jsiexecutor`) - - React-jsinspector (from `../../../node_modules/react-native/ReactCommon/jsinspector-modern`) - - React-jsitracing (from `../../../node_modules/react-native/ReactCommon/hermes/executor/`) - - React-logger (from `../../../node_modules/react-native/ReactCommon/logger`) - - React-Mapbuffer (from `../../../node_modules/react-native/ReactCommon`) - - React-microtasksnativemodule (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - - react-native-safe-area-context (from `../../../node_modules/react-native-safe-area-context`) - - React-nativeconfig (from `../../../node_modules/react-native/ReactCommon`) - - React-NativeModulesApple (from `../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - - React-perflogger (from `../../../node_modules/react-native/ReactCommon/reactperflogger`) - - React-performancetimeline (from `../../../node_modules/react-native/ReactCommon/react/performance/timeline`) - - React-RCTActionSheet (from `../../../node_modules/react-native/Libraries/ActionSheetIOS`) - - React-RCTAnimation (from `../../../node_modules/react-native/Libraries/NativeAnimation`) - - React-RCTAppDelegate (from `../../../node_modules/react-native/Libraries/AppDelegate`) - - React-RCTBlob (from `../../../node_modules/react-native/Libraries/Blob`) - - React-RCTFabric (from `../../../node_modules/react-native/React`) - - React-RCTImage (from `../../../node_modules/react-native/Libraries/Image`) - - React-RCTLinking (from `../../../node_modules/react-native/Libraries/LinkingIOS`) - - React-RCTNetwork (from `../../../node_modules/react-native/Libraries/Network`) - - React-RCTSettings (from `../../../node_modules/react-native/Libraries/Settings`) - - React-RCTText (from `../../../node_modules/react-native/Libraries/Text`) - - React-RCTVibration (from `../../../node_modules/react-native/Libraries/Vibration`) - - React-rendererconsistency (from `../../../node_modules/react-native/ReactCommon/react/renderer/consistency`) - - React-rendererdebug (from `../../../node_modules/react-native/ReactCommon/react/renderer/debug`) - - React-rncore (from `../../../node_modules/react-native/ReactCommon`) - - React-RuntimeApple (from `../../../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - - React-RuntimeCore (from `../../../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimeexecutor (from `../../../node_modules/react-native/ReactCommon/runtimeexecutor`) - - React-RuntimeHermes (from `../../../node_modules/react-native/ReactCommon/react/runtime`) - - React-runtimescheduler (from `../../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - - React-timing (from `../../../node_modules/react-native/ReactCommon/react/timing`) - - React-utils (from `../../../node_modules/react-native/ReactCommon/react/utils`) - - ReactCodegen (from `build/generated/ios`) - - ReactCommon/turbomodule/core (from `../../../node_modules/react-native/ReactCommon`) - - RNGestureHandler (from `../../../node_modules/react-native-gesture-handler`) - - RNReanimated (from `../../../node_modules/react-native-reanimated`) - - RNScreens (from `../../../node_modules/react-native-screens`) - - RNSVG (from `../../../node_modules/react-native-svg`) - - Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`) - -SPEC REPOS: - trunk: - - SocketRocket - -EXTERNAL SOURCES: - boost: - :podspec: "../../../node_modules/react-native/third-party-podspecs/boost.podspec" - DoubleConversion: - :podspec: "../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" - FBLazyVector: - :path: "../../../node_modules/react-native/Libraries/FBLazyVector" - fmt: - :podspec: "../../../node_modules/react-native/third-party-podspecs/fmt.podspec" - glog: - :podspec: "../../../node_modules/react-native/third-party-podspecs/glog.podspec" - hermes-engine: - :podspec: "../../../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2024-11-12-RNv0.76.2-5b4aa20c719830dcf5684832b89a6edb95ac3d64 - RCT-Folly: - :podspec: "../../../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" - RCTDeprecation: - :path: "../../../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation" - RCTRequired: - :path: "../../../node_modules/react-native/Libraries/Required" - RCTTypeSafety: - :path: "../../../node_modules/react-native/Libraries/TypeSafety" - React: - :path: "../../../node_modules/react-native/" - React-callinvoker: - :path: "../../../node_modules/react-native/ReactCommon/callinvoker" - React-Core: - :path: "../../../node_modules/react-native/" - React-CoreModules: - :path: "../../../node_modules/react-native/React/CoreModules" - React-cxxreact: - :path: "../../../node_modules/react-native/ReactCommon/cxxreact" - React-debug: - :path: "../../../node_modules/react-native/ReactCommon/react/debug" - React-defaultsnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/defaults" - React-domnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/dom" - React-Fabric: - :path: "../../../node_modules/react-native/ReactCommon" - React-FabricComponents: - :path: "../../../node_modules/react-native/ReactCommon" - React-FabricImage: - :path: "../../../node_modules/react-native/ReactCommon" - React-featureflags: - :path: "../../../node_modules/react-native/ReactCommon/react/featureflags" - React-featureflagsnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" - React-graphics: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/graphics" - React-hermes: - :path: "../../../node_modules/react-native/ReactCommon/hermes" - React-idlecallbacksnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" - React-ImageManager: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jserrorhandler: - :path: "../../../node_modules/react-native/ReactCommon/jserrorhandler" - React-jsi: - :path: "../../../node_modules/react-native/ReactCommon/jsi" - React-jsiexecutor: - :path: "../../../node_modules/react-native/ReactCommon/jsiexecutor" - React-jsinspector: - :path: "../../../node_modules/react-native/ReactCommon/jsinspector-modern" - React-jsitracing: - :path: "../../../node_modules/react-native/ReactCommon/hermes/executor/" - React-logger: - :path: "../../../node_modules/react-native/ReactCommon/logger" - React-Mapbuffer: - :path: "../../../node_modules/react-native/ReactCommon" - React-microtasksnativemodule: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" - react-native-safe-area-context: - :path: "../../../node_modules/react-native-safe-area-context" - React-nativeconfig: - :path: "../../../node_modules/react-native/ReactCommon" - React-NativeModulesApple: - :path: "../../../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios" - React-perflogger: - :path: "../../../node_modules/react-native/ReactCommon/reactperflogger" - React-performancetimeline: - :path: "../../../node_modules/react-native/ReactCommon/react/performance/timeline" - React-RCTActionSheet: - :path: "../../../node_modules/react-native/Libraries/ActionSheetIOS" - React-RCTAnimation: - :path: "../../../node_modules/react-native/Libraries/NativeAnimation" - React-RCTAppDelegate: - :path: "../../../node_modules/react-native/Libraries/AppDelegate" - React-RCTBlob: - :path: "../../../node_modules/react-native/Libraries/Blob" - React-RCTFabric: - :path: "../../../node_modules/react-native/React" - React-RCTImage: - :path: "../../../node_modules/react-native/Libraries/Image" - React-RCTLinking: - :path: "../../../node_modules/react-native/Libraries/LinkingIOS" - React-RCTNetwork: - :path: "../../../node_modules/react-native/Libraries/Network" - React-RCTSettings: - :path: "../../../node_modules/react-native/Libraries/Settings" - React-RCTText: - :path: "../../../node_modules/react-native/Libraries/Text" - React-RCTVibration: - :path: "../../../node_modules/react-native/Libraries/Vibration" - React-rendererconsistency: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/consistency" - React-rendererdebug: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/debug" - React-rncore: - :path: "../../../node_modules/react-native/ReactCommon" - React-RuntimeApple: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime/platform/ios" - React-RuntimeCore: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime" - React-runtimeexecutor: - :path: "../../../node_modules/react-native/ReactCommon/runtimeexecutor" - React-RuntimeHermes: - :path: "../../../node_modules/react-native/ReactCommon/react/runtime" - React-runtimescheduler: - :path: "../../../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" - React-timing: - :path: "../../../node_modules/react-native/ReactCommon/react/timing" - React-utils: - :path: "../../../node_modules/react-native/ReactCommon/react/utils" - ReactCodegen: - :path: build/generated/ios - ReactCommon: - :path: "../../../node_modules/react-native/ReactCommon" - RNGestureHandler: - :path: "../../../node_modules/react-native-gesture-handler" - RNReanimated: - :path: "../../../node_modules/react-native-reanimated" - RNScreens: - :path: "../../../node_modules/react-native-screens" - RNSVG: - :path: "../../../node_modules/react-native-svg" - Yoga: - :path: "../../../node_modules/react-native/ReactCommon/yoga" - -SPEC CHECKSUMS: - boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 - DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 - FBLazyVector: bc70dcb22ad30ce734a7cce7210791dc737e230f - fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 - glog: 69ef571f3de08433d766d614c73a9838a06bf7eb - hermes-engine: 3852e37f6158a2fcfad23e31215ed495da3a6a40 - RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 - RCTDeprecation: d575d28132f93e5deef4849d5afffb4ac4e63226 - RCTRequired: e2e5df1df76aac8685aabfebca389e6bec64792b - RCTTypeSafety: 30e36ceafa26979860e13fb3f234fb61692924c2 - React: 10ad41b51f981992714011b6a4e081234c28dc2e - React-callinvoker: 58b51494f8b2cca07a27fc6f69273239c30a1e70 - React-Core: 54860c16fb5873a6f00dd44d8979bbb648b34c7c - React-CoreModules: 443101f113a7b5d51b93e061574dcadf7850f8cc - React-cxxreact: 5407ecb854a755de34c0e6b03965d3a51c28c933 - React-debug: 252c723eb205cc508aa9690a16dff46293c30ed8 - React-defaultsnativemodule: 1fb982daba4ac5bb3052ae262a919a0d117f3b1b - React-domnativemodule: 914401fb13804b7828020d7b3a89afa72ff22564 - React-Fabric: 58696d9eaee305bb5a5af26071966dcfb941f9eb - React-FabricComponents: a037b977430eceae4bac539934497bacc8de3971 - React-FabricImage: 2658c3e383195f69e7c83e4f75519bee17c3169a - React-featureflags: 7dc483869b3a940dcd92c7942c5e3492ad6afe68 - React-featureflagsnativemodule: 7a50dda8a6d3883139c47b4bda797156737240db - React-graphics: 066863eb87b142f0603fed08c71bac452238ac3e - React-hermes: 8f31f252aff98a4cb711ccf6644cccfe35d8edd1 - React-idlecallbacksnativemodule: c3f68fe97e379c4c1b6c4ba25e5d450cbe931e25 - React-ImageManager: 36240f8ab7181551574ca443da507272dbbf7014 - React-jserrorhandler: 1aa045c492222751dc476bcb973f787e82f952b9 - React-jsi: b96853ac12c1dab5fe3ea131f959fda0bbaf1151 - React-jsiexecutor: e38748a0e9d899f63dec562f93ac06c7acbc813d - React-jsinspector: 91b3c73d2afb7627af7872cedb0b74a0f00f57d1 - React-jsitracing: a340047c9fd31a36b222569c402e472e20557805 - React-logger: 81d58ca6f1d93fca9a770bda6cc1c4fbfcc99c9c - React-Mapbuffer: 726951e68f4bb1c2513d322f2548798b2a3d628d - React-microtasksnativemodule: 7a69a9b8fded72ea3cf81923ecf75cad5558ed26 - react-native-safe-area-context: 2500e4fe998caad50ad3bc51ec23ef951308569e - React-nativeconfig: 470fce6d871c02dc5eff250a362d56391b7f52d6 - React-NativeModulesApple: 6297fc3136c1fd42884795c51d7207de6312b606 - React-perflogger: f2c94413cfad44817c96cab33753831e73f0d0dd - React-performancetimeline: d6e493713e6aab3cc8b7c1c07e97160e22dd79cc - React-RCTActionSheet: 2eb26cbf384f3d3b2cb2e23be850a956d83f77ab - React-RCTAnimation: 59463699a92edc6705ce5306bb789d6a0ca4df0b - React-RCTAppDelegate: 4d9efca7caa477b106e3d55af339d0e071441536 - React-RCTBlob: 0883f5363069ad30f628c970fcb413a619e42804 - React-RCTFabric: 4c761af601a1fe0061b15df97af9fb77403362a2 - React-RCTImage: 78884b7ea6ef4f7bb9655614bf09a40054f282ce - React-RCTLinking: b9beba7465fd9a1ed7a88a4e7fc403d26e17ab95 - React-RCTNetwork: 701d9c050077596b15a11b6b573ed95c309d2315 - React-RCTSettings: e700a82e3e923c10060b8f65297f9d321b93d8eb - React-RCTText: e782ce1c3f9d915daf50d97157f8c226e8f3d206 - React-RCTVibration: 2a19c56be78cb7afce9f4f3471aacfb063f32a00 - React-rendererconsistency: b389e324712bf0869529823216e922836ed9b737 - React-rendererdebug: 9f5629032c0937c62b21dcaf96b374a149bf8a44 - React-rncore: 2cf6b2348ee5d5431c4735180364b207ecf47123 - React-RuntimeApple: 84d648b9a87c34041d6628dde50d1acf54e5bf89 - React-RuntimeCore: 79290b2eb17a25c1b23c4d5dde13d43c20467eef - React-runtimeexecutor: 69e27948ee2127400297c7de50b809a7cd127a15 - React-RuntimeHermes: 5fe2082f98187410c1815c532f72348fbe1d0517 - React-runtimescheduler: 95b7087f459699756c1b7feb3f4637066c337b62 - React-timing: 97673939f96f79031d2a5a0a92285618475149ec - React-utils: ed6cb7ba089ac0856aa104df12691e99abbf14e1 - ReactCodegen: 4bc4d9328ff15fef96d6305bc6fea67b7fe16163 - ReactCommon: 208cb02e3c0bb8a727b3e1a1782202bcfa5d9631 - RNGestureHandler: 0e5ae8d72ef4afb855e98dcdbe60f27d938abe13 - RNReanimated: aaab3966c0741b35b486467329128fb99abc47e7 - RNScreens: e389d6a6a66a4f0d3662924ecae803073ccce8ec - RNSVG: b2fbe96b2bb3887752f8abc1f495953847e90384 - SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - Yoga: 96872ee462cfc43866ad013c8160d4ff6b85709b - -PODFILE CHECKSUM: c9b94076957c1eddb2655ee62a5fee71a3cc3a6c - -COCOAPODS: 1.15.2 diff --git a/examples/bare/jest.config.js b/examples/bare/jest.config.js deleted file mode 100644 index 8eb675e9..00000000 --- a/examples/bare/jest.config.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - preset: 'react-native', -}; diff --git a/examples/bare/metro.config.js b/examples/bare/metro.config.js deleted file mode 100644 index f72a5eaf..00000000 --- a/examples/bare/metro.config.js +++ /dev/null @@ -1,22 +0,0 @@ -const path = require('path'); -const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config'); - -const { - wrapWithReanimatedMetroConfig, -} = require('react-native-reanimated/metro-config'); -/** - * Metro configuration - * https://reactnative.dev/docs/metro - * - * @type {import('metro-config').MetroConfig} - */ -const config = { - watchFolders: [path.join(__dirname, '..', '..')], - resolver: { - unstable_enableSymlinks: true, - }, -}; - -module.exports = wrapWithReanimatedMetroConfig( - mergeConfig(getDefaultConfig(__dirname), config), -); diff --git a/examples/bare/package.json b/examples/bare/package.json deleted file mode 100644 index 53c750fa..00000000 --- a/examples/bare/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "amaexample", - "version": "1.1.0", - "private": true, - "scripts": { - "android": "react-native run-android", - "ios": "react-native run-ios", - "lint": "eslint .", - "start": "react-native start", - "test": "jest" - }, - "dependencies": { - "@react-navigation/native": "^6.1.7", - "@react-navigation/native-stack": "^6.9.14", - "react": "18.3.1", - "react-native": "0.76.2", - "react-native-gesture-handler": "^2.21.2", - "react-native-reanimated": "^3.16.2", - "react-native-safe-area-context": "^4.14.0", - "react-native-screens": "^3.35.0", - "react-native-svg": "^15.9.0" - }, - "devDependencies": { - "@babel/core": "^7.25.2", - "@babel/preset-env": "^7.25.3", - "@babel/runtime": "^7.25.0", - "@react-native-community/cli": "15.0.1", - "@react-native-community/cli-platform-android": "15.0.1", - "@react-native-community/cli-platform-ios": "15.0.1", - "@react-native/babel-preset": "0.76.2", - "@react-native/eslint-config": "0.76.2", - "@react-native/metro-config": "0.76.2", - "@react-native/typescript-config": "0.76.2", - "@types/react": "^18.2.6", - "@types/react-test-renderer": "^18.0.0", - "babel-jest": "^29.6.3", - "eslint": "^8.19.0", - "jest": "^29.6.3", - "prettier": "^2.8.8", - "react-test-renderer": "18.3.1", - "typescript": "5.0.4" - }, - "engines": { - "node": ">=18" - }, - "packageManager": "yarn@3.6.4" -} diff --git a/examples/bare/src/App.tsx b/examples/bare/src/App.tsx deleted file mode 100644 index 007e4cdb..00000000 --- a/examples/bare/src/App.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import 'react-native-gesture-handler'; - -import { AMAProvider } from '@react-native-ama/core'; -import React from 'react'; -import { GestureHandlerRootView } from 'react-native-gesture-handler'; - -import { AppNavigator } from './AppNavigator'; - -const App = () => { - return ( - - - - - - ); -}; - -export default App; diff --git a/examples/bare/src/AppNavigator.tsx b/examples/bare/src/AppNavigator.tsx deleted file mode 100644 index 8ac34b17..00000000 --- a/examples/bare/src/AppNavigator.tsx +++ /dev/null @@ -1,260 +0,0 @@ -import { - BackButton, - BottomSheetScreen, - CarouselScreen, - ExpandablePressableScreen, - FlatListDynamicScreen, - FlatListScreen, - FlatListStaticScreen, - FormScreen, - Header, - HomeScreen, - LoadingScreen, - PressableScreen, - SwitchListItemScreen, - TextScreen, - TouchableOpacityScreen, - TouchableWithoutFeedbackScreen, - UseAMAContextScreen, - UseAnimationDurationScreen, - UseAnimationScreen, - UseReanimatedAnimationBuilderScreen, - UseReanimatedTimingScreen, - UseTimedActionScreen, -} from '@examples/shared-ui'; -import { useAMAContext } from '@react-native-ama/core'; -import { NavigationContainer } from '@react-navigation/native'; -import { - NativeStackNavigationOptions, - createNativeStackNavigator, -} from '@react-navigation/native-stack'; -import React from 'react'; - -export const AppNavigator = () => { - const { reactNavigationScreenOptions: amaAnimationScreenOptions } = - useAMAContext(); - - return ( - - -
, - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () =>
, - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - , - headerTitle: () => ( -
- ), - }} - /> - - - ); -}; - -const Stack = createNativeStackNavigator(); - -const BaseNavigatorOptions: NativeStackNavigationOptions = { - headerTitleAlign: 'center', - headerBackVisible: false, -}; - -type StackParamList = { - Home: undefined; - Pressable: undefined; - TouchableOpacity: undefined; - TouchableWithoutFeedback: undefined; - Text: undefined; - UseAnimation: undefined; - UseAnimationDuration: undefined; - UseReanimatedAnimationBuilder: undefined; - UseReanimatedTiming: undefined; - SwitchListItem: undefined; - Form: undefined; - FlatList: undefined; - ExpandablePressable: undefined; - FlatListDynamic: undefined; - FlatListStatic: undefined; - BottomSheet: undefined; - Carousel: undefined; - Loading: undefined; - UseTimedAction: undefined; - UseAMAContext: undefined; -}; diff --git a/examples/bare/src/theme.ts b/examples/bare/src/theme.ts deleted file mode 100644 index 41c7ac07..00000000 --- a/examples/bare/src/theme.ts +++ /dev/null @@ -1,29 +0,0 @@ -export const theme = { - padding: { - small: 6, - normal: 12, - big: 24, - }, - fontSize: { - normal: 12, - medium: 18, - big: 24, - }, - color: { - black: '#000', - white: '#fff', - hover: '#005D85', - disabled: '#5C5757', - checked: '#820085', - mixed: '#006602', - selected: '#660000', - }, - lineHeight: { - normal: 16, - medium: 24, - big: 48, - }, - flex1: { - flex: 1, - }, -}; diff --git a/examples/bare/src/types.ts b/examples/bare/src/types.ts deleted file mode 100644 index 4cfe306c..00000000 --- a/examples/bare/src/types.ts +++ /dev/null @@ -1,20 +0,0 @@ -export type RootStackParamList = { - Home: undefined; - Pressable: undefined; - TouchableOpacity: undefined; - TouchableWithoutFeedback: undefined; - Text: undefined; - UseAnimation: undefined; - UseAnimationDuration: undefined; - UseReanimatedAnimationBuilder: undefined; - UseReanimatedTiming: undefined; - Form: undefined; - FlatList: undefined; - ExpandablePressable: undefined; - FlatListDynamic: undefined; - FlatListStatic: undefined; - BottomSheet: undefined; - UseTimedAction: undefined; - UseAMAContext: undefined; - SwitchListItem: undefined; -}; diff --git a/examples/bare/src/utils/useTypedNavigation.tsx b/examples/bare/src/utils/useTypedNavigation.tsx deleted file mode 100644 index d1098c1b..00000000 --- a/examples/bare/src/utils/useTypedNavigation.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { useNavigation } from '@react-navigation/native'; -import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; - -import type { RootStackParamList } from '../types'; - -export const useTypedNavigation = () => - useNavigation>(); diff --git a/examples/bare/tsconfig.json b/examples/bare/tsconfig.json deleted file mode 100644 index 83dcdb1e..00000000 --- a/examples/bare/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": [ - "@react-native/typescript-config/tsconfig.json", - "../../tsconfig.json" - ] -} diff --git a/examples/expo/App.tsx b/examples/expo/App.tsx deleted file mode 100644 index 0ac330d5..00000000 --- a/examples/expo/App.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { AMAProvider } from '@react-native-ama/core'; -import { StatusBar } from 'expo-status-bar'; -import React from 'react'; -import { GestureHandlerRootView } from 'react-native-gesture-handler'; - -import { AppNavigator } from './src/AppNavigation'; - -export default function App() { - return ( - - - - - - - ); -} diff --git a/examples/expo/CHANGELOG.md b/examples/expo/CHANGELOG.md deleted file mode 100644 index 53dfb6d0..00000000 --- a/examples/expo/CHANGELOG.md +++ /dev/null @@ -1,13 +0,0 @@ -# ama-expo-example - -## 1.1.0 - -### Minor Changes - -- Added `` component example screens ([#272](https://github.com/FormidableLabs/react-native-ama/pull/272)) - -## 1.0.1 - -### Patch Changes - -- Ignoring eslint on babel ([#253](https://github.com/FormidableLabs/react-native-ama/pull/253)) diff --git a/examples/expo/README.md b/examples/expo/README.md deleted file mode 100644 index c989a5bb..00000000 --- a/examples/expo/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Getting Started - -Before getting started, make sure you have installed _node_modules_ by running `yarn` from the root of the project, then come back here. - -## Step 1: Start the Metro Server - -First, you will need to start **Metro**, the JavaScript _bundler_, simply run - -```bash -npx expo start -``` - -## Step 2: Start your Application - -Start your app in the Expo Go app on your iOS or Android device. Use the QR code in the Metro Bundler to open your project or by pressing `a` for Android emulator, `i` for iOS simulator. diff --git a/examples/expo/assets/adaptive-icon.png b/examples/expo/assets/adaptive-icon.png deleted file mode 100644 index d6a03320..00000000 --- a/examples/expo/assets/adaptive-icon.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5f4c0a732b6325bf4071d9124d2ae67e037cb24fcc9c482ef82bea742109a3b8 -size 17547 diff --git a/examples/expo/assets/favicon.png b/examples/expo/assets/favicon.png deleted file mode 100644 index 7e8afed9..00000000 --- a/examples/expo/assets/favicon.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:24272cdaeff82cc5facdaccd982a6f05b60c4504704bbf94c19a6388659880bb -size 1466 diff --git a/examples/expo/assets/icon.png b/examples/expo/assets/icon.png deleted file mode 100644 index 71aadd56..00000000 --- a/examples/expo/assets/icon.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:74c64047eb557b1341bba7a2831eedde9ddb705e6451a9ad9f5552bf558f13de -size 22380 diff --git a/examples/expo/assets/splash.png b/examples/expo/assets/splash.png deleted file mode 100644 index f775d15c..00000000 --- a/examples/expo/assets/splash.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bc25a616b4e31cf7300cd97b9cbf8894e855e6373aa797d0badd7e211111c5e5 -size 47346 diff --git a/examples/expo/babel.config.js b/examples/expo/babel.config.js deleted file mode 100644 index 6bbc8da5..00000000 --- a/examples/expo/babel.config.js +++ /dev/null @@ -1,10 +0,0 @@ -// eslint-disable-next-line -module.exports = function (api) { - api.cache(true); - return { - presets: ['babel-preset-expo'], - plugins: [ - 'react-native-reanimated/plugin', // reanimated plugin must be listed last - ], - }; -}; diff --git a/examples/expo/metro.config.js b/examples/expo/metro.config.js deleted file mode 100644 index 92970a12..00000000 --- a/examples/expo/metro.config.js +++ /dev/null @@ -1,21 +0,0 @@ -const { getDefaultConfig } = require('expo/metro-config'); -const path = require('path'); - -// Find the project and workspace directories -const projectRoot = __dirname; -// This can be replaced with `find-yarn-workspace-root` -const workspaceRoot = path.resolve(projectRoot, '../..'); - -const config = getDefaultConfig(projectRoot); - -// 1. Watch all files within the monorepo -config.watchFolders = [workspaceRoot]; -// 2. Let Metro know where to resolve packages and in what order -config.resolver.nodeModulesPaths = [ - path.resolve(projectRoot, 'node_modules'), - path.resolve(workspaceRoot, 'node_modules'), -]; -// 3. Force Metro to resolve (sub)dependencies only from the `nodeModulesPaths` -config.resolver.disableHierarchicalLookup = true; - -module.exports = config; diff --git a/examples/expo/package.json b/examples/expo/package.json deleted file mode 100644 index a9700974..00000000 --- a/examples/expo/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "ama-expo-example", - "private": true, - "version": "1.1.0", - "main": "index.js", - "scripts": { - "start": "expo start", - "android": "expo start --android", - "ios": "expo start --ios", - "web": "expo start --web" - }, - "dependencies": { - "@react-navigation/native": "^6.1.7", - "@react-navigation/native-stack": "^6.9.14", - "expo": "~51.0.39", - "expo-status-bar": "~1.12.1", - "react": "18.2.0", - "react-native": "0.74.5", - "react-native-gesture-handler": "~2.16.1", - "react-native-reanimated": "~3.10.1", - "react-native-safe-area-context": "4.10.5", - "react-native-screens": "3.31.1" - }, - "devDependencies": { - "@babel/core": "^7.24.0", - "@types/react": "~18.2.45", - "typescript": "~5.3.3" - } -} diff --git a/examples/expo/tsconfig.json b/examples/expo/tsconfig.json deleted file mode 100644 index 03d7a0ce..00000000 --- a/examples/expo/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": ["../../tsconfig.json", "expo/tsconfig.base"], - "baseUrl": "./", - "paths": { - "@examples/shared-ui": ["examples/shared/index"], - }, - "compilerOptions": { - "strict": true - } -} diff --git a/examples/shared/CHANGELOG.md b/examples/shared/CHANGELOG.md deleted file mode 100644 index 02d1f634..00000000 --- a/examples/shared/CHANGELOG.md +++ /dev/null @@ -1,7 +0,0 @@ -# @examples/shared-ui - -## 1.1.0 - -### Minor Changes - -- Added `` component example screens ([#272](https://github.com/FormidableLabs/react-native-ama/pull/272)) diff --git a/examples/shared/index.ts b/examples/shared/index.ts deleted file mode 100644 index 3a7fc2cd..00000000 --- a/examples/shared/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -// components -export { BackButton } from './src/components/BackButton'; -export { CTAPressable } from './src/components/CTAPressable'; -export { CTATouchableOpacity } from './src/components/CTATouchableOpacity'; -export { CTATouchableWithoutFeedback } from './src/components/CTATouchableWithoutFeedback'; -export { Header } from './src/components/Header'; -export { Spacer } from './src/components/Spacer'; - -// Screens -export { LoadingScreen } from './src/screens/Loading.screen'; -export { CarouselScreen } from './src/screens/Carousel.screen'; -export { BottomSheetScreen } from './src/screens/BottomSheet.screen'; -export { ExpandablePressableScreen } from './src/screens/ExpandablePressableScreen'; -export { FlatListScreen } from './src/screens/FlatList.screen'; -export { FlatListDynamicScreen } from './src/screens/FlatListDynamic.screen'; -export { FlatListStaticScreen } from './src/screens/FlatListStatic.screen'; -export { FormScreen } from './src/screens/Form.screen'; -export { HomeScreen } from './src/screens/Home.screen'; -export { PressableScreen } from './src/screens/Pressable.screen'; -export { TextScreen } from './src/screens/Text.screen'; -export { TouchableOpacityScreen } from './src/screens/TouchableOpacity.screen'; -export { TouchableWithoutFeedbackScreen } from './src/screens/TouchableWithoutFeedback.screen'; -export { UseAMAContextScreen } from './src/screens/UseAMAContext.screen'; -export { UseAnimationDurationScreen } from './src/screens/UseAnimationDurationScreen'; -export { UseAnimationScreen } from './src/screens/UseAnimationScreen'; -export { UseReanimatedAnimationBuilderScreen } from './src/screens/UseReanimatedAnimationBuilderScreen'; -export { UseReanimatedTimingScreen } from './src/screens/UseReanimatedTimingScreen'; -export { UseTimedActionScreen } from './src/screens/UseTimedAction.screen'; -export { SwitchListItemScreen } from './src/screens/SwitchListItemScreen'; - -// other - -export { theme } from './src/theme'; diff --git a/examples/shared/package.json b/examples/shared/package.json deleted file mode 100644 index 99b0a13c..00000000 --- a/examples/shared/package.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "name": "@examples/shared-ui", - "version": "1.1.0", - "description": "Example Apps shared UI components", - "private": true, - "react-native": "index", - "main": "dist/index.js", - "scripts": { - "build": "rimraf dist && tsc", - "UNCOMMENT:postinstall": "yarn build", - "type:watch": "tsc --watch", - "type:check": "tsc --noEmit" - }, - "dependencies": { - "react-native-svg": "13.9.0" - }, - "devDependencies": { - "rimraf": "^3.0.2", - "typescript": "^5.1.3" - }, - "peerDependencies": { - "@react-navigation/native": ">=5.0.0", - "react": "*", - "react-native": "*" - } -} diff --git a/examples/shared/src/components/CTAPressable.tsx b/examples/shared/src/components/CTAPressable.tsx deleted file mode 100644 index a1ff9d99..00000000 --- a/examples/shared/src/components/CTAPressable.tsx +++ /dev/null @@ -1,127 +0,0 @@ -import { - Pressable as AMAPressable, - type PressableProps, -} from '@react-native-ama/react-native'; -import React from 'react'; -import { - AccessibilityState, - ActivityIndicator, - StyleSheet, - Text, -} from 'react-native'; - -import { theme } from '../theme'; - -type CTAPressableProps = Omit< - PressableProps, - 'children' | 'accessibilityRole' | 'accessibilityLabel' -> & { - title: string; - accessibilityLabel?: string; - textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase' | undefined; -} & { - marginLeft?: number; - marginRight?: number; -} & { - checked?: AccessibilityState['checked']; - selected?: boolean; - expanded?: boolean; -}; - -export const CTAPressable = ({ - title, - onPress, - disabled, - textTransform, - marginLeft, - marginRight, - accessibilityLabel, - ...rest -}: CTAPressableProps) => { - return ( - { - const buttonStyles = getButtonStyle({ - pressed, - disabled, - // @ts-ignore - checked: rest?.checked, - // @ts-ignore - selected: rest?.selected, - }); - - return [ - styles.button, - buttonStyles, - { marginLeft, marginRight }, - rest.style, - ]; - }} - onPress={onPress}> - {rest.busy ? : null} - - {title} - - - ); -}; - -function getButtonStyle({ - pressed, - disabled, - checked, - selected, -}: { - pressed: boolean; - disabled?: boolean | null; - checked?: AccessibilityState['checked']; - selected?: boolean; -}) { - if (disabled) { - return styles.disabled; - } else if (pressed) { - return styles.pressed; - } else if (checked) { - return checked === 'mixed' ? styles.mixed : styles.checked; - } else if (selected) { - return styles.selected; - } - - return {}; -} - -const styles = StyleSheet.create({ - button: { - paddingVertical: theme.padding.normal, - paddingHorizontal: theme.padding.big, - backgroundColor: theme.color.black, - minHeight: 48, - minWidth: 48, - }, - pressed: { - backgroundColor: theme.color.hover, - }, - checked: { - backgroundColor: theme.color.checked, - }, - mixed: { - backgroundColor: theme.color.mixed, - }, - selected: { - backgroundColor: theme.color.selected, - }, - disabled: { - backgroundColor: theme.color.disabled, - }, - text: { - textAlign: 'center', - color: theme.color.white, - fontSize: theme.fontSize.medium, - }, -}); diff --git a/examples/shared/src/components/Header.tsx b/examples/shared/src/components/Header.tsx deleted file mode 100644 index bc7a7794..00000000 --- a/examples/shared/src/components/Header.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { Text } from '@react-native-ama/react-native'; -import * as React from 'react'; -import { StyleSheet } from 'react-native'; - -import { theme } from '../theme'; - -type HeaderProps = { - title: string; - autofocus?: boolean; -}; - -export const Header: React.FC = ({ title, autofocus }) => { - return ( - - {title} - - ); -}; - -const styles = StyleSheet.create({ - title: { - fontSize: theme.fontSize.medium, - fontWeight: 'bold', - }, -}); diff --git a/examples/shared/tsconfig.build.json b/examples/shared/tsconfig.build.json deleted file mode 100644 index b140cd90..00000000 --- a/examples/shared/tsconfig.build.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "dist", - "declaration": true - } -} \ No newline at end of file diff --git a/examples/shared/tsconfig.json b/examples/shared/tsconfig.json deleted file mode 100644 index 58ae44b4..00000000 --- a/examples/shared/tsconfig.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "jsx": "react", - "lib": ["dom", "dom.iterable", "esnext"], - "module": "commonjs", - "moduleResolution": "node", - "target": "es6", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true, - "allowSyntheticDefaultImports": true, - }, -} \ No newline at end of file diff --git a/package.json b/package.json index 4632f15b..f780bc5b 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ "repository": "https://github.com/FormidableLabs/react-native-ama.git", "homepage": "https://commerce.nearform.com/open-source/react-native-ama/", "scripts": { - "example:bare": "yarn --cwd examples/bare", - "example:expo": "yarn --cwd examples/expo", + "playground": "yarn --cwd playground", + "playground:ios": "yarn --cwd playground run ios", "build:animations": "yarn workspace @react-native-ama/animations build", "build:core": "yarn workspace @react-native-ama/core build", "build:extras": "yarn workspace @react-native-ama/extras build", @@ -20,7 +20,8 @@ "ts:check": "tsc --noEmit", "lint": "eslint --ext .js,.ts,.tsx ./packages", "version": "yarn changeset version && yarn install --no-frozen-lockfile", - "build": "yarn build:internal && yarn build:core && yarn build:animations && yarn build:react-native && yarn build:extras && yarn build:forms && yarn build:lists" + "build": "yarn build:internal && yarn build:core && yarn build:animations && yarn build:react-native && yarn build:extras && yarn build:forms && yarn build:lists", + "prettier": "yarn prettier --write 'packages/**/*.{js,jsx,ts,tsx}'" }, "workspaces": [ "packages/animations", @@ -30,25 +31,33 @@ "packages/internal", "packages/lists", "packages/react-native", - "examples/bare", - "examples/expo", - "examples/shared" + "example" ], "devDependencies": { "@changesets/cli": "^2.27.7", - "@ianvs/prettier-plugin-sort-imports": "^3.4.2", + "@ianvs/prettier-plugin-sort-imports": "^4.4.2", "@react-native/eslint-config": "^0.76.3", "@svitejs/changesets-changelog-github-compact": "^1.1.0", "@testing-library/react-native": "^12.3.0", "@types/jest": "^29.5.10", + "@types/react": "~19.0.0", "eslint": "^8.19.0", "eslint-plugin-import": "^2.26.0", - "eslint-plugin-prettier": "^3.1.3", + "eslint-plugin-jest": "^29.0.1", + "eslint-plugin-prettier": "^5.5.1", + "expo": "~53.0.0", + "expo-module-scripts": "^4.1.6", "husky": "^8.0.1", "jest": "^29.6.3", - "prettier": "^3.4.2", + "prettier": "^3.6.2", + "react-native": "0.79.1", "ts-jest": "^29.1.1", "typescript": "^5.1.3" }, + "peerdependencies": { + "expo": "*", + "react": "*", + "react-native": "*" + }, "packageManager": "yarn@3.6.4" } diff --git a/packages/animations/src/components/AnimatedContainer.test.tsx b/packages/animations/src/components/AnimatedContainer.test.tsx index f9d36036..3c4ccda0 100644 --- a/packages/animations/src/components/AnimatedContainer.test.tsx +++ b/packages/animations/src/components/AnimatedContainer.test.tsx @@ -1,7 +1,6 @@ import { AutofocusContainer } from '@react-native-ama/core'; import { render } from '@testing-library/react-native'; import * as React from 'react'; - import * as UseReanimatedAnimationBuilder from '../hooks/useReanimatedAnimationBuilder'; import { AnimatedContainer } from './AnimatedContainer'; diff --git a/packages/animations/src/components/AnimatedContainer.tsx b/packages/animations/src/components/AnimatedContainer.tsx index 568411dc..9c1b4efe 100644 --- a/packages/animations/src/components/AnimatedContainer.tsx +++ b/packages/animations/src/components/AnimatedContainer.tsx @@ -3,7 +3,6 @@ import * as React from 'react'; import type { PropsWithChildren } from 'react'; import type { ViewProps } from 'react-native'; import Animated, { AnimateProps } from 'react-native-reanimated'; - import { AnimatedEntryViewStyle, AnimatedExitViewStyle, @@ -55,7 +54,8 @@ export const AnimatedContainer = React.forwardRef< entering={entering} exiting={exiting} ref={forwardRef} - {...rest}> + {...rest} + > {children} diff --git a/packages/animations/src/hooks/useAnimation.test.ts b/packages/animations/src/hooks/useAnimation.test.ts index c2392e14..a527595c 100644 --- a/packages/animations/src/hooks/useAnimation.test.ts +++ b/packages/animations/src/hooks/useAnimation.test.ts @@ -1,7 +1,6 @@ import * as AMAProvider from '@react-native-ama/core'; import { renderHook } from '@testing-library/react-native'; import { Animated } from 'react-native'; - import { useAnimation } from './useAnimation'; beforeEach(() => { diff --git a/packages/animations/src/hooks/useAnimationDuration.test.ts b/packages/animations/src/hooks/useAnimationDuration.test.ts index b4f33db3..1546707a 100644 --- a/packages/animations/src/hooks/useAnimationDuration.test.ts +++ b/packages/animations/src/hooks/useAnimationDuration.test.ts @@ -1,6 +1,5 @@ import * as AMAProvider from '@react-native-ama/core'; import { renderHook } from '@testing-library/react-native'; - import { useAnimationDuration } from './useAnimationDuration'; describe('useAnimationDuration', () => { diff --git a/packages/animations/src/hooks/useAnimationDuration.ts b/packages/animations/src/hooks/useAnimationDuration.ts index f8fd5f5a..e08dada0 100644 --- a/packages/animations/src/hooks/useAnimationDuration.ts +++ b/packages/animations/src/hooks/useAnimationDuration.ts @@ -1,7 +1,6 @@ import { useAMAContext } from '@react-native-ama/core'; import React from 'react'; import type { ViewStyle } from 'react-native'; - import { isMotionAnimation } from '../utils/isMotionAnimation'; export const useAnimationDuration = () => { diff --git a/packages/animations/src/hooks/useReanimatedAnimationBuilder.test.ts b/packages/animations/src/hooks/useReanimatedAnimationBuilder.test.ts index 2a6e26be..35e39017 100644 --- a/packages/animations/src/hooks/useReanimatedAnimationBuilder.test.ts +++ b/packages/animations/src/hooks/useReanimatedAnimationBuilder.test.ts @@ -1,6 +1,5 @@ import * as AMAProvider from '@react-native-ama/core'; import { renderHook } from '@testing-library/react-native'; - import { useReanimatedAnimationBuilder } from './useReanimatedAnimationBuilder'; beforeEach(() => { diff --git a/packages/animations/src/hooks/useReanimatedTiming.test.ts b/packages/animations/src/hooks/useReanimatedTiming.test.ts index 9a9e1c8a..07ec0710 100644 --- a/packages/animations/src/hooks/useReanimatedTiming.test.ts +++ b/packages/animations/src/hooks/useReanimatedTiming.test.ts @@ -1,7 +1,6 @@ import * as AMAProvider from '@react-native-ama/core'; import { MOTION_ANIMATIONS } from '@react-native-ama/internal'; import { renderHook } from '@testing-library/react-native'; - import { useReanimatedTiming } from './useReanimatedTiming'; beforeEach(() => { diff --git a/packages/animations/src/hooks/useReanimatedTiming.ts b/packages/animations/src/hooks/useReanimatedTiming.ts index f149f463..b59bfc89 100644 --- a/packages/animations/src/hooks/useReanimatedTiming.ts +++ b/packages/animations/src/hooks/useReanimatedTiming.ts @@ -8,7 +8,6 @@ import { WithSpringConfig, WithTimingConfig, } from 'react-native-reanimated'; - import { isMotionAnimation } from '../utils/isMotionAnimation'; export const useReanimatedTiming = () => { diff --git a/packages/core/ama.rules.json b/packages/core/ama.rules.json new file mode 100644 index 00000000..db9163e9 --- /dev/null +++ b/packages/core/ama.rules.json @@ -0,0 +1,5 @@ +{ + "rules": {}, + "accessibilityLabelExceptions": [], + "highlight": "both" +} diff --git a/packages/core/android/build.gradle b/packages/core/android/build.gradle new file mode 100644 index 00000000..11cb174b --- /dev/null +++ b/packages/core/android/build.gradle @@ -0,0 +1,43 @@ +apply plugin: 'com.android.library' + +group = 'expo.modules.ama' +version = '0.1.0' + +def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle") +apply from: expoModulesCorePlugin +applyKotlinExpoModulesCorePlugin() +useCoreDependencies() +useExpoPublishing() + +// If you want to use the managed Android SDK versions from expo-modules-core, set this to true. +// The Android SDK versions will be bumped from time to time in SDK releases and may introduce breaking changes in your module code. +// Most of the time, you may like to manage the Android SDK versions yourself. +def useManagedAndroidSdkVersions = false +if (useManagedAndroidSdkVersions) { + useDefaultAndroidSdkVersions() +} else { + buildscript { + // Simple helper that allows the root project to override versions declared by this library. + ext.safeExtGet = { prop, fallback -> + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback + } + } + project.android { + compileSdkVersion safeExtGet("compileSdkVersion", 34) + defaultConfig { + minSdkVersion safeExtGet("minSdkVersion", 21) + targetSdkVersion safeExtGet("targetSdkVersion", 34) + } + } +} + +android { + namespace "expo.modules.ama" + defaultConfig { + versionCode 1 + versionName "0.1.0" + } + lintOptions { + abortOnError false + } +} diff --git a/packages/core/android/src/debug/AndroidManifest.xml b/packages/core/android/src/debug/AndroidManifest.xml new file mode 100644 index 00000000..bdae66c8 --- /dev/null +++ b/packages/core/android/src/debug/AndroidManifest.xml @@ -0,0 +1,2 @@ + + diff --git a/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaModule.kt b/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaModule.kt new file mode 100644 index 00000000..2de16285 --- /dev/null +++ b/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaModule.kt @@ -0,0 +1,202 @@ +package expo.modules.ama + +import android.app.Activity +import android.graphics.Rect +import android.os.Handler +import android.os.Looper +import android.util.DisplayMetrics +import android.view.View +import android.view.ViewGroup +import android.view.ViewTreeObserver +import android.widget.ScrollView +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat +import expo.modules.kotlin.modules.Module +import expo.modules.kotlin.modules.ModuleDefinition +import kotlin.math.max + +object Constants { + const val DEBOUNCE: Long = 100 +} + +data class AMAConfig( + val rules: Map = emptyMap(), + val accessibilityLabelExceptions: List = emptyList(), + val highlight: String = "both" +) + +class ReactNativeAmaModule : Module() { + private var isMonitoring = false + private var currentDecorView: View? = null + private val drawListener = ViewTreeObserver.OnDrawListener { scheduleA11yCheck() } + + private val checkHandler = Handler(Looper.getMainLooper()) + private var checkRunnable: Runnable? = null + private lateinit var a11yChecker: A11yChecker + + override fun definition() = ModuleDefinition { + Name("ReactNativeAma") + + Events("onA11yIssues") + + Function("start") { configMap: Map -> + if (!isMonitoring) { + + val config = + AMAConfig( + // Use safe casting and provide default values + rules = configMap["rules"] as? Map ?: emptyMap(), + accessibilityLabelExceptions = + configMap["accessibilityLabelExceptions"] as? List + ?: emptyList(), + highlight = configMap["highlight"] as? String ?: "both" + ) + + Logger.info("start", "👀 Start Monitoring 👀", config.toString()) + + a11yChecker = A11yChecker(appContext, config) + + getCurrentActivity()?.window?.decorView?.let { + currentDecorView = it + it.viewTreeObserver.addOnDrawListener(drawListener) + } + + isMonitoring = true + } + } + + Function("stop") { + if (isMonitoring) { + currentDecorView?.let { it.viewTreeObserver.removeOnDrawListener(drawListener) } + + isMonitoring = false + } + } + + AsyncFunction("getPosition") { viewId: Int -> + val activity = appContext.activityProvider?.currentActivity ?: return@AsyncFunction null + val root = activity.window.decorView as? ViewGroup ?: return@AsyncFunction null + val target = root.findViewById(viewId) ?: return@AsyncFunction null + + val scroll = + generateSequence(target.parent) { (it as? View)?.parent } + .filterIsInstance() + .firstOrNull() + scroll?.let { sv -> + val frame = Rect().apply { target.getDrawingRect(this) } + sv.offsetDescendantRectToMyCoords(target, frame) + + val topVisible = frame.top >= 0 + val bottomVisible = frame.bottom <= sv.height + + if (!topVisible || !bottomVisible) { + val mPx = (10 * activity.resources.displayMetrics.density).toInt() + val scrollToY = + when { + frame.top < 0 -> max(0, frame.top - mPx) + frame.bottom > sv.height -> frame.bottom - sv.height + mPx + else -> sv.scrollY + } + sv.scrollTo(sv.scrollX, scrollToY) + } + } + + target.getGlobalDpBounds(root) + } + + AsyncFunction("inspectViewAttributes") { viewId: Int -> + val activity: Activity = + appContext.activityProvider?.currentActivity ?: return@AsyncFunction null + + val root = activity.window.decorView as? ViewGroup ?: return@AsyncFunction null + + // find the view + val view = root.findViewById(viewId) ?: return@AsyncFunction null + + // wrap its AccessibilityNodeInfo for compat APIs + val info = AccessibilityNodeInfoCompat.wrap(view.createAccessibilityNodeInfo()) + + // get raw screen bounds + val loc = IntArray(2) + view.getLocationOnScreen(loc) + val bounds = + mapOf( + "left" to loc[0], + "top" to loc[1], + "right" to loc[0] + view.width, + "bottom" to loc[1] + view.height + ) + + mapOf( + "id" to view.id, + "className" to view.javaClass.name, + "visibility" to view.visibility, // 0=VISIBLE,4=INVISIBLE,8=GONE + "importantForAccessibility" to view.importantForAccessibility, + "clickable" to view.isClickable, + "focusable" to view.isFocusable, + "contentDescription" to view.contentDescription?.toString(), + "a11yText" to info.text?.toString(), + "a11yRoleDescription" to info.roleDescription?.toString(), + "isVisibleToUser" to info.isVisibleToUser, + "bounds" to bounds + ) + } + } + + private fun getCurrentActivity(): Activity? { + return appContext.activityProvider?.currentActivity + } + + private fun scheduleA11yCheck() { + checkRunnable?.let { checkHandler.removeCallbacks(it) } + checkRunnable = Runnable { + Logger.info2("scheduleA11yCheck", "💨 Running a11y scheduler") + + val decorView = currentDecorView ?: return@Runnable + + // When a component fails an a11y check, we highlight that. + // This causes the drawListener to being fired again, causing + // an infinite loop. To avoid that we temporarily detach the listener + // until all thecks have been performed. + decorView.viewTreeObserver.removeOnDrawListener(drawListener) + + performA11yChecks() + + decorView.post { + // Check if the observer is still alive before re-attaching + if (decorView.viewTreeObserver.isAlive) { + decorView.viewTreeObserver.addOnDrawListener(drawListener) + } + } + } + checkHandler.postDelayed(checkRunnable!!, Constants.DEBOUNCE) + } + + private fun performA11yChecks() { + Logger.info("performA11yChecks", "doing the job") + val issues = a11yChecker.performA11yChecks(currentDecorView!!) + + sendEvent( + "onA11yIssues", + mapOf("timestamp" to System.currentTimeMillis(), "issues" to issues) + ) + } +} + +private fun View.getGlobalDpBounds(rootView: View): List { + val abs = Rect().also { createAccessibilityNodeInfo().getBoundsInScreen(it) } + + val origin = IntArray(2).also { rootView.getLocationOnScreen(it) } + val relLeftPx = abs.left - origin[0] + val relTopPx = abs.top - origin[1] + val widthPx = abs.width() + val heightPx = abs.height() + + val metrics: DisplayMetrics = resources.displayMetrics + val d = metrics.density + val leftDp = (relLeftPx / d).toInt() + val topDp = (relTopPx / d).toInt() + val widthDp = (widthPx / d).toInt() + val heightDp = (heightPx / d).toInt() + + return listOf(leftDp, topDp, widthDp, heightDp) +} diff --git a/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaView.kt b/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaView.kt new file mode 100644 index 00000000..d6fb1c0a --- /dev/null +++ b/packages/core/android/src/debug/java/expo/modules/ama/ReactNativeAmaView.kt @@ -0,0 +1,30 @@ +package expo.modules.ama + +import android.content.Context +import android.webkit.WebView +import android.webkit.WebViewClient +import expo.modules.kotlin.AppContext +import expo.modules.kotlin.viewevent.EventDispatcher +import expo.modules.kotlin.views.ExpoView + +class ReactNativeAmaView(context: Context, appContext: AppContext) : ExpoView(context, appContext) { + // Creates and initializes an event dispatcher for the `onLoad` event. + // The name of the event is inferred from the value and needs to match the event name defined in the module. + private val onLoad by EventDispatcher() + + // Defines a WebView that will be used as the root subview. + internal val webView = WebView(context).apply { + layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT) + webViewClient = object : WebViewClient() { + override fun onPageFinished(view: WebView, url: String) { + // Sends an event to JavaScript. Triggers a callback defined on the view component in JavaScript. + onLoad(mapOf("url" to url)) + } + } + } + + init { + // Adds the WebView to the view hierarchy. + addView(webView) + } +} diff --git a/packages/core/android/src/debug/java/expo/modules/ama/a11yChecker.kt b/packages/core/android/src/debug/java/expo/modules/ama/a11yChecker.kt new file mode 100644 index 00000000..73335b3b --- /dev/null +++ b/packages/core/android/src/debug/java/expo/modules/ama/a11yChecker.kt @@ -0,0 +1,366 @@ +package expo.modules.ama + +import android.graphics.Color +import android.graphics.drawable.ColorDrawable +import android.view.View +import android.view.ViewGroup +import android.widget.TextView +import androidx.core.view.accessibility.AccessibilityNodeInfoCompat +import expo.modules.kotlin.AppContext +import java.util.Collections +import kotlin.collections.mutableListOf +import kotlin.math.pow +import kotlin.synchronized + +data class A11yIssue( + val type: RuleAction, + val rule: Rule, + val label: String? = null, + val reason: String? = null, + val viewId: Int? = null, +) + +enum class RuleAction { + MUST, + MUST_NOT, + SHOULD, + SHOULD_NOT, + IGNORE +} + +enum class Rule { + CONTRAST_FAILED, + CONTRAST_FAILED_AAA, + FLATLIST_NO_COUNT_IN_SINGULAR_MESSAGE, + FLATLIST_NO_COUNT_IN_PLURAL_MESSAGE, + MINIMUM_SIZE, + NO_ACCESSIBILITY_LABEL, + NO_ACCESSIBILITY_ROLE, + NO_FORM_LABEL, + NO_FORM_ERROR, + NO_KEYBOARD_TRAP, + NO_UNDEFINED, + UPPERCASE_TEXT_NO_ACCESSIBILITY_LABEL, + NO_UPPERCASE_TEXT, + BOTTOM_SHEET_CLOSE_ACTION, + INCOMPATIBLE_ACCESSIBILITY_STATE, + NO_FORM_LABEL_ENDING_WITH_ASTERISK, + INCOMPATIBLE_ACCESSIBILITY_ROLE +} + +val LOGGER_RULES: Map = + mapOf( + Rule.CONTRAST_FAILED to RuleAction.MUST, + Rule.CONTRAST_FAILED_AAA to RuleAction.SHOULD, + Rule.FLATLIST_NO_COUNT_IN_SINGULAR_MESSAGE to RuleAction.SHOULD, + Rule.FLATLIST_NO_COUNT_IN_PLURAL_MESSAGE to RuleAction.MUST, + Rule.MINIMUM_SIZE to RuleAction.MUST, + Rule.NO_ACCESSIBILITY_LABEL to RuleAction.MUST, + Rule.NO_ACCESSIBILITY_ROLE to RuleAction.MUST, + Rule.NO_FORM_LABEL to RuleAction.MUST, + Rule.NO_FORM_ERROR to RuleAction.MUST, + Rule.NO_KEYBOARD_TRAP to RuleAction.MUST_NOT, + Rule.NO_UNDEFINED to RuleAction.MUST_NOT, + Rule.UPPERCASE_TEXT_NO_ACCESSIBILITY_LABEL to RuleAction.MUST_NOT, + Rule.NO_UPPERCASE_TEXT to RuleAction.MUST_NOT, + Rule.BOTTOM_SHEET_CLOSE_ACTION to RuleAction.MUST, + Rule.INCOMPATIBLE_ACCESSIBILITY_STATE to RuleAction.MUST, + Rule.NO_FORM_LABEL_ENDING_WITH_ASTERISK to RuleAction.MUST_NOT, + Rule.INCOMPATIBLE_ACCESSIBILITY_ROLE to RuleAction.MUST_NOT + ) + +class A11yChecker(private val appContext: AppContext, private val config: AMAConfig) { + private val issues = Collections.synchronizedList(mutableListOf()) + private val highlighter = Highlight(appContext) + private lateinit var rootView: View + + public fun performA11yChecks(rootView: View): List> { + Logger.info("performA11yChecks", "Performing a11y checks") + + this.rootView = rootView + + rootView.let { root -> + val oldIssues = synchronized(issues) { issues.toList() } + + synchronized(issues) { issues.clear() } + + traverseAndCheck(root) + + clearFixedIssues(oldIssues) + + if (issues.isNotEmpty()) { + Logger.debug("performA11yChecks", issues.toString()) + + val issuesPayload = + issues.map { issue -> + mapOf( + "type" to issue.type, + "rule" to issue.rule, + "label" to (issue.label ?: ""), + "reason" to (issue.reason ?: ""), + "viewId" to issue.viewId + ) + } + + return issuesPayload + } + } + + return emptyList() + } + + private fun clearFixedIssues(oldIssues: List) { + val fixed = oldIssues.filter { it !in issues } + + fixed.forEach { issue -> issue.viewId?.let { highlighter.clearHighlight(it) } } + } + + private fun traverseAndCheck(view: View) { + val className = view.javaClass.name + + // Ignores the debug overlay + if (className.startsWith("com.facebook.react.views.debuggingoverlay")) { + return + } + + checkView(view, issues) + + if (view is ViewGroup) { + for (i in 0 until view.childCount) { + traverseAndCheck(view.getChildAt(i)) + } + } + } + + private fun addIssue(rule: Rule, label: String, reason: String, view: View) { + val action = getRuleAction(rule) + + if (action == RuleAction.IGNORE) { + return + } + + val existingIssue = issues.find { it.rule == rule && it.viewId == view.id } + + if (existingIssue == null) { + view.id.let { id -> highlighter.highlight(id, config.highlight, action) } + + issues.add( + A11yIssue( + type = action, + rule = rule, + label = label, + reason = reason, + viewId = view.id + ) + ) + } + } + + private fun checkView(view: View, issues: MutableList) { + val info = view.createAccessibilityNodeInfo() + val a11yInfo = AccessibilityNodeInfoCompat.wrap(info) + + if (view.isPressable(a11yInfo)) { + checkForA11yLabel(view, a11yInfo) + checkForA11yRole(view, a11yInfo) + checkForMinimumTargetSize(view) + } + + if (view is TextView) { + Logger.debug("checkView", "Check for color contrast") + + checkColorContrast(view, issues) + } + } + + private fun checkForA11yLabel(view: View, a11yInfo: AccessibilityNodeInfoCompat) { + val a11yLabel: String? = a11yInfo.contentDescription?.toString() + + if (a11yLabel.isNullOrEmpty()) { + Logger.error("checkForA11yLabel", view.toString()) + Logger.error("checkForA11yLabel", view.getTextOrContent()) + + addIssue( + rule = Rule.NO_ACCESSIBILITY_LABEL, + label = view.getTextOrContent(), + reason = "", + view = view + ) + } + } + + private fun checkForA11yRole(view: View, a11yInfo: AccessibilityNodeInfoCompat) { + val className = a11yInfo.className?.toString() ?: view.javaClass.simpleName + val roleDescription: String? = a11yInfo.roleDescription?.toString() + val defaultRole = + when { + className.endsWith(".Button") -> "button" + className.endsWith(".CheckBox") -> "checkbox" + className.endsWith(".EditText") -> "text field" + className.endsWith(".ImageView") && view.isClickable -> "image button" + else -> null + } + + val role = roleDescription ?: defaultRole + + if (role.isNullOrEmpty()) { + Logger.error("checkForA11yRole", view.getTextOrContent()) + + addIssue( + rule = Rule.NO_ACCESSIBILITY_ROLE, + label = view.getTextOrContent(), + reason = "", + view = view + ) + } + } + + private fun checkForMinimumTargetSize(view: View) { + if (view.width < 48 || view.height < 48) { + Logger.error("checkView", "Small touch target") + + addIssue( + rule = Rule.MINIMUM_SIZE, + label = view.toString(), + reason = "Touchable are found ${view.width}x${view.height}", + view = view + ) + } + } + + private fun checkColorContrast(textView: TextView, issues: MutableList) { + try { + // Get text color + val textColor = textView.currentTextColor + + // Get background color + val backgroundColor = getBackgroundColor(textView) + + // Calculate contrast ratio + val contrastRatio = calculateContrastRatio(textColor, backgroundColor) + + // Check against WCAG standards + val textSize = + textView.textSize / textView.context.resources.displayMetrics.scaledDensity + val isLargeText = textSize >= 18f || (textSize >= 14f && isTextBold(textView)) + + val minContrast = if (isLargeText) 3.0 else 4.5 // WCAG AA standards + + if (contrastRatio < minContrast) { + addIssue( + rule = Rule.CONTRAST_FAILED, + label = textView.toString(), + reason = "Color contrast ratio ${String.format("%.2f", contrastRatio)}", + view = textView + ) + } + } catch (e: Exception) { + // Handle cases where color extraction fails + // Could add logging here if needed + } + } + + private fun getBackgroundColor(view: View): Int { + // Try to get background color from the view itself + val background = view.background + if (background is ColorDrawable) { + return background.color + } + + // If no background, traverse up the view hierarchy + var parent = view.parent + while (parent is View) { + val parentView = parent as View + val parentBackground = parentView.background + if (parentBackground is ColorDrawable) { + return parentBackground.color + } + parent = parentView.parent + } + + // Default to white if no background found + return Color.WHITE + } + + private fun isTextBold(textView: TextView): Boolean { + val typeface = textView.typeface + return typeface != null && typeface.isBold + } + + private fun calculateContrastRatio(color1: Int, color2: Int): Double { + val luminance1 = calculateLuminance(color1) + val luminance2 = calculateLuminance(color2) + + val lighter = maxOf(luminance1, luminance2) + val darker = minOf(luminance1, luminance2) + + return (lighter + 0.05) / (darker + 0.05) + } + + private fun calculateLuminance(color: Int): Double { + // Extract RGB components + val red = Color.red(color) / 255.0 + val green = Color.green(color) / 255.0 + val blue = Color.blue(color) / 255.0 + + // Apply gamma correction + val r = if (red <= 0.03928) red / 12.92 else Math.pow((red + 0.055) / 1.055, 2.4) + val g = if (green <= 0.03928) green / 12.92 else Math.pow((green + 0.055) / 1.055, 2.4) + val b = if (blue <= 0.03928) blue / 12.92 else Math.pow((blue + 0.055) / 1.055, 2.4) + + // Calculate relative luminance + return 0.2126 * r + 0.7152 * g + 0.0722 * b + } + + private fun getRuleAction(rule: Rule): RuleAction { + val overrideAction = config.rules[rule.name] + + if (overrideAction != null) { + return when (overrideAction.uppercase()) { + "PLEASE_FORGIVE_ME" -> RuleAction.IGNORE + "MUST" -> RuleAction.MUST + "SHOULD" -> RuleAction.SHOULD + "SHOULD_NOT" -> RuleAction.SHOULD_NOT + "MUST_NOT" -> RuleAction.MUST_NOT + else -> LOGGER_RULES[rule]!! + } + } + + return LOGGER_RULES[rule]!! + } +} + +fun View.isPressable(a11yInfo: AccessibilityNodeInfoCompat): Boolean { + return this.isClickable && this.isAccessible(a11yInfo) +} + +fun View.isAccessible(a11yInfo: AccessibilityNodeInfoCompat): Boolean { + if (this.importantForAccessibility == View.IMPORTANT_FOR_ACCESSIBILITY_NO || + !a11yInfo.isVisibleToUser + ) { + return false + } + + return true +} + +fun View.getTextOrContent(): String { + if (!this.contentDescription.isNullOrEmpty()) { + return this.contentDescription.toString() + } + + if (this is TextView) { + if (!this.text.isNullOrEmpty()) { + return this.text.toString() + } + + if (!this.hint.isNullOrEmpty()) { + return this.hint.toString() + } + } + + val info = createAccessibilityNodeInfo() + val a11yInfo = AccessibilityNodeInfoCompat.wrap(info) + + return a11yInfo.contentDescription?.toString().orEmpty() +} diff --git a/packages/core/android/src/debug/java/expo/modules/ama/highlight.kt b/packages/core/android/src/debug/java/expo/modules/ama/highlight.kt new file mode 100644 index 00000000..cd1105be --- /dev/null +++ b/packages/core/android/src/debug/java/expo/modules/ama/highlight.kt @@ -0,0 +1,142 @@ +package expo.modules.ama + +import android.app.Activity +import android.graphics.* +import android.graphics.drawable.Drawable +import android.graphics.drawable.LayerDrawable +import android.graphics.drawable.ShapeDrawable +import android.graphics.drawable.shapes.RectShape +import android.view.View +import expo.modules.kotlin.AppContext +import java.util.concurrent.ConcurrentHashMap + +val ruleColors: Map = + mapOf( + RuleAction.MUST to Color.RED, + RuleAction.MUST_NOT to Color.RED, + RuleAction.SHOULD to Color.YELLOW + ) + +class Highlight(private val appContext: AppContext) { + private val originalBackgrounds = ConcurrentHashMap() + + /** + * Highlight the view with the given ID. + * @param viewId the Android view ID + * @param mode "background" | "border" | "both" + */ + fun highlight(viewId: Int, mode: String, action: RuleAction) { + val activity: Activity = appContext.currentActivity ?: return + val color = ruleColors[action] + + activity.runOnUiThread { + val target = activity.findViewById(viewId) ?: return@runOnUiThread + + val view = activity.findViewById(viewId) ?: return@runOnUiThread + + view.background?.let { bg -> originalBackgrounds.putIfAbsent(viewId, bg) } + + when (mode) { + "background" -> applyStripyBackground(target, color) + "border" -> applyRedBorderOverlay(target, color) + else -> { + Logger.info("highlight", "3") + applyRedBorderOverlay(target, color) + Logger.info("highlight", "4") + applyStripyBackground(target, color) + } + } + } + } + + fun clearHighlight(viewId: Int) { + val activity: Activity = appContext.currentActivity ?: return + activity.runOnUiThread { + val view = activity.findViewById(viewId) ?: return@runOnUiThread + + val original = originalBackgrounds.remove(viewId) + view.background = original + + view.overlay.clear() + } + } + + private fun applyStripyBackground(view: View, color: Int?) { + val originalBackground = view.background + + val stripeWidth = 5f + val gapWidth = 25f + val bmpWidth = 150 + val bmpHeight = bmpWidth + + val bmp = Bitmap.createBitmap(bmpWidth, bmpHeight, Bitmap.Config.ARGB_8888) + val canvas = Canvas(bmp) + + val stripePaint = + Paint().apply { + this.color = color ?: Color.RED + isAntiAlias = true + } + + val canvasCenter = bmpWidth / 2f + canvas.save() + canvas.rotate(-45f, canvasCenter, canvasCenter) + + val extendedSize = (bmpWidth * 1.5f) + var y = -extendedSize + while (y < extendedSize) { + canvas.drawRect(-extendedSize, y, extendedSize, y + stripeWidth, stripePaint) + y += stripeWidth + gapWidth + } + + canvas.restore() + + val shader = BitmapShader(bmp, Shader.TileMode.MIRROR, Shader.TileMode.REPEAT) + + val backgroundPaint = Paint().apply { this.shader = shader } + + val stripedDrawable = + object : Drawable() { + override fun draw(c: Canvas) = c.drawRect(bounds, backgroundPaint) + + override fun setAlpha(alpha: Int) { + backgroundPaint.alpha = alpha + } + + override fun setColorFilter(cf: ColorFilter?) { + backgroundPaint.colorFilter = cf + } + + @Deprecated( + "Deprecated in Java", + ReplaceWith("PixelFormat.TRANSLUCENT", "android.graphics.PixelFormat") + ) + override fun getOpacity(): Int = PixelFormat.TRANSLUCENT + } + + if (originalBackground == null) { + view.background = stripedDrawable + } else { + val layers = arrayOf(originalBackground, stripedDrawable) + view.background = LayerDrawable(layers) + } + } + + private fun applyRedBorderOverlay(view: View, color: Int?) { + view.overlay.clear() + + val stroke = 6f + val half = (stroke / 2).toInt() + val shape = + ShapeDrawable(RectShape()).apply { + paint.apply { + this.color = color ?: Color.RED + style = Paint.Style.STROKE + strokeWidth = stroke + } + } + + shape.setBounds(0, 0, view.width - half, view.height - half) + view.overlay.add(shape) + } +} diff --git a/packages/core/android/src/debug/java/expo/modules/ama/logger.kt b/packages/core/android/src/debug/java/expo/modules/ama/logger.kt new file mode 100644 index 00000000..85937f13 --- /dev/null +++ b/packages/core/android/src/debug/java/expo/modules/ama/logger.kt @@ -0,0 +1,25 @@ +package expo.modules.ama + +import android.util.Log + +object Logger { + public fun info(fn: String, message: String, extra: String? = null) { + if (extra.isNullOrEmpty()) { + Log.i("[ReactNative AMA]: ", fn + " " + message) + } else { + Log.i("[ReactNative AMA]: ", fn + " " + message + " >>> " + extra) + } + } + + public fun info2(fn: String, message: String) { + Logger.info(" " + fn, message) + } + + public fun debug(fn: String, message: String) { + // Log.d("[ReactNative AMA]: ", fn + " " + message) + } + + public fun error(fn: String, message: String) { + Log.e("[ReactNative AMA - Error]: ", fn + " " + message) + } +} diff --git a/packages/core/expo-module.config.json b/packages/core/expo-module.config.json new file mode 100644 index 00000000..7644c662 --- /dev/null +++ b/packages/core/expo-module.config.json @@ -0,0 +1,9 @@ +{ + "platforms": ["apple", "android", "web"], + "apple": { + "modules": ["ReactNativeAmaModule"] + }, + "android": { + "modules": ["expo.modules.ama.ReactNativeAmaModule"] + } +} diff --git a/packages/core/ios/A11yChecker.swift b/packages/core/ios/A11yChecker.swift new file mode 100644 index 00000000..e12da76c --- /dev/null +++ b/packages/core/ios/A11yChecker.swift @@ -0,0 +1,364 @@ +import ExpoModulesCore +import UIKit + +public struct A11yIssue: Equatable { + public let type: RuleAction + public let rule: Rule + public let label: String? + public let issue: String? + public let viewId: Int + public var sent: Bool + + public static func == (lhs: A11yIssue, rhs: A11yIssue) -> Bool { + return lhs.viewId == rhs.viewId && lhs.rule == rhs.rule + } +} + +public enum RuleAction: String { + case must = "MUST" + case mustNot = "MUST_NOT" + case should = "SHOULD" + case shouldNot = "SHOULD_NOT" + case ignore = "IGNORE" +} + +public enum Rule: String { + case contrastFailed = "CONTRAST_FAILED" + case contrastFailedAAA = "CONTRAST_FAILED_AAA" + case flatlistNoCountInSingularMessage = "FLATLIST_NO_COUNT_IN_SINGULAR_MESSAGE" + case flatlistNoCountInPluralMessage = "FLATLIST_NO_COUNT_IN_PLURAL_MESSAGE" + case minimumSize = "MINIMUM_SIZE" + case noAccessibilityLabel = "NO_ACCESSIBILITY_LABEL" + case noAccessibilityRole = "NO_ACCESSIBILITY_ROLE" + case noFormLabel = "NO_FORM_LABEL" + case noFormError = "NO_FORM_ERROR" + case noKeyboardTrap = "NO_KEYBOARD_TRAP" + case noUndefined = "NO_UNDEFINED" + case uppercaseTextNoAccessibilityLabel = "UPPERCASE_TEXT_NO_ACCESSIBILITY_LABEL" + case noUppercaseText = "NO_UPPERCASE_TEXT" + case bottomSheetCloseAction = "BOTTOM_SHEET_CLOSE_ACTION" + case incompatibleAccessibilityState = "INCOMPATIBLE_ACCESSIBILITY_STATE" + case noFormLabelEndingWithAsterisk = "NO_FORM_LABEL_ENDING_WITH_ASTERISK" + case incompatibleAccessibilityRole = "INCOMPATIBLE_ACCESSIBILITY_ROLE" +} + +private let loggerRules: [Rule: RuleAction] = [ + .contrastFailed: .must, + .contrastFailedAAA: .should, + .flatlistNoCountInSingularMessage: .should, + .flatlistNoCountInPluralMessage: .must, + .minimumSize: .must, + .noAccessibilityLabel: .must, + .noAccessibilityRole: .must, + .noFormLabel: .must, + .noFormError: .must, + .noKeyboardTrap: .mustNot, + .noUndefined: .mustNot, + .uppercaseTextNoAccessibilityLabel: .mustNot, + .noUppercaseText: .mustNot, + .bottomSheetCloseAction: .must, + .incompatibleAccessibilityState: .must, + .noFormLabelEndingWithAsterisk: .mustNot, + .incompatibleAccessibilityRole: .mustNot, +] + +public class A11yChecker { + private let appContext: AppContext + private let config: AMAConfig + private var issues = [A11yIssue]() + private let highlighter: Highlight + private var newIssues = false + + public init(appContext: AppContext, config: AMAConfig) { + self.appContext = appContext + self.config = config + self.highlighter = Highlight() + } + + public func performA11yChecks(on rootView: UIView?) -> [String: Any] { + guard let root = rootView else { return [:] } + + let oldIssues = issues.map { $0 } + + issues.removeAll() + + traverseAndCheck(view: root) + var shouldSendEvent = clearFixedIssues(oldIssues) + + let newIssuesToSend = issues.filter { !$0.sent } + + if !newIssuesToSend.isEmpty { + for newIssue in newIssuesToSend { + if let index = issues.firstIndex(of: newIssue) { + issues[index].sent = true + } + } + + return [ + "issues": newIssuesToSend.map { issue in + [ + "type": issue.type.rawValue, + "rule": issue.rule.rawValue, + "issue": issue.issue ?? "", + "label": issue.label ?? "", + "viewId": issue.viewId, + ] + }, + "sendEvent": true, + ] + } + + return [ + "issues": [], + "sendEvent": shouldSendEvent, + ] + } + + private func clearFixedIssues(_ oldIssues: [A11yIssue]) -> Bool { + let fixed = oldIssues.filter { + old in !issues.contains(old) + } + + fixed.forEach { issue in + highlighter.clearHighlight(viewId: issue.viewId) + } + + for idx in issues.indices { + if oldIssues.contains(issues[idx]) { + issues[idx].sent = true + } + } + + return !fixed.isEmpty + } + + private func traverseAndCheck(view: UIView) { + checkView(view) + + for subview in view.subviews { + traverseAndCheck(view: subview) + } + } + + private func checkView(_ view: UIView) { + if view.isPressable { + checkForA11yLabel(view) + checkForA11yRole(view) + } + + // checkForMinimumTargetArea(view) + + // + // // Minimum touch target + + // + // // Contrast on text labels + // if let label = view as? UILabel { + // Logger.debug("checkView", "Check for color contrast") + // + // checkColorContrast(label) + // } + } + + private func checkForA11yLabel(_ view: UIView) { + if view.accessibilityLabel?.isEmpty ?? true { + addIssue( + rule: .noAccessibilityLabel, + label: view.getTextOrContent(), + issue: "", + view: view + ) + } + } + + private func checkForA11yRole(_ view: UIView) { + let defaultRole: String? = { + switch view { + case is UIButton: + return "button" + case is UISwitch: + return "switch" + case is UITextField: + return "text field" + case let iv as UIImageView where iv.isUserInteractionEnabled: + return "image button" + default: + return nil + } + }() + + let traits = view.accessibilityTraits + let hasRoleTrait = + traits.contains(.button) + || traits.contains(.link) + || traits.contains(.searchField) + || traits.contains(.image) + + if !(hasRoleTrait || defaultRole != nil) { + let label = view.getTextOrContent() + let traitNames = view.accessibilityTraits.names + Logger.info( + label, defaultRole ?? "no role", + extra: traitNames.joined(separator: ", ")) + + addIssue( + rule: .noAccessibilityRole, + label: label, + issue: "", + view: view + ) + } + } + + private func checkForMinimumTargetArea(_ view: UIView) { + if view.isPressable && (view.bounds.width < 48 || view.bounds.height < 48) { + addIssue( + rule: .minimumSize, + label: view.getTextOrContent(), + issue: + "\(Int(view.bounds.width))x\(Int(view.bounds.height))", + view: view + ) + } + + } + + private func checkColorContrast(_ label: UILabel) { + defer { /* swallow any extraction errors */ } + let textColor = label.textColor ?? .black + let backgroundColor = getBackgroundColor(for: label) + let contrastRatio = calculateContrastRatio(color1: textColor, color2: backgroundColor) + + let textSize = label.font.pointSize + let isLargeText = + textSize >= 18 + || (textSize >= 14 && label.font.fontDescriptor.symbolicTraits.contains(.traitBold)) + let minContrast = isLargeText ? 3.0 : 4.5 + + if contrastRatio < minContrast { + addIssue( + rule: .contrastFailed, + label: label.description, + issue: String( + format: "Color contrast ratio %.2f is below minimum %.1f (WCAG AA)", + contrastRatio, minContrast + ), + view: label + ) + } + } + + private func getBackgroundColor(for view: UIView) -> UIColor { + if let bg = view.backgroundColor { return bg } + var parent = view.superview + while let p = parent { + if let bg = p.backgroundColor { return bg } + parent = p.superview + } + return .white + } + + private func calculateContrastRatio(color1: UIColor, color2: UIColor) -> Double { + let l1 = calculateLuminance(color1) + let l2 = calculateLuminance(color2) + let lighter = max(l1, l2) + let darker = min(l1, l2) + return (lighter + 0.05) / (darker + 0.05) + } + + private func calculateLuminance(_ color: UIColor) -> Double { + guard let comps = color.cgColor.components, comps.count >= 3 else { return 1.0 } + let red = Double(comps[0]) + let green = Double(comps[1]) + let blue = Double(comps[2]) + func adjust(_ c: Double) -> Double { + return c <= 0.03928 ? c / 12.92 : pow((c + 0.055) / 1.055, 2.4) + } + let r = adjust(red) + let g = adjust(green) + let b = adjust(blue) + return 0.2126 * r + 0.7152 * g + 0.0722 * b + } + + private func getRuleAction(_ rule: Rule) -> RuleAction { + if let override = config.rules[rule.rawValue]?.uppercased() { + switch override { + case "PLEASE_FORGIVE_ME": return .ignore + case "MUST": return .must + case "SHOULD": return .should + case "SHOULD_NOT": return .shouldNot + case "MUST_NOT": return .mustNot + default: return loggerRules[rule]! + } + } + return loggerRules[rule]! + } + + private func addIssue(rule: Rule, label: String, issue: String, view: UIView) { + let action = getRuleAction(rule) + let viewId = view.tag + guard action != .ignore, viewId > 0 else { return } + + if !issues.contains(where: { $0.rule == rule && $0.viewId == viewId }) { + self.newIssues = true + + highlighter.highlight(view: view, mode: config.highlight, action: action) + + issues.append( + A11yIssue( + type: action, rule: rule, label: label, issue: issue, + viewId: viewId, + sent: false, + )) + } + } +} + +extension UIView { + fileprivate func getTextOrContent() -> String { + if let label = accessibilityLabel, !label.isEmpty { + return label + } + if let lbl = self as? UILabel, let t = lbl.text, !t.isEmpty { + return t + } + if let tf = self as? UITextField, let ph = tf.placeholder, !ph.isEmpty { + return ph + } + return "" + } + + /** + * Returns true if the user can tap on the element + */ + var isPressable: Bool { + return isUserInteractionEnabled && isAccessibilityElement + } +} + +extension UIAccessibilityTraits { + /// Returns the names of all traits present in this bitmask. + fileprivate var names: [String] { + let all: [(UIAccessibilityTraits, String)] = [ + (.button, "button"), + (.link, "link"), + (.header, "header"), + (.searchField, "searchField"), + (.image, "image"), + (.selected, "selected"), + (.playsSound, "playsSound"), + (.keyboardKey, "keyboardKey"), + (.staticText, "staticText"), + (.summaryElement, "summaryElement"), + (.notEnabled, "notEnabled"), + (.updatesFrequently, "updatesFrequently"), + (.startsMediaSession, "startsMediaSession"), + (.adjustable, "adjustable"), + (.allowsDirectInteraction, "allowsDirectInteraction"), + (.causesPageTurn, "causesPageTurn"), + ] + return all.compactMap { (trait, name) in + (self.rawValue & trait.rawValue) != 0 ? name : nil + } + } +} diff --git a/packages/core/ios/Highlight.swift b/packages/core/ios/Highlight.swift new file mode 100644 index 00000000..aff4c52f --- /dev/null +++ b/packages/core/ios/Highlight.swift @@ -0,0 +1,135 @@ +import UIKit + +private let ruleColors: [RuleAction: UIColor] = [ + .must: .red, + .mustNot: .red, + .should: .yellow, +] + +public class Highlight { + private let stripeOverlayTag = 0xA11 + private let borderLayerName = "ama_border" + private var stripeOverlays = [Int: UIView]() + private var borderLayers = [Int: CAShapeLayer]() + + public init() {} + + public func highlight(view: UIView, mode: String, action: RuleAction) { + let color = ruleColors[action] ?? .red + + DispatchQueue.main.async { + switch mode { + case "background": + self.applyStripyBackground(to: view, color: color) + case "border": + self.applyBorderOverlay(to: view, color: color) + default: + self.applyBorderOverlay(to: view, color: color) + self.applyStripyBackground(to: view, color: color) + } + } + } + + public func clearHighlight(viewId: Int) { + clearStripeOverlay(viewId: viewId) + clearBorderOverlay(viewId: viewId) + } + + private func clearStripeOverlay(viewId: Int) { + if let overlay = stripeOverlays.removeValue(forKey: viewId) { + overlay.removeFromSuperview() + } + } + + private func clearBorderOverlay(viewId: Int) { + if let border = borderLayers.removeValue(forKey: viewId) { + border.removeFromSuperlayer() + } + } + + /// Call this when you know the screen is going away + public func clearAll() { + stripeOverlays.values.forEach { $0.removeFromSuperview() } + borderLayers.values.forEach { $0.removeFromSuperlayer() } + stripeOverlays.removeAll() + borderLayers.removeAll() + } + + public func clearHighlight2(viewId: Int) { + guard let root = UIApplication.shared.keyWindow, + let target = root.viewWithTag(viewId) + else { return } + + target.viewWithTag(stripeOverlayTag)?.removeFromSuperview() + + target.layer.sublayers? + .filter { $0.name == borderLayerName } + .forEach { $0.removeFromSuperlayer() } + } + + private func applyStripyBackground(to view: UIView, color: UIColor) { + view.viewWithTag(stripeOverlayTag)?.removeFromSuperview() + + let stripeImage = makeStripyPatternImage(color: color) + let overlay = UIView(frame: view.bounds) + overlay.tag = stripeOverlayTag + overlay.isUserInteractionEnabled = false + overlay.backgroundColor = UIColor(patternImage: stripeImage) + overlay.autoresizingMask = [.flexibleWidth, .flexibleHeight] + view.addSubview(overlay) + + stripeOverlays[view.tag] = overlay + } + + private func applyBorderOverlay(to view: UIView, color: UIColor) { + view.layer.sublayers? + .filter { $0.name == borderLayerName } + .forEach { $0.removeFromSuperlayer() } + + let stroke: CGFloat = 3 + let border = CAShapeLayer() + border.name = borderLayerName + border.frame = view.bounds + border.lineWidth = stroke + border.strokeColor = color.cgColor + border.fillColor = UIColor.clear.cgColor + let inset = stroke / 2 + let rect = view.bounds.insetBy(dx: inset, dy: inset) + border.path = UIBezierPath(rect: rect).cgPath + view.layer.addSublayer(border) + + borderLayers[view.tag] = border + } + + func makeStripyPatternImage( + stripeWidth: CGFloat = 2, + gapWidth: CGFloat = 10, + tileSize: CGFloat = 150, + color: UIColor = .red + ) -> UIImage { + let size = CGSize(width: tileSize, height: tileSize) + let extended = tileSize * 1.5 + + let base = UIGraphicsImageRenderer(size: size).image { ctx in + let c = ctx.cgContext + c.setFillColor(color.cgColor) + + c.translateBy(x: size.width / 2, y: size.height / 2) + c.rotate(by: -.pi / 4) + c.translateBy(x: -size.width / 2, y: -size.height / 2) + + var y: CGFloat = -extended + while y < extended { + c.fill( + CGRect( + x: -extended, + y: y, + width: extended * 2, + height: stripeWidth)) + y += stripeWidth + gapWidth + } + } + + return base.resizableImage(withCapInsets: .zero, resizingMode: .tile) + } +} diff --git a/packages/core/ios/Logger.swift b/packages/core/ios/Logger.swift new file mode 100644 index 00000000..a250fc88 --- /dev/null +++ b/packages/core/ios/Logger.swift @@ -0,0 +1,31 @@ +import os + +public struct Logger { + // Replace with your own bundle identifier or subsystem + private static let subsystem = Bundle.main.bundleIdentifier ?? "com.your.app" + private static let log = os.Logger(subsystem: subsystem, category: "ReactNative AMA") + + public static func info(_ fn: String, _ message: String, extra: String? = nil) { + if let extra = extra, !extra.isEmpty { + log.info("[INFO]: \(fn) \(message) >>> \(extra, privacy: .public)") + } else { + log.info("[INFO]: \(fn) \(message, privacy: .public)") + } + } + + public static func info2(_ fn: String, _ message: String) { + info(" \(fn)", message) + } + + public static func debug(_ fn: String, _ message: String, extra: String? = nil) { + if let extra = extra, !extra.isEmpty { + log.info("[DEBUG]: \(fn) \(message) >>> \(extra, privacy: .public)") + } else { + log.info("[DEBUG]: \(fn) \(message, privacy: .public)") + } + } + + public static func error(_ fn: String, _ message: String) { + log.info("[ERROR]: \(fn) \(message, privacy: .public)") + } +} diff --git a/packages/core/ios/ReactNativeAma.podspec b/packages/core/ios/ReactNativeAma.podspec new file mode 100644 index 00000000..693830c5 --- /dev/null +++ b/packages/core/ios/ReactNativeAma.podspec @@ -0,0 +1,29 @@ +require 'json' + +package = JSON.parse(File.read(File.join(__dir__, '..', 'package.json'))) + +Pod::Spec.new do |s| + s.name = 'ReactNativeAma' + s.version = package['version'] + s.summary = package['description'] + s.description = package['description'] + s.license = package['license'] + s.author = package['author'] + s.homepage = package['homepage'] + s.platforms = { + :ios => '15.1', + :tvos => '15.1' + } + s.swift_version = '5.4' + s.source = { git: 'https://github.com/FormidableLabs/react-native-ama/' } + s.static_framework = true + + s.dependency 'ExpoModulesCore' + + # Swift/Objective-C compatibility + s.pod_target_xcconfig = { + 'DEFINES_MODULE' => 'YES', + } + + s.source_files = "**/*.{h,m,mm,swift,hpp,cpp}" +end diff --git a/packages/core/ios/ReactNativeAmaModule.swift b/packages/core/ios/ReactNativeAmaModule.swift new file mode 100644 index 00000000..47d74d79 --- /dev/null +++ b/packages/core/ios/ReactNativeAmaModule.swift @@ -0,0 +1,154 @@ +import ExpoModulesCore +import UIKit + +struct Constants { + static let debounce: TimeInterval = 0.5 +} + +public struct AMAConfig: CustomDebugStringConvertible { + public let rules: [String: String] + public let accessibilityLabelExceptions: [String] + public let highlight: String + + public init(from dictionary: [String: Any?]) { + self.rules = dictionary["rules"] as? [String: String] ?? [:] + self.accessibilityLabelExceptions = + dictionary["accessibilityLabelExceptions"] as? [String] ?? [] + self.highlight = dictionary["highlight"] as? String ?? "both" + } + + public var debugDescription: String { + return """ + AMAConfig( + rules: \(rules), + accessibilityLabelExceptions: \(accessibilityLabelExceptions), + highlight: "\(highlight)" + ) + """ + } +} + +public class ReactNativeAmaModule: Module { + private var isMonitoring = false + private var currentDecorView: UIView? + private var displayLink: CADisplayLink? + + private var a11yChecker: A11yChecker? + private var isCheckScheduled = false + + public func definition() -> ModuleDefinition { + Name("ReactNativeAma") + + Events("onA11yIssues") + + Function("start") { (configMap: [String: Any?]) in + guard !isMonitoring else { return } + + let config = AMAConfig(from: configMap) + + Logger.info("start", "👀 Start Monitoring 👀", extra: config.debugDescription) + + self.a11yChecker = A11yChecker(appContext: self.appContext!, config: config) + + DispatchQueue.main.async { + guard let viewController = self.appContext?.utilities?.currentViewController(), + let decorView = viewController.view + else { + return + } + + self.currentDecorView = decorView + self.setupDisplayLink() + self.isMonitoring = true + } + } + + Function("stop") { + guard isMonitoring else { return } + displayLink?.invalidate() + displayLink = nil + isMonitoring = false + } + + AsyncFunction("getPosition") { (viewId: Int) async -> [Double]? in + guard + let root = self.currentDecorView, + let target = root.viewWithTag(viewId) + else { return nil } + + await MainActor.run { + if let scroll = target.enclosingScrollView { + var frameInScroll = target.convert(target.bounds, to: scroll) + let m = CGFloat(10) + + frameInScroll.origin.y = max(0, frameInScroll.origin.y - m) + scroll.scrollRectToVisible(frameInScroll, animated: false) + } + } + + let bounds: CGRect = await MainActor.run { + target.convert(target.bounds, to: nil) + } + + return [ + bounds.origin.x, + bounds.origin.y, + bounds.width, + bounds.height, + ] + } + } + + private func setupDisplayLink() { + displayLink = CADisplayLink(target: self, selector: #selector(scheduleA11yCheck)) + displayLink?.add(to: .main, forMode: .default) + } + + @objc private func scheduleA11yCheck() { + guard !isCheckScheduled else { return } + + isCheckScheduled = true + + DispatchQueue.main.asyncAfter(deadline: .now() + Constants.debounce) { [weak self] in + guard let self = self, let decorView = self.currentDecorView else { + self?.isCheckScheduled = false + + return + } + + self.displayLink?.isPaused = true + self.performA11yChecks() + + DispatchQueue.main.async { + self.displayLink?.isPaused = false + self.isCheckScheduled = false + } + } + } + + private func performA11yChecks() { + guard let result = a11yChecker?.performA11yChecks(on: currentDecorView) else { return } + + if let shouldSend = result["sendEvent"] as? Bool, shouldSend { + if let issueList = result["issues"] { + sendEvent( + "onA11yIssues", + ["timestamp": Date().timeIntervalSince1970 * 1000, "issues": issueList] + ) + } + } + } +} + +extension UIView { + fileprivate var enclosingScrollView: UIScrollView? { + var v: UIView? = self + while let view = v { + if let scroll = view as? UIScrollView { + return scroll + } + v = view.superview + } + return nil + } +} diff --git a/packages/core/ios/ReactNativeAmaView.swift b/packages/core/ios/ReactNativeAmaView.swift new file mode 100644 index 00000000..68fa92fa --- /dev/null +++ b/packages/core/ios/ReactNativeAmaView.swift @@ -0,0 +1,38 @@ +import ExpoModulesCore +import WebKit + +// This view will be used as a native component. Make sure to inherit from `ExpoView` +// to apply the proper styling (e.g. border radius and shadows). +class ReactNativeAmaView: ExpoView { + let webView = WKWebView() + let onLoad = EventDispatcher() + var delegate: WebViewDelegate? + + required init(appContext: AppContext? = nil) { + super.init(appContext: appContext) + clipsToBounds = true + delegate = WebViewDelegate { url in + self.onLoad(["url": url]) + } + webView.navigationDelegate = delegate + addSubview(webView) + } + + override func layoutSubviews() { + webView.frame = bounds + } +} + +class WebViewDelegate: NSObject, WKNavigationDelegate { + let onUrlChange: (String) -> Void + + init(onUrlChange: @escaping (String) -> Void) { + self.onUrlChange = onUrlChange + } + + func webView(_ webView: WKWebView, didFinish navigation: WKNavigation) { + if let url = webView.url { + onUrlChange(url.absoluteString) + } + } +} diff --git a/packages/core/src/ReactNativeAma.types.ts b/packages/core/src/ReactNativeAma.types.ts new file mode 100644 index 00000000..f36d6d24 --- /dev/null +++ b/packages/core/src/ReactNativeAma.types.ts @@ -0,0 +1,20 @@ +import type { StyleProp, ViewStyle } from 'react-native'; +import { A11yIssue } from './internals/types'; + +export type OnLoadEventPayload = { + url: string; +}; + +export type ReactNativeAmaModuleEvents = { + onA11yIssues: (params: A11yIssue[]) => void; +}; + +export type ChangeEventPayload = { + value: string; +}; + +export type ReactNativeAmaViewProps = { + url: string; + onLoad: (event: { nativeEvent: OnLoadEventPayload }) => void; + style?: StyleProp; +}; diff --git a/packages/core/src/ReactNativeAmaModule.ts b/packages/core/src/ReactNativeAmaModule.ts new file mode 100644 index 00000000..77a35d49 --- /dev/null +++ b/packages/core/src/ReactNativeAmaModule.ts @@ -0,0 +1,9 @@ +import { NativeModule, requireNativeModule } from 'expo'; + +declare class ReactNativeAmaModule extends NativeModule { + start(config?: any): void; + stop(): void; +} + +// This call loads the native module object from the JSI. +export default requireNativeModule('ReactNativeAma'); diff --git a/packages/core/src/ReactNativeAmaModule.web.ts b/packages/core/src/ReactNativeAmaModule.web.ts new file mode 100644 index 00000000..d46665ed --- /dev/null +++ b/packages/core/src/ReactNativeAmaModule.web.ts @@ -0,0 +1,14 @@ +import { NativeModule, registerWebModule } from 'expo'; +import { ReactNativeAmaModuleEvents } from './ReactNativeAma.types'; + +class ReactNativeAmaModule extends NativeModule { + PI = Math.PI; + async setValueAsync(value: string): Promise { + this.emit('onChange', { value }); + } + hello() { + return 'Hello world! 👋'; + } +} + +export default registerWebModule(ReactNativeAmaModule, 'ReactNativeAmaModule'); diff --git a/packages/core/src/ReactNativeAmaView.tsx b/packages/core/src/ReactNativeAmaView.tsx new file mode 100644 index 00000000..6cc1590f --- /dev/null +++ b/packages/core/src/ReactNativeAmaView.tsx @@ -0,0 +1,10 @@ +import { requireNativeView } from 'expo'; +import * as React from 'react'; +import { ReactNativeAmaViewProps } from './ReactNativeAma.types'; + +const NativeView: React.ComponentType = + requireNativeView('ReactNativeAma'); + +export default function ReactNativeAmaView(props: ReactNativeAmaViewProps) { + return ; +} diff --git a/packages/core/src/ReactNativeAmaView.web.tsx b/packages/core/src/ReactNativeAmaView.web.tsx new file mode 100644 index 00000000..987b2ea8 --- /dev/null +++ b/packages/core/src/ReactNativeAmaView.web.tsx @@ -0,0 +1,14 @@ +import * as React from 'react'; +import { ReactNativeAmaViewProps } from './ReactNativeAma.types'; + +export default function ReactNativeAmaView(props: ReactNativeAmaViewProps) { + return ( +
+