Skip to content

Commit 9597b68

Browse files
author
greweb
committed
Upgrade to latest React Native with new arch support
1 parent 71b3a2b commit 9597b68

File tree

204 files changed

+27153
-18768
lines changed

Some content is hidden

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

204 files changed

+27153
-18768
lines changed

.flowconfig

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitignore

Lines changed: 115 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# OSX
2-
#
32
.DS_Store
3+
.AppleDouble
4+
.LSOverride
45

56
# Xcode
6-
#
77
build/
88
*.pbxuser
99
!default.pbxuser
@@ -21,27 +21,122 @@ DerivedData
2121
*.ipa
2222
*.xcuserstate
2323
project.xcworkspace
24+
**/.xcode.env.local
2425

25-
# node.js
26-
#
27-
node_modules/
28-
npm-debug.log
29-
30-
# android
31-
#
32-
.vscode/
26+
# Android/IntelliJ
27+
.idea/
28+
.gradle/
3329
.settings/
34-
android/bin
35-
android/gradle/wrapper
36-
android/gradlew
37-
android/gradlew.bat
38-
android/local.properties
30+
local.properties
3931
*.iml
40-
.gradle
41-
/local.properties
42-
.idea/
32+
*.hprof
33+
.cxx/
4334
captures/
44-
.externalNativeBuild
35+
.externalNativeBuild/
4536
.project
37+
*.keystore
38+
!debug.keystore
39+
40+
# Node.js
41+
node_modules/
42+
npm-debug.log*
43+
yarn-debug.log*
44+
yarn-error.log*
45+
lerna-debug.log*
46+
.pnpm-debug.log*
47+
48+
# Build artifacts
49+
dist/
50+
build/
51+
*.tgz
52+
*.tar.gz
53+
54+
# Runtime data
55+
pids
56+
*.pid
57+
*.seed
58+
*.pid.lock
59+
60+
# Coverage directory used by tools like istanbul
61+
coverage/
62+
*.lcov
63+
64+
# nyc test coverage
65+
.nyc_output
66+
67+
# ESLint cache
68+
.eslintcache
69+
70+
# TypeScript cache
71+
*.tsbuildinfo
72+
73+
# Optional npm cache directory
74+
.npm
75+
76+
# Optional eslint cache
77+
.eslintcache
78+
79+
# Optional stylelint cache
80+
.stylelintcache
81+
82+
# Microbundle cache
83+
.rpt2_cache/
84+
.rts2_cache_cjs/
85+
.rts2_cache_es/
86+
.rts2_cache_umd/
87+
88+
# Optional REPL history
89+
.node_repl_history
90+
91+
# Output of 'npm pack'
92+
*.tgz
93+
94+
# Yarn Integrity file
95+
.yarn-integrity
96+
97+
# dotenv environment variables file
98+
.env
99+
.env.test
100+
.env.production
101+
.env.local
102+
.env.development.local
103+
.env.test.local
104+
.env.production.local
105+
106+
# Stores VSCode versions used for testing VSCode extensions
107+
.vscode-test
108+
109+
# yarn v2
110+
.yarn/cache
111+
.yarn/unplugged
112+
.yarn/build-state.yml
113+
.yarn/install-state.gz
114+
.pnp.*
115+
116+
# Metro
117+
.metro-health-check*
118+
119+
# Expo (legacy example had expo integration)
120+
**/.expo/
121+
.expo/
122+
123+
# Flipper
124+
# Uncomment the next line to ignore all flipper folders
125+
# ios/Pods/Flipper*
126+
127+
# CocoaPods
128+
Pods/
129+
Podfile.lock
130+
131+
# Temporary files
132+
*.tmp
133+
*.temp
134+
135+
# Editor directories and files
136+
.vscode/
137+
*.swp
138+
*.swo
139+
*~
46140

47-
.yarn
141+
# OS generated files
142+
Thumbs.db

.prettierignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Dependencies
2+
node_modules/
3+
**/node_modules/
4+
5+
# Build outputs
6+
build/
7+
dist/
8+
lib/
9+
android/build/
10+
ios/build/
11+
example/android/build/
12+
example/ios/build/
13+
**/build/
14+
**/.gradle/
15+
**/.cxx/
16+
17+
# Generated files
18+
*.log
19+
*.min.js
20+
*.bundle.js
21+
android/.gradle/
22+
.gradle/
23+
24+
# React Native specific
25+
*.pbxproj
26+
*.xcworkspace/
27+
*.xcodeproj/
28+
*.xcscheme
29+
30+
# Platform specific
31+
.DS_Store
32+
Thumbs.db
33+
34+
# Git
35+
.git/
36+
37+
# IDE
38+
.vscode/
39+
.idea/
40+
41+
# Expo
42+
.expo/
43+
44+
# CocoaPods
45+
Pods/
46+
**/Pods/
47+
Podfile.lock
48+
*.podspec.json
49+
50+
# Metro
51+
.metro-health-check*
52+
53+
# Temp files
54+
*.tmp
55+
*.temp
56+
57+
# Generated source maps
58+
*.map
59+
60+
# Android specific generated files
61+
**/intermediates/
62+
**/outputs/
63+
**/generated/
64+
**/.cxx/
65+
gradle-wrapper.properties
66+
output-metadata.json
67+
compile_commands.json
68+
metadata_generation_record.json
69+
build_model.json
70+
*.json.bak
71+
72+
# iOS specific generated files
73+
**/DerivedData/
74+
**/xcuserdata/
75+
**/*.generated.swift
76+
**/*.generated.h
77+
78+
# React Native generated
79+
**/autolinking.json
80+
81+
# README files in dependencies
82+
**/Pods/**/README.md
83+
84+
# Specific files that shouldn't be formatted
85+
example/android/gradle/wrapper/gradle-wrapper.properties
86+
87+
# Lockfiles
88+
yarn.lock
89+
package-lock.json

.prettierrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"arrowParens": "avoid",
3+
"bracketSameLine": true,
4+
"bracketSpacing": false,
5+
"singleQuote": true,
6+
"trailingComma": "all",
7+
"tabWidth": 2,
8+
"useTabs": false,
9+
"semi": true,
10+
"printWidth": 80,
11+
"quoteProps": "as-needed",
12+
"jsxSingleQuote": true,
13+
"endOfLine": "lf"
14+
}

.prototools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
node = "18"
1+
node = "22"
22
yarn = "4"

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@ function ExampleCaptureOnMountSimpler {
118118
## `captureRef(view, options)` lower level imperative API
119119

120120
```js
121-
import { captureRef } from "react-native-view-shot";
121+
import {captureRef} from 'react-native-view-shot';
122122

123123
captureRef(viewRef, {
124-
format: "jpg",
124+
format: 'jpg',
125125
quality: 0.8,
126126
}).then(
127-
(uri) => console.log("Image saved to", uri),
128-
(error) => console.error("Oops, snapshot failed", error)
127+
uri => console.log('Image saved to', uri),
128+
error => console.error('Oops, snapshot failed', error),
129129
);
130130
```
131131

@@ -153,14 +153,14 @@ NB: the tmpfile captures are automatically cleaned out after the app closes, so
153153
## `captureScreen()` Android and iOS Only
154154

155155
```js
156-
import { captureScreen } from "react-native-view-shot";
156+
import {captureScreen} from 'react-native-view-shot';
157157

158158
captureScreen({
159-
format: "jpg",
159+
format: 'jpg',
160160
quality: 0.8,
161161
}).then(
162-
(uri) => console.log("Image saved to", uri),
163-
(error) => console.error("Oops, snapshot failed", error)
162+
uri => console.log('Image saved to', uri),
163+
error => console.error('Oops, snapshot failed', error),
164164
);
165165
```
166166

@@ -235,27 +235,27 @@ approach for capturing screen views and deliver them to the react side.
235235
### How to work with zip-base64 and RAW format?
236236

237237
```js
238-
const fs = require("fs");
239-
const zlib = require("zlib");
240-
const PNG = require("pngjs").PNG;
241-
const Buffer = require("buffer").Buffer;
238+
const fs = require('fs');
239+
const zlib = require('zlib');
240+
const PNG = require('pngjs').PNG;
241+
const Buffer = require('buffer').Buffer;
242242

243-
const format = Platform.OS === "android" ? "raw" : "png";
244-
const result = Platform.OS === "android" ? "zip-base64" : "base64";
243+
const format = Platform.OS === 'android' ? 'raw' : 'png';
244+
const result = Platform.OS === 'android' ? 'zip-base64' : 'base64';
245245

246-
captureRef(this.ref, { result, format }).then((data) => {
246+
captureRef(this.ref, {result, format}).then(data => {
247247
// expected pattern 'width:height|', example: '1080:1731|'
248248
const resolution = /^(\d+):(\d+)\|/g.exec(data);
249-
const width = (resolution || ["", 0, 0])[1];
250-
const height = (resolution || ["", 0, 0])[2];
251-
const base64 = data.substr((resolution || [""])[0].length || 0);
249+
const width = (resolution || ['', 0, 0])[1];
250+
const height = (resolution || ['', 0, 0])[2];
251+
const base64 = data.substr((resolution || [''])[0].length || 0);
252252

253253
// convert from base64 to Buffer
254-
const buffer = Buffer.from(base64, "base64");
254+
const buffer = Buffer.from(base64, 'base64');
255255
// un-compress data
256256
const inflated = zlib.inflateSync(buffer);
257257
// compose PNG
258-
const png = new PNG({ width, height });
258+
const png = new PNG({width, height});
259259
png.data = inflated;
260260
const pngData = PNG.sync.write(png);
261261
// save composed PNG

0 commit comments

Comments
 (0)