capacitor-plugin-camera-forked 2.0.8
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/CapacitorPluginCameraForked.podspec +17 -0
- package/LICENSE +21 -0
- package/README.md +513 -0
- package/android/build.gradle +66 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/tonyxlh/capacitor/camera/BitmapUtils.java +210 -0
- package/android/src/main/java/com/tonyxlh/capacitor/camera/CameraPreviewPlugin.java +834 -0
- package/android/src/main/java/com/tonyxlh/capacitor/camera/FrameMetadata.java +70 -0
- package/android/src/main/java/com/tonyxlh/capacitor/camera/ScanRegion.java +16 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +495 -0
- package/dist/esm/definitions.d.ts +123 -0
- package/dist/esm/definitions.js +10 -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 +85 -0
- package/dist/esm/web.js +427 -0
- package/dist/esm/web.js.map +1 -0
- package/dist/plugin.cjs.js +456 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +457 -0
- package/dist/plugin.js.map +1 -0
- package/ios/Plugin/CameraPreview.swift +8 -0
- package/ios/Plugin/CameraPreviewPlugin.h +10 -0
- package/ios/Plugin/CameraPreviewPlugin.m +29 -0
- package/ios/Plugin/CameraPreviewPlugin.swift +670 -0
- package/ios/Plugin/Info.plist +24 -0
- package/ios/Plugin/PreviewView.swift +22 -0
- package/ios/Plugin/ScanRegion.swift +17 -0
- package/package.json +89 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
//
|
|
2
|
+
// PreviewView.swift
|
|
3
|
+
// Document Scanner
|
|
4
|
+
//
|
|
5
|
+
// Created by xulihang on 2022/11/28.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
import AVFoundation
|
|
9
|
+
import Foundation
|
|
10
|
+
import UIKit
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class PreviewView: UIView {
|
|
14
|
+
override class var layerClass: AnyClass {
|
|
15
|
+
return AVCaptureVideoPreviewLayer.self
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/// Convenience wrapper to get layer as its statically known type.
|
|
19
|
+
var videoPreviewLayer: AVCaptureVideoPreviewLayer {
|
|
20
|
+
return layer as! AVCaptureVideoPreviewLayer
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ScanRegion.swift
|
|
3
|
+
// Plugin
|
|
4
|
+
//
|
|
5
|
+
// Created by xulihang on 2023/12/27.
|
|
6
|
+
// Copyright © 2023 Max Lynch. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
import Foundation
|
|
10
|
+
|
|
11
|
+
class ScanRegion {
|
|
12
|
+
public var top:Int = 0
|
|
13
|
+
public var left:Int = 0
|
|
14
|
+
public var right:Int = 0
|
|
15
|
+
public var bottom:Int = 0
|
|
16
|
+
public var measuredByPercentage:Int = 0
|
|
17
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "capacitor-plugin-camera-forked",
|
|
3
|
+
"version": "2.0.8",
|
|
4
|
+
"description": "A capacitor camera plugin - A custom Capacitor camera plugin with additional features.",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"unpkg": "dist/plugin.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"android/src/main/",
|
|
11
|
+
"android/build.gradle",
|
|
12
|
+
"dist/",
|
|
13
|
+
"ios/Plugin/",
|
|
14
|
+
"CapacitorPluginCameraForked.podspec"
|
|
15
|
+
],
|
|
16
|
+
"author": "Lihang Xu + Addons",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/capexpert-io/capacitor-plugin-camera.git"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"registry": "https://registry.npmjs.org/",
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"keywords": [
|
|
27
|
+
"capacitor",
|
|
28
|
+
"plugin",
|
|
29
|
+
"camera",
|
|
30
|
+
"android",
|
|
31
|
+
"ios",
|
|
32
|
+
"web",
|
|
33
|
+
"dynamsoft",
|
|
34
|
+
"native"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
|
|
38
|
+
"verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
|
|
39
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
40
|
+
"verify:web": "npm run build",
|
|
41
|
+
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
42
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
43
|
+
"eslint": "eslint . --ext ts",
|
|
44
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
45
|
+
"swiftlint": "node-swiftlint",
|
|
46
|
+
"docgen": "docgen --api CameraPreviewPlugin --output-readme README.md --output-json dist/docs.json",
|
|
47
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
|
|
48
|
+
"clean": "rimraf ./dist",
|
|
49
|
+
"watch": "tsc --watch",
|
|
50
|
+
"prepublishOnly": "npm run build"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@capacitor/android": "^6.0.0",
|
|
54
|
+
"@capacitor/core": "^6.0.0",
|
|
55
|
+
"@capacitor/docgen": "^0.0.18",
|
|
56
|
+
"@capacitor/ios": "^6.0.0",
|
|
57
|
+
"@ionic/eslint-config": "^0.4.0",
|
|
58
|
+
"@ionic/prettier-config": "^1.0.1",
|
|
59
|
+
"@ionic/swiftlint-config": "^1.1.2",
|
|
60
|
+
"@types/recordrtc": "^5.6.14",
|
|
61
|
+
"eslint": "^8.57.0",
|
|
62
|
+
"prettier": "~2.3.0",
|
|
63
|
+
"prettier-plugin-java": "~1.0.2",
|
|
64
|
+
"rimraf": "^3.0.2",
|
|
65
|
+
"rollup": "^2.32.0",
|
|
66
|
+
"swiftlint": "^1.0.1",
|
|
67
|
+
"typescript": "~4.1.5"
|
|
68
|
+
},
|
|
69
|
+
"peerDependencies": {
|
|
70
|
+
"@capacitor/core": "^6.0.0"
|
|
71
|
+
},
|
|
72
|
+
"prettier": "@ionic/prettier-config",
|
|
73
|
+
"swiftlint": "@ionic/swiftlint-config",
|
|
74
|
+
"eslintConfig": {
|
|
75
|
+
"extends": "@ionic/eslint-config/recommended"
|
|
76
|
+
},
|
|
77
|
+
"capacitor": {
|
|
78
|
+
"ios": {
|
|
79
|
+
"src": "ios"
|
|
80
|
+
},
|
|
81
|
+
"android": {
|
|
82
|
+
"src": "android"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"dependencies": {
|
|
86
|
+
"dynamsoft-camera-enhancer": "3.3.9",
|
|
87
|
+
"recordrtc": "^5.6.2"
|
|
88
|
+
}
|
|
89
|
+
}
|