@capgo/camera-preview 3.2.3
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/CapgoCameraPreview.podspec +14 -0
- package/LICENSE +21 -0
- package/README.md +431 -0
- package/android/.project +17 -0
- package/android/build.gradle +55 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +6 -0
- package/android/gradle.properties +18 -0
- package/android/gradlew +160 -0
- package/android/gradlew.bat +90 -0
- package/android/proguard-rules.pro +21 -0
- package/android/settings.gradle +2 -0
- package/android/src/androidTest/java/com/getcapacitor/android/ExampleInstrumentedTest.java +26 -0
- package/android/src/main/AndroidManifest.xml +5 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraActivity.java +967 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +507 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomSurfaceView.java +23 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/CustomTextureView.java +29 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/Preview.java +386 -0
- package/android/src/main/java/com/ahm/capacitor/camera/preview/TapGestureDetector.java +24 -0
- package/android/src/main/res/layout/bridge_layout_main.xml +15 -0
- package/android/src/main/res/layout/camera_activity.xml +68 -0
- package/android/src/main/res/values/camera_ids.xml +4 -0
- package/android/src/main/res/values/camera_theme.xml +9 -0
- package/android/src/main/res/values/colors.xml +3 -0
- package/android/src/main/res/values/strings.xml +3 -0
- package/android/src/main/res/values/styles.xml +3 -0
- package/android/src/test/java/com/getcapacitor/ExampleUnitTest.java +18 -0
- package/dist/esm/definitions.d.ts +74 -0
- package/dist/esm/definitions.js +2 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/web.d.ts +24 -0
- package/dist/esm/web.js +135 -0
- package/dist/esm/web.js.map +1 -0
- package/ios/Plugin/CameraController.swift +647 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/Plugin.h +10 -0
- package/ios/Plugin/Plugin.m +16 -0
- package/ios/Plugin/Plugin.swift +291 -0
- package/ios/Plugin.xcodeproj/project.pbxproj +595 -0
- package/ios/Plugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/Plugin.xcworkspace/contents.xcworkspacedata +10 -0
- package/ios/Plugin.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/PluginTests/Info.plist +22 -0
- package/ios/PluginTests/PluginTests.swift +35 -0
- package/ios/Podfile +13 -0
- package/ios/Podfile.lock +23 -0
- package/package.json +76 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import XCTest
|
|
2
|
+
import Capacitor
|
|
3
|
+
@testable import Plugin
|
|
4
|
+
|
|
5
|
+
class PluginTests: XCTestCase {
|
|
6
|
+
|
|
7
|
+
override func setUp() {
|
|
8
|
+
super.setUp()
|
|
9
|
+
// Put setup code here. This method is called before the invocation of each test method in the class.
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
override func tearDown() {
|
|
13
|
+
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
|
14
|
+
super.tearDown()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
func testEcho() {
|
|
18
|
+
// This is an example of a functional test case for a plugin.
|
|
19
|
+
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
|
20
|
+
|
|
21
|
+
let value = "Hello, World!"
|
|
22
|
+
let plugin = MyPlugin()
|
|
23
|
+
|
|
24
|
+
let call = CAPPluginCall(callbackId: "test", options: [
|
|
25
|
+
"value": value
|
|
26
|
+
], success: { (result, _) in
|
|
27
|
+
let resultValue = result!.data["value"] as? String
|
|
28
|
+
XCTAssertEqual(value, resultValue)
|
|
29
|
+
}, error: { (_) in
|
|
30
|
+
XCTFail("Error shouldn't have been called")
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
plugin.echo(call!)
|
|
34
|
+
}
|
|
35
|
+
}
|
package/ios/Podfile
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
platform :ios, '12.1'
|
|
2
|
+
|
|
3
|
+
target 'Plugin' do
|
|
4
|
+
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
|
|
5
|
+
use_frameworks!
|
|
6
|
+
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
target 'PluginTests' do
|
|
10
|
+
use_frameworks!
|
|
11
|
+
|
|
12
|
+
pod 'Capacitor', :path => '../node_modules/@capacitor/ios'
|
|
13
|
+
end
|
package/ios/Podfile.lock
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
PODS:
|
|
2
|
+
- Capacitor (3.0.0):
|
|
3
|
+
- CapacitorCordova
|
|
4
|
+
- CapacitorCordova (2.0.1)
|
|
5
|
+
|
|
6
|
+
DEPENDENCIES:
|
|
7
|
+
- "Capacitor (from `../node_modules/@capacitor/ios`)"
|
|
8
|
+
|
|
9
|
+
SPEC REPOS:
|
|
10
|
+
trunk:
|
|
11
|
+
- CapacitorCordova
|
|
12
|
+
|
|
13
|
+
EXTERNAL SOURCES:
|
|
14
|
+
Capacitor:
|
|
15
|
+
:path: "../node_modules/@capacitor/ios"
|
|
16
|
+
|
|
17
|
+
SPEC CHECKSUMS:
|
|
18
|
+
Capacitor: 06cd8cd01340f5b162e9528bf5569d87a6f29009
|
|
19
|
+
CapacitorCordova: 9fee2eb6780331b6ff09710d6a7d1f2e4707f1b9
|
|
20
|
+
|
|
21
|
+
PODFILE CHECKSUM: d3e2703a3105a8e75e11dfc45c25f5cbf9801486
|
|
22
|
+
|
|
23
|
+
COCOAPODS: 1.9.3
|
package/package.json
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@capgo/camera-preview",
|
|
3
|
+
"version": "3.2.3",
|
|
4
|
+
"description": "Camera preview",
|
|
5
|
+
"main": "dist/esm/index.js",
|
|
6
|
+
"types": "dist/esm/index.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "npm run clean && tsc",
|
|
9
|
+
"clean": "rimraf './dist'",
|
|
10
|
+
"watch": "tsc --watch",
|
|
11
|
+
"lint": "concurrently -g \"npm:eslint\" \"npm:prettier -- --check\" \"npm run swiftlint -- lint ios\"",
|
|
12
|
+
"fmt": "concurrently -g \"npm:eslint -- --fix\" \"npm:prettier -- --write\" \"npm:swiftlint -- lint --fix --format ios\"",
|
|
13
|
+
"eslint": "eslint . --ext ts",
|
|
14
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
15
|
+
"swiftlint": "node-swiftlint",
|
|
16
|
+
"prepublishOnly": "npm run build",
|
|
17
|
+
"prepare": "husky install && npm run build"
|
|
18
|
+
},
|
|
19
|
+
"author": "Martin Donadieu",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@capacitor/core": "latest"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@capacitor/android": "latest",
|
|
26
|
+
"@capacitor/ios": "latest",
|
|
27
|
+
"@ionic/eslint-config": "^0.3.0",
|
|
28
|
+
"@ionic/prettier-config": "^2.0.0",
|
|
29
|
+
"@ionic/swiftlint-config": "^1.1.2",
|
|
30
|
+
"concurrently": "^7.0.0",
|
|
31
|
+
"eslint": "^7.32.0",
|
|
32
|
+
"husky": "^7.0.4",
|
|
33
|
+
"prettier": "^2.5.1",
|
|
34
|
+
"prettier-plugin-java": "^1.6.1",
|
|
35
|
+
"pretty-quick": "^3.1.3",
|
|
36
|
+
"rimraf": "^3.0.2",
|
|
37
|
+
"swiftlint": "^1.0.1",
|
|
38
|
+
"typescript": "^4.3.2"
|
|
39
|
+
},
|
|
40
|
+
"husky": {
|
|
41
|
+
"hooks": {
|
|
42
|
+
"pre-commit": "pretty-quick --staged"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/",
|
|
47
|
+
"ios/",
|
|
48
|
+
"android/",
|
|
49
|
+
"CapgoCameraPreview.podspec"
|
|
50
|
+
],
|
|
51
|
+
"keywords": [
|
|
52
|
+
"capacitor",
|
|
53
|
+
"plugin",
|
|
54
|
+
"native"
|
|
55
|
+
],
|
|
56
|
+
"capacitor": {
|
|
57
|
+
"ios": {
|
|
58
|
+
"src": "ios"
|
|
59
|
+
},
|
|
60
|
+
"android": {
|
|
61
|
+
"src": "android"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"prettier": "@ionic/prettier-config",
|
|
65
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
66
|
+
"eslintConfig": {
|
|
67
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
68
|
+
},
|
|
69
|
+
"repository": {
|
|
70
|
+
"type": "git",
|
|
71
|
+
"url": "https://github.com/Cap-go/camera-preview.git"
|
|
72
|
+
},
|
|
73
|
+
"bugs": {
|
|
74
|
+
"url": "https://github.com/Cap-go/camera-preview/issues"
|
|
75
|
+
}
|
|
76
|
+
}
|