-
Notifications
You must be signed in to change notification settings - Fork 314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add barcode scanner plugin #536
Merged
+2,992
−27
Merged
Changes from 31 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
0a96087
feat: add Android impl
lucasfernog 0c40714
Merge branch 'v2' into feat/scanner
lucasfernog ad8338e
update example
lucasfernog b9462bd
Merge remote-tracking branch 'origin/v2' into feat/scanner
lucasfernog 8c0b2ec
feat: ios impl
lucasfernog 7907c67
run fmt
lucasfernog 2aa719c
remove prepare command
lucasfernog da4c7eb
update doc
lucasfernog 36f9475
Merge remote-tracking branch 'origin/v2' into feat/scanner
lucasfernog 3384970
adjust version
lucasfernog 4024c70
fix race condition
lucasfernog fd3f898
add sponsors
lucasfernog 8419ca5
add banner [skip ci]
lucasfernog f47737a
add metadata [skip ci]
lucasfernog 666d185
Merge remote-tracking branch 'origin/v2' into feat/scanner
lucasfernog 78c335d
add CN [skip ci]
lucasfernog cb448cc
white bg [skip ci]
lucasfernog 74427f0
update api
lucasfernog 1204326
update example [skip ci]
lucasfernog 9f1bec6
license headers
lucasfernog d70bd92
fmt
lucasfernog fe1d288
update example mobile projects
lucasfernog 6b008f4
docs [skip ci]
lucasfernog f5c54ae
ask for permission
lucasfernog 7a11f3f
fix api
lucasfernog a12dce4
fmt
lucasfernog cbf57b3
license header
lucasfernog 316a958
prepare release [skip ci]
lucasfernog ed3fb58
Merge branch 'v2' into feat/scanner
lucasfernog 8d20f22
fix cancel code
lucasfernog c684a31
add cancel example
lucasfernog 0be4a2c
fix permission state
lucasfernog e4fe0d7
Merge remote-tracking branch 'origin/v2' into feat/scanner
lucasfernog e172437
contributed by instead of sponsors
lucasfernog 83f50ff
fmt
lucasfernog 6ccc0cb
bg color [skip ci]
lucasfernog d3a6e5b
style [skip ci]
lucasfernog 26f52c1
attempt theme urls [skip ci]
lucasfernog 7dc728a
Revert "attempt theme urls [skip ci]"
lucasfernog 60a89c2
fix links [skip ci]
lucasfernog c325d4f
raw imgs [skip ci]
lucasfernog 3790ed5
adjust [skip ci]
lucasfernog 24185a9
light
lucasfernog 9e54d2a
width
lucasfernog 27149e7
update
lucasfernog cd7f2f9
update svg
lucasfernog 33e60de
change color
lucasfernog a7a5014
colored impierce
lucasfernog 3fc8509
Merge remote-tracking branch 'origin/v2' into feat/scanner
lucasfernog File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"barcode-scanner": major | ||
"barcode-scanner-js": major | ||
--- | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,5 @@ dist-js | |
pnpm-lock.yaml | ||
Cargo.lock | ||
.build | ||
api-iife.js | ||
api-iife.js | ||
intermediates/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 1 addition & 11 deletions
12
examples/api/src-tauri/gen/android/app/src/main/res/values-night/themes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> | ||
<!-- Primary brand color. --> | ||
<item name="colorPrimary">@color/purple_200</item> | ||
<item name="colorPrimaryVariant">@color/purple_700</item> | ||
<item name="colorOnPrimary">@color/black</item> | ||
<!-- Secondary brand color. --> | ||
<item name="colorSecondary">@color/teal_200</item> | ||
<item name="colorSecondaryVariant">@color/teal_200</item> | ||
<item name="colorOnSecondary">@color/black</item> | ||
<!-- Status bar color. --> | ||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
</style> | ||
</resources> |
12 changes: 1 addition & 11 deletions
12
examples/api/src-tauri/gen/android/app/src/main/res/values/themes.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,6 @@ | ||
<resources xmlns:tools="http://schemas.android.com/tools"> | ||
<!-- Base application theme. --> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.DarkActionBar"> | ||
<!-- Primary brand color. --> | ||
<item name="colorPrimary">@color/purple_500</item> | ||
<item name="colorPrimaryVariant">@color/purple_700</item> | ||
<item name="colorOnPrimary">@color/white</item> | ||
<!-- Secondary brand color. --> | ||
<item name="colorSecondary">@color/teal_200</item> | ||
<item name="colorSecondaryVariant">@color/teal_700</item> | ||
<item name="colorOnSecondary">@color/black</item> | ||
<!-- Status bar color. --> | ||
<item name="android:statusBarColor" tools:targetApi="l">?attr/colorPrimaryVariant</item> | ||
<style name="Theme.api" parent="Theme.MaterialComponents.DayNight.NoActionBar"> | ||
<!-- Customize your theme here. --> | ||
</style> | ||
</resources> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
xcuserdata/ | ||
build/ | ||
Externals/ |
Binary file added
BIN
+844 Bytes
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.54 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-20x20@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.39 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.43 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+3.43 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.49 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-29x29@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.15 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.02 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.02 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.69 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-40x40@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+152 KB
...s/api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14.6 KB
...i/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-512x512@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.69 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.9 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-60x60@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+4.68 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@1x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+9.88 KB
...api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-76x76@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.9 KB
...src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/AppIcon-83.5x83.5@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions
116
examples/api/src-tauri/gen/apple/Assets.xcassets/AppIcon.appiconset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-20x20@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-20x20@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-29x29@2x-1.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-29x29@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-40x40@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-40x40@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-60x60@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "60x60", | ||
"idiom": "iphone", | ||
"filename": "AppIcon-60x60@3x.png", | ||
"scale": "3x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-20x20@1x.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "20x20", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-20x20@2x-1.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-29x29@1x.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "29x29", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-29x29@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-40x40@1x.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "40x40", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-40x40@2x-1.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-76x76@1x.png", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"size": "76x76", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-76x76@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "83.5x83.5", | ||
"idiom": "ipad", | ||
"filename": "AppIcon-83.5x83.5@2x.png", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"size": "1024x1024", | ||
"idiom": "ios-marketing", | ||
"filename": "AppIcon-512@2x.png", | ||
"scale": "1x" | ||
} | ||
], | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/api/src-tauri/gen/apple/Assets.xcassets/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info": { | ||
"version": 1, | ||
"author": "xcode" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>method</key> | ||
<string>development</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Uncomment the next line to define a global platform for your project | ||
|
||
target 'api_iOS' do | ||
platform :ios, '13.0' | ||
# Pods for api_iOS | ||
end | ||
|
||
target 'api_macOS' do | ||
platform :osx, '11.0' | ||
# Pods for api_macOS | ||
end | ||
|
||
# Delete the deployment target for iOS and macOS, causing it to be inherited from the Podfile | ||
post_install do |installer| | ||
installer.pods_project.targets.each do |target| | ||
target.build_configurations.each do |config| | ||
config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET' | ||
config.build_settings.delete 'MACOSX_DEPLOYMENT_TARGET' | ||
end | ||
end | ||
end |
8 changes: 8 additions & 0 deletions
8
examples/api/src-tauri/gen/apple/Sources/api/bindings/bindings.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#pragma once | ||
|
||
namespace ffi { | ||
extern "C" { | ||
void start_app(); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "bindings/bindings.h" | ||
|
||
int main(int argc, char * argv[]) { | ||
ffi::start_app(); | ||
return 0; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
local path