Update RN to 0.62 and make app folders platform specific (#181)
* bump beachball version to one with prepublish fix * update beachball hook to use new prepublish strategy * add 0.62 version of windows code * ignore build artifacts * remove ios and android files from windows directory * remove expo playground * lockfile update after expo removal * pare down packages in scripts * remove bundle from core library * remove metro config for unused bundle * separate app and tester for win32 * remove bundle from fluent-tester * remove some hard dependencies * update RNW to 0.62 version * bump react native to 0.62 * get a working windows bundle command * expose watch folders routine for use in windows applet * update react versions to match * yarn upgrade results * more package version updates * fix windows bundle to point to tester * fix build errors from version update * rebuild yarn lock with yarnpkg.com instead of npmjs.org * update yarn lock file * remove last docs project from merge conflict * remove unused packages * remove dedent package, it was unused * remove even more packages * get just command that works with cli * add apps/mobile to replace expo * Change files * align react versions to try to fix hooks issue in tests * remove a few more unused files * align jest versions in repo * get rid of npmjs references in lockfile * get windows tester up and running * directly pin react and react-native versions * update yarn lock file
|
@ -22,7 +22,7 @@
|
|||
"eslint": "^6.5.1",
|
||||
"jest": "^24.9.0",
|
||||
"metro-react-native-babel-preset": "^0.58.0",
|
||||
"react-test-renderer": "16.11.0"
|
||||
"react-test-renderer": "~16.11.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
package com.fluenttester;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript.
|
||||
* This is used to schedule rendering of the component.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "FluentTester";
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
package com.fluenttester;
|
||||
|
||||
import android.app.Application;
|
||||
|
||||
import com.facebook.react.PackageList;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
<resources>
|
||||
<string name="app_name">Hello App Display Name</string>
|
||||
</resources>
|
|
@ -1,47 +0,0 @@
|
|||
platform :ios, '9.0'
|
||||
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||
|
||||
target 'FluentTester' do
|
||||
# Pods for FluentTester
|
||||
pod 'React', :path => '../node_modules/react-native/'
|
||||
pod 'React-Core', :path => '../node_modules/react-native/React'
|
||||
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
|
||||
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
|
||||
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
|
||||
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
|
||||
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
|
||||
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
|
||||
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
|
||||
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
|
||||
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
|
||||
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
|
||||
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
|
||||
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
|
||||
|
||||
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
|
||||
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
|
||||
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
|
||||
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
|
||||
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
|
||||
|
||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
target 'FluentTesterTests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
use_native_modules!
|
||||
end
|
||||
|
||||
target 'FluentTester-tvOS' do
|
||||
# Pods for FluentTester-tvOS
|
||||
|
||||
target 'FluentTester-tvOSTests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
end
|
|
@ -16,69 +16,37 @@
|
|||
"code-style": "fluentui-scripts code-style",
|
||||
"lint": "fluentui-scripts eslint",
|
||||
"start": "fluentui-scripts metro --server",
|
||||
"bundle": "fluentui-scripts metro",
|
||||
"bundle-dev": "fluentui-scripts metro --dev",
|
||||
"bundle-windows": "fluentui-scripts metro --platform windows",
|
||||
"run-win32": "rex-win32 --bundle RNTester --component RNTesterApp --windowTitle \"FluentUI Tester\" --basePath ./dist --pluginProps",
|
||||
"run-win32-web": "rex-win32 --bundle RNTester --component RNTesterApp --basePath ./dist --useWebDebugger --windowTitle \"FluentUI Tester\" --useLiveReload --pluginProps",
|
||||
"run-win32-devmain": "rex-win32 --bundle RNTester --component RNTesterApp --basePath ./dist --useDevMain --windowTitle \"FluentUI Tester\" --pluginProps"
|
||||
"bundle": "fluentui-scripts bundle"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fluentui/react-native": "0.15.7",
|
||||
"@fluentui-react-native/stack": "0.1.0",
|
||||
"@uifabricshared/theming-react-native": "0.7.2",
|
||||
"@uifabricshared/themed-stylesheet": "0.3.3",
|
||||
"react": "16.8.6",
|
||||
"react-native": "^0.60.0",
|
||||
"react-native-windows": "^0.60.0-vnext.149",
|
||||
"react-native-svg": "^11.0.0",
|
||||
"rnpm-plugin-windows": "^0.5.1-0"
|
||||
"react-native-svg": "^11.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@office-iss/react-native-win32": "0.27.3",
|
||||
"@office-iss/rex-win32": "0.0.35",
|
||||
"@react-native-community/eslint-config": "^0.0.3",
|
||||
"@react-native-community/eslint-config": "^1.1.0",
|
||||
"@types/prop-types": "15.5.1",
|
||||
"@types/react": "16.8.23",
|
||||
"@types/react-dom": "16.8.5",
|
||||
"@types/react-native": "^0.60.0",
|
||||
"@types/react": "^16.9.34",
|
||||
"@types/react-native": "^0.62.0",
|
||||
"@uifabricshared/build-native": "^0.1.1",
|
||||
"@uifabricshared/eslint-config-rules": "^0.1.1",
|
||||
"metro-react-native-babel-preset": "^0.54.1",
|
||||
"react": "16.8.6",
|
||||
"react-native": "^0.60.0",
|
||||
"react-native-windows": "^0.60.0-vnext.149",
|
||||
"react": "16.11.0",
|
||||
"react-native": "0.62.2",
|
||||
"react-native-windows": "^0.0.0-master.45",
|
||||
"react-native-svg-transformer": "^0.14.3",
|
||||
"react-test-renderer": "16.8.6",
|
||||
"react-test-renderer": "~16.11.0",
|
||||
"rnpm-plugin-windows": "^0.5.1-0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@office-iss/react-native-win32": "0.27.3",
|
||||
"react": "^16.8.6",
|
||||
"react-native": "^0.60.0",
|
||||
"react-native-windows": "^0.60.0-vnext.149"
|
||||
"react": "16.11.0",
|
||||
"react-native": "0.62.2"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
},
|
||||
"metroBundles": {
|
||||
"name": "rnTester",
|
||||
"targets": [
|
||||
"win32",
|
||||
"windows"
|
||||
],
|
||||
"entry": "./src/index.ts",
|
||||
"outputPath": "./dist",
|
||||
"bundleName": "RNTester.bundle",
|
||||
"noJSExtension": true,
|
||||
"noPlatformSuffix": true,
|
||||
"platforms": {
|
||||
"win32": {
|
||||
"outputPath": "./dist"
|
||||
},
|
||||
"windows": {
|
||||
"bundleName": "index.windows.bundle"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
import './RNTester/RNTester';
|
|
@ -0,0 +1,2 @@
|
|||
export * from './FabricTester';
|
||||
export { customRegistry } from './TestComponents/Theme/CustomThemes';
|
|
@ -1 +1 @@
|
|||
import './RNTester/RNTester';
|
||||
export * from './RNTester/index';
|
||||
|
|
|
@ -1,209 +0,0 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29215.179
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FluentTester", "FluentTester\FluentTester.vcxproj", "{E245CB12-131B-4797-B211-208267705441}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {F7D32BD0-2749-483E-9A0D-1635EF7E3136}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Folly", "..\node_modules\react-native-windows\Folly\Folly.vcxproj", "{A990658C-CE31-4BCC-976F-0FC6B1AF693D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactCommon", "..\node_modules\react-native-windows\ReactCommon\ReactCommon.vcxproj", "{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReactWindowsCore", "..\node_modules\react-native-windows\ReactWindowsCore\ReactWindowsCore.vcxproj", "{11C084A3-A57C-4296-A679-CAC17B603144}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {A990658C-CE31-4BCC-976F-0FC6B1AF693D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra", "..\node_modules\react-native-windows\Chakra\Chakra.vcxitems", "{C38970C0-5FBF-4D69-90D8-CBAC225AE895}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative", "..\node_modules\react-native-windows\Microsoft.ReactNative\Microsoft.ReactNative.vcxproj", "{F7D32BD0-2749-483E-9A0D-1635EF7E3136}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Shared", "..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems", "{0CC28589-39E4-4288-B162-97B959F8B843}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "JSI.Universal", "..\node_modules\react-native-windows\JSI\Universal\JSI.Universal.vcxproj", "{A62D504A-16B8-41D2-9F19-E2E86019E5E4}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Microsoft.ReactNative.Cxx", "..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems", "{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Microsoft.ReactNative.SharedManaged", "..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.shproj", "{67A1076F-7790-4203-86EA-4402CCB5E782}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\node_modules\react-native-windows\Common\Common.vcxproj", "{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ReactNative", "ReactNative", "{5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shared", "..\node_modules\react-native-windows\Shared\Shared.vcxitems", "{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\react-native-windows\Mso\Mso.vcxitems", "{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{0cc28589-39e4-4288-b162-97b959f8b843}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{2049dbe9-8d13-42c9-ae4b-413ae38fffd0}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.SharedManaged\Microsoft.ReactNative.SharedManaged.projitems*{67a1076f-7790-4203-86ea-4402ccb5e782}*SharedItemsImports = 13
|
||||
..\node_modules\react-native-windows\Mso\Mso.vcxitems*{84e05bfa-cbaf-4f0d-bfb6-4ce85742a57e}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{a62d504a-16b8-41d2-9f19-e2e86019e5e4}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{c38970c0-5fbf-4d69-90d8-cbac225ae895}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{da8b35b3-da00-4b02-bde6-6a397b3fd46b}*SharedItemsImports = 9
|
||||
..\node_modules\react-native-windows\Microsoft.ReactNative.Cxx\Microsoft.ReactNative.Cxx.vcxitems*{e245cb12-131b-4797-b211-208267705441}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Chakra\Chakra.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\JSI\Shared\JSI.Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
..\node_modules\react-native-windows\Shared\Shared.vcxitems*{f7d32bd0-2749-483e-9a0d-1635ef7e3136}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM = Debug|ARM
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release|ARM = Release|ARM
|
||||
Release|ARM64 = Release|ARM64
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x64.Build.0 = Debug|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x64.Deploy.0 = Debug|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x86.Build.0 = Debug|Win32
|
||||
{E245CB12-131B-4797-B211-208267705441}.Debug|x86.Deploy.0 = Debug|Win32
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM.Build.0 = Release|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM.Deploy.0 = Release|ARM
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x64.ActiveCfg = Release|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x64.Build.0 = Release|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x64.Deploy.0 = Release|x64
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x86.ActiveCfg = Release|Win32
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x86.Build.0 = Release|Win32
|
||||
{E245CB12-131B-4797-B211-208267705441}.Release|x86.Deploy.0 = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x64.Build.0 = Debug|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM.Build.0 = Release|ARM
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.ActiveCfg = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x64.Build.0 = Release|x64
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D}.Release|x86.Build.0 = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x64.Build.0 = Debug|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM.Build.0 = Release|ARM
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.ActiveCfg = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x64.Build.0 = Release|x64
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD}.Release|x86.Build.0 = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x64.Build.0 = Debug|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Debug|x86.Build.0 = Debug|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM.Build.0 = Release|ARM
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.ActiveCfg = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x64.Build.0 = Release|x64
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.ActiveCfg = Release|Win32
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144}.Release|x86.Build.0 = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x64.Build.0 = Debug|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Debug|x86.Build.0 = Debug|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM.Build.0 = Release|ARM
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.ActiveCfg = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x64.Build.0 = Release|x64
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.ActiveCfg = Release|Win32
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136}.Release|x86.Build.0 = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x64.Build.0 = Debug|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Debug|x86.Build.0 = Debug|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM.Build.0 = Release|ARM
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.ActiveCfg = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x64.Build.0 = Release|x64
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.ActiveCfg = Release|Win32
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4}.Release|x86.Build.0 = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM.Build.0 = Debug|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x64.Build.0 = Debug|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Debug|x86.Build.0 = Debug|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.ActiveCfg = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM.Build.0 = Release|ARM
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|ARM64.Build.0 = Release|ARM64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.ActiveCfg = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x64.Build.0 = Release|x64
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.ActiveCfg = Release|Win32
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D}.Release|x86.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{A990658C-CE31-4BCC-976F-0FC6B1AF693D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{A9D95A91-4DB7-4F72-BEB6-FE8A5C89BFBD} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{11C084A3-A57C-4296-A679-CAC17B603144} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{C38970C0-5FBF-4D69-90D8-CBAC225AE895} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{F7D32BD0-2749-483E-9A0D-1635EF7E3136} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{0CC28589-39E4-4288-B162-97B959F8B843} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{A62D504A-16B8-41D2-9F19-E2E86019E5E4} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{DA8B35B3-DA00-4B02-BDE6-6A397B3FD46B} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{67A1076F-7790-4203-86EA-4402CCB5E782} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{FCA38F3C-7C73-4C47-BE4E-32F77FA8538D} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{2049DBE9-8D13-42C9-AE4B-413AE38FFFD0} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
{84E05BFA-CBAF-4F0D-BFB6-4CE85742A57E} = {5EA20F54-880A-49F3-99FA-4B3FE54E8AB1}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D43FAD39-F619-437D-BB40-04A3982ACB6A}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -1,2 +0,0 @@
|
|||
*
|
||||
!.gitignore
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
[android]
|
||||
target = Google Inc.:Google APIs:23
|
||||
|
||||
[maven_repositories]
|
||||
central = https://repo1.maven.org/maven2
|
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
root: true,
|
||||
extends: '@react-native-community',
|
||||
};
|
|
@ -0,0 +1,74 @@
|
|||
[ignore]
|
||||
; We fork some components by platform
|
||||
.*/*[.]android.js
|
||||
|
||||
; Ignore "BUCK" generated dirs
|
||||
<PROJECT_ROOT>/\.buckd/
|
||||
|
||||
; Ignore polyfills
|
||||
node_modules/react-native/Libraries/polyfills/.*
|
||||
|
||||
; These should not be required directly
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
node_modules/warning/.*
|
||||
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/LoadingView.js
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/interface.js
|
||||
node_modules/react-native/flow/
|
||||
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.json
|
||||
module.file_ext=.ios.js
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/node_modules/react-native/\1'
|
||||
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/node_modules/react-native/Libraries/Image/RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[lints]
|
||||
sketchy-null-number=warn
|
||||
sketchy-null-mixed=warn
|
||||
sketchy-number=warn
|
||||
untyped-type-import=warn
|
||||
nonstrict-import=warn
|
||||
deprecated-type=warn
|
||||
unsafe-getters-setters=warn
|
||||
inexact-spread=warn
|
||||
unnecessary-invariant=warn
|
||||
signature-verification-failure=warn
|
||||
deprecated-utility=error
|
||||
|
||||
[strict]
|
||||
deprecated-type
|
||||
nonstrict-import
|
||||
sketchy-null
|
||||
unclear-type
|
||||
unsafe-getters-setters
|
||||
untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.113.0
|
|
@ -0,0 +1 @@
|
|||
*.pbxproj -text
|
|
@ -0,0 +1,59 @@
|
|||
# OSX
|
||||
#
|
||||
.DS_Store
|
||||
|
||||
# Xcode
|
||||
#
|
||||
build/
|
||||
*.pbxuser
|
||||
!default.pbxuser
|
||||
*.mode1v3
|
||||
!default.mode1v3
|
||||
*.mode2v3
|
||||
!default.mode2v3
|
||||
*.perspectivev3
|
||||
!default.perspectivev3
|
||||
xcuserdata
|
||||
*.xccheckout
|
||||
*.moved-aside
|
||||
DerivedData
|
||||
*.hmap
|
||||
*.ipa
|
||||
*.xcuserstate
|
||||
|
||||
# Android/IntelliJ
|
||||
#
|
||||
build/
|
||||
.idea
|
||||
.gradle
|
||||
local.properties
|
||||
*.iml
|
||||
|
||||
# node.js
|
||||
#
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
|
||||
# BUCK
|
||||
buck-out/
|
||||
\.buckd/
|
||||
*.keystore
|
||||
!debug.keystore
|
||||
|
||||
# fastlane
|
||||
#
|
||||
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
|
||||
# screenshots whenever they are needed.
|
||||
# For more information about the recommended setup visit:
|
||||
# https://docs.fastlane.tools/best-practices/source-control/
|
||||
|
||||
*/fastlane/report.xml
|
||||
*/fastlane/Preview.html
|
||||
*/fastlane/screenshots
|
||||
|
||||
# Bundle artifact
|
||||
*.jsbundle
|
||||
|
||||
# CocoaPods
|
||||
/ios/Pods/
|
|
@ -0,0 +1,6 @@
|
|||
module.exports = {
|
||||
bracketSpacing: false,
|
||||
jsxBracketSameLine: true,
|
||||
singleQuote: true,
|
||||
trailingComma: 'all',
|
||||
};
|
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
* Sample React Native App
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
* @flow strict-local
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import {
|
||||
SafeAreaView,
|
||||
StyleSheet,
|
||||
ScrollView,
|
||||
View,
|
||||
Text,
|
||||
StatusBar,
|
||||
} from 'react-native';
|
||||
|
||||
import {
|
||||
Header,
|
||||
LearnMoreLinks,
|
||||
Colors,
|
||||
DebugInstructions,
|
||||
ReloadInstructions,
|
||||
} from 'react-native/Libraries/NewAppScreen';
|
||||
|
||||
const App: () => React$Node = () => {
|
||||
return (
|
||||
<>
|
||||
<StatusBar barStyle="dark-content" />
|
||||
<SafeAreaView>
|
||||
<ScrollView
|
||||
contentInsetAdjustmentBehavior="automatic"
|
||||
style={styles.scrollView}>
|
||||
<Header />
|
||||
{global.HermesInternal == null ? null : (
|
||||
<View style={styles.engine}>
|
||||
<Text style={styles.footer}>Engine: Hermes</Text>
|
||||
</View>
|
||||
)}
|
||||
<View style={styles.body}>
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.sectionTitle}>Step One</Text>
|
||||
<Text style={styles.sectionDescription}>
|
||||
Edit <Text style={styles.highlight}>App.js</Text> to change this
|
||||
screen and then come back to see your edits.
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.sectionTitle}>See Your Changes</Text>
|
||||
<Text style={styles.sectionDescription}>
|
||||
<ReloadInstructions />
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.sectionTitle}>Debug</Text>
|
||||
<Text style={styles.sectionDescription}>
|
||||
<DebugInstructions />
|
||||
</Text>
|
||||
</View>
|
||||
<View style={styles.sectionContainer}>
|
||||
<Text style={styles.sectionTitle}>Learn More</Text>
|
||||
<Text style={styles.sectionDescription}>
|
||||
Read the docs to discover what to do next:
|
||||
</Text>
|
||||
</View>
|
||||
<LearnMoreLinks />
|
||||
</View>
|
||||
</ScrollView>
|
||||
</SafeAreaView>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
scrollView: {
|
||||
backgroundColor: Colors.lighter,
|
||||
},
|
||||
engine: {
|
||||
position: 'absolute',
|
||||
right: 0,
|
||||
},
|
||||
body: {
|
||||
backgroundColor: Colors.white,
|
||||
},
|
||||
sectionContainer: {
|
||||
marginTop: 32,
|
||||
paddingHorizontal: 24,
|
||||
},
|
||||
sectionTitle: {
|
||||
fontSize: 24,
|
||||
fontWeight: '600',
|
||||
color: Colors.black,
|
||||
},
|
||||
sectionDescription: {
|
||||
marginTop: 8,
|
||||
fontSize: 18,
|
||||
fontWeight: '400',
|
||||
color: Colors.dark,
|
||||
},
|
||||
highlight: {
|
||||
fontWeight: '700',
|
||||
},
|
||||
footer: {
|
||||
color: Colors.dark,
|
||||
fontSize: 12,
|
||||
fontWeight: '600',
|
||||
padding: 4,
|
||||
paddingRight: 12,
|
||||
textAlign: 'right',
|
||||
},
|
||||
});
|
||||
|
||||
export default App;
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* @format
|
||||
*/
|
||||
|
||||
import 'react-native';
|
||||
import React from 'react';
|
||||
import App from '../App';
|
||||
|
||||
// Note: test renderer must be required after react-native.
|
||||
import renderer from 'react-test-renderer';
|
||||
|
||||
it('renders correctly', () => {
|
||||
renderer.create(<App />);
|
||||
});
|
|
@ -15,7 +15,9 @@ import com.android.build.OutputFile
|
|||
* // the name of the generated asset file containing your JS bundle
|
||||
* bundleAssetName: "index.android.bundle",
|
||||
*
|
||||
* // the entry file for bundle generation
|
||||
* // the entry file for bundle generation. If none specified and
|
||||
* // "index.android.js" exists, it will be used. Otherwise "index.js" is
|
||||
* // default. Can be overridden with ENTRY_FILE environment variable.
|
||||
* entryFile: "index.android.js",
|
||||
*
|
||||
* // https://facebook.github.io/react-native/docs/performance#enable-the-ram-format
|
||||
|
@ -76,7 +78,7 @@ import com.android.build.OutputFile
|
|||
*/
|
||||
|
||||
project.ext.react = [
|
||||
entryFile: "index.js"
|
||||
enableHermes: false, // clean and rebuild if changing
|
||||
]
|
||||
|
||||
apply from: "../../node_modules/react-native/react.gradle"
|
||||
|
@ -97,13 +99,26 @@ def enableSeparateBuildPerCPUArchitecture = false
|
|||
def enableProguardInReleaseBuilds = false
|
||||
|
||||
/**
|
||||
* Use international variant JavaScriptCore
|
||||
* International variant includes ICU i18n library and necessary data allowing to use
|
||||
* e.g. Date.toLocaleString and String.localeCompare that give correct results
|
||||
* when using with locales other than en-US.
|
||||
* Note that this variant is about 6MiB larger per architecture than default.
|
||||
* The preferred build flavor of JavaScriptCore.
|
||||
*
|
||||
* For example, to use the international variant, you can use:
|
||||
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
|
||||
*
|
||||
* The international variant includes ICU i18n library and necessary data
|
||||
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
|
||||
* give correct results when using with locales other than en-US. Note that
|
||||
* this variant is about 6MiB larger per architecture than default.
|
||||
*/
|
||||
def useIntlJsc = false
|
||||
def jscFlavor = 'org.webkit:android-jsc:+'
|
||||
|
||||
/**
|
||||
* Whether to enable the Hermes VM.
|
||||
*
|
||||
* This should be set on project.ext.react and mirrored here. If it is not set
|
||||
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
|
||||
* and the benefits of using Hermes will therefore be sharply reduced.
|
||||
*/
|
||||
def enableHermes = project.ext.react.get("enableHermes", false);
|
||||
|
||||
android {
|
||||
compileSdkVersion rootProject.ext.compileSdkVersion
|
||||
|
@ -148,6 +163,14 @@ android {
|
|||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
}
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
pickFirst "lib/armeabi-v7a/libc++_shared.so"
|
||||
pickFirst "lib/arm64-v8a/libc++_shared.so"
|
||||
pickFirst "lib/x86/libc++_shared.so"
|
||||
pickFirst "lib/x86_64/libc++_shared.so"
|
||||
}
|
||||
|
||||
// applicationVariants are e.g. debug, release
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.each { output ->
|
||||
|
@ -159,19 +182,36 @@ android {
|
|||
output.versionCodeOverride =
|
||||
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
//noinspection GradleDynamicVersion
|
||||
implementation "com.facebook.react:react-native:+" // From node_modules
|
||||
|
||||
// JSC from node_modules
|
||||
if (useIntlJsc) {
|
||||
implementation 'org.webkit:android-jsc-intl:+'
|
||||
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.fbjni'
|
||||
}
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.flipper'
|
||||
}
|
||||
|
||||
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
|
||||
exclude group:'com.facebook.flipper'
|
||||
}
|
||||
|
||||
if (enableHermes) {
|
||||
def hermesPath = "../../node_modules/hermes-engine/android/";
|
||||
debugImplementation files(hermesPath + "hermes-debug.aar")
|
||||
releaseImplementation files(hermesPath + "hermes-release.aar")
|
||||
} else {
|
||||
implementation 'org.webkit:android-jsc:+'
|
||||
implementation jscFlavor
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
|
||||
* directory of this source tree.
|
||||
*/
|
||||
package com.fluenttester;
|
||||
|
||||
import android.content.Context;
|
||||
import com.facebook.flipper.android.AndroidFlipperClient;
|
||||
import com.facebook.flipper.android.utils.FlipperUtils;
|
||||
import com.facebook.flipper.core.FlipperClient;
|
||||
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
|
||||
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
|
||||
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
|
||||
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
|
||||
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.modules.network.NetworkingModule;
|
||||
import okhttp3.OkHttpClient;
|
||||
|
||||
public class ReactNativeFlipper {
|
||||
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (FlipperUtils.shouldEnableFlipper(context)) {
|
||||
final FlipperClient client = AndroidFlipperClient.getInstance(context);
|
||||
|
||||
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
|
||||
client.addPlugin(new ReactFlipperPlugin());
|
||||
client.addPlugin(new DatabasesFlipperPlugin(context));
|
||||
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
|
||||
client.addPlugin(CrashReporterPlugin.getInstance());
|
||||
|
||||
NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
|
||||
NetworkingModule.setCustomClientBuilder(
|
||||
new NetworkingModule.CustomClientBuilder() {
|
||||
@Override
|
||||
public void apply(OkHttpClient.Builder builder) {
|
||||
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
|
||||
}
|
||||
});
|
||||
client.addPlugin(networkFlipperPlugin);
|
||||
client.start();
|
||||
|
||||
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
|
||||
// Hence we run if after all native modules have been initialized
|
||||
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
|
||||
if (reactContext == null) {
|
||||
reactInstanceManager.addReactInstanceEventListener(
|
||||
new ReactInstanceManager.ReactInstanceEventListener() {
|
||||
@Override
|
||||
public void onReactContextInitialized(ReactContext reactContext) {
|
||||
reactInstanceManager.removeReactInstanceEventListener(this);
|
||||
reactContext.runOnNativeModulesQueueThread(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
client.addPlugin(new FrescoFlipperPlugin());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,7 +13,8 @@
|
|||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
|
@ -0,0 +1,15 @@
|
|||
package com.fluenttester;
|
||||
|
||||
import com.facebook.react.ReactActivity;
|
||||
|
||||
public class MainActivity extends ReactActivity {
|
||||
|
||||
/**
|
||||
* Returns the name of the main component registered from JavaScript. This is used to schedule
|
||||
* rendering of the component.
|
||||
*/
|
||||
@Override
|
||||
protected String getMainComponentName() {
|
||||
return "FluentTester";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
package com.fluenttester;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.Context;
|
||||
import com.facebook.react.PackageList;
|
||||
import com.facebook.react.ReactApplication;
|
||||
import com.facebook.react.ReactInstanceManager;
|
||||
import com.facebook.react.ReactNativeHost;
|
||||
import com.facebook.react.ReactPackage;
|
||||
import com.facebook.soloader.SoLoader;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
public class MainApplication extends Application implements ReactApplication {
|
||||
|
||||
private final ReactNativeHost mReactNativeHost =
|
||||
new ReactNativeHost(this) {
|
||||
@Override
|
||||
public boolean getUseDeveloperSupport() {
|
||||
return BuildConfig.DEBUG;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<ReactPackage> getPackages() {
|
||||
@SuppressWarnings("UnnecessaryLocalVariable")
|
||||
List<ReactPackage> packages = new PackageList(this).getPackages();
|
||||
// Packages that cannot be autolinked yet can be added manually here, for example:
|
||||
// packages.add(new MyReactNativePackage());
|
||||
return packages;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected String getJSMainModuleName() {
|
||||
return "index";
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public ReactNativeHost getReactNativeHost() {
|
||||
return mReactNativeHost;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
super.onCreate();
|
||||
SoLoader.init(this, /* native exopackage */ false);
|
||||
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
|
||||
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
|
||||
*
|
||||
* @param context
|
||||
* @param reactInstanceManager
|
||||
*/
|
||||
private static void initializeFlipper(
|
||||
Context context, ReactInstanceManager reactInstanceManager) {
|
||||
if (BuildConfig.DEBUG) {
|
||||
try {
|
||||
/*
|
||||
We use reflection here to pick up the class that initializes Flipper,
|
||||
since Flipper library is not available in release mode
|
||||
*/
|
||||
Class<?> aClass = Class.forName("com.fluenttester.ReactNativeFlipper");
|
||||
aClass
|
||||
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
|
||||
.invoke(null, context, reactInstanceManager);
|
||||
} catch (ClassNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (NoSuchMethodException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IllegalAccessException e) {
|
||||
e.printStackTrace();
|
||||
} catch (InvocationTargetException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
До Ширина: | Высота: | Размер: 3.0 KiB После Ширина: | Высота: | Размер: 3.0 KiB |
До Ширина: | Высота: | Размер: 4.9 KiB После Ширина: | Высота: | Размер: 4.9 KiB |
До Ширина: | Высота: | Размер: 2.0 KiB После Ширина: | Высота: | Размер: 2.0 KiB |
До Ширина: | Высота: | Размер: 2.8 KiB После Ширина: | Высота: | Размер: 2.8 KiB |
До Ширина: | Высота: | Размер: 4.5 KiB После Ширина: | Высота: | Размер: 4.5 KiB |
До Ширина: | Высота: | Размер: 6.9 KiB После Ширина: | Высота: | Размер: 6.9 KiB |
До Ширина: | Высота: | Размер: 6.3 KiB После Ширина: | Высота: | Размер: 6.3 KiB |
До Ширина: | Высота: | Размер: 10 KiB После Ширина: | Высота: | Размер: 10 KiB |
До Ширина: | Высота: | Размер: 9.0 KiB После Ширина: | Высота: | Размер: 9.0 KiB |
До Ширина: | Высота: | Размер: 15 KiB После Ширина: | Высота: | Размер: 15 KiB |
|
@ -0,0 +1,3 @@
|
|||
<resources>
|
||||
<string name="app_name">FluentTester</string>
|
||||
</resources>
|
|
@ -6,14 +6,13 @@ buildscript {
|
|||
minSdkVersion = 16
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 28
|
||||
supportLibVersion = "28.0.0"
|
||||
}
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:3.4.1")
|
||||
classpath("com.android.tools.build:gradle:3.5.2")
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -34,5 +33,6 @@ allprojects {
|
|||
|
||||
google()
|
||||
jcenter()
|
||||
maven { url 'https://www.jitpack.io' }
|
||||
}
|
||||
}
|
|
@ -17,5 +17,12 @@
|
|||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Automatically convert third-party libraries to use AndroidX
|
||||
android.enableJetifier=true
|
||||
|
||||
# Version of flipper SDK to use with React Native
|
||||
FLIPPER_VERSION=0.33.1
|
|
@ -1,5 +1,5 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
|
@ -7,7 +7,7 @@
|
|||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
@ -125,8 +125,8 @@ if $darwin; then
|
|||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
@ -5,7 +5,7 @@
|
|||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem http://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"name": "FluentTester",
|
||||
"displayName": "FluentTester"
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
presets: ['module:metro-react-native-babel-preset'],
|
||||
};
|
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* @format
|
||||
*/
|
||||
|
||||
import {AppRegistry} from 'react-native';
|
||||
import App from './App';
|
||||
import {name as appName} from './app.json';
|
||||
|
||||
AppRegistry.registerComponent(appName, () => App);
|
|
@ -105,7 +105,6 @@
|
|||
13B07FAE1A68108700A75B9A /* FluentTester */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9F275A442444D141007E7870 /* Config */,
|
||||
008F07F21AC5B25A0029DE68 /* main.jsbundle */,
|
||||
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
|
||||
13B07FB01A68108700A75B9A /* AppDelegate.m */,
|
||||
|
@ -158,13 +157,6 @@
|
|||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9F275A442444D141007E7870 /* Config */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = Config;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
|
@ -248,13 +240,15 @@
|
|||
83CBB9F71A601CBA00E9B192 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0940;
|
||||
ORGANIZATIONNAME = Facebook;
|
||||
LastUpgradeCheck = 1130;
|
||||
TargetAttributes = {
|
||||
00E356ED1AD99517003FC87E = {
|
||||
CreatedOnToolsVersion = 6.2;
|
||||
TestTargetID = 13B07F861A680F5B00A75B9A;
|
||||
};
|
||||
13B07F861A680F5B00A75B9A = {
|
||||
LastSwiftMigration = 1120;
|
||||
};
|
||||
2D02E47A1E0B4A5D006451C7 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
ProvisioningStyle = Automatic;
|
||||
|
@ -268,10 +262,9 @@
|
|||
};
|
||||
buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "FluentTester" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
English,
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
|
@ -499,8 +492,13 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEAD_CODE_STRIPPING = NO;
|
||||
ENABLE_BITCODE = NO;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"$(inherited)",
|
||||
"FB_SONARKIT_ENABLED=1",
|
||||
);
|
||||
INFOPLIST_FILE = FluentTester/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
OTHER_LDFLAGS = (
|
||||
|
@ -510,6 +508,8 @@
|
|||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = FluentTester;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
|
@ -518,6 +518,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
INFOPLIST_FILE = FluentTester/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
|
@ -528,6 +529,7 @@
|
|||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
|
||||
PRODUCT_NAME = FluentTester;
|
||||
SWIFT_VERSION = 5.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
|
@ -551,7 +553,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.FluentTester-tvOS";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.FluentTester-tvOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
|
@ -578,7 +580,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.FluentTester-tvOS";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.FluentTester-tvOS";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TARGETED_DEVICE_FAMILY = 3;
|
||||
|
@ -604,7 +606,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.FluentTester-tvOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.FluentTester-tvOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FluentTester-tvOS.app/FluentTester-tvOS";
|
||||
|
@ -630,7 +632,7 @@
|
|||
"-ObjC",
|
||||
"-lc++",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.facebook.REACT.FluentTester-tvOSTests";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.FluentTester-tvOSTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = appletvos;
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/FluentTester-tvOS.app/FluentTester-tvOS";
|
||||
|
@ -642,6 +644,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -685,6 +688,12 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
|
||||
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
|
||||
"\"$(inherited)\"",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
@ -695,6 +704,7 @@
|
|||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
|
@ -731,6 +741,12 @@
|
|||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"",
|
||||
"\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"",
|
||||
"\"$(inherited)\"",
|
||||
);
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
VALIDATE_PRODUCT = YES;
|
|
@ -1,25 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0940"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D2A28121D9B038B00D4039D"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React-tvOS"
|
||||
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
|
@ -34,20 +20,6 @@
|
|||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
|
||||
BuildableName = "FluentTester-tvOSTests.xctest"
|
||||
BlueprintName = "FluentTester-tvOSTests"
|
||||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
|
@ -67,17 +39,6 @@
|
|||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
|
||||
BuildableName = "FluentTester-tvOS.app"
|
||||
BlueprintName = "FluentTester-tvOS"
|
||||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
|
@ -99,8 +60,6 @@
|
|||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
|
@ -1,25 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0940"
|
||||
LastUpgradeVersion = "1130"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "NO"
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
|
||||
BuildableName = "libReact.a"
|
||||
BlueprintName = "React"
|
||||
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
|
@ -34,20 +20,6 @@
|
|||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "NO"
|
||||
buildForArchiving = "NO"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
||||
BuildableName = "FluentTesterTests.xctest"
|
||||
BlueprintName = "FluentTesterTests"
|
||||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
|
@ -67,17 +39,6 @@
|
|||
</BuildableReference>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
||||
BuildableName = "FluentTester.app"
|
||||
BlueprintName = "FluentTester"
|
||||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
|
@ -99,8 +60,6 @@
|
|||
ReferencedContainer = "container:FluentTester.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <React/RCTBridgeDelegate.h>
|
||||
#import <UIKit/UIKit.h>
|
||||
|
|
@ -1,20 +1,36 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import <React/RCTBridge.h>
|
||||
#import <React/RCTBundleURLProvider.h>
|
||||
#import <React/RCTRootView.h>
|
||||
|
||||
#if DEBUG
|
||||
#import <FlipperKit/FlipperClient.h>
|
||||
#import <FlipperKitLayoutPlugin/FlipperKitLayoutPlugin.h>
|
||||
#import <FlipperKitUserDefaultsPlugin/FKUserDefaultsPlugin.h>
|
||||
#import <FlipperKitNetworkPlugin/FlipperKitNetworkPlugin.h>
|
||||
#import <SKIOSNetworkPlugin/SKIOSNetworkAdapter.h>
|
||||
#import <FlipperKitReactPlugin/FlipperKitReactPlugin.h>
|
||||
|
||||
static void InitializeFlipper(UIApplication *application) {
|
||||
FlipperClient *client = [FlipperClient sharedClient];
|
||||
SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults];
|
||||
[client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]];
|
||||
[client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]];
|
||||
[client addPlugin:[FlipperKitReactPlugin new]];
|
||||
[client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]];
|
||||
[client start];
|
||||
}
|
||||
#endif
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
#if DEBUG
|
||||
InitializeFlipper(application);
|
||||
#endif
|
||||
|
||||
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
|
||||
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
|
||||
moduleName:@"FluentTester"
|
|
@ -5,7 +5,7 @@
|
|||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Hello App Display Name</string>
|
||||
<string>FluentTester</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "AppDelegate.h"
|
|
@ -1,10 +1,3 @@
|
|||
/**
|
||||
* Copyright (c) Facebook, Inc. and its affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <XCTest/XCTest.h>
|
||||
|
||||
|
@ -12,7 +5,7 @@
|
|||
#import <React/RCTRootView.h>
|
||||
|
||||
#define TIMEOUT_SECONDS 600
|
||||
#define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
|
||||
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
||||
|
||||
@interface FluentTesterTests : XCTestCase
|
||||
|
||||
|
@ -40,11 +33,13 @@
|
|||
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]];
|
||||
|
@ -58,7 +53,9 @@
|
|||
}];
|
||||
}
|
||||
|
||||
#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);
|
|
@ -0,0 +1,104 @@
|
|||
platform :ios, '9.0'
|
||||
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
||||
|
||||
def add_flipper_pods!(versions = {})
|
||||
versions['Flipper'] ||= '~> 0.33.1'
|
||||
versions['DoubleConversion'] ||= '1.1.7'
|
||||
versions['Flipper-Folly'] ||= '~> 2.1'
|
||||
versions['Flipper-Glog'] ||= '0.3.6'
|
||||
versions['Flipper-PeerTalk'] ||= '~> 0.0.4'
|
||||
versions['Flipper-RSocket'] ||= '~> 1.0'
|
||||
|
||||
pod 'FlipperKit', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitLayoutPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/SKIOSNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitUserDefaultsPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitReactPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
|
||||
# List all transitive dependencies for FlipperKit pods
|
||||
# to avoid them being linked in Release builds
|
||||
pod 'Flipper', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'Flipper-DoubleConversion', versions['DoubleConversion'], :configuration => 'Debug'
|
||||
pod 'Flipper-Folly', versions['Flipper-Folly'], :configuration => 'Debug'
|
||||
pod 'Flipper-Glog', versions['Flipper-Glog'], :configuration => 'Debug'
|
||||
pod 'Flipper-PeerTalk', versions['Flipper-PeerTalk'], :configuration => 'Debug'
|
||||
pod 'Flipper-RSocket', versions['Flipper-RSocket'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/Core', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/CppBridge', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FBCxxFollyDynamicConvert', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FBDefines', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FKPortForwarding', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitHighlightOverlay', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitLayoutTextSearchable', versions['Flipper'], :configuration => 'Debug'
|
||||
pod 'FlipperKit/FlipperKitNetworkPlugin', versions['Flipper'], :configuration => 'Debug'
|
||||
end
|
||||
|
||||
# Post Install processing for Flipper
|
||||
def flipper_post_install(installer)
|
||||
installer.pods_project.targets.each do |target|
|
||||
if target.name == 'YogaKit'
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['SWIFT_VERSION'] = '4.1'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
target 'FluentTester' do
|
||||
# Pods for FluentTester
|
||||
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
|
||||
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
|
||||
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
|
||||
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
|
||||
pod 'React', :path => '../node_modules/react-native/'
|
||||
pod 'React-Core', :path => '../node_modules/react-native/'
|
||||
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
|
||||
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
|
||||
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
|
||||
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
|
||||
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
|
||||
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
|
||||
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
|
||||
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
|
||||
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
|
||||
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
|
||||
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
|
||||
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
|
||||
|
||||
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
|
||||
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
|
||||
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
|
||||
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
|
||||
pod 'ReactCommon/callinvoker', :path => "../node_modules/react-native/ReactCommon"
|
||||
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
|
||||
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga', :modular_headers => true
|
||||
|
||||
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
|
||||
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
target 'FluentTesterTests' do
|
||||
inherit! :complete
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
use_native_modules!
|
||||
|
||||
# Enables Flipper.
|
||||
#
|
||||
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
||||
# you should disable these next few lines.
|
||||
add_flipper_pods!
|
||||
post_install do |installer|
|
||||
flipper_post_install(installer)
|
||||
end
|
||||
end
|
||||
|
||||
target 'FluentTester-tvOS' do
|
||||
# Pods for FluentTester-tvOS
|
||||
|
||||
target 'FluentTester-tvOSTests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
end
|
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Metro configuration for React Native
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
const {getWatchFolders} = require('@uifabricshared/build-native');
|
||||
|
||||
module.exports = {
|
||||
watchFolders: getWatchFolders(),
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: false,
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
"name": "FluentTester-mobile",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"android": "react-native run-android",
|
||||
"ios": "react-native run-ios",
|
||||
"start": "react-native start",
|
||||
"test": "jest",
|
||||
"lint": "eslint ."
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "16.11.0",
|
||||
"react-native": "^0.62.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.6.2",
|
||||
"@babel/runtime": "^7.6.2",
|
||||
"@react-native-community/eslint-config": "^0.0.5",
|
||||
"@uifabricshared/build-native": "0.1.1",
|
||||
"babel-jest": "^25.4.0",
|
||||
"eslint": "^6.5.1",
|
||||
"jest": "^25.4.0",
|
||||
"metro-react-native-babel-preset": "^0.58.0",
|
||||
"react-test-renderer": "~16.11.0"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "react-native"
|
||||
}
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"f9155ac790fd02fadcdeca367b02581c04a353aa6d5aa84409a59f6804c87acd": true,
|
||||
"89ed26367cdb9b771858e026f2eb95bfdb90e5ae943e716575327ec325f39c44": true
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
node_modules/**/*
|
||||
.expo/*
|
||||
npm-debug.*
|
||||
*.jks
|
||||
*.p8
|
||||
*.p12
|
||||
*.key
|
||||
*.mobileprovision
|
||||
*.orig.*
|
||||
web-build/
|
||||
web-report/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
|
@ -1,116 +0,0 @@
|
|||
import React from 'react';
|
||||
import { StyleSheet, Text, View, ViewProps, TextProps, NativeEventEmitter, TouchableOpacity } from 'react-native';
|
||||
import {
|
||||
ThemingModuleHelper,
|
||||
ThemeProvider,
|
||||
createPlatformThemeRegistry,
|
||||
useTheme,
|
||||
createMockThemingModule,
|
||||
createMockThemingModuleHelper,
|
||||
mockGetPaletteImpl,
|
||||
IPartialTheme
|
||||
} from '@uifabricshared/theming-react-native';
|
||||
import { Button } from './components';
|
||||
|
||||
// Uncomment to log the js-to-native message queue to console
|
||||
// const msgq = require('MessageQueue');
|
||||
// msgq.spy(true);
|
||||
|
||||
let useWhiteColors = true;
|
||||
const emitter = new NativeEventEmitter();
|
||||
const mockThemingModule = createMockThemingModule({
|
||||
getPalette: (_pal?: string) => {
|
||||
return mockGetPaletteImpl(useWhiteColors ? 'WhiteColors' : 'TaskPane');
|
||||
}
|
||||
});
|
||||
|
||||
const caterpillarTheme: IPartialTheme = {
|
||||
components: {
|
||||
Button: {
|
||||
tokens: {
|
||||
borderWidth: 0,
|
||||
backgroundColor: '#ffcd11',
|
||||
color: '#000'
|
||||
},
|
||||
_overrides: {
|
||||
hovered: {
|
||||
tokens: {
|
||||
backgroundColor: '#111',
|
||||
color: '#fff'
|
||||
}
|
||||
},
|
||||
pressed: {
|
||||
tokens: {
|
||||
backgroundColor: '#eee',
|
||||
color: '#111'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const mockThemingModuleHelper = createMockThemingModuleHelper(mockThemingModule, emitter);
|
||||
|
||||
const customThemeRegistry = createPlatformThemeRegistry('TaskPane', mockThemingModuleHelper);
|
||||
// default theme
|
||||
customThemeRegistry.setTheme(caterpillarTheme);
|
||||
customThemeRegistry.setTheme(ThemingModuleHelper.getPlatformThemeDefinition('WhiteColors'), 'PlatformWhiteColors');
|
||||
|
||||
const ThemeSwitcher: React.FunctionComponent = (_p: {}) => {
|
||||
const switchTheme = React.useCallback(() => {
|
||||
useWhiteColors = !useWhiteColors;
|
||||
emitter.emit('onPlatformDefaultsChanged');
|
||||
}, []);
|
||||
return (
|
||||
<TouchableOpacity onPress={switchTheme} style={styles.themeSwitcher}>
|
||||
<Text>Switch Theme</Text>
|
||||
</TouchableOpacity>
|
||||
);
|
||||
};
|
||||
|
||||
export default function App() {
|
||||
return (
|
||||
<ThemeProvider registry={customThemeRegistry}>
|
||||
<ThemedPanel style={styles.root}>
|
||||
<View style={styles.container}>
|
||||
<Button content="Hello Android Button" />
|
||||
<ThemedText>Open up App.tsx to start working on your app!</ThemedText>
|
||||
<ThemeSwitcher />
|
||||
</View>
|
||||
<ThemeProvider theme="PlatformWhiteColors">
|
||||
<ThemedPanel style={styles.container}>
|
||||
<ThemedText>Theme Provider text!</ThemedText>
|
||||
</ThemedPanel>
|
||||
</ThemeProvider>
|
||||
</ThemedPanel>
|
||||
</ThemeProvider>
|
||||
);
|
||||
}
|
||||
|
||||
const ThemedPanel: React.FunctionComponent<ViewProps> = (props: ViewProps) => {
|
||||
const { style, ...rest } = props;
|
||||
const theme = useTheme();
|
||||
return <View {...rest} style={[{ backgroundColor: theme.colors.background }, style]} />;
|
||||
};
|
||||
|
||||
const ThemedText: React.FunctionComponent<TextProps> = (p: TextProps) => {
|
||||
const theme = useTheme();
|
||||
const { style, ...rest } = p;
|
||||
return <Text {...rest} style={[{ color: String(theme.colors.bodyText) }, style]} />;
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
root: {
|
||||
alignItems: 'stretch',
|
||||
justifyContent: 'space-evenly'
|
||||
},
|
||||
container: {
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
minHeight: 500
|
||||
},
|
||||
themeSwitcher: {
|
||||
backgroundColor: 'gray'
|
||||
}
|
||||
});
|
|
@ -1,30 +0,0 @@
|
|||
{
|
||||
"expo": {
|
||||
"name": "Fabric Playground",
|
||||
"slug": "playground",
|
||||
"privacy": "public",
|
||||
"sdkVersion": "35.0.0",
|
||||
"platforms": [
|
||||
"ios",
|
||||
"android",
|
||||
"web"
|
||||
],
|
||||
"version": "1.0.0",
|
||||
"orientation": "portrait",
|
||||
"icon": "./assets/icon.png",
|
||||
"splash": {
|
||||
"image": "./assets/splash.png",
|
||||
"resizeMode": "contain",
|
||||
"backgroundColor": "#ffffff"
|
||||
},
|
||||
"updates": {
|
||||
"fallbackToCacheTimeout": 0
|
||||
},
|
||||
"assetBundlePatterns": [
|
||||
"**/*"
|
||||
],
|
||||
"ios": {
|
||||
"supportsTablet": true
|
||||
}
|
||||
}
|
||||
}
|
Двоичные данные
apps/playground/assets/icon.png
До Ширина: | Высота: | Размер: 1.1 KiB |
Двоичные данные
apps/playground/assets/splash.png
До Ширина: | Высота: | Размер: 7.0 KiB |
|
@ -1,6 +0,0 @@
|
|||
module.exports = function(api) {
|
||||
api.cache(true);
|
||||
return {
|
||||
presets: ['babel-preset-expo'],
|
||||
};
|
||||
};
|
|
@ -1,49 +0,0 @@
|
|||
import { buttonName, IButtonType } from './Button.types';
|
||||
import { IComposeSettings } from '@uifabricshared/foundation-compose';
|
||||
|
||||
export const settings: IComposeSettings<IButtonType> = [
|
||||
{
|
||||
tokens: {
|
||||
backgroundColor: 'primaryButtonBackground',
|
||||
color: 'primaryButtonText',
|
||||
borderColor: 'primaryButtonBorder',
|
||||
borderWidth: 1
|
||||
},
|
||||
root: {
|
||||
style: { display: 'flex', alignItems: 'flex-start', flexDirection: 'row', alignSelf: 'flex-start' }
|
||||
},
|
||||
content: {},
|
||||
icon: {},
|
||||
stack: {
|
||||
style: {
|
||||
display: 'flex',
|
||||
paddingStart: 16,
|
||||
paddingEnd: 16,
|
||||
alignItems: 'center',
|
||||
flexDirection: 'row',
|
||||
alignSelf: 'flex-start',
|
||||
minHeight: 32,
|
||||
minWidth: 80,
|
||||
justifyContent: 'center'
|
||||
}
|
||||
},
|
||||
_precedence: ['pressed', 'disabled'],
|
||||
_overrides: {
|
||||
disabled: {
|
||||
tokens: {
|
||||
backgroundColor: 'primaryButtonBackgroundDisabled',
|
||||
color: 'primaryButtonTextDisabled',
|
||||
borderColor: 'primaryButtonBorderDisabled'
|
||||
}
|
||||
},
|
||||
pressed: {
|
||||
tokens: {
|
||||
backgroundColor: 'primaryButtonBackgroundPressed',
|
||||
color: 'primaryButtonTextPressed',
|
||||
borderColor: 'primaryButtonBorderPressed'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
buttonName
|
||||
];
|
|
@ -1,70 +0,0 @@
|
|||
/** @jsx withSlots */
|
||||
import * as React from 'react';
|
||||
import { Image, View, Text } from 'react-native';
|
||||
import { IButtonSlotProps, IButtonState, IButtonProps, IButtonRenderData, buttonName, IButtonType } from './Button.types';
|
||||
import { compose, IUseComposeStyling } from '@uifabricshared/foundation-compose';
|
||||
import { ISlots, withSlots } from '@uifabricshared/foundation-composable';
|
||||
import { settings } from './Button.settings';
|
||||
import { backgroundColorTokens, borderTokens, textTokens, foregroundColorTokens, getPaletteFromTheme } from '../tokens';
|
||||
import { filterViewProps, filterImageProps } from '../utilities/RenderHelpers';
|
||||
import { mergeSettings } from '@uifabricshared/foundation-settings';
|
||||
import { useAsPressable } from '../Pressable';
|
||||
|
||||
export const Button = compose<IButtonType>({
|
||||
displayName: buttonName,
|
||||
usePrepareProps: (userProps: IButtonProps, useStyling: IUseComposeStyling<IButtonType>) => {
|
||||
const { icon, content, ...rest } = userProps;
|
||||
// attach the pressable state handlers
|
||||
const pressable = useAsPressable(rest);
|
||||
// set up state
|
||||
const state: IButtonState = {
|
||||
info: {
|
||||
...pressable.state,
|
||||
disabled: userProps.disabled,
|
||||
content: !!content,
|
||||
icon: !!icon
|
||||
}
|
||||
};
|
||||
|
||||
// grab the styling information, referencing the state as well as the props
|
||||
const styleProps = useStyling(userProps, (override: string) => state.info[override] || userProps[override]);
|
||||
|
||||
// create the merged slot props
|
||||
const slotProps = mergeSettings<IButtonSlotProps>(styleProps, {
|
||||
root: pressable.props,
|
||||
content: { children: content },
|
||||
icon: { source: icon }
|
||||
});
|
||||
|
||||
return { slotProps, state };
|
||||
},
|
||||
settings,
|
||||
render: (Slots: ISlots<IButtonSlotProps>, renderData: IButtonRenderData, ...children: React.ReactNode[]) => {
|
||||
const info = renderData.state!.info;
|
||||
|
||||
// We shouldn't have to specify the source prop on Slots.icon, here, but we need another drop from @uifabricshared
|
||||
return (
|
||||
<Slots.root>
|
||||
<Slots.stack>
|
||||
{info.icon && <Slots.icon source={renderData.slotProps!.icon.source} />}
|
||||
{info.content && <Slots.content />}
|
||||
{children}
|
||||
</Slots.stack>
|
||||
</Slots.root>
|
||||
);
|
||||
},
|
||||
slots: {
|
||||
root: View,
|
||||
stack: { slotType: View, filter: filterViewProps },
|
||||
icon: { slotType: Image as React.ComponentType<object>, filter: filterImageProps },
|
||||
content: Text
|
||||
},
|
||||
styles: {
|
||||
root: [backgroundColorTokens, borderTokens],
|
||||
stack: [],
|
||||
icon: [foregroundColorTokens, [{ source: 'iconColor', lookup: getPaletteFromTheme, target: 'overlayColor' }]],
|
||||
content: [textTokens, foregroundColorTokens]
|
||||
}
|
||||
});
|
||||
|
||||
export default Button;
|
|
@ -1,108 +0,0 @@
|
|||
import { ViewProps, ImageProps, TextProps } from 'react-native';
|
||||
import { IRenderData } from '@uifabricshared/foundation-composable';
|
||||
import { IPressableState, IPressableProps } from '../Pressable';
|
||||
import { IForegroundColorTokens, IBackgroundColorTokens, IBorderTokens, ITextTokens } from '../tokens';
|
||||
|
||||
export const buttonName = 'Button';
|
||||
|
||||
export interface IButtonInfo extends IPressableState {
|
||||
/*
|
||||
* Disables the button.
|
||||
* @default false
|
||||
*/
|
||||
disabled?: boolean;
|
||||
|
||||
/*
|
||||
* Button icon.
|
||||
*/
|
||||
icon?: boolean;
|
||||
|
||||
/*
|
||||
* Button text.
|
||||
*/
|
||||
content?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Because state updates are coming from the touchable and will cause a child render the button doesn't use
|
||||
* changes in state value to trigger re-render. The values inside inner are effectively mutable and are used
|
||||
* for per-component storage
|
||||
*/
|
||||
export interface IButtonState {
|
||||
info: IButtonInfo;
|
||||
}
|
||||
|
||||
export interface IButtonTokens extends ITextTokens, IForegroundColorTokens, IBackgroundColorTokens, IBorderTokens {
|
||||
/**
|
||||
* The amount of padding between the border and the contents.
|
||||
*/
|
||||
contentPadding?: number | string;
|
||||
|
||||
/**
|
||||
* The amount of padding between the border and the contents when the Button has focus.
|
||||
*/
|
||||
contentPaddingFocused?: number | string;
|
||||
|
||||
/**
|
||||
* The icon color.
|
||||
*/
|
||||
iconColor?: string;
|
||||
|
||||
/**
|
||||
* The icon color when hovering over the Button.
|
||||
*/
|
||||
iconColorHovered?: string;
|
||||
|
||||
/**
|
||||
* The icon color when the Button is being pressed.
|
||||
*/
|
||||
iconColorPressed?: string;
|
||||
|
||||
/**
|
||||
* The size of the icon.
|
||||
*/
|
||||
iconSize?: number | string;
|
||||
|
||||
/**
|
||||
* The weight of the lines used when drawing the icon.
|
||||
*/
|
||||
iconWeight?: number;
|
||||
|
||||
/**
|
||||
* Text to show on the Button.
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/**
|
||||
* Source URL or name of the icon to show on the Button.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
export interface IButtonProps extends IPressableProps {
|
||||
/*
|
||||
* Text to show on the Button.
|
||||
*/
|
||||
content?: string;
|
||||
|
||||
/*
|
||||
* Source URL or name of the icon to show on the Button.
|
||||
*/
|
||||
icon?: string;
|
||||
}
|
||||
|
||||
export interface IButtonSlotProps {
|
||||
root: ViewProps;
|
||||
stack: ViewProps;
|
||||
icon: ImageProps;
|
||||
content: TextProps;
|
||||
}
|
||||
|
||||
export type IButtonRenderData = IRenderData<IButtonSlotProps, IButtonState>;
|
||||
|
||||
export interface IButtonType {
|
||||
props: IButtonProps;
|
||||
tokens: IButtonTokens;
|
||||
slotProps: IButtonSlotProps;
|
||||
state: IButtonState;
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
export * from './Button.types';
|
||||
export * from './Button';
|
|
@ -1,15 +0,0 @@
|
|||
import { NativeTouchEvent, GestureResponderEvent } from 'react-native';
|
||||
|
||||
export function extractSingleTouch(e: GestureResponderEvent): (NativeTouchEvent | null) {
|
||||
const nativeEvent = e.nativeEvent;
|
||||
const touches = nativeEvent.touches;
|
||||
const changedTouches = nativeEvent.changedTouches;
|
||||
const hasTouches = touches && touches.length > 0;
|
||||
const hasChangedTouches = changedTouches && changedTouches.length > 0;
|
||||
|
||||
return !hasTouches && hasChangedTouches
|
||||
? changedTouches[0]
|
||||
: hasTouches
|
||||
? touches[0]
|
||||
: nativeEvent;
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
import { ViewProps, ViewStyle } from 'react-native';
|
||||
import { IRenderChild, IRenderStyle } from './Pressable.types';
|
||||
|
||||
export type IPressState = {
|
||||
pressed?: boolean;
|
||||
};
|
||||
|
||||
export type IFocusState = {
|
||||
focused?: boolean;
|
||||
};
|
||||
|
||||
export type IHoverState = {
|
||||
hovered?: boolean;
|
||||
};
|
||||
|
||||
export type IPressProps = Pick<ViewProps, 'onTouchStart' | 'onTouchCancel' | 'onTouchEnd'>;
|
||||
|
||||
export type IPressableState = IPressState & IFocusState & IHoverState;
|
||||
|
||||
export type IPressableOptions = {
|
||||
onStateChange?: (state: IPressableState) => void;
|
||||
disabled?: boolean;
|
||||
onPress?: () => void;
|
||||
};
|
||||
|
||||
export type IWithPressableOptions<T extends object> = T & IPressableOptions;
|
||||
|
||||
export type IPressableHooks = {
|
||||
props: IWithPressableOptions<ViewProps>;
|
||||
state: IPressableState;
|
||||
};
|
||||
|
||||
export interface IPressableProps extends IWithPressableOptions<ViewProps> {
|
||||
children?: IRenderChild<IPressableState>;
|
||||
|
||||
// Typescript will not allow an extension of the IView* interface
|
||||
// that allows style to take on a function value. This is not a problem
|
||||
// with children, presumably because function components are valid as children.
|
||||
// As such, a renderStyle prop that takes a function value is provided
|
||||
// instead, in conjunction with the base style prop (StyleProp<ViewStyle>).
|
||||
// The style prop will only be used if a renderStyle is not provided.
|
||||
renderStyle?: IRenderStyle<IPressableState, ViewStyle>;
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
/**
|
||||
* This is primarily a fork of React Native's Touchable Mixin.
|
||||
* It has been repurposed as it's own standalone control for win32,
|
||||
* as it needs to support a richer set of functionality on the desktop.
|
||||
* The touchable variants can be rewritten as wrappers around TouchableWin32
|
||||
* by passing the correct set of props down and managing state correctly.
|
||||
*
|
||||
* React Native's Touchable.js file (https://github.com/facebook/react-native/blob/master/Libraries/Components/Touchable/Touchable.js)
|
||||
* provides an overview over how touchables work and interact with the gesture responder system.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
import { atomic, IDefineUseStyling } from '@uifabricshared/foundation-composable';
|
||||
import { IPressableProps } from './Pressable.props';
|
||||
import { mergeSettings, ISlotProps } from '@uifabricshared/foundation-settings';
|
||||
import { useAsPressable } from './useAsPressable';
|
||||
import { View } from 'react-native';
|
||||
|
||||
export const Pressable = atomic<IPressableProps>(
|
||||
View,
|
||||
(userProps: IPressableProps, useStyling: IDefineUseStyling<IPressableProps, ISlotProps<IPressableProps>>) => {
|
||||
const { renderStyle, ...rest } = userProps;
|
||||
const { props, state } = useAsPressable(rest);
|
||||
const styleProps = useStyling(props);
|
||||
renderStyle && (props.style = renderStyle(state));
|
||||
return {
|
||||
slotProps: mergeSettings<ISlotProps<IPressableProps>>(styleProps, { root: props }),
|
||||
state: { state }
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
export default Pressable;
|
|
@ -1,168 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import { GestureResponderEvent, StyleProp } from 'react-native';
|
||||
|
||||
/**
|
||||
* Gesture responder states
|
||||
*/
|
||||
export type IState =
|
||||
| 'NOT_RESPONDER'
|
||||
| 'RESPONDER_INACTIVE_PRESS_IN'
|
||||
| 'RESPONDER_INACTIVE_PRESS_OUT'
|
||||
| 'RESPONDER_ACTIVE_PRESS_IN'
|
||||
| 'RESPONDER_ACTIVE_PRESS_OUT'
|
||||
| 'RESPONDER_ACTIVE_LONG_PRESS_IN'
|
||||
| 'RESPONDER_ACTIVE_LONG_PRESS_OUT'
|
||||
| 'ERROR';
|
||||
|
||||
/**
|
||||
* Signals into the gesture responder system
|
||||
*/
|
||||
export type ISignal =
|
||||
| 'DELAY'
|
||||
| 'RESPONDER_GRANT'
|
||||
| 'RESPONDER_RELEASE'
|
||||
| 'RESPONDER_TERMINATED'
|
||||
| 'ENTER_PRESS_RECT'
|
||||
| 'LEAVE_PRESS_RECT'
|
||||
| 'LONG_PRESS_DETECTED';
|
||||
|
||||
type ISignalTransitions = { [P in ISignal]: IState };
|
||||
|
||||
/**
|
||||
* Map of State to [Signal -> State],
|
||||
* describing state transition maps
|
||||
*/
|
||||
export type ITransitions = { [P in IState]: ISignalTransitions };
|
||||
|
||||
/**
|
||||
* Describes lookup maps of states meeting
|
||||
* some specified criteria
|
||||
*/
|
||||
export type IStateConditions = { [P in IState]: boolean };
|
||||
|
||||
/**
|
||||
* Describes the position at which an event occurred
|
||||
*/
|
||||
export interface IPosition {
|
||||
left: number;
|
||||
top: number;
|
||||
}
|
||||
|
||||
export interface IRect extends IPosition {
|
||||
right: number;
|
||||
bottom: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the height and width of a control
|
||||
*/
|
||||
export interface IDimensions {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes the base of the semi-processed events
|
||||
* that will be passed into callback functions
|
||||
*/
|
||||
export interface ISyntheticEvent<T> {
|
||||
bubbes?: boolean;
|
||||
cancelable?: boolean;
|
||||
currentTarget: number;
|
||||
defaultPrevent?: boolean;
|
||||
disatchConfig: {
|
||||
registrationName: string;
|
||||
};
|
||||
eventPhase?: number;
|
||||
preventDefault: () => void;
|
||||
isDefaultPrevent: () => boolean;
|
||||
stopPropagation: () => void;
|
||||
isPropagationStopped: () => boolean;
|
||||
isTrusted?: boolean;
|
||||
nativeEvent: T;
|
||||
persist: () => void;
|
||||
target?: number;
|
||||
timestamp?: number;
|
||||
// tslint:disable-next-line no-reserved-keywords -- type name matching facebook implementation
|
||||
type?: React.ElementType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Describes a touch
|
||||
*/
|
||||
export interface ITouchInfo {
|
||||
touchActive: boolean;
|
||||
startPageX: number;
|
||||
startPageY: number;
|
||||
startTimeStamp: number;
|
||||
currentPageX: number;
|
||||
currentPageY: number;
|
||||
currentTimeStamp: number;
|
||||
previousPageX: number;
|
||||
previousPageY: number;
|
||||
previousTimeStamp: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* More fully defines an event by augmenting touchHistory
|
||||
*/
|
||||
export interface IResponderSyntheticEvent<T> extends ISyntheticEvent<T> {
|
||||
touchHistory: {
|
||||
indexOfSingleActiveTouch: number;
|
||||
mostRecentTimeStamp: number;
|
||||
numberActiveTouches: number;
|
||||
touchBank: ITouchInfo[];
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* This encompasses all information used by TouchableWin32 based controls
|
||||
* during callbacks and in response to press events
|
||||
*/
|
||||
export type IPressEvent = IResponderSyntheticEvent<{
|
||||
changedTouches: IPressEvent[];
|
||||
force: number;
|
||||
identifier: number;
|
||||
locationX: number;
|
||||
locationY: number;
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
target?: number;
|
||||
timestamp: number;
|
||||
touches: IPressEvent[];
|
||||
}> &
|
||||
GestureResponderEvent;
|
||||
|
||||
/**
|
||||
* Describes both the global and relative position of a press
|
||||
*/
|
||||
export interface IPressInLocation {
|
||||
pageX: number;
|
||||
pageY: number;
|
||||
locationX: number;
|
||||
locationY: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by IRenderChild, it simply describes a function that takes
|
||||
* some generic state type T and returns a ReactNode
|
||||
*/
|
||||
export type IChildAsFunction<T> = (state: T) => React.ReactNode;
|
||||
|
||||
/**
|
||||
* An IRenderChild describes children as a function that take the current
|
||||
* state of the parent component. It is up to the parent to invoke the function
|
||||
* and make proper use of the more typical ReactNode object that is returned
|
||||
* This is an especially helpful construct when children of a Touchable require
|
||||
* knowledge of the interaction state of their parent to properly render themselves
|
||||
* (e.g. foreground color of a text child)
|
||||
*/
|
||||
export type IRenderChild<T> = IChildAsFunction<T> | React.ReactNode;
|
||||
|
||||
/**
|
||||
* An IRenderStyle describes style as a function that takes the current
|
||||
* state of the parent component. It is up to the parent to invoke the function
|
||||
* and make proper use of the more typical StyleProp<S> object that is returned
|
||||
* This is convenient for when styles need to be calculated depending on interaction states.
|
||||
*/
|
||||
export type IRenderStyle<T, S> = (state: T) => StyleProp<S>;
|
|
@ -1,3 +0,0 @@
|
|||
export * from './Pressable.props';
|
||||
export * from './Pressable';
|
||||
export * from './useAsPressable';
|
|
@ -1,70 +0,0 @@
|
|||
import * as React from 'react';
|
||||
import { UIManager, GestureResponderEvent, ViewProps } from 'react-native';
|
||||
import { IPosition, IDimensions } from './Pressable.types';
|
||||
import { extractSingleTouch } from './Pressable.helpers';
|
||||
import { IPressableState, IPressableHooks, IWithPressableOptions, IPressState, IPressProps } from './Pressable.props';
|
||||
|
||||
export function useAsPressable(props: IWithPressableOptions<ViewProps>): IPressableHooks {
|
||||
const [pressProps, pressState] = usePressState(props);
|
||||
|
||||
const newProps = {
|
||||
...props,
|
||||
...pressProps
|
||||
};
|
||||
const newState: IPressableState = {
|
||||
...pressState
|
||||
};
|
||||
|
||||
return { props: newProps, state: newState };
|
||||
}
|
||||
|
||||
export function usePressState(props: IWithPressableOptions<ViewProps>): [IPressProps, IPressState] {
|
||||
const positionOnActivate = React.useRef<IPosition | null>(null);
|
||||
const dimensionsOnActivate = React.useRef<IDimensions>({ width: 0, height: 0 });
|
||||
|
||||
const handleQueryLayout = React.useCallback(
|
||||
(l: number, t: number, w: number, h: number, globalX: number, globalY: number) => {
|
||||
if (!l && !t && !w && !h && !globalX && !globalY) {
|
||||
return;
|
||||
}
|
||||
positionOnActivate.current = { left: globalX, top: globalY };
|
||||
dimensionsOnActivate.current = { width: w, height: h };
|
||||
},
|
||||
[positionOnActivate, dimensionsOnActivate]
|
||||
);
|
||||
|
||||
const [state, setPressState] = React.useState({ pressed: false });
|
||||
const onTouchStart = React.useCallback(
|
||||
(e: GestureResponderEvent) => {
|
||||
setPressState({ pressed: true });
|
||||
// get layout position and dimension of currentTarget
|
||||
const tag = e.currentTarget;
|
||||
UIManager.measure(tag, handleQueryLayout);
|
||||
},
|
||||
[setPressState, handleQueryLayout]
|
||||
);
|
||||
const onTouchCancel = React.useCallback(() => setPressState({ pressed: false }), [setPressState]);
|
||||
const onTouchEnd = React.useCallback(
|
||||
(e: GestureResponderEvent) => {
|
||||
const touch = extractSingleTouch(e);
|
||||
|
||||
const pageX = touch && touch.pageX;
|
||||
const pageY = touch && touch.pageY;
|
||||
|
||||
const isTouchWithinActive =
|
||||
pageX === null || pageY === null
|
||||
? false
|
||||
: positionOnActivate.current && dimensionsOnActivate.current
|
||||
? pageX > positionOnActivate.current.left &&
|
||||
pageY > positionOnActivate.current.top &&
|
||||
pageX < positionOnActivate.current.left + dimensionsOnActivate.current.width &&
|
||||
pageY < positionOnActivate.current.top + dimensionsOnActivate.current.height
|
||||
: false;
|
||||
|
||||
state && !props.disabled && isTouchWithinActive && props.onPress && props.onPress();
|
||||
setPressState({ pressed: false });
|
||||
},
|
||||
[state, props.onPress, props.disabled]
|
||||
);
|
||||
return [{ onTouchStart, onTouchCancel, onTouchEnd }, state];
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
export * from './Button';
|
|
@ -1,18 +0,0 @@
|
|||
import { ViewStyle } from 'react-native';
|
||||
import { IOperationSet } from '@uifabricshared/foundation-tokens';
|
||||
import { ITheme } from '@uifabricshared/theming-ramp';
|
||||
import { getPaletteFromTheme } from './ColorTokens';
|
||||
|
||||
export interface IBorderTokens {
|
||||
borderColor?: string;
|
||||
borderWidth?: number | string;
|
||||
borderRadius?: number | string;
|
||||
borderStyle?: ViewStyle['borderStyle'];
|
||||
}
|
||||
|
||||
export const borderTokens: IOperationSet<IBorderTokens, ITheme> = [
|
||||
{ source: 'borderColor', lookup: getPaletteFromTheme },
|
||||
{ source: 'borderWidth' },
|
||||
{ source: 'borderRadius' },
|
||||
{ source: 'borderStyle' },
|
||||
];
|
|
@ -1,23 +0,0 @@
|
|||
import { ITheme } from '@uifabricshared/theming-ramp';
|
||||
import { IOperationSet } from '@uifabricshared/foundation-tokens';
|
||||
|
||||
export interface IForegroundColorTokens {
|
||||
color?: string;
|
||||
}
|
||||
|
||||
export const getPaletteFromTheme = (theme: ITheme) => {
|
||||
return theme.colors;
|
||||
};
|
||||
|
||||
export const foregroundColorTokens: IOperationSet<IForegroundColorTokens, ITheme> = [{ source: 'color', lookup: getPaletteFromTheme }];
|
||||
|
||||
export interface IBackgroundColorTokens {
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export const backgroundColorTokens: IOperationSet<IBackgroundColorTokens, ITheme> = [
|
||||
{ source: 'backgroundColor', lookup: getPaletteFromTheme }
|
||||
];
|
||||
|
||||
export type IColorTokens = IForegroundColorTokens & IBackgroundColorTokens;
|
||||
export const colorTokens = [...foregroundColorTokens, ...backgroundColorTokens];
|
|
@ -1,15 +0,0 @@
|
|||
import { TextStyle } from 'react-native';
|
||||
import { IOperationSet } from '@uifabricshared/foundation-tokens';
|
||||
import { ITheme } from '@uifabricshared/theming-ramp';
|
||||
|
||||
export interface ITextTokens {
|
||||
fontFamily?: TextStyle['fontFamily'] | string;
|
||||
fontSize?: TextStyle['fontSize'] | string;
|
||||
fontWeight?: TextStyle['fontWeight'] | string;
|
||||
}
|
||||
|
||||
export const textTokens: IOperationSet<ITextTokens, ITheme> = [
|
||||
{ source: 'fontFamily', lookup: (t: ITheme) => t.typography.families },
|
||||
{ source: 'fontSize', lookup: (t: ITheme) => t.typography.sizes },
|
||||
{ source: 'fontWeight', lookup: (t: ITheme) => t.typography.weights }
|
||||
];
|
|
@ -1,3 +0,0 @@
|
|||
export * from './BorderTokens';
|
||||
export * from './ColorTokens';
|
||||
export * from './TextTokens';
|
|
@ -1,147 +0,0 @@
|
|||
import { ViewProps, TextProps, ImageProps } from 'react-native';
|
||||
|
||||
type IWithChildren<T> = T & { children?: React.ReactNode[] };
|
||||
type IPropMask<TProps> = { [P in keyof TProps]-?: boolean };
|
||||
|
||||
const _viewMask: IPropMask<IWithChildren<ViewProps>> = {
|
||||
children: true,
|
||||
accessible: true,
|
||||
accessibilityLabel: true,
|
||||
accessibilityRole: true,
|
||||
accessibilityStates: true,
|
||||
accessibilityHint: true,
|
||||
hitSlop: true,
|
||||
onLayout: true,
|
||||
pointerEvents: true,
|
||||
removeClippedSubviews: true,
|
||||
style: true,
|
||||
testID: true,
|
||||
nativeID: true,
|
||||
onStartShouldSetResponder: true,
|
||||
onStartShouldSetResponderCapture: true,
|
||||
onMoveShouldSetResponder: true,
|
||||
onMoveShouldSetResponderCapture: true,
|
||||
onResponderEnd: true,
|
||||
onResponderGrant: true,
|
||||
onResponderMove: true,
|
||||
onResponderReject: true,
|
||||
onAccessibilityAction: true,
|
||||
onAccessibilityTap: true,
|
||||
onMagicTap: true,
|
||||
onResponderRelease: true,
|
||||
onResponderStart: true,
|
||||
onResponderTerminate: true,
|
||||
onResponderTerminationRequest: true,
|
||||
onTouchCancel: true,
|
||||
onTouchEnd: true,
|
||||
onTouchEndCapture: true,
|
||||
onTouchMove: true,
|
||||
onTouchStart: true,
|
||||
importantForAccessibility: true,
|
||||
accessibilityActions: true,
|
||||
accessibilityComponentType: true,
|
||||
accessibilityElementsHidden: true,
|
||||
accessibilityIgnoresInvertColors: true,
|
||||
accessibilityLiveRegion: true,
|
||||
accessibilityTraits: true,
|
||||
accessibilityViewIsModal: true,
|
||||
collapsable: true,
|
||||
needsOffscreenAlphaCompositing: true,
|
||||
isTVSelectable: true,
|
||||
renderToHardwareTextureAndroid: true,
|
||||
shouldRasterizeIOS: true,
|
||||
hasTVPreferredFocus: true,
|
||||
tvParallaxMagnification: true,
|
||||
tvParallaxProperties: true,
|
||||
tvParallaxShiftDistanceX: true,
|
||||
tvParallaxShiftDistanceY: true,
|
||||
tvParallaxTiltAngle: true
|
||||
};
|
||||
|
||||
const _textMask: IPropMask<IWithChildren<TextProps>> = {
|
||||
children: true,
|
||||
accessibilityComponentType: true,
|
||||
accessibilityElementsHidden: true,
|
||||
accessibilityHint: true,
|
||||
accessibilityIgnoresInvertColors: true,
|
||||
accessibilityLabel: true,
|
||||
accessibilityLiveRegion: true,
|
||||
accessibilityRole: true,
|
||||
accessibilityStates: true,
|
||||
accessibilityTraits: true,
|
||||
accessible: true,
|
||||
onAccessibilityTap: true,
|
||||
importantForAccessibility: true,
|
||||
textBreakStrategy: true,
|
||||
testID: true,
|
||||
allowFontScaling: true,
|
||||
ellipsizeMode: true,
|
||||
lineBreakMode: true,
|
||||
numberOfLines: true,
|
||||
onLayout: true,
|
||||
onLongPress: true,
|
||||
onMagicTap: true,
|
||||
onPress: true,
|
||||
style: true,
|
||||
nativeID: true,
|
||||
maxFontSizeMultiplier: true,
|
||||
adjustsFontSizeToFit: true,
|
||||
minimumFontScale: true,
|
||||
selectable: true,
|
||||
selectionColor: true,
|
||||
suppressHighlighting: true
|
||||
};
|
||||
|
||||
const _imageMask: IPropMask<IWithChildren<ImageProps>> = {
|
||||
children: true,
|
||||
accessibilityComponentType: true,
|
||||
accessibilityElementsHidden: true,
|
||||
accessibilityHint: true,
|
||||
accessibilityIgnoresInvertColors: true,
|
||||
accessibilityLabel: true,
|
||||
accessibilityLiveRegion: true,
|
||||
accessibilityRole: true,
|
||||
accessibilityStates: true,
|
||||
accessibilityTraits: true,
|
||||
accessible: true,
|
||||
onAccessibilityTap: true,
|
||||
importantForAccessibility: true,
|
||||
style: true,
|
||||
onError: true,
|
||||
onLayout: true,
|
||||
onLoad: true,
|
||||
onLoadEnd: true,
|
||||
onLoadStart: true,
|
||||
onMagicTap: true,
|
||||
onPartialLoad: true,
|
||||
onProgress: true,
|
||||
borderBottomLeftRadius: true,
|
||||
borderBottomRightRadius: true,
|
||||
borderRadius: true,
|
||||
borderTopLeftRadius: true,
|
||||
borderTopRightRadius: true,
|
||||
progressiveRenderingEnabled: true,
|
||||
source: true,
|
||||
resizeMethod: true,
|
||||
resizeMode: true,
|
||||
loadingIndicatorSource: true,
|
||||
testID: true,
|
||||
defaultSource: true,
|
||||
blurRadius: true,
|
||||
capInsets: true,
|
||||
width: true,
|
||||
height: true,
|
||||
fadeDuration: true
|
||||
};
|
||||
|
||||
export function filterViewProps(propName: string): boolean {
|
||||
return _viewMask[propName];
|
||||
}
|
||||
|
||||
export function filterTextProps(propName: string): boolean {
|
||||
return _textMask[propName];
|
||||
}
|
||||
|
||||
export function filterImageProps(propName: string): boolean {
|
||||
return _imageMask[propName];
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
/**
|
||||
* Metro configuration for React Native
|
||||
* https://github.com/facebook/react-native
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
// @ts-check
|
||||
|
||||
const path = require('path');
|
||||
const blacklist = require('metro-config/src/defaults/blacklist');
|
||||
const { resolveModule } = require('@uifabricshared/build-native');
|
||||
const { getPackageInfo, normalizeToUnixPath, findGitRoot } = require('just-repo-utils');
|
||||
|
||||
const gitRoot = normalizeToUnixPath(findGitRoot());
|
||||
const dependencies = getPackageInfo().dependencies();
|
||||
|
||||
// Get an array of all packages under repo-root/packages
|
||||
const extraNodeModules = dependencies.names().reduce((o, key) => ({ ...o, [key]: require.resolve(key) }), {});
|
||||
|
||||
// We could generalize the blacklistRE, too, if more packages start depending on 'react-native'. For now this path is a one off.
|
||||
const themingPath = resolveModule('@uifabricshared/theming-react-native');
|
||||
const themedStylsheetPath = resolveModule('@uifabricshared/themed-stylesheet');
|
||||
|
||||
module.exports = {
|
||||
// WatchFolders is only needed due to the yarn workspace layout of node_modules, we need to watch the symlinked locations separately
|
||||
watchFolders: [
|
||||
// Include hoisted modules
|
||||
path.resolve(__dirname, '../..', 'node_modules'),
|
||||
...dependencies.paths()
|
||||
],
|
||||
|
||||
resolver: {
|
||||
extraNodeModules,
|
||||
blacklistRE: blacklist([
|
||||
new RegExp(`${path.resolve(themingPath, 'node_modules/react-native').replace(/[/\\\\]/g, '[/\\\\]')}.*`),
|
||||
new RegExp(`${path.resolve(themedStylsheetPath, 'node_modules/react-native').replace(/[/\\\\]/g, '[/\\\\]')}.*`),
|
||||
new RegExp(`${path.resolve(gitRoot, 'node_modules/react-native').replace(/[/\\\\]/g, '[/\\\\]')}.*`)
|
||||
])
|
||||
// platforms: ['ios', 'android', 'windesktop', 'windows', 'web', 'macos'],
|
||||
},
|
||||
transformer: {
|
||||
getTransformOptions: async () => ({
|
||||
transform: {
|
||||
experimentalImportSupport: false,
|
||||
inlineRequires: false
|
||||
}
|
||||
})
|
||||
}
|
||||
};
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
"name": "@uifabricshared/uifabric-expo-playground",
|
||||
"version": "0.0.1",
|
||||
"main": "node_modules/expo/AppEntry.js",
|
||||
"scripts": {
|
||||
"build": "fluentui-scripts build",
|
||||
"start": "expo start",
|
||||
"android": "expo start --android",
|
||||
"ios": "expo start --ios",
|
||||
"web": "expo start --web",
|
||||
"eject": "expo eject"
|
||||
},
|
||||
"dependencies": {
|
||||
"expo": "^35.0.0",
|
||||
"react": "16.8.6",
|
||||
"react-dom": "16.8.6",
|
||||
"react-native": "https://github.com/expo/react-native/archive/sdk-35.0.0.tar.gz",
|
||||
"react-native-web": "^0.11.7",
|
||||
"@uifabricshared/theming-react-native": "0.7.2",
|
||||
"@uifabricshared/themed-stylesheet": "0.3.3",
|
||||
"@uifabricshared/foundation-compose": "1.6.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "16.8.23",
|
||||
"@types/react-native": "0.57.65",
|
||||
"babel-preset-expo": "^7.1.0",
|
||||
"just-repo-utils": "^0.2.0",
|
||||
"typescript": "^3.8.3"
|
||||
},
|
||||
"workspaces": {
|
||||
"nohoist": [
|
||||
"*react-native*",
|
||||
"*react-native*/**",
|
||||
"*metro*",
|
||||
"*metro*/**",
|
||||
"*@unimodules*",
|
||||
"*@unimodules*/**",
|
||||
"*expo*",
|
||||
"*expo*/**"
|
||||
]
|
||||
},
|
||||
"private": true
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"extends": "@uifabricshared/build-native/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "lib",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"jsx": "react-native",
|
||||
"lib": ["dom", "esnext"],
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
[android]
|
||||
target = Google Inc.:Google APIs:23
|
||||
|
||||
[maven_repositories]
|
||||
central = https://repo1.maven.org/maven2
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
extends: ['@uifabricshared/eslint-config-rules']
|
||||
};
|
|
@ -0,0 +1,99 @@
|
|||
[ignore]
|
||||
; We fork some components by platform
|
||||
.*/*[.]android.js
|
||||
|
||||
; Ignore "BUCK" generated dirs
|
||||
<PROJECT_ROOT>/\.buckd/
|
||||
|
||||
; Ignore unexpected extra "@providesModule"
|
||||
.*/node_modules/.*/node_modules/fbjs/.*
|
||||
|
||||
; Ignore duplicate module providers
|
||||
; For RN Apps installed via npm, "Libraries" folder is inside
|
||||
; "node_modules/react-native" but in the source repo it is in the root
|
||||
node_modules/react-native/Libraries/react-native/React.js
|
||||
|
||||
; Ignore polyfills
|
||||
node_modules/react-native/Libraries/polyfills/.*
|
||||
|
||||
; These should not be required directly
|
||||
; require from fbjs/lib instead: require('fbjs/lib/warning')
|
||||
node_modules/warning/.*
|
||||
|
||||
; Flow doesn't support platforms
|
||||
.*/Libraries/Utilities/HMRLoadingView.js
|
||||
|
||||
[untyped]
|
||||
.*/node_modules/@react-native-community/cli/.*/.*
|
||||
|
||||
[include]
|
||||
|
||||
[libs]
|
||||
node_modules/react-native/Libraries/react-native/react-native-interface.js
|
||||
node_modules/react-native/flow/
|
||||
|
||||
[options]
|
||||
emoji=true
|
||||
|
||||
esproposal.optional_chaining=enable
|
||||
esproposal.nullish_coalescing=enable
|
||||
|
||||
module.file_ext=.js
|
||||
module.file_ext=.json
|
||||
module.file_ext=.ios.js
|
||||
|
||||
module.system=haste
|
||||
module.system.haste.use_name_reducers=true
|
||||
# get basename
|
||||
module.system.haste.name_reducers='^.*/\([a-zA-Z0-9$_.-]+\.js\(\.flow\)?\)$' -> '\1'
|
||||
# strip .js or .js.flow suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.js\(\.flow\)?$' -> '\1'
|
||||
# strip .ios suffix
|
||||
module.system.haste.name_reducers='^\(.*\)\.ios$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.android$' -> '\1'
|
||||
module.system.haste.name_reducers='^\(.*\)\.native$' -> '\1'
|
||||
module.system.haste.paths.blacklist=.*/__tests__/.*
|
||||
module.system.haste.paths.blacklist=.*/__mocks__/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/Libraries/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/RNTester/.*
|
||||
module.system.haste.paths.whitelist=<PROJECT_ROOT>/node_modules/react-native/IntegrationTests/.*
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/react-native/react-native-implementation.js
|
||||
module.system.haste.paths.blacklist=<PROJECT_ROOT>/node_modules/react-native/Libraries/Animated/src/polyfills/.*
|
||||
|
||||
munge_underscores=true
|
||||
|
||||
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
|
||||
|
||||
suppress_type=$FlowIssue
|
||||
suppress_type=$FlowFixMe
|
||||
suppress_type=$FlowFixMeProps
|
||||
suppress_type=$FlowFixMeState
|
||||
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native\\(_ios\\)?_\\(oss\\|fb\\)[a-z,_]*\\)?)\\)?:? #[0-9]+
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[lints]
|
||||
sketchy-null-number=warn
|
||||
sketchy-null-mixed=warn
|
||||
sketchy-number=warn
|
||||
untyped-type-import=warn
|
||||
nonstrict-import=warn
|
||||
deprecated-type=warn
|
||||
unsafe-getters-setters=warn
|
||||
inexact-spread=warn
|
||||
unnecessary-invariant=warn
|
||||
signature-verification-failure=warn
|
||||
deprecated-utility=error
|
||||
|
||||
[strict]
|
||||
deprecated-type
|
||||
nonstrict-import
|
||||
sketchy-null
|
||||
unclear-type
|
||||
unsafe-getters-setters
|
||||
untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.98.0
|