@oguzhnatly/react-native-image-manipulator 1.0.0

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.
Files changed (67) hide show
  1. package/.gitattributes +1 -0
  2. package/Example/.babelrc +3 -0
  3. package/Example/.buckconfig +6 -0
  4. package/Example/.flowconfig +70 -0
  5. package/Example/.gitattributes +1 -0
  6. package/Example/.watchmanconfig +1 -0
  7. package/Example/App.js +49 -0
  8. package/Example/android/app/BUCK +65 -0
  9. package/Example/android/app/build.gradle +150 -0
  10. package/Example/android/app/proguard-rules.pro +17 -0
  11. package/Example/android/app/src/main/AndroidManifest.xml +26 -0
  12. package/Example/android/app/src/main/java/com/example/MainActivity.java +15 -0
  13. package/Example/android/app/src/main/java/com/example/MainApplication.java +45 -0
  14. package/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  15. package/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  16. package/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  17. package/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  18. package/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  19. package/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  20. package/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  21. package/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  22. package/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  23. package/Example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  24. package/Example/android/app/src/main/res/values/strings.xml +3 -0
  25. package/Example/android/app/src/main/res/values/styles.xml +8 -0
  26. package/Example/android/build.gradle +39 -0
  27. package/Example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  28. package/Example/android/gradle/wrapper/gradle-wrapper.properties +5 -0
  29. package/Example/android/gradle.properties +18 -0
  30. package/Example/android/gradlew +172 -0
  31. package/Example/android/gradlew.bat +84 -0
  32. package/Example/android/keystores/BUCK +8 -0
  33. package/Example/android/keystores/debug.keystore.properties +4 -0
  34. package/Example/android/settings.gradle +3 -0
  35. package/Example/app.json +4 -0
  36. package/Example/index.js +7 -0
  37. package/Example/ios/Example/AppDelegate.h +14 -0
  38. package/Example/ios/Example/AppDelegate.m +35 -0
  39. package/Example/ios/Example/Base.lproj/LaunchScreen.xib +42 -0
  40. package/Example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
  41. package/Example/ios/Example/Images.xcassets/Contents.json +6 -0
  42. package/Example/ios/Example/Info.plist +60 -0
  43. package/Example/ios/Example/main.m +16 -0
  44. package/Example/ios/Example-tvOS/Info.plist +54 -0
  45. package/Example/ios/Example-tvOSTests/Info.plist +24 -0
  46. package/Example/ios/Example.xcodeproj/project.pbxproj +1494 -0
  47. package/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example-tvOS.xcscheme +129 -0
  48. package/Example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme +129 -0
  49. package/Example/ios/ExampleTests/ExampleTests.m +68 -0
  50. package/Example/ios/ExampleTests/Info.plist +24 -0
  51. package/Example/package.json +17 -0
  52. package/Example/yarn.lock +4046 -0
  53. package/LICENSE +21 -0
  54. package/README.md +127 -0
  55. package/android/build.gradle +36 -0
  56. package/android/src/main/AndroidManifest.xml +5 -0
  57. package/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorModule.java +208 -0
  58. package/android/src/main/java/com/reactnativeimagemanipulator/RNImageManipulatorPackage.java +29 -0
  59. package/index.js +5 -0
  60. package/ios/ImageUtils.h +9 -0
  61. package/ios/ImageUtils.m +14 -0
  62. package/ios/RNImageManipulator.h +11 -0
  63. package/ios/RNImageManipulator.m +200 -0
  64. package/ios/RNImageManipulator.xcodeproj/project.pbxproj +265 -0
  65. package/ios/RNImageManipulator.xcworkspace/contents.xcworkspacedata +9 -0
  66. package/package.json +9 -0
  67. package/react-native-image-manipulator.podspec +19 -0
