diff --git a/.gitignore b/.gitignore index 0ac7664..ea7768f 100644 --- a/.gitignore +++ b/.gitignore @@ -26,4 +26,5 @@ demo*/report/stats.json /src/platforms/android/nativescript_camera.aar /src/*.tgz *.esm.json -*.tns.json \ No newline at end of file +*.tns.json +!demo-vue/app/app.js \ No newline at end of file diff --git a/demo-vue/.gitignore b/demo-vue/.gitignore new file mode 100644 index 0000000..a9e686d --- /dev/null +++ b/demo-vue/.gitignore @@ -0,0 +1,33 @@ +# NativeScript +hooks/ +!hooks/after-createProject/*.js +node_modules/ +platforms/ + +# NativeScript Template +*.js.map +*.css + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# General +.DS_Store +.AppleDouble +.LSOverride +.idea +.cloud +.project +tmp/ +typings/ + +# Visual Studio Code +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json diff --git a/demo-vue/README.md b/demo-vue/README.md new file mode 100644 index 0000000..010aeba --- /dev/null +++ b/demo-vue/README.md @@ -0,0 +1,9 @@ +# Example for using nativescript-camera plugin +## This example demonstrates how to use plugin with vue + +If you want to test it out on an emulator or a device you can follow the instructions below: + +`git clone https://github.com/NativeScript/nativescript-camera.git` +`cd nativescript-camera/demo-vue` +`npm run build.plugin && npm install` +`tns run android --bundle` or `tns run ios --bundle` depending on the platform you want to test \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/AndroidManifest.xml b/demo-vue/app/App_Resources/Android/AndroidManifest.xml new file mode 100644 index 0000000..9961000 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/AndroidManifest.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-vue/app/App_Resources/Android/app.gradle b/demo-vue/app/App_Resources/Android/app.gradle new file mode 100644 index 0000000..085f8d0 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/app.gradle @@ -0,0 +1,19 @@ +// Add your native dependencies here: + +// Uncomment to add recyclerview-v7 dependency +//dependencies { +// implementation 'com.android.support:recyclerview-v7:+' +//} + +// If you want to add something to be applied before applying plugins' include.gradle files +// e.g. project.ext.googlePlayServicesVersion = "15.0.1" +// create a file named before-plugins.gradle in the current directory and place it there + +android { + defaultConfig { + generatedDensities = [] + } + aaptOptions { + additionalParameters "--no-version-vectors" + } +} diff --git a/demo-vue/app/App_Resources/Android/drawable-hdpi/background.png b/demo-vue/app/App_Resources/Android/drawable-hdpi/background.png new file mode 100644 index 0000000..6420032 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-hdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-hdpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-hdpi/icon.png new file mode 100644 index 0000000..117b444 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-hdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-hdpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-hdpi/logo.png new file mode 100644 index 0000000..711905f Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-hdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-ldpi/background.png b/demo-vue/app/App_Resources/Android/drawable-ldpi/background.png new file mode 100644 index 0000000..03befc2 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-ldpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-ldpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-ldpi/icon.png new file mode 100644 index 0000000..bd04848 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-ldpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-ldpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-ldpi/logo.png new file mode 100644 index 0000000..af908e4 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-ldpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-mdpi/background.png b/demo-vue/app/App_Resources/Android/drawable-mdpi/background.png new file mode 100644 index 0000000..cfe4a7c Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-mdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-mdpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-mdpi/icon.png new file mode 100644 index 0000000..32aa617 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-mdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-mdpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-mdpi/logo.png new file mode 100644 index 0000000..c21ae44 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-mdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-nodpi/splash_screen.xml b/demo-vue/app/App_Resources/Android/drawable-nodpi/splash_screen.xml new file mode 100644 index 0000000..ada77f9 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/drawable-nodpi/splash_screen.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/drawable-xhdpi/background.png b/demo-vue/app/App_Resources/Android/drawable-xhdpi/background.png new file mode 100644 index 0000000..b06ae26 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xhdpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-xhdpi/icon.png new file mode 100644 index 0000000..1295004 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xhdpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-xhdpi/logo.png new file mode 100644 index 0000000..4ad5346 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxhdpi/background.png b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/background.png new file mode 100644 index 0000000..9bc7f01 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxhdpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/icon.png new file mode 100644 index 0000000..541e759 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxhdpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/logo.png new file mode 100644 index 0000000..bcc4011 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/background.png b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/background.png new file mode 100644 index 0000000..d93c3d8 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/background.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/icon.png b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/icon.png new file mode 100644 index 0000000..072b601 Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/icon.png differ diff --git a/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/logo.png b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/logo.png new file mode 100644 index 0000000..96acb1e Binary files /dev/null and b/demo-vue/app/App_Resources/Android/drawable-xxxhdpi/logo.png differ diff --git a/demo-vue/app/App_Resources/Android/values-v21/colors.xml b/demo-vue/app/App_Resources/Android/values-v21/colors.xml new file mode 100644 index 0000000..a64641a --- /dev/null +++ b/demo-vue/app/App_Resources/Android/values-v21/colors.xml @@ -0,0 +1,4 @@ + + + #3d5afe + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/values-v21/styles.xml b/demo-vue/app/App_Resources/Android/values-v21/styles.xml new file mode 100644 index 0000000..acff7c9 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/values-v21/styles.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/values/colors.xml b/demo-vue/app/App_Resources/Android/values/colors.xml new file mode 100644 index 0000000..74ad882 --- /dev/null +++ b/demo-vue/app/App_Resources/Android/values/colors.xml @@ -0,0 +1,7 @@ + + + #F5F5F5 + #757575 + #33B5E5 + #272734 + \ No newline at end of file diff --git a/demo-vue/app/App_Resources/Android/values/styles.xml b/demo-vue/app/App_Resources/Android/values/styles.xml new file mode 100644 index 0000000..fae0f4b --- /dev/null +++ b/demo-vue/app/App_Resources/Android/values/styles.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..4034b76 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "icon-29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "icon-40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "icon-60@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "icon-29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "icon-40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "icon-76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "icon-83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "icon-1024.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png new file mode 100644 index 0000000..fe7c504 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-1024.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png new file mode 100644 index 0000000..275ddd1 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png new file mode 100644 index 0000000..906e4b4 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png new file mode 100644 index 0000000..5b9a78e Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png new file mode 100644 index 0000000..3e4a7ea Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png new file mode 100644 index 0000000..f1cf7ae Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png new file mode 100644 index 0000000..a6b0b6f Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png new file mode 100644 index 0000000..091c136 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png new file mode 100644 index 0000000..eb0279c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png new file mode 100644 index 0000000..42d84e1 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png new file mode 100644 index 0000000..50f1e70 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png new file mode 100644 index 0000000..11dc75f Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json new file mode 100644 index 0000000..11bfcf5 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Contents.json @@ -0,0 +1,176 @@ +{ + "images" : [ + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "2436h", + "filename" : "Default-1125h.png", + "minimum-system-version" : "11.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "orientation" : "landscape", + "idiom" : "iphone", + "extent" : "full-screen", + "filename" : "Default-Landscape-X.png", + "minimum-system-version" : "11.0", + "subtype" : "2436h", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-736h@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "736h", + "filename" : "Default-Landscape@3x.png", + "minimum-system-version" : "8.0", + "orientation" : "landscape", + "scale" : "3x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "667h", + "filename" : "Default-667h@2x.png", + "minimum-system-version" : "8.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "extent" : "full-screen", + "idiom" : "iphone", + "subtype" : "retina4", + "filename" : "Default-568h@2x.png", + "minimum-system-version" : "7.0", + "orientation" : "portrait", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "minimum-system-version" : "7.0", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "iphone", + "filename" : "Default-568h@2x.png", + "extent" : "full-screen", + "subtype" : "retina4", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "1x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape.png", + "extent" : "full-screen", + "scale" : "1x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "portrait", + "idiom" : "ipad", + "filename" : "Default-Portrait@2x.png", + "extent" : "full-screen", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "extent" : "to-status-bar", + "scale" : "2x" + }, + { + "orientation" : "landscape", + "idiom" : "ipad", + "filename" : "Default-Landscape@2x.png", + "extent" : "full-screen", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png new file mode 100644 index 0000000..2913f85 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-1125h.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png new file mode 100644 index 0000000..d7f17fc Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-568h@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png new file mode 100644 index 0000000..b884154 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-667h@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png new file mode 100644 index 0000000..faab4b6 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-736h@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png new file mode 100644 index 0000000..cd94a3a Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape-X.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png new file mode 100644 index 0000000..3365ba3 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png new file mode 100644 index 0000000..a44945c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png new file mode 100644 index 0000000..e6dca62 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Landscape@3x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png new file mode 100644 index 0000000..1a50079 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png new file mode 100644 index 0000000..73d8b92 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default-Portrait@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png new file mode 100644 index 0000000..9f1f6ce Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png new file mode 100644 index 0000000..514fc5c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchImage.launchimage/Default@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json new file mode 100644 index 0000000..4f4e9c5 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-AspectFill@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png new file mode 100644 index 0000000..c293f9c Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png new file mode 100644 index 0000000..233693a Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.AspectFill.imageset/LaunchScreen-AspectFill@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json new file mode 100644 index 0000000..23c0ffd --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchScreen-Center@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png new file mode 100644 index 0000000..a5a775a Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center.png differ diff --git a/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png new file mode 100644 index 0000000..154c193 Binary files /dev/null and b/demo-vue/app/App_Resources/iOS/Assets.xcassets/LaunchScreen.Center.imageset/LaunchScreen-Center@2x.png differ diff --git a/demo-vue/app/App_Resources/iOS/Info.plist b/demo-vue/app/App_Resources/iOS/Info.plist new file mode 100644 index 0000000..65b54cd --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIRequiresFullScreen + + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIStatusBarStyle + UIStatusBarStyleLightContent + UIViewControllerBasedStatusBarAppearance + + + diff --git a/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard b/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard new file mode 100644 index 0000000..2ad9471 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/LaunchScreen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo-vue/app/App_Resources/iOS/build.xcconfig b/demo-vue/app/App_Resources/iOS/build.xcconfig new file mode 100644 index 0000000..4b01184 --- /dev/null +++ b/demo-vue/app/App_Resources/iOS/build.xcconfig @@ -0,0 +1,7 @@ +// You can add custom settings here +// for example you can uncomment the following line to force distribution code signing +// CODE_SIGN_IDENTITY = iPhone Distribution +// To build for device with Xcode 8 you need to specify your development team. More info: https://developer.apple.com/library/prerelease/content/releasenotes/DeveloperTools/RN-Xcode/Introduction.html +// DEVELOPMENT_TEAM = YOUR_TEAM_ID; +ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; +ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; diff --git a/demo-vue/app/_app-common.scss b/demo-vue/app/_app-common.scss new file mode 100644 index 0000000..052a9cc --- /dev/null +++ b/demo-vue/app/_app-common.scss @@ -0,0 +1,7 @@ +// Place any CSS rules you want to apply on both iOS and Android here. +// This is where the vast majority of your CSS code goes. + +//Font icon +.fa { + font-family: "FontAwesome"; +} diff --git a/demo-vue/app/_app-variables.scss b/demo-vue/app/_app-variables.scss new file mode 100644 index 0000000..08316a1 --- /dev/null +++ b/demo-vue/app/_app-variables.scss @@ -0,0 +1,78 @@ +// Import the theme’s variables. If you’re using a color scheme +// other than “light”, switch the path to the alternative scheme, +// for example '~nativescript-theme-core/scss/dark'. +@import '~nativescript-theme-core/scss/light'; + +// Custom colors +$background-dark: #F8F8F8 !default; +$background-light: #FFFFFF !default; + +$blue-dark: #022734 !default; +$blue-light: #02556E !default; +$blue-50: rgba($blue-dark, 0.5) !default; +$blue-20: rgba($blue-dark, 0.2) !default; +$blue-10: rgba($blue-dark, 0.1) !default; + +$accent-dark: #3A53FF !default; +$accent-light: #4781FE !default; + +$success-dark: #06CE6A !default; +$success-light: #00E676 !default; + +$warning-dark: #f39c11 !default; +$warning-light: #F2C112 !default; + +$error-dark: #D84039 !default; +$error-light: #ED473F !default; + +$midnight-dark: #0F336D !default; +$midnight-light: #14418B !default; + +$night-dark: #023141 !default; +$night-light: #01526C !default; + +// Sizes +$base-font-size: 11; + +$border-width: 1; +$border-radius: 3; + + +/** + * Theme variables overrides +**/ + +// Colors +$background: #fff; +$primary: lighten(#000, 13%); +$secondary: lighten(#000, 46%); +$disabled: lighten(#000, 62%); +$accent: $accent-dark; +$error: $error-light; + +// SideDrawer +$item-color-android : #737373; +$item-active-background: #F8F8F8; +$item-active-color: $accent; +$item-active-icon-color: $item-active-color; +$item-color-ios: $blue-dark; +$item-color-android: $blue-dark; + +$side-drawer-header-background: #fafafa; +$side-drawer-header-brand: #737373; +$side-drawer-background: #FFFFFF; + +// ActionBar +$ab-background: $accent; +$ab-color: $white; + +// Buttons +$btn-color-inverse: $white; +$btn-color: $accent; +$btn-color-secondary: darken($btn-color, 10%); +$btn-color-outline-highlighted: lighten($btn-color, 10%); + +//Text colors +$headings-color: $blue-dark; +$secondary: $blue-dark; +$text-color: $blue-dark; \ No newline at end of file diff --git a/demo-vue/app/app.js b/demo-vue/app/app.js new file mode 100644 index 0000000..d9a7d43 --- /dev/null +++ b/demo-vue/app/app.js @@ -0,0 +1,15 @@ +import Vue from "nativescript-vue"; + +import Home from "./components/Home"; + +new Vue({ + + template: ` + + + `, + + components: { + Home + } +}).$start(); diff --git a/demo-vue/app/app.scss b/demo-vue/app/app.scss new file mode 100644 index 0000000..320b1b2 --- /dev/null +++ b/demo-vue/app/app.scss @@ -0,0 +1,9 @@ +// Import app variables +@import 'app-variables'; + +// Import the theme’s main ruleset - both index and platform specific. +@import '~nativescript-theme-core/scss/index'; +@import '~nativescript-theme-core/scss/platforms/index.android'; + +// Import common styles +@import 'app-common'; diff --git a/demo-vue/app/components/Home.vue b/demo-vue/app/components/Home.vue new file mode 100644 index 0000000..5cd90f8 --- /dev/null +++ b/demo-vue/app/components/Home.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/demo-vue/app/fonts/FontAwesome.ttf b/demo-vue/app/fonts/FontAwesome.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/demo-vue/app/fonts/FontAwesome.ttf differ diff --git a/demo-vue/app/package.json b/demo-vue/app/package.json new file mode 100644 index 0000000..c3ed648 --- /dev/null +++ b/demo-vue/app/package.json @@ -0,0 +1,7 @@ +{ + "main": "app.js", + "android": { + "v8Flags": "--expose_gc", + "requireModules": ["nativescript-camera"] + } +} diff --git a/demo-vue/package.json b/demo-vue/package.json new file mode 100644 index 0000000..b69ff93 --- /dev/null +++ b/demo-vue/package.json @@ -0,0 +1,30 @@ +{ + "nativescript": { + "id": "org.nativescript.demovue", + "tns-android": { + "version": "5.1.0" + }, + "tns-ios": { + "version": "5.1.0" + } + }, + "scripts": { + "build.plugin": "cd ../src && npm run build" + }, + "dependencies": { + "nativescript-camera": "../src", + "nativescript-theme-core": "~1.0.4", + "nativescript-vue": "~2.0.0", + "tns-core-modules": "~5.0.2" + }, + "devDependencies": { + "@babel/core": "~7.1.0", + "@babel/preset-env": "~7.1.0", + "babel-loader": "~8.0.0", + "nativescript-dev-webpack": "~0.18.0", + "nativescript-dev-typescript": "~0.7.0", + "nativescript-vue-template-compiler": "~2.0.0", + "node-sass": "~4.9.0", + "vue-loader": "~15.4.0" + } +} \ No newline at end of file diff --git a/demo-vue/tsconfig.json b/demo-vue/tsconfig.json new file mode 100644 index 0000000..ac7907a --- /dev/null +++ b/demo-vue/tsconfig.json @@ -0,0 +1,28 @@ +{ + "compilerOptions": { + "module": "commonjs", + "target": "es5", + "experimentalDecorators": true, + "emitDecoratorMetadata": true, + "noEmitHelpers": true, + "noEmitOnError": true, + "lib": [ + "es6", + "dom" + ], + "baseUrl": ".", + "paths": { + "~/*": [ + "app/*" + ], + "*": [ + "./node_modules/tns-core-modules/*", + "./node_modules/*" + ] + } + }, + "exclude": [ + "node_modules", + "platforms" + ] +} \ No newline at end of file