@xrnjs/app-template 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/$package.json +51 -0
- package/.env +6 -0
- package/.env.prod +6 -0
- package/LICENSE +202 -0
- package/android/app/build.gradle +176 -0
- package/android/app/build_defs.bzl +19 -0
- package/android/app/debug.keystore +0 -0
- package/android/app/proguard-rules.pro +10 -0
- package/android/app/src/debug/AndroidManifest.xml +13 -0
- package/android/app/src/debug/java/com/xrn/template/ReactNativeFlipper.java +73 -0
- package/android/app/src/main/AndroidManifest.xml +46 -0
- package/android/app/src/main/assets/index.main-bundle.bundle +178940 -0
- package/android/app/src/main/assets/index.sub-bundle.bundle +178928 -0
- package/android/app/src/main/assets/xrn-manifest.json +1 -0
- package/android/app/src/main/java/com/xrn/template/MainActivity.kt +52 -0
- package/android/app/src/main/java/com/xrn/template/MainApplication.kt +91 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/XBundleInfoHook.kt +9 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/XDevSupportParams.kt +6 -0
- package/android/app/src/main/java/com/xrn/template/multibundle/XRNHostParams.kt +81 -0
- package/android/app/src/main/java/com/xrn/template/navigation/MainClazzFactory.kt +14 -0
- package/android/app/src/main/java/com/xrn/template/navigation/XBundleActivity.kt +56 -0
- package/android/app/src/main/java/com/xrn/template/navigation/XMainActivity.kt +4 -0
- package/android/app/src/main/java/com/xrn/template/utils/DevEntryUtil.kt +29 -0
- package/android/app/src/main/java/com/xrn/template/utils/LifecycleAwareRunnable.kt +37 -0
- package/android/app/src/main/jni/CMakeLists.txt +7 -0
- package/android/app/src/main/jni/MainApplicationModuleProvider.cpp +32 -0
- package/android/app/src/main/jni/MainApplicationModuleProvider.h +16 -0
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.cpp +45 -0
- package/android/app/src/main/jni/MainApplicationTurboModuleManagerDelegate.h +38 -0
- package/android/app/src/main/jni/MainComponentsRegistry.cpp +65 -0
- package/android/app/src/main/jni/MainComponentsRegistry.h +32 -0
- package/android/app/src/main/jni/OnLoad.cpp +11 -0
- package/android/app/src/main/res/drawable/bg_debug_entry.xml +15 -0
- package/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/android/app/src/main/res/drawable-hdpi/node_modules_reactnavigation_elements_src_assets_backicon.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_logbox_ui_logboximages_alerttriangle.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_logbox_ui_logboximages_chevronleft.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_logbox_ui_logboximages_chevronright.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_logbox_ui_logboximages_close.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnative_libraries_logbox_ui_logboximages_loader.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backicon.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_reactnavigation_elements_src_assets_backiconmask.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_images_fail_icon.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_images_success_icon.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_network_close.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_network_filter.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_network_more.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_network_search.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_devtools_assets_network_share.png +0 -0
- package/android/app/src/main/res/drawable-mdpi/node_modules_xrn_navigation_assets_backicon.png +0 -0
- package/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_copy_icon.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_app_info.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_app_start_time.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_file.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_fps.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_h5.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_health.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_kadun.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_net.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_qingchu.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_scan.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_self.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_setting.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_view_check.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_view_level.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_doraemon_viewmetrics.png +0 -0
- package/android/app/src/main/res/drawable-xxhdpi/node_modules_xrn_devtools_assets_images_rebackwhiteicon.png +0 -0
- package/android/app/src/main/res/drawable-xxxhdpi/node_modules_reactnavigation_elements_src_assets_backicon.png +0 -0
- package/android/app/src/main/res/layout/activity_splash.xml +16 -0
- package/android/app/src/main/res/layout/layout_rn_dev_float.xml +18 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/android/app/src/main/res/raw/bundle_config.json +23 -0
- package/android/app/src/main/res/raw/launch_screen.json +1 -0
- package/android/app/src/main/res/values/strings.xml +3 -0
- package/android/app/src/main/res/values/styles.xml +9 -0
- package/android/build.gradle +83 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/android/gradle.properties +63 -0
- package/android/gradlew +234 -0
- package/android/gradlew.bat +89 -0
- package/android/settings.gradle +18 -0
- package/harmony/.clang-format +64 -0
- package/harmony/.clang-tidy +1 -0
- package/harmony/.clangd +13 -0
- package/harmony/AppScope/app.json5 +10 -0
- package/harmony/AppScope/resources/base/element/string.json +8 -0
- package/harmony/AppScope/resources/base/media/app_icon.png +0 -0
- package/harmony/XRNTemplate-dev.cer +52 -0
- package/harmony/XRNTemplate-devDebug.p7b +0 -0
- package/harmony/XRNTemplate.p12 +0 -0
- package/harmony/build-profile.json5 +91 -0
- package/harmony/code-linter.json5 +20 -0
- package/harmony/entry/build-profile.json5 +33 -0
- package/harmony/entry/hvigorfile.ts +6 -0
- package/harmony/entry/obfuscation-rules.txt +23 -0
- package/harmony/entry/oh-package-lock.json5 +486 -0
- package/harmony/entry/oh-package.json5 +59 -0
- package/harmony/entry/src/main/cpp/CMakeLists.txt +72 -0
- package/harmony/entry/src/main/cpp/PackageProvider.cpp +51 -0
- package/harmony/entry/src/main/cpp/generated/BundleNavigation.cpp +25 -0
- package/harmony/entry/src/main/cpp/generated/BundleNavigation.h +21 -0
- package/harmony/entry/src/main/cpp/generated/ConfigNativeModule.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/ConfigNativeModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/GetRandomValuesNativeModule.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/GetRandomValuesNativeModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/ImageResizer.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/ImageResizer.h +21 -0
- package/harmony/entry/src/main/cpp/generated/NativeHarmonyTouchId.cpp +22 -0
- package/harmony/entry/src/main/cpp/generated/NativeHarmonyTouchId.h +21 -0
- package/harmony/entry/src/main/cpp/generated/OreitationLockerNativeModule.cpp +31 -0
- package/harmony/entry/src/main/cpp/generated/OreitationLockerNativeModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNCCameraRoll.cpp +28 -0
- package/harmony/entry/src/main/cpp/generated/RNCCameraRoll.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNCCameraRollPermission.cpp +26 -0
- package/harmony/entry/src/main/cpp/generated/RNCCameraRollPermission.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNCWebViewComponentDescriptor.h +43 -0
- package/harmony/entry/src/main/cpp/generated/RNCWebViewJSIBinder.h +120 -0
- package/harmony/entry/src/main/cpp/generated/RNCWebViewModule.cpp +22 -0
- package/harmony/entry/src/main/cpp/generated/RNCWebViewModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNDeviceInfo.cpp +137 -0
- package/harmony/entry/src/main/cpp/generated/RNDeviceInfo.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNDocumentPicker.cpp +24 -0
- package/harmony/entry/src/main/cpp/generated/RNDocumentPicker.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerButtonComponentDescriptor.h +43 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerButtonJSIBinder.h +38 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerModule.cpp +28 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerRootViewComponentDescriptor.h +43 -0
- package/harmony/entry/src/main/cpp/generated/RNGestureHandlerRootViewJSIBinder.h +31 -0
- package/harmony/entry/src/main/cpp/generated/RNLocalize.cpp +31 -0
- package/harmony/entry/src/main/cpp/generated/RNLocalize.h +21 -0
- package/harmony/entry/src/main/cpp/generated/RNOHGeneratedPackage.h +191 -0
- package/harmony/entry/src/main/cpp/generated/RTNCodePush.cpp +48 -0
- package/harmony/entry/src/main/cpp/generated/RTNCodePush.h +21 -0
- package/harmony/entry/src/main/cpp/generated/ReactNativeBlobUtil.cpp +51 -0
- package/harmony/entry/src/main/cpp/generated/ReactNativeBlobUtil.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNAppUtilsModule.cpp +29 -0
- package/harmony/entry/src/main/cpp/generated/XRNAppUtilsModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNAssetLoaderModule.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNAssetLoaderModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNBundleModule.cpp +27 -0
- package/harmony/entry/src/main/cpp/generated/XRNBundleModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNDebugToolsModule.cpp +32 -0
- package/harmony/entry/src/main/cpp/generated/XRNDebugToolsModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNFileModule.cpp +22 -0
- package/harmony/entry/src/main/cpp/generated/XRNFileModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNLoadingModule.cpp +25 -0
- package/harmony/entry/src/main/cpp/generated/XRNLoadingModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNMultiBundleModule.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNMultiBundleModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNNativeStorageModule.cpp +26 -0
- package/harmony/entry/src/main/cpp/generated/XRNNativeStorageModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNNavigation.cpp +23 -0
- package/harmony/entry/src/main/cpp/generated/XRNNavigation.h +21 -0
- package/harmony/entry/src/main/cpp/generated/XRNToastModule.cpp +22 -0
- package/harmony/entry/src/main/cpp/generated/XRNToastModule.h +21 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/RNOH/generated/BaseReactNativeOhTplAsyncStoragePackage.h +68 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/RNOH/generated/turbo_modules/RNCAsyncStorage.cpp +26 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/RNOH/generated/turbo_modules/RNCAsyncStorage.h +21 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/ComponentDescriptors.h +22 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/EventEmitters.cpp +18 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/EventEmitters.h +19 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/Props.cpp +21 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/Props.h +20 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/ShadowNodes.cpp +19 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/ShadowNodes.h +25 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/States.cpp +18 -0
- package/harmony/entry/src/main/cpp/generated/_react_native_oh_tpl_async_storage/react/renderer/components/_react_native_oh_tpl_async_storage/States.h +23 -0
- package/harmony/entry/src/main/ets/BundleHelper.ets +198 -0
- package/harmony/entry/src/main/ets/Constants.ets +2 -0
- package/harmony/entry/src/main/ets/MainAbilityStage.ets +60 -0
- package/harmony/entry/src/main/ets/entryability/EntryAbility.ets +57 -0
- package/harmony/entry/src/main/ets/entrybackupability/EntryBackupAbility.ets +12 -0
- package/harmony/entry/src/main/ets/lottie/launch_screen.json +1 -0
- package/harmony/entry/src/main/ets/module/devtools/components/FloatBall.ets +359 -0
- package/harmony/entry/src/main/ets/navDestination/BizModuleContainer.ets +8 -0
- package/harmony/entry/src/main/ets/navDestination/MainModuleContainer.ets +8 -0
- package/harmony/entry/src/main/ets/navDestination/Splash.ets +79 -0
- package/harmony/entry/src/main/ets/pages/Index.ets +66 -0
- package/harmony/entry/src/main/module.json5 +68 -0
- package/harmony/entry/src/main/resources/base/element/color.json +12 -0
- package/harmony/entry/src/main/resources/base/element/string.json +19 -0
- package/harmony/entry/src/main/resources/base/media/background.png +0 -0
- package/harmony/entry/src/main/resources/base/media/foreground.png +0 -0
- package/harmony/entry/src/main/resources/base/media/ic_back.png +0 -0
- package/harmony/entry/src/main/resources/base/media/layered_image.json +7 -0
- package/harmony/entry/src/main/resources/base/media/startIcon.png +0 -0
- package/harmony/entry/src/main/resources/base/profile/backup_config.json +3 -0
- package/harmony/entry/src/main/resources/base/profile/main_pages.json +5 -0
- package/harmony/entry/src/main/resources/en_US/element/string.json +16 -0
- package/harmony/entry/src/main/resources/rawfile/bundle_config.json5 +23 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/AntDesign.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Entypo.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/EvilIcons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Feather.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome5_Brands.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome5_Regular.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome5_Solid.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome6_Brands.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome6_Regular.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/FontAwesome6_Solid.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Fontisto.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Foundation.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Ionicons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/MaterialCommunityIcons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/MaterialIcons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Octicons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/SimpleLineIcons.ttf +0 -0
- package/harmony/entry/src/main/resources/rawfile/fonts/Zocial.ttf +0 -0
- package/harmony/entry/src/main/resources/zh_CN/element/string.json +16 -0
- package/harmony/entry/src/mock/mock-config.json5 +2 -0
- package/harmony/entry/src/ohosTest/ets/test/Ability.test.ets +35 -0
- package/harmony/entry/src/ohosTest/ets/test/List.test.ets +5 -0
- package/harmony/entry/src/ohosTest/module.json5 +13 -0
- package/harmony/entry/src/test/List.test.ets +5 -0
- package/harmony/entry/src/test/LocalUnit.test.ets +33 -0
- package/harmony/hvigor/hvigor-config.json5 +22 -0
- package/harmony/hvigorfile.ts +6 -0
- package/harmony/material/ac/6a282c38039b44b2949441a85986c35d +1 -0
- package/harmony/material/ce/b2a765b7b925475797f45ae55c8d3ad3 +0 -0
- package/harmony/material/fd/0/9cbed212f275489b874de30a02692f59 +1 -0
- package/harmony/material/fd/1/dc8ea45ef44142d09bca7eeacdc5ecac +1 -0
- package/harmony/material/fd/2/d34888210a5846829d745f65295f90b7 +1 -0
- package/harmony/oh-package-lock.json5 +27 -0
- package/harmony/oh-package.json5 +17 -0
- package/ios/.xcode.env +11 -0
- package/ios/BundleEventCenter/XTBundleProvider.h +17 -0
- package/ios/BundleEventCenter/XTBundleProvider.m +129 -0
- package/ios/BundleEventCenter/XTBundleViewControllerFactory.h +18 -0
- package/ios/BundleEventCenter/XTBundleViewControllerFactory.m +39 -0
- package/ios/BundleEventCenter/bundleController/XTBundleViewController.h +16 -0
- package/ios/BundleEventCenter/bundleController/XTBundleViewController.m +35 -0
- package/ios/BundleEventCenter/bundleController/XTMainBundleViewController.h +16 -0
- package/ios/BundleEventCenter/bundleController/XTMainBundleViewController.m +41 -0
- package/ios/BundleEventCenter/bundleController/xtBundles.plist +14 -0
- package/ios/Podfile +221 -0
- package/ios/Podfile.lock +955 -0
- package/ios/RNDebug/DebugPlugin/XTPluginManage.h +24 -0
- package/ios/RNDebug/DebugPlugin/XTPluginManage.m +93 -0
- package/ios/RNDebug/Views/XTLoadJSErrorTipPanel.swift +231 -0
- package/ios/RNDebug/Views/XTScanQRPlugin.swift +122 -0
- package/ios/RNDebug/Views/XTSuspendBall.h +34 -0
- package/ios/RNDebug/Views/XTSuspendBall.m +357 -0
- package/ios/XRNTemplate/AppDelegate.h +8 -0
- package/ios/XRNTemplate/AppDelegate.mm +168 -0
- package/ios/XRNTemplate/Images.xcassets/AppIcon.appiconset/Contents.json +55 -0
- package/ios/XRNTemplate/Images.xcassets/AppIcon.appiconset/icon120_120@2x.png +0 -0
- package/ios/XRNTemplate/Images.xcassets/AppIcon.appiconset/icon180_180@3x.png +0 -0
- package/ios/XRNTemplate/Images.xcassets/Contents.json +6 -0
- package/ios/XRNTemplate/Images.xcassets/launch_icon.imageset/Contents.json +21 -0
- package/ios/XRNTemplate/Images.xcassets/launch_icon.imageset/launch_icon@2x.png +0 -0
- package/ios/XRNTemplate/Info.plist +82 -0
- package/ios/XRNTemplate/LaunchScreen.storyboard +43 -0
- package/ios/XRNTemplate/main.m +10 -0
- package/ios/XRNTemplate-Bridging-Header.h +29 -0
- package/ios/XRNTemplate.xcodeproj/project.pbxproj +1022 -0
- package/ios/XRNTemplate.xcodeproj/xcshareddata/xcschemes/XRNTemplate.xcscheme +88 -0
- package/ios/XRNTemplate.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/XRNTemplate.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/XRNTemplateTests/Info.plist +24 -0
- package/ios/XRNTemplateTests/XRNTemplateTests.m +66 -0
- package/main-bundle/App.tsx +29 -0
- package/main-bundle/app.json +15 -0
- package/main-bundle/babel.config.js +4 -0
- package/main-bundle/index.ts +3 -0
- package/main-bundle/metro.config.js +21 -0
- package/main-bundle/package.json +35 -0
- package/main-bundle/router.ts +18 -0
- package/main-bundle/tsconfig.json +26 -0
- package/main-bundle/xrn.config.ts +13 -0
- package/main-bundle/yarn.lock +13622 -0
- package/package.json +16 -0
- package/react-native.config.js +36 -0
- package/sub-bundle/App.tsx +23 -0
- package/sub-bundle/app.json +15 -0
- package/sub-bundle/babel.config.js +4 -0
- package/sub-bundle/index.ts +3 -0
- package/sub-bundle/metro.config.js +21 -0
- package/sub-bundle/package.json +36 -0
- package/sub-bundle/router.ts +18 -0
- package/sub-bundle/tsconfig.json +26 -0
- package/sub-bundle/xrn.config.ts +13 -0
- package/sub-bundle/yarn.lock +13652 -0
- package/xrn-react-native-xcode.sh +172 -0
- package/xrn.config.json +46 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "XRNNativeStorageModule.h"
|
|
11
|
+
|
|
12
|
+
namespace rnoh {
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
XRNNativeStorageModule::XRNNativeStorageModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
|
+
methodMap_ = {
|
|
17
|
+
ARK_ASYNC_METHOD_METADATA(getItem, 1),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(setItem, 2),
|
|
19
|
+
ARK_ASYNC_METHOD_METADATA(removeItem, 1),
|
|
20
|
+
ARK_METHOD_METADATA(getItemSync, 1),
|
|
21
|
+
ARK_METHOD_METADATA(setItemSync, 2),
|
|
22
|
+
ARK_METHOD_METADATA(removeItemSync, 1),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
13
|
+
|
|
14
|
+
namespace rnoh {
|
|
15
|
+
|
|
16
|
+
class JSI_EXPORT XRNNativeStorageModule : public ArkTSTurboModule {
|
|
17
|
+
public:
|
|
18
|
+
XRNNativeStorageModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "XRNNavigation.h"
|
|
11
|
+
|
|
12
|
+
namespace rnoh {
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
XRNNavigation::XRNNavigation(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
|
+
methodMap_ = {
|
|
17
|
+
ARK_METHOD_METADATA(setNavigationKey, 1),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(dispatchAction, 1),
|
|
19
|
+
ARK_ASYNC_METHOD_METADATA(getCurrentModuleInfo, 0),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
13
|
+
|
|
14
|
+
namespace rnoh {
|
|
15
|
+
|
|
16
|
+
class JSI_EXPORT XRNNavigation : public ArkTSTurboModule {
|
|
17
|
+
public:
|
|
18
|
+
XRNNavigation(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "XRNToastModule.h"
|
|
11
|
+
|
|
12
|
+
namespace rnoh {
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
XRNToastModule::XRNToastModule(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
|
+
methodMap_ = {
|
|
17
|
+
ARK_ASYNC_METHOD_METADATA(showToast, 2),
|
|
18
|
+
ARK_ASYNC_METHOD_METADATA(hideToast, 0),
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 1
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
13
|
+
|
|
14
|
+
namespace rnoh {
|
|
15
|
+
|
|
16
|
+
class JSI_EXPORT XRNToastModule : public ArkTSTurboModule {
|
|
17
|
+
public:
|
|
18
|
+
XRNToastModule(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
#pragma once
|
|
9
|
+
|
|
10
|
+
#include "RNOH/Package.h"
|
|
11
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
12
|
+
#include "RNOH/generated/turbo_modules/RNCAsyncStorage.h"
|
|
13
|
+
|
|
14
|
+
namespace rnoh {
|
|
15
|
+
|
|
16
|
+
class BaseReactNativeOhTplAsyncStoragePackageTurboModuleFactoryDelegate : public TurboModuleFactoryDelegate {
|
|
17
|
+
public:
|
|
18
|
+
SharedTurboModule createTurboModule(Context ctx, const std::string &name) const override {
|
|
19
|
+
if (name == "RNCAsyncStorage") {
|
|
20
|
+
return std::make_shared<RNCAsyncStorage>(ctx, name);
|
|
21
|
+
}
|
|
22
|
+
return nullptr;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
class BaseReactNativeOhTplAsyncStoragePackageEventEmitRequestHandler : public EventEmitRequestHandler {
|
|
27
|
+
public:
|
|
28
|
+
void handleEvent(Context const &ctx) override {
|
|
29
|
+
auto eventEmitter = ctx.shadowViewRegistry->getEventEmitter<facebook::react::EventEmitter>(ctx.tag);
|
|
30
|
+
if (eventEmitter == nullptr) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
std::vector<std::string> supportedEventNames = {
|
|
35
|
+
};
|
|
36
|
+
if (std::find(supportedEventNames.begin(), supportedEventNames.end(), ctx.eventName) != supportedEventNames.end()) {
|
|
37
|
+
eventEmitter->dispatchEvent(ctx.eventName, ArkJS(ctx.env).getDynamic(ctx.payload));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class BaseReactNativeOhTplAsyncStoragePackage : public Package {
|
|
44
|
+
public:
|
|
45
|
+
BaseReactNativeOhTplAsyncStoragePackage(Package::Context ctx) : Package(ctx){};
|
|
46
|
+
|
|
47
|
+
std::unique_ptr<TurboModuleFactoryDelegate> createTurboModuleFactoryDelegate() override {
|
|
48
|
+
return std::make_unique<BaseReactNativeOhTplAsyncStoragePackageTurboModuleFactoryDelegate>();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
std::vector<facebook::react::ComponentDescriptorProvider> createComponentDescriptorProviders() override {
|
|
52
|
+
return {
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
ComponentJSIBinderByString createComponentJSIBinderByName() override {
|
|
57
|
+
return {
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
EventEmitRequestHandlers createEventEmitRequestHandlers() override {
|
|
62
|
+
return {
|
|
63
|
+
std::make_shared<BaseReactNativeOhTplAsyncStoragePackageEventEmitRequestHandler>(),
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 2
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#include "RNCAsyncStorage.h"
|
|
11
|
+
|
|
12
|
+
namespace rnoh {
|
|
13
|
+
using namespace facebook;
|
|
14
|
+
|
|
15
|
+
RNCAsyncStorage::RNCAsyncStorage(const ArkTSTurboModule::Context ctx, const std::string name) : ArkTSTurboModule(ctx, name) {
|
|
16
|
+
methodMap_ = {
|
|
17
|
+
ARK_METHOD_METADATA(multiGet, 2),
|
|
18
|
+
ARK_METHOD_METADATA(multiSet, 2),
|
|
19
|
+
ARK_METHOD_METADATA(multiRemove, 2),
|
|
20
|
+
ARK_METHOD_METADATA(multiMerge, 2),
|
|
21
|
+
ARK_METHOD_METADATA(getAllKeys, 1),
|
|
22
|
+
ARK_METHOD_METADATA(clear, 1),
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by "react-native codegen-harmony"
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be
|
|
5
|
+
* lost once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generatorVersion: 2
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include "RNOH/ArkTSTurboModule.h"
|
|
13
|
+
|
|
14
|
+
namespace rnoh {
|
|
15
|
+
|
|
16
|
+
class JSI_EXPORT RNCAsyncStorage : public ArkTSTurboModule {
|
|
17
|
+
public:
|
|
18
|
+
RNCAsyncStorage(const ArkTSTurboModule::Context ctx, const std::string name);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
} // namespace rnoh
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateComponentDescriptorH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/ShadowNodes.h>
|
|
14
|
+
#include <react/renderer/core/ConcreteComponentDescriptor.h>
|
|
15
|
+
|
|
16
|
+
namespace facebook {
|
|
17
|
+
namespace react {
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
} // namespace react
|
|
22
|
+
} // namespace facebook
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/EventEmitters.h>
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateEventEmitterH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
#include <react/renderer/components/view/ViewEventEmitter.h>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/Props.h>
|
|
12
|
+
#include <react/renderer/core/PropsParserContext.h>
|
|
13
|
+
#include <react/renderer/core/propsConversions.h>
|
|
14
|
+
|
|
15
|
+
namespace facebook {
|
|
16
|
+
namespace react {
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
} // namespace react
|
|
21
|
+
} // namespace facebook
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GeneratePropsH.js
|
|
9
|
+
*/
|
|
10
|
+
#pragma once
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
namespace facebook {
|
|
15
|
+
namespace react {
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
} // namespace react
|
|
20
|
+
} // namespace facebook
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateShadowNodeCpp.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/ShadowNodes.h>
|
|
12
|
+
|
|
13
|
+
namespace facebook {
|
|
14
|
+
namespace react {
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
} // namespace react
|
|
19
|
+
} // namespace facebook
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateShadowNodeH.js
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
#pragma once
|
|
12
|
+
|
|
13
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/EventEmitters.h>
|
|
14
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/Props.h>
|
|
15
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/States.h>
|
|
16
|
+
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
|
|
17
|
+
#include <jsi/jsi.h>
|
|
18
|
+
|
|
19
|
+
namespace facebook {
|
|
20
|
+
namespace react {
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
} // namespace react
|
|
25
|
+
} // namespace facebook
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
4
|
+
*
|
|
5
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
6
|
+
* once the code is regenerated.
|
|
7
|
+
*
|
|
8
|
+
* @generated by codegen project: GenerateStateCpp.js
|
|
9
|
+
*/
|
|
10
|
+
#include <react/renderer/components/_react_native_oh_tpl_async_storage/States.h>
|
|
11
|
+
|
|
12
|
+
namespace facebook {
|
|
13
|
+
namespace react {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
} // namespace react
|
|
18
|
+
} // namespace facebook
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
|
|
3
|
+
*
|
|
4
|
+
* Do not edit this file as changes may cause incorrect behavior and will be lost
|
|
5
|
+
* once the code is regenerated.
|
|
6
|
+
*
|
|
7
|
+
* @generated by codegen project: GenerateStateH.js
|
|
8
|
+
*/
|
|
9
|
+
#pragma once
|
|
10
|
+
|
|
11
|
+
#ifdef ANDROID
|
|
12
|
+
#include <folly/dynamic.h>
|
|
13
|
+
#include <react/renderer/mapbuffer/MapBuffer.h>
|
|
14
|
+
#include <react/renderer/mapbuffer/MapBufferBuilder.h>
|
|
15
|
+
#endif
|
|
16
|
+
|
|
17
|
+
namespace facebook {
|
|
18
|
+
namespace react {
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
} // namespace react
|
|
23
|
+
} // namespace facebook
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { AsyncStoragePackage } from "@react-native-oh-tpl/async-storage";
|
|
2
|
+
import { ClipboardPackage } from "@react-native-oh-tpl/clipboard";
|
|
3
|
+
import { CookiesPackage } from "@react-native-oh-tpl/cookies";
|
|
4
|
+
import { LottieAnimationView, LOTTIE_TYPE } from "@react-native-oh-tpl/lottie-react-native";
|
|
5
|
+
import { RNConfigPackage } from "@react-native-oh-tpl/react-native-config";
|
|
6
|
+
import { RNDeviceInfoPackage } from "@react-native-oh-tpl/react-native-device-info";
|
|
7
|
+
import { RNGetRandomValuesPackage } from "@react-native-oh-tpl/react-native-get-random-values";
|
|
8
|
+
import { RNLocalizePackage } from "@react-native-oh-tpl/react-native-localize";
|
|
9
|
+
import { PermissionsPackage } from "@react-native-oh-tpl/react-native-permissions";
|
|
10
|
+
import { SafeAreaViewPackage } from "@react-native-oh-tpl/react-native-safe-area-context";
|
|
11
|
+
import { SvgPackage } from "@react-native-oh-tpl/react-native-svg";
|
|
12
|
+
import { TouchIdPackage } from "@react-native-oh-tpl/react-native-touch-id";
|
|
13
|
+
import { CameraRollPackage } from "@react-native-oh-tpl/camera-roll"
|
|
14
|
+
import { LottieAnimationViewPackage } from "@react-native-oh-tpl/lottie-react-native/ts"
|
|
15
|
+
import { NetInfoPackage } from "@react-native-oh-tpl/netinfo/ts"
|
|
16
|
+
import { BlobUtilPackage } from "@react-native-oh-tpl/react-native-blob-util"
|
|
17
|
+
import { DocumentPickerPackage } from "@react-native-oh-tpl/react-native-document-picker/ts"
|
|
18
|
+
import { FastImagePackage } from "@react-native-oh-tpl/react-native-fast-image"
|
|
19
|
+
import { GestureHandlerPackage } from "@react-native-oh-tpl/react-native-gesture-handler"
|
|
20
|
+
import { ImagePickerViewPackage } from "@react-native-oh-tpl/react-native-image-picker"
|
|
21
|
+
import { ImageResizerPackage } from "@react-native-oh-tpl/react-native-image-resizer"
|
|
22
|
+
import { RNOrientationLockerPackage } from "@react-native-oh-tpl/react-native-orientation-locker"
|
|
23
|
+
import { ReanimatedPackage } from "@react-native-oh-tpl/react-native-reanimated/ts"
|
|
24
|
+
import { RNCVideoPackage } from "@react-native-oh-tpl/react-native-video/ts"
|
|
25
|
+
|
|
26
|
+
import { VisionCameraModulePackage } from "@react-native-oh-tpl/react-native-vision-camera"
|
|
27
|
+
import { PushNotificationPackage } from "@react-native-ohos/push-notification-ios"
|
|
28
|
+
import { FsPackage } from "@react-native-ohos/react-native-fs"
|
|
29
|
+
import { WebViewPackage} from '@react-native-oh-tpl/react-native-webview/ts'
|
|
30
|
+
import { CodePushPackage } from 'xrn-code-push'
|
|
31
|
+
import { RTNPdfView, PDF_VIEW_TYPE } from '@react-native-oh-tpl/react-native-pdf';
|
|
32
|
+
import { WebView, WEB_VIEW } from "@react-native-oh-tpl/react-native-webview"
|
|
33
|
+
import { RNCVideo, RNC_VIDEO_TYPE } from "@react-native-oh-tpl/react-native-video"
|
|
34
|
+
import { VisionCameraView } from "@react-native-oh-tpl/react-native-vision-camera";
|
|
35
|
+
import { XRNNativeStoragePackage } from 'xrn-native-storage'
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
import {
|
|
39
|
+
ComponentBuilderContext,
|
|
40
|
+
RNPackage,
|
|
41
|
+
RNPackageContext,
|
|
42
|
+
WrappedCustomRNComponentBuilder } from "@rnoh/react-native-openharmony/src/main/ets/RNOH";
|
|
43
|
+
import { RNInstance, RNInstanceOptions } from "@rnoh/react-native-openharmony/src/main/ets/RNOH/RNInstance";
|
|
44
|
+
import { BundleInfo, RNContainerOptions, XRNMultiBundlePackage } from "xrn-multi-bundle";
|
|
45
|
+
import { XRNLoadingPackage } from "xrn-loading";
|
|
46
|
+
import { SmartRefreshPackage } from "@react-native-oh-tpl/react-native-smartrefreshlayout";
|
|
47
|
+
import { XRNBundlePackage } from "xrn-bundle";
|
|
48
|
+
import { XRNNavigationPackage } from "xrn-navigation";
|
|
49
|
+
import { XRNAppUtilsPackage, XRNFilePackage, XRNToastPackage } from "xrn-app-utils";
|
|
50
|
+
import { XRNDebugToolsPackage } from 'xrn-debug-tools';
|
|
51
|
+
|
|
52
|
+
export function getRNContainerOptions(): RNContainerOptions {
|
|
53
|
+
return {
|
|
54
|
+
getRNInstanceOptions: getRNInstanceOptions,
|
|
55
|
+
getWrappedCustomRNComponentBuilder: getWrappedCustomRNComponentBuilder,
|
|
56
|
+
onSetup: onSetup
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function getRNInstanceOptions(bundleInfo: BundleInfo): RNInstanceOptions {
|
|
61
|
+
return {
|
|
62
|
+
createRNPackages: (ctx: RNPackageContext) => {
|
|
63
|
+
return createRNPackages(ctx, bundleInfo)
|
|
64
|
+
},
|
|
65
|
+
enableNDKTextMeasuring: true, // 该项必须为true,用于开启NDK文本测算
|
|
66
|
+
enableBackgroundExecutor: false,
|
|
67
|
+
enableCAPIArchitecture: true, // 该项必须为true,用于开启CAPI
|
|
68
|
+
arkTsComponentNames: arkTsComponentNames,
|
|
69
|
+
enableDebugger: true,
|
|
70
|
+
fontResourceByFontFamily: fontResourceByFontFamily
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function getWrappedCustomRNComponentBuilder(bundleInfo: BundleInfo): WrappedCustomRNComponentBuilder | undefined {
|
|
75
|
+
return wrappedCustomRNComponentBuilder
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function onSetup(rnInstance: RNInstance, bundleName: string): Promise<void> {
|
|
79
|
+
|
|
80
|
+
rnInstance.subscribeToLifecycleEvents('JS_BUNDLE_EXECUTION_FINISH', (bundleInfo) => {
|
|
81
|
+
})
|
|
82
|
+
return Promise.resolve()
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function createRNPackages(ctx: RNPackageContext, bundleInfo: BundleInfo): RNPackage[] {
|
|
86
|
+
return [
|
|
87
|
+
new RNDeviceInfoPackage(ctx),
|
|
88
|
+
new RNLocalizePackage(ctx),
|
|
89
|
+
new RNGetRandomValuesPackage(ctx),
|
|
90
|
+
new FsPackage(ctx),
|
|
91
|
+
new GestureHandlerPackage(ctx),
|
|
92
|
+
new SvgPackage(ctx),
|
|
93
|
+
new WebViewPackage(ctx),
|
|
94
|
+
new TouchIdPackage(ctx),
|
|
95
|
+
new PermissionsPackage(ctx),
|
|
96
|
+
new CookiesPackage(ctx),
|
|
97
|
+
new LottieAnimationViewPackage(ctx),
|
|
98
|
+
new RNConfigPackage(ctx),
|
|
99
|
+
new SafeAreaViewPackage(ctx),
|
|
100
|
+
new AsyncStoragePackage(ctx),
|
|
101
|
+
new ClipboardPackage(ctx),
|
|
102
|
+
// new GeneratedPackage(ctx),
|
|
103
|
+
new CameraRollPackage(ctx),
|
|
104
|
+
new NetInfoPackage(ctx),
|
|
105
|
+
new PushNotificationPackage(ctx),
|
|
106
|
+
new BlobUtilPackage(ctx),
|
|
107
|
+
new DocumentPickerPackage(ctx),
|
|
108
|
+
new FastImagePackage(ctx),
|
|
109
|
+
new ImagePickerViewPackage(ctx),
|
|
110
|
+
new ImageResizerPackage(ctx),
|
|
111
|
+
new RNOrientationLockerPackage(ctx),
|
|
112
|
+
new ReanimatedPackage(ctx),
|
|
113
|
+
new RNCVideoPackage(ctx),
|
|
114
|
+
new VisionCameraModulePackage(ctx),
|
|
115
|
+
new CodePushPackage(ctx, bundleInfo, "http://cp.xtrfr.cn"),
|
|
116
|
+
new XRNLoadingPackage(ctx),
|
|
117
|
+
new SmartRefreshPackage(ctx),
|
|
118
|
+
new XRNMultiBundlePackage(ctx),
|
|
119
|
+
new XRNBundlePackage(ctx, bundleInfo.bundleName),
|
|
120
|
+
new XRNAppUtilsPackage(ctx),
|
|
121
|
+
new XRNFilePackage(ctx),
|
|
122
|
+
new XRNNavigationPackage(ctx),
|
|
123
|
+
new XRNNativeStoragePackage(ctx),
|
|
124
|
+
new XRNToastPackage(ctx),
|
|
125
|
+
new XRNDebugToolsPackage(ctx, bundleInfo.bundleName),
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@Builder
|
|
130
|
+
export function buildCustomRNComponent(ctx: ComponentBuilderContext) {
|
|
131
|
+
|
|
132
|
+
if (ctx.componentName === LOTTIE_TYPE) {
|
|
133
|
+
LottieAnimationView({
|
|
134
|
+
ctx: ctx.rnComponentContext,
|
|
135
|
+
tag: ctx.tag
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
if (ctx.componentName === PDF_VIEW_TYPE) {
|
|
139
|
+
RTNPdfView({
|
|
140
|
+
ctx: ctx.rnComponentContext,
|
|
141
|
+
tag: ctx.tag,
|
|
142
|
+
})
|
|
143
|
+
}
|
|
144
|
+
if (ctx.componentName === WEB_VIEW) {
|
|
145
|
+
WebView({
|
|
146
|
+
ctx: ctx.rnComponentContext,
|
|
147
|
+
tag: ctx.tag
|
|
148
|
+
})
|
|
149
|
+
}
|
|
150
|
+
if (ctx.componentName === RNC_VIDEO_TYPE) {
|
|
151
|
+
RNCVideo({
|
|
152
|
+
ctx: ctx.rnComponentContext,
|
|
153
|
+
tag: ctx.tag
|
|
154
|
+
})
|
|
155
|
+
}
|
|
156
|
+
if (ctx.componentName === VisionCameraView.NAME) {
|
|
157
|
+
VisionCameraView({
|
|
158
|
+
ctx: ctx.rnComponentContext,
|
|
159
|
+
tag: ctx.tag,
|
|
160
|
+
})
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
const wrappedCustomRNComponentBuilder = wrapBuilder(buildCustomRNComponent)
|
|
165
|
+
|
|
166
|
+
const arkTsComponentNames: Array<string> = [
|
|
167
|
+
PDF_VIEW_TYPE,
|
|
168
|
+
WEB_VIEW,
|
|
169
|
+
LOTTIE_TYPE,
|
|
170
|
+
RNC_VIDEO_TYPE,
|
|
171
|
+
VisionCameraView.NAME,
|
|
172
|
+
];
|
|
173
|
+
|
|
174
|
+
const fontResourceByFontFamily: Record<string, string | Resource> = {
|
|
175
|
+
'anticon': $rawfile('fonts/AntDesign.ttf'),
|
|
176
|
+
'Entypo': $rawfile('fonts/Entypo.ttf'),
|
|
177
|
+
'EvilIcons': $rawfile('fonts/EvilIcons.ttf'),
|
|
178
|
+
'Feather': $rawfile('fonts/Feather.ttf'),
|
|
179
|
+
'FontAwesome': $rawfile('fonts/FontAwesome.ttf'),
|
|
180
|
+
'FontAwesome5Brands-Regular': $rawfile('fonts/FontAwesome5_Brands.ttf'),
|
|
181
|
+
'FontAwesome5Free-Regular': $rawfile('fonts/FontAwesome5_Regular.ttf'),
|
|
182
|
+
'FontAwesome5Free-Solid': $rawfile('fonts/FontAwesome5_Solid.ttf'),
|
|
183
|
+
'FontAwesome6Brands-Regular': $rawfile('fonts/FontAwesome6_Brands.ttf'),
|
|
184
|
+
'FontAwesome6Free-Regular': $rawfile('fonts/FontAwesome6_Regular.ttf'),
|
|
185
|
+
'FontAwesome6Free-Solid': $rawfile('fonts/FontAwesome6_Solid.ttf'),
|
|
186
|
+
'Fontisto': $rawfile('fonts/Fontisto.ttf'),
|
|
187
|
+
'fontcustom': $rawfile('fonts/Foundation.ttf'),
|
|
188
|
+
'Ionicons': $rawfile('fonts/Ionicons.ttf'),
|
|
189
|
+
'Material Design Icons': $rawfile('fonts/MaterialCommunityIcons.ttf'),
|
|
190
|
+
'Material Icons': $rawfile('fonts/MaterialIcons.ttf'),
|
|
191
|
+
'Octicons': $rawfile('fonts/Octicons.ttf'),
|
|
192
|
+
'simple-line-icons': $rawfile('fonts/SimpleLineIcons.ttf'),
|
|
193
|
+
'zocial': $rawfile('fonts/Zocial.ttf'),
|
|
194
|
+
// 以下三种为外部字体,这里是举例说明,以用户实际为准
|
|
195
|
+
// 'icomoon': $rawfile('fonts/icomoon.ttf'),
|
|
196
|
+
// 'fontello': $rawfile('fonts/fontello.ttf'),
|
|
197
|
+
// 'poppy-icon': $rawfile('fonts/test.ttf')
|
|
198
|
+
}
|