diff --git a/Example/.babelrc b/Example/.babelrc deleted file mode 100644 index 1ced9e34..00000000 --- a/Example/.babelrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "presets": [ - "react-native-stage-0/decorator-support" - ], - "env": { - "development": { - "plugins": [ - "transform-react-jsx-source" - ] - } - } -} diff --git a/Example/.flowconfig b/Example/.flowconfig deleted file mode 100644 index 245c23a0..00000000 --- a/Example/.flowconfig +++ /dev/null @@ -1,65 +0,0 @@ -[ignore] - -# We fork some components by platform. -.*/*.web.js -.*/*.android.js - -# Some modules have their own node_modules with overlap -.*/node_modules/node-haste/.* - -# Ugh -.*/node_modules/babel.* -.*/node_modules/babylon.* -.*/node_modules/invariant.* - -# Ignore react and fbjs where there are overlaps, but don't ignore -# anything that react-native relies on -.*/node_modules/fbjs/lib/Map.js -.*/node_modules/fbjs/lib/Promise.js -.*/node_modules/fbjs/lib/fetch.js -.*/node_modules/fbjs/lib/ExecutionEnvironment.js -.*/node_modules/fbjs/lib/isEmpty.js -.*/node_modules/fbjs/lib/crc32.js -.*/node_modules/fbjs/lib/ErrorUtils.js - -# Flow has a built-in definition for the 'react' module which we prefer to use -# over the currently-untyped source -.*/node_modules/react/react.js -.*/node_modules/react/lib/React.js -.*/node_modules/react/lib/ReactDOM.js - -# Ignore commoner tests -.*/node_modules/commoner/test/.* - -# See https://github.com/facebook/flow/issues/442 -.*/react-tools/node_modules/commoner/lib/reader.js - -# Ignore jest -.*/node_modules/jest-cli/.* - -# Ignore Website -.*/website/.* - -[include] - -[libs] -node_modules/react-native/Libraries/react-native/react-native-interface.js - -[options] -module.system=haste - -munge_underscores=true - -module.name_mapper='^image![a-zA-Z0-9$_-]+$' -> 'GlobalImageStub' -module.name_mapper='^[./a-zA-Z0-9$_-]+\.png$' -> 'RelativeImageStub' - -suppress_type=$FlowIssue -suppress_type=$FlowFixMe -suppress_type=$FixMe - -suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\) -suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(2[0-0]\\|1[0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+ -suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy - -[version] -0.20.1 diff --git a/Example/.gitignore b/Example/.gitignore deleted file mode 100644 index 5229a57a..00000000 --- a/Example/.gitignore +++ /dev/null @@ -1,35 +0,0 @@ -# OSX -# -.DS_Store -.exponent/* - -# Xcode -# -build/ -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata -*.xccheckout -*.moved-aside -DerivedData -*.hmap -*.ipa -*.xcuserstate -project.xcworkspace - -# Android/IJ -# -.idea -.gradle -local.properties - -# node.js -# -node_modules/ -npm-debug.log diff --git a/Example/.watchmanconfig b/Example/.watchmanconfig deleted file mode 100644 index 9e26dfee..00000000 --- a/Example/.watchmanconfig +++ /dev/null @@ -1 +0,0 @@ -{} \ No newline at end of file diff --git a/Example/android/app/BUCK b/Example/android/app/BUCK deleted file mode 100644 index e3a3d36d..00000000 --- a/Example/android/app/BUCK +++ /dev/null @@ -1,66 +0,0 @@ -import re - -# To learn about Buck see [Docs](https://buckbuild.com/). -# To run your application with Buck: -# - install Buck -# - `npm start` - to start the packager -# - `cd android` -# - `keytool -genkey -v -keystore keystores/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"` -# - `./gradlew :app:copyDownloadableDepsToLibs` - make all Gradle compile dependencies available to Buck -# - `buck install -r android/app` - compile, install and run application -# - -lib_deps = [] -for jarfile in glob(['libs/*.jar']): - name = 'jars__' + re.sub(r'^.*/([^/]+)\.jar$', r'\1', jarfile) - lib_deps.append(':' + name) - prebuilt_jar( - name = name, - binary_jar = jarfile, - ) - -for aarfile in glob(['libs/*.aar']): - name = 'aars__' + re.sub(r'^.*/([^/]+)\.aar$', r'\1', aarfile) - lib_deps.append(':' + name) - android_prebuilt_aar( - name = name, - aar = aarfile, - ) - -android_library( - name = 'all-libs', - exported_deps = lib_deps -) - -android_library( - name = 'app-code', - srcs = glob([ - 'src/main/java/**/*.java', - ]), - deps = [ - ':all-libs', - ':build_config', - ':res', - ], -) - -android_build_config( - name = 'build_config', - package = 'com.svgexample', -) - -android_resource( - name = 'res', - res = 'src/main/res', - package = 'com.svgexample', -) - -android_binary( - name = 'app', - package_type = 'debug', - manifest = 'src/main/AndroidManifest.xml', - keystore = '//android/keystores:debug', - deps = [ - ':app-code', - ], -) diff --git a/Example/android/app/build.gradle b/Example/android/app/build.gradle deleted file mode 100644 index 83a163fc..00000000 --- a/Example/android/app/build.gradle +++ /dev/null @@ -1,140 +0,0 @@ -apply plugin: "com.android.application" - -import com.android.build.OutputFile - -/** - * The react.gradle file registers a task for each build variant (e.g. bundleDebugJsAndAssets - * and bundleReleaseJsAndAssets). - * These basically call `react-native bundle` with the correct arguments during the Android build - * cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the - * bundle directly from the development server. Below you can see all the possible configurations - * and their defaults. If you decide to add a configuration block, make sure to add it before the - * `apply from: "../../node_modules/react-native/react.gradle"` line. - * - * project.ext.react = [ - * // the name of the generated asset file containing your JS bundle - * bundleAssetName: "index.android.bundle", - * - * // the entry file for bundle generation - * entryFile: "index.android.js", - * - * // whether to bundle JS and assets in debug mode - * bundleInDebug: false, - * - * // whether to bundle JS and assets in release mode - * bundleInRelease: true, - * - * // whether to bundle JS and assets in another build variant (if configured). - * // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants - * // The configuration property can be in the following formats - * // 'bundleIn${productFlavor}${buildType}' - * // 'bundleIn${buildType}' - * // bundleInFreeDebug: true, - * // bundleInPaidRelease: true, - * // bundleInBeta: true, - * - * // the root of your project, i.e. where "package.json" lives - * root: "../../", - * - * // where to put the JS bundle asset in debug mode - * jsBundleDirDebug: "$buildDir/intermediates/assets/debug", - * - * // where to put the JS bundle asset in release mode - * jsBundleDirRelease: "$buildDir/intermediates/assets/release", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in debug mode - * resourcesDirDebug: "$buildDir/intermediates/res/merged/debug", - * - * // where to put drawable resources / React Native assets, e.g. the ones you use via - * // require('./image.png')), in release mode - * resourcesDirRelease: "$buildDir/intermediates/res/merged/release", - * - * // by default the gradle tasks are skipped if none of the JS files or assets change; this means - * // that we don't look at files in android/ or ios/ to determine whether the tasks are up to - * // date; if you have any other folders that you want to ignore for performance reasons (gradle - * // indexes the entire tree), add them here. Alternatively, if you have JS files in android/ - * // for example, you might want to remove it from here. - * inputExcludes: ["android/**", "ios/**"], - * - * // override which node gets called and with what additional arguments - * nodeExecutableAndArgs: ["node"] - * - * // supply additional arguments to the packager - * extraPackagerArgs: [] - * ] - */ - -apply from: "../../node_modules/react-native/react.gradle" - -/** - * Set this to true to create two separate APKs instead of one: - * - An APK that only works on ARM devices - * - An APK that only works on x86 devices - * The advantage is the size of the APK is reduced by about 4MB. - * Upload all the APKs to the Play Store and people will download - * the correct one based on the CPU architecture of their device. - */ -def enableSeparateBuildPerCPUArchitecture = false - -/** - * Run Proguard to shrink the Java bytecode in release builds. - */ -def enableProguardInReleaseBuilds = false - -android { - compileSdkVersion 23 - buildToolsVersion "23.0.1" - - defaultConfig { - applicationId "com.svgexample" - minSdkVersion 16 - targetSdkVersion 22 - versionCode 1 - versionName "1.0" - ndk { - abiFilters "armeabi-v7a", "x86" - } - } - splits { - abi { - reset() - enable enableSeparateBuildPerCPUArchitecture - universalApk false // If true, also generate a universal APK - include "armeabi-v7a", "x86" - } - } - buildTypes { - release { - minifyEnabled enableProguardInReleaseBuilds - proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" - } - } - // applicationVariants are e.g. debug, release - applicationVariants.all { variant -> - variant.outputs.each { output -> - // For each separate APK per architecture, set a unique version code as described here: - // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits - def versionCodes = ["armeabi-v7a":1, "x86":2] - def abi = output.getFilter(OutputFile.ABI) - if (abi != null) { // null for the universal-debug, universal-release variants - output.versionCodeOverride = - versionCodes.get(abi) * 1048576 + defaultConfig.versionCode - } - } - } -} - -dependencies { - compile project(':react-native-svg') - compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.1" - compile "com.facebook.react:react-native:+" // From node_modules -} - -// Run this once to be able to run the application with BUCK -// puts all compile dependencies into folder libs for BUCK to use -task copyDownloadableDepsToLibs(type: Copy) { - from configurations.compile - into 'libs' -} diff --git a/Example/android/app/proguard-rules.pro b/Example/android/app/proguard-rules.pro deleted file mode 100644 index 48361a90..00000000 --- a/Example/android/app/proguard-rules.pro +++ /dev/null @@ -1,66 +0,0 @@ -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the proguardFiles -# directive in build.gradle. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} - -# Disabling obfuscation is useful if you collect stack traces from production crashes -# (unless you are using a system that supports de-obfuscate the stack traces). --dontobfuscate - -# React Native - -# Keep our interfaces so they can be used by other ProGuard rules. -# See http://sourceforge.net/p/proguard/bugs/466/ --keep,allowobfuscation @interface com.facebook.proguard.annotations.DoNotStrip --keep,allowobfuscation @interface com.facebook.proguard.annotations.KeepGettersAndSetters --keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip - -# Do not strip any method/class that is annotated with @DoNotStrip --keep @com.facebook.proguard.annotations.DoNotStrip class * --keep @com.facebook.common.internal.DoNotStrip class * --keepclassmembers class * { - @com.facebook.proguard.annotations.DoNotStrip *; - @com.facebook.common.internal.DoNotStrip *; -} - --keepclassmembers @com.facebook.proguard.annotations.KeepGettersAndSetters class * { - void set*(***); - *** get*(); -} - --keep class * extends com.facebook.react.bridge.JavaScriptModule { *; } --keep class * extends com.facebook.react.bridge.NativeModule { *; } --keepclassmembers,includedescriptorclasses class * { native ; } --keepclassmembers class * { @com.facebook.react.uimanager.UIProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactProp ; } --keepclassmembers class * { @com.facebook.react.uimanager.annotations.ReactPropGroup ; } - --dontwarn com.facebook.react.** - -# okhttp - --keepattributes Signature --keepattributes *Annotation* --keep class okhttp3.** { *; } --keep interface okhttp3.** { *; } --dontwarn okhttp3.** - -# okio - --keep class sun.misc.Unsafe { *; } --dontwarn java.nio.file.* --dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement --dontwarn okio.** diff --git a/Example/android/app/react.gradle b/Example/android/app/react.gradle deleted file mode 100644 index 4b43bf91..00000000 --- a/Example/android/app/react.gradle +++ /dev/null @@ -1,96 +0,0 @@ -import org.apache.tools.ant.taskdefs.condition.Os - -def config = project.hasProperty("react") ? project.react : []; - -def bundleAssetName = config.bundleAssetName ?: "index.android.bundle" -def entryFile = config.entryFile ?: "index.android.js" - -// because elvis operator -def elvisFile(thing) { - return thing ? file(thing) : null; -} - -def reactRoot = elvisFile(config.root) ?: file("../../") -def inputExcludes = config.inputExcludes ?: ["android/**", "ios/**"] - -void runBefore(String dependentTaskName, Task task) { - Task dependentTask = tasks.findByPath(dependentTaskName); - if (dependentTask != null) { - dependentTask.dependsOn task - } -} - -gradle.projectsEvaluated { - // Grab all build types and product flavors - def buildTypes = android.buildTypes.collect { type -> type.name } - def productFlavors = android.productFlavors.collect { flavor -> flavor.name } - - // When no product flavors defined, use empty - if (!productFlavors) productFlavors.add('') - - productFlavors.each { productFlavorName -> - buildTypes.each { buildTypeName -> - // Create variant and source names - def sourceName = "${buildTypeName}" - def targetName = "${sourceName.capitalize()}" - if (productFlavorName) { - sourceName = "${productFlavorName}${targetName}" - } - - // React js bundle directories - def jsBundleDirConfigName = "jsBundleDir${targetName}" - def jsBundleDir = elvisFile(config."$jsBundleDirConfigName") ?: - file("$buildDir/intermediates/assets/${sourceName}") - - def resourcesDirConfigName = "jsBundleDir${targetName}" - def resourcesDir = elvisFile(config."${resourcesDirConfigName}") ?: - file("$buildDir/intermediates/res/merged/${sourceName}") - def jsBundleFile = file("$jsBundleDir/$bundleAssetName") - - // Bundle task name for variant - def bundleJsAndAssetsTaskName = "bundle${targetName}JsAndAssets" - - def currentBundleTask = tasks.create( - name: bundleJsAndAssetsTaskName, - type: Exec) { - group = "react" - description = "bundle JS and assets for ${targetName}." - - // Create dirs if they are not there (e.g. the "clean" task just ran) - doFirst { - jsBundleDir.mkdirs() - resourcesDir.mkdirs() - } - - // Set up inputs and outputs so gradle can cache the result - inputs.files fileTree(dir: reactRoot, excludes: inputExcludes) - outputs.dir jsBundleDir - outputs.dir resourcesDir - - // Set up the call to the react-native cli - workingDir reactRoot - - // Set up dev mode - def devEnabled = !targetName.toLowerCase().contains("release") - if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", - "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir - } else { - commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", - "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir - } - - enabled config."bundleIn${targetName}" ?: targetName.toLowerCase().contains("release") - } - - // Hook bundle${productFlavor}${buildType}JsAndAssets into the android build process - currentBundleTask.dependsOn("merge${targetName}Resources") - currentBundleTask.dependsOn("merge${targetName}Assets") - - runBefore("processArmeabi-v7a${targetName}Resources", currentBundleTask) - runBefore("processX86${targetName}Resources", currentBundleTask) - runBefore("processUniversal${targetName}Resources", currentBundleTask) - runBefore("process${targetName}Resources", currentBundleTask) - } - } -} diff --git a/Example/android/app/src/main/AndroidManifest.xml b/Example/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index a30e89f1..00000000 --- a/Example/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Example/android/app/src/main/java/com/svgexample/MainActivity.java b/Example/android/app/src/main/java/com/svgexample/MainActivity.java deleted file mode 100644 index 146939ec..00000000 --- a/Example/android/app/src/main/java/com/svgexample/MainActivity.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.svgexample; - -import com.facebook.react.ReactActivity; - -public class MainActivity extends ReactActivity { - - /** - * Returns the name of the main component registered from JavaScript. - * This is used to schedule rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "SvgExample"; - } -} diff --git a/Example/android/app/src/main/java/com/svgexample/MainApplication.java b/Example/android/app/src/main/java/com/svgexample/MainApplication.java deleted file mode 100644 index 79b186ed..00000000 --- a/Example/android/app/src/main/java/com/svgexample/MainApplication.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.svgexample; - -import android.app.Application; -import com.horcrux.svg.RNSvgPackage; - -import com.facebook.react.ReactApplication; -import com.facebook.react.ReactNativeHost; -import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; - -import java.util.Arrays; -import java.util.List; - -public class MainApplication extends Application implements ReactApplication { - - private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { - @Override - protected boolean getUseDeveloperSupport() { - return BuildConfig.DEBUG; - } - - @Override - protected List getPackages() { - return Arrays.asList( - new MainReactPackage(), - new RNSvgPackage() - ); - } - }; - - @Override - public ReactNativeHost getReactNativeHost() { - return mReactNativeHost; - } -} diff --git a/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index cde69bcc..00000000 Binary files a/Example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and /dev/null differ diff --git a/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0cb..00000000 Binary files a/Example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png deleted file mode 100644 index bfa42f0e..00000000 Binary files a/Example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and /dev/null differ diff --git a/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index 324e72cd..00000000 Binary files a/Example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and /dev/null differ diff --git a/Example/android/app/src/main/res/values/strings.xml b/Example/android/app/src/main/res/values/strings.xml deleted file mode 100644 index 3386d8e0..00000000 --- a/Example/android/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,3 +0,0 @@ - - SvgExample - diff --git a/Example/android/app/src/main/res/values/styles.xml b/Example/android/app/src/main/res/values/styles.xml deleted file mode 100644 index 319eb0ca..00000000 --- a/Example/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/Example/android/build.gradle b/Example/android/build.gradle deleted file mode 100644 index c8978a98..00000000 --- a/Example/android/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -// Top-level build file where you can add configuration options common to all sub-projects/modules. - -buildscript { - repositories { - jcenter() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.1.3' - - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files - } -} - -allprojects { - repositories { - mavenLocal() - jcenter() - maven { - // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm - url "$rootDir/../node_modules/react-native/android" - } - } -} diff --git a/Example/android/gradle.properties b/Example/android/gradle.properties deleted file mode 100644 index 1fd964e9..00000000 --- a/Example/android/gradle.properties +++ /dev/null @@ -1,20 +0,0 @@ -# Project-wide Gradle settings. - -# IDE (e.g. Android Studio) users: -# Gradle settings configured through the IDE *will override* -# any settings specified in this file. - -# For more details on how to configure your build environment visit -# http://www.gradle.org/docs/current/userguide/build_environment.html - -# Specifies the JVM arguments used for the daemon process. -# The setting is particularly useful for tweaking memory settings. -# Default value: -Xmx10248m -XX:MaxPermSize=256m -# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 - -# When configured, Gradle will run in incubating parallel mode. -# This option should only be used with decoupled projects. More details, visit -# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects -# org.gradle.parallel=true - -android.useDeprecatedNdk=true diff --git a/Example/android/gradlew b/Example/android/gradlew deleted file mode 100644 index 9d82f789..00000000 --- a/Example/android/gradlew +++ /dev/null @@ -1,160 +0,0 @@ -#!/usr/bin/env bash - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn ( ) { - echo "$*" -} - -die ( ) { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; -esac - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") -} -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" - -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/Example/android/gradlew.bat b/Example/android/gradlew.bat deleted file mode 100644 index 8a0b282a..00000000 --- a/Example/android/gradlew.bat +++ /dev/null @@ -1,90 +0,0 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windowz variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/Example/android/settings.gradle b/Example/android/settings.gradle deleted file mode 100644 index 64cc4dc1..00000000 --- a/Example/android/settings.gradle +++ /dev/null @@ -1,5 +0,0 @@ -rootProject.name = 'SvgExample' - -include ':app' -include ':react-native-svg' -project(':react-native-svg').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-svg/android') diff --git a/Example/examples.js b/Example/examples.js deleted file mode 100644 index 8d2131e6..00000000 --- a/Example/examples.js +++ /dev/null @@ -1,37 +0,0 @@ -import * as Svg from './examples/Svg'; -import * as Rect from './examples/Rect'; -import * as Circle from './examples/Circle'; -import * as Ellipse from './examples/Ellipse'; -import * as Line from './examples/Line'; -import * as Polygon from './examples/Polygon'; -import * as Polyline from './examples/Polyline'; -import * as Path from './examples/Path'; -import * as Text from './examples/Text'; -import * as G from './examples/G'; -import * as Stroking from './examples/Stroking'; -import * as Gradients from './examples/Gradients'; -import * as Clipping from './examples/Clipping'; -import * as Image from './examples/Image'; -import * as Reusable from './examples/Reusable'; -import * as TouchEvents from './examples/TouchEvents'; -import * as PanResponder from './examples/PanResponder'; - -export { - Svg, - Rect, - Circle, - Ellipse, - Line, - Polygon, - Polyline, - Path, - Text, - Stroking, - G, - Gradients, - Clipping, - Image, - TouchEvents, - Reusable, - PanResponder -}; diff --git a/Example/examples/Circle.js b/Example/examples/Circle.js deleted file mode 100644 index af7af1ca..00000000 --- a/Example/examples/Circle.js +++ /dev/null @@ -1,117 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Circle -} from 'react-native-svg'; - -class CircleExample extends Component{ - static title = 'Circle'; - render() { - - return - - ; - } -} - -class StrokeCircle extends Component{ - static title = 'Stroke Circle'; - render() { - return - - ; - } -} - -class StrokeOpacityCircle extends Component{ - static title = 'Circle with strokeOpacity'; - render() { - return - - ; - } -} - -class PieCircle extends Component{ - static title = 'Draw a Pie shape with circle'; - render() { - return - - - ; - } -} - -const icon = - -; - -const samples = [ - CircleExample, - StrokeCircle, - StrokeOpacityCircle, - PieCircle -]; -export { - icon, - samples -}; diff --git a/Example/examples/Clipping.js b/Example/examples/Clipping.js deleted file mode 100644 index 4a4aa447..00000000 --- a/Example/examples/Clipping.js +++ /dev/null @@ -1,237 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - ClipPath, - Defs, - RadialGradient, - Stop, - Rect, - Text, - Ellipse, - G, - Polygon, - Circle -} from 'react-native-svg'; - -class ClipPathAttr extends Component{ - static title = 'Clip by set clip-path with a path data'; - render() { - return - - - - - - - - - - ; - } -} - -class ClipRule extends Component{ - static title = 'Clip a group with clipRule="evenodd"'; - render() { - return - - - - - - - ; - } -} - - -class ClipPathElement extends Component{ - static title = 'Clip by set clip-path with a path data'; - render() { - return - - - - - - - - - - - - Q - - - - - ; - } -} - -class TextClipping extends Component{ - static title = 'Transform the text'; - render() { - return - - - - - - - - - - - - NOT THE FACE - ; - } -} - -const icon = - - - - - - - - -; - -const samples = [ClipPathAttr, ClipRule, ClipPathElement, TextClipping]; - -export { - icon, - samples -}; diff --git a/Example/examples/Ellipse.js b/Example/examples/Ellipse.js deleted file mode 100644 index ee746f31..00000000 --- a/Example/examples/Ellipse.js +++ /dev/null @@ -1,76 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Ellipse -} from 'react-native-svg'; - -class EllipseExample extends Component{ - static title = 'Ellipse'; - render() { - return - - ; - } -} - -class PileEllipses extends Component{ - static title = 'The following example creates three ellipses on top of each other'; - render() { - return - - - - ; - } -} - -class CombinedEllipses extends Component{ - static title = 'The following example combines two ellipses (one yellow and one white)'; - render() { - return - - - ; - } -} - -const icon = - -; - -const samples = [EllipseExample, PileEllipses, CombinedEllipses]; - -export { - icon, - samples -}; diff --git a/Example/examples/G.js b/Example/examples/G.js deleted file mode 100644 index 1e38e902..00000000 --- a/Example/examples/G.js +++ /dev/null @@ -1,169 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - G, - Circle, - Line, - Rect, - Text, - Use -} from 'react-native-svg'; - -class GExample extends Component{ - static title = 'G children props inherit'; - - constructor() { - super(...arguments); - this.state = { - fill: 'purple' - }; - } - - componentDidMount = () => { - setTimeout(() => { - if (!this._unmounted) { - this.setState({ - fill: '#856' - }); - } - }, 2000); - }; - - componentWillUnmount = () => { - this._unmounted = true; - }; - - render() { - return - - - - - - - - - - ; - } -} - -class GTransform extends Component{ - static title = 'G transform'; - render() { - return - - - - - - - Text grouped with shapes - - - ; - } -} - -const icon = - - - - - - - -; - -const samples = [GExample, GTransform]; - -export { - icon, - samples -}; diff --git a/Example/examples/Gradients.js b/Example/examples/Gradients.js deleted file mode 100644 index dcb536a5..00000000 --- a/Example/examples/Gradients.js +++ /dev/null @@ -1,246 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Defs, - LinearGradient, - RadialGradient, - Stop, - Ellipse, - Circle, - Text, - Rect, - G -} from 'react-native-svg'; - -class LinearGradientHorizontal extends Component{ - static title = 'Define an ellipse with a horizontal linear gradient from yellow to red'; - render() { - return - - - - - - - - ; - } -} - -class LinearGradientVertical extends Component{ - static title = 'Define an ellipse with a vertical linear gradient from yellow to red'; - render() { - return - - - - - - - - - - - - ; - } -} - -class LinearGradientPercent extends Component{ - static title = 'Define a linear gradient in percent unit'; - render() { - return - - - - - - - x1=0% - x2=100% - - ; - } -} - -class RadialGradientExample extends Component{ - static title = 'Define an ellipse with a radial gradient from yellow to purple'; - render() { - return - - - - - - - - - - ; - } -} - -class RadialGradientPercent extends Component{ - static title = 'Define a radial gradient in percent unit'; - render() { - return - - - - - - - - ; - } -} - -class RadialGradientPart extends Component{ - static title = 'Define another ellipse with a radial gradient from white to blue'; - render() { - return - - - - - - - - ; - } -} - - -class FillGradientWithOpacity extends Component{ - static title = 'Fill a radial gradient with fillOpacity prop'; - render() { - return - - - - - - - - ; - } -} - -class FillGradientInRect extends Component{ - static title = 'Fill a radial gradient inside a rect and stroke it'; - render() { - return - - - - - - - - ; - } -} - -const icon = - - - - - - - -; - - -const samples = [ - LinearGradientHorizontal, - LinearGradientVertical, - LinearGradientPercent, - RadialGradientExample, - RadialGradientPercent, - RadialGradientPart, - FillGradientWithOpacity, - FillGradientInRect -]; - -export { - icon, - samples -}; diff --git a/Example/examples/Image.js b/Example/examples/Image.js deleted file mode 100644 index 6c92dd39..00000000 --- a/Example/examples/Image.js +++ /dev/null @@ -1,109 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Image, - Defs, - Circle, - ClipPath, - Rect, - Text -} from 'react-native-svg'; - -class ImageExample extends Component{ - static title = 'Draw Image with preserveAspectRatio prop'; - - render() { - return - - - - - - - - HOGWARTS - ; - } -} - -class ClipImage extends Component{ - static title = 'Clip Image'; - - render() { - return - - - - - - alert('press on Image')} - x="5%" - y="5%" - width="90%" - height="90%" - href={require('../image.jpg')} - opacity="0.6" - clipPath="url(#clip)" - /> - HOGWARTS - ; - } -} - -const icon = - -; - -const samples = [ImageExample, ClipImage]; - -export { - icon, - samples -}; diff --git a/Example/examples/Line.js b/Example/examples/Line.js deleted file mode 100644 index dd9da11c..00000000 --- a/Example/examples/Line.js +++ /dev/null @@ -1,87 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Line -} from 'react-native-svg'; - -class LineExample extends Component{ - static title = 'Line'; - - render() { - return - - ; - } -} - -class LineWithStrokeLinecap extends Component{ - static title = 'Line'; - - render() { - return - - - - ; - } -} - -const icon = - -; - -const samples = [LineExample, LineWithStrokeLinecap]; - -export { - icon, - samples -}; diff --git a/Example/examples/PanResponder.js b/Example/examples/PanResponder.js deleted file mode 100644 index 4f59c11a..00000000 --- a/Example/examples/PanResponder.js +++ /dev/null @@ -1,121 +0,0 @@ -import React, { - Component -} from 'react'; - -import { - PanResponder -} from 'react-native'; - -import Svg, { - Path, - Text, - G, - Line, - Polyline -} from 'react-native-svg'; - -class PanExample extends Component { - static title = 'Bind PanResponder on the SVG Shape'; - - constructor() { - super(...arguments); - this.state = { - x: 0, - y: 0, - hover: false - }; - } - - componentWillMount = () => { - this._panResponder = PanResponder.create({ - onStartShouldSetPanResponder: this._alwaysTrue, - onMoveShouldSetPanResponder: this._alwaysTrue, - onPanResponderGrant: this._handlePanResponderGrant, - onPanResponderMove: this._handlePanResponderMove, - onPanResponderRelease: this._handlePanResponderEnd, - onPanResponderTerminate: this._handlePanResponderEnd - }); - }; - - _previousLeft = 0; - - _previousTop = 0; - - _alwaysTrue = () => true; - - _handlePanResponderMove = (e, gestureState) => { - this.setState({ - x: this._previousLeft + gestureState.dx, - y: this._previousTop + gestureState.dy - }); - }; - - _handlePanResponderGrant = () => { - this.root.setNativeProps({ - opacity: 0.5 - }); - }; - - _handlePanResponderEnd = (e, gestureState) => { - this.root.setNativeProps({ - opacity: 1 - }); - this._previousLeft += gestureState.dx; - this._previousTop += gestureState.dy; - }; - - - render () { - return - {this.root = ele;}} - x={this.state.x} - y={this.state.y} - > - - STAR - - ; - } -} - -const icon = - - - - - - - - -; - -const samples = [ - PanExample -]; - -const scroll = false; - -export { - icon, - samples, - scroll -}; diff --git a/Example/examples/Path.js b/Example/examples/Path.js deleted file mode 100644 index 7377b876..00000000 --- a/Example/examples/Path.js +++ /dev/null @@ -1,122 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Path, - G, - Circle, - Text -} from 'react-native-svg'; - -class PathExample extends Component{ - static title = 'Path'; - - render() { - return - - - - - ; - } -} - -class UnclosedPath extends Component{ - static title = 'Unclosed paths'; - render() { - return - - ; - } -} - -class BezierCurve extends Component{ - static title = 'The following example creates a quadratic Bézier curve, where A and C are the start and end points, B is the control point'; - render() { - return - - - - - - - - - - - - A - B - C - - - - ; - } -} -const icon = - -; - -const samples = [PathExample, UnclosedPath, BezierCurve]; - -export { - icon, - samples -}; diff --git a/Example/examples/Polygon.js b/Example/examples/Polygon.js deleted file mode 100644 index bd85d5ba..00000000 --- a/Example/examples/Polygon.js +++ /dev/null @@ -1,104 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Polygon, - G -} from 'react-native-svg'; - -class PolygonExample extends Component{ - static title = 'The following example creates a polygon with three sides'; - - render() { - return - - ; - } -} - - -class FourSidePolygon extends Component{ - static title = 'The following example creates a polygon with four sides'; - render() { - return - - ; - } -} - -class StarPolygon extends Component{ - static title = 'Use the element to create a star'; - render() { - return - - - - ; - } -} - -class EvenOddPolygon extends Component{ - static title = 'Change the fill-rule property to "evenodd"'; - render() { - return - - - - ; - } -} - -const icon = - - - -; - -const samples = [PolygonExample, FourSidePolygon, StarPolygon, EvenOddPolygon]; - -export { - icon, - samples -}; diff --git a/Example/examples/Polyline.js b/Example/examples/Polyline.js deleted file mode 100644 index 2b92d254..00000000 --- a/Example/examples/Polyline.js +++ /dev/null @@ -1,96 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Polyline -} from 'react-native-svg'; - -class PolylineExample extends Component{ - static title = 'The element is used to create any shape that consists of only straight lines'; - render() { - return - - ; - } -} - -class StraightLines extends Component{ - static title = 'Another example with only straight lines'; - render() { - return - - ; - } -} - -class PolylineFill extends Component{ - static title = 'Fill Polyline'; - render() { - return - - ; - } -} - -class PolylineFillStroke extends Component{ - static title = 'Stroke Polyline with strokeLinecap and strokeLinejoin'; - render() { - return - - ; - } -} - -const icon = - -; - -const samples = [PolylineExample, StraightLines, PolylineFill, PolylineFillStroke]; - -export { - icon, - samples -}; diff --git a/Example/examples/Rect.js b/Example/examples/Rect.js deleted file mode 100644 index 30999a34..00000000 --- a/Example/examples/Rect.js +++ /dev/null @@ -1,139 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Rect -} from 'react-native-svg'; - -class RectExample extends Component{ - static title = 'Rect'; - render() { - return - - ; - } -} - -class RectStrokeFill extends Component{ - static title = '`stroke` and `fill` Rect'; - render() { - return - - ; - } -} - -class RoundedRect extends Component{ - static title = 'A rectangle with rounded corners'; - render() { - return - - ; - } -} - -class EllipseRect extends Component{ - static title = 'Rect with different `rx` and `ry`'; - render() { - return - - ; - } -} - -class RoundOverflowRect extends Component{ - static title = 'Rect with `rx` or `ry` overflowed'; - render() { - return - - ; - } -} - -const icon = - -; - -const samples = [RectExample, RectStrokeFill, RoundedRect, EllipseRect, RoundOverflowRect]; - -export { - icon, - samples -}; - - diff --git a/Example/examples/Reusable.js b/Example/examples/Reusable.js deleted file mode 100644 index d5e28f82..00000000 --- a/Example/examples/Reusable.js +++ /dev/null @@ -1,151 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Defs, - G, - Path, - Use, - Symbol, - Circle, - ClipPath, - LinearGradient, - RadialGradient, - Stop, - Rect -} from 'react-native-svg'; - -class UseExample extends Component{ - static title = 'Reuse svg code'; - render() { - return - - - - - - - - - - - - ; - } -} - -class UseShapes extends Component{ - static title = 'Using Shapes Outside of a Defs Element'; - render() { - return - - - - - - - ; - } -} - - -class DefsExample extends Component{ - static title = 'Basic Defs usage'; - - render() { - return - - - - - - - - - - - - - - - - - - - - - - - ; - } -} - -class SymbolExample extends Component{ - static title = 'Symbol example, reuse elements with viewBox prop'; - render() { - return - - - - - - - - - ; - } -} - -const icon = - - - - - - - - - - -; - -const samples = [UseExample, UseShapes, DefsExample, SymbolExample]; - -export { - icon, - samples -}; diff --git a/Example/examples/Stroking.js b/Example/examples/Stroking.js deleted file mode 100644 index a7772196..00000000 --- a/Example/examples/Stroking.js +++ /dev/null @@ -1,150 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Path, - Rect, - G, - Defs, - Stop, - RadialGradient, - Polyline, - ClipPath, - Circle, - Text -} from 'react-native-svg'; - -class StrokeExample extends Component{ - static title = 'The stroke property defines the color of a line, text or outline of an element'; - render() { - return - - - - - - ; - } -} - -class StrokeLinecap extends Component{ - static title = 'The strokeLinecap property defines different types of endings to an open path'; - render() { - return - - - - - - - - ; - } -} - -class StrokeDasharray extends Component{ - static title = 'strokeDasharray'; - render() { - return - - - - - - ; - } -} - -class StrokeDashoffset extends Component{ - static title = 'the strokeDashoffset attribute specifies the distance into the dash pattern to start the dash.'; - render() { - return - - STROKE - ; - } -} - -class StrokePattern extends Component{ - static title = 'Advanced stroke example.'; - render() { - return - - - - - - - - - - - - - ; - } -} - - -const icon = - - - - - -; - -const samples = [StrokeExample, StrokeLinecap, StrokeDasharray, StrokeDashoffset, StrokePattern]; -export { - icon, - samples -}; diff --git a/Example/examples/Svg.js b/Example/examples/Svg.js deleted file mode 100644 index 2447657c..00000000 --- a/Example/examples/Svg.js +++ /dev/null @@ -1,221 +0,0 @@ -import { - StyleSheet, - View, - Image -} from 'react-native'; - -import React, { - Component -} from 'react'; - -const styles = StyleSheet.create({ - container: { - flex: 1, - height: 100, - width: 200 - }, - svg: { - flex: 1, - alignSelf: 'stretch' - } -}); - -import Svg, { - Circle, - Rect, - Path, - Line, - G -} from 'react-native-svg'; - -class SvgExample extends Component{ - static title = 'SVG'; - render() { - return - - - ; - } -} - -class SvgOpacity extends Component{ - static title = 'SVG with `opacity` prop'; - render() { - return - - - ; - } -} - -class SvgViewbox extends Component{ - static title = 'SVG with `viewBox="40 20 100 40" and preserveAspectRatio="none"`'; - render() { - return - - - - - - - - ; - } -} - -class NullComponent extends Component { - render() { - return null; - } -} - -class SvgLayout extends Component{ - static title = 'SVG with flex layout'; - render() { - return - - - - - - - - - - ; - } -} - -class SvgNativeMethods extends Component { - static title = 'Tap the shapes to render the Image below based on the base64-data of the Svg'; - constructor() { - super(...arguments); - this.state = { - base64: null - }; - } - - alert = function () { - this.root.toDataURL(base64 => { - this.setState({ - base64 - }); - }); - }; - render() { - return - {this.root = ele;}}> - - - - - - - {this.state.base64 && } - - ; - } -} - -const icon = - - -; - -const samples = [ - SvgExample, - SvgOpacity, - SvgViewbox, - SvgLayout, - SvgNativeMethods -]; - -export { - icon, - samples -}; diff --git a/Example/examples/Text.js b/Example/examples/Text.js deleted file mode 100644 index 032192d8..00000000 --- a/Example/examples/Text.js +++ /dev/null @@ -1,217 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Text, - LinearGradient, - Stop, - Defs, - Path, - G, - TSpan, - TextPath -} from 'react-native-svg'; - -class TextExample extends Component{ - static title = 'Text'; - render() { - return - I love SVG! - ; - } -} - -class TextRotate extends Component{ - static title = 'Transform the text'; - - render() { - return - I love SVG - I love SVG - I love SVG - ; - } -} - -// TODO: iOS not support text stroke with pattern -class TextStroke extends Component{ - static title = 'Stroke the text'; - render() { - return - - - - - - - STROKE TEXT - ; - } -} - -class TextFill extends Component{ - static title = 'Fill the text with LinearGradient'; - render() { - return - - - - - - - - FILL TEXT - ; - } -} - - -class TextPath extends Component{ - static title = 'Draw text along path'; - - render() { - const path = ` - M 10 20 - C 20 10 30 0 40 10 - C 50 20 60 30 70 20 - C 80 10 90 10 90 10 - `; - - return - - - - - - - We go up, then we go down, - then up again - - - - - ; - } -} - -class TSpanExample extends Component{ - static title = 'TSpan nest'; - - render() { - - return - - tspan line 1 - tspan line 2 - tspan line 3 - - - 12345 - - 6 - 7 - - 89a - - delta on text - ; - } -} - -const icon = - -; - -const samples = [ - TextExample, - TextRotate, - TextStroke, - TextFill, - TextPath, - TSpanExample -]; - -export { - icon, - samples -}; diff --git a/Example/examples/TouchEvents.js b/Example/examples/TouchEvents.js deleted file mode 100644 index 47f278c7..00000000 --- a/Example/examples/TouchEvents.js +++ /dev/null @@ -1,124 +0,0 @@ -import React, { - Component -} from 'react'; - -import Svg, { - Circle, - Path, - Rect, - G, - Text -} from 'react-native-svg'; - -class PressExample extends Component { - static title = 'Press on the red circle or long press on the blue rectangle to trigger the events'; - - render () { - return - alert('Press on Circle')} - /> - alert('Long press on Rect')} - /> - - ; - } -} - -class HoverExample extends Component { - static title = 'Hover the svg path'; - constructor () { - super(...arguments); - this.state = { - hover: false - }; - } - - toggle = () => { - this.setState({hover: !this.state.hover}); - }; - - render () { - return - - - - - - ; - } -} - -class GroupExample extends Component { - static title = 'Bind touch events callback on Group element with viewBox'; - - render () { - return - alert('Pressed on G')}> - - - - alert('Pressed on Text')}>H - - - - - ; - } - -} - -const icon = - - -; - -const samples = [ - PressExample, - HoverExample, - GroupExample -]; - -export { - icon, - samples -}; diff --git a/Example/exp.json b/Example/exp.json deleted file mode 100644 index be16d3c0..00000000 --- a/Example/exp.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "React Native SVG Examples", - "description": "react-native-svg is built to provide a SVG interface to react native on both iOS and Android. https://github.com/react-native-community/react-native-svg", - "slug": "react-native-svg-examples", - "sdkVersion": "10.0.0", - "version": "1.0.0", - "orientation": "portrait", - "primaryColor": "#cccccc", - "iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png", - "notification": { - "iconUrl": "https://s3.amazonaws.com/exp-us-standard/placeholder-push-icon-blue-circle.png", - "color": "#000000" - }, - "loading": { - "iconUrl": "https://s3.amazonaws.com/exp-brand-assets/ExponentEmptyManifest_192.png", - "hideExponentText": false - }, - "packagerOpts": { - "assetExts": [ - "ttf" - ] - } -} diff --git a/Example/image.jpg b/Example/image.jpg deleted file mode 100644 index 8fddd5c1..00000000 Binary files a/Example/image.jpg and /dev/null differ diff --git a/Example/index.android.js b/Example/index.android.js deleted file mode 100644 index ce898782..00000000 --- a/Example/index.android.js +++ /dev/null @@ -1 +0,0 @@ -import './main'; diff --git a/Example/index.ios.js b/Example/index.ios.js deleted file mode 100644 index ce898782..00000000 --- a/Example/index.ios.js +++ /dev/null @@ -1 +0,0 @@ -import './main'; diff --git a/Example/ios/SvgExample.xcodeproj/project.pbxproj b/Example/ios/SvgExample.xcodeproj/project.pbxproj deleted file mode 100644 index 43b36c4f..00000000 --- a/Example/ios/SvgExample.xcodeproj/project.pbxproj +++ /dev/null @@ -1,699 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */; }; - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */; }; - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */; }; - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */; }; - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */; }; - 103345EE1CC618FA00B43156 /* libRNSVG.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 103345ED1CC618D700B43156 /* libRNSVG.a */; }; - 1049A4131D363F65000A1827 /* libRCTAnimation.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1049A4121D363F60000A1827 /* libRCTAnimation.a */; }; - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 78C398B91ACF4ADC00677621 /* libRCTLinking.a */; }; - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */; }; - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */; }; - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB11A68108700A75B9A /* LaunchScreen.xib */; }; - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; - 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 146834051AC3E58100842450 /* libReact.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 146834041AC3E56700842450 /* libReact.a */; }; - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 832341B51AAA6A8300B99B32 /* libRCTText.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTActionSheet; - }; - 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTGeolocation; - }; - 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5115D1A9E6B3D00147676; - remoteInfo = RCTImage; - }; - 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B511DB1A9E6C8500147676; - remoteInfo = RCTNetwork; - }; - 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 832C81801AAF6DEF007FA2F7; - remoteInfo = RCTVibration; - }; - 103345EC1CC618D700B43156 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 103345E81CC618D700B43156 /* RNSVG.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 0CF68AC11AF0540F00FF9E5C; - remoteInfo = RNSVG; - }; - 1049A4111D363F60000A1827 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTAnimation; - }; - 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTSettings; - }; - 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 3C86DF461ADF2C930047B81A; - remoteInfo = RCTWebSocket; - }; - 146834031AC3E56700842450 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 146833FF1AC3E56700842450 /* React.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 83CBBA2E1A601D0E00E9B192; - remoteInfo = React; - }; - 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 134814201AA4EA6300B7C361; - remoteInfo = RCTLinking; - }; - 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 58B5119B1A9E6C1200147676; - remoteInfo = RCTText; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 008F07F21AC5B25A0029DE68 /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTActionSheet.xcodeproj; path = "../node_modules/react-native/Libraries/ActionSheetIOS/RCTActionSheet.xcodeproj"; sourceTree = ""; }; - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTGeolocation.xcodeproj; path = "../node_modules/react-native/Libraries/Geolocation/RCTGeolocation.xcodeproj"; sourceTree = ""; }; - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTImage.xcodeproj; path = "../node_modules/react-native/Libraries/Image/RCTImage.xcodeproj"; sourceTree = ""; }; - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTNetwork.xcodeproj; path = "../node_modules/react-native/Libraries/Network/RCTNetwork.xcodeproj"; sourceTree = ""; }; - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTVibration.xcodeproj; path = "../node_modules/react-native/Libraries/Vibration/RCTVibration.xcodeproj"; sourceTree = ""; }; - 103345E81CC618D700B43156 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = ""; }; - 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTAnimation.xcodeproj; path = "../node_modules/react-native/Libraries/NativeAnimation/RCTAnimation.xcodeproj"; sourceTree = ""; }; - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTSettings.xcodeproj; path = "../node_modules/react-native/Libraries/Settings/RCTSettings.xcodeproj"; sourceTree = ""; }; - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWebSocket.xcodeproj; path = "../node_modules/react-native/Libraries/WebSocket/RCTWebSocket.xcodeproj"; sourceTree = ""; }; - 13B07F961A680F5B00A75B9A /* SvgExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SvgExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = SvgExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = SvgExample/AppDelegate.m; sourceTree = ""; }; - 13B07FB21A68108700A75B9A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = SvgExample/Images.xcassets; sourceTree = ""; }; - 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = SvgExample/Info.plist; sourceTree = ""; }; - 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = SvgExample/main.m; sourceTree = ""; }; - 146833FF1AC3E56700842450 /* React.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = React.xcodeproj; path = "../node_modules/react-native/React/React.xcodeproj"; sourceTree = ""; }; - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTLinking.xcodeproj; path = "../node_modules/react-native/Libraries/LinkingIOS/RCTLinking.xcodeproj"; sourceTree = ""; }; - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTText.xcodeproj; path = "../node_modules/react-native/Libraries/Text/RCTText.xcodeproj"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1049A4131D363F65000A1827 /* libRCTAnimation.a in Frameworks */, - 103345EE1CC618FA00B43156 /* libRNSVG.a in Frameworks */, - 146834051AC3E58100842450 /* libReact.a in Frameworks */, - 00C302E51ABCBA2D00DB3ED1 /* libRCTActionSheet.a in Frameworks */, - 00C302E71ABCBA2D00DB3ED1 /* libRCTGeolocation.a in Frameworks */, - 00C302E81ABCBA2D00DB3ED1 /* libRCTImage.a in Frameworks */, - 133E29F31AD74F7200F7D852 /* libRCTLinking.a in Frameworks */, - 00C302E91ABCBA2D00DB3ED1 /* libRCTNetwork.a in Frameworks */, - 139105C61AF99C1200B5F7CC /* libRCTSettings.a in Frameworks */, - 832341BD1AAA6AB300B99B32 /* libRCTText.a in Frameworks */, - 00C302EA1ABCBA2D00DB3ED1 /* libRCTVibration.a in Frameworks */, - 139FDEF61B0652A700C62182 /* libRCTWebSocket.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 00C302A81ABCB8CE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302B61ABCB90400DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302BC1ABCB91800DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302D41ABCB9D200DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */, - ); - name = Products; - sourceTree = ""; - }; - 00C302E01ABCB9EE00DB3ED1 /* Products */ = { - isa = PBXGroup; - children = ( - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */, - ); - name = Products; - sourceTree = ""; - }; - 103345E91CC618D700B43156 /* Products */ = { - isa = PBXGroup; - children = ( - 103345ED1CC618D700B43156 /* libRNSVG.a */, - ); - name = Products; - sourceTree = ""; - }; - 1049A40E1D363F60000A1827 /* Products */ = { - isa = PBXGroup; - children = ( - 1049A4121D363F60000A1827 /* libRCTAnimation.a */, - ); - name = Products; - sourceTree = ""; - }; - 139105B71AF99BAD00B5F7CC /* Products */ = { - isa = PBXGroup; - children = ( - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */, - ); - name = Products; - sourceTree = ""; - }; - 139FDEE71B06529A00C62182 /* Products */ = { - isa = PBXGroup; - children = ( - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */, - ); - name = Products; - sourceTree = ""; - }; - 13B07FAE1A68108700A75B9A /* SvgExample */ = { - isa = PBXGroup; - children = ( - 008F07F21AC5B25A0029DE68 /* main.jsbundle */, - 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, - 13B07FB51A68108700A75B9A /* Images.xcassets */, - 13B07FB61A68108700A75B9A /* Info.plist */, - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */, - 13B07FB71A68108700A75B9A /* main.m */, - ); - name = SvgExample; - sourceTree = ""; - }; - 146834001AC3E56700842450 /* Products */ = { - isa = PBXGroup; - children = ( - 146834041AC3E56700842450 /* libReact.a */, - ); - name = Products; - sourceTree = ""; - }; - 78C398B11ACF4ADC00677621 /* Products */ = { - isa = PBXGroup; - children = ( - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */, - ); - name = Products; - sourceTree = ""; - }; - 832341AE1AAA6A7D00B99B32 /* Libraries */ = { - isa = PBXGroup; - children = ( - 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */, - 103345E81CC618D700B43156 /* RNSVG.xcodeproj */, - 146833FF1AC3E56700842450 /* React.xcodeproj */, - 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */, - 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */, - 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */, - 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */, - 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */, - 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */, - 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */, - 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */, - 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */, - ); - name = Libraries; - sourceTree = ""; - }; - 832341B11AAA6A8300B99B32 /* Products */ = { - isa = PBXGroup; - children = ( - 832341B51AAA6A8300B99B32 /* libRCTText.a */, - ); - name = Products; - sourceTree = ""; - }; - 83CBB9F61A601CBA00E9B192 = { - isa = PBXGroup; - children = ( - 13B07FAE1A68108700A75B9A /* SvgExample */, - 832341AE1AAA6A7D00B99B32 /* Libraries */, - 83CBBA001A601CBA00E9B192 /* Products */, - ); - indentWidth = 2; - sourceTree = ""; - tabWidth = 2; - }; - 83CBBA001A601CBA00E9B192 /* Products */ = { - isa = PBXGroup; - children = ( - 13B07F961A680F5B00A75B9A /* SvgExample.app */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 13B07F861A680F5B00A75B9A /* SvgExample */ = { - isa = PBXNativeTarget; - buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SvgExample" */; - buildPhases = ( - 13B07F871A680F5B00A75B9A /* Sources */, - 13B07F8C1A680F5B00A75B9A /* Frameworks */, - 13B07F8E1A680F5B00A75B9A /* Resources */, - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = SvgExample; - productName = "Hello World"; - productReference = 13B07F961A680F5B00A75B9A /* SvgExample.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 83CBB9F71A601CBA00E9B192 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0610; - ORGANIZATIONNAME = Horcrux; - }; - buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SvgExample" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 83CBB9F61A601CBA00E9B192; - productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 00C302A81ABCB8CE00DB3ED1 /* Products */; - ProjectRef = 00C302A71ABCB8CE00DB3ED1 /* RCTActionSheet.xcodeproj */; - }, - { - ProductGroup = 1049A40E1D363F60000A1827 /* Products */; - ProjectRef = 1049A40D1D363F60000A1827 /* RCTAnimation.xcodeproj */; - }, - { - ProductGroup = 00C302B61ABCB90400DB3ED1 /* Products */; - ProjectRef = 00C302B51ABCB90400DB3ED1 /* RCTGeolocation.xcodeproj */; - }, - { - ProductGroup = 00C302BC1ABCB91800DB3ED1 /* Products */; - ProjectRef = 00C302BB1ABCB91800DB3ED1 /* RCTImage.xcodeproj */; - }, - { - ProductGroup = 78C398B11ACF4ADC00677621 /* Products */; - ProjectRef = 78C398B01ACF4ADC00677621 /* RCTLinking.xcodeproj */; - }, - { - ProductGroup = 00C302D41ABCB9D200DB3ED1 /* Products */; - ProjectRef = 00C302D31ABCB9D200DB3ED1 /* RCTNetwork.xcodeproj */; - }, - { - ProductGroup = 139105B71AF99BAD00B5F7CC /* Products */; - ProjectRef = 139105B61AF99BAD00B5F7CC /* RCTSettings.xcodeproj */; - }, - { - ProductGroup = 832341B11AAA6A8300B99B32 /* Products */; - ProjectRef = 832341B01AAA6A8300B99B32 /* RCTText.xcodeproj */; - }, - { - ProductGroup = 00C302E01ABCB9EE00DB3ED1 /* Products */; - ProjectRef = 00C302DF1ABCB9EE00DB3ED1 /* RCTVibration.xcodeproj */; - }, - { - ProductGroup = 139FDEE71B06529A00C62182 /* Products */; - ProjectRef = 139FDEE61B06529A00C62182 /* RCTWebSocket.xcodeproj */; - }, - { - ProductGroup = 146834001AC3E56700842450 /* Products */; - ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */; - }, - { - ProductGroup = 103345E91CC618D700B43156 /* Products */; - ProjectRef = 103345E81CC618D700B43156 /* RNSVG.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 13B07F861A680F5B00A75B9A /* SvgExample */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 00C302AC1ABCB8CE00DB3ED1 /* libRCTActionSheet.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTActionSheet.a; - remoteRef = 00C302AB1ABCB8CE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302BA1ABCB90400DB3ED1 /* libRCTGeolocation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTGeolocation.a; - remoteRef = 00C302B91ABCB90400DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302C01ABCB91800DB3ED1 /* libRCTImage.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTImage.a; - remoteRef = 00C302BF1ABCB91800DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302DC1ABCB9D200DB3ED1 /* libRCTNetwork.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTNetwork.a; - remoteRef = 00C302DB1ABCB9D200DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 00C302E41ABCB9EE00DB3ED1 /* libRCTVibration.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTVibration.a; - remoteRef = 00C302E31ABCB9EE00DB3ED1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 103345ED1CC618D700B43156 /* libRNSVG.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRNSVG.a; - remoteRef = 103345EC1CC618D700B43156 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1049A4121D363F60000A1827 /* libRCTAnimation.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTAnimation.a; - remoteRef = 1049A4111D363F60000A1827 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139105C11AF99BAD00B5F7CC /* libRCTSettings.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTSettings.a; - remoteRef = 139105C01AF99BAD00B5F7CC /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 139FDEF41B06529B00C62182 /* libRCTWebSocket.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTWebSocket.a; - remoteRef = 139FDEF31B06529B00C62182 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 146834041AC3E56700842450 /* libReact.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libReact.a; - remoteRef = 146834031AC3E56700842450 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 78C398B91ACF4ADC00677621 /* libRCTLinking.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTLinking.a; - remoteRef = 78C398B81ACF4ADC00677621 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 832341B51AAA6A8300B99B32 /* libRCTText.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libRCTText.a; - remoteRef = 832341B41AAA6A8300B99B32 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 13B07F8E1A680F5B00A75B9A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 13B07FBD1A68108700A75B9A /* LaunchScreen.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Bundle React Native code and images"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "../node_modules/react-native/packager/react-native-xcode.sh"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 13B07F871A680F5B00A75B9A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, - 13B07FC11A68108700A75B9A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - 13B07FB11A68108700A75B9A /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 13B07FB21A68108700A75B9A /* Base */, - ); - name = LaunchScreen.xib; - path = SvgExample; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 13B07F941A680F5B00A75B9A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEAD_CODE_STRIPPING = NO; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = SvgExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = cn.horcrux.RNSvgExample; - PRODUCT_NAME = SvgExample; - }; - name = Debug; - }; - 13B07F951A680F5B00A75B9A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - INFOPLIST_FILE = SvgExample/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - OTHER_LDFLAGS = ( - "-ObjC", - "-lc++", - ); - PRODUCT_BUNDLE_IDENTIFIER = cn.horcrux.RNSvgExample; - PRODUCT_NAME = SvgExample; - }; - name = Release; - }; - 83CBBA201A601CBA00E9B192 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 83CBBA211A601CBA00E9B192 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(inherited)", - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include, - "$(SRCROOT)/../node_modules/react-native/React/**", - ); - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "SvgExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 13B07F941A680F5B00A75B9A /* Debug */, - 13B07F951A680F5B00A75B9A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "SvgExample" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 83CBBA201A601CBA00E9B192 /* Debug */, - 83CBBA211A601CBA00E9B192 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; -} diff --git a/Example/ios/SvgExample.xcodeproj/xcshareddata/xcschemes/ArtSvgExample.xcscheme b/Example/ios/SvgExample.xcodeproj/xcshareddata/xcschemes/ArtSvgExample.xcscheme deleted file mode 100644 index dbeaedb7..00000000 --- a/Example/ios/SvgExample.xcodeproj/xcshareddata/xcschemes/ArtSvgExample.xcscheme +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/ios/SvgExample/AppDelegate.h b/Example/ios/SvgExample/AppDelegate.h deleted file mode 100644 index a9654d5e..00000000 --- a/Example/ios/SvgExample/AppDelegate.h +++ /dev/null @@ -1,16 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -@interface AppDelegate : UIResponder - -@property (nonatomic, strong) UIWindow *window; - -@end diff --git a/Example/ios/SvgExample/AppDelegate.m b/Example/ios/SvgExample/AppDelegate.m deleted file mode 100644 index f77f4649..00000000 --- a/Example/ios/SvgExample/AppDelegate.m +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import "AppDelegate.h" - -#import "RCTRootView.h" - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - NSURL *jsCodeLocation; - - /** - * Loading JavaScript code - uncomment the one you want. - * - * OPTION 1 - * Load from development server. Start the server from the repository root: - * - * $ npm start - * - * To run on device, change `localhost` to the IP address of your computer - * (you can get this by typing `ifconfig` into the terminal and selecting the - * `inet` value under `en0:`) and make sure your computer and iOS device are - * on the same Wi-Fi network. - */ - - jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"]; - - /** - * OPTION 2 - * Load from pre-bundled file on disk. The static bundle is automatically - * generated by the "Bundle React Native code and images" build step when - * running the project on an actual device or running the project on the - * simulator in the "Release" build configuration. - */ - -// jsCodeLocation = [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; - - RCTRootView *rootView = [[RCTRootView alloc] initWithBundleURL:jsCodeLocation - moduleName:@"SvgExample" - initialProperties:nil - launchOptions:launchOptions]; - - self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; - UIViewController *rootViewController = [UIViewController new]; - rootViewController.view = rootView; - self.window.rootViewController = rootViewController; - [self.window makeKeyAndVisible]; - return YES; -} - -@end diff --git a/Example/ios/SvgExample/Base.lproj/LaunchScreen.xib b/Example/ios/SvgExample/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 6ea63487..00000000 --- a/Example/ios/SvgExample/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Example/ios/SvgExample/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/ios/SvgExample/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 118c98f7..00000000 --- a/Example/ios/SvgExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/Example/ios/SvgExample/Info.plist b/Example/ios/SvgExample/Info.plist deleted file mode 100644 index 682480a6..00000000 --- a/Example/ios/SvgExample/Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - - NSLocationWhenInUseUsageDescription - - UILaunchStoryboardName - LaunchScreen - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIViewControllerBasedStatusBarAppearance - - - diff --git a/Example/ios/SvgExample/main.m b/Example/ios/SvgExample/main.m deleted file mode 100644 index 3d767fcb..00000000 --- a/Example/ios/SvgExample/main.m +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (c) 2015-present, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - */ - -#import - -#import "AppDelegate.h" - -int main(int argc, char * argv[]) { - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); - } -} diff --git a/Example/main.js b/Example/main.js deleted file mode 100644 index a0ff49d8..00000000 --- a/Example/main.js +++ /dev/null @@ -1,267 +0,0 @@ -/** - * Sample React Native App for react-native-svg library - * https://github.com/magicismight/react-native-svg/tree/master/Example - */ -'use strict'; - -// eslint-disable-next-line no-unused-vars -import Exponent from 'exponent'; -import React, {Component} from 'react'; -import {Dimensions} from 'react-native'; - -import { - AppRegistry, - StyleSheet, - Text, - View, - ScrollView, - TouchableHighlight, - TouchableOpacity, - Animated, - Easing -} from 'react-native'; - -import { - Svg, - Circle, - Line -} from 'react-native-svg'; - -import * as examples from './examples'; -import 'react-native-root-modal'; - -const hairline = StyleSheet.hairlineWidth; - -const styles = StyleSheet.create({ - container: { - flex: 1, - paddingTop: 20, - alignItems: 'center', - overflow: 'hidden' - }, - content: { - flex: 1, - alignSelf: 'stretch' - }, - contentContainer: { - alignSelf: 'stretch', - borderTopWidth: hairline, - borderTopColor: '#ccc', - borderBottomWidth: hairline, - borderBottomColor: '#ccc', - flexWrap: 'wrap', - flexDirection: 'row', - marginHorizontal: 10 - }, - welcome: { - padding: 10, - color: '#f60', - fontSize: 18, - fontWeight: 'bold' - }, - link: { - height: 40, - alignSelf: 'stretch', - width: Dimensions.get('window').width / 2 - 10 - }, - title: { - marginLeft: 10 - }, - cell: { - height: 40, - paddingHorizontal: 10, - alignSelf: 'stretch', - alignItems: 'center', - flexDirection: 'row', - borderTopWidth: hairline, - borderTopColor: '#ccc', - marginTop: -hairline, - backgroundColor: 'transparent' - }, - modal: { - top: 0, - right: 0, - bottom: 0, - left: 0, - backgroundColor: 'rgba(0, 0, 0, 0.2)' - }, - close: { - position: 'absolute', - right: 20, - top: 40 - }, - scroll: { - position: 'absolute', - top: 30, - right: 10, - bottom: 20, - left: 10, - backgroundColor: '#fff' - }, - scrollContent: { - borderTopWidth: hairline, - borderTopColor: '#ccc' - }, - example: { - paddingVertical: 25, - alignSelf: 'stretch', - alignItems: 'center', - borderBottomWidth: hairline, - borderBottomColor: '#ccc' - }, - sampleTitle: { - marginHorizontal: 15, - fontSize: 16, - color: '#666' - } -}); - -const names = ['Svg', 'Stroking', 'Path', 'Line', 'Rect', 'Polygon', 'Polyline', 'Circle', 'Ellipse', 'G', 'Text', 'Gradients', 'Clipping', 'Image', 'TouchEvents', 'PanResponder', 'Reusable']; - -class SvgExample extends Component { - constructor() { - super(...arguments); - this.state = { - modal: false, - scale: new Animated.Value(0) - }; - } - - getSamples = (samples) => { - return samples.map((Sample, i) => - - {Sample.title} - - - ); - }; - - show = (name) => { - if (this.state.modal) { - return; - } - - let example = examples[name]; - if (example) { - let samples = example.samples; - this.state.scale.setValue(0); - Animated.spring(this.state.scale, { - toValue: 1, - useNativeDriver: false - }).start(); - - this.setState({ - modal: true, - content: - {this.getSamples(samples)} - , - scroll: example.scroll !== false - }); - } - }; - - hide = () => { - this.state.scale.setValue(1); - Animated.timing(this.state.scale, { - toValue: 0, - easing: Easing.in(Easing.back(2)) - }).start(({finished}) => finished && this.setState({ - modal: false, - content: null - })); - }; - - getExamples = () => { - return names.map(name => { - var icon; - let example = examples[name]; - if (example) { - icon = example.icon; - } - return this.show(name)} - > - - {icon} - {name} - - ; - }); - }; - - render() { - return - - - {this.state.content} - - - - - - - - - - - - - SVG library for React Native - - - {this.getExamples()} - - ; - } -} - -AppRegistry.registerComponent('main', () => SvgExample); -AppRegistry.registerComponent('SvgExample', () => SvgExample); diff --git a/Example/package.json b/Example/package.json deleted file mode 100644 index 476058ce..00000000 --- a/Example/package.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "SvgExample", - "version": "1.0.0", - "private": true, - "scripts": { - "start": "react-native start" - }, - "dependencies": { - "react": "15.3.1", - "react-native": "github:exponentjs/react-native#sdk-10.0.0", - "react-native-root-modal": "^1.0.4", - "@exponent/vector-icons": "^1.0.1", - "exponent": "^10.0.0" - }, - "main": "main.js" -} diff --git a/package.json b/package.json index 76029a7c..3f40c9b0 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "5.1.2", + "version": "5.1.3", "name": "react-native-svg", "description": "SVG library for react-native", "repository": {