Skip to content

Commit eaa284d

Browse files
committed
Merge branch 'dev'
2 parents 1d01287 + 1e77259 commit eaa284d

File tree

219 files changed

+7813
-3934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

219 files changed

+7813
-3934
lines changed

.github/workflows/build_ios_app.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ jobs:
99
build:
1010
runs-on: macos-latest
1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: actions/setup-node@v2
12+
- uses: actions/checkout@v3
13+
- uses: actions/setup-node@v3
1414
with:
15-
node-version: 14
15+
node-version: 16
1616

1717
- run: yarn install
1818
- run: npm run build

.github/workflows/ci.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,10 @@ jobs:
1212
build-deploy:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-node@v3
1717
with:
1818
node-version: 16
19-
registry-url: 'https://registry.npmjs.org'
2019

2120
- run: yarn install
2221
- run: npm run build
@@ -70,6 +69,13 @@ jobs:
7069
env:
7170
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
7271

72+
- name: 📦 @uiw/react-native-image-picker publish to NPM
73+
run: npm publish
74+
working-directory: packages/react-native-image-picker
75+
continue-on-error: true
76+
env:
77+
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}'
78+
7379
- name: Deploy
7480
uses: peaceiris/actions-gh-pages@v3
7581
with:

.github/workflows/pull_request.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ env:
88

99
jobs:
1010
build-deploy:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions/setup-node@v2
13+
- uses: actions/checkout@v3
14+
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 14
16+
node-version: 16
1717

1818
- run: yarn install
1919
- run: npm run build

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
doc
55
lib
6+
lib2
67
esm
78

89
### Node ###

example/base/ios/Podfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ target 'AwesomeProject' do
3131
use_flipper!()
3232

3333
post_install do |installer|
34-
react_native_post_install(installer)
34+
installer.pods_project.targets.each do |target|
35+
target.build_configurations.each do |config|
36+
config.build_settings['SWIFT_VERSION'] = '5.0'
37+
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] < '12.4'
38+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
39+
end
40+
end
41+
end
3542
__apply_Xcode_12_5_M1_post_install_workaround(installer)
3643
end
3744
end

