diff --git a/android/build.gradle b/android/build.gradle index 90919f4689..442d484690 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,8 +6,8 @@ buildscript { minSdkVersion = 26 compileSdkVersion = 35 targetSdkVersion = 34 - ndkVersion = "26.1.10909125" - RNNKotlinVersion = "1.9.25" + ndkVersion = "27.1.12297006" + kotlinVersion = "2.0.21" } repositories { mavenLocal() @@ -19,7 +19,7 @@ buildscript { classpath("com.facebook.react:react-native-gradle-plugin") classpath("org.jetbrains.kotlin:kotlin-gradle-plugin") - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$RNNKotlinVersion" + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } diff --git a/android/gradle.properties b/android/gradle.properties index 87828ffa13..60916a46e0 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -28,7 +28,7 @@ reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64 # your application. You should enable this flag either if you want # to write custom TurboModules/Fabric components OR use libraries that # are providing them. -newArchEnabled=false +newArchEnabled=true # Use this property to enable or disable the Hermes JS engine. # If set to false, you will be using JSC instead. diff --git a/babel.config.js b/babel.config.js index 7ad1f74e09..aa0643db25 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,5 +1,17 @@ module.exports = { presets: ['module:@react-native/babel-preset'], + env: { + test: { + presets: [ + [ + 'module:@react-native/babel-preset', + { + disableStaticViewConfigsCodegen: true + } + ] + ] + } + }, plugins: [ 'react-native-reanimated/plugin', [ diff --git a/demo/src/index.js b/demo/src/index.js index 3c76bff534..7366d03385 100644 --- a/demo/src/index.js +++ b/demo/src/index.js @@ -1,8 +1,7 @@ -import {UIManager, I18nManager} from 'react-native'; +import {I18nManager} from 'react-native'; import {navigationData as menuStructure} from './screens/MenuStructure'; import {loadDemoConfigurations} from './configurations'; -UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true); // eslint-disable-line I18nManager.allowRTL(true); module.exports = { diff --git a/demo/src/screens/MenuStructure.js b/demo/src/screens/MenuStructure.js index e97fae56c9..44f6c0b13b 100644 --- a/demo/src/screens/MenuStructure.js +++ b/demo/src/screens/MenuStructure.js @@ -81,7 +81,7 @@ export const navigationData = { screens: [ {title: 'Action Sheet', tags: 'action sheet cross-platform', screen: 'unicorn.components.ActionSheetScreen'}, {title: 'Dialog', tags: 'dialog modal popup alert', screen: 'unicorn.components.DialogScreen'}, - {title: 'Feature Highlight', tags: 'feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'}, + {title: 'Feature Highlight', tags: 'native feature overlay', screen: 'unicorn.components.FeatureHighlightScreen'}, {title: 'Floating Button', tags: 'floating button', screen: 'unicorn.components.FloatingButtonScreen'}, {title: 'Hint', tags: 'hints tooltip', screen: 'unicorn.components.HintsScreen'}, {title: 'Toast', tags: 'toast top bottom snackbar', screen: 'unicorn.components.ToastsScreen'} @@ -117,10 +117,10 @@ export const navigationData = { {title: 'LoadingScreen', tags: 'loading screen', screen: 'unicorn.screens.LoadingScreen'}, {title: 'Modal', tags: 'modal topbar screen', screen: 'unicorn.screens.ModalScreen'}, {title: 'StateScreen', tags: 'empty state screen', screen: 'unicorn.screens.EmptyStateScreen'}, - {title: 'TabController', tags: 'tabbar controller native', screen: 'unicorn.components.TabControllerScreen'}, + {title: 'TabController', tags: 'tabbar controller', screen: 'unicorn.components.TabControllerScreen'}, { title: 'TabControllerWithStickyHeader', - tags: 'tabbar controller native sticky header', + tags: 'tabbar controller sticky header', screen: 'unicorn.components.TabControllerWithStickyHeaderScreen' }, {title: 'Timeline', tags: 'timeline', screen: 'unicorn.components.TimelineScreen'}, @@ -148,28 +148,28 @@ export const navigationData = { screens: [ { title: 'KeyboardAwareScrollView', - tags: 'KeyboardAwareScrollView', + tags: 'native KeyboardAwareScrollView', screen: 'unicorn.components.KeyboardAwareScrollViewScreen' }, { title: 'Dynamic Fonts', - tags: 'dynamic fonts load download', + tags: 'native dynamic fonts load download', screen: 'unicorn.nativeComponents.DynamicFontsScreen' }, { title: 'Highlight Overlay', - tags: 'native overlay', + tags: 'native native overlay', screen: 'unicorn.nativeComponents.HighlightOverlayViewScreen' }, {title: 'SafeArea Spacer', tags: 'native safe area', screen: 'unicorn.nativeComponents.SafeAreaSpacerViewScreen'}, { title: 'KeyboardTracking (iOS)', - tags: 'KeyboardTracking', + tags: 'native KeyboardTracking', screen: 'unicorn.nativeComponents.KeyboardTrackingViewScreen' }, { title: 'KeyboardAccessoryView', - tags: 'KeyboardInput', + tags: 'native KeyboardInput', screen: 'unicorn.nativeComponents.KeyboardAccessoryViewScreen' } ] @@ -193,7 +193,7 @@ export const navigationData = { screens: [ {title: 'Calendar', tags: 'calendar', screen: 'unicorn.components.IncubatorCalendarScreen'}, {title: 'ChipsInput', tags: 'chips input', screen: 'unicorn.components.ChipsInputScreen'}, - {title: 'Native TouchableOpacity', tags: 'touchable native', screen: 'unicorn.incubator.TouchableOpacityScreen'}, + {title: 'Native TouchableOpacity', tags: 'native touchable', screen: 'unicorn.incubator.TouchableOpacityScreen'}, {title: 'Toast (New)', tags: 'toast', screen: 'unicorn.components.IncubatorToastScreen'}, { title: 'ExpandableOverlay', diff --git a/demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap b/demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap index e2e3a1217e..00b80cc673 100644 --- a/demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap +++ b/demo/src/screens/__tests__/__snapshots__/TextFieldScreen.spec.js.snap @@ -1522,16 +1522,38 @@ exports[`TextField Screen renders screen 1`] = ` numberOfLines={1} onLayout={[Function]} style={ - { - "backgroundColor": "transparent", - "color": "#6E7881", - "fontFamily": "System", - "fontSize": 16, - "fontWeight": "400", - "lineHeight": 24, - "opacity": 0, - "writingDirection": "ltr", - } + [ + { + "backgroundColor": "transparent", + "color": "#20303C", + "writingDirection": "ltr", + }, + undefined, + { + "color": "#6E7881", + }, + undefined, + undefined, + {}, + undefined, + undefined, + undefined, + [ + {}, + [ + {}, + { + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "400", + "lineHeight": 24, + }, + ], + { + "opacity": 0, + }, + ], + ] } testID="undefined.floatingPlaceholder" > @@ -2118,16 +2140,38 @@ exports[`TextField Screen renders screen 1`] = ` numberOfLines={1} onLayout={[Function]} style={ - { - "backgroundColor": "transparent", - "color": "#20303C", - "fontFamily": "System", - "fontSize": 16, - "fontWeight": "400", - "lineHeight": 24, - "opacity": 0, - "writingDirection": "ltr", - } + [ + { + "backgroundColor": "transparent", + "color": "#20303C", + "writingDirection": "ltr", + }, + undefined, + { + "color": "#20303C", + }, + undefined, + undefined, + {}, + undefined, + undefined, + undefined, + [ + {}, + [ + {}, + { + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "400", + "lineHeight": 24, + }, + ], + { + "opacity": 0, + }, + ], + ] } testID="undefined.floatingPlaceholder" > @@ -2433,16 +2477,38 @@ exports[`TextField Screen renders screen 1`] = ` numberOfLines={1} onLayout={[Function]} style={ - { - "backgroundColor": "transparent", - "color": "#20303C", - "fontFamily": "System", - "fontSize": 16, - "fontWeight": "400", - "lineHeight": 24, - "opacity": 0, - "writingDirection": "ltr", - } + [ + { + "backgroundColor": "transparent", + "color": "#20303C", + "writingDirection": "ltr", + }, + undefined, + { + "color": "#20303C", + }, + undefined, + undefined, + {}, + undefined, + undefined, + undefined, + [ + {}, + [ + {}, + { + "fontFamily": "System", + "fontSize": 16, + "fontWeight": "400", + "lineHeight": 24, + }, + ], + { + "opacity": 0, + }, + ], + ] } testID="undefined.floatingPlaceholder" > diff --git a/demo/src/screens/componentScreens/AnimatedImageScreen.js b/demo/src/screens/componentScreens/AnimatedImageScreen.js index 237529b062..292972a5f9 100644 --- a/demo/src/screens/componentScreens/AnimatedImageScreen.js +++ b/demo/src/screens/componentScreens/AnimatedImageScreen.js @@ -4,8 +4,8 @@ import _ from 'lodash'; import {AnimatedImage, Colors} from 'react-native-ui-lib'; //eslint-disable-line const SampleImages = [ - 'https://static.pexels.com/photos/50721/pencils-crayons-colourful-rainbow-50721.jpeg', - 'https://static.pexels.com/photos/60628/flower-garden-blue-sky-hokkaido-japan-60628.jpeg' + 'https://images.pexels.com/photos/2529146/pexels-photo-2529146.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500', + 'https://images.pexels.com/photos/2529158/pexels-photo-2529158.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500' ]; export default class AnimatedImageScreen extends Component { diff --git a/demo/src/screens/componentScreens/PanViewScreen.tsx b/demo/src/screens/componentScreens/PanViewScreen.tsx index e65226e438..49641fe51f 100644 --- a/demo/src/screens/componentScreens/PanViewScreen.tsx +++ b/demo/src/screens/componentScreens/PanViewScreen.tsx @@ -1,6 +1,6 @@ import React, {Component} from 'react'; import {StyleSheet, ScrollView} from 'react-native'; -import {FlatList} from 'react-native-gesture-handler'; +import {FlatList, GestureHandlerRootView} from 'react-native-gesture-handler'; import { Assets, View, @@ -146,7 +146,7 @@ class PanViewScreen extends Component { render() { const {showToast, showDialog} = this.state; return ( - + New Pan View @@ -162,7 +162,7 @@ class PanViewScreen extends Component { {showToast && this.renderToast()} {showDialog && this.renderDialog()} - + ); } } diff --git a/demo/src/screens/componentScreens/SortableListScreen.tsx b/demo/src/screens/componentScreens/SortableListScreen.tsx index a8b91bc938..d7ef2c203c 100644 --- a/demo/src/screens/componentScreens/SortableListScreen.tsx +++ b/demo/src/screens/componentScreens/SortableListScreen.tsx @@ -129,7 +129,7 @@ export default SortableListScreen; const styles = StyleSheet.create({ itemContainer: { height: 52, - borderColor: Colors.$outlineDefault, + borderBottomColor: Colors.$outlineDefault, borderBottomWidth: 1 }, selectedItemContainer: { diff --git a/demo/src/screens/componentScreens/TabControllerScreen/tab3.tsx b/demo/src/screens/componentScreens/TabControllerScreen/tab3.tsx index 0509aab97d..42a00f85d0 100644 --- a/demo/src/screens/componentScreens/TabControllerScreen/tab3.tsx +++ b/demo/src/screens/componentScreens/TabControllerScreen/tab3.tsx @@ -62,7 +62,7 @@ class Tab2 extends Component { diff --git a/demo/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js b/demo/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js index f31619f4cb..4722a2efd2 100644 --- a/demo/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js +++ b/demo/src/screens/nativeComponentScreens/HighlightOverlayViewScreen.js @@ -16,7 +16,10 @@ export default class HighlightOverlayViewScreen extends PureComponent { } componentDidMount() { - this.setState({showFTE: true}); + // setting timeout to allow Android's transition animation to complete + setTimeout(() => { + this.setState({showFTE: true}); + }, 1000); } onRefUpdated(ref) { diff --git a/demo/src/screens/nativeComponentScreens/SafeAreaSpacerViewScreen.tsx b/demo/src/screens/nativeComponentScreens/SafeAreaSpacerViewScreen.tsx index 5e3871ac35..c66bfe59c9 100644 --- a/demo/src/screens/nativeComponentScreens/SafeAreaSpacerViewScreen.tsx +++ b/demo/src/screens/nativeComponentScreens/SafeAreaSpacerViewScreen.tsx @@ -23,6 +23,7 @@ export default class SafeAreaSpacerViewScreen extends PureComponent { SafeAreaSpacerView {'can be used as a BOTTOM or TOP spacer and will get the height of the safe area insets'} + diff --git a/docuilib/package.json b/docuilib/package.json index 1afa614874..5750a97919 100644 --- a/docuilib/package.json +++ b/docuilib/package.json @@ -43,11 +43,10 @@ "@types/react": "^17.0.14", "@types/react-helmet": "^6.1.2", "@types/react-router-dom": "^5.1.8", - "metro-react-native-babel-preset": "0.76.9", + "metro-react-native-babel-preset": "0.77.0", "react": "^18.2.0", "react-dom": "^18.2.0", "react-native-linear-gradient": "2.6.2", - "react-native-reanimated": "3.16.7", "react-native-shimmer-placeholder": "^2.0.9", "react-native-ui-lib": "snapshot", "shell-utils": "^1.0.10", diff --git a/docuilib/plugins/uilib.js b/docuilib/plugins/uilib.js index 2bb04982cb..f1ce054d11 100644 --- a/docuilib/plugins/uilib.js +++ b/docuilib/plugins/uilib.js @@ -6,13 +6,12 @@ module.exports = ({siteDir}, _options) => { path.resolve(siteDir, 'src'), path.resolve(siteDir, 'node_modules/react-native-web'), path.resolve(siteDir, 'node_modules/react-native-ui-lib'), - // // just for not getting warnings path.resolve(siteDir, 'node_modules/react-native-shimmer-placeholder'), + path.resolve(siteDir, 'node_modules/react-native-reanimated'), path.resolve(siteDir, 'node_modules/react-native-linear-gradient') - // // end just for not getting warnings + // just for not getting warnings // path.resolve(siteDir, 'node_modules/react-native-haptic-feedback'), // path.resolve(siteDir, 'node_modules/react-native-animatable'), - // path.resolve(siteDir, 'node_modules/react-native-reanimated'), // path.resolve(siteDir, 'node_modules/react-native-svg'), // path.resolve(siteDir, 'node_modules/react-native-svg-transformer'), // path.resolve(siteDir, 'node_modules/@react-native-community/netinfo'), diff --git a/docuilib/yarn.lock b/docuilib/yarn.lock index a687ca5e48..34d8ec8b8b 100644 --- a/docuilib/yarn.lock +++ b/docuilib/yarn.lock @@ -957,7 +957,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.0.0-0, @babel/plugin-transform-arrow-functions@npm:^7.25.9": +"@babel/plugin-transform-arrow-functions@npm:^7.0.0, @babel/plugin-transform-arrow-functions@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-arrow-functions@npm:7.25.9" dependencies: @@ -1027,7 +1027,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-class-properties@npm:^7.0.0-0, @babel/plugin-transform-class-properties@npm:^7.25.9": +"@babel/plugin-transform-class-properties@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-class-properties@npm:7.25.9" dependencies: @@ -1051,7 +1051,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.0.0-0, @babel/plugin-transform-classes@npm:^7.25.9": +"@babel/plugin-transform-classes@npm:^7.0.0, @babel/plugin-transform-classes@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-classes@npm:7.25.9" dependencies: @@ -1326,7 +1326,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.0.0-0, @babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.9": +"@babel/plugin-transform-nullish-coalescing-operator@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-nullish-coalescing-operator@npm:7.25.9" dependencies: @@ -1384,7 +1384,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-optional-chaining@npm:^7.0.0-0, @babel/plugin-transform-optional-chaining@npm:^7.25.9": +"@babel/plugin-transform-optional-chaining@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-optional-chaining@npm:7.25.9" dependencies: @@ -1592,7 +1592,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-shorthand-properties@npm:^7.0.0, @babel/plugin-transform-shorthand-properties@npm:^7.0.0-0, @babel/plugin-transform-shorthand-properties@npm:^7.25.9": +"@babel/plugin-transform-shorthand-properties@npm:^7.0.0, @babel/plugin-transform-shorthand-properties@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-shorthand-properties@npm:7.25.9" dependencies: @@ -1626,7 +1626,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-template-literals@npm:^7.0.0-0, @babel/plugin-transform-template-literals@npm:^7.25.9": +"@babel/plugin-transform-template-literals@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-template-literals@npm:7.25.9" dependencies: @@ -1701,7 +1701,7 @@ __metadata: languageName: node linkType: hard -"@babel/plugin-transform-unicode-regex@npm:^7.0.0, @babel/plugin-transform-unicode-regex@npm:^7.0.0-0, @babel/plugin-transform-unicode-regex@npm:^7.25.9": +"@babel/plugin-transform-unicode-regex@npm:^7.0.0, @babel/plugin-transform-unicode-regex@npm:^7.25.9": version: 7.25.9 resolution: "@babel/plugin-transform-unicode-regex@npm:7.25.9" dependencies: @@ -1833,7 +1833,7 @@ __metadata: languageName: node linkType: hard -"@babel/preset-typescript@npm:^7.16.7, @babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9": +"@babel/preset-typescript@npm:^7.21.0, @babel/preset-typescript@npm:^7.25.9": version: 7.26.0 resolution: "@babel/preset-typescript@npm:7.26.0" dependencies: @@ -9173,9 +9173,9 @@ __metadata: languageName: node linkType: hard -"metro-react-native-babel-preset@npm:0.76.9": - version: 0.76.9 - resolution: "metro-react-native-babel-preset@npm:0.76.9" +"metro-react-native-babel-preset@npm:0.77.0": + version: 0.77.0 + resolution: "metro-react-native-babel-preset@npm:0.77.0" dependencies: "@babel/core": ^7.20.0 "@babel/plugin-proposal-async-generator-functions": ^7.0.0 @@ -9218,7 +9218,7 @@ __metadata: react-refresh: ^0.4.0 peerDependencies: "@babel/core": "*" - checksum: 344fbcbcf82a9f8425a38a910716777cf45619d7b61a1a935a903f751e3a335ff8a54f80ba9fd9a16b96ac74e68f77760cb09d2c40ec6faf113308c91b863a9e + checksum: 09fb64735d4517f62cb0cbd386bdfa64d0de5a4f8c85b54c36b5799b242e897295d58c9d18e124033233841d8fcd33a109dda3dd9f1e5554e516f689eef14a0d languageName: node linkType: hard @@ -11567,16 +11567,6 @@ __metadata: languageName: node linkType: hard -"react-native-is-edge-to-edge@npm:1.1.7": - version: 1.1.7 - resolution: "react-native-is-edge-to-edge@npm:1.1.7" - peerDependencies: - react: "*" - react-native: "*" - checksum: 4cdf2b2fb5b131f2015c26d2cb7688b4a0c5f3c8474b1bf0ddfa9eabb0263df440c87262ae8f812a6ecab0d5310df0373bddad4b51f53dabb2ffee01e9ef0f44 - languageName: node - linkType: hard - "react-native-linear-gradient@npm:2.6.2": version: 2.6.2 resolution: "react-native-linear-gradient@npm:2.6.2" @@ -11587,30 +11577,6 @@ __metadata: languageName: node linkType: hard -"react-native-reanimated@npm:3.17.3": - version: 3.17.3 - resolution: "react-native-reanimated@npm:3.17.3" - dependencies: - "@babel/plugin-transform-arrow-functions": ^7.0.0-0 - "@babel/plugin-transform-class-properties": ^7.0.0-0 - "@babel/plugin-transform-classes": ^7.0.0-0 - "@babel/plugin-transform-nullish-coalescing-operator": ^7.0.0-0 - "@babel/plugin-transform-optional-chaining": ^7.0.0-0 - "@babel/plugin-transform-shorthand-properties": ^7.0.0-0 - "@babel/plugin-transform-template-literals": ^7.0.0-0 - "@babel/plugin-transform-unicode-regex": ^7.0.0-0 - "@babel/preset-typescript": ^7.16.7 - convert-source-map: ^2.0.0 - invariant: ^2.2.4 - react-native-is-edge-to-edge: 1.1.7 - peerDependencies: - "@babel/core": ^7.0.0-0 - react: "*" - react-native: "*" - checksum: 928c652e365ae9dca7bd6c895cf163294153ae64f73b63637fad0787e8c66266bb63faf5e7aa7bfc29f057eb176eab12d60029f6165a045f25f19165e693b98e - languageName: node - linkType: hard - "react-native-redash@npm:^12.0.3": version: 12.6.1 resolution: "react-native-redash@npm:12.6.1" @@ -13524,14 +13490,13 @@ __metadata: clsx: ^1.1.1 docusaurus-plugin-sass: ^0.2.1 file-loader: ^6.2.0 - metro-react-native-babel-preset: 0.76.9 + metro-react-native-babel-preset: 0.77.0 prettier: 2.8.8 prism-react-renderer: ^2.4.1 react: ^18.2.0 react-dom: ^18.2.0 react-html-parser: ^2.0.2 react-native-linear-gradient: 2.6.2 - react-native-reanimated: 3.17.3 react-native-shimmer-placeholder: ^2.0.9 react-native-ui-lib: snapshot react-native-web: ^0.19.12 diff --git a/expoDemo/package.json b/expoDemo/package.json index 25e9b20263..054ab56998 100644 --- a/expoDemo/package.json +++ b/expoDemo/package.json @@ -18,7 +18,7 @@ "metro-config": "^0.75.1", "react": "18.2.0", "react-dom": "18.2.0", - "react-native": "0.76.9", + "react-native": "0.77.2", "react-native-gesture-handler": "2.22.1", "react-native-haptic-feedback": "^1.14.0", "react-native-navigation": "8.0.0", diff --git a/index.js b/index.js index 423e85d9c1..2d7d0cf3e6 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +import 'setimmediate'; require('./demo/src/index'); require('./demo/src/demoApp'); // this is separated from demo/src/index by purpose diff --git a/ios/Podfile b/ios/Podfile index 38417c7001..84bf4d4117 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,4 +1,3 @@ -ENV['RCT_NEW_ARCH_ENABLED'] = '0' # Resolve react_native_pods.rb with node to allow for hoisting require Pod::Executable.execute_command('node', ['-p', 'require.resolve( @@ -24,12 +23,6 @@ target 'rnuilib' do # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." ) - - target 'rnuilibTests' do - inherit! :complete - # Pods for testing - # use_flipper!() - end post_install do |installer| # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202 diff --git a/ios/rnuilib.xcodeproj/project.pbxproj b/ios/rnuilib.xcodeproj/project.pbxproj index 533e775e4a..87336a18b1 100644 --- a/ios/rnuilib.xcodeproj/project.pbxproj +++ b/ios/rnuilib.xcodeproj/project.pbxproj @@ -7,19 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 00E356F31AD99517003FC87E /* rnuilibTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* rnuilibTests.m */; }; - 10A864C1285B5CB00011FF03 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 10A864C0285B5CB00011FF03 /* AppDelegate.mm */; }; + 10C29C812DCE637B0050BB15 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 10C29C802DCE637B0050BB15 /* AppDelegate.mm */; }; + 10C29C832DCE7AE00050BB15 /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 10C29C822DCE7AE00050BB15 /* AppDelegate.mm */; }; + 10C29C852DCE7AED0050BB15 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 10C29C842DCE7AED0050BB15 /* main.m */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; 2D02E4BD1E0B4A84006451C7 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 2DCD954D1E0B4F2C00145EB5 /* rnuilibTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* rnuilibTests.m */; }; - 56EBC4A1F72808C5B51F7BBF /* libPods-rnuilib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6C5768CF5EB4CEC5AF24695D /* libPods-rnuilib.a */; }; 8E52CBDF2887DD21009D5EC5 /* DesignTokens.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */; }; 8E8B0D662744D9CD0026B520 /* void.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8E8B0D652744D9CD0026B520 /* void.swift */; }; 8EA1FC8C2519E7F7008B4B36 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */; }; BD943D6D9239B59015528C14 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */; }; - C24F706C923507D9D0AFAF26 /* libPods-rnuilib-rnuilibTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FB858F3A7230EAA142D23DA1 /* libPods-rnuilib-rnuilibTests.a */; }; + C2BFF53A3D9C89E8C38C119D /* libPods-rnuilib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B1BEF55D1269FAD80AF15FA /* libPods-rnuilib.a */; }; C41C90B146B08809BC045295 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ @@ -43,29 +40,25 @@ /* Begin PBXFileReference section */ 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; 00E356EE1AD99517003FC87E /* rnuilibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = rnuilibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 00E356F21AD99517003FC87E /* rnuilibTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = rnuilibTests.m; sourceTree = ""; }; - 10A864C0285B5CB00011FF03 /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = rnuilib/AppDelegate.mm; sourceTree = ""; }; + 10C29C7F2DCE637B0050BB15 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = rnuilib/AppDelegate.h; sourceTree = ""; }; + 10C29C802DCE637B0050BB15 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = rnuilib/AppDelegate.mm; sourceTree = ""; }; + 10C29C822DCE7AE00050BB15 /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = rnuilib/AppDelegate.mm; sourceTree = ""; }; + 10C29C842DCE7AED0050BB15 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = main.m; path = rnuilib/main.m; sourceTree = ""; }; 13B07F961A680F5B00A75B9A /* rnuilib.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = rnuilib.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = rnuilib/AppDelegate.h; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = rnuilib/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = rnuilib/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = rnuilib/main.m; sourceTree = ""; }; 2D02E47B1E0B4A5D006451C7 /* rnuilib-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "rnuilib-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 2D02E4901E0B4A5D006451C7 /* rnuilib-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "rnuilib-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; - 411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 56523CB09C6A79FEBA0C210A /* Pods-rnuilib-rnuilibTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib-rnuilibTests.release.xcconfig"; path = "Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests.release.xcconfig"; sourceTree = ""; }; - 65B766BC0A8D1F830F3D2004 /* Pods-rnuilib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.debug.xcconfig"; sourceTree = ""; }; - 66AD894C4A02A884861A27E2 /* Pods-rnuilib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.release.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.release.xcconfig"; sourceTree = ""; }; - 6C5768CF5EB4CEC5AF24695D /* libPods-rnuilib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib.a"; sourceTree = BUILT_PRODUCTS_DIR; }; - 86A4AD8C011363501515A0EC /* Pods-rnuilib-rnuilibTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib-rnuilibTests.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests.debug.xcconfig"; sourceTree = ""; }; + 3092D044D40F28F133D81A80 /* Pods-rnuilib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.release.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.release.xcconfig"; sourceTree = ""; }; + 3B1BEF55D1269FAD80AF15FA /* libPods-rnuilib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 411699F1CD4A37F8779A4620 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = ""; }; 8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = DesignTokens.xcassets; sourceTree = ""; }; 8E8B0D652744D9CD0026B520 /* void.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = void.swift; sourceTree = ""; }; 8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = rnuilib/LaunchScreen.storyboard; sourceTree = ""; }; - DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 961D3F437C09AAFC776D80CB /* Pods-rnuilib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-rnuilib.debug.xcconfig"; path = "Target Support Files/Pods-rnuilib/Pods-rnuilib.debug.xcconfig"; sourceTree = ""; }; + DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = rnuilib/PrivacyInfo.xcprivacy; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; ED2971642150620600B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.0.sdk/System/Library/Frameworks/JavaScriptCore.framework; sourceTree = DEVELOPER_DIR; }; - FB858F3A7230EAA142D23DA1 /* libPods-rnuilib-rnuilibTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-rnuilib-rnuilibTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -73,7 +66,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C24F706C923507D9D0AFAF26 /* libPods-rnuilib-rnuilibTests.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -81,7 +73,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 56EBC4A1F72808C5B51F7BBF /* libPods-rnuilib.a in Frameworks */, + C2BFF53A3D9C89E8C38C119D /* libPods-rnuilib.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -102,33 +94,17 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 00E356EF1AD99517003FC87E /* rnuilibTests */ = { - isa = PBXGroup; - children = ( - 00E356F21AD99517003FC87E /* rnuilibTests.m */, - 00E356F01AD99517003FC87E /* Supporting Files */, - ); - path = rnuilibTests; - sourceTree = ""; - }; - 00E356F01AD99517003FC87E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 00E356F11AD99517003FC87E /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 13B07FAE1A68108700A75B9A /* rnuilib */ = { isa = PBXGroup; children = ( + 10C29C7F2DCE637B0050BB15 /* AppDelegate.h */, + 10C29C822DCE7AE00050BB15 /* AppDelegate.mm */, + 10C29C842DCE7AED0050BB15 /* main.m */, + 10C29C802DCE637B0050BB15 /* AppDelegate.mm */, 8E52CBDE2887DD21009D5EC5 /* DesignTokens.xcassets */, - 10A864C0285B5CB00011FF03 /* AppDelegate.mm */, 008F07F21AC5B25A0029DE68 /* main.jsbundle */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB71A68108700A75B9A /* main.m */, 8EA1FC8B2519E7F7008B4B36 /* LaunchScreen.storyboard */, 8E8B0D652744D9CD0026B520 /* void.swift */, DED5A85D4BF49DFA47437893 /* PrivacyInfo.xcprivacy */, @@ -141,8 +117,7 @@ children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, ED2971642150620600B7C4FE /* JavaScriptCore.framework */, - 6C5768CF5EB4CEC5AF24695D /* libPods-rnuilib.a */, - FB858F3A7230EAA142D23DA1 /* libPods-rnuilib-rnuilibTests.a */, + 3B1BEF55D1269FAD80AF15FA /* libPods-rnuilib.a */, ); name = Frameworks; sourceTree = ""; @@ -159,7 +134,6 @@ children = ( 13B07FAE1A68108700A75B9A /* rnuilib */, 832341AE1AAA6A7D00B99B32 /* Libraries */, - 00E356EF1AD99517003FC87E /* rnuilibTests */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, D99C980AB24A05601E0007F9 /* Pods */, @@ -184,10 +158,8 @@ D99C980AB24A05601E0007F9 /* Pods */ = { isa = PBXGroup; children = ( - 65B766BC0A8D1F830F3D2004 /* Pods-rnuilib.debug.xcconfig */, - 66AD894C4A02A884861A27E2 /* Pods-rnuilib.release.xcconfig */, - 86A4AD8C011363501515A0EC /* Pods-rnuilib-rnuilibTests.debug.xcconfig */, - 56523CB09C6A79FEBA0C210A /* Pods-rnuilib-rnuilibTests.release.xcconfig */, + 961D3F437C09AAFC776D80CB /* Pods-rnuilib.debug.xcconfig */, + 3092D044D40F28F133D81A80 /* Pods-rnuilib.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -199,12 +171,9 @@ isa = PBXNativeTarget; buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "rnuilibTests" */; buildPhases = ( - 72FA426D5675971732169A33 /* [CP] Check Pods Manifest.lock */, 00E356EA1AD99517003FC87E /* Sources */, 00E356EB1AD99517003FC87E /* Frameworks */, 00E356EC1AD99517003FC87E /* Resources */, - 4A2DFE2E4F276607CC9422BA /* [CP] Embed Pods Frameworks */, - 05F5C3E9528158446F3788A5 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -220,14 +189,14 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "rnuilib" */; buildPhases = ( - 5C139D0477DFF8903C0C457A /* [CP] Check Pods Manifest.lock */, + 1948831A105FB85C7FF19246 /* [CP] Check Pods Manifest.lock */, FD10A7F022414F080027D42C /* Start Packager */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - A077BED00DEE8BB3D2E7978D /* [CP] Embed Pods Frameworks */, - 74E5355D055C34254F806DF4 /* [CP] Copy Pods Resources */, + 2304E9EEAAF1BDEF6BC7EBEB /* [CP] Embed Pods Frameworks */, + 668BE1E2EE321ADFA49231D6 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -288,7 +257,7 @@ TestTargetID = 13B07F861A680F5B00A75B9A; }; 13B07F861A680F5B00A75B9A = { - LastSwiftMigration = 1300; + LastSwiftMigration = 1620; }; 2D02E47A1E0B4A5D006451C7 = { CreatedOnToolsVersion = 8.2.1; @@ -376,55 +345,35 @@ shellPath = /bin/sh; shellScript = "set -e\n\nWITH_ENVIRONMENT=\"../node_modules/react-native/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 05F5C3E9528158446F3788A5 /* [CP] Copy Pods Resources */ = { + 1948831A105FB85C7FF19246 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/RNSVG/RNSVGFilters.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle", - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNSVGFilters.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( ); - name = "Bundle React Native Code And Images"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-rnuilib-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.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; }; - 4A2DFE2E4F276607CC9422BA /* [CP] Embed Pods Frameworks */ = { + 2304E9EEAAF1BDEF6BC7EBEB /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh", "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", ); name = "[CP] Embed Pods Frameworks"; @@ -433,54 +382,24 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib-rnuilibTests/Pods-rnuilib-rnuilibTests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 5C139D0477DFF8903C0C457A /* [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-rnuilib-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"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 72FA426D5675971732169A33 /* [CP] Check Pods Manifest.lock */ = { + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputFileListPaths = ( - ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", - ); - name = "[CP] Check Pods Manifest.lock"; - outputFileListPaths = ( ); + name = "Bundle React Native Code And Images"; outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-rnuilib-rnuilibTests-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; + shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; }; - 74E5355D055C34254F806DF4 /* [CP] Copy Pods Resources */ = { + 668BE1E2EE321ADFA49231D6 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -508,24 +427,6 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-resources.sh\"\n"; showEnvVarsInLog = 0; }; - A077BED00DEE8BB3D2E7978D /* [CP] Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh", - "${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes", - ); - name = "[CP] Embed Pods Frameworks"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework", - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-rnuilib/Pods-rnuilib-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; FD10A7F022414F080027D42C /* Start Packager */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -571,7 +472,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 00E356F31AD99517003FC87E /* rnuilibTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -579,8 +479,9 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 13B07FC11A68108700A75B9A /* main.m in Sources */, - 10A864C1285B5CB00011FF03 /* AppDelegate.mm in Sources */, + 10C29C812DCE637B0050BB15 /* AppDelegate.mm in Sources */, + 10C29C832DCE7AE00050BB15 /* AppDelegate.mm in Sources */, + 10C29C852DCE7AED0050BB15 /* main.m in Sources */, 8E8B0D662744D9CD0026B520 /* void.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -589,7 +490,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2D02E4BF1E0B4AB3006451C7 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -597,7 +497,6 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 2DCD954D1E0B4F2C00145EB5 /* rnuilibTests.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -619,7 +518,6 @@ /* Begin XCBuildConfiguration section */ 00E356F61AD99517003FC87E /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 86A4AD8C011363501515A0EC /* Pods-rnuilib-rnuilibTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -643,7 +541,6 @@ }; 00E356F71AD99517003FC87E /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 56523CB09C6A79FEBA0C210A /* Pods-rnuilib-rnuilibTests.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; BUNDLE_LOADER = "$(TEST_HOST)"; @@ -665,7 +562,7 @@ }; 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 65B766BC0A8D1F830F3D2004 /* Pods-rnuilib.debug.xcconfig */; + baseConfigurationReference = 961D3F437C09AAFC776D80CB /* Pods-rnuilib.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -687,6 +584,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.reactjs.native.example.wix.rnuilib; PRODUCT_NAME = rnuilib; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -696,7 +594,7 @@ }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 66AD894C4A02A884861A27E2 /* Pods-rnuilib.release.xcconfig */; + baseConfigurationReference = 3092D044D40F28F133D81A80 /* Pods-rnuilib.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; @@ -713,6 +611,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)"; "PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.reactjs.native.example.wix.rnuilib; PRODUCT_NAME = rnuilib; + SWIFT_OBJC_BRIDGING_HEADER = ""; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; diff --git a/ios/rnuilib/AppDelegate.h b/ios/rnuilib/AppDelegate.h index 5d2808256c..ea81c6c3a8 100644 --- a/ios/rnuilib/AppDelegate.h +++ b/ios/rnuilib/AppDelegate.h @@ -1,6 +1,6 @@ -#import #import +#import "RNNAppDelegate.h" -@interface AppDelegate : RCTAppDelegate +@interface AppDelegate : RNNAppDelegate @end diff --git a/ios/rnuilib/AppDelegate.mm b/ios/rnuilib/AppDelegate.mm index 65e11a792d..605f13afd0 100644 --- a/ios/rnuilib/AppDelegate.mm +++ b/ios/rnuilib/AppDelegate.mm @@ -2,30 +2,37 @@ #import "AppDelegate.h" #import #import +#import @implementation AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; - [ReactNativeNavigation bootstrapWithBridge:bridge]; - -// self.moduleName = @"rnuilib"; + [super application:application didFinishLaunchingWithOptions:launchOptions]; + self.dependencyProvider = [RCTAppDependencyProvider new]; +// RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; +// [ReactNativeNavigation bootstrapWithBridge:bridge]; +// AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; +// RCTReactNativeFactory* factory = [delegate reactNativeFactory]; +// RCTHost *reactHost = factory.rootViewFactory.reactHost; +// AppDelegate *delegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; +// RCTHost *reactHost = (RCTHost*)[delegate.rootViewFactory valueForKey:@"_reactHost"]; +// [ReactNativeNavigation bootstrapWithHost:reactHost]; +// self.automaticallyLoadReactNativeWindow = NO; + self.moduleName = @"rnuilib"; // 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]; - return YES; + + // return [super application:application didFinishLaunchingWithOptions:launchOptions]; + return YES; } -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge { return [self bundleURL]; } -- (NSURL *)bundleURL -{ +- (NSURL *)bundleURL { #if DEBUG return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; #else @@ -33,8 +40,8 @@ - (NSURL *)bundleURL #endif } -- (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge { - return [ReactNativeNavigation extraModulesForBridge:bridge]; -} +// - (NSArray> *)extraModulesForBridge:(RCTBridge *)bridge { +// return [ReactNativeNavigation extraModulesForBridge:bridge]; +// } @end diff --git a/ios/rnuilib/AppDelegate.swift b/ios/rnuilib/AppDelegate.swift new file mode 100644 index 0000000000..eee91b256d --- /dev/null +++ b/ios/rnuilib/AppDelegate.swift @@ -0,0 +1,30 @@ +import UIKit +import React +import React_RCTAppDelegate +import ReactAppDependencyProvider + +@main +class AppDelegate: RCTAppDelegate { + override func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + self.moduleName = "rnuilib" + self.dependencyProvider = RCTAppDependencyProvider() + + // 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) + } + + override func sourceURL(for bridge: RCTBridge) -> URL? { + self.bundleURL() + } + + override func bundleURL() -> URL? { +#if DEBUG + RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index") +#else + Bundle.main.url(forResource: "main", withExtension: "jsbundle") +#endif + } +} diff --git a/ios/rnuilib/main.m b/ios/rnuilib/main.m index d645c7246c..a9549d36bc 100644 --- a/ios/rnuilib/main.m +++ b/ios/rnuilib/main.m @@ -7,4 +7,4 @@ int main(int argc, char *argv[]) @autoreleasepool { return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); } -} +} \ No newline at end of file diff --git a/ios/rnuilibTests/Info.plist b/ios/rnuilibTests/Info.plist deleted file mode 100644 index ba72822e87..0000000000 --- a/ios/rnuilibTests/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/ios/rnuilibTests/rnuilibTests.m b/ios/rnuilibTests/rnuilibTests.m deleted file mode 100644 index 610389222a..0000000000 --- a/ios/rnuilibTests/rnuilibTests.m +++ /dev/null @@ -1,65 +0,0 @@ -#import -#import - -#import -#import - -#define TIMEOUT_SECONDS 600 -#define TEXT_TO_LOOK_FOR @"Welcome to React" - -@interface rnuilibTests : XCTestCase - -@end - -@implementation rnuilibTests - -- (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/lib/.npmignore b/lib/.npmignore index b839865a69..edbbb01dff 100644 --- a/lib/.npmignore +++ b/lib/.npmignore @@ -5,3 +5,6 @@ *.d.js # include the .d.ts files !*.d.ts +# ignore the .js files in the specs folder and include the .ts files and include the .ts files +specs/**/*.js +!specs/**/*.ts diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java b/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java index 0273cda659..7340b99a9a 100644 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java +++ b/lib/android/src/main/java/com/wix/reactnativeuilib/UiLibPackageList.java @@ -6,7 +6,6 @@ import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage; import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage; import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage; -import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage; import java.util.Arrays; import java.util.List; @@ -23,7 +22,6 @@ public List getPackageList() { return Arrays.asList( new DynamicFontPackage(), new HighlighterViewPackage(), - new TextInputDelKeyHandlerPackage(), new KeyboardInputPackage(application) ); } diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java b/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java index 9694cc5cbb..b283d087a1 100644 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java +++ b/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/HighlighterViewManager.java @@ -8,12 +8,15 @@ import android.view.View; import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.bridge.UIManager; import com.facebook.react.uimanager.IllegalViewOperationException; import com.facebook.react.uimanager.NativeViewHierarchyManager; import com.facebook.react.uimanager.SimpleViewManager; import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.UIManagerHelper; import com.facebook.react.uimanager.UIManagerModule; import com.facebook.react.uimanager.annotations.ReactProp; +import com.facebook.react.uimanager.common.UIManagerType; import javax.annotation.Nullable; @@ -75,33 +78,38 @@ public void setInnerPadding(HighlighterView view, @Nullable Integer innerPadding @ReactProp(name = "highlightViewTag") public void setHighlightViewTag(final HighlighterView view, Integer highlightViewTag) { - try { - NativeViewHierarchyManager nativeViewHierarchyManager = ReactHacks.getNativeViewHierarchyManager(context.getNativeModule(UIManagerModule.class)); - if (nativeViewHierarchyManager == null) { - return; - } - - final View resolvedView = nativeViewHierarchyManager.resolveView(highlightViewTag); - if (resolvedView != null) { - if (resolvedView.getWidth() == 0 || resolvedView.getHeight() == 0) { - resolvedView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { - @Override - public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { - float width = right - left; - float height = bottom - top; - if (width > 0 && height > 0) { - setViewBasedHighlightFrame(view, resolvedView); - resolvedView.removeOnLayoutChangeListener(this); - } + if (highlightViewTag != null) { + try { + UIManager uiManager = UIManagerHelper.getUIManagerForReactTag(context, highlightViewTag); + if (uiManager != null) { + final View resolvedView = uiManager.resolveView(highlightViewTag); + if (resolvedView != null) { + if (resolvedView.getWidth() == 0 || resolvedView.getHeight() == 0) { + resolvedView.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { + @Override + public void onLayoutChange(View v, int left, int top, int right, int bottom, int oldLeft, int oldTop, int oldRight, int oldBottom) { + float width = right - left; + float height = bottom - top; + if (width > 0 && height > 0) { + setViewBasedHighlightFrame(view, resolvedView); + resolvedView.removeOnLayoutChangeListener(this); + } + } + }); + } else { + setViewBasedHighlightFrame(view, resolvedView); } - }); + } else { + Log.e("HighlighterView", "was not able to resolve highlightViewTag: " + highlightViewTag.toString()); + } } else { - setViewBasedHighlightFrame(view, resolvedView); + Log.e("HighlighterView", "was not able to resolve get uiManager for highlightViewTag: " + highlightViewTag.toString()); } + } catch (IllegalViewOperationException e) { + Log.e("HighlighterView", "invalid highlightViewTag: " + highlightViewTag.toString() + " " + e.toString()); } - } - catch (IllegalViewOperationException e) { - Log.e("HighlighterView", "invalid highlightViewTag: " + highlightViewTag.toString() + " " + e.toString()); + } else { + Log.e("HighlighterView", "highlightViewTag is null"); } } diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java b/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java deleted file mode 100644 index 7f282933b0..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReactHacks.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.wix.reactnativeuilib.highlighterview; - - -import androidx.annotation.Nullable; - -import com.facebook.react.uimanager.NativeViewHierarchyManager; -import com.facebook.react.uimanager.UIBlock; -import com.facebook.react.uimanager.UIManagerModule; -import com.facebook.react.uimanager.UIViewOperationQueue; - -/** - * ¯\_(ツ)_/¯ - */ -public class ReactHacks { - - /** - * {@link NativeViewHierarchyManager} is used to resolve a native view by RN tag ({@link NativeViewHierarchyManager#resolveView}). The only way of obtaining it is by - * posting {@link UIBlock} which can take a noticeable amount of time to execute. - */ - @Nullable - public static NativeViewHierarchyManager getNativeViewHierarchyManager(UIManagerModule uiManager) { - try { - UIViewOperationQueue mOperationsQueue = (UIViewOperationQueue) ReflectionUtils.getDeclaredField(uiManager.getUIImplementation(), "mOperationsQueue"); - return (NativeViewHierarchyManager) ReflectionUtils.getDeclaredField(mOperationsQueue, "mNativeViewHierarchyManager"); - } catch (Exception e) { - e.printStackTrace(); - return null; - } - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java b/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java deleted file mode 100644 index c0fa8bb0b0..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/highlighterview/ReflectionUtils.java +++ /dev/null @@ -1,34 +0,0 @@ -package com.wix.reactnativeuilib.highlighterview; - - -import androidx.annotation.Nullable; - -import java.lang.reflect.Field; - -class ReflectionUtils { - - @Nullable - static Object getDeclaredField(Object obj, String fieldName) { - try { - Field f = getField(obj.getClass(), fieldName); - if (f == null) { - return null; - } - f.setAccessible(true); - return f.get(obj); - } catch (Exception e) { - e.printStackTrace(); - } - return null; - } - - private static Field getField(Class clazz, String name) { - try { - return clazz.getDeclaredField(name); - } catch (NoSuchFieldException nsfe) { - return getField(clazz.getSuperclass(), name); - } catch (Exception e) { - return null; - } - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java b/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java index 95c5e8ea47..eed6422a73 100644 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java +++ b/lib/android/src/main/java/com/wix/reactnativeuilib/keyboardinput/utils/RuntimeUtils.java @@ -9,7 +9,7 @@ public class RuntimeUtils { private static final Runnable sUIUpdateClosure = new Runnable() { @Override public void run() { - ReactContextHolder.getContext().getNativeModule(UIManagerModule.class).onBatchComplete(); + // ReactContextHolder.getContext().getNativeModule(UIManagerModule.class).onBatchComplete(); } }; diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java b/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java deleted file mode 100644 index 2db0286ba7..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/DefaultKeyListener.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.wix.reactnativeuilib.textinput; - -import android.text.Editable; -import android.text.InputType; -import android.text.method.KeyListener; -import android.view.KeyEvent; -import android.view.View; - -class DefaultKeyListener implements KeyListener { - @Override - public int getInputType() { - return InputType.TYPE_NULL; - } - - @Override - public boolean onKeyDown(View view, Editable text, int keyCode, KeyEvent event) { - return false; - } - - @Override - public boolean onKeyUp(View view, Editable text, int keyCode, KeyEvent event) { - return false; - } - - @Override - public boolean onKeyOther(View view, Editable text, KeyEvent event) { - return false; - } - - @Override - public void clearMetaKeyState(View view, Editable content, int states) { - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java b/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java deleted file mode 100644 index a385a0b58b..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/KeyListenerProxy.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.wix.reactnativeuilib.textinput; - -import android.text.Editable; -import android.text.method.KeyListener; -import android.view.KeyEvent; -import android.view.View; - -import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.modules.core.DeviceEventManagerModule; - -public class KeyListenerProxy implements KeyListener { - - final private ReactApplicationContext mContext; - final private KeyListener mKeyListener; - - KeyListenerProxy(ReactApplicationContext context, KeyListener keyListener) { - mContext = context; - mKeyListener = keyListener == null ? new DefaultKeyListener() : keyListener; - } - - @Override - public int getInputType() { - return mKeyListener.getInputType(); - } - - @Override - public boolean onKeyDown(View view, Editable text, int keyCode, KeyEvent event) { - return mKeyListener.onKeyDown(view, text, keyCode, event); - } - - @Override - public boolean onKeyUp(View view, Editable text, int keyCode, KeyEvent event) { - if (keyCode == KeyEvent.KEYCODE_DEL) { - emitBackspacePressEvent(); - } - return mKeyListener.onKeyUp(view, text, keyCode, event); - } - - @Override - public boolean onKeyOther(View view, Editable text, KeyEvent event) { - return mKeyListener.onKeyOther(view, text, event); - } - - @Override - public void clearMetaKeyState(View view, Editable content, int states) { - mKeyListener.clearMetaKeyState(view, content, states); - } - - private void emitBackspacePressEvent() { - mContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class).emit("onBackspacePress", Arguments.createMap()); - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java b/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java deleted file mode 100644 index e6bf05cef6..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerModule.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.wix.reactnativeuilib.textinput; - -import android.util.Log; -import android.view.View; - -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.bridge.ReactContextBaseJavaModule; -import com.facebook.react.bridge.ReactMethod; -import com.facebook.react.uimanager.IllegalViewOperationException; -import com.facebook.react.uimanager.NativeViewHierarchyManager; -import com.facebook.react.uimanager.UIBlock; -import com.facebook.react.uimanager.UIManagerModule; -import com.facebook.react.views.textinput.ReactEditText; - -public class TextInputDelKeyHandlerModule extends ReactContextBaseJavaModule { - - private final static String REACT_CLASS = "TextInputDelKeyHandler"; - - TextInputDelKeyHandlerModule(ReactApplicationContext reactContext) { - super(reactContext); - } - - @Override - public String getName() { - return REACT_CLASS; - } - - @ReactMethod - public void register(final Integer textInputTag) { - final ReactApplicationContext reactContext = this.getReactApplicationContext(); - final UIManagerModule uiManager = reactContext.getNativeModule(UIManagerModule.class); - - uiManager.addUIBlock(new UIBlock() { - public void execute(NativeViewHierarchyManager viewHierarchyManager) { - Log.d("ReactNativeJS","registering tag = " + textInputTag); - final View view; - try { - view = viewHierarchyManager.resolveView(textInputTag); - } catch (IllegalViewOperationException e) { - Log.d("ReactNativeJS","no view for tag = " + textInputTag); - e.printStackTrace(); - return; - } - final ReactEditText editText = ViewUtils.getEditTextInView(view); - - if (editText != null) { - Log.d("ReactNativeJS","has editText for tag = " + textInputTag); - final KeyListenerProxy keyListenerProxy = new KeyListenerProxy(reactContext, editText.getKeyListener()); - editText.setKeyListener(keyListenerProxy); - } - } - }); - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java b/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java deleted file mode 100644 index e2119d4edc..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/TextInputDelKeyHandlerPackage.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.wix.reactnativeuilib.textinput; - -import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.JavaScriptModule; -import com.facebook.react.bridge.NativeModule; -import com.facebook.react.bridge.ReactApplicationContext; -import com.facebook.react.uimanager.ViewManager; - -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - -public class TextInputDelKeyHandlerPackage implements ReactPackage { - @Override - public List createNativeModules(ReactApplicationContext reactContext) { - return Arrays.asList(new TextInputDelKeyHandlerModule(reactContext)); - } - -// @Override -// public List> createJSModules() { -// return Collections.emptyList(); -// } - - @Override - public List createViewManagers(ReactApplicationContext reactContext) { - return Collections.emptyList(); - } -} diff --git a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java b/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java deleted file mode 100644 index 22500b07f1..0000000000 --- a/lib/android/src/main/java/com/wix/reactnativeuilib/textinput/ViewUtils.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.wix.reactnativeuilib.textinput; - -import android.view.View; -import android.view.ViewGroup; - -import androidx.annotation.Nullable; - -import com.facebook.react.views.textinput.ReactEditText; - -class ViewUtils { - - @Nullable - static ReactEditText getEditTextInView(View view) { - if (view == null) { - return null; - } - - if (view instanceof ReactEditText) { - return (ReactEditText) view; - } - - if (view instanceof ViewGroup) { - final ViewGroup viewGroup = (ViewGroup) view; - - for (int i = 0; i < viewGroup.getChildCount(); i++) { - final View child = viewGroup.getChildAt(i); - final View childView = getEditTextInView(child); - - if (childView != null) { - return (ReactEditText) childView; - } - } - } - return null; - } -} diff --git a/lib/components/HighlighterOverlayView.tsx b/lib/components/HighlighterOverlayView/index.tsx similarity index 58% rename from lib/components/HighlighterOverlayView.tsx rename to lib/components/HighlighterOverlayView/index.tsx index ee3997515a..b656fd9be4 100644 --- a/lib/components/HighlighterOverlayView.tsx +++ b/lib/components/HighlighterOverlayView/index.tsx @@ -1,7 +1,10 @@ import React from 'react'; -import {requireNativeComponent, processColor, Platform, StyleSheet, Modal, ViewStyle} from 'react-native'; +import {processColor, StyleSheet, Modal, ViewStyle} from 'react-native'; +// Import the Codegen specification for New Architecture +import HighlighterViewNativeComponent, { + HighlightViewTagParams as NativeHighlightViewTagParams +} from '../../specs/HighlighterViewNativeComponent'; -const NativeHighlighterView = requireNativeComponent('HighlighterView'); const DefaultOverlayColor = 'rgba(0, 0, 0, 0.5)'; type HighlightFrameType = { @@ -25,7 +28,7 @@ export type HighlighterOverlayViewProps = { onRequestClose?: () => void; highlightFrame?: HighlightFrameType; style?: ViewStyle; - highlightViewTag?: number | null; + highlightViewTag?: number; children?: JSX.Element[] | JSX.Element; highlightViewTagParams?: HighlightViewTagParams; minimumRectSize?: Pick; @@ -34,7 +37,6 @@ export type HighlighterOverlayViewProps = { testID?: string; }; - const HighlighterOverlayView = (props: HighlighterOverlayViewProps) => { const { overlayColor, @@ -52,13 +54,22 @@ const HighlighterOverlayView = (props: HighlighterOverlayViewProps) => { innerPadding } = props; - let overlayColorToUse = overlayColor || DefaultOverlayColor; - let strokeColorToUse = strokeColor; - if (Platform.OS === 'android') { - // @ts-ignore - overlayColorToUse = processColor(overlayColorToUse); - // @ts-ignore - strokeColorToUse = processColor(strokeColorToUse); + // Process colors for New Architecture Codegen component + const overlayColorToUse = processColor(overlayColor || DefaultOverlayColor) as number; + const strokeColorToUse = strokeColor ? (processColor(strokeColor) as number) : undefined; + + // Convert highlightViewTagParams to match native Codegen spec + let nativeHighlightViewTagParams: NativeHighlightViewTagParams | undefined; + if (highlightViewTagParams) { + const padding = typeof highlightViewTagParams.padding === 'number' ? highlightViewTagParams.padding : 0; + nativeHighlightViewTagParams = { + paddingLeft: padding, + paddingTop: padding, + paddingRight: padding, + paddingBottom: padding, + offsetX: highlightViewTagParams.offset?.x || 0, + offsetY: highlightViewTagParams.offset?.y || 0 + }; } return ( @@ -68,8 +79,7 @@ const HighlighterOverlayView = (props: HighlighterOverlayViewProps) => { transparent onRequestClose={() => onRequestClose?.()} > - { strokeColor={strokeColorToUse} strokeWidth={strokeWidth} highlightViewTag={highlightViewTag} - highlightViewTagParams={highlightViewTagParams} + highlightViewTagParams={nativeHighlightViewTagParams} minimumRectSize={minimumRectSize} innerPadding={innerPadding} + testID={props.testID} + accessible={props.accessible} /> {children} diff --git a/lib/components/HighlighterOverlayView.web.tsx b/lib/components/HighlighterOverlayView/index.web.tsx similarity index 97% rename from lib/components/HighlighterOverlayView.web.tsx rename to lib/components/HighlighterOverlayView/index.web.tsx index 9a1087f20c..fbcdffb2a4 100644 --- a/lib/components/HighlighterOverlayView.web.tsx +++ b/lib/components/HighlighterOverlayView/index.web.tsx @@ -22,7 +22,7 @@ export type HighlighterOverlayViewProps = { onRequestClose?: () => void; highlightFrame?: HighlightFrameType; style?: ViewStyle; - highlightViewTag?: number | null; + highlightViewTag?: number; children?: JSX.Element[] | JSX.Element; highlightViewTagParams?: HighlightViewTagParams; minimumRectSize?: Pick; diff --git a/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.tsx b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.tsx new file mode 100644 index 0000000000..0da262b847 --- /dev/null +++ b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.android.tsx @@ -0,0 +1,51 @@ +import React from 'react'; +import {Keyboard, View} from 'react-native'; +import KeyboardRegistry from '../KeyboardRegistry'; +import CustomKeyboardViewBase, {CustomKeyboardViewBaseProps} from './CustomKeyboardViewBase'; + +export default class CustomKeyboardView extends CustomKeyboardViewBase { + static displayName = 'IGNORE'; + + async componentDidUpdate(prevProps: CustomKeyboardViewBaseProps) { + const {component, inputRef, shouldFocus, onKeyboardDismiss} = this.props; + + if (prevProps.component !== component) { + + if (!component) { + if (shouldFocus) { + if (inputRef?.current) { + inputRef.current.focus?.(); + } else { + inputRef?.focus?.(); + } + } + } else { + Keyboard.dismiss(); + } + + onKeyboardDismiss?.(); + } + + super.componentDidUpdate(prevProps); + } + + getStyle = () => { + const {keyboardHeight} = this.props; + return { + height: keyboardHeight + }; + }; + + render() { + const {component, initialProps} = this.props; + const KeyboardComponent = component && KeyboardRegistry.getKeyboard(component); + if (!KeyboardComponent) { + return null; + } + return ( + + + + ); + } +} diff --git a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.ios.tsx b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.ios.tsx similarity index 91% rename from lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.ios.tsx rename to lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.ios.tsx index 7bb0b35d6e..6107599903 100644 --- a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.ios.tsx +++ b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardView.ios.tsx @@ -1,6 +1,6 @@ -import TextInputKeyboardManager from './../TextInputKeyboardManager/TextInputKeyboardManager.ios'; -import KeyboardRegistry from './../KeyboardRegistry'; -import CustomKeyboardViewBase, {CustomKeyboardViewBaseProps} from './../CustomKeyboardViewBase'; +import TextInputKeyboardManager from '../TextInputKeyboardManager/TextInputKeyboardManager.ios'; +import KeyboardRegistry from '../KeyboardRegistry'; +import CustomKeyboardViewBase, {CustomKeyboardViewBaseProps} from './CustomKeyboardViewBase'; export type CustomKeyboardViewProps = CustomKeyboardViewBaseProps & { /** diff --git a/lib/components/Keyboard/KeyboardInput/CustomKeyboardViewBase.tsx b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.tsx similarity index 94% rename from lib/components/Keyboard/KeyboardInput/CustomKeyboardViewBase.tsx rename to lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.tsx index fb26ca5e40..0622ac48e3 100644 --- a/lib/components/Keyboard/KeyboardInput/CustomKeyboardViewBase.tsx +++ b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/CustomKeyboardViewBase.tsx @@ -1,10 +1,13 @@ import React, {Component} from 'react'; -import KeyboardRegistry from './KeyboardRegistry'; import {EventSubscription} from 'react-native'; +import KeyboardRegistry from '../KeyboardRegistry'; export type CustomKeyboardViewBaseProps = { inputRef?: any; initialProps?: any; + keyboardHeight?: number; + onKeyboardDismiss?: () => void; + shouldFocus?: boolean; component?: string; onItemSelected?: (component?: string, args?: any) => void; onRequestShowKeyboard?: (keyboardId: string) => void; diff --git a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/index.tsx b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/index.tsx similarity index 100% rename from lib/components/Keyboard/KeyboardInput/CustomKeyboardView/index.tsx rename to lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/index.tsx diff --git a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/index.web.tsx b/lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/index.web.tsx similarity index 100% rename from lib/components/Keyboard/KeyboardInput/CustomKeyboardView/index.web.tsx rename to lib/components/Keyboard/KeyboardAccessoryView/CustomKeyboardView/index.web.tsx diff --git a/lib/components/Keyboard/KeyboardInput/utils/__tests__/EventEmitterManager.spec.js b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/__tests__/EventEmitterManager.spec.js similarity index 98% rename from lib/components/Keyboard/KeyboardInput/utils/__tests__/EventEmitterManager.spec.js rename to lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/__tests__/EventEmitterManager.spec.js index d730a36c35..a9497bada4 100644 --- a/lib/components/Keyboard/KeyboardInput/utils/__tests__/EventEmitterManager.spec.js +++ b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/__tests__/EventEmitterManager.spec.js @@ -1,4 +1,4 @@ -const EventEmitterManager = require('../EventEmitterManager').default; +const EventEmitterManager = require('../index').default; let EventEmitter; diff --git a/lib/components/Keyboard/KeyboardInput/utils/EventEmitterManager.ts b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.ts similarity index 100% rename from lib/components/Keyboard/KeyboardInput/utils/EventEmitterManager.ts rename to lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/EventEmitterManager/index.ts diff --git a/lib/components/Keyboard/KeyboardInput/__tests__/KeyboardRegistry.spec.js b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/__tests__/KeyboardRegistry.spec.js similarity index 99% rename from lib/components/Keyboard/KeyboardInput/__tests__/KeyboardRegistry.spec.js rename to lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/__tests__/KeyboardRegistry.spec.js index 79283e5850..bc3daec1b0 100644 --- a/lib/components/Keyboard/KeyboardInput/__tests__/KeyboardRegistry.spec.js +++ b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/__tests__/KeyboardRegistry.spec.js @@ -1,6 +1,6 @@ import {AppRegistry, View} from 'react-native'; import React from 'react'; -import KeyboardRegistry from '../KeyboardRegistry'; +import KeyboardRegistry from '../index'; describe('KeyboardRegistry - components', () => { const mockComponent = 'test_component'; diff --git a/lib/components/Keyboard/KeyboardInput/KeyboardRegistry.ts b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.ts similarity index 98% rename from lib/components/Keyboard/KeyboardInput/KeyboardRegistry.ts rename to lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.ts index a281f615d7..4de878ac1b 100644 --- a/lib/components/Keyboard/KeyboardInput/KeyboardRegistry.ts +++ b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/index.ts @@ -1,6 +1,6 @@ -import {AppRegistry} from 'react-native'; import _ from 'lodash'; -import EventEmitterManager from './utils/EventEmitterManager'; +import {AppRegistry} from 'react-native'; +import EventEmitterManager from './EventEmitterManager'; /* * Tech debt: how to deal with multiple registries in the app? diff --git a/lib/components/Keyboard/KeyboardInput/keyboardRegistry.api.json b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/keyboardRegistry.api.json similarity index 78% rename from lib/components/Keyboard/KeyboardInput/keyboardRegistry.api.json rename to lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/keyboardRegistry.api.json index c35b74c43c..dbc210527c 100644 --- a/lib/components/Keyboard/KeyboardInput/keyboardRegistry.api.json +++ b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardRegistry/keyboardRegistry.api.json @@ -1,49 +1,49 @@ { "name": "KeyboardRegistry", "category": "infra", - "description": "used for registering keyboards and performing certain actions on the keyboards.", + "description": "used for registering keyboards and performing certain actions on the keyboards", "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/keyboardAccessory/demoKeyboards.js", "props": [ { "name": "registerKeyboard", "type": "static function", - "description": "Register a new keyboard.\ncomponentID (string) - the ID of the keyboard.\ngenerator (function) - a function for the creation of the keyboard.\nparams (object) - to be returned when using other methods (i.e. getKeyboards and getAllKeyboards)." + "description": "Register a new keyboard.\ncomponentID (string) - the ID of the keyboard.\ngenerator (function) - a function for the creation of the keyboard.\nparams (object) - to be returned when using other methods (i.e. getKeyboards and getAllKeyboards)" }, { "name": "getKeyboard", "type": "static function", - "description": "Get a specific keyboard\ncomponentID (string) - the ID of the keyboard." + "description": "Get a specific keyboard\ncomponentID (string) - the ID of the keyboard" }, { "name": "getKeyboards", "type": "static function", - "description": "Get keyboards by IDs\ncomponentIDs (string[]) - the ID of the keyboard." + "description": "Get keyboards by IDs\ncomponentIDs (string[]) - the ID of the keyboard" }, {"name": "getAllKeyboards", "type": "static function", "description": "Get all keyboards"}, { "name": "addListener", "type": "static function", - "description": "Add a listener for a callback.\nglobalID (string) - ID that includes the componentID and the event name\n (i.e. if componentID='kb1' globalID='kb1.onItemSelected')\ncallback (function) - the callback to be called when the said event happens" + "description": "Add a listener for a callback.\nglobalID (string) - ID that includes the componentID and the event name\n(i.e. if componentID='kb1' globalID='kb1.onItemSelected')\ncallback (function) - the callback to be called when the said event happens" }, { "name": "notifyListeners", "type": "static function", - "description": "Notify that an event has occurred.\nglobalID (string) - ID that includes the componentID and the event name\n (i.e. if componentID='kb1' globalID='kb1.onItemSelected')\nargs (object) - data to be sent to the listener." + "description": "Notify that an event has occurred.\nglobalID (string) - ID that includes the componentID and the event name\n(i.e. if componentID='kb1' globalID='kb1.onItemSelected')\nargs (object) - data to be sent to the listener" }, { "name": "removeListeners", "type": "static function", - "description": "Remove a listener for a callback.\nglobalID (string) - ID that includes the componentID and the event name\n (i.e. if componentID='kb1' globalID='kb1.onItemSelected')" + "description": "Remove a listener for a callback.\nglobalID (string) - ID that includes the componentID and the event name\n(i.e. if componentID='kb1' globalID='kb1.onItemSelected')" }, { "name": "onItemSelected", "type": "static function", - "description": "Default event to be used for when an item on the keyboard has been pressed.\ncomponentID (string) - the ID of the keyboard.\nargs (object) - data to be sent to the listener." + "description": "Default event to be used for when an item on the keyboard has been pressed.\ncomponentID (string) - the ID of the keyboard.\nargs (object) - data to be sent to the listener" }, { "name": "requestShowKeyboard", "type": "static function", - "description": "Request to show the keyboard\ncomponentID (string) - the ID of the keyboard." + "description": "Request to show the keyboard\ncomponentID (string) - the ID of the keyboard" } ], "snippet": ["KeyboardRegistry.registerKeyboard('keyboardName$1', () => KeyboardComponent$2)"] diff --git a/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.ts b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.ts new file mode 100644 index 0000000000..ddb0cd980c --- /dev/null +++ b/lib/components/Keyboard/KeyboardAccessoryView/KeyboardUtils/index.ts @@ -0,0 +1,104 @@ +import {useCallback, useEffect, useState} from 'react'; +import {Keyboard, KeyboardEvent, Platform} from 'react-native'; +import TextInputKeyboardManager from '../TextInputKeyboardManager'; + +const IS_IOS = Platform.OS === 'ios'; +const DEFAULT_KEYBOARD_HEIGHT = IS_IOS ? 216 : 312; // TODO: verify this value for iOS + +export default class KeyboardUtils { + static displayName = 'KeyboardUtils'; + private static listeners: {[key: string]: () => void} = {}; + + private static addListener = (id: string, onDismiss?: () => void) => { + if (id && onDismiss && !KeyboardUtils.listeners[id]) { + KeyboardUtils.listeners[id] = onDismiss; + } + }; + + private static removeListener = (id: string) => { + if (id && KeyboardUtils.listeners[id]) { + delete KeyboardUtils.listeners[id]; + } + }; + + /** + * Used to dismiss (close) the keyboard. + */ + static dismiss = () => { + Keyboard.dismiss(); + TextInputKeyboardManager.dismissKeyboard(); + Object.keys(KeyboardUtils.listeners).forEach(key => { + KeyboardUtils.listeners[key](); + }); + }; +} + +interface KeyboardHeightProps { + id: string; + onDismiss: () => void; +} + +const useKeyboardHeight = ({id, onDismiss}: KeyboardHeightProps) => { + const [isInitialized, setIsInitialized] = useState(false); + const [keyboardHeight, setKeyboardHeight] = useState(DEFAULT_KEYBOARD_HEIGHT); + const [isVisible, setIsVisible] = useState(false); + + const keyboardDidShow = useCallback((e: KeyboardEvent) => { + if (!isInitialized) { + setIsInitialized(true); + setKeyboardHeight(e.endCoordinates.height); + } + setIsVisible(true); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + const keyboardDidHide = useCallback(() => { + setIsVisible(false); + }, []); + + useEffect(() => { + const keyboardDidShowListener = Keyboard.addListener('keyboardDidShow', keyboardDidShow); + const keyboardDidHideListener = Keyboard.addListener('keyboardDidHide', keyboardDidHide); + // @ts-ignore + KeyboardUtils.addListener(id, onDismiss); + return () => { + keyboardDidShowListener.remove(); + keyboardDidHideListener.remove(); + // @ts-ignore + KeyboardUtils.removeListener(id); + }; + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + return {keyboardHeight, isKeyboardVisible: isVisible}; +}; + +export interface KeyboardHeightListenerProps { + id: string; + onDismiss: () => void; + onKeyboardHeightChange?: (height: number) => void; + onKeyboardVisibilityChange?: (isKeyboardVisible: boolean) => void; +} + +const KeyboardHeightListener = ({ + id, + onDismiss, + onKeyboardHeightChange, + onKeyboardVisibilityChange +}: KeyboardHeightListenerProps) => { + const {keyboardHeight, isKeyboardVisible} = useKeyboardHeight({id, onDismiss}); + + useEffect(() => { + onKeyboardHeightChange?.(keyboardHeight); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [keyboardHeight]); + + useEffect(() => { + onKeyboardVisibilityChange?.(isKeyboardVisible); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [isKeyboardVisible]); + + return null; +}; + +export {useKeyboardHeight, KeyboardHeightListener}; diff --git a/lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/TextInputKeyboardManager.android.ts b/lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/TextInputKeyboardManager.android.ts similarity index 100% rename from lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/TextInputKeyboardManager.android.ts rename to lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/TextInputKeyboardManager.android.ts diff --git a/lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/TextInputKeyboardManager.ios.ts b/lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/TextInputKeyboardManager.ios.ts similarity index 100% rename from lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/TextInputKeyboardManager.ios.ts rename to lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/TextInputKeyboardManager.ios.ts diff --git a/lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/index.ts b/lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/index.ts similarity index 100% rename from lib/components/Keyboard/KeyboardInput/TextInputKeyboardManager/index.ts rename to lib/components/Keyboard/KeyboardAccessoryView/TextInputKeyboardManager/index.ts diff --git a/lib/components/Keyboard/KeyboardInput/KeyboardAccessoryView.tsx b/lib/components/Keyboard/KeyboardAccessoryView/index.tsx similarity index 85% rename from lib/components/Keyboard/KeyboardInput/KeyboardAccessoryView.tsx rename to lib/components/Keyboard/KeyboardAccessoryView/index.tsx index 00051ef3e9..c65d796f2b 100644 --- a/lib/components/Keyboard/KeyboardInput/KeyboardAccessoryView.tsx +++ b/lib/components/Keyboard/KeyboardAccessoryView/index.tsx @@ -9,9 +9,9 @@ import { BackHandler, LayoutChangeEvent } from 'react-native'; -import KeyboardTrackingView, {KeyboardTrackingViewProps} from '../KeyboardTracking/KeyboardTrackingView'; +import KeyboardTrackingView, {KeyboardTrackingViewProps} from '../KeyboardTrackingView'; import CustomKeyboardView from './CustomKeyboardView'; -import KeyboardUtils from './utils/KeyboardUtils'; +import KeyboardUtils, {KeyboardHeightListener} from './KeyboardUtils'; const IsIOS = Platform.OS === 'ios'; const IsAndroid = Platform.OS === 'android'; @@ -73,9 +73,13 @@ class KeyboardAccessoryView extends Component { scrollBehavior: KeyboardTrackingView.scrollBehaviors.FIXED_OFFSET }; + static currentId = 0; + // TODO: fix customInputControllerEventsSubscriber: any; trackingViewRef: any; + subscription: any; + id: number = ++KeyboardAccessoryView.currentId; constructor(props: KeyboardAccessoryViewProps) { super(props); @@ -90,12 +94,17 @@ class KeyboardAccessoryView extends Component { this.registerAndroidBackHandler(); } + state = { + keyboardHeight: 0, + shouldFocus: true + }; + componentWillUnmount() { if (this.customInputControllerEventsSubscriber) { this.customInputControllerEventsSubscriber.remove(); } if (IsAndroid) { - BackHandler.removeEventListener('hardwareBackPress', this.onAndroidBackPressed); + this.subscription.remove(); } } @@ -146,7 +155,7 @@ class KeyboardAccessoryView extends Component { registerAndroidBackHandler() { if (IsAndroid) { - BackHandler.addEventListener('hardwareBackPress', this.onAndroidBackPressed); + this.subscription = BackHandler.addEventListener('hardwareBackPress', this.onAndroidBackPressed); } } @@ -167,8 +176,20 @@ class KeyboardAccessoryView extends Component { this.trackingViewRef.scrollToStart(); } } + onKeyboardHeightChange = (keyboardHeight: number) => { + this.setState({keyboardHeight}); + }; + + onDismiss = () => { + this.setState({shouldFocus: false}); + }; + + onKeyboardDismiss = () => { + this.setState({shouldFocus: true}); + }; render() { + const {keyboardHeight, shouldFocus} = this.state; const { renderContent, kbInputRef, @@ -187,8 +208,16 @@ class KeyboardAccessoryView extends Component { style={styles.trackingToolbarContainer} onLayout={this.onContainerComponentHeightChanged} > + <>{renderContent?.()} void", - "description": "Callback that will be called when an item on the keyboard has been pressed." + "description": "Callback that will be called when an item on the keyboard has been pressed" }, { "name": "onRequestShowKeyboard", "type": "() => void", - "description": "Callback that will be called if KeyboardRegistry.requestShowKeyboard is called." + "description": "Callback that will be called if KeyboardRegistry.requestShowKeyboard is called" }, { "name": "onKeyboardResigned", diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardAwareInsetsView.tsx b/lib/components/Keyboard/KeyboardAwareInsetsView/index.tsx similarity index 97% rename from lib/components/Keyboard/KeyboardTracking/KeyboardAwareInsetsView.tsx rename to lib/components/Keyboard/KeyboardAwareInsetsView/index.tsx index f2248479dc..81347a50e2 100644 --- a/lib/components/Keyboard/KeyboardTracking/KeyboardAwareInsetsView.tsx +++ b/lib/components/Keyboard/KeyboardAwareInsetsView/index.tsx @@ -1,6 +1,6 @@ import React from 'react'; import {StyleSheet, Dimensions} from 'react-native'; -import KeyboardTrackingView, {KeyboardTrackingViewProps} from './KeyboardTrackingView'; +import KeyboardTrackingView, {KeyboardTrackingViewProps} from '../KeyboardTrackingView'; type Props = KeyboardTrackingViewProps & { offset?: number; diff --git a/lib/components/Keyboard/KeyboardTracking/keyboardAwareInsetsView.api.json b/lib/components/Keyboard/KeyboardAwareInsetsView/keyboardAwareInsetsView.api.json similarity index 100% rename from lib/components/Keyboard/KeyboardTracking/keyboardAwareInsetsView.api.json rename to lib/components/Keyboard/KeyboardAwareInsetsView/keyboardAwareInsetsView.api.json diff --git a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.tsx b/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.tsx deleted file mode 100644 index 20492205f7..0000000000 --- a/lib/components/Keyboard/KeyboardInput/CustomKeyboardView/CustomKeyboardView.android.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; -import {requireNativeComponent} from 'react-native'; -import TextInputKeyboardManager from '../TextInputKeyboardManager/TextInputKeyboardManager.android'; -import KeyboardRegistry from '../KeyboardRegistry'; -import CustomKeyboardViewBase, {CustomKeyboardViewBaseProps} from '../CustomKeyboardViewBase'; - -const CustomKeyboardViewNativeAndroid = requireNativeComponent('CustomKeyboardViewNativeTemp'); - -export default class CustomKeyboardView extends CustomKeyboardViewBase { - static displayName = 'IGNORE'; - - async componentDidUpdate(prevProps: CustomKeyboardViewBaseProps) { - const {component} = this.props; - - if (prevProps.component !== component && !component) { - await TextInputKeyboardManager.reset(); - } - - super.componentDidUpdate(prevProps); - } - - render() { - const {component, initialProps} = this.props; - const KeyboardComponent = component && KeyboardRegistry.getKeyboard(component); - return ( - - {KeyboardComponent && } - - ); - } -} diff --git a/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.ts b/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.ts deleted file mode 100644 index aa61c305ee..0000000000 --- a/lib/components/Keyboard/KeyboardInput/utils/KeyboardUtils.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {Keyboard} from 'react-native'; -import TextInputKeyboardManager from '../TextInputKeyboardManager'; - -/** - * @description: util for managing the keyboard. - * @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/keyboardInput/KeyboardInputViewScreen.js - */ -export default class KeyboardUtils { - static displayName = 'KeyboardUtils'; - /** - * Used to dismiss (close) the keyboard. - */ - static dismiss = () => { - Keyboard.dismiss(); - TextInputKeyboardManager.dismissKeyboard(); - }; -} diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/KeyboardTrackingView.android.tsx b/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.android.tsx similarity index 100% rename from lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/KeyboardTrackingView.android.tsx rename to lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.android.tsx diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/KeyboardTrackingView.ios.tsx b/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.tsx similarity index 76% rename from lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/KeyboardTrackingView.ios.tsx rename to lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.tsx index abf730f6d8..e58c520505 100644 --- a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/KeyboardTrackingView.ios.tsx +++ b/lib/components/Keyboard/KeyboardTrackingView/KeyboardTrackingView.ios.tsx @@ -1,16 +1,13 @@ -/** - * Created by artald on 15/05/2016. - */ - import React, {PureComponent} from 'react'; -import ReactNative, {requireNativeComponent, NativeModules} from 'react-native'; +import ReactNative, {NativeModules} from 'react-native'; +// Import the Codegen specification for New Architecture +import KeyboardTrackingViewNativeComponent from '../../../specs/KeyboardTrackingViewNativeComponent'; import {KeyboardTrackingViewProps} from './index'; -const NativeKeyboardTrackingView = requireNativeComponent('KeyboardTrackingViewTemp'); const KeyboardTrackingViewTempManager = NativeModules.KeyboardTrackingViewTempManager; /** - * @description: A UI component that enables “keyboard tracking" for this view and it's sub-views. + * @description: A UI component that enables "keyboard tracking" for this view and it's sub-views. * Would typically be used when you have a TextField or TextInput inside this view. * * @example: https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/KeyboardTrackingViewScreen.js @@ -27,7 +24,7 @@ class KeyboardTrackingView extends PureComponent { ref?: any; render() { - return (this.ref = r)}/>; + return (this.ref = r)}/>; } async getNativeProps() { diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/index.tsx b/lib/components/Keyboard/KeyboardTrackingView/index.tsx similarity index 100% rename from lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/index.tsx rename to lib/components/Keyboard/KeyboardTrackingView/index.tsx diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/index.web.tsx b/lib/components/Keyboard/KeyboardTrackingView/index.web.tsx similarity index 100% rename from lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/index.web.tsx rename to lib/components/Keyboard/KeyboardTrackingView/index.web.tsx diff --git a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/keyboardTrackingView.api.json b/lib/components/Keyboard/KeyboardTrackingView/keyboardTrackingView.api.json similarity index 82% rename from lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/keyboardTrackingView.api.json rename to lib/components/Keyboard/KeyboardTrackingView/keyboardTrackingView.api.json index 360bf3fadc..9a208f7df9 100644 --- a/lib/components/Keyboard/KeyboardTracking/KeyboardTrackingView/keyboardTrackingView.api.json +++ b/lib/components/Keyboard/KeyboardTrackingView/keyboardTrackingView.api.json @@ -1,8 +1,8 @@ { "name": "KeyboardTrackingView", "category": "infra", - "description": "A UI component that enables 'keyboard tracking' for this view and it's sub-views.\nWould typically be used when you have a TextField or TextInput inside this view.", - "note": "This view is useful only for iOS.", + "description": "A UI component that enables 'keyboard tracking' for this view and it's sub-views.\nWould typically be used when you have a TextField or TextInput inside this view", + "note": "This view is useful only for iOS", "example": "https://github.com/wix/react-native-ui-lib/blob/master/demo/src/screens/nativeComponentScreens/KeyboardTrackingViewScreen.js", "images": [ "https://github.com/wix/react-native-ui-lib/blob/master/demo/showcase/KeyboardTrackingView/KeyboardTrackingView.gif?raw=true" @@ -21,63 +21,54 @@ { "name": "scrollBehavior", "type": "number", - "description": "The scrolling behavior (use KeyboardTrackingView.scrollBehaviors.NONE | SCROLL_TO_BOTTOM_INVERTED_ONLY | FIXED_OFFSET)", - "note": "iOS only" + "description": "The scrolling behavior (use KeyboardTrackingView.scrollBehaviors.NONE | SCROLL_TO_BOTTOM_INVERTED_ONLY | FIXED_OFFSET)" }, { "name": "revealKeyboardInteractive", "type": "boolean", - "description": "Show the keyboard on a negative scroll.", - "note": "iOS only", + "description": "Show the keyboard on a negative scroll", "default": "false" }, { "name": "manageScrollView", "type": "boolean", - "description": "Set to false to turn off inset management and manage it yourself.", - "note": "iOS only", + "description": "Set to false to turn off inset management and manage it yourself", "default": "true" }, { "name": "requiresSameParentToManageScrollView", "type": "boolean", - "description": "Set to true manageScrollView is set to true and still does not work,\nit means that the ScrollView found is the wrong one and you'll have\nto have the KeyboardAccessoryView and the ScrollView as siblings\nand set this to true.", - "note": "iOS only", + "description": "Set to true manageScrollView is set to true and still does not work,\nit means that the ScrollView found is the wrong one and you'll have\nto have the KeyboardAccessoryView and the ScrollView as siblings\nand set this to true", "default": "false" }, { "name": "allowHitsOutsideBounds", "type": "boolean", - "description": "Allow hitting sub-views that are placed beyond the view bounds.", - "note": "iOS only", + "description": "Allow hitting sub-views that are placed beyond the view bounds", "default": "false" }, { "name": "addBottomView", "type": "boolean", - "description": "Add a view beneath the KeyboardAccessoryView.", - "note": "iOS only", + "description": "Add a view beneath the KeyboardAccessoryView", "default": "false" }, { "name": "bottomViewColor", "type": "string", - "description": "The bottom view's color.", - "note": "iOS only", + "description": "The bottom view's color", "default": "white" }, { "name": "useSafeArea", "type": "boolean", - "description": "Whether or not to handle SafeArea.", - "note": "iOS only", + "description": "Whether or not to handle SafeArea", "default": "true" }, { "name": "usesBottomTabs", "type": "boolean", - "description": "Whether or not to include bottom tab bar inset.", - "note": "iOS only", + "description": "Whether or not to include bottom tab bar inset", "default": "false" }, {"name": "ref", "type": "any", "description": ""}, diff --git a/lib/components/Keyboard/index.ts b/lib/components/Keyboard/index.ts index dd170502e2..ff4d49cd23 100644 --- a/lib/components/Keyboard/index.ts +++ b/lib/components/Keyboard/index.ts @@ -1,15 +1,15 @@ -import KeyboardTrackingView, {KeyboardTrackingViewProps} from './KeyboardTracking/KeyboardTrackingView'; -import KeyboardAwareInsetsView from './KeyboardTracking/KeyboardAwareInsetsView'; -import KeyboardRegistry from './KeyboardInput/KeyboardRegistry'; -import KeyboardAccessoryView, {KeyboardAccessoryViewProps} from './KeyboardInput/KeyboardAccessoryView'; -import KeyboardUtils from './KeyboardInput/utils/KeyboardUtils'; +import KeyboardTrackingView, {KeyboardTrackingViewProps} from './KeyboardTrackingView'; +import KeyboardAwareInsetsView from './KeyboardAwareInsetsView'; +import KeyboardAccessoryView, {KeyboardAccessoryViewProps} from './KeyboardAccessoryView'; +import KeyboardRegistry from './KeyboardAccessoryView/KeyboardRegistry'; +import KeyboardUtils from './KeyboardAccessoryView/KeyboardUtils'; export {KeyboardTrackingViewProps, KeyboardAccessoryViewProps}; export default { KeyboardTrackingView, KeyboardAwareInsetsView, - KeyboardRegistry, KeyboardAccessoryView, + KeyboardRegistry, KeyboardUtils }; diff --git a/lib/components/SafeArea/SafeAreaInsetsManager.ts b/lib/components/SafeArea/SafeAreaInsetsManager.ts index ab0cc3fbc1..a3d80c5392 100644 --- a/lib/components/SafeArea/SafeAreaInsetsManager.ts +++ b/lib/components/SafeArea/SafeAreaInsetsManager.ts @@ -1,46 +1,100 @@ /* eslint no-underscore-dangle: 0 */ -import {NativeModules, NativeEventEmitter} from 'react-native'; import _ from 'lodash'; +import {NativeModules, DeviceEventEmitter} from 'react-native'; -type SafeAreaInsetsType = { top: number; left: number; bottom: number; right: number; } | null +type SafeAreaInsetsType = { top: number; left: number; bottom: number; right: number; } | null; let SafeAreaInsetsCache: SafeAreaInsetsType = null; -const NativeSafeAreaManager = NativeModules.SafeAreaManager; - class SafeAreaInsetsManager { - - _defaultInsets: SafeAreaInsetsType = {top: 0, left: 0, bottom: 0, right: 0}; - _safeAreaInsets: SafeAreaInsetsType = {top: 0, left: 0, bottom: 0, right: 0}; + _defaultInsets: SafeAreaInsetsType = {top: 47, left: 0, bottom: 34, right: 0}; // Common iPhone safe area values + _safeAreaInsets: SafeAreaInsetsType = {top: 47, left: 0, bottom: 34, right: 0}; _safeAreaChangedDelegates: Array = []; + _nativeModule: any = null; constructor() { - this.addSafeAreaChangedListener(); + // Initialize with default values + this._safeAreaInsets = this._defaultInsets; + + // Try to connect to native module + this.setupNativeConnection(); } - addSafeAreaChangedListener() { - if (!NativeSafeAreaManager) { - return; + setupNativeConnection() { + try { + // Access the native module directly without causing getConstants + this._nativeModule = NativeModules.SafeAreaManager; + + if (this._nativeModule) { + // Set up event listener using DeviceEventEmitter instead of NativeEventEmitter + // This avoids getConstants issues + this.setupEventListener(); + + // Get initial safe area insets + this.getInitialInsets(); + } else { + console.log('SafeAreaInsetsManager: Native SafeAreaManager not available, using defaults'); + } + } catch (error) { + console.warn('SafeAreaInsetsManager: Failed to connect to native module:', error); } - const NativeSafeAreaEvents = new NativeEventEmitter(NativeSafeAreaManager); - NativeSafeAreaEvents.addListener('SafeAreaInsetsDidChangeEvent', (safeAreaInsets) => { - SafeAreaInsetsCache = safeAreaInsets; - this._safeAreaInsets = SafeAreaInsetsCache; - _.forEach(this._safeAreaChangedDelegates, (delegate) => { - if (delegate.onSafeAreaInsetsDidChangeEvent) { - delegate.onSafeAreaInsetsDidChangeEvent(this._safeAreaInsets); - } else { - console.warn('ERROR', 'SafeAreaInsetsManager', 'safe area changed delegate was added, but it does not implement the onSafeAreaInsetsDidChangeEvent method'); //eslint-disable-line + } + + setupEventListener() { + try { + // Use DeviceEventEmitter instead of NativeEventEmitter to avoid getConstants + DeviceEventEmitter.addListener('SafeAreaInsetsDidChangeEvent', (data) => { + if (data) { + SafeAreaInsetsCache = data; + this._safeAreaInsets = data; + this.notifyDelegates(data); } }); + } catch (error) { + console.warn('SafeAreaInsetsManager: Failed to setup event listener:', error); + } + } + + async getInitialInsets() { + if (!this._nativeModule) { + return; + } + + try { + const insets = await this._nativeModule.getSafeAreaInsets(); + + if (insets) { + SafeAreaInsetsCache = insets; + this._safeAreaInsets = insets; + // Don't notify delegates yet as components might not be ready + } + } catch (error) { + console.warn('SafeAreaInsetsManager: Failed to get initial insets:', error); + } + } + + notifyDelegates(insets: SafeAreaInsetsType) { + _.forEach(this._safeAreaChangedDelegates, (delegate) => { + if (delegate.onSafeAreaInsetsDidChangeEvent) { + delegate.onSafeAreaInsetsDidChangeEvent(insets); + } }); } async _updateInsets() { - if (NativeSafeAreaManager && SafeAreaInsetsCache === null) { - SafeAreaInsetsCache = await NativeSafeAreaManager.getSafeAreaInsets(); + if (this._nativeModule && SafeAreaInsetsCache === null) { + try { + SafeAreaInsetsCache = await this._nativeModule.getSafeAreaInsets(); + this._safeAreaInsets = SafeAreaInsetsCache; + } catch (error) { + console.warn('SafeAreaInsetsManager: Failed to get native insets:', error); + this._safeAreaInsets = this._defaultInsets; + } + } else if (SafeAreaInsetsCache !== null) { this._safeAreaInsets = SafeAreaInsetsCache; + } else { + this._safeAreaInsets = this._defaultInsets; } } @@ -62,6 +116,20 @@ class SafeAreaInsetsManager { get defaultInsets() { return this._defaultInsets; } + + // Method to manually refresh safe area insets and notify delegates + async refreshSafeAreaInsets() { + const previousInsets = this._safeAreaInsets; + SafeAreaInsetsCache = null; // Force refresh + await this._updateInsets(); + + // Notify delegates if insets changed + if (!_.isEqual(previousInsets, this._safeAreaInsets)) { + this.notifyDelegates(this._safeAreaInsets); + } + } } -export default new SafeAreaInsetsManager(); +const instance = new SafeAreaInsetsManager(); + +export default instance; diff --git a/lib/components/SafeArea/SafeAreaSpacerView.tsx b/lib/components/SafeArea/SafeAreaSpacerView.tsx index 602ab5a5fc..564abc31f1 100644 --- a/lib/components/SafeArea/SafeAreaSpacerView.tsx +++ b/lib/components/SafeArea/SafeAreaSpacerView.tsx @@ -1,19 +1,72 @@ -import React from 'react'; -import {View, requireNativeComponent, ViewStyle, Platform} from 'react-native'; - -const NativeSafeAreaSpacerView = requireNativeComponent('SafeAreaSpacerView'); -const isIOS = Platform.OS === 'ios'; +import React, {useState, useCallback, useEffect, useMemo} from 'react'; +import {View, ViewStyle, Dimensions, StyleProp} from 'react-native'; +import SafeAreaInsetsManager from './SafeAreaInsetsManager'; export type SafeAreaSpacerViewProps = { - style?: ViewStyle; + style?: StyleProp; }; -const SafeAreaSpacerView = ({style}: SafeAreaSpacerViewProps) => { - return ( - // @ts-ignore - isIOS ? : - ); +const SafeAreaSpacerView = ({style}: SafeAreaSpacerViewProps) => { + const [safeAreaInsets, setSafeAreaInsets] = useState({top: 0, left: 0, bottom: 0, right: 0}); + const [componentHeight, setComponentHeight] = useState(0); + const [spacerHeight, setSpacerHeight] = useState(0); + + useEffect(() => { + const getSafeAreaInsets = async () => { + try { + const insets = await SafeAreaInsetsManager.getSafeAreaInsets(); + if (insets) { + setSafeAreaInsets(insets); + } + } catch (error) { + console.warn('SafeAreaSpacerView: Failed to get initial safe area insets:', error); + } + }; + + getSafeAreaInsets(); + + // Add delegate to listen for safe area changes from native component + const delegate = { + onSafeAreaInsetsDidChangeEvent: (insets: any) => { + if (insets) { + setSafeAreaInsets(insets); + } + } + }; + + SafeAreaInsetsManager.addSafeAreaChangedDelegate(delegate); + + return () => { + SafeAreaInsetsManager.removeSafeAreaChangedDelegate(delegate); + }; + }, []); + + // Position detection with useCallback + const handleLayout = useCallback((event: any) => { + const {y} = event.nativeEvent.layout; + setComponentHeight(y); + }, []); + + useEffect(() => { + const screenHeight = Dimensions.get('window').height; + + let height = 0; + // Check if positioned within safe area bounds + if (componentHeight < safeAreaInsets.top) { + height = safeAreaInsets.top; + } else if (componentHeight > screenHeight - safeAreaInsets.bottom) { + height = safeAreaInsets.bottom; + } + + if (height !== spacerHeight) { + setSpacerHeight(height); + } + }, [componentHeight, safeAreaInsets, spacerHeight]); + + const spacerStyle = useMemo(() => [{height: spacerHeight}, style], [spacerHeight, style]); + + return ; }; -SafeAreaSpacerView.displayName = 'IGNORE'; +SafeAreaSpacerView.displayName = 'SafeAreaSpacerView'; export default SafeAreaSpacerView; diff --git a/lib/components/SafeArea/index.tsx b/lib/components/SafeArea/index.tsx new file mode 100644 index 0000000000..21a71d9a3d --- /dev/null +++ b/lib/components/SafeArea/index.tsx @@ -0,0 +1,16 @@ +import React from 'react'; +import {View, ViewStyle, StyleProp, Platform} from 'react-native'; +import SafeAreaSpacerViewIos from './SafeAreaSpacerView'; + +const isIOS = Platform.OS === 'ios'; + +export type SafeAreaSpacerViewProps = { + style?: StyleProp; +}; + +const SafeAreaSpacerView = ({style}: SafeAreaSpacerViewProps) => { + return isIOS ? : ; +}; + +SafeAreaSpacerView.displayName = 'SafeAreaSpacerView'; +export default SafeAreaSpacerView; diff --git a/lib/components/index.ts b/lib/components/index.ts index 7b120062e1..9e6845a829 100644 --- a/lib/components/index.ts +++ b/lib/components/index.ts @@ -1,6 +1,6 @@ import DynamicFonts, {FontExtension} from './DynamicFonts'; import HighlighterOverlayView from './HighlighterOverlayView'; -import SafeAreaSpacerView from './SafeArea/SafeAreaSpacerView'; +import SafeAreaSpacerView from './SafeArea'; import SafeAreaInsetsManager from './SafeArea/SafeAreaInsetsManager'; import Keyboard, {KeyboardTrackingViewProps, KeyboardAccessoryViewProps} from './Keyboard'; diff --git a/lib/package.json b/lib/package.json index faff2f00b1..ee0b1823fc 100644 --- a/lib/package.json +++ b/lib/package.json @@ -1,6 +1,6 @@ { "name": "uilib-native", - "version": "4.5.2", + "version": "5.0.0", "homepage": "https://github.com/wix/react-native-ui-lib", "description": "uilib native components (separated from js components)", "main": "components/index", diff --git a/lib/react-native.config.js b/lib/react-native.config.js index d5fe52adda..f8d9905656 100644 --- a/lib/react-native.config.js +++ b/lib/react-native.config.js @@ -10,11 +10,9 @@ module.exports = { sourceDir: './android/', packageImportPath: `import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage; import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage; -import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage; -import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;`, +import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;`, packageInstance: `new DynamicFontPackage(), new HighlighterViewPackage(), - new TextInputDelKeyHandlerPackage(), new KeyboardInputPackage(getApplication())` } } diff --git a/lib/specs/HighlighterViewNativeComponent.ts b/lib/specs/HighlighterViewNativeComponent.ts new file mode 100644 index 0000000000..d790279c3b --- /dev/null +++ b/lib/specs/HighlighterViewNativeComponent.ts @@ -0,0 +1,78 @@ +import type {ViewProps} from 'react-native'; +// import {requireNativeComponent, type ViewProps} from 'react-native'; +import type {Float, Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + +export interface HighlightFrame { + x: Float; + y: Float; + width: Float; + height: Float; +} + +export interface MinimumRectSize { + width: Float; + height: Float; +} + +export interface HighlightViewTagParams { + paddingLeft?: WithDefault; + paddingTop?: WithDefault; + paddingRight?: WithDefault; + paddingBottom?: WithDefault; + offsetX?: WithDefault; + offsetY?: WithDefault; +} + +export interface NativeProps extends ViewProps { + /** + * The frame to highlight with x, y, width, height coordinates + */ + highlightFrame?: HighlightFrame; + + /** + * The overlay color (processed color int for Android) + */ + overlayColor?: WithDefault; + + /** + * The border radius for the highlighted area + */ + borderRadius?: WithDefault; + + /** + * The stroke color (processed color int for Android) + */ + strokeColor?: WithDefault; + + /** + * The stroke width + */ + strokeWidth?: WithDefault; + + /** + * The React tag of the view to highlight + */ + highlightViewTag?: Int32; + + /** + * Parameters for view-based highlighting including padding and offset + */ + highlightViewTagParams?: HighlightViewTagParams; + + /** + * Minimum rectangle size for the highlight area + */ + minimumRectSize?: MinimumRectSize; + + /** + * Inner padding for the highlight area + */ + innerPadding?: WithDefault; +} + +export default codegenNativeComponent('HighlighterView'); + +// const HighlighterViewNativeComponent = requireNativeComponent('HighlighterView'); + +// export default HighlighterViewNativeComponent; diff --git a/lib/specs/KeyboardTrackingViewNativeComponent.ts b/lib/specs/KeyboardTrackingViewNativeComponent.ts new file mode 100644 index 0000000000..b5d4b988db --- /dev/null +++ b/lib/specs/KeyboardTrackingViewNativeComponent.ts @@ -0,0 +1,74 @@ +import type {ViewProps} from 'react-native'; +// import {requireNativeComponent, type ViewProps} from 'react-native'; +import type {Int32, WithDefault} from 'react-native/Libraries/Types/CodegenTypes'; +import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent'; + +export interface NativeProps extends ViewProps { + /** + * Enables tracking of the keyboard when it's dismissed interactively (false by default). + */ + trackInteractive?: WithDefault; + + /** + * iOS only. + * Show the keyboard on a negative scroll + */ + revealKeyboardInteractive?: WithDefault; + + /** + * iOS only. + * Set to false to turn off inset management and manage it yourself + */ + manageScrollView?: WithDefault; + + /** + * iOS only. + * Set to true manageScrollView is set to true and still does not work + */ + requiresSameParentToManageScrollView?: WithDefault; + + /** + * iOS only. + * Allow hitting sub-views that are placed beyond the view bounds + */ + allowHitsOutsideBounds?: WithDefault; + + /** + * Should the scrollView scroll to the focused input + */ + scrollToFocusedInput?: WithDefault; + + /** + * iOS only. + * The scrolling behavior (NONE | SCROLL_TO_BOTTOM_INVERTED_ONLY | FIXED_OFFSET) + */ + scrollBehavior?: WithDefault; + + /** + * iOS only. + * Add a SafeArea view beneath the KeyboardAccessoryView + */ + addBottomView?: WithDefault; + + /** + * iOS only. + * The bottom view's color + */ + bottomViewColor?: string; + + /** + * Allow control safe area + */ + useSafeArea?: WithDefault; + + /** + * Whether or not to include bottom tab bar inset + */ + usesBottomTabs?: WithDefault; +} + +export default codegenNativeComponent('KeyboardTrackingViewTemp'); + +// const KeyboardTrackingViewNativeComponent = requireNativeComponent('KeyboardTrackingViewTemp'); + +// export default KeyboardTrackingViewNativeComponent; diff --git a/metro.config.js b/metro.config.js index 681a876f86..3bed1e1c94 100644 --- a/metro.config.js +++ b/metro.config.js @@ -7,7 +7,7 @@ const {assetExts, sourceExts} = defaultConfig.resolver; * Metro configuration * https://reactnative.dev/docs/metro * - * @type {import('metro-config').MetroConfig} + * @type {import('@react-native/metro-config').MetroConfig} */ const config = { diff --git a/package.json b/package.json index 3876836aa2..3741c43e30 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "react-native-redash": "^12.0.3", "semver": "^5.5.0", "tinycolor2": "^1.4.2", - "uilib-native": "4.5.1", + "uilib-native": "5.0.0-snapshot.7216", "url-parse": "^1.2.0", "wix-react-native-text-size": "1.0.9" }, @@ -78,15 +78,15 @@ "@react-native-community/cli-platform-ios": "15.0.1", "@react-native-community/datetimepicker": "^3.4.6", "@react-native-community/netinfo": "11.3.3", - "@react-native/babel-preset": "0.76.9", - "@react-native/eslint-config": "0.76.9", - "@react-native/metro-config": "0.76.9", - "@react-native/typescript-config": "0.76.9", + "@react-native/babel-preset": "0.77.2", + "@react-native/eslint-config": "0.77.2", + "@react-native/metro-config": "0.77.2", + "@react-native/typescript-config": "0.77.2", "@shopify/flash-list": "1.7.6", "@testing-library/react-hooks": "^8.0.1", "@testing-library/react-native": "^11.5.1", "@types/hoist-non-react-statics": "^3.3.1", - "@types/jest": "^29.2.1", + "@types/jest": "^29.5.13", "@types/lodash": "^4.0.0", "@types/prop-types": "^15.5.3", "@types/react": "18.3.7", @@ -96,7 +96,6 @@ "@typescript-eslint/eslint-plugin": "^5.3.1", "@typescript-eslint/parser": "^5.3.1", "@welldone-software/why-did-you-render": "^3.2.1", - "babel-jest": "^29.6.3", "babel-plugin-lodash": "^3.3.4", "babel-plugin-module-resolver": "^5.0.0", "eslint": "8.19.0", @@ -115,19 +114,20 @@ "react": "18.2.0", "react-autobind": "^1.0.6", "react-dom": "^18.2.0", - "react-native": "0.76.9", + "react-native": "0.77.2", "react-native-fs": "^2.20.0", "react-native-gesture-handler": "2.22.1", "react-native-haptic-feedback": "^1.11.0", "react-native-linear-gradient": "2.6.2", - "react-native-mmkv": "2.11.0", - "react-native-navigation": "8.0.0", + "react-native-mmkv": "3.2.0", + "react-native-navigation": "8.1.0-rc01-snapshot.1710", "react-native-reanimated": "3.16.7", "react-native-shimmer-placeholder": "^2.0.6", "react-native-svg": "15.11.2", "react-native-svg-transformer": "1.5.0", "react-test-renderer": "18.3.1", "reassure": "^0.4.1", + "setimmediate": "^1.0.5", "shell-utils": "^1.0.10", "typescript": "5.0.4" }, diff --git a/react-native.config.js b/react-native.config.js index ef376f5f64..df3b8bf9f4 100644 --- a/react-native.config.js +++ b/react-native.config.js @@ -10,11 +10,9 @@ module.exports = { sourceDir: '../uilib-native/android/', packageImportPath: `import com.wix.reactnativeuilib.dynamicfont.DynamicFontPackage; import com.wix.reactnativeuilib.highlighterview.HighlighterViewPackage; -import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage; -import com.wix.reactnativeuilib.textinput.TextInputDelKeyHandlerPackage;`, +import com.wix.reactnativeuilib.keyboardinput.KeyboardInputPackage;`, packageInstance: `new DynamicFontPackage(), new HighlighterViewPackage(), - new TextInputDelKeyHandlerPackage(), new KeyboardInputPackage(getApplication())` } } diff --git a/src/commons/Constants.ts b/src/commons/Constants.ts index 3323371a1f..978d043813 100644 --- a/src/commons/Constants.ts +++ b/src/commons/Constants.ts @@ -44,8 +44,13 @@ function setStatusBarHeight() { statusBarHeight = (StatusBar.currentHeight ?? StatusBarManager?.HEIGHT) || 0; if (isIOS && StatusBarManager) { - // override guesstimate height with the actual height from StatusBarManager - StatusBarManager.getHeight((data:{height:number}) => (statusBarHeight = data.height)); + try { + // override guesstimate height with the actual height from StatusBarManager + StatusBarManager.getHeight((data:{height:number}) => (statusBarHeight = data.height)); + } catch (error) { + console.warn('Constants: StatusBarManager.getHeight not available in new architecture, using fallback'); + // Keep the fallback height we already set above + } } } diff --git a/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js b/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js index 2c7c59d203..0a456af5d1 100644 --- a/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js +++ b/src/components/KeyboardAwareScrollView/KeyboardAwareBase.js @@ -107,7 +107,7 @@ export default class KeyboardAwareBase extends Component { setTimeout(() => { this._keyboardAwareView .getScrollResponder() - .scrollResponderScrollNativeHandleToKeyboard(ReactNative.findNodeHandle(textInputRef), + .scrollResponderScrollNativeHandleToKeyboard(this.findNodeHandle(textInputRef), this.props.scrollToInputAdditionalOffset, true); }, 0); @@ -117,6 +117,10 @@ export default class KeyboardAwareBase extends Component { } } + findNodeHandle(ref) { + return ref.current?.getNodeHandle?.() || ref?.getNodeHandle?.() || ReactNative.findNodeHandle(ref.current || ref); + } + _onKeyboardWillShow(event) { this._scrollToFocusedTextInput(); diff --git a/src/components/button/button.api.json b/src/components/button/button.api.json index b1fc5b1184..5f621f541b 100644 --- a/src/components/button/button.api.json +++ b/src/components/button/button.api.json @@ -155,7 +155,7 @@ { "name": "animateLayout", "type": "boolean", - "description": "should animate layout change. Note: For Android you must set 'setLayoutAnimationEnabledExperimental(true)' via RN's 'UIManager'" + "description": "should animate layout change" }, { "name": "animateTo", diff --git a/src/components/button/types.ts b/src/components/button/types.ts index 0b00394170..3c020957c5 100644 --- a/src/components/button/types.ts +++ b/src/components/button/types.ts @@ -146,7 +146,6 @@ export type ButtonProps = TouchableOpacityProps & getActiveBackgroundColor?: (backgroundColor: string, props: any) => string; /** * should animate layout change - * Note?: For Android you must set 'setLayoutAnimationEnabledExperimental(true)' via RN's 'UIManager' */ animateLayout?: boolean; /** diff --git a/src/components/drawer/Swipeable.tsx b/src/components/drawer/Swipeable.tsx index c5ab0b0ae1..8e49849336 100644 --- a/src/components/drawer/Swipeable.tsx +++ b/src/components/drawer/Swipeable.tsx @@ -76,7 +76,7 @@ class Swipeable extends Component { static defaultProps = { friction: 1, overshootFriction: 1, - useNativeAnimations: false, // issue in iPhone5 + useNativeAnimations: true, fullLeftThreshold: 0.45, fullRightThreshold: 0.45 }; diff --git a/src/components/drawer/index.tsx b/src/components/drawer/index.tsx index 6082d1e97f..8649d2ff1b 100644 --- a/src/components/drawer/index.tsx +++ b/src/components/drawer/index.tsx @@ -326,54 +326,54 @@ class Drawer extends PureComponent { }); return ( - this.onActionPress(item)} - > - {item.customElement} - {!item.customElement && item.icon && ( - - )} - {!item.customElement && item.text && ( - - {item.text} - - )} + this.onActionPress(item)}> + + {item.customElement} + {!item.customElement && item.icon && ( + + )} + {!item.customElement && item.text && ( + + {item.text} + + )} + ); }; @@ -382,7 +382,7 @@ class Drawer extends PureComponent { const {children, style, leftItem, rightItems, onToggleSwipeLeft, ...others} = this.props; return ( - + (Drawer); const styles = StyleSheet.create({ + container: { + flex: 0 + }, leftAction: { flex: 1, justifyContent: 'center', diff --git a/src/components/fadedScrollView/index.tsx b/src/components/fadedScrollView/index.tsx index a9472bc573..b244ad0c15 100644 --- a/src/components/fadedScrollView/index.tsx +++ b/src/components/fadedScrollView/index.tsx @@ -2,6 +2,7 @@ import React, {useCallback, useRef, useImperativeHandle} from 'react'; import { ScrollView as RNScrollView, ScrollViewProps, + StyleSheet, NativeSyntheticEvent, NativeScrollEvent, LayoutChangeEvent @@ -107,7 +108,7 @@ const FadedScrollView = (props: Props) => { if (children) { return ( - + { return null; }; +const styles = StyleSheet.create({ + container: { + flex: 0 + } +}); + FadedScrollView.displayName = 'IGNORE'; export default forwardRef, FadedScrollViewRef>(FadedScrollView); diff --git a/src/components/featureHighlight/index.tsx b/src/components/featureHighlight/index.tsx index cdb38afe25..bbe327ec40 100644 --- a/src/components/featureHighlight/index.tsx +++ b/src/components/featureHighlight/index.tsx @@ -133,7 +133,7 @@ export type FeatureHighlightProps = { interface State { fadeAnim: Animated.Value; contentTopPosition?: number; - node?: number | null; + node?: number; getTarget?: () => any; } diff --git a/src/components/sortableGridList/SortableItem.tsx b/src/components/sortableGridList/SortableItem.tsx index cad24f8ae2..7d26eaed6b 100644 --- a/src/components/sortableGridList/SortableItem.tsx +++ b/src/components/sortableGridList/SortableItem.tsx @@ -33,6 +33,8 @@ function SortableItem(props: PropsWithChildren isDragging.value, + (isDragging, wasDragging) => { + if (isDragging && !wasDragging) { + zIndex.value = withTiming(100, animationConfig); + scale.value = withSpring(1.1); + } else if (!isDragging && wasDragging) { + zIndex.value = withTiming(0, animationConfig); + scale.value = withSpring(1); + } + }, + []); + const onLayout = useCallback((event: LayoutChangeEvent) => { 'worklet'; const {width, height} = event.nativeEvent.layout; @@ -172,12 +186,13 @@ function SortableItem(props: PropsWithChildren { - const scale = withSpring(isDragging.value ? 1.1 : 1); - const zIndex = isDragging.value ? 100 : withTiming(0, animationConfig); - return { - zIndex, - transform: [{translateX: translateX.value}, {translateY: translateY.value}, {scale}] + zIndex: Math.round(zIndex.value), + transform: [ + {translateX: translateX.value}, + {translateY: translateY.value}, + {scale: scale.value} + ] }; }); diff --git a/src/components/sortableList/SortableListItem.tsx b/src/components/sortableList/SortableListItem.tsx index d9d42669e9..f8e6a874ec 100644 --- a/src/components/sortableList/SortableListItem.tsx +++ b/src/components/sortableList/SortableListItem.tsx @@ -57,6 +57,8 @@ const SortableListItem = (props: Props) => { const lastSwap = useSharedValue({from: -1, to: -1}); const currIndex = useSharedValue(initialIndex.value); const translation = useSharedValue(0); + const zIndex = useSharedValue(0); + const scale = useSharedValue(1); const isDragging = useSharedValue(false); @@ -97,6 +99,16 @@ const SortableListItem = (props: Props) => { }, []); + useAnimatedReaction(() => isDragging.value, (isDragging, wasDragging) => { + if (isDragging && !wasDragging) { + zIndex.value = withTiming(100, animationConfig); + scale.value = withSpring(propsScale); + } else if (!isDragging && wasDragging) { + zIndex.value = withTiming(0, animationConfig); + scale.value = withSpring(1); + } + }, []); + const dragOnLongPressGesture = Gesture.Pan() .activateAfterLongPress(250) .enabled(!locked) @@ -164,8 +176,6 @@ const SortableListItem = (props: Props) => { }); const draggedAnimatedStyle = useAnimatedStyle(() => { - const scale = withSpring(isDragging.value ? propsScale : 1); - const zIndex = isDragging.value ? 100 : withTiming(0, animationConfig); const opacity = isDragging.value ? 0.95 : 1; const shadow = isDragging.value ? draggedItemShadow.value @@ -173,8 +183,11 @@ const SortableListItem = (props: Props) => { return { backgroundColor: itemProps?.backgroundColor ?? LIST_ITEM_BACKGROUND, // required for elevation to work in Android - zIndex, - transform: [horizontal ? {translateX: translation.value} : {translateY: translation.value}, {scale}], + zIndex: Math.round(zIndex.value), + transform: [ + horizontal ? {translateX: translation.value} : {translateY: translation.value}, + {scale: scale.value} + ], opacity, ...itemProps?.margins, ...shadow diff --git a/src/components/stackAggregator/index.tsx b/src/components/stackAggregator/index.tsx index 434029732d..5339af5f7d 100644 --- a/src/components/stackAggregator/index.tsx +++ b/src/components/stackAggregator/index.tsx @@ -248,7 +248,7 @@ const StackAggregator = (props: StackAggregatorProps) => { =8" prettier: ">=2" - checksum: 79147a2c55df65358ced8d28ca2c885206c95006e48f981aeebed21528ecfe607c7786c7dda5b65bcfce96a4dcb3d9e5786ec199994c8782256f375bedd88393 + checksum: 0a2f59d242f98c61acf5aa1151f5351ebce8f146961bac25b50cf3c80c713e7447f6837591b5fd4e134a96f85983385b3abeb2c9fa97c025a3c7a2573347d1f1 languageName: node linkType: hard -"@react-native/eslint-plugin@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/eslint-plugin@npm:0.76.9" - checksum: b932f7b44590142c6bf255b3dbfcd65ff1fd76805dc3d59f4874f9d1f3a4324d02a6854fbb46bde9d205e0d68d109db2875f6ab68ac12d5f567b64a82c86e340 +"@react-native/eslint-plugin@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/eslint-plugin@npm:0.77.2" + checksum: f3386e95e22646aa2bfef4989c72f45043e147ae81f90599bf9ce84eccc82e5ee275085b314d6228af29b7de98522c31dc83b3b78422695fc47e0ef82f3a5652 languageName: node linkType: hard -"@react-native/gradle-plugin@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/gradle-plugin@npm:0.76.9" - checksum: afc6010cf278ed7dba58fb67cb789965edb6cfb3608e54b518232ef46b651f541915b7f6eae0b298457ccd8626213c687962ec250143e714de5e3bd2dc6dc210 +"@react-native/gradle-plugin@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/gradle-plugin@npm:0.77.2" + checksum: 7a1ea02ab2d7cb48b2e3426c4352d1718c899605477a6a321de8eb77240236417f2e52744be92b4b2f7b9304ed37112e9b015ed9947572a189a444a3cd64cb92 languageName: node linkType: hard -"@react-native/js-polyfills@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/js-polyfills@npm:0.76.9" - checksum: c49aac99f6973b102a9013632c204f02a57d96da500901bc6730ab96f56950d6924417e39c87be640a3a59b67e1af2583432361f55bf42c959aff02a285bcafc +"@react-native/js-polyfills@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/js-polyfills@npm:0.77.2" + checksum: 5934885baa67414aa40785470c06b21c0eee1405f48ffb3b773dc1c9fd1da7f6cb9b9c9bf1c81d54b3e9399cb0cc0d54be88ea26bdcc4bca5134a563bd8003b6 languageName: node linkType: hard -"@react-native/metro-babel-transformer@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/metro-babel-transformer@npm:0.76.9" +"@react-native/metro-babel-transformer@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/metro-babel-transformer@npm:0.77.2" dependencies: "@babel/core": ^7.25.2 - "@react-native/babel-preset": 0.76.9 - hermes-parser: 0.23.1 + "@react-native/babel-preset": 0.77.2 + hermes-parser: 0.25.1 nullthrows: ^1.1.1 peerDependencies: "@babel/core": "*" - checksum: cb38d150e30b3e07e2cb8e637e26b4dcb8b58d6accc95f51e507baea94bb970a0077573c319849a3e7d9bf976dadc39cf363bb505f53de1a209e1bb9ea0428f8 + checksum: 70526eb6fd1bc4b973daa06b836b2130891f1c5c44ea5f21612e7626bb5f2f2552f090b5b7be2bb0ab9c47077ba36ef28ded29f41892c489f9f263f7e4062dd4 languageName: node linkType: hard -"@react-native/metro-config@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/metro-config@npm:0.76.9" +"@react-native/metro-config@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/metro-config@npm:0.77.2" dependencies: - "@react-native/js-polyfills": 0.76.9 - "@react-native/metro-babel-transformer": 0.76.9 - metro-config: ^0.81.0 - metro-runtime: ^0.81.0 - checksum: c52dd64967e6ead75d735702def2e29767f56321d888eae48b683e65118852c567c066755fa0f18c554773a8a0cb44493b436f516bf2c96bb6625f86e7439fec + "@react-native/js-polyfills": 0.77.2 + "@react-native/metro-babel-transformer": 0.77.2 + metro-config: ^0.81.3 + metro-runtime: ^0.81.3 + checksum: c98bb93be27338752cedafff2551ceda0a5523fcf578c5ee51325887e68e92edd34bd02adfb34e758abb40bc259054132932e389b83464e91f11e7937d2a96f3 languageName: node linkType: hard @@ -3437,23 +3741,23 @@ __metadata: languageName: node linkType: hard -"@react-native/normalize-colors@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/normalize-colors@npm:0.76.9" - checksum: 4fddb977b8aad2e848cb698f13b9ffec539668e8ae891846327d5e23ce3de13dea59a2dfbea8a154ea034791c7abc3f7d1d4c8caae2114f7a683c78b221aed36 +"@react-native/normalize-colors@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/normalize-colors@npm:0.77.2" + checksum: 57902b123cd9421f8058b3ce9f9f3c535a97511f3a7c8e81d1090cfb727c6c231d7b7c366f0dbdabe485cfa690f9eb9baca7e98dc6672b9c78debe19b35a0753 languageName: node linkType: hard -"@react-native/typescript-config@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/typescript-config@npm:0.76.9" - checksum: 768240aacdfdc80dfab6593a497841f8e2bf2a227778f8abc60396b3e7a261d36f8243bd0926e850a34d1a98a4f372327d3cabb5c3ce1049fafbb775d852e0c1 +"@react-native/typescript-config@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/typescript-config@npm:0.77.2" + checksum: 28c513bf6e33eff27836f3feedc1e00504b6c24b83d337464ae1109b3ff248c58c7f0545c9ea5fdc942d1c930b4195c10edac892ae62e009b14de117aa082bf3 languageName: node linkType: hard -"@react-native/virtualized-lists@npm:0.76.9": - version: 0.76.9 - resolution: "@react-native/virtualized-lists@npm:0.76.9" +"@react-native/virtualized-lists@npm:0.77.2": + version: 0.77.2 + resolution: "@react-native/virtualized-lists@npm:0.77.2" dependencies: invariant: ^2.2.4 nullthrows: ^1.1.1 @@ -3464,7 +3768,7 @@ __metadata: peerDependenciesMeta: "@types/react": optional: true - checksum: 697a04bdf4b5f430164bf666bf60cd0207f4d3fb06b0a62d7c39b54c166973b29c73640e5c1a44f1c6891d93398bedd63eb8addcbe78641d7ebb13b9ab022052 + checksum: 5cd03ec22d21bdb026601305317092e9774bb8585c530c40141e29f35bbdcb2f79d3ad236181c42fd4927bfd2cba25c4a691783a31daed5ac347c9646838fecb languageName: node linkType: hard @@ -3808,13 +4112,13 @@ __metadata: languageName: node linkType: hard -"@types/jest@npm:^29.2.1": - version: 29.5.13 - resolution: "@types/jest@npm:29.5.13" +"@types/jest@npm:^29.5.13": + version: 29.5.14 + resolution: "@types/jest@npm:29.5.14" dependencies: expect: ^29.0.0 pretty-format: ^29.0.0 - checksum: 875ac23c2398cdcf22aa56c6ba24560f11d2afda226d4fa23936322dde6202f9fdbd2b91602af51c27ecba223d9fc3c1e33c9df7e47b3bf0e2aefc6baf13ce53 + checksum: 18dba4623f26661641d757c63da2db45e9524c9be96a29ef713c703a9a53792df9ecee9f7365a0858ddbd6440d98fe6b65ca67895ca5884b73cbc7ffc11f3838 languageName: node linkType: hard @@ -4573,12 +4877,12 @@ __metadata: languageName: node linkType: hard -"ast-types@npm:0.15.2": - version: 0.15.2 - resolution: "ast-types@npm:0.15.2" +"ast-types@npm:^0.16.1": + version: 0.16.1 + resolution: "ast-types@npm:0.16.1" dependencies: tslib: ^2.0.1 - checksum: 24f0d86bf9e4c8dae16fa24b13c1776f2c2677040bcfbd4eb4f27911db49020be4876885e45e6cfcc548ed4dfea3a0742d77e3346b84fae47379cb0b89e9daa0 + checksum: 21c186da9fdb1d8087b1b7dabbc4059f91aa5a1e593a9776b4393cc1eaa857e741b2dda678d20e34b16727b78fef3ab59cf8f0c75ed1ba649c78fe194e5c114b languageName: node linkType: hard @@ -4605,15 +4909,6 @@ __metadata: languageName: node linkType: hard -"babel-core@npm:^7.0.0-bridge.0": - version: 7.0.0-bridge.0 - resolution: "babel-core@npm:7.0.0-bridge.0" - peerDependencies: - "@babel/core": ^7.0.0-0 - checksum: 2a1cb879019dffb08d17bec36e13c3a6d74c94773f41c1fd8b14de13f149cc34b705b0a1e07b42fcf35917b49d78db6ff0c5c3b00b202a5235013d517b5c6bbb - languageName: node - linkType: hard - "babel-eslint@npm:^10.0.0": version: 10.1.0 resolution: "babel-eslint@npm:10.1.0" @@ -4630,7 +4925,7 @@ __metadata: languageName: node linkType: hard -"babel-jest@npm:^29.6.3, babel-jest@npm:^29.7.0": +"babel-jest@npm:^29.7.0": version: 29.7.0 resolution: "babel-jest@npm:29.7.0" dependencies: @@ -4734,16 +5029,7 @@ __metadata: languageName: node linkType: hard -"babel-plugin-syntax-hermes-parser@npm:^0.23.1": - version: 0.23.1 - resolution: "babel-plugin-syntax-hermes-parser@npm:0.23.1" - dependencies: - hermes-parser: 0.23.1 - checksum: 5412008e8e85b08cd0d78168f746ade68b8ed69c0068831ce5e3d028f01c644f546ca0e2b7c9a4a8c6b9d5f14aff84c2453ab44b19cbec55e4366b20bbba9040 - languageName: node - linkType: hard - -"babel-plugin-syntax-hermes-parser@npm:^0.25.1": +"babel-plugin-syntax-hermes-parser@npm:0.25.1": version: 0.25.1 resolution: "babel-plugin-syntax-hermes-parser@npm:0.25.1" dependencies: @@ -6668,7 +6954,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^5.0.0, execa@npm:^5.1.1": +"execa@npm:^5.0.0": version: 5.1.1 resolution: "execa@npm:5.1.1" dependencies: @@ -7222,7 +7508,7 @@ __metadata: languageName: node linkType: hard -"graceful-fs@npm:^4.1.11, graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": +"graceful-fs@npm:^4.1.3, graceful-fs@npm:^4.1.6, graceful-fs@npm:^4.2.0, graceful-fs@npm:^4.2.4, graceful-fs@npm:^4.2.6, graceful-fs@npm:^4.2.9": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" checksum: ac85f94da92d8eb6b7f5a8b20ce65e43d66761c55ce85ac96df6865308390da45a8d3f0296dd3a663de65d30ba497bd46c696cc1e248c72b13d6d567138a4fc7 @@ -7307,13 +7593,6 @@ __metadata: languageName: node linkType: hard -"hermes-estree@npm:0.23.1": - version: 0.23.1 - resolution: "hermes-estree@npm:0.23.1" - checksum: 0f63edc365099304f4cd8e91a3666a4fb5a2a47baee751dc120df9201640112865944cae93617f554af71be9827e96547f9989f4972d6964ecc121527295fec6 - languageName: node - linkType: hard - "hermes-estree@npm:0.25.1": version: 0.25.1 resolution: "hermes-estree@npm:0.25.1" @@ -7321,15 +7600,6 @@ __metadata: languageName: node linkType: hard -"hermes-parser@npm:0.23.1": - version: 0.23.1 - resolution: "hermes-parser@npm:0.23.1" - dependencies: - hermes-estree: 0.23.1 - checksum: a08008928aea9ea9a2cab2c0fac3cffa21f7869ab3fabb68e5add0fe057737a0c352d7a446426f7956172ccc8f2d4a215b4fc20d1d08354fc8dc16772c248fce - languageName: node - linkType: hard - "hermes-parser@npm:0.25.1": version: 0.25.1 resolution: "hermes-parser@npm:0.25.1" @@ -8538,34 +8808,36 @@ __metadata: languageName: node linkType: hard -"jscodeshift@npm:^0.14.0": - version: 0.14.0 - resolution: "jscodeshift@npm:0.14.0" +"jscodeshift@npm:^17.0.0": + version: 17.3.0 + resolution: "jscodeshift@npm:17.3.0" dependencies: - "@babel/core": ^7.13.16 - "@babel/parser": ^7.13.16 - "@babel/plugin-proposal-class-properties": ^7.13.0 - "@babel/plugin-proposal-nullish-coalescing-operator": ^7.13.8 - "@babel/plugin-proposal-optional-chaining": ^7.13.12 - "@babel/plugin-transform-modules-commonjs": ^7.13.8 - "@babel/preset-flow": ^7.13.13 - "@babel/preset-typescript": ^7.13.0 - "@babel/register": ^7.13.16 - babel-core: ^7.0.0-bridge.0 - chalk: ^4.1.2 + "@babel/core": ^7.24.7 + "@babel/parser": ^7.24.7 + "@babel/plugin-transform-class-properties": ^7.24.7 + "@babel/plugin-transform-modules-commonjs": ^7.24.7 + "@babel/plugin-transform-nullish-coalescing-operator": ^7.24.7 + "@babel/plugin-transform-optional-chaining": ^7.24.7 + "@babel/plugin-transform-private-methods": ^7.24.7 + "@babel/preset-flow": ^7.24.7 + "@babel/preset-typescript": ^7.24.7 + "@babel/register": ^7.24.6 flow-parser: 0.* graceful-fs: ^4.2.4 - micromatch: ^4.0.4 + micromatch: ^4.0.7 neo-async: ^2.5.0 - node-dir: ^0.1.17 - recast: ^0.21.0 - temp: ^0.8.4 - write-file-atomic: ^2.3.0 + picocolors: ^1.0.1 + recast: ^0.23.11 + tmp: ^0.2.3 + write-file-atomic: ^5.0.1 peerDependencies: "@babel/preset-env": ^7.1.6 + peerDependenciesMeta: + "@babel/preset-env": + optional: true bin: jscodeshift: bin/jscodeshift.js - checksum: 54ea6d639455883336f80b38a70648821c88b7942315dc0fbab01bc34a9ad0f0f78e3bd69304b5ab167e4262d6ed7e6284c6d32525ab01c89d9118df89b3e2a0 + checksum: 6a529c8dcab8eef48381425c706d58a0a9205397cad367925872845ff1c35924f8f838bbd1397b28a065061032047c9fd843877000a3743240db4ba6ded2546b languageName: node linkType: hard @@ -9010,68 +9282,68 @@ __metadata: languageName: node linkType: hard -"metro-babel-transformer@npm:0.81.4": - version: 0.81.4 - resolution: "metro-babel-transformer@npm:0.81.4" +"metro-babel-transformer@npm:0.81.5": + version: 0.81.5 + resolution: "metro-babel-transformer@npm:0.81.5" dependencies: "@babel/core": ^7.25.2 flow-enums-runtime: ^0.0.6 hermes-parser: 0.25.1 nullthrows: ^1.1.1 - checksum: ebcac865e463b0e84d91ac7e03d16b01c7578e35698ca30a06ca30a5fe31d5921c1293b51c0aca47286eacb2629e56dbd4a271af7dd27126d318ebaeb32477ee + checksum: 687b0657fcb2c6a01784a29abaa9979539a9047c0632c299d7764e7cafa9412cbb17f4e866212dc4c96a73eb47381d30340b30628b2d083fef0c88523ae0a293 languageName: node linkType: hard -"metro-cache-key@npm:0.81.4": - version: 0.81.4 - resolution: "metro-cache-key@npm:0.81.4" +"metro-cache-key@npm:0.81.5": + version: 0.81.5 + resolution: "metro-cache-key@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 - checksum: 524f11de4b907024d27de1f190ea8520e3bd7ffa9cfa6d7d4c1a067ad41e4f2acd5b40c756c5dbf0def3e2dfaa5e0780fb54f7d960cd7888c124d44905b1dcfa + checksum: d5656bc8906ff4366d8093d19304d6ac386c59429e3e7e24050f4bc9f93ca4e04d8062af6bdd28874a5e4b9bcc84f248855933ffa80af56aeed8be5ff02c85bf languageName: node linkType: hard -"metro-cache@npm:0.81.4": - version: 0.81.4 - resolution: "metro-cache@npm:0.81.4" +"metro-cache@npm:0.81.5": + version: 0.81.5 + resolution: "metro-cache@npm:0.81.5" dependencies: exponential-backoff: ^3.1.1 flow-enums-runtime: ^0.0.6 - metro-core: 0.81.4 - checksum: 61e5e129a7eed60ea7b85224df145b959ee3379eab0f5f6d00d9268ee549ff411347e0cfe1738a827d1070ec0bacc225473c80f6cf72780bc3a81a518d5e0ec6 + metro-core: 0.81.5 + checksum: cba822d3f5c38163558e8240f7b8f189a597829c7df07a3f205c9565f66c0d3a9d7deab7be9449dec3bd1c615b71918c8cd05b0e2bf9cc21c517702405d468d1 languageName: node linkType: hard -"metro-config@npm:0.81.4, metro-config@npm:^0.81.0": - version: 0.81.4 - resolution: "metro-config@npm:0.81.4" +"metro-config@npm:0.81.5, metro-config@npm:^0.81.3": + version: 0.81.5 + resolution: "metro-config@npm:0.81.5" dependencies: connect: ^3.6.5 cosmiconfig: ^5.0.5 flow-enums-runtime: ^0.0.6 jest-validate: ^29.7.0 - metro: 0.81.4 - metro-cache: 0.81.4 - metro-core: 0.81.4 - metro-runtime: 0.81.4 - checksum: 3fcee46eb84045a00f708025bd9c710531d29661d9e561eb418f342e97ed4dbffbda1b677e6045f7ec92eb9c6e06d0e429df8372f1050ad005a9820ca9cf4ad4 + metro: 0.81.5 + metro-cache: 0.81.5 + metro-core: 0.81.5 + metro-runtime: 0.81.5 + checksum: 43ba163fcfcbd0bcf69c3416901779c3de94536b0ee451ad73cad6311734e931cb1bf2c007dd71317f35ddf346cca74bc07b5a3075adf5c09b0e6e859d2169e4 languageName: node linkType: hard -"metro-core@npm:0.81.4, metro-core@npm:^0.81.0": - version: 0.81.4 - resolution: "metro-core@npm:0.81.4" +"metro-core@npm:0.81.5, metro-core@npm:^0.81.3": + version: 0.81.5 + resolution: "metro-core@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 lodash.throttle: ^4.1.1 - metro-resolver: 0.81.4 - checksum: d39d5e25dbb949fdeae906c511b78ee19a2caee2ddd018116866715263038baf4be8376255ee0087f892ee7220aeb17f9c8cabbd244742100dc9e87193614f91 + metro-resolver: 0.81.5 + checksum: 5fb02d055669f0d37aaffc165444aa723741e9e9a74c1e17c54b53e635e4b7246d8ec582bfb951710ff02cd2d26d5565811182464f3f42728c1f346d0e699f8a languageName: node linkType: hard -"metro-file-map@npm:0.81.4": - version: 0.81.4 - resolution: "metro-file-map@npm:0.81.4" +"metro-file-map@npm:0.81.5": + version: 0.81.5 + resolution: "metro-file-map@npm:0.81.5" dependencies: debug: ^2.2.0 fb-watchman: ^2.0.0 @@ -9082,76 +9354,76 @@ __metadata: micromatch: ^4.0.4 nullthrows: ^1.1.1 walker: ^1.0.7 - checksum: 7a1008263b527aeefdeb606cede2287f58ab11c9da6b2b68b10ffc93524d6b595c6c8fc86e36ef16c696b11322f1631b905b592f275ec88121104b1feab4e74a + checksum: dcc975a6a3a0ceaf25048cca834d6b065b719b768f332c2a720d6a0341b6b640783625d1188dc1b85204e42420853240fa0419988bade2395ce3c054079c3b65 languageName: node linkType: hard -"metro-minify-terser@npm:0.81.4": - version: 0.81.4 - resolution: "metro-minify-terser@npm:0.81.4" +"metro-minify-terser@npm:0.81.5": + version: 0.81.5 + resolution: "metro-minify-terser@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 terser: ^5.15.0 - checksum: 985b0023354f523608d977bcb3c45edf3c5497ca0466fdb5b1125ff2c0cca56b6184a263106c7f6f9f381e950a035f15fb12e977ed169ca13089a75733c3314f + checksum: 4623743676e2bb8bb74b99bd2b2c26feb2509a8db5596f265e21042b43e84611f9025977ae298b8271644cb27e8da8a60b8dff791f57517b4bd2f5ae366f2945 languageName: node linkType: hard -"metro-resolver@npm:0.81.4": - version: 0.81.4 - resolution: "metro-resolver@npm:0.81.4" +"metro-resolver@npm:0.81.5": + version: 0.81.5 + resolution: "metro-resolver@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 - checksum: 0404d549ac144d5823e4b0383e6718d5fb969c60f3cf4db4a24748f94198b692b1527a92a874b9af00ba28284719063e7aaec5f2913e82438ac5b97d9b406241 + checksum: 84d9f3c10538a747c2718ddc1cf366c38b1a6080e2b6cdfd4731511e5a25cec45fbf35101fae8691bda59fd2e9aa3f559d436bc46e05b603c446072e4a1bc6e9 languageName: node linkType: hard -"metro-runtime@npm:0.81.4, metro-runtime@npm:^0.81.0": - version: 0.81.4 - resolution: "metro-runtime@npm:0.81.4" +"metro-runtime@npm:0.81.5, metro-runtime@npm:^0.81.3": + version: 0.81.5 + resolution: "metro-runtime@npm:0.81.5" dependencies: "@babel/runtime": ^7.25.0 flow-enums-runtime: ^0.0.6 - checksum: 96029d4be2b828792431318f3a28c4cb82dae0c0c6d5a393874362b9df08ada56ae3f283ad8b6eb0a8c3358518cc7c01b53712482b891fdf292e893d038eb7d1 + checksum: 43b54e07ce0534928c12f59a3d2e68ecf4fc7e7ad1a78cb691f90a406796eec381af21fcef5af73ecc5081153a4da5f935797ebe9ea4a025a5e526039bf19b21 languageName: node linkType: hard -"metro-source-map@npm:0.81.4, metro-source-map@npm:^0.81.0": - version: 0.81.4 - resolution: "metro-source-map@npm:0.81.4" +"metro-source-map@npm:0.81.5, metro-source-map@npm:^0.81.3": + version: 0.81.5 + resolution: "metro-source-map@npm:0.81.5" dependencies: "@babel/traverse": ^7.25.3 "@babel/traverse--for-generate-function-map": "npm:@babel/traverse@^7.25.3" "@babel/types": ^7.25.2 flow-enums-runtime: ^0.0.6 invariant: ^2.2.4 - metro-symbolicate: 0.81.4 + metro-symbolicate: 0.81.5 nullthrows: ^1.1.1 - ob1: 0.81.4 + ob1: 0.81.5 source-map: ^0.5.6 vlq: ^1.0.0 - checksum: 878fe5b2e69f3b658e80f50de61ca8af8085485dfffb67ec1641e80e725a87319cbcf51909ac56baaafcf6156a3a4ba78585901a164d237566b6a19767341633 + checksum: a31e459c8a18fe3fc6b3cc5d87a2f25b2f3794425d590bbbab8abafa537647110b18edd0ff025971d1783e16d3c114099bf13c406a01a6456e3e004a54f621d8 languageName: node linkType: hard -"metro-symbolicate@npm:0.81.4": - version: 0.81.4 - resolution: "metro-symbolicate@npm:0.81.4" +"metro-symbolicate@npm:0.81.5": + version: 0.81.5 + resolution: "metro-symbolicate@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 invariant: ^2.2.4 - metro-source-map: 0.81.4 + metro-source-map: 0.81.5 nullthrows: ^1.1.1 source-map: ^0.5.6 vlq: ^1.0.0 bin: metro-symbolicate: src/index.js - checksum: b5391c516499e2b761f366558cac4382e42c815fb7eb9551f1e64e95769e06688d6988329d59c7e769076af5ac2abb880a0544f367b523d786b249808b8fb050 + checksum: f1ec6df153be8b469c87179dcc0807e6e94e2523140e0b0044aa2fecedfd222f9d05a408bd142d3293e52e9c7ef59064332fce5f489cddb0f38d11d3ed897c2b languageName: node linkType: hard -"metro-transform-plugins@npm:0.81.4": - version: 0.81.4 - resolution: "metro-transform-plugins@npm:0.81.4" +"metro-transform-plugins@npm:0.81.5": + version: 0.81.5 + resolution: "metro-transform-plugins@npm:0.81.5" dependencies: "@babel/core": ^7.25.2 "@babel/generator": ^7.25.0 @@ -9159,34 +9431,34 @@ __metadata: "@babel/traverse": ^7.25.3 flow-enums-runtime: ^0.0.6 nullthrows: ^1.1.1 - checksum: 709e7a2ea8fef04d40dc63222cb9b42046b975c1b7eb838c6f9ca315e08a756ad18d0057f2d5e0beaf4e0561cd03be9dfb3b15de286ff102ee386cf49acbae57 + checksum: 2d156882c6545730638aeb362856288649e5049f336d532040dd4b9435ad53d35adbc808903f01519dfda5e7a9a1d80b6f2303171921f32aa823f86484ab2b60 languageName: node linkType: hard -"metro-transform-worker@npm:0.81.4": - version: 0.81.4 - resolution: "metro-transform-worker@npm:0.81.4" +"metro-transform-worker@npm:0.81.5": + version: 0.81.5 + resolution: "metro-transform-worker@npm:0.81.5" dependencies: "@babel/core": ^7.25.2 "@babel/generator": ^7.25.0 "@babel/parser": ^7.25.3 "@babel/types": ^7.25.2 flow-enums-runtime: ^0.0.6 - metro: 0.81.4 - metro-babel-transformer: 0.81.4 - metro-cache: 0.81.4 - metro-cache-key: 0.81.4 - metro-minify-terser: 0.81.4 - metro-source-map: 0.81.4 - metro-transform-plugins: 0.81.4 + metro: 0.81.5 + metro-babel-transformer: 0.81.5 + metro-cache: 0.81.5 + metro-cache-key: 0.81.5 + metro-minify-terser: 0.81.5 + metro-source-map: 0.81.5 + metro-transform-plugins: 0.81.5 nullthrows: ^1.1.1 - checksum: 947b892b0dc8836d55772d0367ed0a797fc68f8b53000e21be5b5c6cc66ab0269292e4cbff3fa9988f4c471dbd979a49dbb11fa780e7022e0ed26b810cbe19ff + checksum: 59d144c44e7979317ee702a0f11da19443e5bf56a4fb6be026e4e09377631a2704ca4aba4e7290711fbe481176e82006fe195a18cacd6007f01c6b1ebe2a7a84 languageName: node linkType: hard -"metro@npm:0.81.4, metro@npm:^0.81.0": - version: 0.81.4 - resolution: "metro@npm:0.81.4" +"metro@npm:0.81.5, metro@npm:^0.81.3": + version: 0.81.5 + resolution: "metro@npm:0.81.5" dependencies: "@babel/code-frame": ^7.24.7 "@babel/core": ^7.25.2 @@ -9209,18 +9481,18 @@ __metadata: jest-worker: ^29.7.0 jsc-safe-url: ^0.2.2 lodash.throttle: ^4.1.1 - metro-babel-transformer: 0.81.4 - metro-cache: 0.81.4 - metro-cache-key: 0.81.4 - metro-config: 0.81.4 - metro-core: 0.81.4 - metro-file-map: 0.81.4 - metro-resolver: 0.81.4 - metro-runtime: 0.81.4 - metro-source-map: 0.81.4 - metro-symbolicate: 0.81.4 - metro-transform-plugins: 0.81.4 - metro-transform-worker: 0.81.4 + metro-babel-transformer: 0.81.5 + metro-cache: 0.81.5 + metro-cache-key: 0.81.5 + metro-config: 0.81.5 + metro-core: 0.81.5 + metro-file-map: 0.81.5 + metro-resolver: 0.81.5 + metro-runtime: 0.81.5 + metro-source-map: 0.81.5 + metro-symbolicate: 0.81.5 + metro-transform-plugins: 0.81.5 + metro-transform-worker: 0.81.5 mime-types: ^2.1.27 nullthrows: ^1.1.1 serialize-error: ^2.1.0 @@ -9230,11 +9502,11 @@ __metadata: yargs: ^17.6.2 bin: metro: src/cli.js - checksum: 77d8ffa230500f9e7f834600d9d8a4a8b0a3214f17e3dd4e8b8c2039bd48e3d8322e01068b4faf29093fa8398225cef4a6f130b581c33fef53e94f5646e6e1a9 + checksum: 7665b811aa09abe5c7743764402f03cf64ccb3e1b381a46716470b58b05a952dde45e5e34c6a485f79154e2905b89fc178455c378831f9425767d76392418f9f languageName: node linkType: hard -"micromatch@npm:^4.0.4": +"micromatch@npm:^4.0.4, micromatch@npm:^4.0.7": version: 4.0.8 resolution: "micromatch@npm:4.0.8" dependencies: @@ -9301,7 +9573,7 @@ __metadata: languageName: node linkType: hard -"minimatch@npm:^3.0.2, minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": +"minimatch@npm:^3.0.4, minimatch@npm:^3.0.5, minimatch@npm:^3.1.1, minimatch@npm:^3.1.2": version: 3.1.2 resolution: "minimatch@npm:3.1.2" dependencies: @@ -9528,29 +9800,6 @@ __metadata: languageName: node linkType: hard -"node-dir@npm:^0.1.17": - version: 0.1.17 - resolution: "node-dir@npm:0.1.17" - dependencies: - minimatch: ^3.0.2 - checksum: 29de9560e52cdac8d3f794d38d782f6799e13d4d11aaf96d3da8c28458e1c5e33bb5f8edfb42dc34172ec5516c50c5b8850c9e1526542616757a969267263328 - languageName: node - linkType: hard - -"node-fetch@npm:^2.2.0": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: ^5.0.0 - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: d76d2f5edb451a3f05b15115ec89fc6be39de37c6089f1b6368df03b91e1633fd379a7e01b7ab05089a25034b2023d959b47e59759cb38d88341b2459e89d6e5 - languageName: node - linkType: hard - "node-forge@npm:^1": version: 1.3.1 resolution: "node-forge@npm:1.3.1" @@ -9688,12 +9937,12 @@ __metadata: languageName: node linkType: hard -"ob1@npm:0.81.4": - version: 0.81.4 - resolution: "ob1@npm:0.81.4" +"ob1@npm:0.81.5": + version: 0.81.5 + resolution: "ob1@npm:0.81.5" dependencies: flow-enums-runtime: ^0.0.6 - checksum: 76369043728f471ded35d294088e65a3c0876f2f7c73ad9a4dcdda68e1022a4ce72b8052a681f2604c93cd2e7ccf35e945bbb01855378122f7a1ef48ad1cc72c + checksum: 249ad576be69151a3099207b35b2f6da5c6bb39dfacb9295028ebdc182c2f61f6544d1f6f167af759a77174ab19d8997d1ae6aecdbd9bdc293b2826067e66c5b languageName: node linkType: hard @@ -10360,13 +10609,13 @@ __metadata: languageName: node linkType: hard -"react-devtools-core@npm:^5.3.1": - version: 5.3.1 - resolution: "react-devtools-core@npm:5.3.1" +"react-devtools-core@npm:^6.0.1": + version: 6.1.1 + resolution: "react-devtools-core@npm:6.1.1" dependencies: shell-quote: ^1.6.1 ws: ^7 - checksum: a68434a6af8261f5eb7defd823ebc77cc86f42a93521755bc58e5925956af579a312e109f9b27f652d016c2d580ef28f6e8d1643502624c0fe7913c93c743170 + checksum: 18b6d11a11a23b67eb1ff7d44b45adb914a18d9b26cdb378d8f3146834eda5d9bdefc131bb7fb793f3057f166c309681651e865814bbf491f2ea0d0bf06a2922 languageName: node linkType: hard @@ -10479,24 +10728,27 @@ __metadata: languageName: node linkType: hard -"react-native-mmkv@npm:2.11.0": - version: 2.11.0 - resolution: "react-native-mmkv@npm:2.11.0" +"react-native-mmkv@npm:3.2.0": + version: 3.2.0 + resolution: "react-native-mmkv@npm:3.2.0" peerDependencies: react: "*" - react-native: ">=0.71.0" - checksum: 23ba624db8a4c530532aaab78705b58d1c9eefc3173dae3b1f86c8cb4d0e5abe3d175079c263251bfed406dc9f6ccda3657f138177916866ea0c0dc8fa3d2389 + react-native: "*" + checksum: 766944a7cbf265e27b57576e51bff8604cd8f58c88eaec78bd93d4ce10ff9127d5f75f4c3bb03d6c7ce5dafa07c65e233d5363c0504db802cc88eaf1ccbffaa1 languageName: node linkType: hard -"react-native-navigation@npm:8.0.0": - version: 8.0.0 - resolution: "react-native-navigation@npm:8.0.0" +"react-native-navigation@npm:8.1.0-rc01-snapshot.1710": + version: 8.1.0-rc01-snapshot.1710 + resolution: "react-native-navigation@npm:8.1.0-rc01-snapshot.1710" dependencies: hoist-non-react-statics: 3.x.x lodash: 4.17.x prop-types: 15.x.x react-lifecycles-compat: ^3.0.4 + react-native-redash: ^12.6.1 + reanimated-color-picker: ^3.0.6 + ssim.js: ^3.5.0 tslib: 1.9.3 peerDependencies: react: "*" @@ -10507,7 +10759,7 @@ __metadata: optional: true bin: rnn-link: autolink/postlink/run.js - checksum: bcffb9ffba54558ba2be502e5cc0c6c65f0ef9a421743969063ffb5205b1c34e2fbe5a2de2fcaf70d21ca36830f1f87ff53169aac2d6ebcca40c9469239157b9 + checksum: 9535c77e5127e3ebe137fba783500ddb69359545d7f3dec71a86f1c6650f7205987e2ed25c1c5305046678659653d33b7d0ea2497c5a1693d540d5d0ba2c4e36 languageName: node linkType: hard @@ -10534,7 +10786,7 @@ __metadata: languageName: node linkType: hard -"react-native-redash@npm:^12.0.3": +"react-native-redash@npm:^12.0.3, react-native-redash@npm:^12.6.1": version: 12.6.1 resolution: "react-native-redash@npm:12.6.1" dependencies: @@ -10611,15 +10863,15 @@ __metadata: "@react-native-community/cli-platform-ios": 15.0.1 "@react-native-community/datetimepicker": ^3.4.6 "@react-native-community/netinfo": 11.3.3 - "@react-native/babel-preset": 0.76.9 - "@react-native/eslint-config": 0.76.9 - "@react-native/metro-config": 0.76.9 - "@react-native/typescript-config": 0.76.9 + "@react-native/babel-preset": 0.77.2 + "@react-native/eslint-config": 0.77.2 + "@react-native/metro-config": 0.77.2 + "@react-native/typescript-config": 0.77.2 "@shopify/flash-list": 1.7.6 "@testing-library/react-hooks": ^8.0.1 "@testing-library/react-native": ^11.5.1 "@types/hoist-non-react-statics": ^3.3.1 - "@types/jest": ^29.2.1 + "@types/jest": ^29.5.13 "@types/lodash": ^4.0.0 "@types/prop-types": ^15.5.3 "@types/react": 18.3.7 @@ -10629,7 +10881,6 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.3.1 "@typescript-eslint/parser": ^5.3.1 "@welldone-software/why-did-you-render": ^3.2.1 - babel-jest: ^29.6.3 babel-plugin-lodash: ^3.3.4 babel-plugin-module-resolver: ^5.0.0 babel-plugin-transform-inline-environment-variables: ^0.0.2 @@ -10658,13 +10909,13 @@ __metadata: react-autobind: ^1.0.6 react-dom: ^18.2.0 react-freeze: ^1.0.0 - react-native: 0.76.9 + react-native: 0.77.2 react-native-fs: ^2.20.0 react-native-gesture-handler: 2.22.1 react-native-haptic-feedback: ^1.11.0 react-native-linear-gradient: 2.6.2 - react-native-mmkv: 2.11.0 - react-native-navigation: 8.0.0 + react-native-mmkv: 3.2.0 + react-native-navigation: 8.1.0-rc01-snapshot.1710 react-native-reanimated: 3.16.7 react-native-redash: ^12.0.3 react-native-shimmer-placeholder: ^2.0.6 @@ -10673,10 +10924,11 @@ __metadata: react-test-renderer: 18.3.1 reassure: ^0.4.1 semver: ^5.5.0 + setimmediate: ^1.0.5 shell-utils: ^1.0.10 tinycolor2: ^1.4.2 typescript: 5.0.4 - uilib-native: 4.5.1 + uilib-native: 5.0.0-snapshot.7216 url-parse: ^1.2.0 wix-react-native-text-size: 1.0.9 peerDependencies: @@ -10688,23 +10940,23 @@ __metadata: languageName: unknown linkType: soft -"react-native@npm:0.76.9": - version: 0.76.9 - resolution: "react-native@npm:0.76.9" +"react-native@npm:0.77.2": + version: 0.77.2 + resolution: "react-native@npm:0.77.2" dependencies: "@jest/create-cache-key-function": ^29.6.3 - "@react-native/assets-registry": 0.76.9 - "@react-native/codegen": 0.76.9 - "@react-native/community-cli-plugin": 0.76.9 - "@react-native/gradle-plugin": 0.76.9 - "@react-native/js-polyfills": 0.76.9 - "@react-native/normalize-colors": 0.76.9 - "@react-native/virtualized-lists": 0.76.9 + "@react-native/assets-registry": 0.77.2 + "@react-native/codegen": 0.77.2 + "@react-native/community-cli-plugin": 0.77.2 + "@react-native/gradle-plugin": 0.77.2 + "@react-native/js-polyfills": 0.77.2 + "@react-native/normalize-colors": 0.77.2 + "@react-native/virtualized-lists": 0.77.2 abort-controller: ^3.0.0 anser: ^1.4.9 ansi-regex: ^5.0.0 babel-jest: ^29.7.0 - babel-plugin-syntax-hermes-parser: ^0.23.1 + babel-plugin-syntax-hermes-parser: 0.25.1 base64-js: ^1.5.1 chalk: ^4.0.0 commander: ^12.0.0 @@ -10715,13 +10967,12 @@ __metadata: jest-environment-node: ^29.6.3 jsc-android: ^250231.0.0 memoize-one: ^5.0.0 - metro-runtime: ^0.81.0 - metro-source-map: ^0.81.0 - mkdirp: ^0.5.1 + metro-runtime: ^0.81.3 + metro-source-map: ^0.81.3 nullthrows: ^1.1.1 pretty-format: ^29.7.0 promise: ^8.3.0 - react-devtools-core: ^5.3.1 + react-devtools-core: ^6.0.1 react-refresh: ^0.14.0 regenerator-runtime: ^0.13.2 scheduler: 0.24.0-canary-efb381bbf-20230505 @@ -10738,7 +10989,7 @@ __metadata: optional: true bin: react-native: cli.js - checksum: cf621cef0649920bac2b730998be6eaaf9762d516bc65d9073b46f634bb640dfb6b9b5d64ce6a6e09da64d52d114d96d96435a91c9db8ec61b76c818fe209827 + checksum: 95c503e124aa00e6b90a891410775bb23070fdfacb5e082ccb6434345e459b330a2188305c9b4db4e57209cd98bab993fe941685e8d4ebb9cc145720f813619e languageName: node linkType: hard @@ -10821,6 +11072,22 @@ __metadata: languageName: node linkType: hard +"reanimated-color-picker@npm:^3.0.6": + version: 3.0.6 + resolution: "reanimated-color-picker@npm:3.0.6" + peerDependencies: + expo: ">=44.0.0" + react: "*" + react-native: "*" + react-native-gesture-handler: ">=2.0.0" + react-native-reanimated: ^2.0.0 || ^3.0.0 + peerDependenciesMeta: + expo: + optional: true + checksum: e7106c5e6c2d1f5b512b97323f9f79c86c317055629706bd9263e9c2044ee6e1cdee02250876111f5682643029f2173c34c948f9708ad44d7c2ddc8edfd83c1c + languageName: node + linkType: hard + "reassure@npm:^0.4.1": version: 0.4.1 resolution: "reassure@npm:0.4.1" @@ -10831,15 +11098,16 @@ __metadata: languageName: node linkType: hard -"recast@npm:^0.21.0": - version: 0.21.5 - resolution: "recast@npm:0.21.5" +"recast@npm:^0.23.11": + version: 0.23.11 + resolution: "recast@npm:0.23.11" dependencies: - ast-types: 0.15.2 + ast-types: ^0.16.1 esprima: ~4.0.0 source-map: ~0.6.1 + tiny-invariant: ^1.3.3 tslib: ^2.0.1 - checksum: 03cc7f57562238ba258d468be67bf7446ce7a707bc87a087891dad15afead46c36e9aaeedf2130e2ab5a465244a9c62bfd4127849761cf8f4085abe2f3e5f485 + checksum: 1807159b1c33bc4a2d146e4ffea13b658e54bdcfab04fc4f9c9d7f1b4626c931e2ce41323e214516ec1e02a119037d686d825fc62f28072db27962b85e5b481d languageName: node linkType: hard @@ -11160,17 +11428,6 @@ __metadata: languageName: node linkType: hard -"rimraf@npm:~2.6.2": - version: 2.6.3 - resolution: "rimraf@npm:2.6.3" - dependencies: - glob: ^7.1.3 - bin: - rimraf: ./bin.js - checksum: 3ea587b981a19016297edb96d1ffe48af7e6af69660e3b371dbfc73722a73a0b0e9be5c88089fbeeb866c389c1098e07f64929c7414290504b855f54f901ab10 - languageName: node - linkType: hard - "run-node@npm:^1.0.0": version: 1.0.0 resolution: "run-node@npm:1.0.0" @@ -11339,7 +11596,7 @@ __metadata: languageName: node linkType: hard -"serve-static@npm:^1.13.1": +"serve-static@npm:^1.13.1, serve-static@npm:^1.16.2": version: 1.16.2 resolution: "serve-static@npm:1.16.2" dependencies: @@ -11384,6 +11641,13 @@ __metadata: languageName: node linkType: hard +"setimmediate@npm:^1.0.5": + version: 1.0.5 + resolution: "setimmediate@npm:1.0.5" + checksum: c9a6f2c5b51a2dabdc0247db9c46460152ffc62ee139f3157440bd48e7c59425093f42719ac1d7931f054f153e2d26cf37dfeb8da17a794a58198a2705e527fd + languageName: node + linkType: hard + "setprototypeof@npm:1.2.0": version: 1.2.0 resolution: "setprototypeof@npm:1.2.0" @@ -11642,6 +11906,13 @@ __metadata: languageName: node linkType: hard +"ssim.js@npm:^3.5.0": + version: 3.5.0 + resolution: "ssim.js@npm:3.5.0" + checksum: 3f3a63ac8bec9c45e9f72252b786dcb4c91d7a74316b49c20e7935fd6e3869541e9324233b00eb0ab6bd15701016becd62740a5fb8c98f7b5115a9237efb2d4a + languageName: node + linkType: hard + "ssri@npm:^10.0.0": version: 10.0.6 resolution: "ssri@npm:10.0.6" @@ -11966,15 +12237,6 @@ __metadata: languageName: node linkType: hard -"temp@npm:^0.8.4": - version: 0.8.4 - resolution: "temp@npm:0.8.4" - dependencies: - rimraf: ~2.6.2 - checksum: f35bed78565355dfdf95f730b7b489728bd6b7e35071bcc6497af7c827fb6c111fbe9063afc7b8cbc19522a072c278679f9a0ee81e684aa2c8617cc0f2e9c191 - languageName: node - linkType: hard - "terser@npm:^5.15.0": version: 5.33.0 resolution: "terser@npm:5.33.0" @@ -12031,6 +12293,13 @@ __metadata: languageName: node linkType: hard +"tiny-invariant@npm:^1.3.3": + version: 1.3.3 + resolution: "tiny-invariant@npm:1.3.3" + checksum: 5e185c8cc2266967984ce3b352a4e57cb89dad5a8abb0dea21468a6ecaa67cd5bb47a3b7a85d08041008644af4f667fb8b6575ba38ba5fb00b3b5068306e59fe + languageName: node + linkType: hard + "tinycolor2@npm:^1.4.2": version: 1.6.0 resolution: "tinycolor2@npm:1.6.0" @@ -12047,6 +12316,13 @@ __metadata: languageName: node linkType: hard +"tmp@npm:^0.2.3": + version: 0.2.3 + resolution: "tmp@npm:0.2.3" + checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95 + languageName: node + linkType: hard + "tmpl@npm:1.0.5": version: 1.0.5 resolution: "tmpl@npm:1.0.5" @@ -12077,13 +12353,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 726321c5eaf41b5002e17ffbd1fb7245999a073e8979085dacd47c4b4e8068ff5777142fc6726d6ca1fd2ff16921b48788b87225cbc57c72636f6efa8efbffe3 - languageName: node - linkType: hard - "ts-api-utils@npm:^1.0.1": version: 1.3.0 resolution: "ts-api-utils@npm:1.3.0" @@ -12291,16 +12560,16 @@ __metadata: languageName: node linkType: hard -"uilib-native@npm:4.5.1": - version: 4.5.1 - resolution: "uilib-native@npm:4.5.1" +"uilib-native@npm:5.0.0-snapshot.7216": + version: 5.0.0-snapshot.7216 + resolution: "uilib-native@npm:5.0.0-snapshot.7216" dependencies: lodash: ^4.17.21 prop-types: ^15.5.10 peerDependencies: react: ">=17.0.1" react-native: ">=0.64.1" - checksum: 2a85fe8976f50003c7eeda7c752fa12f7b9af24089b07e86b2b93505eeb0e91d1f9268b8a9166091432b39a535b676efb0eaa0a0d01e8f7f6ae33d0f06b2cf37 + checksum: 3ca207bae3865fc4275393135f5cd4a46c52678100d4308fe1008d0167d8d5ae8bd1cab558b364d7ad60e5c96cb38497cd10b0109e15376c623ef9849cfb3a32 languageName: node linkType: hard @@ -12547,13 +12816,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^3.0.0": - version: 3.0.1 - resolution: "webidl-conversions@npm:3.0.1" - checksum: c92a0a6ab95314bde9c32e1d0a6dfac83b578f8fa5f21e675bc2706ed6981bc26b7eb7e6a1fab158e5ce4adf9caa4a0aee49a52505d4d13c7be545f15021b17c - languageName: node - linkType: hard - "whatwg-fetch@npm:^3.0.0": version: 3.6.20 resolution: "whatwg-fetch@npm:3.6.20" @@ -12561,16 +12823,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^5.0.0": - version: 5.0.0 - resolution: "whatwg-url@npm:5.0.0" - dependencies: - tr46: ~0.0.3 - webidl-conversions: ^3.0.0 - checksum: b8daed4ad3356cc4899048a15b2c143a9aed0dfae1f611ebd55073310c7b910f522ad75d727346ad64203d7e6c79ef25eafd465f4d12775ca44b90fa82ed9e2c - languageName: node - linkType: hard - "which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" @@ -12740,17 +12992,6 @@ __metadata: languageName: node linkType: hard -"write-file-atomic@npm:^2.3.0": - version: 2.4.3 - resolution: "write-file-atomic@npm:2.4.3" - dependencies: - graceful-fs: ^4.1.11 - imurmurhash: ^0.1.4 - signal-exit: ^3.0.2 - checksum: 2db81f92ae974fd87ab4a5e7932feacaca626679a7c98fcc73ad8fcea5a1950eab32fa831f79e9391ac99b562ca091ad49be37a79045bd65f595efbb8f4596ae - languageName: node - linkType: hard - "write-file-atomic@npm:^4.0.2": version: 4.0.2 resolution: "write-file-atomic@npm:4.0.2" @@ -12761,6 +13002,16 @@ __metadata: languageName: node linkType: hard +"write-file-atomic@npm:^5.0.1": + version: 5.0.1 + resolution: "write-file-atomic@npm:5.0.1" + dependencies: + imurmurhash: ^0.1.4 + signal-exit: ^4.0.1 + checksum: 8dbb0e2512c2f72ccc20ccedab9986c7d02d04039ed6e8780c987dc4940b793339c50172a1008eed7747001bfacc0ca47562668a069a7506c46c77d7ba3926a9 + languageName: node + linkType: hard + "ws@npm:^6.2.3": version: 6.2.3 resolution: "ws@npm:6.2.3"