mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-08 09:10:44 +00:00
refactor: rename example to paper-example (#2509)
# Summary Rename example app to match the pattern.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
diff --git a/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt b/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt
|
||||
index 4ee1c8f..3f63637 100644
|
||||
--- a/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt
|
||||
+++ b/node_modules/react-native-safe-area-context/android/src/main/jni/CMakeLists.txt
|
||||
@@ -39,22 +39,9 @@ target_include_directories(
|
||||
|
||||
target_link_libraries(
|
||||
${LIB_TARGET_NAME}
|
||||
- fbjni
|
||||
- folly_runtime
|
||||
- glog
|
||||
- jsi
|
||||
- react_codegen_rncore
|
||||
- react_debug
|
||||
- react_nativemodule_core
|
||||
- react_render_core
|
||||
- react_render_debug
|
||||
- react_render_graphics
|
||||
- react_render_mapbuffer
|
||||
- react_render_componentregistry
|
||||
- react_utils
|
||||
- rrc_view
|
||||
- turbomodulejsijni
|
||||
- yoga
|
||||
+ fbjni::fbjni
|
||||
+ ReactAndroid::jsi
|
||||
+ ReactAndroid::reactnative
|
||||
)
|
||||
|
||||
target_compile_options(
|
||||
@@ -0,0 +1,51 @@
|
||||
diff --git a/node_modules/react-native-view-shot/ios/RNViewShot.m b/node_modules/react-native-view-shot/ios/RNViewShot.m
|
||||
index bd55b92..6a20e9d 100644
|
||||
--- a/node_modules/react-native-view-shot/ios/RNViewShot.m
|
||||
+++ b/node_modules/react-native-view-shot/ios/RNViewShot.m
|
||||
@@ -106,7 +106,7 @@ - (dispatch_queue_t)methodQueue
|
||||
scrollView.frame = CGRectMake(0, 0, scrollView.contentSize.width, scrollView.contentSize.height);
|
||||
}
|
||||
|
||||
- UIGraphicsImageRenderer *renderer = [[UIGraphicsImageRenderer alloc] initWithSize:size];
|
||||
+ UIGraphicsBeginImageContextWithOptions(size, NO, 0);
|
||||
|
||||
if (renderInContext) {
|
||||
// this comes with some trade-offs such as inability to capture gradients or scrollview's content in full but it works for large views
|
||||
@@ -117,8 +117,8 @@ - (dispatch_queue_t)methodQueue
|
||||
// this doesn't work for large views and reports incorrect success even though the image is blank
|
||||
success = [rendered drawViewHierarchyInRect:(CGRect){CGPointZero, size} afterScreenUpdates:YES];
|
||||
}
|
||||
-
|
||||
- UIImage *image = [renderer imageWithActions:^(UIGraphicsImageRendererContext * _Nonnull rendererContext) {}];
|
||||
+ UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
|
||||
+ UIGraphicsEndImageContext();
|
||||
|
||||
if (snapshotContentContainer) {
|
||||
// Restore scroll & frame
|
||||
@@ -152,11 +152,11 @@ - (dispatch_queue_t)methodQueue
|
||||
NSString *res = nil;
|
||||
if ([result isEqualToString:@"base64"]) {
|
||||
// Return as a base64 raw string
|
||||
- res = [data base64EncodedStringWithOptions: 0];
|
||||
+ res = [data base64EncodedStringWithOptions: NSDataBase64EncodingEndLineWithLineFeed];
|
||||
}
|
||||
else if ([result isEqualToString:@"data-uri"]) {
|
||||
// Return as a base64 data uri string
|
||||
- NSString *base64 = [data base64EncodedStringWithOptions: 0];
|
||||
+ NSString *base64 = [data base64EncodedStringWithOptions: NSDataBase64EncodingEndLineWithLineFeed];
|
||||
NSString *imageFormat = ([format isEqualToString:@"jpg"]) ? @"jpeg" : format;
|
||||
res = [NSString stringWithFormat:@"data:image/%@;base64,%@", imageFormat, base64];
|
||||
}
|
||||
diff --git a/node_modules/react-native-view-shot/src/specs/NativeRNViewShot.ts b/node_modules/react-native-view-shot/src/specs/NativeRNViewShot.ts
|
||||
index a6f4c00..1e9e6ce 100644
|
||||
--- a/node_modules/react-native-view-shot/src/specs/NativeRNViewShot.ts
|
||||
+++ b/node_modules/react-native-view-shot/src/specs/NativeRNViewShot.ts
|
||||
@@ -2,7 +2,7 @@ import type { TurboModule } from 'react-native';
|
||||
import { TurboModuleRegistry } from 'react-native';
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
- releaseCapture: () => string;
|
||||
+ releaseCapture: (uri: string) => void;
|
||||
captureRef: (tag: number, options: Object) => Promise<string>
|
||||
captureScreen: (options: Object) => Promise<string>;
|
||||
}
|
||||
Reference in New Issue
Block a user