example/base/metro.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
resolver: {
1111
extraNodeModules: {
1212
'@uiw/react-native': path.resolve(`${__dirname}/lib/`),
13+
'@uiw/react-native-image-picker': path.resolve(`${__dirname}/lib2/`),
1314
// '@uiw/react-native': path.resolve(`${__dirname}/../../packages/core/`),
1415
// 'react-native-svg': path.resolve(
1516
// `${__dirname}/../../node_modules/react-native-svg/`,

example/base/package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,16 @@
1010
"lint": "eslint ."
1111
},
1212
"dependencies": {
13-
"@uiw/react-native": "3.2.3",
1413
"react": "18.0.0",
1514
"react-native": "0.69.7",
16-
"react-native-svg": "12.1.1"
15+
"@uiw/react-native": "3.2.3",
16+
"@uiw/react-native-image-picker": "3.2.3",
17+
"react-native-svg": "13.0.0",
18+
"react-native-gesture-handler": "2.8.0",
19+
"react-native-root-siblings": "4.1.1",
20+
"react-native-image-picker": "^5.3.1",
21+
"react-native-image-viewing": "~0.2.2",
22+
"@react-native-camera-roll/camera-roll": "5.3.1"
1723
},
1824
"devDependencies": {
1925
"@babel/core": "~7.20.7",

example/examples/android/app/src/main/AndroidManifest.xml

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,20 @@
22
package="com.examples">
33

44
<uses-permission android:name="android.permission.INTERNET" />
5-
5+
<uses-permission android:name="android.permission.CAMERA" />
6+
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
7+
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
8+
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
69
<application
710
android:name=".MainApplication"
811
android:label="@string/app_name"
912
android:icon="@mipmap/ic_launcher"
1013
android:roundIcon="@mipmap/ic_launcher_round"
1114
android:allowBackup="false"
12-
android:theme="@style/AppTheme">
15+
android:theme="@style/AppTheme"
16+
android:requestLegacyExternalStorage="true"
17+
android:usesCleartextTraffic="true"
18+
>
1319
<activity
1420
android:name=".MainActivity"
1521
android:label="@string/app_name"

example/examples/ios/Podfile

+8-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@ target 'examples' do
3131
use_flipper!()
3232

3333
post_install do |installer|
34-
react_native_post_install(installer)
34+
installer.pods_project.targets.each do |target|
35+
target.build_configurations.each do |config|
36+
config.build_settings['SWIFT_VERSION'] = '5.0'
37+
if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] < '12.4'
38+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.4'
39+
end
40+
end
41+
end
3542
__apply_Xcode_12_5_M1_post_install_workaround(installer)
3643
end
3744
end

example/examples/ios/Podfile.lock

+13-1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,10 @@ PODS:
284284
- React-jsinspector (0.69.7)
285285
- React-logger (0.69.7):
286286
- glog
287+
- react-native-cameraroll (5.3.1):
288+
- React-Core
289+
- react-native-image-picker (5.3.1):
290+
- React-Core
287291
- react-native-safe-area-context (4.3.4):
288292
- RCT-Folly
289293
- RCTRequired
@@ -413,6 +417,8 @@ DEPENDENCIES:
413417
- React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`)
414418
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
415419
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
420+
- "react-native-cameraroll (from `../node_modules/@react-native-camera-roll/camera-roll`)"
421+
- react-native-image-picker (from `../node_modules/react-native-image-picker`)
416422
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
417423
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
418424
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
@@ -489,6 +495,10 @@ EXTERNAL SOURCES:
489495
:path: "../node_modules/react-native/ReactCommon/jsinspector"
490496
React-logger:
491497
:path: "../node_modules/react-native/ReactCommon/logger"
498+
react-native-cameraroll:
499+
:path: "../node_modules/@react-native-camera-roll/camera-roll"
500+
react-native-image-picker:
501+
:path: "../node_modules/react-native-image-picker"
492502
react-native-safe-area-context:
493503
:path: "../node_modules/react-native-safe-area-context"
494504
React-perflogger:
@@ -559,6 +569,8 @@ SPEC CHECKSUMS:
559569
React-jsiexecutor: a73bec0218ba959fc92f811b581ad6c2270c6b6f
560570
React-jsinspector: 8134ee22182b8dd98dc0973db6266c398103ce6c
561571
React-logger: 1e7ac909607ee65fd5c4d8bea8c6e644f66b8843
572+
react-native-cameraroll: f3050460fe1708378698c16686bfaa5f34099be2
573+
react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb
562574
react-native-safe-area-context: dfe5aa13bee37a0c7e8059d14f72ffc076d120e9
563575
React-perflogger: 8e832d4e21fdfa613033c76d58d7e617341e804b
564576
React-RCTActionSheet: 9ca778182a9523991bff6381045885b6e808bb73
@@ -580,6 +592,6 @@ SPEC CHECKSUMS:
580592
Yoga: 0b84a956f7393ef1f37f3bb213c516184e4a689d
581593
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
582594

583-
PODFILE CHECKSUM: 36745b97236db17730b2d687b78fe071003a4a52
595+
PODFILE CHECKSUM: d4d2826c3f25f928be9b489778a443d49118b6c5
584596

585597
COCOAPODS: 1.11.3

example/examples/ios/examples/Info.plist

+4
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
</dict>
3636
</dict>
3737
</dict>
38+
<key>NSCameraUsageDescription</key>
39+
<string>This app requires access to the camera.</string>
40+
<key>NSPhotoLibraryAddUsageDescription</key>
41+
<string>This app requires access to the photo.</string>
3842
<key>NSLocationWhenInUseUsageDescription</key>
3943
<string></string>
4044
<key>UILaunchStoryboardName</key>

example/examples/metro.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ module.exports = {
1010
resolver: {
1111
extraNodeModules: {
1212
'@uiw/react-native': path.resolve(`${__dirname}/lib/`),
13+
'@uiw/react-native-image-picker': path.resolve(`${__dirname}/lib2/`),
1314
// '@uiw/react-native': path.resolve(`${__dirname}/../../packages/core/`),
1415
// 'react-native-svg': path.resolve(
1516
// `${__dirname}/../../node_modules/react-native-svg/`,

example/examples/package.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"android": "react-native run-android",
7-
"ios": "react-native run-ios",
7+
"ios": "react-native run-ios --simulator 'iPhone 14'",
88
"start": "react-native start --reset-cache",
99
"test": "jest",
1010
"lint": "eslint . --ext .js,.jsx,.ts,.tsx"
@@ -19,7 +19,11 @@
1919
"react-native-gesture-handler": "~2.5.0",
2020
"react-native-safe-area-context": "~4.3.1",
2121
"react-native-screens": "~3.15.0",
22-
"react-native-svg": "12.1.1"
22+
"react-native-svg": "13.0.0",
23+
"react-native-image-picker": "^5.3.1",
24+
"react-native-image-viewing": "~0.2.2",
25+
"@uiw/react-native-image-picker": "3.2.3",
26+
"@react-native-camera-roll/camera-roll": "5.3.1"
2327
},
2428
"devDependencies": {
2529
"@babel/core": "~7.20.7",

example/examples/src/App.tsx

+31-27
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import React from 'react';
2-
import {NavigationContainer} from '@react-navigation/native';
2+
import {useColorScheme} from 'react-native';
3+
import {NavigationContainer, DefaultTheme, DarkTheme} from '@react-navigation/native';
34
import {createStackNavigator} from '@react-navigation/stack';
45
import {SafeAreaView, StatusBar, StyleSheet} from 'react-native';
56
import {RootSiblingParent} from 'react-native-root-siblings';
6-
7+
import {ThemeProvider, theme} from '@uiw/react-native';
78
import {stackPageData} from './routes';
89

910
const Stack = createStackNavigator();
@@ -15,35 +16,38 @@ const styles = StyleSheet.create({
1516
});
1617

1718
const App = () => {
19+
const colorScheme = useColorScheme();
1820
return (
1921
<RootSiblingParent>
2022
<SafeAreaView style={styles.block}>
2123
<StatusBar barStyle="dark-content" />
22-
<NavigationContainer>
23-
<Stack.Navigator initialRouteName="Home">
24-
<Stack.Screen
25-
name="Home"
26-
component={require('./Home').default}
27-
options={{
28-
headerTitle: 'Home',
29-
// header: () => null,
30-
}}
31-
/>
32-
{stackPageData.map((props: any, index: number) => {
33-
return (
34-
<Stack.Screen
35-
key={index}
36-
{...props}
37-
// name="Home"
38-
// options={{
39-
// header: () => null
40-
// }}
41-
// component={Home}
42-
/>
43-
);
44-
})}
45-
</Stack.Navigator>
46-
</NavigationContainer>
24+
<ThemeProvider theme={colorScheme === 'light' ? {...theme.lightTheme} : {...theme.darkTheme}}>
25+
<NavigationContainer theme={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
26+
<Stack.Navigator initialRouteName="Home">
27+
<Stack.Screen
28+
name="Home"
29+
component={require('./Home').default}
30+
options={{
31+
headerTitle: 'Home',
32+
// header: () => null,
33+
}}
34+
/>
35+
{stackPageData.map((props: any, index: number) => {
36+
return (
37+
<Stack.Screen
38+
key={index}
39+
{...props}
40+
// name="Home"
41+
// options={{
42+
// header: () => null
43+
// }}
44+
// component={Home}
45+
/>
46+
);
47+
})}
48+
</Stack.Navigator>
49+
</NavigationContainer>
50+
</ThemeProvider>
4751
</SafeAreaView>
4852
</RootSiblingParent>
4953
);

0 commit comments

Comments
 (0)