@@ -0,0 +1,129 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0940"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "NO"
7
+ buildImplicitDependencies = "YES">
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 = "2D2A28121D9B038B00D4039D"
18
+ BuildableName = "libReact.a"
19
+ BlueprintName = "React-tvOS"
20
+ ReferencedContainer = "container:../node_modules/react-native/React/React.xcodeproj">
21
+ </BuildableReference>
22
+ </BuildActionEntry>
23
+ <BuildActionEntry
24
+ buildForTesting = "YES"
25
+ buildForRunning = "YES"
26
+ buildForProfiling = "YES"
27
+ buildForArchiving = "YES"
28
+ buildForAnalyzing = "YES">
29
+ <BuildableReference
30
+ BuildableIdentifier = "primary"
31
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
32
+ BuildableName = "Example-tvOS.app"
33
+ BlueprintName = "Example-tvOS"
34
+ ReferencedContainer = "container:Example.xcodeproj">
35
+ </BuildableReference>
36
+ </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 = "2D02E48F1E0B4A5D006451C7"
46
+ BuildableName = "Example-tvOSTests.xctest"
47
+ BlueprintName = "Example-tvOSTests"
48
+ ReferencedContainer = "container:Example.xcodeproj">
49
+ </BuildableReference>
50
+ </BuildActionEntry>
51
+ </BuildActionEntries>
52
+ </BuildAction>
53
+ <TestAction
54
+ buildConfiguration = "Debug"
55
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+ shouldUseLaunchSchemeArgsEnv = "YES">
58
+ <Testables>
59
+ <TestableReference
60
+ skipped = "NO">
61
+ <BuildableReference
62
+ BuildableIdentifier = "primary"
63
+ BlueprintIdentifier = "2D02E48F1E0B4A5D006451C7"
64
+ BuildableName = "Example-tvOSTests.xctest"
65
+ BlueprintName = "Example-tvOSTests"
66
+ ReferencedContainer = "container:Example.xcodeproj">
67
+ </BuildableReference>
68
+ </TestableReference>
69
+ </Testables>
70
+ <MacroExpansion>
71
+ <BuildableReference
72
+ BuildableIdentifier = "primary"
73
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
74
+ BuildableName = "Example-tvOS.app"
75
+ BlueprintName = "Example-tvOS"
76
+ ReferencedContainer = "container:Example.xcodeproj">
77
+ </BuildableReference>
78
+ </MacroExpansion>
79
+ <AdditionalOptions>
80
+ </AdditionalOptions>
81
+ </TestAction>
82
+ <LaunchAction
83
+ buildConfiguration = "Debug"
84
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
+ launchStyle = "0"
87
+ useCustomWorkingDirectory = "NO"
88
+ ignoresPersistentStateOnLaunch = "NO"
89
+ debugDocumentVersioning = "YES"
90
+ debugServiceExtension = "internal"
91
+ allowLocationSimulation = "YES">
92
+ <BuildableProductRunnable
93
+ runnableDebuggingMode = "0">
94
+ <BuildableReference
95
+ BuildableIdentifier = "primary"
96
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
97
+ BuildableName = "Example-tvOS.app"
98
+ BlueprintName = "Example-tvOS"
99
+ ReferencedContainer = "container:Example.xcodeproj">
100
+ </BuildableReference>
101
+ </BuildableProductRunnable>
102
+ <AdditionalOptions>
103
+ </AdditionalOptions>
104
+ </LaunchAction>
105
+ <ProfileAction
106
+ buildConfiguration = "Release"
107
+ shouldUseLaunchSchemeArgsEnv = "YES"
108
+ savedToolIdentifier = ""
109
+ useCustomWorkingDirectory = "NO"
110
+ debugDocumentVersioning = "YES">
111
+ <BuildableProductRunnable
112
+ runnableDebuggingMode = "0">
113
+ <BuildableReference
114
+ BuildableIdentifier = "primary"
115
+ BlueprintIdentifier = "2D02E47A1E0B4A5D006451C7"
116
+ BuildableName = "Example-tvOS.app"
117
+ BlueprintName = "Example-tvOS"
118
+ ReferencedContainer = "container:Example.xcodeproj">
119
+ </BuildableReference>
120
+ </BuildableProductRunnable>
121
+ </ProfileAction>
122
+ <AnalyzeAction
123
+ buildConfiguration = "Debug">
124
+ </AnalyzeAction>
125
+ <ArchiveAction
126
+ buildConfiguration = "Release"
127
+ revealArchiveInOrganizer = "YES">
128
+ </ArchiveAction>
129
+ </Scheme>
@@ -0,0 +1,129 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <Scheme
3
+ LastUpgradeVersion = "0940"
4
+ version = "1.3">
5
+ <BuildAction
6
+ parallelizeBuildables = "NO"
7
+ buildImplicitDependencies = "YES">
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
+ <BuildActionEntry
24
+ buildForTesting = "YES"
25
+ buildForRunning = "YES"
26
+ buildForProfiling = "YES"
27
+ buildForArchiving = "YES"
28
+ buildForAnalyzing = "YES">
29
+ <BuildableReference
30
+ BuildableIdentifier = "primary"
31
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
32
+ BuildableName = "Example.app"
33
+ BlueprintName = "Example"
34
+ ReferencedContainer = "container:Example.xcodeproj">
35
+ </BuildableReference>
36
+ </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
+ </BuildActionEntries>
52
+ </BuildAction>
53
+ <TestAction
54
+ buildConfiguration = "Debug"
55
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
56
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
57
+ shouldUseLaunchSchemeArgsEnv = "YES">
58
+ <Testables>
59
+ <TestableReference
60
+ skipped = "NO">
61
+ <BuildableReference
62
+ BuildableIdentifier = "primary"
63
+ BlueprintIdentifier = "00E356ED1AD99517003FC87E"
64
+ BuildableName = "ExampleTests.xctest"
65
+ BlueprintName = "ExampleTests"
66
+ ReferencedContainer = "container:Example.xcodeproj">
67
+ </BuildableReference>
68
+ </TestableReference>
69
+ </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
+ </TestAction>
82
+ <LaunchAction
83
+ buildConfiguration = "Debug"
84
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
85
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
86
+ launchStyle = "0"
87
+ useCustomWorkingDirectory = "NO"
88
+ ignoresPersistentStateOnLaunch = "NO"
89
+ debugDocumentVersioning = "YES"
90
+ debugServiceExtension = "internal"
91
+ allowLocationSimulation = "YES">
92
+ <BuildableProductRunnable
93
+ runnableDebuggingMode = "0">
94
+ <BuildableReference
95
+ BuildableIdentifier = "primary"
96
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
97
+ BuildableName = "Example.app"
98
+ BlueprintName = "Example"
99
+ ReferencedContainer = "container:Example.xcodeproj">
100
+ </BuildableReference>
101
+ </BuildableProductRunnable>
102
+ <AdditionalOptions>
103
+ </AdditionalOptions>
104
+ </LaunchAction>
105
+ <ProfileAction
106
+ buildConfiguration = "Release"
107
+ shouldUseLaunchSchemeArgsEnv = "YES"
108
+ savedToolIdentifier = ""
109
+ useCustomWorkingDirectory = "NO"
110
+ debugDocumentVersioning = "YES">
111
+ <BuildableProductRunnable
112
+ runnableDebuggingMode = "0">
113
+ <BuildableReference
114
+ BuildableIdentifier = "primary"
115
+ BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
116
+ BuildableName = "Example.app"
117
+ BlueprintName = "Example"
118
+ ReferencedContainer = "container:Example.xcodeproj">
119
+ </BuildableReference>
120
+ </BuildableProductRunnable>
121
+ </ProfileAction>
122
+ <AnalyzeAction
123
+ buildConfiguration = "Debug">
124
+ </AnalyzeAction>
125
+ <ArchiveAction
126
+ buildConfiguration = "Release"
127
+ revealArchiveInOrganizer = "YES">
128
+ </ArchiveAction>
129
+ </Scheme>
@@ -0,0 +1,68 @@
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
+ #import <UIKit/UIKit.h>
9
+ #import <XCTest/XCTest.h>
10
+
11
+ #import <React/RCTLog.h>
12
+ #import <React/RCTRootView.h>
13
+
14
+ #define TIMEOUT_SECONDS 600
15
+ #define TEXT_TO_LOOK_FOR @"Welcome to React Native!"
16
+
17
+ @interface ExampleTests : XCTestCase
18
+
19
+ @end
20
+
21
+ @implementation ExampleTests
22
+
23
+ - (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
24
+ {
25
+ if (test(view)) {
26
+ return YES;
27
+ }
28
+ for (UIView *subview in [view subviews]) {
29
+ if ([self findSubviewInView:subview matching:test]) {
30
+ return YES;
31
+ }
32
+ }
33
+ return NO;
34
+ }
35
+
36
+ - (void)testRendersWelcomeScreen
37
+ {
38
+ UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
39
+ NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
40
+ BOOL foundElement = NO;
41
+
42
+ __block NSString *redboxError = nil;
43
+ RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
44
+ if (level >= RCTLogLevelError) {
45
+ redboxError = message;
46
+ }
47
+ });
48
+
49
+ while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
50
+ [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
51
+ [[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
52
+
53
+ foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
54
+ if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
55
+ return YES;
56
+ }
57
+ return NO;
58
+ }];
59
+ }
60
+
61
+ RCTSetLogFunction(RCTDefaultLogFunction);
62
+
63
+ XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
64
+ XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
65
+ }
66
+
67
+
68
+ @end
@@ -0,0 +1,24 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
+ <plist version="1.0">
4
+ <dict>
5
+ <key>CFBundleDevelopmentRegion</key>
6
+ <string>en</string>
7
+ <key>CFBundleExecutable</key>
8
+ <string>$(EXECUTABLE_NAME)</string>
9
+ <key>CFBundleIdentifier</key>
10
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11
+ <key>CFBundleInfoDictionaryVersion</key>
12
+ <string>6.0</string>
13
+ <key>CFBundleName</key>
14
+ <string>$(PRODUCT_NAME)</string>
15
+ <key>CFBundlePackageType</key>
16
+ <string>BNDL</string>
17
+ <key>CFBundleShortVersionString</key>
18
+ <string>1.0</string>
19
+ <key>CFBundleSignature</key>
20
+ <string>????</string>
21
+ <key>CFBundleVersion</key>
22
+ <string>1</string>
23
+ </dict>
24
+ </plist>
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "Example",
3
+ "version": "0.0.1",
4
+ "private": true,
5
+ "scripts": {
6
+ "start": "node node_modules/react-native/local-cli/cli.js start",
7
+ "start:ios": "react-native run-ios"
8
+ },
9
+ "dependencies": {
10
+ "react": "16.5.0",
11
+ "react-native": "0.57.1",
12
+ "react-native-image-manipulator": "file:../"
13
+ },
14
+ "devDependencies": {
15
+ "metro-react-native-babel-preset": "0.46.0"
16
+ }
17
+ }