@oguzhnatly/react-native-image-manipulator 1.0.5 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/publish.yml +72 -0
- package/Example/.bundle/config +2 -0
- package/Example/.eslintrc.js +4 -0
- package/Example/.prettierrc.js +7 -0
- package/Example/.watchmanconfig +1 -1
- package/Example/App.tsx +58 -0
- package/Example/Gemfile +7 -0
- package/Example/Gemfile.lock +99 -0
- package/Example/__tests__/App.test.tsx +17 -0
- package/Example/android/app/build.gradle +83 -114
- package/Example/android/app/debug.keystore +0 -0
- package/Example/android/app/proguard-rules.pro +0 -7
- package/Example/android/app/src/debug/AndroidManifest.xml +9 -0
- package/Example/android/app/src/main/AndroidManifest.xml +6 -7
- package/Example/android/app/src/main/java/com/example/MainActivity.kt +22 -0
- package/Example/android/app/src/main/java/com/example/MainApplication.kt +45 -0
- package/Example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/Example/android/app/src/main/res/values/styles.xml +2 -1
- package/Example/android/build.gradle +11 -29
- package/Example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/Example/android/gradle/wrapper/gradle-wrapper.properties +3 -1
- package/Example/android/gradle.properties +25 -2
- package/Example/android/gradlew +189 -112
- package/Example/android/gradlew.bat +32 -24
- package/Example/android/settings.gradle +2 -1
- package/Example/app.json +1 -1
- package/Example/assets/tiktok.png +0 -0
- package/Example/babel.config.js +3 -0
- package/Example/index.js +3 -1
- package/Example/ios/.xcode.env +11 -0
- package/Example/ios/Example/AppDelegate.h +2 -10
- package/Example/ios/Example/AppDelegate.mm +31 -0
- package/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json +30 -15
- package/Example/ios/Example/Info.plist +9 -18
- package/Example/ios/Example/LaunchScreen.storyboard +47 -0
- package/Example/ios/Example/main.m +2 -8
- package/Example/ios/Example.xcodeproj/project.pbxproj +238 -1024
- package/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +2 -43
- package/Example/ios/Example.xcworkspace/contents.xcworkspacedata +10 -0
- package/Example/ios/Example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/Example/ios/ExampleTests/ExampleTests.m +19 -21
- package/Example/ios/Podfile +56 -0
- package/Example/ios/Podfile.lock +1448 -0
- package/Example/jest.config.js +3 -0
- package/Example/metro.config.js +43 -0
- package/Example/package.json +26 -6
- package/Example/tsconfig.json +3 -0
- package/Example/yarn.lock +5580 -3025
- package/README.md +218 -104
- package/android/build.gradle +34 -3
- package/android/src/main/java/com/{reactnativeimagemanipulator → oguzhnatly/rnimagemanipulator}/RNImageManipulatorModule.java +7 -4
- package/android/src/main/java/com/oguzhnatly/rnimagemanipulator/RNImageManipulatorPackage.java +112 -0
- package/android/src/paper/java/com/oguzhnatly/rnimagemanipulator/NativeImageManipulatorModuleSpec.java +33 -0
- package/build/fabric/NativeImageManipulatorModule.d.ts +12 -0
- package/build/fabric/NativeImageManipulatorModule.js +3 -0
- package/build/fabric/NativeImageManipulatorModule.js.map +1 -0
- package/build/index.d.ts +18 -17
- package/build/index.js +6 -3
- package/build/index.js.map +1 -1
- package/fabric/NativeImageManipulatorModule.ts +14 -0
- package/index.ts +28 -8
- package/ios/ImageUtils.h +6 -1
- package/ios/ImageUtils.m +180 -0
- package/ios/RNImageManipulator.h +10 -6
- package/ios/RNImageManipulator.mm +31 -0
- package/package.json +17 -2
- package/react-native-image-manipulator.podspec +11 -3
- package/tsconfig.json +1 -5
- package/Example/.babelrc +0 -3
- package/Example/.buckconfig +0 -6
- package/Example/.flowconfig +0 -70
- package/Example/.gitattributes +0 -1
- package/Example/App.js +0 -49
- package/Example/android/app/BUCK +0 -65
- package/Example/android/app/src/main/java/com/example/MainActivity.java +0 -15
- package/Example/android/app/src/main/java/com/example/MainApplication.java +0 -45
- package/Example/android/keystores/BUCK +0 -8
- package/Example/android/keystores/debug.keystore.properties +0 -4
- package/Example/ios/Example/AppDelegate.m +0 -35
- package/Example/ios/Example/Base.lproj/LaunchScreen.xib +0 -42
- package/Example/ios/Example-tvOS/Info.plist +0 -54
- package/Example/ios/Example-tvOSTests/Info.plist +0 -24
- package/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme +0 -129
- package/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorPackage.java +0 -29
- package/index.d.ts +0 -26
- package/ios/RNImageManipulator.m +0 -200
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<Scheme
|
|
3
|
-
LastUpgradeVersion = "
|
|
3
|
+
LastUpgradeVersion = "1210"
|
|
4
4
|
version = "1.3">
|
|
5
5
|
<BuildAction
|
|
6
|
-
parallelizeBuildables = "
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
7
|
buildImplicitDependencies = "YES">
|
|
8
8
|
<BuildActionEntries>
|
|
9
|
-
<BuildActionEntry
|
|
10
|
-
buildForTesting = "YES"
|
|
11
|
-
buildForRunning = "YES"
|
|
12
|
-
buildForProfiling = "YES"
|
|
13
|
-
buildForArchiving = "YES"
|
|
14
|
-
buildForAnalyzing = "YES">
|
|
15
|
-
<BuildableReference
|
|
16
|
-
BuildableIdentifier = "primary"
|
|
17
|
-
BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
|
|
18
|
-
BuildableName = "libReact.a"
|
|
19
|
-
BlueprintName = "React"
|
|
20
|
-
ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
|
|
21
|
-
</BuildableReference>
|
|
22
|
-
</BuildActionEntry>
|
|
23
9
|
<BuildActionEntry
|
|
24
10
|
buildForTesting = "YES"
|
|
25
11
|
buildForRunning = "YES"
|
|
@@ -34,20 +20,6 @@
|
|
|
34
20
|
ReferencedContainer = "container:Example.xcodeproj">
|
|
35
21
|
</BuildableReference>
|
|
36
22
|
</BuildActionEntry>
|
|
37
|
-
<BuildActionEntry
|
|
38
|
-
buildForTesting = "YES"
|
|
39
|
-
buildForRunning = "YES"
|
|
40
|
-
buildForProfiling = "NO"
|
|
41
|
-
buildForArchiving = "NO"
|
|
42
|
-
buildForAnalyzing = "YES">
|
|
43
|
-
<BuildableReference
|
|
44
|
-
BuildableIdentifier = "primary"
|
|
45
|
-
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
|
46
|
-
BuildableName = "ExampleTests.xctest"
|
|
47
|
-
BlueprintName = "ExampleTests"
|
|
48
|
-
ReferencedContainer = "container:Example.xcodeproj">
|
|
49
|
-
</BuildableReference>
|
|
50
|
-
</BuildActionEntry>
|
|
51
23
|
</BuildActionEntries>
|
|
52
24
|
</BuildAction>
|
|
53
25
|
<TestAction
|
|
@@ -67,17 +39,6 @@
|
|
|
67
39
|
</BuildableReference>
|
|
68
40
|
</TestableReference>
|
|
69
41
|
</Testables>
|
|
70
|
-
<MacroExpansion>
|
|
71
|
-
<BuildableReference
|
|
72
|
-
BuildableIdentifier = "primary"
|
|
73
|
-
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
74
|
-
BuildableName = "Example.app"
|
|
75
|
-
BlueprintName = "Example"
|
|
76
|
-
ReferencedContainer = "container:Example.xcodeproj">
|
|
77
|
-
</BuildableReference>
|
|
78
|
-
</MacroExpansion>
|
|
79
|
-
<AdditionalOptions>
|
|
80
|
-
</AdditionalOptions>
|
|
81
42
|
</TestAction>
|
|
82
43
|
<LaunchAction
|
|
83
44
|
buildConfiguration = "Debug"
|
|
@@ -99,8 +60,6 @@
|
|
|
99
60
|
ReferencedContainer = "container:Example.xcodeproj">
|
|
100
61
|
</BuildableReference>
|
|
101
62
|
</BuildableProductRunnable>
|
|
102
|
-
<AdditionalOptions>
|
|
103
|
-
</AdditionalOptions>
|
|
104
63
|
</LaunchAction>
|
|
105
64
|
<ProfileAction
|
|
106
65
|
buildConfiguration = "Release"
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
1
|
#import <UIKit/UIKit.h>
|
|
9
2
|
#import <XCTest/XCTest.h>
|
|
10
3
|
|
|
@@ -12,7 +5,7 @@
|
|
|
12
5
|
#import <React/RCTRootView.h>
|
|
13
6
|
|
|
14
7
|
#define TIMEOUT_SECONDS 600
|
|
15
|
-
#define TEXT_TO_LOOK_FOR @"Welcome to React
|
|
8
|
+
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
|
16
9
|
|
|
17
10
|
@interface ExampleTests : XCTestCase
|
|
18
11
|
|
|
@@ -20,7 +13,7 @@
|
|
|
20
13
|
|
|
21
14
|
@implementation ExampleTests
|
|
22
15
|
|
|
23
|
-
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
|
16
|
+
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL (^)(UIView *view))test
|
|
24
17
|
{
|
|
25
18
|
if (test(view)) {
|
|
26
19
|
return YES;
|
|
@@ -40,29 +33,34 @@
|
|
|
40
33
|
BOOL foundElement = NO;
|
|
41
34
|
|
|
42
35
|
__block NSString *redboxError = nil;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
#ifdef DEBUG
|
|
37
|
+
RCTSetLogFunction(
|
|
38
|
+
^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
|
39
|
+
if (level >= RCTLogLevelError) {
|
|
40
|
+
redboxError = message;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
#endif
|
|
48
44
|
|
|
49
45
|
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
|
50
46
|
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
51
47
|
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
52
48
|
|
|
53
|
-
foundElement = [self findSubviewInView:vc.view
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
49
|
+
foundElement = [self findSubviewInView:vc.view
|
|
50
|
+
matching:^BOOL(UIView *view) {
|
|
51
|
+
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
|
52
|
+
return YES;
|
|
53
|
+
}
|
|
54
|
+
return NO;
|
|
55
|
+
}];
|
|
59
56
|
}
|
|
60
57
|
|
|
58
|
+
#ifdef DEBUG
|
|
61
59
|
RCTSetLogFunction(RCTDefaultLogFunction);
|
|
60
|
+
#endif
|
|
62
61
|
|
|
63
62
|
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
|
64
63
|
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
|
65
64
|
}
|
|
66
65
|
|
|
67
|
-
|
|
68
66
|
@end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Resolve react_native_pods.rb with node to allow for hoisting
|
|
2
|
+
require Pod::Executable.execute_command('node', ['-p',
|
|
3
|
+
'require.resolve(
|
|
4
|
+
"react-native/scripts/react_native_pods.rb",
|
|
5
|
+
{paths: [process.argv[1]]},
|
|
6
|
+
)', __dir__]).strip
|
|
7
|
+
|
|
8
|
+
platform :ios, min_ios_version_supported
|
|
9
|
+
prepare_react_native_project!
|
|
10
|
+
|
|
11
|
+
# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
|
|
12
|
+
# because `react-native-flipper` depends on (FlipperKit,...) that will be excluded
|
|
13
|
+
#
|
|
14
|
+
# To fix this you can also exclude `react-native-flipper` using a `react-native.config.js`
|
|
15
|
+
# ```js
|
|
16
|
+
# module.exports = {
|
|
17
|
+
# dependencies: {
|
|
18
|
+
# ...(process.env.NO_FLIPPER ? { 'react-native-flipper': { platforms: { ios: null } } } : {}),
|
|
19
|
+
# ```
|
|
20
|
+
flipper_config = ENV['NO_FLIPPER'] == "1" ? FlipperConfiguration.disabled : FlipperConfiguration.enabled
|
|
21
|
+
ENV['RCT_NEW_ARCH_ENABLED'] = '1'
|
|
22
|
+
|
|
23
|
+
linkage = ENV['USE_FRAMEWORKS']
|
|
24
|
+
if linkage != nil
|
|
25
|
+
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green
|
|
26
|
+
use_frameworks! :linkage => linkage.to_sym
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
target 'Example' do
|
|
30
|
+
config = use_native_modules!
|
|
31
|
+
|
|
32
|
+
use_react_native!(
|
|
33
|
+
:path => config[:reactNativePath],
|
|
34
|
+
# Enables Flipper.
|
|
35
|
+
#
|
|
36
|
+
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
37
|
+
# you should disable the next line.
|
|
38
|
+
:flipper_configuration => flipper_config,
|
|
39
|
+
# An absolute path to your application root.
|
|
40
|
+
:app_path => "#{Pod::Config.instance.installation_root}/.."
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
target 'ExampleTests' do
|
|
44
|
+
inherit! :complete
|
|
45
|
+
# Pods for testing
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
post_install do |installer|
|
|
49
|
+
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
|
|
50
|
+
react_native_post_install(
|
|
51
|
+
installer,
|
|
52
|
+
config[:reactNativePath],
|
|
53
|
+
:mac_catalyst_enabled => false
|
|
54
|
+
)
|
|
55
|
+
end
|
|
56
|
+
end
|