diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5d401a7 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,98 @@ +version: 2.1 + +executors: + default: + docker: + - image: circleci/node:10 + working_directory: ~/project + +commands: + attach_project: + steps: + - attach_workspace: + at: ~/project + +jobs: + install-dependencies: + executor: default + steps: + - checkout + - attach_project + - restore_cache: + keys: + - dependencies-{{ checksum "package.json" }} + - dependencies- + - restore_cache: + keys: + - dependencies-example-{{ checksum "example/package.json" }} + - dependencies-example- + - run: + name: Install dependencies + command: | + yarn install --cwd example --frozen-lockfile + yarn install --frozen-lockfile + - save_cache: + key: dependencies-{{ checksum "package.json" }} + paths: node_modules + - save_cache: + key: dependencies-example-{{ checksum "example/package.json" }} + paths: example/node_modules + - persist_to_workspace: + root: . + paths: . + + lint: + executor: default + steps: + - attach_project + - run: + name: Lint files + command: | + yarn lint + + typescript: + executor: default + steps: + - attach_project + - run: + name: Typecheck files + command: | + yarn typescript + + unit-tests: + executor: default + steps: + - attach_project + - run: + name: Run unit tests + command: | + yarn test --coverage + - store_artifacts: + path: coverage + destination: coverage + + build-package: + executor: default + steps: + - attach_project + - run: + name: Build package + command: | + yarn prepare + +workflows: + build-and-test: + jobs: + - install-dependencies + - lint: + requires: + - install-dependencies + - typescript: + requires: + - install-dependencies + - unit-tests: + requires: + - install-dependencies + - build-package: + requires: + - install-dependencies diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..65365be --- /dev/null +++ b/.editorconfig @@ -0,0 +1,15 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + +[*] + +indent_style = space +indent_size = 2 + +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9843769 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,14 @@ +*.pbxproj -text +# specific for windows script files +*.bat text eol=crlf +*.passiosecure filter=lfs diff=lfs merge=lfs -text +*.aar filter=lfs diff=lfs merge=lfs -text +*.car filter=lfs diff=lfs merge=lfs -text +PassioSDK filter=lfs diff=lfs merge=lfs -text +PassioSDKiOS filter=lfs diff=lfs merge=lfs -text +ios/Frameworks/PassioSDKiOS.xcframework/ios-arm64/PassioSDKiOS.framework/PassioSDKiOS filter=lfs diff=lfs merge=lfs -text +ios/Frameworks/PassioSDKiOS.xcframework/ios-arm64_x86_64-simulator/PassioSDKiOS.framework/PassioSDKiOS filter=lfs diff=lfs merge=lfs -text +android/passioicons-release/passioicons-release.aar filter=lfs diff=lfs merge=lfs -text +android/passiolib-release/passiolib-release.aar filter=lfs diff=lfs merge=lfs -text +ios/Frameworks/PassioSDKiOS.xcframework/ios-arm64/PassioSDKiOS.framework/Assets.car filter=lfs diff=lfs merge=lfs -text +ios/Frameworks/PassioSDKiOS.xcframework/ios-arm64_x86_64-simulator/PassioSDKiOS.framework/Assets.car filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..658d7de --- /dev/null +++ b/.gitignore @@ -0,0 +1,63 @@ +# OSX +# +.DS_Store + +# XDE +.expo/ + +# VSCode +.vscode/ +jsconfig.json + +# 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 +android.iml + +# Cocoapods +# +example/ios/Pods + +# node.js +# +node_modules/ +npm-debug.log +yarn-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +android/app/libs +android/keystores/debug.keystore + +# Expo +.expo/* + +# generated by bob +lib/ +main.jsbundle +*.bundle +example/android/app/release diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 0000000..fedc0f1 --- /dev/null +++ b/.yarnrc @@ -0,0 +1,3 @@ +# Override Yarn command so we can automatically setup the repo on running `yarn` + +yarn-path "scripts/bootstrap.js" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..9fcd349 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,184 @@ +# Contributing + +We want this community to be friendly and respectful to each other. Please follow it in all your interactions with the project. + +## Development workflow + +To get started with the project, run `yarn` in the root directory to install the required dependencies for each package: + +```sh +yarn +``` + +While developing, you can run the [example app](/example/) to test your changes. + +To start the packager: + +```sh +yarn example start +``` + +To run the example app on Android: + +```sh +yarn example android +``` + +To run the example app on iOS: + +```sh +yarn example ios +``` + +Make sure your code passes TypeScript and ESLint. Run the following to verify: + +```sh +yarn typescript +yarn lint +``` + +To fix formatting errors, run the following: + +```sh +yarn lint --fix +``` + +Remember to add tests for your change if possible. Run the unit tests by: + +```sh +yarn test +``` + +To edit the Objective-C files, open `example/ios/PassioSdkExample.xcworkspace` in XCode and find the source files at `Pods > Development Pods > react-native-passio-sdk`. + +To edit the Kotlin files, open `example/android` in Android studio and find the source files at `reactnativepassiosdk` under `Android`. + +### Commit message convention + +We follow the [conventional commits specification](https://www.conventionalcommits.org/en) for our commit messages: + +- `fix`: bug fixes, e.g. fix crash due to deprecated method. +- `feat`: new features, e.g. add new method to the module. +- `refactor`: code refactor, e.g. migrate from class components to hooks. +- `docs`: changes into documentation, e.g. add usage example for the module.. +- `test`: adding or updating tests, e.g. add integration tests using detox. +- `chore`: tooling changes, e.g. change CI config. + +Our pre-commit hooks verify that your commit message matches this format when committing. + +### Linting and tests + +[ESLint](https://eslint.org/), [Prettier](https://prettier.io/), [TypeScript](https://www.typescriptlang.org/) + +We use [TypeScript](https://www.typescriptlang.org/) for type checking, [ESLint](https://eslint.org/) with [Prettier](https://prettier.io/) for linting and formatting the code, and [Jest](https://jestjs.io/) for testing. + +Our pre-commit hooks verify that the linter and tests pass when committing. + +### Scripts + +The `package.json` file contains various scripts for common tasks: + +- `yarn bootstrap`: setup project by installing all dependencies and pods. +- `yarn typescript`: type-check files with TypeScript. +- `yarn lint`: lint files with ESLint. +- `yarn test`: run unit tests with Jest. +- `yarn example start`: start the Metro server for the example app. +- `yarn example android`: run the example app on Android. +- `yarn example ios`: run the example app on iOS. + +### Sending a pull request + +> **Working on your first pull request?** You can learn how from this _free_ series: [How to Contribute to an Open Source Project on GitHub](https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github). + +When you're sending a pull request: + +- Prefer small pull requests focused on one change. +- Verify that linters and tests are passing. +- Review the documentation to make sure it looks good. +- Follow the pull request template when opening a pull request. +- For pull requests that change the API or implementation, discuss with maintainers first by opening an issue. + +## Code of Conduct + +### Our Pledge + +We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community. + +### Our Standards + +Examples of behavior that contributes to a positive environment for our community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or + advances of any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email + address, without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. + +### Scope + +This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at [INSERT CONTACT METHOD]. All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the reporter of any incident. + +### Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct: + +#### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested. + +#### 2. Warning + +**Community Impact**: A violation through a single incident or series of actions. + +**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban. + +#### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban. + +#### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the community. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, +available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. + +Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity). + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see the FAQ at +https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations. diff --git a/README.md b/README.md new file mode 100644 index 0000000..f00d8c6 --- /dev/null +++ b/README.md @@ -0,0 +1,152 @@ +# React Native Passio SDK + +This project provides React Native bindings for the Passio SDK. It also includes the RN Quickstart application which serves as a test harness for the SDK. + +## Requirements + +- React Native v0.60.0 or higher +- Xcode 13 or higher +- iOS 13 or higher (the SDK will build against iOS 11 or higher but features are limited to >= iOS 13) +- Android API level 26 or higher +- Cocoapods 1.10.1 or higher + +Please note that the SDK will currently not run in the iOS simulator. We hope to change this in the future, but an iOS test device is required for now. + + +## Testing the SDK with Example App + +1. run `yarn` in the root of the project (not the example folder). +2. `cd example/ios/` and run `pod install` +3. Add your license key into the key section of LoadingContainerView.tsx. The key should be in single quotes: `'yourkey'`. +4. `open ReactNativeQuickstart.xcworkspace/` to open up Xcode & build the app in Xcode +5. Run `yarn start` in the example folder to start the metro server +6. Run on your physical device. The app will not run in a simulator. + +7. To run on Android, exit out of the iOS work and stop the metro server (CNTR-C) +8. In example folder `run yarn android` +9. In a separate terminal open example/android/ and run `open -a /Applications/Android\ Studio.app .` +10. Run Gradle Sync before building on your Android device + +## Installation + +1. Create an `.npmrc` file in the root of your project with the following lines, replacing `GITHUB_ACCESS_TOKEN` with the token provided to you by Passio. This grants you access to the SDK's private listing on Github Package Registry. + +``` +//npm.pkg.github.com/:_authToken=GITHUB_ACCESS_TOKEN +@passiolife:registry=https://npm.pkg.github.com +``` + +2. Install the package using npm install @passiolife/nutritionai-react-native-sdk-v2 or yarn add @passiolife/nutritionai-react-native-sdk-v2 + +3. Ensure the native dependencies are linked to your app. + +For Android, add below dependencies into build.gradle file. + +```bash +implementation files("$rootDir/../node_modules/@passiolife/nutritionai-react-native-sdk-v2/android/libs/passiolib-release.aar") +``` + +For iOS, run pod install. + +```bash +cd ios; pod install +``` + +For Android, auto-linking should handle setting up the Gradle dependency for your project. + +## Usage + +1. Enter a value for `NSCameraUsageDescription` in your Info.plist so the camera may be utilized. + +2. Import the SDK + +```js +import { + PassioSDK, + DetectionCameraView, +} from '@passiolife/nutritionai-react-native-sdk-v2'; +``` + +3. To show the live camera preview, add the DetectionCameraView to your view + +```js +// Somewhere in your component (inside of a flex container) + + +``` + +4. When your component mounts, configure the SDK using your Passio provided developer key and start food detection. + +```js +// In your component + +const [isReady, setIsReady] = useState(false); + +// Effect to configure the SDK and request camera permission +// We are adding our developer key in LoadingContainerView +useEffect(() => { + Promise.all([ + PassioSDK.configure({ + key: 'your-developer-key', + autoUpdate: true, + }), + PassioSDK.requestCameraAuthorization(), + ]).then(([sdkStatus, cameraAuthorized]) => { + console.log( + `SDK configured: ${sdkStatus.mode} Camera authorized: ${cameraAuthorized}` + ); + setIsReady(sdkStatus.mode === 'isReadyForDetection' && cameraAuthorized); + }); +}, []); + +// Once the SDK is ready, start food detection +useEffect(() => { + if (!isReady) { + return; + } + const config: FoodDetectionConfig = { + detectBarcodes: true, + detectPackagedFood: true, + detectNutritionFacts: true, + }; + const subscription = PassioSDK.startFoodDetection( + config, + async (detection: FoodDetectionEvent) => { + console.log('Got food detection event: ', detection); + + const { candidates, nutritionFacts } = detection; + + if (candidates?.barcodeCandidates?.length) { + // show barcode candidates to the user + } else if (candidates?.packagedFoodCode?.length) { + // show package food code candidates to the user + } else if (candidates?.detectedCandidates?.length) { + // show visually recognized candidates to the user + } else if (nutritionFacts) { + // Show scanned nutrition facts to the user + } + } + ); + + // stop food detection when component unmounts + return () => subscription.remove(); +}, [isReady]); +``` + +## Known Issues / Workarounds + +If your project does not currently contain any Swift, you might get an undefined symbol errors for the Swift standard library when adding the Passio SDK. Since the Passio SDK is a Swift framework, your app needs to link against the Swift standard library. You can accomplish this by [adding a single Swift file to your project](https://stackoverflow.com/questions/57903395/about-100-error-in-xcode-undefined-symbols-for-architecture-x86-64-upgraded-re). + +Because the Passio SDK is a Swift framework and depends on `React-Core`, we need a modular header for this dependency. If you get an error regarding a missing module header for `React-Core`, update your Podfile to produce one: + +```ruby +pod 'React-Core', :path => '../node_modules/react-native/', :modular_headers => true +``` + +## Steps to Publish: + +https://github.com/Passiolife/React-Native-Passio-SDK-Internal/wiki/Steps-To-Publish-RN-SDK + +## Notes + +With XCFramework, we do not need to maintain multiple SDKs for different version of XCode. diff --git a/ReactNativePassioSDK.podspec b/ReactNativePassioSDK.podspec new file mode 100644 index 0000000..8db4d9d --- /dev/null +++ b/ReactNativePassioSDK.podspec @@ -0,0 +1,24 @@ +require "json" + +package = JSON.parse(File.read(File.join(__dir__, "package.json"))) + +Pod::Spec.new do |s| + s.name = "ReactNativePassioSDK" + s.version = package["version"] + s.summary = package["description"] + s.homepage = package["homepage"] + s.license = package["license"] + s.authors = package["author"] + + s.platforms = { :ios => "13.0" } + s.ios.deployment_target = '13.0' + s.source = { :git => "https://www.passiolife.com/.git", :tag => "#{s.version}" } + + + s.source_files = "ios/*.{h,m,mm,swift}" + s.public_header_files = 'ios/*.h' + + s.swift_version = "5" + s.dependency "React-Core" + s.vendored_frameworks = 'ios/Frameworks/PassioNutritionAISDK.xcframework' +end diff --git a/android/.project b/android/.project new file mode 100644 index 0000000..0e0a1ba --- /dev/null +++ b/android/.project @@ -0,0 +1,17 @@ + + + android_ + Project android_ created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/android/.settings/org.eclipse.buildship.core.prefs b/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..8c253d6 --- /dev/null +++ b/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(VERSION(6.0)) +connection.project.dir= +eclipse.preferences.version=1 +gradle.user.home= +java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home +jvm.arguments= +offline.mode=false +override.workspace.settings=true +show.console.view=true +show.executions.view=true diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..df3ce69 --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,152 @@ +buildscript { + // Buildscript is evaluated before everything else so we can't use getExtOrDefault + def kotlin_version = rootProject.ext.has('kotlinVersion') ? rootProject.ext.get('kotlinVersion') : project.properties['PassioSdk_kotlinVersion'] + + repositories { + google() + jcenter() + } + + dependencies { + classpath 'com.android.tools.build:gradle:4.2.1' + // noinspection DifferentKotlinGradleVersion + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +apply plugin: 'com.android.library' +apply plugin: 'kotlin-android' + +def getExtOrDefault(name) { + return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties['PassioSdk_' + name] +} + +def getExtOrIntegerDefault(name) { + return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties['PassioSdk_' + name]).toInteger() +} + +android { + compileSdkVersion getExtOrIntegerDefault('compileSdkVersion') + buildToolsVersion getExtOrDefault('buildToolsVersion') + defaultConfig { + minSdkVersion 21 + targetSdkVersion getExtOrIntegerDefault('targetSdkVersion') + versionCode 1 + versionName "1.0" + + } + + buildTypes { + release { + minifyEnabled false + } + } + lintOptions { + disable 'GradleCompatible' + } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } +} + +repositories { + mavenCentral() + jcenter() + google() + + def found = false + def defaultDir = null + def androidSourcesName = 'React Native sources' + + if (rootProject.ext.has('reactNativeAndroidRoot')) { + defaultDir = rootProject.ext.get('reactNativeAndroidRoot') + } else { + defaultDir = new File( + projectDir, + '/../../../node_modules/react-native/android' + ) + } + + if (defaultDir.exists()) { + maven { + url defaultDir.toString() + name androidSourcesName + } + + logger.info(":${project.name}:reactNativeAndroidRoot ${defaultDir.canonicalPath}") + found = true + } else { + def parentDir = rootProject.projectDir + + 1.upto(5, { + if (found) return true + parentDir = parentDir.parentFile + + def androidSourcesDir = new File( + parentDir, + 'node_modules/react-native' + ) + + def androidPrebuiltBinaryDir = new File( + parentDir, + 'node_modules/react-native/android' + ) + + if (androidPrebuiltBinaryDir.exists()) { + maven { + url androidPrebuiltBinaryDir.toString() + name androidSourcesName + } + + logger.info(":${project.name}:reactNativeAndroidRoot ${androidPrebuiltBinaryDir.canonicalPath}") + found = true + } else if (androidSourcesDir.exists()) { + maven { + url androidSourcesDir.toString() + name androidSourcesName + } + + logger.info(":${project.name}:reactNativeAndroidRoot ${androidSourcesDir.canonicalPath}") + found = true + } + }) + } + + if (!found) { + throw new GradleException( + "${project.name}: unable to locate React Native android sources. " + + "Ensure you have you installed React Native as a dependency in your project and try again." + ) + } +} + +def kotlin_version = getExtOrDefault('kotlinVersion') + +dependencies { + // noinspection GradleDynamicVersion + api 'com.facebook.react:react-native:+' + implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + + // TensorFlow + implementation 'org.tensorflow:tensorflow-lite:2.8.0' + + // CameraX + def camerax_version = "1.0.0-beta12" + implementation "androidx.camera:camera-core:$camerax_version" + implementation "androidx.camera:camera-camera2:$camerax_version" + implementation "androidx.camera:camera-lifecycle:$camerax_version" + api "androidx.camera:camera-view:1.0.0-alpha19" + implementation "androidx.camera:camera-extensions:1.0.0-alpha16" + + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + + // Barcode and OCR + implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.0' + implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0' + implementation 'org.tensorflow:tensorflow-lite-metadata:0.4.0' + + + // Passio SDK + compileOnly files("libs/passiolib-release.aar") +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..dc8a59f --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,5 @@ +PassioSdk_kotlinVersion=1.6.0 +PassioSdk_compileSdkVersion=29 +PassioSdk_buildToolsVersion=29.0.2 +PassioSdk_targetSdkVersion=29 +android.useAndroidX=true diff --git a/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..f6b961f Binary files /dev/null and b/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..5004f81 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Thu Jul 15 10:10:08 CDT 2021 +distributionBase=GRADLE_USER_HOME +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip +distributionPath=wrapper/dists +zipStorePath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME diff --git a/android/gradlew b/android/gradlew new file mode 100644 index 0000000..cccdd3d --- /dev/null +++ b/android/gradlew @@ -0,0 +1,172 @@ +#!/usr/bin/env sh + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# 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 + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +# 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 +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +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" -a "$nonstop" = "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 + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi + +exec "$JAVACMD" "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 0000000..f955316 --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,84 @@ +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@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= + +@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 Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_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=%* + +: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/android/libs/passiolib-release.aar b/android/libs/passiolib-release.aar new file mode 100644 index 0000000..a9e2b1c --- /dev/null +++ b/android/libs/passiolib-release.aar @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:740d2fee1dd980f8241ce57e094130807499a34f5dc315eb15fd8ddcbddd3565 +size 2037143 diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..e69de29 diff --git a/android/src/main/AndroidManifest.xml b/android/src/main/AndroidManifest.xml new file mode 100644 index 0000000..326183e --- /dev/null +++ b/android/src/main/AndroidManifest.xml @@ -0,0 +1,4 @@ + + + diff --git a/android/src/main/java/com/reactnativepassiosdk/BridgeUtils.kt b/android/src/main/java/com/reactnativepassiosdk/BridgeUtils.kt new file mode 100644 index 0000000..2e0912e --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/BridgeUtils.kt @@ -0,0 +1,269 @@ +package com.reactnativepassiosdk + +import ai.passio.passiosdk.passiofood.BarcodeCandidate +import ai.passio.passiosdk.passiofood.DetectedCandidate +import ai.passio.passiosdk.passiofood.FoodCandidates +import ai.passio.passiosdk.passiofood.PassioID +import ai.passio.passiosdk.passiofood.data.measurement.UnitEnergy +import ai.passio.passiosdk.passiofood.data.measurement.UnitMass +import ai.passio.passiosdk.passiofood.data.model.* +import ai.passio.passiosdk.passiofood.nutritionfacts.PassioNutritionFacts +import android.graphics.RectF +import com.facebook.react.bridge.* + + +fun bridgeFoodCandidates(candidates: FoodCandidates): ReadableMap { + val map = WritableNativeMap() + if (candidates.detectedCandidates != null) { + val detectedCandidates = WritableNativeArray() + for (candidate in candidates.detectedCandidates!!) { + detectedCandidates.pushMap(bridgeDetectedCandidate(candidate)) + } + map.putArray("detectedCandidates", detectedCandidates) + } + if (candidates.barcodeCandidates != null) { + val barcodeCandidates = WritableNativeArray() + for (candidate in candidates.barcodeCandidates!!) { + barcodeCandidates.pushMap(bridgeBarcodeCandidate(candidate)) + } + map.putArray("barcodeCandidates", barcodeCandidates) + } + if (candidates.packagedFoodCandidates != null) { + val packagedFoodCode = WritableNativeArray() + for (ocrCode in candidates.packagedFoodCandidates!!) { + packagedFoodCode.pushString(ocrCode.packagedFoodCode) + } + map.putArray("packagedFoodCode", packagedFoodCode) + } + return map +} + +fun bridgeDetectedCandidate(candidate: DetectedCandidate): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", candidate.passioID) + map.putDouble("confidence", candidate.confidence.toDouble()) + map.putMap("boundingBox", bridgeBoundingBox(candidate.boundingBox)) + return map +} + +fun bridgeBarcodeCandidate(candidate: BarcodeCandidate): ReadableMap { + val map = WritableNativeMap() + map.putString("barcode", candidate.barcode) + map.putMap("boundingBox", bridgeBoundingBox(candidate.boundingBox)) + return map +} + +fun bridgePassioAttributes(attributes: PassioIDAttributes): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", attributes.passioID) + map.putString("name", attributes.name) + map.putString("entityType", attributes.entityType.value) + val parents = attributes.parents?.mapBridged(::bridgeAlternative) ?: WritableNativeArray() + map.putArray("parents", parents) + val children = attributes.children?.mapBridged(::bridgeAlternative) ?: WritableNativeArray() + map.putArray("children", children) + val siblings = attributes.siblings?.mapBridged(::bridgeAlternative) ?: WritableNativeArray() + map.putArray("siblings", siblings) + val foodItem = mapNullable(attributes.passioFoodItemData, ::bridgeFoodItem) + map.putIfNotNull("foodItem", foodItem) + val recipe = mapNullable(attributes.passioFoodRecipe, ::bridgeRecipe) + map.putIfNotNull("recipe", recipe) + map.putBoolean("isOpenFood", attributes.isOpenFood()) + return map +} + +fun bridgeFoodItem(foodItem: PassioFoodItemData): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", foodItem.passioID) + map.putString("name", foodItem.name) + map.putDouble("selectedQuantity", foodItem.selectedQuantity) + map.putString("selectedUnit", foodItem.selectedUnit) + map.putString("entityType", foodItem.entityType.value) + map.putArray("servingUnits", foodItem.servingUnits.mapBridged(::bridgeServingUnits)) + map.putArray("servingSizes", foodItem.servingSizes.mapBridged(::bridgeServingSize)) + map.putMap("computedWeight", bridgeUnitMass(foodItem.computedWeight())) + val parents = + mapNullable(foodItem.parents, { parents -> parents.mapBridged(::bridgeAlternative) }) + map.putIfNotNull("parents", parents) + val siblings = + mapNullable(foodItem.siblings, { siblings -> siblings.mapBridged(::bridgeAlternative) }) + map.putIfNotNull("siblings", siblings) + val children = + mapNullable(foodItem.children, { children -> children.mapBridged(::bridgeAlternative) }) + map.putIfNotNull("children", children) + map.putMap("calories", bridgeUnitEnergy(foodItem.totalCalories())) + map.putMap("carbs", bridgeUnitMass(foodItem.totalCarbs())) + map.putMap("fat", bridgeUnitMass(foodItem.totalFat())) + map.putMap("protein", bridgeUnitMass(foodItem.totalProtein())) + map.putMap("saturatedFat", bridgeUnitMass(foodItem.totalSatFat())) + map.putMap("transFat", bridgeUnitMass(foodItem.totalTransFat())) + map.putMap("monounsaturatedFat", bridgeUnitMass(foodItem.totalMonounsaturatedFat())) + map.putMap("polyunsaturatedFat", bridgeUnitMass(foodItem.totalPolyunsaturatedFat())) + map.putMap("cholesterol", bridgeUnitMass(foodItem.totalCholesterol())) + map.putMap("sodium", bridgeUnitMass(foodItem.totalSodium())) + map.putMap("fiber", bridgeUnitMass(foodItem.totalFibers())) + map.putMap("sugar", bridgeUnitMass(foodItem.totalSugars())) + map.putMap("sugarAdded", bridgeUnitMass(foodItem.totalSugarsAdded())) + map.putMap("vitaminD", bridgeUnitMass(foodItem.totalVitaminD())) + map.putMap("calcium", bridgeUnitMass(foodItem.totalCalcium())) + map.putMap("iron", bridgeUnitMass(foodItem.totalIron())) + map.putMap("potassium", bridgeUnitMass(foodItem.totalPotassium())) + map.putMap("vitaminC", bridgeUnitMass(foodItem.totalVitaminC())) + map.putMap("alcohol", bridgeUnitMass(foodItem.totalAlcohol())) + map.putMap("sugarAlcohol", bridgeUnitMass(foodItem.totalSugarAlcohol())) + map.putMap("vitaminB12", bridgeUnitMass(foodItem.totalVitaminB12())) + map.putMap("vitaminB12Added", bridgeUnitMass(foodItem.totalVitaminB12Added())) + map.putMap("vitaminB6", bridgeUnitMass(foodItem.totalVitaminB6())) + map.putMap("vitaminE", bridgeUnitMass(foodItem.totalVitaminE())) + map.putMap("vitaminEAdded", bridgeUnitMass(foodItem.totalVitaminEAdded())) + map.putMap("magnesium", bridgeUnitMass(foodItem.totalMagnesium())) + map.putMap("phosphorus", bridgeUnitMass(foodItem.totalPhosphorus())) + map.putMap("iodine", bridgeUnitMass(foodItem.totalIodine())) + map.putMap("vitaminA", bridgeMeasurementIU(foodItem.totalVitaminA())) + map.putIfNotNull("ingredientsDescription", foodItem.ingredientsDescription) + map.putIfNotNull("barcode", foodItem.barcode) + return map +} + +fun bridgeRecipe(recipe: PassioFoodRecipe): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", recipe.passioID) + map.putString("name", recipe.name) + map.putArray("servingSizes", recipe.servingSizes.mapBridged(::bridgeServingSize)) + map.putArray("servingUnits", recipe.servingUnits.mapBridged(::bridgeServingUnits)) + map.putDouble("selectedQuantity", recipe.selectedQuantity) + map.putString("selectedUnit", recipe.selectedUnit) + map.putArray("foodItems", recipe.foodItems.mapBridged(::bridgeFoodItem)) + return map +} + +fun bridgeBoundingBox(box: RectF): ReadableMap { + val map = WritableNativeMap() + map.putDouble("x", box.left.toDouble()) + map.putDouble("y", box.top.toDouble()) + val width = box.right - box.left + val height = box.bottom - box.top + map.putDouble("width", width.toDouble()) + map.putDouble("height", height.toDouble()) + return map +} + +fun bridgeAlternative(alternative: PassioAlternative): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", alternative.passioID) + map.putString("name", alternative.name) + map.putIfNotNull("unitName", alternative.unit) + map.putIfNotNull("quantity", alternative.number) + return map +} + +fun bridgeServingSize(servingSize: PassioServingSize): ReadableMap { + val map = WritableNativeMap() + map.putDouble("quantity", servingSize.quantity) + map.putString("unitName", servingSize.unitName) + return map +} + +fun bridgeServingUnits(servingUnit: PassioServingUnit): ReadableMap { + val map = WritableNativeMap() + map.putString("unitName", servingUnit.unitName) + map.putDouble("value", servingUnit.weight.value) + return map +} + +fun bridgeUnitMass(unitMass: UnitMass): ReadableMap{ + val map = WritableNativeMap() + map.putString("unit", unitMass.unit.symbol) + map.putDouble("value", unitMass.value) + return map +} + +fun bridgeMeasurementIU(value: Double): ReadableMap { + val map = WritableNativeMap() + map.putString("unit", "IU") + map.putDouble("value", value) + return map +} + +fun bridgeUnitEnergy(unitMass: UnitEnergy): ReadableMap { + val map = WritableNativeMap() + map.putString("unit", unitMass.unit.symbol) + map.putDouble("value", unitMass.value) + return map +} + +fun bridgeNutritionFacts(nutritionFacts: PassioNutritionFacts): ReadableMap { + val map = WritableNativeMap() + map.putIfNotNull("servingSizeQuantity", nutritionFacts.servingSizeQuantity) + map.putIfNotNull("servingSizeUnit", nutritionFacts.servingSize) + map.putIfNotNull("servingSizeUnitName", nutritionFacts.servingSizeUnitName) + map.putIfNotNull("calories", nutritionFacts.calories) + map.putIfNotNull("fat", nutritionFacts.fat) + map.putIfNotNull("carbs", nutritionFacts.carbs) + map.putIfNotNull("protein", nutritionFacts.protein) + return map +} + +fun bridgeSearchResult(result: Pair): ReadableMap { + val map = WritableNativeMap() + map.putString("passioID", result.first) + map.putString("name", result.second) + return map +} + +fun WritableMap.putIfNotNull(key: String, value: String?) { + if (value != null) { + putString(key, value) + } +} + +fun WritableMap.putIfNotNull(key: String, value: Double?) { + if (value != null) { + putDouble(key, value) + } +} + +fun WritableMap.putIfNotNull(key: String, value: ReadableMap?) { + if (value != null) { + putMap(key, value) + } +} + +fun WritableMap.putIfNotNull(key: String, value: ReadableArray?) { + if (value != null) { + putArray(key, value) + } +} + +fun List.mapBridged(fn: (T) -> ReadableMap): ReadableArray { + val array = WritableNativeArray() + for (item in this) { + val mapped = fn(item) + array.pushMap(mapped) + } + return array +} + +fun List.mapToStringArray(): ReadableArray { + val array = WritableNativeArray() + for (item in this) { + array.pushString(item) + } + return array +} + +fun mapNullable(value: T?, fn: (T) -> U): U? { + if (value != null) { + return fn(value) + } + return null +} + +fun mapStringArray(array: ReadableArray, map: (String) -> T): List { + val mapped = ArrayList() + for (i in 0 until array.size()) { + val str = array.getString(i) + mapped.add(map(str)) + } + return mapped +} diff --git a/android/src/main/java/com/reactnativepassiosdk/DetectionCameraView.kt b/android/src/main/java/com/reactnativepassiosdk/DetectionCameraView.kt new file mode 100644 index 0000000..5e58af1 --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/DetectionCameraView.kt @@ -0,0 +1,91 @@ +package com.reactnativepassiosdk + +import ai.passio.passiosdk.core.camera.PassioCameraViewProvider +import ai.passio.passiosdk.passiofood.PassioSDK +import android.annotation.SuppressLint +import android.content.Context +import android.widget.FrameLayout +import androidx.camera.view.PreviewView +import androidx.lifecycle.* +import com.facebook.react.common.LifecycleState + + +@SuppressLint("ViewConstructor") +class DetectionCameraView(context: Context, private val lifecycleOwner: LifecycleOwner): FrameLayout(context), LifecycleOwner, LifecycleObserver, PassioCameraViewProvider { + + private val previewView: PreviewView = PreviewView(context) + + private val registry = LifecycleRegistry(this) + + init { + previewView.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT) + addView(previewView) + PassioSDK.instance.startCamera(this) + lifecycleOwner.lifecycle.addObserver(this) + } + + private fun resumeCamera() { + registry.currentState = Lifecycle.State.RESUMED + } + + private fun stopCamera() { + registry.currentState = Lifecycle.State.CREATED + } + + override fun onAttachedToWindow() { + super.onAttachedToWindow() + resumeCamera() + } + + override fun onDetachedFromWindow() { + super.onDetachedFromWindow() + stopCamera() + } + + @OnLifecycleEvent(Lifecycle.Event.ON_CREATE) + fun onParentLifecycleCreate() { + resumeCamera() + } + + @OnLifecycleEvent(Lifecycle.Event.ON_RESUME) + fun onParentLifecycleResume() { + resumeCamera() + } + + @OnLifecycleEvent(Lifecycle.Event.ON_STOP) + fun onParentLifecycleStopped() { + stopCamera() + } + + @OnLifecycleEvent(Lifecycle.Event.ON_DESTROY) + fun onParentLifecycleDestroyed() { + stopCamera() + } + + override fun requestLayout() { + super.requestLayout() + post(measureAndLayout) + } + + private val measureAndLayout: Runnable = Runnable { + measure(MeasureSpec.makeMeasureSpec(width, MeasureSpec.EXACTLY), + MeasureSpec.makeMeasureSpec(height, MeasureSpec.EXACTLY)) + layout(left, top, right, bottom) + } + + override fun getLifecycle(): Lifecycle { + return registry + } + + override fun requestPreviewView(): PreviewView { + return previewView + } + + override fun requestCameraLifecycleOwner(): LifecycleOwner { + return this + } + + protected fun finalize() { + stopCamera() + } +} diff --git a/android/src/main/java/com/reactnativepassiosdk/DetectionCameraViewManager.kt b/android/src/main/java/com/reactnativepassiosdk/DetectionCameraViewManager.kt new file mode 100644 index 0000000..c1a969c --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/DetectionCameraViewManager.kt @@ -0,0 +1,15 @@ +package com.reactnativepassiosdk + +import androidx.appcompat.app.AppCompatActivity +import com.facebook.react.uimanager.SimpleViewManager +import com.facebook.react.uimanager.ThemedReactContext + +class DetectionCameraViewManager: SimpleViewManager() { + + override fun getName() = "DetectionCameraView" + + override fun createViewInstance(reactContext: ThemedReactContext): DetectionCameraView { + val activity = reactContext.currentActivity as AppCompatActivity + return DetectionCameraView(reactContext, activity) + } +} diff --git a/android/src/main/java/com/reactnativepassiosdk/PassioIconView.kt b/android/src/main/java/com/reactnativepassiosdk/PassioIconView.kt new file mode 100644 index 0000000..39806d5 --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/PassioIconView.kt @@ -0,0 +1,51 @@ +package com.reactnativepassiosdk + +import ai.passio.passiosdk.core.icons.IconSize +import ai.passio.passiosdk.passiofood.PassioID +import ai.passio.passiosdk.passiofood.PassioSDK +import ai.passio.passiosdk.passiofood.data.model.PassioIDEntityType +import android.content.Context +import android.util.Log +import android.widget.FrameLayout +import android.widget.ImageView +import java.io.IOException + + +class PassioIconView(context: Context) : FrameLayout(context) { + + + private val imageView: ImageView = ImageView(context) + + init { + imageView.layoutParams = LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT) + addView(imageView) + } + + fun loadView( + passioID: PassioID, + passioIDEntityType: PassioIDEntityType, + iconSize: IconSize + ) { + try { + val result = PassioSDK.instance.lookupIconFor( + context = context, + passioID = passioID, + iconSize = iconSize, + type = passioIDEntityType + ) + imageView.setImageDrawable(result.first) + if (!result.second) { + PassioSDK.instance.fetchIconFor(context = context, + iconSize = iconSize, + passioID = passioID, callback = { + if (it != null) { + imageView.setImageDrawable(it) + } + }) + } + } catch (ex: IOException) { + Log.e("PassioIconView", "Unable to load Passio image $passioID. Exception: $ex") + } + } + +} diff --git a/android/src/main/java/com/reactnativepassiosdk/PassioIconViewManager.kt b/android/src/main/java/com/reactnativepassiosdk/PassioIconViewManager.kt new file mode 100644 index 0000000..0910ca5 --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/PassioIconViewManager.kt @@ -0,0 +1,51 @@ +package com.reactnativepassiosdk + +import ai.passio.passiosdk.core.icons.IconSize +import ai.passio.passiosdk.passiofood.PassioID +import ai.passio.passiosdk.passiofood.data.model.PassioIDEntityType +import android.util.Log +import com.facebook.react.bridge.ReadableMap +import com.facebook.react.bridge.ReadableNativeMap +import com.facebook.react.uimanager.SimpleViewManager +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.react.uimanager.annotations.ReactProp +import org.json.JSONObject + +class PassioIconViewManager : SimpleViewManager() { + + override fun getName() = "PassioIconView" + private var passioID: PassioID? = null + private var iconSize: String? = null + private var passioIDEntityType: String? = null + + override fun createViewInstance(reactContext: ThemedReactContext): PassioIconView { + return PassioIconView(reactContext) + } + + @ReactProp(name = "config") + public fun setConfig( + view: PassioIconView, + config: ReadableMap, + ) { + this.passioID = config.getString("passioID") + this.iconSize = config.getString("iconSize") + this.passioIDEntityType = config.getString("passioIDEntityType") + loadView(view) + } + + private fun loadView(view: PassioIconView) { + if (passioID != null && iconSize != null && passioIDEntityType != null) { + if (BuildConfig.DEBUG){ + Log.d("PassioIconView", "trying to load image for $passioID") + } + view.loadView( + passioID!!, + iconSize = IconSize.valueOf(iconSize!!), + passioIDEntityType = PassioIDEntityType.fromString( + passioIDEntityType!! + ) + ) + } + } + +} diff --git a/android/src/main/java/com/reactnativepassiosdk/PassioSDKBridge.kt b/android/src/main/java/com/reactnativepassiosdk/PassioSDKBridge.kt new file mode 100644 index 0000000..1b9c07c --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/PassioSDKBridge.kt @@ -0,0 +1,208 @@ +package com.reactnativepassiosdk + +import ai.passio.passiosdk.core.config.PassioConfiguration +import ai.passio.passiosdk.core.config.PassioMode +import ai.passio.passiosdk.core.config.PassioStatus +import ai.passio.passiosdk.passiofood.* +import ai.passio.passiosdk.passiofood.data.model.PassioIDAttributes +import ai.passio.passiosdk.passiofood.data.model.PassioIDEntityType +import ai.passio.passiosdk.passiofood.nutritionfacts.PassioNutritionFacts +import ai.passio.passiosdk.passiofood.upc.UPCProduct +import android.graphics.Bitmap +import android.net.Uri +import android.os.Handler +import android.os.Looper +import com.facebook.react.bridge.* +import com.facebook.react.modules.core.DeviceEventManagerModule + +class PassioSDKBridge(reactContext: ReactApplicationContext) : + ReactContextBaseJavaModule(reactContext), FoodRecognitionListener { + + override fun getName() = "PassioSDKBridge" + + private val mainHandler = Handler(Looper.getMainLooper()) + + @ReactMethod + fun configure( + key: String, + debugMode: Int, + autoUpdate: Boolean, + localModelURLs: ReadableArray?, + promise: Promise + ) { + mainHandler.post { + val config = PassioConfiguration(reactApplicationContext, key).apply { + if (localModelURLs != null) { + this.localFiles = mapStringArray(localModelURLs) { str -> + var uriStr = str + if (!uriStr.startsWith("file://")) { + uriStr = "file://$uriStr" + } + Uri.parse(uriStr) + } + } else { + localFiles = listOf() + } + this.debugMode = debugMode + this.sdkDownloadsModels = autoUpdate + } + PassioSDK.instance.setPassioStatusListener(object : PassioStatusListener { + override fun onCompletedDownloadingAllFiles(fileUris: List) { + } + + override fun onCompletedDownloadingFile(fileUri: Uri, filesLeft: Int) { + val map = WritableNativeMap() + map.putInt("filesLeft", filesLeft); + sendCompletedDownloadingFileEvent(map); + } + + override fun onDownloadError(message: String) { + val map = WritableNativeMap() + map.putString("message", message) + sendDownloadingErrorEvent(map); + } + + override fun onPassioStatusChanged(status: PassioStatus) { + when (status.mode) { + PassioMode.IS_DOWNLOADING_MODELS -> print("PassioSDK: auto update configured, downloading models...") + PassioMode.IS_BEING_CONFIGURED -> {} + PassioMode.IS_READY_FOR_DETECTION -> { + val map = WritableNativeMap() + map.putString("mode", "isReadyForDetection") + map.putInt("activeModels", status.activeModels ?: 0) + map.putArray("missingFiles", (status.missingFiles ?: listOf()).mapToStringArray()) + promise.resolve(map) + } + PassioMode.NOT_READY -> { + val map = WritableNativeMap() + map.putString("mode", "notReady") + map.putArray("missingFiles", (status.missingFiles ?: listOf()).mapToStringArray()) + promise.resolve(map) + } + PassioMode.FAILED_TO_CONFIGURE -> { + val error = status.error + val errorMessage = if (error != null) { + reactApplicationContext.resources.getString(error.errorRes) + } else { + "unknown" + } + val map = WritableNativeMap() + map.putString("mode", "error") + map.putString("errorMessage", errorMessage) + promise.resolve(map) + } + } + } + }) + PassioSDK.instance.configure(config) { } + } + } + + @ReactMethod + fun startFoodDetection( + detectBarcodes: Boolean, + detectPackagedFood: Boolean, + detectNutritionFacts: Boolean + ) { + mainHandler.post { + val config = FoodDetectionConfiguration( + detectBarcodes = detectBarcodes, + detectVisual = true, + detectNutritionFacts = detectNutritionFacts, + detectPackagedFood = detectPackagedFood + ) + // The function will return false if the registration of the ```foodRecognitionListener``` failed. + PassioSDK.instance.startFoodDetection(this, config) + } + } + + @ReactMethod + fun stopFoodDetection() { + // The function will return false if the unregistration of the current ```foodRecognitionListener``` failed. + PassioSDK.instance.stopFoodDetection() + + } + + @ReactMethod + fun getAttributesForPassioID(passioID: String, promise: Promise) { + val attributes = + PassioSDK.instance.lookupPassioAttributesFor(passioID) ?: return promise.resolve(null) + val map = bridgePassioAttributes(attributes) + promise.resolve(map) + } + + @ReactMethod + fun fetchAttributesForBarcode(barcode: String, promise: Promise) { + PassioSDK.instance.fetchPassioIDAttributesForBarcode(barcode) { attributes -> + val mapped = mapNullable(attributes, ::bridgePassioAttributes) + promise.resolve(mapped) + } + } + + @ReactMethod + fun fetchPassioIDAttributesForPackagedFood(packagedFoodCode: String, promise: Promise) { + PassioSDK.instance.fetchPassioIDAttributesForPackagedFood(packagedFoodCode) { attributes -> + val mapped = mapNullable(attributes, ::bridgePassioAttributes) + promise.resolve(mapped) + } + } + + @ReactMethod + fun searchForFood(searchQuery: String, promise: Promise) { + PassioSDK.instance.searchForFood(byText = searchQuery, callback = { results -> + val array = WritableNativeArray() + for (item in results) { + array.pushMap(bridgeSearchResult(result = item)) + } + promise.resolve(array) + }) + } + + @ReactMethod + fun convertUPCProductToAttributes(productJSON: String, type: String, promise: Promise) { + try { + val product = UPCProduct(productJSON) + val entityType = PassioIDEntityType.fromString(type) + val attributes = PassioIDAttributes(product, entityType) + val bridged = bridgePassioAttributes(attributes) + promise.resolve(bridged) + } catch (err: Throwable) { + promise.reject(err) + } + } + + override fun onRecognitionResults( + candidates: FoodCandidates, + image: Bitmap?, + nutritionFacts: PassioNutritionFacts? + ) { + + val event = WritableNativeMap() + + event.putMap("candidates", bridgeFoodCandidates(candidates)) + + if (nutritionFacts != null) { + event.putMap("nutritionFacts", bridgeNutritionFacts(nutritionFacts)) + } + + sendDetectionEvent(event) + } + + private fun sendDetectionEvent(args: ReadableMap) { + val emitter = + reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java) + emitter.emit("onFoodDetection", args) + } + + private fun sendCompletedDownloadingFileEvent(args: ReadableMap) { + val emitter = + reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java) + emitter.emit("completedDownloadingFile", args) + } + + private fun sendDownloadingErrorEvent(args: ReadableMap) { + val emitter = + reactApplicationContext.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java) + emitter.emit("downloadingError", args) + } +} diff --git a/android/src/main/java/com/reactnativepassiosdk/ReactNativePassioSDK.kt b/android/src/main/java/com/reactnativepassiosdk/ReactNativePassioSDK.kt new file mode 100644 index 0000000..d0a6f32 --- /dev/null +++ b/android/src/main/java/com/reactnativepassiosdk/ReactNativePassioSDK.kt @@ -0,0 +1,17 @@ +package com.reactnativepassiosdk + +import com.facebook.react.ReactPackage +import com.facebook.react.bridge.NativeModule +import com.facebook.react.bridge.ReactApplicationContext +import com.facebook.react.uimanager.ViewManager + + +class ReactNativePassioSDK : ReactPackage { + override fun createNativeModules(reactContext: ReactApplicationContext): List { + return listOf(PassioSDKBridge(reactContext)) + } + + override fun createViewManagers(reactContext: ReactApplicationContext): List> { + return listOf(DetectionCameraViewManager(), PassioIconViewManager()) + } +} diff --git a/babel.config.js b/babel.config.js new file mode 100644 index 0000000..cf1f9fb --- /dev/null +++ b/babel.config.js @@ -0,0 +1,3 @@ +module.exports = { + presets: ['module:metro-react-native-babel-preset'], +} diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e2ac661 --- /dev/null +++ b/docs/.nojekyll @@ -0,0 +1 @@ +TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false. \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css new file mode 100644 index 0000000..af09085 --- /dev/null +++ b/docs/assets/highlight.css @@ -0,0 +1,113 @@ +:root { + --light-hl-0: #008000; + --dark-hl-0: #6A9955; + --light-hl-1: #000000; + --dark-hl-1: #D4D4D4; + --light-hl-2: #001080; + --dark-hl-2: #9CDCFE; + --light-hl-3: #A31515; + --dark-hl-3: #CE9178; + --light-hl-4: #795E26; + --dark-hl-4: #DCDCAA; + --light-hl-5: #AF00DB; + --dark-hl-5: #C586C0; + --light-hl-6: #800000; + --dark-hl-6: #808080; + --light-hl-7: #267F99; + --dark-hl-7: #4EC9B0; + --light-hl-8: #FF0000; + --dark-hl-8: #9CDCFE; + --light-hl-9: #0000FF; + --dark-hl-9: #569CD6; + --light-hl-10: #000000FF; + --dark-hl-10: #D4D4D4; + --light-hl-11: #098658; + --dark-hl-11: #B5CEA8; + --light-hl-12: #0070C1; + --dark-hl-12: #4FC1FF; + --light-code-background: #F5F5F5; + --dark-code-background: #1E1E1E; +} + +@media (prefers-color-scheme: light) { :root { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} } + +@media (prefers-color-scheme: dark) { :root { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} } + +body.light { + --hl-0: var(--light-hl-0); + --hl-1: var(--light-hl-1); + --hl-2: var(--light-hl-2); + --hl-3: var(--light-hl-3); + --hl-4: var(--light-hl-4); + --hl-5: var(--light-hl-5); + --hl-6: var(--light-hl-6); + --hl-7: var(--light-hl-7); + --hl-8: var(--light-hl-8); + --hl-9: var(--light-hl-9); + --hl-10: var(--light-hl-10); + --hl-11: var(--light-hl-11); + --hl-12: var(--light-hl-12); + --code-background: var(--light-code-background); +} + +body.dark { + --hl-0: var(--dark-hl-0); + --hl-1: var(--dark-hl-1); + --hl-2: var(--dark-hl-2); + --hl-3: var(--dark-hl-3); + --hl-4: var(--dark-hl-4); + --hl-5: var(--dark-hl-5); + --hl-6: var(--dark-hl-6); + --hl-7: var(--dark-hl-7); + --hl-8: var(--dark-hl-8); + --hl-9: var(--dark-hl-9); + --hl-10: var(--dark-hl-10); + --hl-11: var(--dark-hl-11); + --hl-12: var(--dark-hl-12); + --code-background: var(--dark-code-background); +} + +.hl-0 { color: var(--hl-0); } +.hl-1 { color: var(--hl-1); } +.hl-2 { color: var(--hl-2); } +.hl-3 { color: var(--hl-3); } +.hl-4 { color: var(--hl-4); } +.hl-5 { color: var(--hl-5); } +.hl-6 { color: var(--hl-6); } +.hl-7 { color: var(--hl-7); } +.hl-8 { color: var(--hl-8); } +.hl-9 { color: var(--hl-9); } +.hl-10 { color: var(--hl-10); } +.hl-11 { color: var(--hl-11); } +.hl-12 { color: var(--hl-12); } +pre, code { background: var(--code-background); } diff --git a/docs/assets/icons.css b/docs/assets/icons.css new file mode 100644 index 0000000..776a356 --- /dev/null +++ b/docs/assets/icons.css @@ -0,0 +1,1043 @@ +.tsd-kind-icon { + display: block; + position: relative; + padding-left: 20px; + text-indent: -20px; +} +.tsd-kind-icon:before { + content: ""; + display: inline-block; + vertical-align: middle; + width: 17px; + height: 17px; + margin: 0 3px 2px 0; + background-image: url(./icons.png); +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { + .tsd-kind-icon:before { + background-image: url(./icons@2x.png); + background-size: 238px 204px; + } +} + +.tsd-signature.tsd-kind-icon:before { + background-position: 0 -153px; +} + +.tsd-kind-object-literal > .tsd-kind-icon:before { + background-position: 0px -17px; +} +.tsd-kind-object-literal.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -17px; +} +.tsd-kind-object-literal.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -17px; +} + +.tsd-kind-class > .tsd-kind-icon:before { + background-position: 0px -34px; +} +.tsd-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -34px; +} +.tsd-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -34px; +} + +.tsd-kind-class.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -51px; +} +.tsd-kind-class.tsd-has-type-parameter.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -17px -51px; +} +.tsd-kind-class.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -51px; +} + +.tsd-kind-interface > .tsd-kind-icon:before { + background-position: 0px -68px; +} +.tsd-kind-interface.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -68px; +} +.tsd-kind-interface.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -68px; +} + +.tsd-kind-interface.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -85px; +} +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -17px -85px; +} +.tsd-kind-interface.tsd-has-type-parameter.tsd-is-private + > .tsd-kind-icon:before { + background-position: -34px -85px; +} + +.tsd-kind-namespace > .tsd-kind-icon:before { + background-position: 0px -102px; +} +.tsd-kind-namespace.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -102px; +} +.tsd-kind-namespace.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -102px; +} + +.tsd-kind-module > .tsd-kind-icon:before { + background-position: 0px -102px; +} +.tsd-kind-module.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -102px; +} +.tsd-kind-module.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -102px; +} + +.tsd-kind-enum > .tsd-kind-icon:before { + background-position: 0px -119px; +} +.tsd-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -119px; +} +.tsd-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -119px; +} + +.tsd-kind-enum-member > .tsd-kind-icon:before { + background-position: 0px -136px; +} +.tsd-kind-enum-member.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -136px; +} +.tsd-kind-enum-member.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -136px; +} + +.tsd-kind-signature > .tsd-kind-icon:before { + background-position: 0px -153px; +} +.tsd-kind-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -153px; +} +.tsd-kind-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -153px; +} + +.tsd-kind-type-alias > .tsd-kind-icon:before { + background-position: 0px -170px; +} +.tsd-kind-type-alias.tsd-is-protected > .tsd-kind-icon:before { + background-position: -17px -170px; +} +.tsd-kind-type-alias.tsd-is-private > .tsd-kind-icon:before { + background-position: -34px -170px; +} + +.tsd-kind-type-alias.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: 0px -187px; +} +.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -17px -187px; +} +.tsd-kind-type-alias.tsd-has-type-parameter.tsd-is-private + > .tsd-kind-icon:before { + background-position: -34px -187px; +} + +.tsd-kind-variable > .tsd-kind-icon:before { + background-position: -136px -0px; +} +.tsd-kind-variable.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -0px; +} +.tsd-kind-variable.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-variable.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -0px; +} +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -0px; +} +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -0px; +} +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -0px; +} +.tsd-kind-variable.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-variable.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -0px; +} +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -0px; +} +.tsd-kind-variable.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-variable.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -0px; +} +.tsd-kind-variable.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -0px; +} + +.tsd-kind-property > .tsd-kind-icon:before { + background-position: -136px -0px; +} +.tsd-kind-property.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -0px; +} +.tsd-kind-property.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-property.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -0px; +} +.tsd-kind-property.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -0px; +} +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -0px; +} +.tsd-kind-property.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -0px; +} +.tsd-kind-property.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-property.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -0px; +} +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -0px; +} +.tsd-kind-property.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -0px; +} +.tsd-kind-property.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -0px; +} +.tsd-kind-property.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -0px; +} + +.tsd-kind-get-signature > .tsd-kind-icon:before { + background-position: -136px -17px; +} +.tsd-kind-get-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -17px; +} +.tsd-kind-get-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -17px; +} +.tsd-kind-get-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -17px; +} + +.tsd-kind-set-signature > .tsd-kind-icon:before { + background-position: -136px -34px; +} +.tsd-kind-set-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -34px; +} +.tsd-kind-set-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -34px; +} +.tsd-kind-set-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -34px; +} + +.tsd-kind-accessor > .tsd-kind-icon:before { + background-position: -136px -51px; +} +.tsd-kind-accessor.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -51px; +} +.tsd-kind-accessor.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -51px; +} +.tsd-kind-accessor.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -51px; +} + +.tsd-kind-function > .tsd-kind-icon:before { + background-position: -136px -68px; +} +.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; +} +.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; +} +.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -68px; +} +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -68px; +} +.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -68px; +} +.tsd-kind-function.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; +} +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -68px; +} +.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-function.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; +} +.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -68px; +} + +.tsd-kind-method > .tsd-kind-icon:before { + background-position: -136px -68px; +} +.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; +} +.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; +} +.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -68px; +} +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -68px; +} +.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -68px; +} +.tsd-kind-method.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; +} +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -68px; +} +.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-method.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; +} +.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -68px; +} + +.tsd-kind-call-signature > .tsd-kind-icon:before { + background-position: -136px -68px; +} +.tsd-kind-call-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -68px; +} +.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -68px; +} +.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -68px; +} + +.tsd-kind-function.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: -136px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -153px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class + > .tsd-kind-icon:before { + background-position: -51px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum + > .tsd-kind-icon:before { + background-position: -170px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -85px; +} +.tsd-kind-function.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -85px; +} + +.tsd-kind-method.tsd-has-type-parameter > .tsd-kind-icon:before { + background-position: -136px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -153px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class + > .tsd-kind-icon:before { + background-position: -51px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum + > .tsd-kind-icon:before { + background-position: -170px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -85px; +} +.tsd-kind-method.tsd-has-type-parameter.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -85px; +} + +.tsd-kind-constructor > .tsd-kind-icon:before { + background-position: -136px -102px; +} +.tsd-kind-constructor.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -102px; +} +.tsd-kind-constructor.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -102px; +} +.tsd-kind-constructor.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -102px; +} + +.tsd-kind-constructor-signature > .tsd-kind-icon:before { + background-position: -136px -102px; +} +.tsd-kind-constructor-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -102px; +} +.tsd-kind-constructor-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -102px; +} +.tsd-kind-constructor-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -102px; +} + +.tsd-kind-index-signature > .tsd-kind-icon:before { + background-position: -136px -119px; +} +.tsd-kind-index-signature.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -119px; +} +.tsd-kind-index-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -119px; +} +.tsd-kind-index-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -119px; +} + +.tsd-kind-event > .tsd-kind-icon:before { + background-position: -136px -136px; +} +.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -136px; +} +.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; +} +.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -136px; +} +.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -136px; +} +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -136px; +} +.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -136px; +} +.tsd-kind-event.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; +} +.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -136px; +} +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -136px; +} +.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -136px; +} +.tsd-kind-event.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -136px; +} +.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -136px; +} + +.tsd-is-static > .tsd-kind-icon:before { + background-position: -136px -153px; +} +.tsd-is-static.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -153px; +} +.tsd-is-static.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; +} +.tsd-is-static.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -153px; +} +.tsd-is-static.tsd-parent-kind-class.tsd-is-inherited > .tsd-kind-icon:before { + background-position: -68px -153px; +} +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected > .tsd-kind-icon:before { + background-position: -85px -153px; +} +.tsd-is-static.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -153px; +} +.tsd-is-static.tsd-parent-kind-class.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; +} +.tsd-is-static.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -153px; +} +.tsd-is-static.tsd-parent-kind-enum.tsd-is-protected > .tsd-kind-icon:before { + background-position: -187px -153px; +} +.tsd-is-static.tsd-parent-kind-enum.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -153px; +} +.tsd-is-static.tsd-parent-kind-interface > .tsd-kind-icon:before { + background-position: -204px -153px; +} +.tsd-is-static.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -153px; +} + +.tsd-is-static.tsd-kind-function > .tsd-kind-icon:before { + background-position: -136px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -170px; +} +.tsd-is-static.tsd-kind-function.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -170px; +} + +.tsd-is-static.tsd-kind-method > .tsd-kind-icon:before { + background-position: -136px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -170px; +} +.tsd-is-static.tsd-kind-method.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -170px; +} + +.tsd-is-static.tsd-kind-call-signature > .tsd-kind-icon:before { + background-position: -136px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -153px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class + > .tsd-kind-icon:before { + background-position: -51px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum + > .tsd-kind-icon:before { + background-position: -170px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -170px; +} +.tsd-is-static.tsd-kind-call-signature.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -170px; +} + +.tsd-is-static.tsd-kind-event > .tsd-kind-icon:before { + background-position: -136px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-is-protected > .tsd-kind-icon:before { + background-position: -153px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-is-private > .tsd-kind-icon:before { + background-position: -119px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class > .tsd-kind-icon:before { + background-position: -51px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -68px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -85px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-protected.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -102px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-class.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum > .tsd-kind-icon:before { + background-position: -170px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-protected + > .tsd-kind-icon:before { + background-position: -187px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-enum.tsd-is-private + > .tsd-kind-icon:before { + background-position: -119px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface + > .tsd-kind-icon:before { + background-position: -204px -187px; +} +.tsd-is-static.tsd-kind-event.tsd-parent-kind-interface.tsd-is-inherited + > .tsd-kind-icon:before { + background-position: -221px -187px; +} diff --git a/docs/assets/icons.png b/docs/assets/icons.png new file mode 100644 index 0000000..3836d5f Binary files /dev/null and b/docs/assets/icons.png differ diff --git a/docs/assets/icons@2x.png b/docs/assets/icons@2x.png new file mode 100644 index 0000000..5a209e2 Binary files /dev/null and b/docs/assets/icons@2x.png differ diff --git a/docs/assets/main.js b/docs/assets/main.js new file mode 100644 index 0000000..2fcc5a5 --- /dev/null +++ b/docs/assets/main.js @@ -0,0 +1,54 @@ +/* eslint-disable eslint-comments/no-unlimited-disable */ +/* eslint-disable */ +(()=>{var Ce=Object.create;var ue=Object.defineProperty;var Pe=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var Re=Object.getPrototypeOf,_e=Object.prototype.hasOwnProperty;var Me=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var De=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Oe(e))!_e.call(t,i)&&i!==r&&ue(t,i,{get:()=>e[i],enumerable:!(n=Pe(e,i))||n.enumerable});return t};var Fe=(t,e,r)=>(r=t!=null?Ce(Re(t)):{},De(e||!t||!t.__esModule?ue(r,"default",{value:t,enumerable:!0}):r,t));var pe=Me((de,fe)=>{(function(){var t=function(e){var r=new t.Builder;return r.pipeline.add(t.trimmer,t.stopWordFilter,t.stemmer),r.searchPipeline.add(t.stemmer),e.call(r,r),r.build()};t.version="2.3.9";t.utils={},t.utils.warn=function(e){return function(r){e.console&&console.warn&&console.warn(r)}}(this),t.utils.asString=function(e){return e==null?"":e.toString()},t.utils.clone=function(e){if(e==null)return e;for(var r=Object.create(null),n=Object.keys(e),i=0;i0){var h=t.utils.clone(r)||{};h.position=[a,l],h.index=s.length,s.push(new t.Token(n.slice(a,o),h))}a=o+1}}return s},t.tokenizer.separator=/[\s\-]+/;t.Pipeline=function(){this._stack=[]},t.Pipeline.registeredFunctions=Object.create(null),t.Pipeline.registerFunction=function(e,r){r in this.registeredFunctions&&t.utils.warn("Overwriting existing registered function: "+r),e.label=r,t.Pipeline.registeredFunctions[e.label]=e},t.Pipeline.warnIfFunctionNotRegistered=function(e){var r=e.label&&e.label in this.registeredFunctions;r||t.utils.warn(`Function is not registered with pipeline. This may cause problems when serialising the index. +`,e)},t.Pipeline.load=function(e){var r=new t.Pipeline;return e.forEach(function(n){var i=t.Pipeline.registeredFunctions[n];if(i)r.add(i);else throw new Error("Cannot load unregistered function: "+n)}),r},t.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach(function(r){t.Pipeline.warnIfFunctionNotRegistered(r),this._stack.push(r)},this)},t.Pipeline.prototype.after=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");n=n+1,this._stack.splice(n,0,r)},t.Pipeline.prototype.before=function(e,r){t.Pipeline.warnIfFunctionNotRegistered(r);var n=this._stack.indexOf(e);if(n==-1)throw new Error("Cannot find existingFn");this._stack.splice(n,0,r)},t.Pipeline.prototype.remove=function(e){var r=this._stack.indexOf(e);r!=-1&&this._stack.splice(r,1)},t.Pipeline.prototype.run=function(e){for(var r=this._stack.length,n=0;n1&&(oe&&(n=s),o!=e);)i=n-r,s=r+Math.floor(i/2),o=this.elements[s*2];if(o==e||o>e)return s*2;if(ou?h+=2:a==u&&(r+=n[l+1]*i[h+1],l+=2,h+=2);return r},t.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},t.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),r=1,n=0;r0){var o=s.str.charAt(0),a;o in s.node.edges?a=s.node.edges[o]:(a=new t.TokenSet,s.node.edges[o]=a),s.str.length==1&&(a.final=!0),i.push({node:a,editsRemaining:s.editsRemaining,str:s.str.slice(1)})}if(s.editsRemaining!=0){if("*"in s.node.edges)var u=s.node.edges["*"];else{var u=new t.TokenSet;s.node.edges["*"]=u}if(s.str.length==0&&(u.final=!0),i.push({node:u,editsRemaining:s.editsRemaining-1,str:s.str}),s.str.length>1&&i.push({node:s.node,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)}),s.str.length==1&&(s.node.final=!0),s.str.length>=1){if("*"in s.node.edges)var l=s.node.edges["*"];else{var l=new t.TokenSet;s.node.edges["*"]=l}s.str.length==1&&(l.final=!0),i.push({node:l,editsRemaining:s.editsRemaining-1,str:s.str.slice(1)})}if(s.str.length>1){var h=s.str.charAt(0),p=s.str.charAt(1),v;p in s.node.edges?v=s.node.edges[p]:(v=new t.TokenSet,s.node.edges[p]=v),s.str.length==1&&(v.final=!0),i.push({node:v,editsRemaining:s.editsRemaining-1,str:h+s.str.slice(2)})}}}return n},t.TokenSet.fromString=function(e){for(var r=new t.TokenSet,n=r,i=0,s=e.length;i=e;r--){var n=this.uncheckedNodes[r],i=n.child.toString();i in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[i]:(n.child._str=i,this.minimizedNodes[i]=n.child),this.uncheckedNodes.pop()}};t.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},t.Index.prototype.search=function(e){return this.query(function(r){var n=new t.QueryParser(e,r);n.parse()})},t.Index.prototype.query=function(e){for(var r=new t.Query(this.fields),n=Object.create(null),i=Object.create(null),s=Object.create(null),o=Object.create(null),a=Object.create(null),u=0;u1?this._b=1:this._b=e},t.Builder.prototype.k1=function(e){this._k1=e},t.Builder.prototype.add=function(e,r){var n=e[this._ref],i=Object.keys(this._fields);this._documents[n]=r||{},this.documentCount+=1;for(var s=0;s=this.length)return t.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},t.QueryLexer.prototype.width=function(){return this.pos-this.start},t.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},t.QueryLexer.prototype.backup=function(){this.pos-=1},t.QueryLexer.prototype.acceptDigitRun=function(){var e,r;do e=this.next(),r=e.charCodeAt(0);while(r>47&&r<58);e!=t.QueryLexer.EOS&&this.backup()},t.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(t.QueryLexer.TERM)),e.ignore(),e.more())return t.QueryLexer.lexText},t.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.EDIT_DISTANCE),t.QueryLexer.lexText},t.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(t.QueryLexer.BOOST),t.QueryLexer.lexText},t.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(t.QueryLexer.TERM)},t.QueryLexer.termSeparator=t.tokenizer.separator,t.QueryLexer.lexText=function(e){for(;;){var r=e.next();if(r==t.QueryLexer.EOS)return t.QueryLexer.lexEOS;if(r.charCodeAt(0)==92){e.escapeCharacter();continue}if(r==":")return t.QueryLexer.lexField;if(r=="~")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexEditDistance;if(r=="^")return e.backup(),e.width()>0&&e.emit(t.QueryLexer.TERM),t.QueryLexer.lexBoost;if(r=="+"&&e.width()===1||r=="-"&&e.width()===1)return e.emit(t.QueryLexer.PRESENCE),t.QueryLexer.lexText;if(r.match(t.QueryLexer.termSeparator))return t.QueryLexer.lexTerm}},t.QueryParser=function(e,r){this.lexer=new t.QueryLexer(e),this.query=r,this.currentClause={},this.lexemeIdx=0},t.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=t.QueryParser.parseClause;e;)e=e(this);return this.query},t.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},t.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},t.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},t.QueryParser.parseClause=function(e){var r=e.peekLexeme();if(r!=null)switch(r.type){case t.QueryLexer.PRESENCE:return t.QueryParser.parsePresence;case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+r.type;throw r.str.length>=1&&(n+=" with value '"+r.str+"'"),new t.QueryParseError(n,r.start,r.end)}},t.QueryParser.parsePresence=function(e){var r=e.consumeLexeme();if(r!=null){switch(r.str){case"-":e.currentClause.presence=t.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=t.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+r.str+"'";throw new t.QueryParseError(n,r.start,r.end)}var i=e.peekLexeme();if(i==null){var n="expecting term or field, found nothing";throw new t.QueryParseError(n,r.start,r.end)}switch(i.type){case t.QueryLexer.FIELD:return t.QueryParser.parseField;case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var n="expecting term or field, found '"+i.type+"'";throw new t.QueryParseError(n,i.start,i.end)}}},t.QueryParser.parseField=function(e){var r=e.consumeLexeme();if(r!=null){if(e.query.allFields.indexOf(r.str)==-1){var n=e.query.allFields.map(function(o){return"'"+o+"'"}).join(", "),i="unrecognised field '"+r.str+"', possible fields: "+n;throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.fields=[r.str];var s=e.peekLexeme();if(s==null){var i="expecting term, found nothing";throw new t.QueryParseError(i,r.start,r.end)}switch(s.type){case t.QueryLexer.TERM:return t.QueryParser.parseTerm;default:var i="expecting term, found '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseTerm=function(e){var r=e.consumeLexeme();if(r!=null){e.currentClause.term=r.str.toLowerCase(),r.str.indexOf("*")!=-1&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(n==null){e.nextClause();return}switch(n.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+n.type+"'";throw new t.QueryParseError(i,n.start,n.end)}}},t.QueryParser.parseEditDistance=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="edit distance must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.editDistance=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},t.QueryParser.parseBoost=function(e){var r=e.consumeLexeme();if(r!=null){var n=parseInt(r.str,10);if(isNaN(n)){var i="boost must be numeric";throw new t.QueryParseError(i,r.start,r.end)}e.currentClause.boost=n;var s=e.peekLexeme();if(s==null){e.nextClause();return}switch(s.type){case t.QueryLexer.TERM:return e.nextClause(),t.QueryParser.parseTerm;case t.QueryLexer.FIELD:return e.nextClause(),t.QueryParser.parseField;case t.QueryLexer.EDIT_DISTANCE:return t.QueryParser.parseEditDistance;case t.QueryLexer.BOOST:return t.QueryParser.parseBoost;case t.QueryLexer.PRESENCE:return e.nextClause(),t.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+s.type+"'";throw new t.QueryParseError(i,s.start,s.end)}}},function(e,r){typeof define=="function"&&define.amd?define(r):typeof de=="object"?fe.exports=r():e.lunr=r()}(this,function(){return t})})()});var ce=[];function N(t,e){ce.push({selector:e,constructor:t})}var Y=class{constructor(){this.createComponents(document.body)}createComponents(e){ce.forEach(r=>{e.querySelectorAll(r.selector).forEach(n=>{n.dataset.hasInstance||(new r.constructor({el:n}),n.dataset.hasInstance=String(!0))})})}};var k=class{constructor(e){this.el=e.el}};var J=class{constructor(){this.listeners={}}addEventListener(e,r){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(r)}removeEventListener(e,r){if(!(e in this.listeners))return;let n=this.listeners[e];for(let i=0,s=n.length;i{let r=Date.now();return(...n)=>{r+e-Date.now()<0&&(t(...n),r=Date.now())}};var ie=class extends J{constructor(){super();this.scrollTop=0;this.lastY=0;this.width=0;this.height=0;this.showToolbar=!0;this.toolbar=document.querySelector(".tsd-page-toolbar"),this.secondaryNav=document.querySelector(".tsd-navigation.secondary"),window.addEventListener("scroll",ne(()=>this.onScroll(),10)),window.addEventListener("resize",ne(()=>this.onResize(),10)),this.onResize(),this.onScroll()}triggerResize(){let r=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(r)}onResize(){this.width=window.innerWidth||0,this.height=window.innerHeight||0;let r=new CustomEvent("resize",{detail:{width:this.width,height:this.height}});this.dispatchEvent(r)}onScroll(){this.scrollTop=window.scrollY||0;let r=new CustomEvent("scroll",{detail:{scrollTop:this.scrollTop}});this.dispatchEvent(r),this.hideShowToolbar()}hideShowToolbar(){var n;let r=this.showToolbar;this.showToolbar=this.lastY>=this.scrollTop||this.scrollTop<=0,r!==this.showToolbar&&(this.toolbar.classList.toggle("tsd-page-toolbar--hide"),(n=this.secondaryNav)==null||n.classList.toggle("tsd-navigation--toolbar-hide")),this.lastY=this.scrollTop}},Q=ie;Q.instance=new ie;var X=class extends k{constructor(r){super(r);this.anchors=[];this.index=-1;Q.instance.addEventListener("resize",()=>this.onResize()),Q.instance.addEventListener("scroll",n=>this.onScroll(n)),this.createAnchors()}createAnchors(){let r=window.location.href;r.indexOf("#")!=-1&&(r=r.substr(0,r.indexOf("#"))),this.el.querySelectorAll("a").forEach(n=>{let i=n.href;if(i.indexOf("#")==-1||i.substr(0,r.length)!=r)return;let s=i.substr(i.indexOf("#")+1),o=document.querySelector("a.tsd-anchor[name="+s+"]"),a=n.parentNode;!o||!a||this.anchors.push({link:a,anchor:o,position:0})}),this.onResize()}onResize(){let r;for(let i=0,s=this.anchors.length;ii.position-s.position);let n=new CustomEvent("scroll",{detail:{scrollTop:Q.instance.scrollTop}});this.onScroll(n)}onScroll(r){let n=r.detail.scrollTop+5,i=this.anchors,s=i.length-1,o=this.index;for(;o>-1&&i[o].position>n;)o-=1;for(;o-1&&this.anchors[this.index].link.classList.remove("focus"),this.index=o,this.index>-1&&this.anchors[this.index].link.classList.add("focus"))}};var he=(t,e=100)=>{let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>t(n),e)}};var ge=Fe(pe());function ye(){let t=document.getElementById("tsd-search");if(!t)return;let e=document.getElementById("search-script");t.classList.add("loading"),e&&(e.addEventListener("error",()=>{t.classList.remove("loading"),t.classList.add("failure")}),e.addEventListener("load",()=>{t.classList.remove("loading"),t.classList.add("ready")}),window.searchData&&t.classList.remove("loading"));let r=document.querySelector("#tsd-search input"),n=document.querySelector("#tsd-search .results");if(!r||!n)throw new Error("The input field or the result list wrapper was not found");let i=!1;n.addEventListener("mousedown",()=>i=!0),n.addEventListener("mouseup",()=>{i=!1,t.classList.remove("has-focus")}),r.addEventListener("focus",()=>t.classList.add("has-focus")),r.addEventListener("blur",()=>{i||(i=!1,t.classList.remove("has-focus"))});let s={base:t.dataset.base+"/"};Ae(t,n,r,s)}function Ae(t,e,r,n){r.addEventListener("input",he(()=>{He(t,e,r,n)},200));let i=!1;r.addEventListener("keydown",s=>{i=!0,s.key=="Enter"?ze(e,r):s.key=="Escape"?r.blur():s.key=="ArrowUp"?me(e,-1):s.key==="ArrowDown"?me(e,1):i=!1}),r.addEventListener("keypress",s=>{i&&s.preventDefault()}),document.body.addEventListener("keydown",s=>{s.altKey||s.ctrlKey||s.metaKey||!r.matches(":focus")&&s.key==="/"&&(r.focus(),s.preventDefault())})}function Ve(t,e){t.index||window.searchData&&(e.classList.remove("loading"),e.classList.add("ready"),t.data=window.searchData,t.index=ge.Index.load(window.searchData.index))}function He(t,e,r,n){if(Ve(n,t),!n.index||!n.data)return;e.textContent="";let i=r.value.trim(),s=i?n.index.search(`*${i}*`):[];for(let o=0,a=Math.min(10,s.length);o${ve(u.parent,i)}.${l}`);let h=document.createElement("li");h.classList.value=u.classes;let p=document.createElement("a");p.href=n.base+u.url,p.classList.add("tsd-kind-icon"),p.innerHTML=l,h.append(p),e.appendChild(h)}}function me(t,e){let r=t.querySelector(".current");if(!r)r=t.querySelector(e==1?"li:first-child":"li:last-child"),r&&r.classList.add("current");else{let n=r;if(e===1)do n=n.nextElementSibling;while(n instanceof HTMLElement&&n.offsetParent==null);else do n=n.previousElementSibling;while(n instanceof HTMLElement&&n.offsetParent==null);n&&(r.classList.remove("current"),n.classList.add("current"))}}function ze(t,e){let r=t.querySelector(".current");if(r||(r=t.querySelector("li:first-child")),r){let n=r.querySelector("a");n&&(window.location.href=n.href),e.blur()}}function ve(t,e){if(e==="")return t;let r=t.toLocaleLowerCase(),n=e.toLocaleLowerCase(),i=[],s=0,o=r.indexOf(n);for(;o!=-1;)i.push(se(t.substring(s,o)),`${se(t.substring(o,o+n.length))}`),s=o+n.length,o=r.indexOf(n,s);return i.push(se(t.substring(s))),i.join("")}var Ne={"&":"&","<":"<",">":">","'":"'",'"':"""};function se(t){return t.replace(/[&<>"'"]/g,e=>Ne[e])}var oe=class{constructor(e,r){this.signature=e,this.description=r}addClass(e){return this.signature.classList.add(e),this.description.classList.add(e),this}removeClass(e){return this.signature.classList.remove(e),this.description.classList.remove(e),this}},Z=class extends k{constructor(r){super(r);this.groups=[];this.index=-1;this.createGroups(),this.container&&(this.el.classList.add("active"),Array.from(this.el.children).forEach(n=>{n.addEventListener("touchstart",i=>this.onClick(i)),n.addEventListener("click",i=>this.onClick(i))}),this.container.classList.add("active"),this.setIndex(0))}setIndex(r){if(r<0&&(r=0),r>this.groups.length-1&&(r=this.groups.length-1),this.index==r)return;let n=this.groups[r];if(this.index>-1){let i=this.groups[this.index];i.removeClass("current").addClass("fade-out"),n.addClass("current"),n.addClass("fade-in"),Q.instance.triggerResize(),setTimeout(()=>{i.removeClass("fade-out"),n.removeClass("fade-in")},300)}else n.addClass("current"),Q.instance.triggerResize();this.index=r}createGroups(){let r=this.el.children;if(r.length<2)return;this.container=this.el.nextElementSibling;let n=this.container.children;this.groups=[];for(let i=0;i{n.signature===r.currentTarget&&this.setIndex(i)})}};var C="mousedown",Le="mousemove",_="mouseup",K={x:0,y:0},xe=!1,ae=!1,je=!1,A=!1,Ee=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);document.documentElement.classList.add(Ee?"is-mobile":"not-mobile");Ee&&"ontouchstart"in document.documentElement&&(je=!0,C="touchstart",Le="touchmove",_="touchend");document.addEventListener(C,t=>{ae=!0,A=!1;let e=C=="touchstart"?t.targetTouches[0]:t;K.y=e.pageY||0,K.x=e.pageX||0});document.addEventListener(Le,t=>{if(!!ae&&!A){let e=C=="touchstart"?t.targetTouches[0]:t,r=K.x-(e.pageX||0),n=K.y-(e.pageY||0);A=Math.sqrt(r*r+n*n)>10}});document.addEventListener(_,()=>{ae=!1});document.addEventListener("click",t=>{xe&&(t.preventDefault(),t.stopImmediatePropagation(),xe=!1)});var ee=class extends k{constructor(r){super(r);this.className=this.el.dataset.toggle||"",this.el.addEventListener(_,n=>this.onPointerUp(n)),this.el.addEventListener("click",n=>n.preventDefault()),document.addEventListener(C,n=>this.onDocumentPointerDown(n)),document.addEventListener(_,n=>this.onDocumentPointerUp(n))}setActive(r){if(this.active==r)return;this.active=r,document.documentElement.classList.toggle("has-"+this.className,r),this.el.classList.toggle("active",r);let n=(this.active?"to-has-":"from-has-")+this.className;document.documentElement.classList.add(n),setTimeout(()=>document.documentElement.classList.remove(n),500)}onPointerUp(r){A||(this.setActive(!0),r.preventDefault())}onDocumentPointerDown(r){if(this.active){if(r.target.closest(".col-menu, .tsd-filter-group"))return;this.setActive(!1)}}onDocumentPointerUp(r){if(!A&&this.active&&r.target.closest(".col-menu")){let n=r.target.closest("a");if(n){let i=window.location.href;i.indexOf("#")!=-1&&(i=i.substr(0,i.indexOf("#"))),n.href.substr(0,i.length)==i&&setTimeout(()=>this.setActive(!1),250)}}}};var te=class{constructor(e,r){this.key=e,this.value=r,this.defaultValue=r,this.initialize(),window.localStorage[this.key]&&this.setValue(this.fromLocalStorage(window.localStorage[this.key]))}initialize(){}setValue(e){if(this.value==e)return;let r=this.value;this.value=e,window.localStorage[this.key]=this.toLocalStorage(e),this.handleValueChange(r,e)}},re=class extends te{initialize(){let r=document.querySelector("#tsd-filter-"+this.key);!r||(this.checkbox=r,this.checkbox.addEventListener("change",()=>{this.setValue(this.checkbox.checked)}))}handleValueChange(r,n){!this.checkbox||(this.checkbox.checked=this.value,document.documentElement.classList.toggle("toggle-"+this.key,this.value!=this.defaultValue))}fromLocalStorage(r){return r=="true"}toLocalStorage(r){return r?"true":"false"}},le=class extends te{initialize(){document.documentElement.classList.add("toggle-"+this.key+this.value);let r=document.querySelector("#tsd-filter-"+this.key);if(!r)return;this.select=r;let n=()=>{this.select.classList.add("active")},i=()=>{this.select.classList.remove("active")};this.select.addEventListener(C,n),this.select.addEventListener("mouseover",n),this.select.addEventListener("mouseleave",i),this.select.querySelectorAll("li").forEach(s=>{s.addEventListener(_,o=>{r.classList.remove("active"),this.setValue(o.target.dataset.value||"")})}),document.addEventListener(C,s=>{this.select.contains(s.target)||this.select.classList.remove("active")})}handleValueChange(r,n){this.select.querySelectorAll("li.selected").forEach(o=>{o.classList.remove("selected")});let i=this.select.querySelector('li[data-value="'+n+'"]'),s=this.select.querySelector(".tsd-select-label");i&&s&&(i.classList.add("selected"),s.textContent=i.textContent),document.documentElement.classList.remove("toggle-"+r),document.documentElement.classList.add("toggle-"+n)}fromLocalStorage(r){return r}toLocalStorage(r){return r}},j=class extends k{constructor(r){super(r);this.optionVisibility=new le("visibility","private"),this.optionInherited=new re("inherited",!0),this.optionExternals=new re("externals",!0)}static isSupported(){try{return typeof window.localStorage!="undefined"}catch{return!1}}};function we(t){let e=localStorage.getItem("tsd-theme")||"os";t.value=e,be(e),t.addEventListener("change",()=>{localStorage.setItem("tsd-theme",t.value),be(t.value)})}function be(t){switch(t){case"os":document.body.classList.remove("light","dark");break;case"light":document.body.classList.remove("dark"),document.body.classList.add("light");break;case"dark":document.body.classList.remove("light"),document.body.classList.add("dark");break}}ye();N(X,".menu-highlight");N(Z,".tsd-signatures");N(ee,"a[data-toggle]");j.isSupported()?N(j,"#tsd-filter"):document.documentElement.classList.add("no-filter");var Te=document.getElementById("theme");Te&&we(Te);var Be=new Y;Object.defineProperty(window,"app",{value:Be});})(); +/*! + * lunr.Builder + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.Index + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.Pipeline + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.Set + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.TokenSet + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.Vector + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.stemmer + * Copyright (C) 2020 Oliver Nightingale + * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt + */ +/*! + * lunr.stopWordFilter + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.tokenizer + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.trimmer + * Copyright (C) 2020 Oliver Nightingale + */ +/*! + * lunr.utils + * Copyright (C) 2020 Oliver Nightingale + */ +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.9 + * Copyright (C) 2020 Oliver Nightingale + * @license MIT + */ diff --git a/docs/assets/search.js b/docs/assets/search.js new file mode 100644 index 0000000..a91bbc6 --- /dev/null +++ b/docs/assets/search.js @@ -0,0 +1,3 @@ +window.searchData = JSON.parse( + '{"kinds":{"8":"Enumeration","16":"Enumeration member","32":"Variable","256":"Interface","1024":"Property","2048":"Method","65536":"Type literal","4194304":"Type alias"},"rows":[{"id":0,"kind":256,"name":"PassioSDKInterface","url":"interfaces/PassioSDKInterface.html","classes":"tsd-kind-interface"},{"id":1,"kind":2048,"name":"configure","url":"interfaces/PassioSDKInterface.html#configure","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":2,"kind":2048,"name":"requestCameraAuthorization","url":"interfaces/PassioSDKInterface.html#requestCameraAuthorization","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":3,"kind":2048,"name":"startFoodDetection","url":"interfaces/PassioSDKInterface.html#startFoodDetection","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":4,"kind":2048,"name":"getAttributesForPassioID","url":"interfaces/PassioSDKInterface.html#getAttributesForPassioID","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":5,"kind":2048,"name":"getAttributesForName","url":"interfaces/PassioSDKInterface.html#getAttributesForName","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":6,"kind":2048,"name":"fetchAttributesForBarcode","url":"interfaces/PassioSDKInterface.html#fetchAttributesForBarcode","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":7,"kind":2048,"name":"fetchAttributesForOCR","url":"interfaces/PassioSDKInterface.html#fetchAttributesForOCR","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":8,"kind":2048,"name":"searchForFood","url":"interfaces/PassioSDKInterface.html#searchForFood","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":9,"kind":2048,"name":"convertUPCProductToAttributes","url":"interfaces/PassioSDKInterface.html#convertUPCProductToAttributes","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"PassioSDKInterface"},{"id":10,"kind":256,"name":"Subscription","url":"interfaces/Subscription.html","classes":"tsd-kind-interface"},{"id":11,"kind":2048,"name":"remove","url":"interfaces/Subscription.html#remove","classes":"tsd-kind-method tsd-parent-kind-interface","parent":"Subscription"},{"id":12,"kind":32,"name":"PassioSDK","url":"modules.html#PassioSDK","classes":"tsd-kind-variable"},{"id":13,"kind":32,"name":"DetectionCameraView","url":"modules.html#DetectionCameraView","classes":"tsd-kind-variable"},{"id":14,"kind":32,"name":"PassioIconView","url":"modules.html#PassioIconView","classes":"tsd-kind-variable"},{"id":15,"kind":4194304,"name":"Barcode","url":"modules.html#Barcode","classes":"tsd-kind-type-alias"},{"id":16,"kind":256,"name":"BarcodeCandidate","url":"interfaces/BarcodeCandidate.html","classes":"tsd-kind-interface"},{"id":17,"kind":1024,"name":"barcode","url":"interfaces/BarcodeCandidate.html#barcode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BarcodeCandidate"},{"id":18,"kind":1024,"name":"boundingBox","url":"interfaces/BarcodeCandidate.html#boundingBox","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BarcodeCandidate"},{"id":19,"kind":256,"name":"BoundingBox","url":"interfaces/BoundingBox.html","classes":"tsd-kind-interface"},{"id":20,"kind":1024,"name":"x","url":"interfaces/BoundingBox.html#x","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BoundingBox"},{"id":21,"kind":1024,"name":"y","url":"interfaces/BoundingBox.html#y","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BoundingBox"},{"id":22,"kind":1024,"name":"width","url":"interfaces/BoundingBox.html#width","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BoundingBox"},{"id":23,"kind":1024,"name":"height","url":"interfaces/BoundingBox.html#height","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"BoundingBox"},{"id":24,"kind":256,"name":"ClassificationCandidate","url":"interfaces/ClassificationCandidate.html","classes":"tsd-kind-interface"},{"id":25,"kind":1024,"name":"passioID","url":"interfaces/ClassificationCandidate.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ClassificationCandidate"},{"id":26,"kind":1024,"name":"confidence","url":"interfaces/ClassificationCandidate.html#confidence","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ClassificationCandidate"},{"id":27,"kind":256,"name":"ConfigurationOptions","url":"interfaces/ConfigurationOptions.html","classes":"tsd-kind-interface"},{"id":28,"kind":1024,"name":"key","url":"interfaces/ConfigurationOptions.html#key","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ConfigurationOptions"},{"id":29,"kind":1024,"name":"debugMode","url":"interfaces/ConfigurationOptions.html#debugMode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ConfigurationOptions"},{"id":30,"kind":1024,"name":"autoUpdate","url":"interfaces/ConfigurationOptions.html#autoUpdate","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ConfigurationOptions"},{"id":31,"kind":1024,"name":"localModelURLs","url":"interfaces/ConfigurationOptions.html#localModelURLs","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ConfigurationOptions"},{"id":32,"kind":4194304,"name":"BaseConfigurationOptions","url":"modules.html#BaseConfigurationOptions","classes":"tsd-kind-type-alias"},{"id":33,"kind":4194304,"name":"CustomModelsConfigurationOptions","url":"modules.html#CustomModelsConfigurationOptions","classes":"tsd-kind-type-alias"},{"id":34,"kind":256,"name":"DetectedCandidate","url":"interfaces/DetectedCandidate.html","classes":"tsd-kind-interface"},{"id":35,"kind":1024,"name":"passioID","url":"interfaces/DetectedCandidate.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DetectedCandidate"},{"id":36,"kind":1024,"name":"confidence","url":"interfaces/DetectedCandidate.html#confidence","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DetectedCandidate"},{"id":37,"kind":1024,"name":"boundingBox","url":"interfaces/DetectedCandidate.html#boundingBox","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"DetectedCandidate"},{"id":38,"kind":256,"name":"FoodCandidates","url":"interfaces/FoodCandidates.html","classes":"tsd-kind-interface"},{"id":39,"kind":1024,"name":"detectedCandidates","url":"interfaces/FoodCandidates.html#detectedCandidates","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodCandidates"},{"id":40,"kind":1024,"name":"logoCandidates","url":"interfaces/FoodCandidates.html#logoCandidates","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodCandidates"},{"id":41,"kind":1024,"name":"barcodeCandidates","url":"interfaces/FoodCandidates.html#barcodeCandidates","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodCandidates"},{"id":42,"kind":1024,"name":"ocrCandidates","url":"interfaces/FoodCandidates.html#ocrCandidates","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodCandidates"},{"id":43,"kind":256,"name":"FoodDetectionConfig","url":"interfaces/FoodDetectionConfig.html","classes":"tsd-kind-interface"},{"id":44,"kind":1024,"name":"detectOCR","url":"interfaces/FoodDetectionConfig.html#detectOCR","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodDetectionConfig"},{"id":45,"kind":1024,"name":"detectBarcodes","url":"interfaces/FoodDetectionConfig.html#detectBarcodes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodDetectionConfig"},{"id":46,"kind":1024,"name":"detectNutritionFacts","url":"interfaces/FoodDetectionConfig.html#detectNutritionFacts","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodDetectionConfig"},{"id":47,"kind":256,"name":"FoodDetectionEvent","url":"interfaces/FoodDetectionEvent.html","classes":"tsd-kind-interface"},{"id":48,"kind":1024,"name":"candidates","url":"interfaces/FoodDetectionEvent.html#candidates","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodDetectionEvent"},{"id":49,"kind":1024,"name":"nutritionFacts","url":"interfaces/FoodDetectionEvent.html#nutritionFacts","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"FoodDetectionEvent"},{"id":50,"kind":256,"name":"Measurement","url":"interfaces/Measurement.html","classes":"tsd-kind-interface"},{"id":51,"kind":1024,"name":"value","url":"interfaces/Measurement.html#value","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Measurement"},{"id":52,"kind":1024,"name":"unit","url":"interfaces/Measurement.html#unit","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"Measurement"},{"id":53,"kind":256,"name":"NutritionFacts","url":"interfaces/NutritionFacts.html","classes":"tsd-kind-interface"},{"id":54,"kind":1024,"name":"servingSizeQuantity","url":"interfaces/NutritionFacts.html#servingSizeQuantity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":55,"kind":1024,"name":"servingSizeUnitName","url":"interfaces/NutritionFacts.html#servingSizeUnitName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":56,"kind":1024,"name":"servingSizeGram","url":"interfaces/NutritionFacts.html#servingSizeGram","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":57,"kind":1024,"name":"servingSizeUnit","url":"interfaces/NutritionFacts.html#servingSizeUnit","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":58,"kind":1024,"name":"calories","url":"interfaces/NutritionFacts.html#calories","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":59,"kind":1024,"name":"fat","url":"interfaces/NutritionFacts.html#fat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":60,"kind":1024,"name":"carbs","url":"interfaces/NutritionFacts.html#carbs","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":61,"kind":1024,"name":"protein","url":"interfaces/NutritionFacts.html#protein","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"NutritionFacts"},{"id":62,"kind":256,"name":"ObjectDetectionCandidate","url":"interfaces/ObjectDetectionCandidate.html","classes":"tsd-kind-interface"},{"id":63,"kind":1024,"name":"boundingBox","url":"interfaces/ObjectDetectionCandidate.html#boundingBox","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ObjectDetectionCandidate"},{"id":64,"kind":1024,"name":"passioID","url":"interfaces/ObjectDetectionCandidate.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ObjectDetectionCandidate"},{"id":65,"kind":1024,"name":"confidence","url":"interfaces/ObjectDetectionCandidate.html#confidence","classes":"tsd-kind-property tsd-parent-kind-interface tsd-is-inherited","parent":"ObjectDetectionCandidate"},{"id":66,"kind":4194304,"name":"OCRCode","url":"modules.html#OCRCode","classes":"tsd-kind-type-alias"},{"id":67,"kind":256,"name":"PassioAlternative","url":"interfaces/PassioAlternative.html","classes":"tsd-kind-interface"},{"id":68,"kind":1024,"name":"passioID","url":"interfaces/PassioAlternative.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioAlternative"},{"id":69,"kind":1024,"name":"name","url":"interfaces/PassioAlternative.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioAlternative"},{"id":70,"kind":1024,"name":"quantity","url":"interfaces/PassioAlternative.html#quantity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioAlternative"},{"id":71,"kind":1024,"name":"unitName","url":"interfaces/PassioAlternative.html#unitName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioAlternative"},{"id":72,"kind":256,"name":"PassioFoodItem","url":"interfaces/PassioFoodItem.html","classes":"tsd-kind-interface"},{"id":73,"kind":1024,"name":"passioID","url":"interfaces/PassioFoodItem.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":74,"kind":1024,"name":"name","url":"interfaces/PassioFoodItem.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":75,"kind":1024,"name":"imageName","url":"interfaces/PassioFoodItem.html#imageName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":76,"kind":1024,"name":"selectedQuantity","url":"interfaces/PassioFoodItem.html#selectedQuantity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":77,"kind":1024,"name":"selectedUnit","url":"interfaces/PassioFoodItem.html#selectedUnit","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":78,"kind":1024,"name":"entityType","url":"interfaces/PassioFoodItem.html#entityType","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":79,"kind":1024,"name":"servingUnits","url":"interfaces/PassioFoodItem.html#servingUnits","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":80,"kind":1024,"name":"servingSizes","url":"interfaces/PassioFoodItem.html#servingSizes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":81,"kind":1024,"name":"computedWeight","url":"interfaces/PassioFoodItem.html#computedWeight","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":82,"kind":1024,"name":"parents","url":"interfaces/PassioFoodItem.html#parents","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":83,"kind":1024,"name":"children","url":"interfaces/PassioFoodItem.html#children","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":84,"kind":1024,"name":"siblings","url":"interfaces/PassioFoodItem.html#siblings","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":85,"kind":1024,"name":"calories","url":"interfaces/PassioFoodItem.html#calories","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":86,"kind":1024,"name":"carbs","url":"interfaces/PassioFoodItem.html#carbs","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":87,"kind":1024,"name":"fat","url":"interfaces/PassioFoodItem.html#fat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":88,"kind":1024,"name":"protein","url":"interfaces/PassioFoodItem.html#protein","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":89,"kind":1024,"name":"saturatedFat","url":"interfaces/PassioFoodItem.html#saturatedFat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":90,"kind":1024,"name":"transFat","url":"interfaces/PassioFoodItem.html#transFat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":91,"kind":1024,"name":"monounsaturatedFat","url":"interfaces/PassioFoodItem.html#monounsaturatedFat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":92,"kind":1024,"name":"polyunsaturatedFat","url":"interfaces/PassioFoodItem.html#polyunsaturatedFat","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":93,"kind":1024,"name":"cholesterol","url":"interfaces/PassioFoodItem.html#cholesterol","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":94,"kind":1024,"name":"sodium","url":"interfaces/PassioFoodItem.html#sodium","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":95,"kind":1024,"name":"fiber","url":"interfaces/PassioFoodItem.html#fiber","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":96,"kind":1024,"name":"sugar","url":"interfaces/PassioFoodItem.html#sugar","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":97,"kind":1024,"name":"sugarAdded","url":"interfaces/PassioFoodItem.html#sugarAdded","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":98,"kind":1024,"name":"vitaminD","url":"interfaces/PassioFoodItem.html#vitaminD","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":99,"kind":1024,"name":"calcium","url":"interfaces/PassioFoodItem.html#calcium","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":100,"kind":1024,"name":"iron","url":"interfaces/PassioFoodItem.html#iron","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":101,"kind":1024,"name":"potassium","url":"interfaces/PassioFoodItem.html#potassium","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":102,"kind":1024,"name":"vitaminA","url":"interfaces/PassioFoodItem.html#vitaminA","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":103,"kind":1024,"name":"vitaminC","url":"interfaces/PassioFoodItem.html#vitaminC","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":104,"kind":1024,"name":"alcohol","url":"interfaces/PassioFoodItem.html#alcohol","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":105,"kind":1024,"name":"sugarAlcohol","url":"interfaces/PassioFoodItem.html#sugarAlcohol","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":106,"kind":1024,"name":"vitaminB12","url":"interfaces/PassioFoodItem.html#vitaminB12","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":107,"kind":1024,"name":"vitaminB12Added","url":"interfaces/PassioFoodItem.html#vitaminB12Added","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":108,"kind":1024,"name":"vitaminB6","url":"interfaces/PassioFoodItem.html#vitaminB6","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":109,"kind":1024,"name":"vitaminE","url":"interfaces/PassioFoodItem.html#vitaminE","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":110,"kind":1024,"name":"vitaminEAdded","url":"interfaces/PassioFoodItem.html#vitaminEAdded","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":111,"kind":1024,"name":"magnesium","url":"interfaces/PassioFoodItem.html#magnesium","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":112,"kind":1024,"name":"phosphorus","url":"interfaces/PassioFoodItem.html#phosphorus","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":113,"kind":1024,"name":"iodine","url":"interfaces/PassioFoodItem.html#iodine","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":114,"kind":1024,"name":"ingredientsDescription","url":"interfaces/PassioFoodItem.html#ingredientsDescription","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":115,"kind":1024,"name":"barcode","url":"interfaces/PassioFoodItem.html#barcode","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioFoodItem"},{"id":116,"kind":4194304,"name":"PassioID","url":"modules.html#PassioID","classes":"tsd-kind-type-alias"},{"id":117,"kind":256,"name":"PassioIDAttributes","url":"interfaces/PassioIDAttributes.html","classes":"tsd-kind-interface"},{"id":118,"kind":1024,"name":"passioID","url":"interfaces/PassioIDAttributes.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":119,"kind":1024,"name":"name","url":"interfaces/PassioIDAttributes.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":120,"kind":1024,"name":"imageName","url":"interfaces/PassioIDAttributes.html#imageName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":121,"kind":1024,"name":"entityType","url":"interfaces/PassioIDAttributes.html#entityType","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":122,"kind":1024,"name":"foodItem","url":"interfaces/PassioIDAttributes.html#foodItem","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":123,"kind":1024,"name":"recipe","url":"interfaces/PassioIDAttributes.html#recipe","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":124,"kind":1024,"name":"parents","url":"interfaces/PassioIDAttributes.html#parents","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":125,"kind":1024,"name":"children","url":"interfaces/PassioIDAttributes.html#children","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":126,"kind":1024,"name":"siblings","url":"interfaces/PassioIDAttributes.html#siblings","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioIDAttributes"},{"id":127,"kind":8,"name":"PassioIDEntityType","url":"enums/PassioIDEntityType.html","classes":"tsd-kind-enum"},{"id":128,"kind":16,"name":"group","url":"enums/PassioIDEntityType.html#group","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"PassioIDEntityType"},{"id":129,"kind":16,"name":"item","url":"enums/PassioIDEntityType.html#item","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"PassioIDEntityType"},{"id":130,"kind":16,"name":"recipe","url":"enums/PassioIDEntityType.html#recipe","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"PassioIDEntityType"},{"id":131,"kind":16,"name":"barcode","url":"enums/PassioIDEntityType.html#barcode","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"PassioIDEntityType"},{"id":132,"kind":16,"name":"ocrcode","url":"enums/PassioIDEntityType.html#ocrcode","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"PassioIDEntityType"},{"id":133,"kind":256,"name":"PassioRecipe","url":"interfaces/PassioRecipe.html","classes":"tsd-kind-interface"},{"id":134,"kind":1024,"name":"passioID","url":"interfaces/PassioRecipe.html#passioID","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":135,"kind":1024,"name":"name","url":"interfaces/PassioRecipe.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":136,"kind":1024,"name":"imageName","url":"interfaces/PassioRecipe.html#imageName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":137,"kind":1024,"name":"servingSizes","url":"interfaces/PassioRecipe.html#servingSizes","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":138,"kind":1024,"name":"servingUnits","url":"interfaces/PassioRecipe.html#servingUnits","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":139,"kind":1024,"name":"selectedUnit","url":"interfaces/PassioRecipe.html#selectedUnit","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":140,"kind":1024,"name":"selectedQuantity","url":"interfaces/PassioRecipe.html#selectedQuantity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":141,"kind":1024,"name":"foodItems","url":"interfaces/PassioRecipe.html#foodItems","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"PassioRecipe"},{"id":142,"kind":4194304,"name":"SDKNotReady","url":"modules.html#SDKNotReady","classes":"tsd-kind-type-alias"},{"id":143,"kind":65536,"name":"__type","url":"modules.html#SDKNotReady.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"SDKNotReady"},{"id":144,"kind":1024,"name":"mode","url":"modules.html#SDKNotReady.__type.mode","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKNotReady.__type"},{"id":145,"kind":1024,"name":"missingFiles","url":"modules.html#SDKNotReady.__type.missingFiles","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKNotReady.__type"},{"id":146,"kind":4194304,"name":"SDKReadyForDetection","url":"modules.html#SDKReadyForDetection","classes":"tsd-kind-type-alias"},{"id":147,"kind":65536,"name":"__type","url":"modules.html#SDKReadyForDetection.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"SDKReadyForDetection"},{"id":148,"kind":1024,"name":"mode","url":"modules.html#SDKReadyForDetection.__type.mode","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKReadyForDetection.__type"},{"id":149,"kind":1024,"name":"activeModels","url":"modules.html#SDKReadyForDetection.__type.activeModels","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKReadyForDetection.__type"},{"id":150,"kind":1024,"name":"missingFiles","url":"modules.html#SDKReadyForDetection.__type.missingFiles","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKReadyForDetection.__type"},{"id":151,"kind":4194304,"name":"SDKError","url":"modules.html#SDKError","classes":"tsd-kind-type-alias"},{"id":152,"kind":65536,"name":"__type","url":"modules.html#SDKError.__type","classes":"tsd-kind-type-literal tsd-parent-kind-type-alias","parent":"SDKError"},{"id":153,"kind":1024,"name":"mode","url":"modules.html#SDKError.__type.mode","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKError.__type"},{"id":154,"kind":1024,"name":"errorMessage","url":"modules.html#SDKError.__type.errorMessage","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"SDKError.__type"},{"id":155,"kind":4194304,"name":"PassioStatus","url":"modules.html#PassioStatus","classes":"tsd-kind-type-alias"},{"id":156,"kind":256,"name":"ServingSize","url":"interfaces/ServingSize.html","classes":"tsd-kind-interface"},{"id":157,"kind":1024,"name":"quantity","url":"interfaces/ServingSize.html#quantity","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ServingSize"},{"id":158,"kind":1024,"name":"unitName","url":"interfaces/ServingSize.html#unitName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ServingSize"},{"id":159,"kind":8,"name":"ServingSizeUnit","url":"enums/ServingSizeUnit.html","classes":"tsd-kind-enum"},{"id":160,"kind":16,"name":"g","url":"enums/ServingSizeUnit.html#g","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ServingSizeUnit"},{"id":161,"kind":16,"name":"ml","url":"enums/ServingSizeUnit.html#ml","classes":"tsd-kind-enum-member tsd-parent-kind-enum","parent":"ServingSizeUnit"},{"id":162,"kind":256,"name":"ServingUnit","url":"interfaces/ServingUnit.html","classes":"tsd-kind-interface"},{"id":163,"kind":1024,"name":"unitName","url":"interfaces/ServingUnit.html#unitName","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ServingUnit"},{"id":164,"kind":1024,"name":"value","url":"interfaces/ServingUnit.html#value","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"ServingUnit"},{"id":165,"kind":256,"name":"UPCProduct","url":"interfaces/UPCProduct.html","classes":"tsd-kind-interface"},{"id":166,"kind":1024,"name":"id","url":"interfaces/UPCProduct.html#id","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":167,"kind":1024,"name":"name","url":"interfaces/UPCProduct.html#name","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":168,"kind":1024,"name":"nutrients","url":"interfaces/UPCProduct.html#nutrients","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":169,"kind":1024,"name":"portions","url":"interfaces/UPCProduct.html#portions","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":170,"kind":1024,"name":"branded","url":"interfaces/UPCProduct.html#branded","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":171,"kind":65536,"name":"__type","url":"interfaces/UPCProduct.html#__type","classes":"tsd-kind-type-literal tsd-parent-kind-interface","parent":"UPCProduct"},{"id":172,"kind":1024,"name":"owner","url":"interfaces/UPCProduct.html#__type.owner","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"UPCProduct.__type"},{"id":173,"kind":1024,"name":"upc","url":"interfaces/UPCProduct.html#__type.upc","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"UPCProduct.__type"},{"id":174,"kind":1024,"name":"ingredients","url":"interfaces/UPCProduct.html#__type.ingredients","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"UPCProduct.__type"},{"id":175,"kind":1024,"name":"country","url":"interfaces/UPCProduct.html#__type.country","classes":"tsd-kind-property tsd-parent-kind-type-literal","parent":"UPCProduct.__type"},{"id":176,"kind":1024,"name":"origin","url":"interfaces/UPCProduct.html#origin","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"},{"id":177,"kind":1024,"name":"timestamp","url":"interfaces/UPCProduct.html#timestamp","classes":"tsd-kind-property tsd-parent-kind-interface","parent":"UPCProduct"}],"index":{"version":"2.3.9","fields":["name","parent"],"fieldVectors":[["name/0",[0,28.36]],["parent/0",[]],["name/1",[1,47.819]],["parent/1",[0,2.586]],["name/2",[2,47.819]],["parent/2",[0,2.586]],["name/3",[3,47.819]],["parent/3",[0,2.586]],["name/4",[4,47.819]],["parent/4",[0,2.586]],["name/5",[5,47.819]],["parent/5",[0,2.586]],["name/6",[6,47.819]],["parent/6",[0,2.586]],["name/7",[7,47.819]],["parent/7",[0,2.586]],["name/8",[8,47.819]],["parent/8",[0,2.586]],["name/9",[9,47.819]],["parent/9",[0,2.586]],["name/10",[10,42.711]],["parent/10",[]],["name/11",[11,47.819]],["parent/11",[10,3.895]],["name/12",[12,47.819]],["parent/12",[]],["name/13",[13,47.819]],["parent/13",[]],["name/14",[14,47.819]],["parent/14",[]],["name/15",[15,36.833]],["parent/15",[]],["name/16",[16,39.346]],["parent/16",[]],["name/17",[15,36.833]],["parent/17",[16,3.588]],["name/18",[17,30.473]],["parent/18",[16,3.588]],["name/19",[17,30.473]],["parent/19",[]],["name/20",[18,47.819]],["parent/20",[17,2.779]],["name/21",[19,47.819]],["parent/21",[17,2.779]],["name/22",[20,47.819]],["parent/22",[17,2.779]],["name/23",[21,47.819]],["parent/23",[17,2.779]],["name/24",[22,39.346]],["parent/24",[]],["name/25",[23,30.473]],["parent/25",[22,3.588]],["name/26",[24,39.346]],["parent/26",[22,3.588]],["name/27",[25,34.826]],["parent/27",[]],["name/28",[26,47.819]],["parent/28",[25,3.176]],["name/29",[27,47.819]],["parent/29",[25,3.176]],["name/30",[28,47.819]],["parent/30",[25,3.176]],["name/31",[29,47.819]],["parent/31",[25,3.176]],["name/32",[30,47.819]],["parent/32",[]],["name/33",[31,47.819]],["parent/33",[]],["name/34",[32,36.833]],["parent/34",[]],["name/35",[23,30.473]],["parent/35",[32,3.359]],["name/36",[24,39.346]],["parent/36",[32,3.359]],["name/37",[17,30.473]],["parent/37",[32,3.359]],["name/38",[33,34.826]],["parent/38",[]],["name/39",[34,47.819]],["parent/39",[33,3.176]],["name/40",[35,47.819]],["parent/40",[33,3.176]],["name/41",[36,47.819]],["parent/41",[33,3.176]],["name/42",[37,47.819]],["parent/42",[33,3.176]],["name/43",[38,36.833]],["parent/43",[]],["name/44",[39,47.819]],["parent/44",[38,3.359]],["name/45",[40,47.819]],["parent/45",[38,3.359]],["name/46",[41,47.819]],["parent/46",[38,3.359]],["name/47",[42,39.346]],["parent/47",[]],["name/48",[43,47.819]],["parent/48",[42,3.588]],["name/49",[44,28.36]],["parent/49",[42,3.588]],["name/50",[45,39.346]],["parent/50",[]],["name/51",[46,42.711]],["parent/51",[45,3.588]],["name/52",[47,47.819]],["parent/52",[45,3.588]],["name/53",[44,28.36]],["parent/53",[]],["name/54",[48,47.819]],["parent/54",[44,2.586]],["name/55",[49,47.819]],["parent/55",[44,2.586]],["name/56",[50,47.819]],["parent/56",[44,2.586]],["name/57",[51,36.833]],["parent/57",[44,2.586]],["name/58",[52,42.711]],["parent/58",[44,2.586]],["name/59",[53,42.711]],["parent/59",[44,2.586]],["name/60",[54,42.711]],["parent/60",[44,2.586]],["name/61",[55,42.711]],["parent/61",[44,2.586]],["name/62",[56,36.833]],["parent/62",[]],["name/63",[17,30.473]],["parent/63",[56,3.359]],["name/64",[23,30.473]],["parent/64",[56,3.359]],["name/65",[24,39.346]],["parent/65",[56,3.359]],["name/66",[57,42.711]],["parent/66",[]],["name/67",[58,34.826]],["parent/67",[]],["name/68",[23,30.473]],["parent/68",[58,3.176]],["name/69",[59,34.826]],["parent/69",[58,3.176]],["name/70",[60,42.711]],["parent/70",[58,3.176]],["name/71",[61,39.346]],["parent/71",[58,3.176]],["name/72",[62,13.919]],["parent/72",[]],["name/73",[23,30.473]],["parent/73",[62,1.269]],["name/74",[59,34.826]],["parent/74",[62,1.269]],["name/75",[63,39.346]],["parent/75",[62,1.269]],["name/76",[64,42.711]],["parent/76",[62,1.269]],["name/77",[65,42.711]],["parent/77",[62,1.269]],["name/78",[66,42.711]],["parent/78",[62,1.269]],["name/79",[67,42.711]],["parent/79",[62,1.269]],["name/80",[68,42.711]],["parent/80",[62,1.269]],["name/81",[69,47.819]],["parent/81",[62,1.269]],["name/82",[70,42.711]],["parent/82",[62,1.269]],["name/83",[71,42.711]],["parent/83",[62,1.269]],["name/84",[72,42.711]],["parent/84",[62,1.269]],["name/85",[52,42.711]],["parent/85",[62,1.269]],["name/86",[54,42.711]],["parent/86",[62,1.269]],["name/87",[53,42.711]],["parent/87",[62,1.269]],["name/88",[55,42.711]],["parent/88",[62,1.269]],["name/89",[73,47.819]],["parent/89",[62,1.269]],["name/90",[74,47.819]],["parent/90",[62,1.269]],["name/91",[75,47.819]],["parent/91",[62,1.269]],["name/92",[76,47.819]],["parent/92",[62,1.269]],["name/93",[77,47.819]],["parent/93",[62,1.269]],["name/94",[78,47.819]],["parent/94",[62,1.269]],["name/95",[79,47.819]],["parent/95",[62,1.269]],["name/96",[80,47.819]],["parent/96",[62,1.269]],["name/97",[81,47.819]],["parent/97",[62,1.269]],["name/98",[82,47.819]],["parent/98",[62,1.269]],["name/99",[83,47.819]],["parent/99",[62,1.269]],["name/100",[84,47.819]],["parent/100",[62,1.269]],["name/101",[85,47.819]],["parent/101",[62,1.269]],["name/102",[86,47.819]],["parent/102",[62,1.269]],["name/103",[87,47.819]],["parent/103",[62,1.269]],["name/104",[88,47.819]],["parent/104",[62,1.269]],["name/105",[89,47.819]],["parent/105",[62,1.269]],["name/106",[90,47.819]],["parent/106",[62,1.269]],["name/107",[91,47.819]],["parent/107",[62,1.269]],["name/108",[92,47.819]],["parent/108",[62,1.269]],["name/109",[93,47.819]],["parent/109",[62,1.269]],["name/110",[94,47.819]],["parent/110",[62,1.269]],["name/111",[95,47.819]],["parent/111",[62,1.269]],["name/112",[96,47.819]],["parent/112",[62,1.269]],["name/113",[97,47.819]],["parent/113",[62,1.269]],["name/114",[98,47.819]],["parent/114",[62,1.269]],["name/115",[15,36.833]],["parent/115",[62,1.269]],["name/116",[23,30.473]],["parent/116",[]],["name/117",[99,28.36]],["parent/117",[]],["name/118",[23,30.473]],["parent/118",[99,2.586]],["name/119",[59,34.826]],["parent/119",[99,2.586]],["name/120",[63,39.346]],["parent/120",[99,2.586]],["name/121",[66,42.711]],["parent/121",[99,2.586]],["name/122",[100,47.819]],["parent/122",[99,2.586]],["name/123",[101,42.711]],["parent/123",[99,2.586]],["name/124",[70,42.711]],["parent/124",[99,2.586]],["name/125",[71,42.711]],["parent/125",[99,2.586]],["name/126",[72,42.711]],["parent/126",[99,2.586]],["name/127",[102,33.156]],["parent/127",[]],["name/128",[103,47.819]],["parent/128",[102,3.024]],["name/129",[104,47.819]],["parent/129",[102,3.024]],["name/130",[101,42.711]],["parent/130",[102,3.024]],["name/131",[15,36.833]],["parent/131",[102,3.024]],["name/132",[57,42.711]],["parent/132",[102,3.024]],["name/133",[105,29.361]],["parent/133",[]],["name/134",[23,30.473]],["parent/134",[105,2.677]],["name/135",[59,34.826]],["parent/135",[105,2.677]],["name/136",[63,39.346]],["parent/136",[105,2.677]],["name/137",[68,42.711]],["parent/137",[105,2.677]],["name/138",[67,42.711]],["parent/138",[105,2.677]],["name/139",[65,42.711]],["parent/139",[105,2.677]],["name/140",[64,42.711]],["parent/140",[105,2.677]],["name/141",[106,47.819]],["parent/141",[105,2.677]],["name/142",[107,42.711]],["parent/142",[]],["name/143",[108,36.833]],["parent/143",[107,3.895]],["name/144",[109,39.346]],["parent/144",[110,3.895]],["name/145",[111,42.711]],["parent/145",[110,3.895]],["name/146",[112,42.711]],["parent/146",[]],["name/147",[108,36.833]],["parent/147",[112,3.895]],["name/148",[109,39.346]],["parent/148",[113,3.588]],["name/149",[114,47.819]],["parent/149",[113,3.588]],["name/150",[111,42.711]],["parent/150",[113,3.588]],["name/151",[115,42.711]],["parent/151",[]],["name/152",[108,36.833]],["parent/152",[115,3.895]],["name/153",[109,39.346]],["parent/153",[116,3.895]],["name/154",[117,47.819]],["parent/154",[116,3.895]],["name/155",[118,47.819]],["parent/155",[]],["name/156",[119,39.346]],["parent/156",[]],["name/157",[60,42.711]],["parent/157",[119,3.588]],["name/158",[61,39.346]],["parent/158",[119,3.588]],["name/159",[51,36.833]],["parent/159",[]],["name/160",[120,47.819]],["parent/160",[51,3.359]],["name/161",[121,47.819]],["parent/161",[51,3.359]],["name/162",[122,39.346]],["parent/162",[]],["name/163",[61,39.346]],["parent/163",[122,3.588]],["name/164",[46,42.711]],["parent/164",[122,3.588]],["name/165",[123,29.361]],["parent/165",[]],["name/166",[124,47.819]],["parent/166",[123,2.677]],["name/167",[59,34.826]],["parent/167",[123,2.677]],["name/168",[125,47.819]],["parent/168",[123,2.677]],["name/169",[126,47.819]],["parent/169",[123,2.677]],["name/170",[127,47.819]],["parent/170",[123,2.677]],["name/171",[108,36.833]],["parent/171",[123,2.677]],["name/172",[128,47.819]],["parent/172",[129,3.359]],["name/173",[130,47.819]],["parent/173",[129,3.359]],["name/174",[131,47.819]],["parent/174",[129,3.359]],["name/175",[132,47.819]],["parent/175",[129,3.359]],["name/176",[133,47.819]],["parent/176",[123,2.677]],["name/177",[134,47.819]],["parent/177",[123,2.677]]],"invertedIndex":[["__type",{"_index":108,"name":{"143":{},"147":{},"152":{},"171":{}},"parent":{}}],["activemodels",{"_index":114,"name":{"149":{}},"parent":{}}],["alcohol",{"_index":88,"name":{"104":{}},"parent":{}}],["autoupdate",{"_index":28,"name":{"30":{}},"parent":{}}],["barcode",{"_index":15,"name":{"15":{},"17":{},"115":{},"131":{}},"parent":{}}],["barcodecandidate",{"_index":16,"name":{"16":{}},"parent":{"17":{},"18":{}}}],["barcodecandidates",{"_index":36,"name":{"41":{}},"parent":{}}],["baseconfigurationoptions",{"_index":30,"name":{"32":{}},"parent":{}}],["boundingbox",{"_index":17,"name":{"18":{},"19":{},"37":{},"63":{}},"parent":{"20":{},"21":{},"22":{},"23":{}}}],["branded",{"_index":127,"name":{"170":{}},"parent":{}}],["calcium",{"_index":83,"name":{"99":{}},"parent":{}}],["calories",{"_index":52,"name":{"58":{},"85":{}},"parent":{}}],["candidates",{"_index":43,"name":{"48":{}},"parent":{}}],["carbs",{"_index":54,"name":{"60":{},"86":{}},"parent":{}}],["children",{"_index":71,"name":{"83":{},"125":{}},"parent":{}}],["cholesterol",{"_index":77,"name":{"93":{}},"parent":{}}],["classificationcandidate",{"_index":22,"name":{"24":{}},"parent":{"25":{},"26":{}}}],["computedweight",{"_index":69,"name":{"81":{}},"parent":{}}],["confidence",{"_index":24,"name":{"26":{},"36":{},"65":{}},"parent":{}}],["configurationoptions",{"_index":25,"name":{"27":{}},"parent":{"28":{},"29":{},"30":{},"31":{}}}],["configure",{"_index":1,"name":{"1":{}},"parent":{}}],["convertupcproducttoattributes",{"_index":9,"name":{"9":{}},"parent":{}}],["country",{"_index":132,"name":{"175":{}},"parent":{}}],["custommodelsconfigurationoptions",{"_index":31,"name":{"33":{}},"parent":{}}],["debugmode",{"_index":27,"name":{"29":{}},"parent":{}}],["detectbarcodes",{"_index":40,"name":{"45":{}},"parent":{}}],["detectedcandidate",{"_index":32,"name":{"34":{}},"parent":{"35":{},"36":{},"37":{}}}],["detectedcandidates",{"_index":34,"name":{"39":{}},"parent":{}}],["detectioncameraview",{"_index":13,"name":{"13":{}},"parent":{}}],["detectnutritionfacts",{"_index":41,"name":{"46":{}},"parent":{}}],["detectocr",{"_index":39,"name":{"44":{}},"parent":{}}],["entitytype",{"_index":66,"name":{"78":{},"121":{}},"parent":{}}],["errormessage",{"_index":117,"name":{"154":{}},"parent":{}}],["fat",{"_index":53,"name":{"59":{},"87":{}},"parent":{}}],["fetchattributesforbarcode",{"_index":6,"name":{"6":{}},"parent":{}}],["fetchattributesforocr",{"_index":7,"name":{"7":{}},"parent":{}}],["fiber",{"_index":79,"name":{"95":{}},"parent":{}}],["foodcandidates",{"_index":33,"name":{"38":{}},"parent":{"39":{},"40":{},"41":{},"42":{}}}],["fooddetectionconfig",{"_index":38,"name":{"43":{}},"parent":{"44":{},"45":{},"46":{}}}],["fooddetectionevent",{"_index":42,"name":{"47":{}},"parent":{"48":{},"49":{}}}],["fooditem",{"_index":100,"name":{"122":{}},"parent":{}}],["fooditems",{"_index":106,"name":{"141":{}},"parent":{}}],["g",{"_index":120,"name":{"160":{}},"parent":{}}],["getattributesforname",{"_index":5,"name":{"5":{}},"parent":{}}],["getattributesforpassioid",{"_index":4,"name":{"4":{}},"parent":{}}],["group",{"_index":103,"name":{"128":{}},"parent":{}}],["height",{"_index":21,"name":{"23":{}},"parent":{}}],["id",{"_index":124,"name":{"166":{}},"parent":{}}],["imagename",{"_index":63,"name":{"75":{},"120":{},"136":{}},"parent":{}}],["ingredients",{"_index":131,"name":{"174":{}},"parent":{}}],["ingredientsdescription",{"_index":98,"name":{"114":{}},"parent":{}}],["iodine",{"_index":97,"name":{"113":{}},"parent":{}}],["iron",{"_index":84,"name":{"100":{}},"parent":{}}],["item",{"_index":104,"name":{"129":{}},"parent":{}}],["key",{"_index":26,"name":{"28":{}},"parent":{}}],["localmodelurls",{"_index":29,"name":{"31":{}},"parent":{}}],["logocandidates",{"_index":35,"name":{"40":{}},"parent":{}}],["magnesium",{"_index":95,"name":{"111":{}},"parent":{}}],["measurement",{"_index":45,"name":{"50":{}},"parent":{"51":{},"52":{}}}],["missingfiles",{"_index":111,"name":{"145":{},"150":{}},"parent":{}}],["ml",{"_index":121,"name":{"161":{}},"parent":{}}],["mode",{"_index":109,"name":{"144":{},"148":{},"153":{}},"parent":{}}],["monounsaturatedfat",{"_index":75,"name":{"91":{}},"parent":{}}],["name",{"_index":59,"name":{"69":{},"74":{},"119":{},"135":{},"167":{}},"parent":{}}],["nutrients",{"_index":125,"name":{"168":{}},"parent":{}}],["nutritionfacts",{"_index":44,"name":{"49":{},"53":{}},"parent":{"54":{},"55":{},"56":{},"57":{},"58":{},"59":{},"60":{},"61":{}}}],["objectdetectioncandidate",{"_index":56,"name":{"62":{}},"parent":{"63":{},"64":{},"65":{}}}],["ocrcandidates",{"_index":37,"name":{"42":{}},"parent":{}}],["ocrcode",{"_index":57,"name":{"66":{},"132":{}},"parent":{}}],["origin",{"_index":133,"name":{"176":{}},"parent":{}}],["owner",{"_index":128,"name":{"172":{}},"parent":{}}],["parents",{"_index":70,"name":{"82":{},"124":{}},"parent":{}}],["passioalternative",{"_index":58,"name":{"67":{}},"parent":{"68":{},"69":{},"70":{},"71":{}}}],["passiofooditem",{"_index":62,"name":{"72":{}},"parent":{"73":{},"74":{},"75":{},"76":{},"77":{},"78":{},"79":{},"80":{},"81":{},"82":{},"83":{},"84":{},"85":{},"86":{},"87":{},"88":{},"89":{},"90":{},"91":{},"92":{},"93":{},"94":{},"95":{},"96":{},"97":{},"98":{},"99":{},"100":{},"101":{},"102":{},"103":{},"104":{},"105":{},"106":{},"107":{},"108":{},"109":{},"110":{},"111":{},"112":{},"113":{},"114":{},"115":{}}}],["passioiconview",{"_index":14,"name":{"14":{}},"parent":{}}],["passioid",{"_index":23,"name":{"25":{},"35":{},"64":{},"68":{},"73":{},"116":{},"118":{},"134":{}},"parent":{}}],["passioidattributes",{"_index":99,"name":{"117":{}},"parent":{"118":{},"119":{},"120":{},"121":{},"122":{},"123":{},"124":{},"125":{},"126":{}}}],["passioidentitytype",{"_index":102,"name":{"127":{}},"parent":{"128":{},"129":{},"130":{},"131":{},"132":{}}}],["passiorecipe",{"_index":105,"name":{"133":{}},"parent":{"134":{},"135":{},"136":{},"137":{},"138":{},"139":{},"140":{},"141":{}}}],["passiosdk",{"_index":12,"name":{"12":{}},"parent":{}}],["passiosdkinterface",{"_index":0,"name":{"0":{}},"parent":{"1":{},"2":{},"3":{},"4":{},"5":{},"6":{},"7":{},"8":{},"9":{}}}],["passiostatus",{"_index":118,"name":{"155":{}},"parent":{}}],["phosphorus",{"_index":96,"name":{"112":{}},"parent":{}}],["polyunsaturatedfat",{"_index":76,"name":{"92":{}},"parent":{}}],["portions",{"_index":126,"name":{"169":{}},"parent":{}}],["potassium",{"_index":85,"name":{"101":{}},"parent":{}}],["protein",{"_index":55,"name":{"61":{},"88":{}},"parent":{}}],["quantity",{"_index":60,"name":{"70":{},"157":{}},"parent":{}}],["recipe",{"_index":101,"name":{"123":{},"130":{}},"parent":{}}],["remove",{"_index":11,"name":{"11":{}},"parent":{}}],["requestcameraauthorization",{"_index":2,"name":{"2":{}},"parent":{}}],["saturatedfat",{"_index":73,"name":{"89":{}},"parent":{}}],["sdkerror",{"_index":115,"name":{"151":{}},"parent":{"152":{}}}],["sdkerror.__type",{"_index":116,"name":{},"parent":{"153":{},"154":{}}}],["sdknotready",{"_index":107,"name":{"142":{}},"parent":{"143":{}}}],["sdknotready.__type",{"_index":110,"name":{},"parent":{"144":{},"145":{}}}],["sdkreadyfordetection",{"_index":112,"name":{"146":{}},"parent":{"147":{}}}],["sdkreadyfordetection.__type",{"_index":113,"name":{},"parent":{"148":{},"149":{},"150":{}}}],["searchforfood",{"_index":8,"name":{"8":{}},"parent":{}}],["selectedquantity",{"_index":64,"name":{"76":{},"140":{}},"parent":{}}],["selectedunit",{"_index":65,"name":{"77":{},"139":{}},"parent":{}}],["servingsize",{"_index":119,"name":{"156":{}},"parent":{"157":{},"158":{}}}],["servingsizegram",{"_index":50,"name":{"56":{}},"parent":{}}],["servingsizequantity",{"_index":48,"name":{"54":{}},"parent":{}}],["servingsizes",{"_index":68,"name":{"80":{},"137":{}},"parent":{}}],["servingsizeunit",{"_index":51,"name":{"57":{},"159":{}},"parent":{"160":{},"161":{}}}],["servingsizeunitname",{"_index":49,"name":{"55":{}},"parent":{}}],["servingunit",{"_index":122,"name":{"162":{}},"parent":{"163":{},"164":{}}}],["servingunits",{"_index":67,"name":{"79":{},"138":{}},"parent":{}}],["siblings",{"_index":72,"name":{"84":{},"126":{}},"parent":{}}],["sodium",{"_index":78,"name":{"94":{}},"parent":{}}],["startfooddetection",{"_index":3,"name":{"3":{}},"parent":{}}],["subscription",{"_index":10,"name":{"10":{}},"parent":{"11":{}}}],["sugar",{"_index":80,"name":{"96":{}},"parent":{}}],["sugaradded",{"_index":81,"name":{"97":{}},"parent":{}}],["sugaralcohol",{"_index":89,"name":{"105":{}},"parent":{}}],["timestamp",{"_index":134,"name":{"177":{}},"parent":{}}],["transfat",{"_index":74,"name":{"90":{}},"parent":{}}],["unit",{"_index":47,"name":{"52":{}},"parent":{}}],["unitname",{"_index":61,"name":{"71":{},"158":{},"163":{}},"parent":{}}],["upc",{"_index":130,"name":{"173":{}},"parent":{}}],["upcproduct",{"_index":123,"name":{"165":{}},"parent":{"166":{},"167":{},"168":{},"169":{},"170":{},"171":{},"176":{},"177":{}}}],["upcproduct.__type",{"_index":129,"name":{},"parent":{"172":{},"173":{},"174":{},"175":{}}}],["value",{"_index":46,"name":{"51":{},"164":{}},"parent":{}}],["vitamina",{"_index":86,"name":{"102":{}},"parent":{}}],["vitaminb12",{"_index":90,"name":{"106":{}},"parent":{}}],["vitaminb12added",{"_index":91,"name":{"107":{}},"parent":{}}],["vitaminb6",{"_index":92,"name":{"108":{}},"parent":{}}],["vitaminc",{"_index":87,"name":{"103":{}},"parent":{}}],["vitamind",{"_index":82,"name":{"98":{}},"parent":{}}],["vitamine",{"_index":93,"name":{"109":{}},"parent":{}}],["vitamineadded",{"_index":94,"name":{"110":{}},"parent":{}}],["width",{"_index":20,"name":{"22":{}},"parent":{}}],["x",{"_index":18,"name":{"20":{}},"parent":{}}],["y",{"_index":19,"name":{"21":{}},"parent":{}}]],"pipeline":[]}}' +) diff --git a/docs/assets/style.css b/docs/assets/style.css new file mode 100644 index 0000000..6127b27 --- /dev/null +++ b/docs/assets/style.css @@ -0,0 +1,1414 @@ +@import url("./icons.css"); + +:root { + /* Light */ + --light-color-background: #fcfcfc; + --light-color-secondary-background: #fff; + --light-color-text: #222; + --light-color-text-aside: #707070; + --light-color-link: #4da6ff; + --light-color-menu-divider: #eee; + --light-color-menu-divider-focus: #000; + --light-color-menu-label: #707070; + --light-color-panel: var(--light-color-secondary-background); + --light-color-panel-divider: #eee; + --light-color-comment-tag: #707070; + --light-color-comment-tag-text: #fff; + --light-color-ts: #9600ff; + --light-color-ts-interface: #647f1b; + --light-color-ts-enum: #937210; + --light-color-ts-class: #0672de; + --light-color-ts-private: #707070; + --light-color-toolbar: #fff; + --light-color-toolbar-text: #333; + --light-icon-filter: invert(0); + --light-external-icon: url("data:image/svg+xml;utf8,"); + + /* Dark */ + --dark-color-background: #36393f; + --dark-color-secondary-background: #2f3136; + --dark-color-text: #ffffff; + --dark-color-text-aside: #e6e4e4; + --dark-color-link: #00aff4; + --dark-color-menu-divider: #eee; + --dark-color-menu-divider-focus: #000; + --dark-color-menu-label: #707070; + --dark-color-panel: var(--dark-color-secondary-background); + --dark-color-panel-divider: #818181; + --dark-color-comment-tag: #dcddde; + --dark-color-comment-tag-text: #2f3136; + --dark-color-ts: #c97dff; + --dark-color-ts-interface: #9cbe3c; + --dark-color-ts-enum: #d6ab29; + --dark-color-ts-class: #3695f3; + --dark-color-ts-private: #e2e2e2; + --dark-color-toolbar: #34373c; + --dark-color-toolbar-text: #ffffff; + --dark-icon-filter: invert(1); + --dark-external-icon: url("data:image/svg+xml;utf8,"); +} + +@media (prefers-color-scheme: light) { + :root { + --color-background: var(--light-color-background); + --color-secondary-background: var(--light-color-secondary-background); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-menu-divider: var(--light-color-menu-divider); + --color-menu-divider-focus: var(--light-color-menu-divider-focus); + --color-menu-label: var(--light-color-menu-label); + --color-panel: var(--light-color-panel); + --color-panel-divider: var(--light-color-panel-divider); + --color-comment-tag: var(--light-color-comment-tag); + --color-comment-tag-text: var(--light-color-comment-tag-text); + --color-ts: var(--light-color-ts); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-class: var(--light-color-ts-class); + --color-ts-private: var(--light-color-ts-private); + --color-toolbar: var(--light-color-toolbar); + --color-toolbar-text: var(--light-color-toolbar-text); + --icon-filter: var(--light-icon-filter); + --external-icon: var(--light-external-icon); + } +} + +@media (prefers-color-scheme: dark) { + :root { + --color-background: var(--dark-color-background); + --color-secondary-background: var(--dark-color-secondary-background); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-menu-divider: var(--dark-color-menu-divider); + --color-menu-divider-focus: var(--dark-color-menu-divider-focus); + --color-menu-label: var(--dark-color-menu-label); + --color-panel: var(--dark-color-panel); + --color-panel-divider: var(--dark-color-panel-divider); + --color-comment-tag: var(--dark-color-comment-tag); + --color-comment-tag-text: var(--dark-color-comment-tag-text); + --color-ts: var(--dark-color-ts); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-private: var(--dark-color-ts-private); + --color-toolbar: var(--dark-color-toolbar); + --color-toolbar-text: var(--dark-color-toolbar-text); + --icon-filter: var(--dark-icon-filter); + --external-icon: var(--dark-external-icon); + } +} + +body { + margin: 0; +} + +body.light { + --color-background: var(--light-color-background); + --color-secondary-background: var(--light-color-secondary-background); + --color-text: var(--light-color-text); + --color-text-aside: var(--light-color-text-aside); + --color-link: var(--light-color-link); + --color-menu-divider: var(--light-color-menu-divider); + --color-menu-divider-focus: var(--light-color-menu-divider-focus); + --color-menu-label: var(--light-color-menu-label); + --color-panel: var(--light-color-panel); + --color-panel-divider: var(--light-color-panel-divider); + --color-comment-tag: var(--light-color-comment-tag); + --color-comment-tag-text: var(--light-color-comment-tag-text); + --color-ts: var(--light-color-ts); + --color-ts-interface: var(--light-color-ts-interface); + --color-ts-enum: var(--light-color-ts-enum); + --color-ts-class: var(--light-color-ts-class); + --color-ts-private: var(--light-color-ts-private); + --color-toolbar: var(--light-color-toolbar); + --color-toolbar-text: var(--light-color-toolbar-text); + --icon-filter: var(--light-icon-filter); + --external-icon: var(--light-external-icon); +} + +body.dark { + --color-background: var(--dark-color-background); + --color-secondary-background: var(--dark-color-secondary-background); + --color-text: var(--dark-color-text); + --color-text-aside: var(--dark-color-text-aside); + --color-link: var(--dark-color-link); + --color-menu-divider: var(--dark-color-menu-divider); + --color-menu-divider-focus: var(--dark-color-menu-divider-focus); + --color-menu-label: var(--dark-color-menu-label); + --color-panel: var(--dark-color-panel); + --color-panel-divider: var(--dark-color-panel-divider); + --color-comment-tag: var(--dark-color-comment-tag); + --color-comment-tag-text: var(--dark-color-comment-tag-text); + --color-ts: var(--dark-color-ts); + --color-ts-interface: var(--dark-color-ts-interface); + --color-ts-enum: var(--dark-color-ts-enum); + --color-ts-class: var(--dark-color-ts-class); + --color-ts-private: var(--dark-color-ts-private); + --color-toolbar: var(--dark-color-toolbar); + --color-toolbar-text: var(--dark-color-toolbar-text); + --icon-filter: var(--dark-icon-filter); + --external-icon: var(--dark-external-icon); +} + +h1, +h2, +h3, +h4, +h5, +h6 { + line-height: 1.2; +} + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +h2 { + font-size: 1.5em; + margin: 0.83em 0; +} + +h3 { + font-size: 1.17em; + margin: 1em 0; +} + +h4, +.tsd-index-panel h3 { + font-size: 1em; + margin: 1.33em 0; +} + +h5 { + font-size: 0.83em; + margin: 1.67em 0; +} + +h6 { + font-size: 0.67em; + margin: 2.33em 0; +} + +pre { + white-space: pre; + white-space: pre-wrap; + word-wrap: break-word; +} + +dl, +menu, +ol, +ul { + margin: 1em 0; +} + +dd { + margin: 0 0 0 40px; +} + +.container { + max-width: 1200px; + margin: 0 auto; + padding: 0 40px; +} +@media (max-width: 640px) { + .container { + padding: 0 20px; + } +} + +.container-main { + padding-bottom: 200px; +} + +.row { + display: flex; + position: relative; + margin: 0 -10px; +} +.row:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} + +.col-4, +.col-8 { + box-sizing: border-box; + float: left; + padding: 0 10px; +} + +.col-4 { + width: 33.3333333333%; +} +.col-8 { + width: 66.6666666667%; +} + +ul.tsd-descriptions > li > :first-child, +.tsd-panel > :first-child, +.col-8 > :first-child, +.col-4 > :first-child, +ul.tsd-descriptions > li > :first-child > :first-child, +.tsd-panel > :first-child > :first-child, +.col-8 > :first-child > :first-child, +.col-4 > :first-child > :first-child, +ul.tsd-descriptions > li > :first-child > :first-child > :first-child, +.tsd-panel > :first-child > :first-child > :first-child, +.col-8 > :first-child > :first-child > :first-child, +.col-4 > :first-child > :first-child > :first-child { + margin-top: 0; +} +ul.tsd-descriptions > li > :last-child, +.tsd-panel > :last-child, +.col-8 > :last-child, +.col-4 > :last-child, +ul.tsd-descriptions > li > :last-child > :last-child, +.tsd-panel > :last-child > :last-child, +.col-8 > :last-child > :last-child, +.col-4 > :last-child > :last-child, +ul.tsd-descriptions > li > :last-child > :last-child > :last-child, +.tsd-panel > :last-child > :last-child > :last-child, +.col-8 > :last-child > :last-child > :last-child, +.col-4 > :last-child > :last-child > :last-child { + margin-bottom: 0; +} + +@keyframes fade-in { + from { + opacity: 0; + } + to { + opacity: 1; + } +} +@keyframes fade-out { + from { + opacity: 1; + visibility: visible; + } + to { + opacity: 0; + } +} +@keyframes fade-in-delayed { + 0% { + opacity: 0; + } + 33% { + opacity: 0; + } + 100% { + opacity: 1; + } +} +@keyframes fade-out-delayed { + 0% { + opacity: 1; + visibility: visible; + } + 66% { + opacity: 0; + } + 100% { + opacity: 0; + } +} +@keyframes shift-to-left { + from { + transform: translate(0, 0); + } + to { + transform: translate(-25%, 0); + } +} +@keyframes unshift-to-left { + from { + transform: translate(-25%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-in-from-right { + from { + transform: translate(100%, 0); + } + to { + transform: translate(0, 0); + } +} +@keyframes pop-out-to-right { + from { + transform: translate(0, 0); + visibility: visible; + } + to { + transform: translate(100%, 0); + } +} +body { + background: var(--color-background); + font-family: "Segoe UI", sans-serif; + font-size: 16px; + color: var(--color-text); +} + +a { + color: var(--color-link); + text-decoration: none; +} +a:hover { + text-decoration: underline; +} +a.external[target="_blank"] { + background-image: var(--external-icon); + background-position: top 3px right; + background-repeat: no-repeat; + padding-right: 13px; +} + +code, +pre { + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + padding: 0.2em; + margin: 0; + font-size: 14px; +} + +pre { + padding: 10px; +} +pre code { + padding: 0; + font-size: 100%; +} + +blockquote { + margin: 1em 0; + padding-left: 1em; + border-left: 4px solid gray; +} + +.tsd-typography { + line-height: 1.333em; +} +.tsd-typography ul { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-typography h4, +.tsd-typography .tsd-index-panel h3, +.tsd-index-panel .tsd-typography h3, +.tsd-typography h5, +.tsd-typography h6 { + font-size: 1em; + margin: 0; +} +.tsd-typography h5, +.tsd-typography h6 { + font-weight: normal; +} +.tsd-typography p, +.tsd-typography ul, +.tsd-typography ol { + margin: 1em 0; +} + +@media (min-width: 901px) and (max-width: 1024px) { + html .col-content { + width: 72%; + } + html .col-menu { + width: 28%; + } + html .tsd-navigation { + padding-left: 10px; + } +} +@media (max-width: 900px) { + html .col-content { + float: none; + width: 100%; + } + html .col-menu { + position: fixed !important; + overflow: auto; + -webkit-overflow-scrolling: touch; + z-index: 1024; + top: 0 !important; + bottom: 0 !important; + left: auto !important; + right: 0 !important; + width: 100%; + padding: 20px 20px 0 0; + max-width: 450px; + visibility: hidden; + background-color: var(--color-panel); + transform: translate(100%, 0); + } + html .col-menu > *:last-child { + padding-bottom: 20px; + } + html .overlay { + content: ""; + display: block; + position: fixed; + z-index: 1023; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.75); + visibility: hidden; + } + + .to-has-menu .overlay { + animation: fade-in 0.4s; + } + + .to-has-menu :is(header, footer, .col-content) { + animation: shift-to-left 0.4s; + } + + .to-has-menu .col-menu { + animation: pop-in-from-right 0.4s; + } + + .from-has-menu .overlay { + animation: fade-out 0.4s; + } + + .from-has-menu :is(header, footer, .col-content) { + animation: unshift-to-left 0.4s; + } + + .from-has-menu .col-menu { + animation: pop-out-to-right 0.4s; + } + + .has-menu body { + overflow: hidden; + } + .has-menu .overlay { + visibility: visible; + } + .has-menu :is(header, footer, .col-content) { + transform: translate(-25%, 0); + } + .has-menu .col-menu { + visibility: visible; + transform: translate(0, 0); + display: grid; + grid-template-rows: auto 1fr; + max-height: 100vh; + } + .has-menu .tsd-navigation { + max-height: 100%; + } +} + +.tsd-page-title { + padding: 70px 0 20px 0; + margin: 0 0 40px 0; + background: var(--color-panel); + box-shadow: 0 0 5px rgba(0, 0, 0, 0.35); +} +.tsd-page-title h1 { + margin: 0; +} + +.tsd-breadcrumb { + margin: 0; + padding: 0; + color: var(--color-text-aside); +} +.tsd-breadcrumb a { + color: var(--color-text-aside); + text-decoration: none; +} +.tsd-breadcrumb a:hover { + text-decoration: underline; +} +.tsd-breadcrumb li { + display: inline; +} +.tsd-breadcrumb li:after { + content: " / "; +} + +dl.tsd-comment-tags { + overflow: hidden; +} +dl.tsd-comment-tags dt { + float: left; + padding: 1px 5px; + margin: 0 10px 0 0; + border-radius: 4px; + border: 1px solid var(--color-comment-tag); + color: var(--color-comment-tag); + font-size: 0.8em; + font-weight: normal; +} +dl.tsd-comment-tags dd { + margin: 0 0 10px 0; +} +dl.tsd-comment-tags dd:before, +dl.tsd-comment-tags dd:after { + display: table; + content: " "; +} +dl.tsd-comment-tags dd pre, +dl.tsd-comment-tags dd:after { + clear: both; +} +dl.tsd-comment-tags p { + margin: 0; +} + +.tsd-panel.tsd-comment .lead { + font-size: 1.1em; + line-height: 1.333em; + margin-bottom: 2em; +} +.tsd-panel.tsd-comment .lead:last-child { + margin-bottom: 0; +} + +.toggle-protected .tsd-is-private { + display: none; +} + +.toggle-public .tsd-is-private, +.toggle-public .tsd-is-protected, +.toggle-public .tsd-is-private-protected { + display: none; +} + +.toggle-inherited .tsd-is-inherited { + display: none; +} + +.toggle-externals .tsd-is-external { + display: none; +} + +#tsd-filter { + position: relative; + display: inline-block; + height: 40px; + vertical-align: bottom; +} +.no-filter #tsd-filter { + display: none; +} +#tsd-filter .tsd-filter-group { + display: inline-block; + height: 40px; + vertical-align: bottom; + white-space: nowrap; +} +#tsd-filter input { + display: none; +} +@media (max-width: 900px) { + #tsd-filter .tsd-filter-group { + display: block; + position: absolute; + top: 40px; + right: 20px; + height: auto; + background-color: var(--color-panel); + visibility: hidden; + transform: translate(50%, 0); + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); + } + .has-options #tsd-filter .tsd-filter-group { + visibility: visible; + } + .to-has-options #tsd-filter .tsd-filter-group { + animation: fade-in 0.2s; + } + .from-has-options #tsd-filter .tsd-filter-group { + animation: fade-out 0.2s; + } + #tsd-filter label, + #tsd-filter .tsd-select { + display: block; + padding-right: 20px; + } +} + +footer { + border-top: 1px solid var(--color-panel-divider); + background-color: var(--color-panel); +} +footer:after { + content: ""; + display: table; +} +footer.with-border-bottom { + border-bottom: 1px solid var(--color-panel-divider); +} +footer .tsd-legend-group { + font-size: 0; +} +footer .tsd-legend { + display: inline-block; + width: 25%; + padding: 0; + font-size: 16px; + list-style: none; + line-height: 1.333em; + vertical-align: top; +} +@media (max-width: 900px) { + footer .tsd-legend { + width: 50%; + } +} + +.tsd-hierarchy { + list-style: square; + padding: 0 0 0 20px; + margin: 0; +} +.tsd-hierarchy .target { + font-weight: bold; +} + +.tsd-index-panel .tsd-index-content { + margin-bottom: -30px !important; +} +.tsd-index-panel .tsd-index-section { + margin-bottom: 30px !important; +} +.tsd-index-panel h3 { + margin: 0 -20px 10px -20px; + padding: 0 20px 10px 20px; + border-bottom: 1px solid var(--color-panel-divider); +} +.tsd-index-panel ul.tsd-index-list { + -webkit-column-count: 3; + -moz-column-count: 3; + -ms-column-count: 3; + -o-column-count: 3; + column-count: 3; + -webkit-column-gap: 20px; + -moz-column-gap: 20px; + -ms-column-gap: 20px; + -o-column-gap: 20px; + column-gap: 20px; + padding: 0; + list-style: none; + line-height: 1.333em; +} +@media (max-width: 900px) { + .tsd-index-panel ul.tsd-index-list { + -webkit-column-count: 1; + -moz-column-count: 1; + -ms-column-count: 1; + -o-column-count: 1; + column-count: 1; + } +} +@media (min-width: 901px) and (max-width: 1024px) { + .tsd-index-panel ul.tsd-index-list { + -webkit-column-count: 2; + -moz-column-count: 2; + -ms-column-count: 2; + -o-column-count: 2; + column-count: 2; + } +} +.tsd-index-panel ul.tsd-index-list li { + -webkit-page-break-inside: avoid; + -moz-page-break-inside: avoid; + -ms-page-break-inside: avoid; + -o-page-break-inside: avoid; + page-break-inside: avoid; +} +.tsd-index-panel a, +.tsd-index-panel .tsd-parent-kind-module a { + color: var(--color-ts); +} +.tsd-index-panel .tsd-parent-kind-interface a { + color: var(--color-ts-interface); +} +.tsd-index-panel .tsd-parent-kind-enum a { + color: var(--color-ts-enum); +} +.tsd-index-panel .tsd-parent-kind-class a { + color: var(--color-ts-class); +} +.tsd-index-panel .tsd-kind-module a { + color: var(--color-ts); +} +.tsd-index-panel .tsd-kind-interface a { + color: var(--color-ts-interface); +} +.tsd-index-panel .tsd-kind-enum a { + color: var(--color-ts-enum); +} +.tsd-index-panel .tsd-kind-class a { + color: var(--color-ts-class); +} +.tsd-index-panel .tsd-is-private a { + color: var(--color-ts-private); +} + +.tsd-flag { + display: inline-block; + padding: 0.25em 0.4em; + border-radius: 4px; + color: var(--color-comment-tag-text); + background-color: var(--color-comment-tag); + text-indent: 0; + font-size: 75%; + line-height: 1; + font-weight: normal; +} + +.tsd-anchor { + position: absolute; + top: -100px; +} + +.tsd-member { + position: relative; +} +.tsd-member .tsd-anchor + h3 { + margin-top: 0; + margin-bottom: 0; + border-bottom: none; +} +.tsd-member [data-tsd-kind] { + color: var(--color-ts); +} +.tsd-member [data-tsd-kind="Interface"] { + color: var(--color-ts-interface); +} +.tsd-member [data-tsd-kind="Enum"] { + color: var(--color-ts-enum); +} +.tsd-member [data-tsd-kind="Class"] { + color: var(--color-ts-class); +} +.tsd-member [data-tsd-kind="Private"] { + color: var(--color-ts-private); +} + +.tsd-navigation { + margin: 0 0 0 40px; +} +.tsd-navigation a { + display: block; + padding-top: 2px; + padding-bottom: 2px; + border-left: 2px solid transparent; + color: var(--color-text); + text-decoration: none; + transition: border-left-color 0.1s; +} +.tsd-navigation a:hover { + text-decoration: underline; +} +.tsd-navigation ul { + margin: 0; + padding: 0; + list-style: none; +} +.tsd-navigation li { + padding: 0; +} + +.tsd-navigation.primary { + padding-bottom: 40px; +} +.tsd-navigation.primary a { + display: block; + padding-top: 6px; + padding-bottom: 6px; +} +.tsd-navigation.primary ul li a { + padding-left: 5px; +} +.tsd-navigation.primary ul li li a { + padding-left: 25px; +} +.tsd-navigation.primary ul li li li a { + padding-left: 45px; +} +.tsd-navigation.primary ul li li li li a { + padding-left: 65px; +} +.tsd-navigation.primary ul li li li li li a { + padding-left: 85px; +} +.tsd-navigation.primary ul li li li li li li a { + padding-left: 105px; +} +.tsd-navigation.primary > ul { + border-bottom: 1px solid var(--color-panel-divider); +} +.tsd-navigation.primary li { + border-top: 1px solid var(--color-panel-divider); +} +.tsd-navigation.primary li.current > a { + font-weight: bold; +} +.tsd-navigation.primary li.label span { + display: block; + padding: 20px 0 6px 5px; + color: var(--color-menu-label); +} +.tsd-navigation.primary li.globals + li > span, +.tsd-navigation.primary li.globals + li > a { + padding-top: 20px; +} + +.tsd-navigation.secondary { + max-height: calc(100vh - 1rem - 40px); + overflow: auto; + position: sticky; + top: calc(0.5rem + 40px); + transition: 0.3s; +} +.tsd-navigation.secondary.tsd-navigation--toolbar-hide { + max-height: calc(100vh - 1rem); + top: 0.5rem; +} +.tsd-navigation.secondary ul { + transition: opacity 0.2s; +} +.tsd-navigation.secondary ul li a { + padding-left: 25px; +} +.tsd-navigation.secondary ul li li a { + padding-left: 45px; +} +.tsd-navigation.secondary ul li li li a { + padding-left: 65px; +} +.tsd-navigation.secondary ul li li li li a { + padding-left: 85px; +} +.tsd-navigation.secondary ul li li li li li a { + padding-left: 105px; +} +.tsd-navigation.secondary ul li li li li li li a { + padding-left: 125px; +} +.tsd-navigation.secondary ul.current a { + border-left-color: var(--color-panel-divider); +} +.tsd-navigation.secondary li.focus > a, +.tsd-navigation.secondary ul.current li.focus > a { + border-left-color: var(--color-menu-divider-focus); +} +.tsd-navigation.secondary li.current { + margin-top: 20px; + margin-bottom: 20px; + border-left-color: var(--color-panel-divider); +} +.tsd-navigation.secondary li.current > a { + font-weight: bold; +} + +@media (min-width: 901px) { + .menu-sticky-wrap { + position: static; + } +} + +.tsd-panel { + margin: 20px 0; + padding: 20px; + background-color: var(--color-panel); + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +.tsd-panel:empty { + display: none; +} +.tsd-panel > h1, +.tsd-panel > h2, +.tsd-panel > h3 { + margin: 1.5em -20px 10px -20px; + padding: 0 20px 10px 20px; + border-bottom: 1px solid var(--color-panel-divider); +} +.tsd-panel > h1.tsd-before-signature, +.tsd-panel > h2.tsd-before-signature, +.tsd-panel > h3.tsd-before-signature { + margin-bottom: 0; + border-bottom: 0; +} +.tsd-panel table { + display: block; + width: 100%; + overflow: auto; + margin-top: 10px; + word-break: normal; + word-break: keep-all; + border-collapse: collapse; +} +.tsd-panel table th { + font-weight: bold; +} +.tsd-panel table th, +.tsd-panel table td { + padding: 6px 13px; + border: 1px solid var(--color-panel-divider); +} +.tsd-panel table tr { + background: var(--color-background); +} +.tsd-panel table tr:nth-child(even) { + background: var(--color-secondary-background); +} + +.tsd-panel-group { + margin: 60px 0; +} +.tsd-panel-group > h1, +.tsd-panel-group > h2, +.tsd-panel-group > h3 { + padding-left: 20px; + padding-right: 20px; +} + +#tsd-search { + transition: background-color 0.2s; +} +#tsd-search .title { + position: relative; + z-index: 2; +} +#tsd-search .field { + position: absolute; + left: 0; + top: 0; + right: 40px; + height: 40px; +} +#tsd-search .field input { + box-sizing: border-box; + position: relative; + top: -50px; + z-index: 1; + width: 100%; + padding: 0 10px; + opacity: 0; + outline: 0; + border: 0; + background: transparent; + color: var(--color-text); +} +#tsd-search .field label { + position: absolute; + overflow: hidden; + right: -40px; +} +#tsd-search .field input, +#tsd-search .title { + transition: opacity 0.2s; +} +#tsd-search .results { + position: absolute; + visibility: hidden; + top: 40px; + width: 100%; + margin: 0; + padding: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); +} +#tsd-search .results li { + padding: 0 10px; + background-color: var(--color-background); +} +#tsd-search .results li:nth-child(even) { + background-color: var(--color-panel); +} +#tsd-search .results li.state { + display: none; +} +#tsd-search .results li.current, +#tsd-search .results li:hover { + background-color: var(--color-panel-divider); +} +#tsd-search .results a { + display: block; +} +#tsd-search .results a:before { + top: 10px; +} +#tsd-search .results span.parent { + color: var(--color-text-aside); + font-weight: normal; +} +#tsd-search.has-focus { + background-color: var(--color-panel-divider); +} +#tsd-search.has-focus .field input { + top: 0; + opacity: 1; +} +#tsd-search.has-focus .title { + z-index: 0; + opacity: 0; +} +#tsd-search.has-focus .results { + visibility: visible; +} +#tsd-search.loading .results li.state.loading { + display: block; +} +#tsd-search.failure .results li.state.failure { + display: block; +} + +.tsd-signature { + margin: 0 0 1em 0; + padding: 10px; + border: 1px solid var(--color-panel-divider); + font-family: Menlo, Monaco, Consolas, "Courier New", monospace; + font-size: 14px; + overflow-x: auto; +} +.tsd-signature.tsd-kind-icon { + padding-left: 30px; +} +.tsd-signature.tsd-kind-icon:before { + top: 10px; + left: 10px; +} +.tsd-panel > .tsd-signature { + margin-left: -20px; + margin-right: -20px; + border-width: 1px 0; +} +.tsd-panel > .tsd-signature.tsd-kind-icon { + padding-left: 40px; +} +.tsd-panel > .tsd-signature.tsd-kind-icon:before { + left: 20px; +} + +.tsd-signature-symbol { + color: var(--color-text-aside); + font-weight: normal; +} + +.tsd-signature-type { + font-style: italic; + font-weight: normal; +} + +.tsd-signatures { + padding: 0; + margin: 0 0 1em 0; + border: 1px solid var(--color-panel-divider); +} +.tsd-signatures .tsd-signature { + margin: 0; + border-width: 1px 0 0 0; + transition: background-color 0.1s; +} +.tsd-signatures .tsd-signature:first-child { + border-top-width: 0; +} +.tsd-signatures .tsd-signature.current { + background-color: var(--color-panel-divider); +} +.tsd-signatures.active > .tsd-signature { + cursor: pointer; +} +.tsd-panel > .tsd-signatures { + margin-left: -20px; + margin-right: -20px; + border-width: 1px 0; +} +.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon { + padding-left: 40px; +} +.tsd-panel > .tsd-signatures .tsd-signature.tsd-kind-icon:before { + left: 20px; +} +.tsd-panel > a.anchor + .tsd-signatures { + border-top-width: 0; + margin-top: -20px; +} + +ul.tsd-descriptions { + position: relative; + overflow: hidden; + padding: 0; + list-style: none; +} +ul.tsd-descriptions.active > .tsd-description { + display: none; +} +ul.tsd-descriptions.active > .tsd-description.current { + display: block; +} +ul.tsd-descriptions.active > .tsd-description.fade-in { + animation: fade-in-delayed 0.3s; +} +ul.tsd-descriptions.active > .tsd-description.fade-out { + animation: fade-out-delayed 0.3s; + position: absolute; + display: block; + top: 0; + left: 0; + right: 0; + opacity: 0; + visibility: hidden; +} +ul.tsd-descriptions h4, +ul.tsd-descriptions .tsd-index-panel h3, +.tsd-index-panel ul.tsd-descriptions h3 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} + +ul.tsd-parameters, +ul.tsd-type-parameters { + list-style: square; + margin: 0; + padding-left: 20px; +} +ul.tsd-parameters > li.tsd-parameter-signature, +ul.tsd-type-parameters > li.tsd-parameter-signature { + list-style: none; + margin-left: -20px; +} +ul.tsd-parameters h5, +ul.tsd-type-parameters h5 { + font-size: 16px; + margin: 1em 0 0.5em 0; +} +ul.tsd-parameters .tsd-comment, +ul.tsd-type-parameters .tsd-comment { + margin-top: -0.5em; +} + +.tsd-sources { + font-size: 14px; + color: var(--color-text-aside); + margin: 0 0 1em 0; +} +.tsd-sources a { + color: var(--color-text-aside); + text-decoration: underline; +} +.tsd-sources ul, +.tsd-sources p { + margin: 0 !important; +} +.tsd-sources ul { + list-style: none; + padding: 0; +} + +.tsd-page-toolbar { + position: fixed; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 40px; + color: var(--color-toolbar-text); + background: var(--color-toolbar); + border-bottom: 1px solid var(--color-panel-divider); + transition: transform 0.3s linear; +} +.tsd-page-toolbar a { + color: var(--color-toolbar-text); + text-decoration: none; +} +.tsd-page-toolbar a.title { + font-weight: bold; +} +.tsd-page-toolbar a.title:hover { + text-decoration: underline; +} +.tsd-page-toolbar .table-wrap { + display: table; + width: 100%; + height: 40px; +} +.tsd-page-toolbar .table-cell { + display: table-cell; + position: relative; + white-space: nowrap; + line-height: 40px; +} +.tsd-page-toolbar .table-cell:first-child { + width: 100%; +} + +.tsd-page-toolbar--hide { + transform: translateY(-100%); +} + +.tsd-select .tsd-select-list li:before, +.tsd-select .tsd-select-label:before, +.tsd-widget:before { + content: ""; + display: inline-block; + width: 40px; + height: 40px; + margin: 0 -8px 0 0; + background-image: url(./widgets.png); + background-repeat: no-repeat; + text-indent: -1024px; + vertical-align: bottom; + filter: var(--icon-filter); +} +@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 144dpi) { + .tsd-select .tsd-select-list li:before, + .tsd-select .tsd-select-label:before, + .tsd-widget:before { + background-image: url(./widgets@2x.png); + background-size: 320px 40px; + } +} + +.tsd-widget { + display: inline-block; + overflow: hidden; + opacity: 0.8; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-widget:hover { + opacity: 0.9; +} +.tsd-widget.active { + opacity: 1; + background-color: var(--color-panel-divider); +} +.tsd-widget.no-caption { + width: 40px; +} +.tsd-widget.no-caption:before { + margin: 0; +} +.tsd-widget.search:before { + background-position: 0 0; +} +.tsd-widget.menu:before { + background-position: -40px 0; +} +.tsd-widget.options:before { + background-position: -80px 0; +} +.tsd-widget.options, +.tsd-widget.menu { + display: none; +} +@media (max-width: 900px) { + .tsd-widget.options, + .tsd-widget.menu { + display: inline-block; + } +} +input[type="checkbox"] + .tsd-widget:before { + background-position: -120px 0; +} +input[type="checkbox"]:checked + .tsd-widget:before { + background-position: -160px 0; +} + +.tsd-select { + position: relative; + display: inline-block; + height: 40px; + transition: opacity 0.1s, background-color 0.2s; + vertical-align: bottom; + cursor: pointer; +} +.tsd-select .tsd-select-label { + opacity: 0.6; + transition: opacity 0.2s; +} +.tsd-select .tsd-select-label:before { + background-position: -240px 0; +} +.tsd-select.active .tsd-select-label { + opacity: 0.8; +} +.tsd-select.active .tsd-select-list { + visibility: visible; + opacity: 1; + transition-delay: 0s; +} +.tsd-select .tsd-select-list { + position: absolute; + visibility: hidden; + top: 40px; + left: 0; + margin: 0; + padding: 0; + opacity: 0; + list-style: none; + box-shadow: 0 0 4px rgba(0, 0, 0, 0.25); + transition: visibility 0s 0.2s, opacity 0.2s; +} +.tsd-select .tsd-select-list li { + padding: 0 20px 0 0; + background-color: var(--color-background); +} +.tsd-select .tsd-select-list li:before { + background-position: 40px 0; +} +.tsd-select .tsd-select-list li:nth-child(even) { + background-color: var(--color-panel); +} +.tsd-select .tsd-select-list li:hover { + background-color: var(--color-panel-divider); +} +.tsd-select .tsd-select-list li.selected:before { + background-position: -200px 0; +} +@media (max-width: 900px) { + .tsd-select .tsd-select-list { + top: 0; + left: auto; + right: 100%; + margin-right: -5px; + } + .tsd-select .tsd-select-label:before { + background-position: -280px 0; + } +} + +img { + max-width: 100%; +} + +.tsd-anchor-icon { + margin-left: 10px; + vertical-align: middle; + color: var(--color-text); +} + +.tsd-anchor-icon svg { + width: 1em; + height: 1em; + visibility: hidden; +} + +.tsd-anchor-link:hover > .tsd-anchor-icon svg { + visibility: visible; +} diff --git a/docs/assets/widgets.png b/docs/assets/widgets.png new file mode 100644 index 0000000..c738053 Binary files /dev/null and b/docs/assets/widgets.png differ diff --git a/docs/assets/widgets@2x.png b/docs/assets/widgets@2x.png new file mode 100644 index 0000000..4bbbd57 Binary files /dev/null and b/docs/assets/widgets@2x.png differ diff --git a/docs/enums/PassioIDEntityType.html b/docs/enums/PassioIDEntityType.html new file mode 100644 index 0000000..f6b4485 --- /dev/null +++ b/docs/enums/PassioIDEntityType.html @@ -0,0 +1,13 @@ +PassioIDEntityType | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

The type of object represented by a PassioIDAttributes

+

Index

Enumeration members

barcode = "barcode"
+

A food product identified via barcode scanning

+
group = "group"
+

A parent node in the food heirarchy (e.g. pasta), will only be returned if the models could not detect something more specific

+
item = "item"
+

A leaf node in the food heirarchy, meaning a specific food item that has been identified by the models

+
ocrcode = "ocrcode"
+

A food product identified via reading the text on the packaging label

+
recipe = "recipe"
+

A leaf node in the food heirarchy, meaning a specific food item that has been identified by the models

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/enums/ServingSizeUnit.html b/docs/enums/ServingSizeUnit.html new file mode 100644 index 0000000..5e5543f --- /dev/null +++ b/docs/enums/ServingSizeUnit.html @@ -0,0 +1,3 @@ +ServingSizeUnit | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

The unit of measurement for a serving size

+

Index

Enumeration members

Enumeration members

g = "g"
ml = "ml"

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..d636c3f --- /dev/null +++ b/docs/index.html @@ -0,0 +1,69 @@ +@passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

@passiolife/react-native-passio-sdk

+ +

React Native Passio SDK

+
+

This project provides React Native bindings for the Passio SDK. It also includes the RN Quickstart application which serves as a test harness for the SDK.

+ + +

Requirements

+
+
    +
  • React Native v0.60.0 or higher
  • +
  • Xcode 12.4 or higher
  • +
  • iOS 13 or higher (the SDK will build against iOS 11 or higher but features are limited to >= iOS 13)
  • +
  • Android API level 21 or higher
  • +
  • Cocoapods 1.10.1 or higher
  • +
+

Please note that the SDK will currently not run in the iOS simulator. We hope to change this in the future, but an iOS test device is required for now.

+ + +

Installation

+
+
    +
  1. Create an .npmrc file in the root of your project with the following lines, replacing GITHUB_ACCESS_TOKEN with the token provided to you by Passio. This grants you access to the SDK's private listing on Github Package Registry.
  2. +
+
//npm.pkg.github.com/:_authToken=GITHUB_ACCESS_TOKEN
@passiolife:registry=https://npm.pkg.github.com +
+
    +
  1. Add the Passio SDK dependency to your package.json and run npm install or yarn.
  2. +
+
"@passiolife/react-native-passio-sdk": "1.4.13"
+
+
    +
  1. Ensure the native dependencies are linked to your app.
  2. +
+

For iOS, run pod install.

+
cd ios; pod install
+
+

For Android, auto-linking should handle setting up the Gradle dependency for your project.

+ + +

Usage

+
+
    +
  1. Enter a value for NSCameraUsageDescription in your Info.plist so the camera may be utilized.

    +
  2. +
  3. Import the SDK

    +
  4. +
+
import {
PassioSDK,
DetectionCameraView,
} from '@passiolife/react-native-passio-sdk'; +
+
    +
  1. To show the live camera preview, add the DetectionCameraView to your view
  2. +
+
// Somewhere in your component (inside of a flex container)

<DetectionCameraView style={{flex: 1, width: '100%'}} /> +
+
    +
  1. When your component mounts, configure the SDK using your Passio provided developer key and start food detection.
  2. +
+

// In your component

const [isReady, setIsReady] = useState(false);

// Effect to configure the SDK and request camera permission
useEffect(() => {
Promise.all([
PassioSDK.configure({
key: 'your-developer-key',
autoUpdate: true,
}),
PassioSDK.requestCameraAuthorization(),
]).then(([sdkStatus, cameraAuthorized]) => {
console.log(
`SDK configured: ${sdkStatus.mode} Camera authorized: ${cameraAuthorized}`,
);
setIsReady(sdkStatus.mode === 'isReadyForDetection' && cameraAuthorized);
});
}, []);


// Once the SDK is ready, start food detection
useEffect(() => {
if (!isReady) {
return;
}
const config: FoodDetectionConfig = {
detectBarcodes: true,
detectOCR: true,
detectNutritionFacts: true,
}
const subscription = PassioSDK.startFoodDetection(
config,
async (detection: FoodDetectionEvent) => {

console.log('Got food detection event: ', detection);

const { candidates, nutritionFacts } = detection

if (candidates?.barcodeCandidates?.length) {

// show barcode candidates to the user

} else if (candidates?.ocrCandidates?.length) {

// show OCR candidates to the user

} else if (candidates?.detectedCandidates?.length) {

// show visually recognized candidates to the user

} else if (nutritionFacts) {

// Show scanned nutrition facts to the user
}
},
);

// stop food detection when component unmounts
return () => subscription.remove();

}, [isReady]); +
+ + +

Known Issues / Workarounds

+
+

If your project does not currently contain any Swift, you might get an undefined symbol errors for the Swift standard library when adding the Passio SDK. Since the Passio SDK is a Swift framework, your app needs to link against the Swift standard library. You can accomplish this by adding a single Swift file to your project.

+

Because the Passio SDK is a Swift framework and depends on React-Core, we need a modular header for this dependency. If you get an error regarding a missing module header for React-Core, update your Podfile to produce one:

+
pod 'React-Core', :path => '../node_modules/react-native/', :modular_headers => true
+
+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/BarcodeCandidate.html b/docs/interfaces/BarcodeCandidate.html new file mode 100644 index 0000000..69a1da7 --- /dev/null +++ b/docs/interfaces/BarcodeCandidate.html @@ -0,0 +1,7 @@ +BarcodeCandidate | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A candidate resulting from barcode scanning

+

Hierarchy

  • BarcodeCandidate

Index

Properties

barcode: string
+

The value of the scanned barcode

+
boundingBox: BoundingBox
+

A box describing the location of the barcode in the camera view

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/BoundingBox.html b/docs/interfaces/BoundingBox.html new file mode 100644 index 0000000..e60de50 --- /dev/null +++ b/docs/interfaces/BoundingBox.html @@ -0,0 +1,3 @@ +BoundingBox | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A box describing a detected object's location in the camera view

+

Hierarchy

  • BoundingBox

Index

Properties

Properties

height: number
width: number
x: number
y: number

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ClassificationCandidate.html b/docs/interfaces/ClassificationCandidate.html new file mode 100644 index 0000000..c3047eb --- /dev/null +++ b/docs/interfaces/ClassificationCandidate.html @@ -0,0 +1,7 @@ +ClassificationCandidate | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A candidate resulting from image classification models

+

Hierarchy

Index

Properties

confidence: number
+

Confidence of the classification candidate, ranging from 0.0 to 1.0

+
passioID: string
+

The ID of the detected item

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ConfigurationOptions.html b/docs/interfaces/ConfigurationOptions.html new file mode 100644 index 0000000..733f385 --- /dev/null +++ b/docs/interfaces/ConfigurationOptions.html @@ -0,0 +1,20 @@ +ConfigurationOptions | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

An object defining the configuration options for the Passio SDK

+

Hierarchy

  • ConfigurationOptions

Index

Properties

autoUpdate?: boolean
+

Set to true to enable download of AI models from Passio's servers. +Occurs once per SDK version or again if the app is deleted and reinstalled. +Does not automatically update to future model versions. When the SDK is updated, +it will delete the old models and download the newest version.

+
debugMode?: boolean
+

Set to true to enable debug logging

+
key: string
+

Your Passio SDK key

+
localModelURLs?: string[]
+

Provide local copies of Passio models that you've either bundled within your app or +downloaded from your own servers. The SDK will copy and decrypt the files and delete +the original files to free up disk space.

+

You don't need to supply the localModelURLs each time you configure the SDK. +Only if you configure the SDK and it returns status "notReady" with missingFiles listed +do you need to retrieve the missing files and call configure again, passing the file URLs +in this field.

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/DetectedCandidate.html b/docs/interfaces/DetectedCandidate.html new file mode 100644 index 0000000..38141da --- /dev/null +++ b/docs/interfaces/DetectedCandidate.html @@ -0,0 +1,9 @@ +DetectedCandidate | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A food candidate detected from visual scanning

+

Hierarchy

  • DetectedCandidate

Index

Properties

boundingBox: BoundingBox
+

A box describing a detected object's location in the camera view

+
confidence: number
+

Confidence of the classification candidate, ranging from 0.0 to 1.0

+
passioID: string
+

The ID of the detected item

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/FoodCandidates.html b/docs/interfaces/FoodCandidates.html new file mode 100644 index 0000000..83954bd --- /dev/null +++ b/docs/interfaces/FoodCandidates.html @@ -0,0 +1,11 @@ +FoodCandidates | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A collection of food candidates detected by the models.

+

Hierarchy

  • FoodCandidates

Index

Properties

barcodeCandidates?: BarcodeCandidate[]
+

Food candidate results from barcode scanning.

+
detectedCandidates: DetectedCandidate[]
+

Food candidate results from visual scanning. The array is sorted by confidence, with the most confident result at index 0.

+
logoCandidates?: DetectedCandidate[]
+

Food candidate results from the logo detection model.

+
ocrCandidates?: string[]
+

Food candidate results from OCR scanning.

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/FoodDetectionConfig.html b/docs/interfaces/FoodDetectionConfig.html new file mode 100644 index 0000000..5bdc472 --- /dev/null +++ b/docs/interfaces/FoodDetectionConfig.html @@ -0,0 +1,14 @@ +FoodDetectionConfig | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A configuration object to determine which types of recognition should be performed by +the SDK. There is currently no flag to control visual food recognition models, they are +enabled by default.

+

Hierarchy

  • FoodDetectionConfig

Index

Properties

detectBarcodes: boolean
+

Detect barcodes on packaged food products. Results will be returned +as BarcodeCandidates in the FoodCandidates property of FoodDetectionEvent

+
detectNutritionFacts: boolean
+

Detect barcodes on packaged food products. Results will be returned +under the nutritionFacts property on FoodDetectionEvent.

+
detectOCR: boolean
+

Detect packaged food labels using OCR. Results will be returned +as OCRCandidates in the FoodCandidates property of FoodDetectionEvent

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/FoodDetectionEvent.html b/docs/interfaces/FoodDetectionEvent.html new file mode 100644 index 0000000..13b2236 --- /dev/null +++ b/docs/interfaces/FoodDetectionEvent.html @@ -0,0 +1,8 @@ +FoodDetectionEvent | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

An object provided in the callback for food detection containing +food candidates as well as nutrition facts, if found

+

Hierarchy

  • FoodDetectionEvent

Index

Properties

candidates?: FoodCandidates
+

A collection of food candidates detected by the models.

+
nutritionFacts?: NutritionFacts
+

Detected nutrition facts when scanning a nutrition label.

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Measurement.html b/docs/interfaces/Measurement.html new file mode 100644 index 0000000..7d92b15 --- /dev/null +++ b/docs/interfaces/Measurement.html @@ -0,0 +1 @@ +Measurement | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Measurement

Index

Properties

Properties

unit: string
value: number

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/NutritionFacts.html b/docs/interfaces/NutritionFacts.html new file mode 100644 index 0000000..329443a --- /dev/null +++ b/docs/interfaces/NutritionFacts.html @@ -0,0 +1,3 @@ +NutritionFacts | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

Nutrition facts scanned from the nutrition label on a package food item

+

Hierarchy

  • NutritionFacts

Index

Properties

calories?: number
carbs?: number
fat?: number
protein?: number
servingSizeGram?: number
servingSizeQuantity?: number
servingSizeUnit: ServingSizeUnit
servingSizeUnitName?: string

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ObjectDetectionCandidate.html b/docs/interfaces/ObjectDetectionCandidate.html new file mode 100644 index 0000000..de6f827 --- /dev/null +++ b/docs/interfaces/ObjectDetectionCandidate.html @@ -0,0 +1,9 @@ +ObjectDetectionCandidate | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A candidate resulting from object detection models

+

Hierarchy

Index

Properties

boundingBox: BoundingBox
+

A box describing a detected object's location in the camera view

+
confidence: number
+

Confidence of the classification candidate, ranging from 0.0 to 1.0

+
passioID: string
+

The ID of the detected item

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PassioAlternative.html b/docs/interfaces/PassioAlternative.html new file mode 100644 index 0000000..7bcb65b --- /dev/null +++ b/docs/interfaces/PassioAlternative.html @@ -0,0 +1,3 @@ +PassioAlternative | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A food item that is a close relative and possible alternative for another food item

+

Hierarchy

  • PassioAlternative

Index

Properties

name: string
passioID: string
quantity?: number
unitName?: string

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PassioFoodItem.html b/docs/interfaces/PassioFoodItem.html new file mode 100644 index 0000000..da12531 --- /dev/null +++ b/docs/interfaces/PassioFoodItem.html @@ -0,0 +1,90 @@ +PassioFoodItem | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

Nutritional information for an item in the food database.

+

Hierarchy

  • PassioFoodItem

Index

Properties

alcohol?: number
+

Alcohol, in grams

+
barcode?: string
+

The UPC code for this food product, if available

+
calcium?: number
+

Calcium, in milligrams

+
calories?: number
+

Calories, in kcal

+
carbs?: number
+

Carbohydrates, in grams

+
children?: PassioAlternative[]
+

Related items below this item in the food heirarchy (more specific)

+
cholesterol?: number
+

Cholesterol, in milligrams

+
computedWeight: Measurement
+

The mass of the serving size, in grams

+
entityType: PassioIDEntityType
+

The entity type of the item

+
fat?: number
+

Fat, in grams

+
fiber?: number
+

Dietary fiber, in grams

+
imageName: string
+

The name of the image for this item. Provide this value to a PassioIconView +in order to display the image.

+
ingredientsDescription?: string
+

The ingredients listed on the product packaging, if any

+
iodine?: number
+

Iodine, in micrograms

+
iron?: number
+

Iron, in milligrams

+
magnesium?: number
+

Magnesium, in milligrams

+
monounsaturatedFat?: number
+

Monounsaturated fat, in grams

+
name: string
+

The name of the item

+
parents?: PassioAlternative[]
+

Related items above this item in the food heirarchy (more generic)

+
passioID: string
+

The ID of the item in the database

+
phosphorus?: number
+

Phosphorus, in milligrams

+
polyunsaturatedFat?: number
+

Polyunsaturated fat, in grams

+
potassium?: number
+

Potassium, in milligrams

+
protein?: number
+

Protein, in grams

+
saturatedFat?: number
+

Saturated fat, in grams

+
selectedQuantity: number
+

The default serving quantity

+
selectedUnit: string
+

The default serving unit

+
servingSizes: ServingSize[]
+

The serving sizes available for this recipe

+
servingUnits: ServingUnit[]
+

The serving units available for this recipe

+
siblings?: PassioAlternative[]
+

Related items at the same level as this item in the food heirarchy

+
sodium?: number
+

Sodium, in milligrams

+
sugar?: number
+

Total sugars, in grams

+
sugarAdded?: number
+

Added sugar, in grams

+
sugarAlcohol?: number
+

Sugar alcohol, in grams

+
transFat?: number
+

Transfat, in grams

+
vitaminA?: number
+

Vitamin A, in IU

+
vitaminB12?: number
+

Vitamin B12, in micrograms

+
vitaminB12Added?: number
+

Added Vitamin B12, in micrograms

+
vitaminB6?: number
+

Vitamin B6, in milligrams

+
vitaminC?: number
+

Vitamin C, in milligrams

+
vitaminD?: number
+

Vitamin D, in milligrams

+
vitaminE?: number
+

Vitamin E, in milligrams

+
vitaminEAdded?: number
+

Added Vitamin E, in milligrams

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PassioIDAttributes.html b/docs/interfaces/PassioIDAttributes.html new file mode 100644 index 0000000..3fac98e --- /dev/null +++ b/docs/interfaces/PassioIDAttributes.html @@ -0,0 +1,23 @@ +PassioIDAttributes | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

Information associated with an item in the nutritional database. +Check the entityType field to determine the type of the item.

+

Hierarchy

  • PassioIDAttributes

Index

Properties

children: PassioAlternative[]
+

Related items below this item in the food heirarchy (more specific)

+
entityType: PassioIDEntityType
+

The entity type of the item

+
foodItem?: PassioFoodItem
+

The nutritional data for this item in the database

+
imageName: string
+

The name of the image for this item. Provide this value to a PassioIconView +in order to display the image.

+
name: string
+

The name of the item

+
+

Related items above this item in the food heirarchy (more generic)

+
passioID: string
+

The ID of the item in the database

+
recipe?: PassioRecipe
+

The recipe data for this item in the database

+
siblings: PassioAlternative[]
+

Related items at the same level as this item in the food heirarchy

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PassioRecipe.html b/docs/interfaces/PassioRecipe.html new file mode 100644 index 0000000..2a28f56 --- /dev/null +++ b/docs/interfaces/PassioRecipe.html @@ -0,0 +1,18 @@ +PassioRecipe | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PassioRecipe

Index

Properties

foodItems: PassioFoodItem[]
+

The food items in this recipe

+
imageName: string
+

The name of the image for this recipe. Provide this value to a +PassioIconView in order to display the image.

+
name: string
+

The name of the recipe

+
passioID: string
+

The ID of the recipe in the database

+
selectedQuantity: number
+

The default serving quantity

+
selectedUnit: string
+

The default serving unit

+
servingSizes: ServingSize[]
+

The serving sizes available for this recipe

+
servingUnits: ServingUnit[]
+

The serving units available for this recipe

+

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/PassioSDKInterface.html b/docs/interfaces/PassioSDKInterface.html new file mode 100644 index 0000000..774ea55 --- /dev/null +++ b/docs/interfaces/PassioSDKInterface.html @@ -0,0 +1,43 @@ +PassioSDKInterface | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PassioSDKInterface

Index

Methods

  • +

    Query Passio's UPC web service for nutrition attributes of a given barcode.

    +

    Parameters

    • barcode: string
      +

      The barcode value for the attributes query, typically taken from a scanned BarcodeCandidate.

      +

    Returns Promise<null | PassioIDAttributes>

    A Promise resolving to a PassioIDAttributes object if the record exists in the database or null if not.

    +
  • +

    Query Passio's web service for nutrition attributes given an OCR identifier.

    +

    Parameters

    • ocrCode: string
      +

      The OCR identifier for the attributes query, taken from the list of OCR candidates on a FoodDetectionEvent.

      +

    Returns Promise<null | PassioIDAttributes>

    A Promise resolving to a PassioIDAttributes object if the record exists in the database or null if not.

    +
  • +

    Look up the nutrition attributes for the given name of a food item. This is most often used with a string received +from the searchForFood function.

    +

    Parameters

    • name: string
      +

      The name of the item you'd like to query.

      +

    Returns Promise<null | PassioIDAttributes>

    A Promise resolving to a PassioIDAttributes object if the record exists in the database or null if not.

    +
  • +

    Look up the nutrition attributes for a given Passio ID.

    +

    Parameters

    • passioID: string
      +

      The Passio ID for the attributes query.

      +

    Returns Promise<null | PassioIDAttributes>

    A Promise resolving to a PassioIDAttributes object if the record exists in the database or null if not.

    +
  • requestCameraAuthorization(): Promise<boolean>
  • +

    Prompt the user for camera authorization if not already granted.

    +
    remarks

    Your app's Info.plist must inclue an NSCameraUsageDescription value or this method will crash.

    +

    Returns Promise<boolean>

    A Promise resolving to true if authorization has been granted or false if not.

    +
  • searchForFood(searchQuery: string): Promise<string[]>
  • +

    Search the local database of foods with a given search term.

    +

    Parameters

    • searchQuery: string
      +

      The search term to match against food item names.

      +

    Returns Promise<string[]>

    A Promise resolving to an array of food item names.

    +
  • +

    Begin food detection using the device's camera.

    +

    Parameters

    Returns Subscription

    A Subscription that should be retained by the caller while food detection is running. Call remove on the subscription to terminate food detection.

    +

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ServingSize.html b/docs/interfaces/ServingSize.html new file mode 100644 index 0000000..767a408 --- /dev/null +++ b/docs/interfaces/ServingSize.html @@ -0,0 +1 @@ +ServingSize | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ServingSize

Index

Properties

quantity: number
unitName: string

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/ServingUnit.html b/docs/interfaces/ServingUnit.html new file mode 100644 index 0000000..3f7054b --- /dev/null +++ b/docs/interfaces/ServingUnit.html @@ -0,0 +1 @@ +ServingUnit | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ServingUnit

Index

Properties

Properties

unitName: string
value: number

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/Subscription.html b/docs/interfaces/Subscription.html new file mode 100644 index 0000000..11634f2 --- /dev/null +++ b/docs/interfaces/Subscription.html @@ -0,0 +1,9 @@ +Subscription | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu
+

A subscription that is created when food detection begins. +The caller must retain this object in memory and call remove +when detection should be terminated so resources can be released. +Failing to remove the subscription may result in significant +memory leaks.

+

Hierarchy

  • Subscription

Index

Methods

Methods

  • remove(): void

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/UPCProduct.html b/docs/interfaces/UPCProduct.html new file mode 100644 index 0000000..75d1c6b --- /dev/null +++ b/docs/interfaces/UPCProduct.html @@ -0,0 +1 @@ +UPCProduct | @passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • UPCProduct

Index

Properties

branded: { country: string; ingredients: string; owner: string; upc: string }

Type declaration

  • country: string
  • ingredients: string
  • owner: string
  • upc: string
id: string
name: string
nutrients: { amount: number; nutrient: { id: number; name: string; origin: { id: string; source: string; timestamp: string }[]; shortName?: string; unit: string } }[]
origin: { dataType?: string; id: string; source: string; timestamp: string }[]
portions: { name: string; quantity: number; weight: { unit: string; value: number } }[]
timestamp: string

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html new file mode 100644 index 0000000..ae0022a --- /dev/null +++ b/docs/modules.html @@ -0,0 +1,24 @@ +@passiolife/react-native-passio-sdk
Options
All
  • Public
  • Public/Protected
  • All
Menu

@passiolife/react-native-passio-sdk

Index

Type aliases

Barcode: string
+

A UPC code captured by scanning a barcode

+
BaseConfigurationOptions: Pick<ConfigurationOptions, "key" | "debugMode">
CustomModelsConfigurationOptions: Pick<ConfigurationOptions, "key" | "debugMode" | "localModelURLs">
OCRCode: string
+

A an identifier for a visually scanned packaged food label

+
PassioID: string
+

The ID of an item in the nutrition database.

+
+

The possible states of the SDK after calling configure. Switch on status.mode to +access the data associated with each state.

+
SDKError: { errorMessage: string; mode: "error" }
+

SDK failed to configure in an unrecoverable way. Please read the error message for more inforation.

+

Type declaration

  • errorMessage: string
  • mode: "error"
SDKNotReady: { missingFiles: string[]; mode: "notReady" }
+

SDK is not ready due to missing model files. Please download the specified files +and call configure again, passing in the localFileURLs of the downloaded files.

+

Type declaration

  • missingFiles: string[]
  • mode: "notReady"
SDKReadyForDetection: { activeModels: number; missingFiles: string[]; mode: "isReadyForDetection" }
+

SDK configuration successfully. This status much be reached before calling startFoodDetection. +It is possible that missing files may still be reported in the event that the SDK is aware of newer +model versions than the ones currently loaded. The SDK should still function normally in this case.

+

Type declaration

  • activeModels: number
  • missingFiles: string[]
  • mode: "isReadyForDetection"

Variables

DetectionCameraView: HostComponent<ViewProps> = ...
+

A component that displays the camera feed and sends camera frames +to the food detection models.

+
PassioIconView: HostComponent<Props> = ...
+

A component for displaying food icons from the Passio SDK.

+
PassioSDK: PassioSDKInterface = ...

Legend

  • Property
  • Method

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/example/android/.project b/example/android/.project new file mode 100644 index 0000000..3964dd3 --- /dev/null +++ b/example/android/.project @@ -0,0 +1,17 @@ + + + android + Project android created by Buildship. + + + + + org.eclipse.buildship.core.gradleprojectbuilder + + + + + + org.eclipse.buildship.core.gradleprojectnature + + diff --git a/example/android/.settings/org.eclipse.buildship.core.prefs b/example/android/.settings/org.eclipse.buildship.core.prefs new file mode 100644 index 0000000..e889521 --- /dev/null +++ b/example/android/.settings/org.eclipse.buildship.core.prefs @@ -0,0 +1,2 @@ +connection.project.dir= +eclipse.preferences.version=1 diff --git a/example/android/PassioSdkExample.iml b/example/android/PassioSdkExample.iml new file mode 100644 index 0000000..6e595ab --- /dev/null +++ b/example/android/PassioSdkExample.iml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle new file mode 100644 index 0000000..5c90fab --- /dev/null +++ b/example/android/app/build.gradle @@ -0,0 +1,242 @@ +apply plugin: "com.android.application" + +apply plugin: 'com.google.gms.google-services' +apply plugin: 'com.google.firebase.crashlytics' + +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", + * + * // https://reactnative.dev/docs/performance#enable-the-ram-format + * bundleCommand: "ram-bundle", + * + * // 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, + * + * // whether to disable dev mode in custom build variants (by default only disabled in release) + * // for PassioSdkExample: to disable dev mode in the staging build type (if configured) + * devDisabledInStaging: true, + * // The configuration property can be in the following formats + * // 'devDisabledIn${productFlavor}${buildType}' + * // 'devDisabledIn${buildType}' + * + * // 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 PassioSdkExample, 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: [] + * ] + */ + +project.ext.react = [ + enableHermes: false, // clean and rebuild if changing + entryFile: "index.js", +] + +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 + +/** + * The preferred build flavor of JavaScriptCore. + * + * For PassioSdkExample, to use the international variant, you can use: + * `def jscFlavor = 'org.webkit:android-jsc-intl:+'` + * + * The international variant includes ICU i18n library and necessary data + * allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that + * give correct results when using with locales other than en-US. Note that + * this variant is about 6MiB larger per architecture than default. + */ +def jscFlavor = 'org.webkit:android-jsc:+' + +/** + * Whether to enable the Hermes VM. + * + * This should be set on project.ext.react and mirrored here. If it is not set + * on project.ext.react, JavaScript will not be compiled to Hermes Bytecode + * and the benefits of using Hermes will therefore be sharply reduced. + */ +def enableHermes = project.ext.react.get("enableHermes", false); + +android { + compileSdkVersion rootProject.ext.compileSdkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + defaultConfig { + applicationId "com.passiolife.reactnativequickstart" + minSdkVersion rootProject.ext.minSdkVersion + targetSdkVersion rootProject.ext.targetSdkVersion + versionCode 8 + versionName "1.4.8" + } + splits { + abi { + reset() + enable enableSeparateBuildPerCPUArchitecture + universalApk false // If true, also generate a universal APK + include "armeabi-v7a", "x86", "arm64-v8a", "x86_64" + } + } + signingConfigs { + debug { + storeFile file('debug.keystore') + storePassword 'android' + keyAlias 'androiddebugkey' + keyPassword 'android' + } + } + buildTypes { + debug { + signingConfig signingConfigs.debug + } + release { + // Caution! In production, you need to generate your own keystore file. + // see https://reactnative.dev/docs/signed-apk-android. + signingConfig signingConfigs.debug + 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: + // https://developer.android.com/studio/build/configure-apk-splits.html + def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4] + 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 { + implementation fileTree(dir: "libs", include: ["*.jar"]) + //noinspection GradleDynamicVersion + implementation "com.facebook.react:react-native:+" // From node_modules + + implementation platform('com.google.firebase:firebase-bom:28.4.0') + implementation 'com.google.firebase:firebase-crashlytics-ktx' + implementation 'com.google.firebase:firebase-analytics-ktx' + + implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0" + debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") { + exclude group:'com.facebook.fbjni' + } + debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") { + exclude group:'com.facebook.flipper' + exclude group:'com.squareup.okhttp3', module:'okhttp' + } + debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") { + exclude group:'com.facebook.flipper' + } + + if (enableHermes) { + def hermesPath = "../../node_modules/hermes-engine/android/"; + debugImplementation files(hermesPath + "hermes-debug.aar") + releaseImplementation files(hermesPath + "hermes-release.aar") + } else { + implementation jscFlavor + } + + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + + implementation project(':reactnativepassiosdk') + implementation files("$rootDir/../node_modules/@passiolife/nutritionai-react-native-sdk-v2/android/libs/passiolib-release.aar") + // TensorFlow + implementation 'org.tensorflow:tensorflow-lite:2.8.0' + + // CameraX + def camerax_version = "1.0.0-beta12" + implementation "androidx.camera:camera-core:$camerax_version" + implementation "androidx.camera:camera-camera2:$camerax_version" + implementation "androidx.camera:camera-lifecycle:$camerax_version" + api "androidx.camera:camera-view:1.0.0-alpha19" + implementation "androidx.camera:camera-extensions:1.0.0-alpha16" + + + // Barcode and OCR + implementation 'com.google.android.gms:play-services-mlkit-text-recognition:18.0.0' + implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.0.0' + implementation 'org.tensorflow:tensorflow-lite-metadata:0.4.0' +} + +// 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' +} + +apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project) diff --git a/example/android/app/debug.keystore b/example/android/app/debug.keystore new file mode 100644 index 0000000..364e105 Binary files /dev/null and b/example/android/app/debug.keystore differ diff --git a/example/android/app/google-services.json b/example/android/app/google-services.json new file mode 100644 index 0000000..5c687d4 --- /dev/null +++ b/example/android/app/google-services.json @@ -0,0 +1,263 @@ +{ + "project_info": { + "project_number": "344771555334", + "firebase_url": "https://passio-nutrition-develop-bcb6.firebaseio.com", + "project_id": "passio-nutrition-develop-bcb6", + "storage_bucket": "passio-nutrition-develop-bcb6.appspot.com" + }, + "client": [ + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:aba6bb91fbe3fad1ff1387", + "android_client_info": { + "package_name": "ai.passio.androidpassiodemo" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:cc48c6ec9514048dff1387", + "android_client_info": { + "package_name": "ai.passio.passiosdk.paints" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:0d323fec99cc0b35ff1387", + "android_client_info": { + "package_name": "ai.passio.passiosdk.passiodatacollection" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:fd451c9bc3c228bdff1387", + "android_client_info": { + "package_name": "ai.passio.passiosdk.passiodatacollection.internal" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:215fcc64b2289ac9ff1387", + "android_client_info": { + "package_name": "ai.passio.passiosdk.passiodatacollection.paints" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:a895e63e9af65b00ff1387", + "android_client_info": { + "package_name": "ai.passio.passiosdk.passiodatacollection.paints.internal" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + }, + { + "client_info": { + "mobilesdk_app_id": "1:344771555334:android:14fd24c8f20454d0ff1387", + "android_client_info": { + "package_name": "com.passiolife.reactnativequickstart" + } + }, + "oauth_client": [ + { + "client_id": "344771555334-rt8be80q3nmmuo0c9cui6uhi8fqbjupd.apps.googleusercontent.com", + "client_type": 3 + } + ], + "api_key": [ + { + "current_key": "AIzaSyAjktfOhPKKbJN1ySBABlSb0QZ63FP182s" + } + ], + "services": { + "appinvite_service": { + "other_platform_oauth_client": [ + { + "client_id": "344771555334-ku86hf8gj2bqmmo4adirraj5enmof2mp.apps.googleusercontent.com", + "client_type": 3 + }, + { + "client_id": "344771555334-08gclsmbooph0kco84vh015lk4kuespl.apps.googleusercontent.com", + "client_type": 2, + "ios_info": { + "bundle_id": "zai.passio.passport.beta" + } + } + ] + } + } + } + ], + "configuration_version": "1" +} \ No newline at end of file diff --git a/example/android/app/proguard-rules.pro b/example/android/app/proguard-rules.pro new file mode 100644 index 0000000..11b0257 --- /dev/null +++ b/example/android/app/proguard-rules.pro @@ -0,0 +1,10 @@ +# 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: diff --git a/example/android/app/rn_example.keystore b/example/android/app/rn_example.keystore new file mode 100644 index 0000000..d32e782 Binary files /dev/null and b/example/android/app/rn_example.keystore differ diff --git a/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..fa26aa5 --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + + + + diff --git a/example/android/app/src/debug/java/com/example/reactnativepassiosdk/ReactNativeFlipper.java b/example/android/app/src/debug/java/com/example/reactnativepassiosdk/ReactNativeFlipper.java new file mode 100644 index 0000000..0f6a4ae --- /dev/null +++ b/example/android/app/src/debug/java/com/example/reactnativepassiosdk/ReactNativeFlipper.java @@ -0,0 +1,69 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + *

This source code is licensed under the MIT license found in the LICENSE file in the root + * directory of this source tree. + */ +package com.example.reactnativepassiosdk; + +import android.content.Context; +import com.facebook.flipper.android.AndroidFlipperClient; +import com.facebook.flipper.android.utils.FlipperUtils; +import com.facebook.flipper.core.FlipperClient; +import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin; +import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin; +import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin; +import com.facebook.flipper.plugins.inspector.DescriptorMapping; +import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin; +import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor; +import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; +import com.facebook.flipper.plugins.react.ReactFlipperPlugin; +import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin; +import com.facebook.react.ReactInstanceManager; +import com.facebook.react.bridge.ReactContext; +import com.facebook.react.modules.network.NetworkingModule; +import okhttp3.OkHttpClient; + +public class ReactNativeFlipper { + public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { + if (FlipperUtils.shouldEnableFlipper(context)) { + final FlipperClient client = AndroidFlipperClient.getInstance(context); + client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults())); + client.addPlugin(new ReactFlipperPlugin()); + client.addPlugin(new DatabasesFlipperPlugin(context)); + client.addPlugin(new SharedPreferencesFlipperPlugin(context)); + client.addPlugin(CrashReporterPlugin.getInstance()); + NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin(); + NetworkingModule.setCustomClientBuilder( + new NetworkingModule.CustomClientBuilder() { + @Override + public void apply(OkHttpClient.Builder builder) { + builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin)); + } + }); + client.addPlugin(networkFlipperPlugin); + client.start(); + // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized + // Hence we run if after all native modules have been initialized + ReactContext reactContext = reactInstanceManager.getCurrentReactContext(); + if (reactContext == null) { + reactInstanceManager.addReactInstanceEventListener( + new ReactInstanceManager.ReactInstanceEventListener() { + @Override + public void onReactContextInitialized(ReactContext reactContext) { + reactInstanceManager.removeReactInstanceEventListener(this); + reactContext.runOnNativeModulesQueueThread( + new Runnable() { + @Override + public void run() { + client.addPlugin(new FrescoFlipperPlugin()); + } + }); + } + }); + } else { + client.addPlugin(new FrescoFlipperPlugin()); + } + } + } +} diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..9793c8b --- /dev/null +++ b/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + diff --git a/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainActivity.java b/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainActivity.java new file mode 100644 index 0000000..be5c9c8 --- /dev/null +++ b/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainActivity.java @@ -0,0 +1,35 @@ +package com.example.reactnativepassiosdk; + +import android.os.Bundle; +import android.os.PersistableBundle; + +import androidx.annotation.Nullable; + +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 "PassioSdkExample"; + } + + @Override + protected void onResume() { + super.onResume(); + } + + @Override + protected void onStop() { + super.onStop(); + } + + @Override + public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { + super.onCreate(savedInstanceState, persistentState); + } +} diff --git a/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainApplication.java b/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainApplication.java new file mode 100644 index 0000000..724d2b8 --- /dev/null +++ b/example/android/app/src/main/java/com/example/reactnativepassiosdk/MainApplication.java @@ -0,0 +1,78 @@ +package com.example.reactnativepassiosdk; + +import android.app.Application; +import android.content.Context; +import com.facebook.react.PackageList; +import com.facebook.react.ReactApplication; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.ReactInstanceManager; +import com.facebook.soloader.SoLoader; +import java.lang.reflect.InvocationTargetException; +import java.util.List; +import com.reactnativepassiosdk.ReactNativePassioSDK; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = + new ReactNativeHost(this) { + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + @SuppressWarnings("UnnecessaryLocalVariable") + List packages = new PackageList(this).getPackages(); + // Packages that cannot be autolinked yet can be added manually here, for PassioSdkExample: + // packages.add(new ReactNativePassioSDK()); + return packages; + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + initializeFlipper(this, getReactNativeHost().getReactInstanceManager()); // Remove this line if you don't want Flipper enabled + } + + /** + * Loads Flipper in React Native templates. + * + * @param context + */ + private static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) { + if (BuildConfig.DEBUG) { + try { + /* + We use reflection here to pick up the class that initializes Flipper, + since Flipper library is not available in release mode + */ + Class aClass = Class.forName("com.reactnativepassiosdkExample.ReactNativeFlipper"); + aClass + .getMethod("initializeFlipper", Context.class, ReactInstanceManager.class) + .invoke(null, context, reactInstanceManager); + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (NoSuchMethodException e) { + e.printStackTrace(); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } catch (InvocationTargetException e) { + e.printStackTrace(); + } + } + } +} diff --git a/example/android/app/src/main/res/mipmap-hdpi/passio_icon.png b/example/android/app/src/main/res/mipmap-hdpi/passio_icon.png new file mode 100644 index 0000000..f52001e Binary files /dev/null and b/example/android/app/src/main/res/mipmap-hdpi/passio_icon.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/passio_icon.png b/example/android/app/src/main/res/mipmap-mdpi/passio_icon.png new file mode 100644 index 0000000..7602416 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-mdpi/passio_icon.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/passio_icon.png b/example/android/app/src/main/res/mipmap-xhdpi/passio_icon.png new file mode 100644 index 0000000..8d1371e Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xhdpi/passio_icon.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/passio_icon.png b/example/android/app/src/main/res/mipmap-xxhdpi/passio_icon.png new file mode 100644 index 0000000..6f86fe7 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxhdpi/passio_icon.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/passio_icon.png b/example/android/app/src/main/res/mipmap-xxxhdpi/passio_icon.png new file mode 100644 index 0000000..39f1740 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxxhdpi/passio_icon.png differ diff --git a/example/android/app/src/main/res/values/strings.xml b/example/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..1879b9b --- /dev/null +++ b/example/android/app/src/main/res/values/strings.xml @@ -0,0 +1,3 @@ + + React Native Quickstart + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..62fe59f --- /dev/null +++ b/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,9 @@ + + + + + + diff --git a/example/android/build.gradle b/example/android/build.gradle new file mode 100644 index 0000000..f5feec7 --- /dev/null +++ b/example/android/build.gradle @@ -0,0 +1,40 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + ext { + minSdkVersion = 26 + compileSdkVersion = 31 + targetSdkVersion = 31 + } + repositories { + google() + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:4.2.1' + + classpath 'com.google.gms:google-services:4.3.10' + classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + mavenLocal() + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + + google() + jcenter() + maven { url 'https://www.jitpack.io' } + } +} diff --git a/example/android/gradle.properties b/example/android/gradle.properties new file mode 100644 index 0000000..592708d --- /dev/null +++ b/example/android/gradle.properties @@ -0,0 +1,22 @@ +# 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.useAndroidX=true +android.enableJetifier=true +FLIPPER_VERSION=0.54.0 diff --git a/example/android/gradle/wrapper/gradle-wrapper.jar b/example/android/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..5c2d1cf Binary files /dev/null and b/example/android/gradle/wrapper/gradle-wrapper.jar differ diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..f99a9bf --- /dev/null +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Apr 13 23:49:45 CDT 2021 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip diff --git a/example/android/gradlew b/example/android/gradlew new file mode 100755 index 0000000..2fe81a7 --- /dev/null +++ b/example/android/gradlew @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# 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 + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# 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 +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +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" -a "$nonstop" = "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 or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; 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=`expr $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 + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git a/example/android/gradlew.bat b/example/android/gradlew.bat new file mode 100644 index 0000000..b742c99 --- /dev/null +++ b/example/android/gradlew.bat @@ -0,0 +1,103 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@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 + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@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="-Xmx64m" "-Xms64m" + +@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 Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_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=%* + +: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 new file mode 100644 index 0000000..9aea4c8 --- /dev/null +++ b/example/android/settings.gradle @@ -0,0 +1,6 @@ +rootProject.name = 'PassioSdkExample' +apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) +include ':app' + +include ':reactnativepassiosdk' +project(':reactnativepassiosdk').projectDir = new File(rootProject.projectDir, '../../android') diff --git a/example/app.json b/example/app.json new file mode 100644 index 0000000..ca58c10 --- /dev/null +++ b/example/app.json @@ -0,0 +1,4 @@ +{ + "name": "PassioSdkExample", + "displayName": "PassioSdk Example" +} diff --git a/example/babel.config.js b/example/babel.config.js new file mode 100644 index 0000000..f5ad5c9 --- /dev/null +++ b/example/babel.config.js @@ -0,0 +1,16 @@ +const path = require('path') +const pak = require('../package.json') + +module.exports = { + presets: ['module:metro-react-native-babel-preset'], + plugins: [ + [ + 'module-resolver', + { + alias: { + [pak.name]: path.join(__dirname, '..', pak.source), + }, + }, + ], + ], +} diff --git a/example/index.js b/example/index.js new file mode 100644 index 0000000..5c5c0c5 --- /dev/null +++ b/example/index.js @@ -0,0 +1,5 @@ +import { AppRegistry } from 'react-native' +import App from './src/App' +import { name as appName } from './app.json' + +AppRegistry.registerComponent(appName, () => App) diff --git a/example/ios/Podfile b/example/ios/Podfile new file mode 100644 index 0000000..c04188e --- /dev/null +++ b/example/ios/Podfile @@ -0,0 +1,22 @@ +require_relative '../node_modules/react-native/scripts/react_native_pods' +require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' + +use_frameworks! + +platform :ios, '13.0' + +target 'ReactNativeQuickstart' do + config = use_native_modules! + + use_react_native!(:path => config["reactNativePath"]) + + + # Enables Flipper. + # + # Note that if you have use_frameworks! enabled, Flipper will not work and + # you should disable these next few lines. + # use_flipper! + # post_install do |installer| + # flipper_post_install(installer) + # end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock new file mode 100644 index 0000000..e039c73 --- /dev/null +++ b/example/ios/Podfile.lock @@ -0,0 +1,439 @@ +PODS: + - boost (1.76.0) + - DoubleConversion (1.1.6) + - FBLazyVector (0.68.5) + - FBReactNativeSpec (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTRequired (= 0.68.5) + - RCTTypeSafety (= 0.68.5) + - React-Core (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - fmt (6.2.1) + - glog (0.3.5) + - RCT-Folly (2021.06.28.00-v2): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - RCT-Folly/Default (= 2021.06.28.00-v2) + - RCT-Folly/Default (2021.06.28.00-v2): + - boost + - DoubleConversion + - fmt (~> 6.2.1) + - glog + - RCTRequired (0.68.5) + - RCTTypeSafety (0.68.5): + - FBLazyVector (= 0.68.5) + - RCT-Folly (= 2021.06.28.00-v2) + - RCTRequired (= 0.68.5) + - React-Core (= 0.68.5) + - React (0.68.5): + - React-Core (= 0.68.5) + - React-Core/DevSupport (= 0.68.5) + - React-Core/RCTWebSocket (= 0.68.5) + - React-RCTActionSheet (= 0.68.5) + - React-RCTAnimation (= 0.68.5) + - React-RCTBlob (= 0.68.5) + - React-RCTImage (= 0.68.5) + - React-RCTLinking (= 0.68.5) + - React-RCTNetwork (= 0.68.5) + - React-RCTSettings (= 0.68.5) + - React-RCTText (= 0.68.5) + - React-RCTVibration (= 0.68.5) + - React-callinvoker (0.68.5) + - React-Codegen (0.68.5): + - FBReactNativeSpec (= 0.68.5) + - RCT-Folly (= 2021.06.28.00-v2) + - RCTRequired (= 0.68.5) + - RCTTypeSafety (= 0.68.5) + - React-Core (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-Core (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default (= 0.68.5) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/CoreModulesHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/Default (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/DevSupport (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default (= 0.68.5) + - React-Core/RCTWebSocket (= 0.68.5) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-jsinspector (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTActionSheetHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTAnimationHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTBlobHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTImageHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTLinkingHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTNetworkHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTSettingsHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTTextHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTVibrationHeaders (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-Core/RCTWebSocket (0.68.5): + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-Core/Default (= 0.68.5) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsiexecutor (= 0.68.5) + - React-perflogger (= 0.68.5) + - Yoga + - React-CoreModules (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTTypeSafety (= 0.68.5) + - React-Codegen (= 0.68.5) + - React-Core/CoreModulesHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - React-RCTImage (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-cxxreact (0.68.5): + - boost (= 1.76.0) + - DoubleConversion + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-callinvoker (= 0.68.5) + - React-jsi (= 0.68.5) + - React-jsinspector (= 0.68.5) + - React-logger (= 0.68.5) + - React-perflogger (= 0.68.5) + - React-runtimeexecutor (= 0.68.5) + - React-jsi (0.68.5): + - boost (= 1.76.0) + - DoubleConversion + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-jsi/Default (= 0.68.5) + - React-jsi/Default (0.68.5): + - boost (= 1.76.0) + - DoubleConversion + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-jsiexecutor (0.68.5): + - DoubleConversion + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-perflogger (= 0.68.5) + - React-jsinspector (0.68.5) + - React-logger (0.68.5): + - glog + - React-perflogger (0.68.5) + - React-RCTActionSheet (0.68.5): + - React-Core/RCTActionSheetHeaders (= 0.68.5) + - React-RCTAnimation (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTTypeSafety (= 0.68.5) + - React-Codegen (= 0.68.5) + - React-Core/RCTAnimationHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTBlob (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - React-Codegen (= 0.68.5) + - React-Core/RCTBlobHeaders (= 0.68.5) + - React-Core/RCTWebSocket (= 0.68.5) + - React-jsi (= 0.68.5) + - React-RCTNetwork (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTImage (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTTypeSafety (= 0.68.5) + - React-Codegen (= 0.68.5) + - React-Core/RCTImageHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - React-RCTNetwork (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTLinking (0.68.5): + - React-Codegen (= 0.68.5) + - React-Core/RCTLinkingHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTNetwork (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTTypeSafety (= 0.68.5) + - React-Codegen (= 0.68.5) + - React-Core/RCTNetworkHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTSettings (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - RCTTypeSafety (= 0.68.5) + - React-Codegen (= 0.68.5) + - React-Core/RCTSettingsHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-RCTText (0.68.5): + - React-Core/RCTTextHeaders (= 0.68.5) + - React-RCTVibration (0.68.5): + - RCT-Folly (= 2021.06.28.00-v2) + - React-Codegen (= 0.68.5) + - React-Core/RCTVibrationHeaders (= 0.68.5) + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (= 0.68.5) + - React-runtimeexecutor (0.68.5): + - React-jsi (= 0.68.5) + - ReactCommon/turbomodule/core (0.68.5): + - DoubleConversion + - glog + - RCT-Folly (= 2021.06.28.00-v2) + - React-callinvoker (= 0.68.5) + - React-Core (= 0.68.5) + - React-cxxreact (= 0.68.5) + - React-jsi (= 0.68.5) + - React-logger (= 0.68.5) + - React-perflogger (= 0.68.5) + - ReactNativePassioSDK (2.2.11): + - React-Core + - rn-fetch-blob (0.12.0): + - React-Core + - Yoga (1.14.0) + +DEPENDENCIES: + - boost (from `../node_modules/react-native/third-party-podspecs/boost.podspec`) + - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) + - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) + - FBReactNativeSpec (from `../node_modules/react-native/React/FBReactNativeSpec`) + - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) + - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) + - RCTTypeSafety (from `../node_modules/react-native/Libraries/TypeSafety`) + - React (from `../node_modules/react-native/`) + - React-callinvoker (from `../node_modules/react-native/ReactCommon/callinvoker`) + - React-Codegen (from `build/generated/ios`) + - React-Core (from `../node_modules/react-native/`) + - React-Core/DevSupport (from `../node_modules/react-native/`) + - React-Core/RCTWebSocket (from `../node_modules/react-native/`) + - React-CoreModules (from `../node_modules/react-native/React/CoreModules`) + - React-cxxreact (from `../node_modules/react-native/ReactCommon/cxxreact`) + - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) + - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) + - React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`) + - React-logger (from `../node_modules/react-native/ReactCommon/logger`) + - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) + - React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`) + - React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`) + - React-RCTBlob (from `../node_modules/react-native/Libraries/Blob`) + - React-RCTImage (from `../node_modules/react-native/Libraries/Image`) + - React-RCTLinking (from `../node_modules/react-native/Libraries/LinkingIOS`) + - React-RCTNetwork (from `../node_modules/react-native/Libraries/Network`) + - React-RCTSettings (from `../node_modules/react-native/Libraries/Settings`) + - React-RCTText (from `../node_modules/react-native/Libraries/Text`) + - React-RCTVibration (from `../node_modules/react-native/Libraries/Vibration`) + - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`) + - ReactNativePassioSDK (from `../..`) + - rn-fetch-blob (from `../node_modules/rn-fetch-blob`) + - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) + +SPEC REPOS: + trunk: + - fmt + +EXTERNAL SOURCES: + boost: + :podspec: "../node_modules/react-native/third-party-podspecs/boost.podspec" + DoubleConversion: + :podspec: "../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec" + FBLazyVector: + :path: "../node_modules/react-native/Libraries/FBLazyVector" + FBReactNativeSpec: + :path: "../node_modules/react-native/React/FBReactNativeSpec" + glog: + :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + RCT-Folly: + :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" + RCTRequired: + :path: "../node_modules/react-native/Libraries/RCTRequired" + RCTTypeSafety: + :path: "../node_modules/react-native/Libraries/TypeSafety" + React: + :path: "../node_modules/react-native/" + React-callinvoker: + :path: "../node_modules/react-native/ReactCommon/callinvoker" + React-Codegen: + :path: build/generated/ios + React-Core: + :path: "../node_modules/react-native/" + React-CoreModules: + :path: "../node_modules/react-native/React/CoreModules" + React-cxxreact: + :path: "../node_modules/react-native/ReactCommon/cxxreact" + React-jsi: + :path: "../node_modules/react-native/ReactCommon/jsi" + React-jsiexecutor: + :path: "../node_modules/react-native/ReactCommon/jsiexecutor" + React-jsinspector: + :path: "../node_modules/react-native/ReactCommon/jsinspector" + React-logger: + :path: "../node_modules/react-native/ReactCommon/logger" + React-perflogger: + :path: "../node_modules/react-native/ReactCommon/reactperflogger" + React-RCTActionSheet: + :path: "../node_modules/react-native/Libraries/ActionSheetIOS" + React-RCTAnimation: + :path: "../node_modules/react-native/Libraries/NativeAnimation" + React-RCTBlob: + :path: "../node_modules/react-native/Libraries/Blob" + React-RCTImage: + :path: "../node_modules/react-native/Libraries/Image" + React-RCTLinking: + :path: "../node_modules/react-native/Libraries/LinkingIOS" + React-RCTNetwork: + :path: "../node_modules/react-native/Libraries/Network" + React-RCTSettings: + :path: "../node_modules/react-native/Libraries/Settings" + React-RCTText: + :path: "../node_modules/react-native/Libraries/Text" + React-RCTVibration: + :path: "../node_modules/react-native/Libraries/Vibration" + React-runtimeexecutor: + :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + ReactCommon: + :path: "../node_modules/react-native/ReactCommon" + ReactNativePassioSDK: + :path: "../.." + rn-fetch-blob: + :path: "../node_modules/rn-fetch-blob" + Yoga: + :path: "../node_modules/react-native/ReactCommon/yoga" + +SPEC CHECKSUMS: + boost: a7c83b31436843459a1961bfd74b96033dc77234 + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 + FBLazyVector: 2b47ff52037bd9ae07cc9b051c9975797814b736 + FBReactNativeSpec: 0e0d384ef17a33b385f13f0c7f97702c7cd17858 + fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 + glog: 476ee3e89abb49e07f822b48323c51c57124b572 + RCT-Folly: 4d8508a426467c48885f1151029bc15fa5d7b3b8 + RCTRequired: 0f06b6068f530932d10e1a01a5352fad4eaacb74 + RCTTypeSafety: b0ee81f10ef1b7d977605a2b266823dabd565e65 + React: 3becd12bd51ea8a43bdde7e09d0f40fba7820e03 + React-callinvoker: 11abfff50e6bf7a55b3a90b4dc2187f71f224593 + React-Codegen: f8946ce0768fb8e92e092e30944489c4b2955b2d + React-Core: 203cdb6ee2657b198d97d41031c249161060e6ca + React-CoreModules: 6eb0c06a4a223fde2cb6a8d0f44f58b67e808942 + React-cxxreact: afb0c6c07d19adbd850747fedeac20c6832d40b9 + React-jsi: 14d37a6db2af2c1a49f6f5c2e4ee667c364ae45c + React-jsiexecutor: 45c0496ca8cef6b02d9fa0274c25cf458fe91a56 + React-jsinspector: eb202e43b3879aba9a14f3f65788aec85d4e1ea9 + React-logger: 98f663b292a60967ebbc6d803ae96c1381183b6d + React-perflogger: 0458a87ea9a7342079e7a31b0d32b3734fb8415f + React-RCTActionSheet: 22538001ea2926dea001111dd2846c13a0730bc9 + React-RCTAnimation: 732ce66878d4aa151d56a0d142b1105aa12fd313 + React-RCTBlob: 9cb9e3e9a41d27be34aaf89b0e0f52c7ca415d57 + React-RCTImage: 6bd16627eb9c4bb79903c4cdec7c551266ee1a5b + React-RCTLinking: e9edfc8919c8fa9a3f3c7b34362811f58a2ebba4 + React-RCTNetwork: 880eccd21bbe2660a0b63da5ccba75c46eceeaa6 + React-RCTSettings: 8c85d8188c97d6c6bd470af6631a6c4555b79bb3 + React-RCTText: bbd275ee287730c5acbab1aadc0db39c25c5c64e + React-RCTVibration: 9819a3bf6230e4b2a99877c21268b0b2416157a1 + React-runtimeexecutor: b1f1995089b90696dbc2a7ffe0059a80db5c8eb1 + ReactCommon: 149e2c0acab9bac61378da0db5b2880a1b5ff59b + ReactNativePassioSDK: 2061fd1459e5d0fc5d7dd3e7168071d6a879983c + rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba + Yoga: c4d61225a466f250c35c1ee78d2d0b3d41fe661c + +PODFILE CHECKSUM: e880cd459938e144ef5c7f2c338f66f04744907c + +COCOAPODS: 1.11.3 diff --git a/example/ios/ReactNativeQuickstart.xcodeproj/project.pbxproj b/example/ios/ReactNativeQuickstart.xcodeproj/project.pbxproj new file mode 100644 index 0000000..901d4c8 --- /dev/null +++ b/example/ios/ReactNativeQuickstart.xcodeproj/project.pbxproj @@ -0,0 +1,940 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 8E24E86925DEE806009C758F /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8E24E86325DEE806009C758F /* LaunchScreen.storyboard */; }; + 8E24E86A25DEE806009C758F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E24E86525DEE806009C758F /* main.m */; }; + 8E24E86B25DEE806009C758F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8E24E86625DEE806009C758F /* Images.xcassets */; }; + 8E24E86C25DEE806009C758F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E24E86725DEE806009C758F /* AppDelegate.m */; }; + 8EA5258325D348DD009FAFE7 /* ReactNativeQuickstartTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8EA5258225D348DD009FAFE7 /* ReactNativeQuickstartTests.swift */; }; + D0D0679ECEE53F98FAF9BEA9 /* Pods_ReactNativeQuickstart.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A092D11748067BBD967C2B15 /* Pods_ReactNativeQuickstart.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 2D02E47A1E0B4A5D006451C7; + remoteInfo = "PassioSdkExample-tvOS"; + }; + 8EA5258525D348DD009FAFE7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 83CBB9F71A601CBA00E9B192 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 13B07F861A680F5B00A75B9A; + remoteInfo = PassioSdkExample; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 8E08D48A25D48EC100E36A80 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 13B07F961A680F5B00A75B9A /* ReactNativeQuickstart.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ReactNativeQuickstart.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E47B1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "ReactNativeQuickstart-tvOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 2D02E4901E0B4A5D006451C7 /* ReactNativeQuickstart-tvOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "ReactNativeQuickstart-tvOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; + 47F7ED3B7971BE374F7B8635 /* Pods-PassioSdkExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PassioSdkExample.debug.xcconfig"; path = "Target Support Files/Pods-PassioSdkExample/Pods-PassioSdkExample.debug.xcconfig"; sourceTree = ""; }; + 8E24E86325DEE806009C758F /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; + 8E24E86425DEE806009C758F /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; + 8E24E86525DEE806009C758F /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; + 8E24E86625DEE806009C758F /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 8E24E86725DEE806009C758F /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; + 8E24E86825DEE806009C758F /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8E24E8D325DEFB16009C758F /* main.jsbundle */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = main.jsbundle; sourceTree = ""; }; + 8EA5258025D348DD009FAFE7 /* ReactNativeQuickstartTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ReactNativeQuickstartTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 8EA5258225D348DD009FAFE7 /* ReactNativeQuickstartTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactNativeQuickstartTests.swift; sourceTree = ""; }; + 8EA5258425D348DD009FAFE7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8EC0120926CB00F0007A89B7 /* PassioSDKiOS.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = PassioSDKiOS.xcframework; path = ../../ios/Frameworks/PassioSDKiOS.xcframework; sourceTree = ""; }; + A092D11748067BBD967C2B15 /* Pods_ReactNativeQuickstart.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ReactNativeQuickstart.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + B43209A727A2A5D4475A07D0 /* Pods-ReactNativeQuickstart.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeQuickstart.debug.xcconfig"; path = "Target Support Files/Pods-ReactNativeQuickstart/Pods-ReactNativeQuickstart.debug.xcconfig"; sourceTree = ""; }; + D8275BA8740CD64EB98AD29E /* Pods-ReactNativeQuickstart.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ReactNativeQuickstart.release.xcconfig"; path = "Target Support Files/Pods-ReactNativeQuickstart/Pods-ReactNativeQuickstart.release.xcconfig"; sourceTree = ""; }; + E00ACF0FDA8BF921659E2F9A /* Pods-PassioSdkExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-PassioSdkExample.release.xcconfig"; path = "Target Support Files/Pods-PassioSdkExample/Pods-PassioSdkExample.release.xcconfig"; sourceTree = ""; }; + ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 13B07F8C1A680F5B00A75B9A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D0D0679ECEE53F98FAF9BEA9 /* Pods_ReactNativeQuickstart.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4781E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48D1E0B4A5D006451C7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8EA5257D25D348DD009FAFE7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { + isa = PBXGroup; + children = ( + ED297162215061F000B7C4FE /* JavaScriptCore.framework */, + 8EC0120926CB00F0007A89B7 /* PassioSDKiOS.xcframework */, + A092D11748067BBD967C2B15 /* Pods_ReactNativeQuickstart.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 6B9684456A2045ADE5A6E47E /* Pods */ = { + isa = PBXGroup; + children = ( + 47F7ED3B7971BE374F7B8635 /* Pods-PassioSdkExample.debug.xcconfig */, + E00ACF0FDA8BF921659E2F9A /* Pods-PassioSdkExample.release.xcconfig */, + B43209A727A2A5D4475A07D0 /* Pods-ReactNativeQuickstart.debug.xcconfig */, + D8275BA8740CD64EB98AD29E /* Pods-ReactNativeQuickstart.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; + 832341AE1AAA6A7D00B99B32 /* Libraries */ = { + isa = PBXGroup; + children = ( + ); + name = Libraries; + sourceTree = ""; + }; + 83CBB9F61A601CBA00E9B192 = { + isa = PBXGroup; + children = ( + 8E24E8D325DEFB16009C758F /* main.jsbundle */, + 8E24E86225DEE806009C758F /* ReactNativeQuickstart */, + 832341AE1AAA6A7D00B99B32 /* Libraries */, + 8EA5258125D348DD009FAFE7 /* ReactNativeQuickstartTests */, + 83CBBA001A601CBA00E9B192 /* Products */, + 2D16E6871FA4F8E400B85C8A /* Frameworks */, + 6B9684456A2045ADE5A6E47E /* Pods */, + ); + indentWidth = 2; + sourceTree = ""; + tabWidth = 2; + usesTabs = 0; + }; + 83CBBA001A601CBA00E9B192 /* Products */ = { + isa = PBXGroup; + children = ( + 13B07F961A680F5B00A75B9A /* ReactNativeQuickstart.app */, + 2D02E47B1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS.app */, + 2D02E4901E0B4A5D006451C7 /* ReactNativeQuickstart-tvOSTests.xctest */, + 8EA5258025D348DD009FAFE7 /* ReactNativeQuickstartTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 8E24E86225DEE806009C758F /* ReactNativeQuickstart */ = { + isa = PBXGroup; + children = ( + 8E24E86325DEE806009C758F /* LaunchScreen.storyboard */, + 8E24E86425DEE806009C758F /* AppDelegate.h */, + 8E24E86525DEE806009C758F /* main.m */, + 8E24E86625DEE806009C758F /* Images.xcassets */, + 8E24E86725DEE806009C758F /* AppDelegate.m */, + 8E24E86825DEE806009C758F /* Info.plist */, + ); + path = ReactNativeQuickstart; + sourceTree = ""; + }; + 8EA5258125D348DD009FAFE7 /* ReactNativeQuickstartTests */ = { + isa = PBXGroup; + children = ( + 8EA5258225D348DD009FAFE7 /* ReactNativeQuickstartTests.swift */, + 8EA5258425D348DD009FAFE7 /* Info.plist */, + ); + path = ReactNativeQuickstartTests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 13B07F861A680F5B00A75B9A /* ReactNativeQuickstart */ = { + isa = PBXNativeTarget; + buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart" */; + buildPhases = ( + 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */, + FD10A7F022414F080027D42C /* Start Packager */, + 13B07F871A680F5B00A75B9A /* Sources */, + 13B07F8C1A680F5B00A75B9A /* Frameworks */, + 13B07F8E1A680F5B00A75B9A /* Resources */, + 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, + 8E08D48A25D48EC100E36A80 /* Embed Frameworks */, + 1F8F576F8ABD7BAC0B18DB27 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ReactNativeQuickstart; + productName = PassioSdkExample; + productReference = 13B07F961A680F5B00A75B9A /* ReactNativeQuickstart.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E47A1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart-tvOS" */; + buildPhases = ( + FD10A7F122414F3F0027D42C /* Start Packager */, + 2D02E4771E0B4A5D006451C7 /* Sources */, + 2D02E4781E0B4A5D006451C7 /* Frameworks */, + 2D02E4791E0B4A5D006451C7 /* Resources */, + 2D02E4CB1E0B4B27006451C7 /* Bundle React Native Code And Images */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "ReactNativeQuickstart-tvOS"; + productName = "PassioSdkExample-tvOS"; + productReference = 2D02E47B1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS.app */; + productType = "com.apple.product-type.application"; + }; + 2D02E48F1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOSTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart-tvOSTests" */; + buildPhases = ( + 2D02E48C1E0B4A5D006451C7 /* Sources */, + 2D02E48D1E0B4A5D006451C7 /* Frameworks */, + 2D02E48E1E0B4A5D006451C7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */, + ); + name = "ReactNativeQuickstart-tvOSTests"; + productName = "PassioSdkExample-tvOSTests"; + productReference = 2D02E4901E0B4A5D006451C7 /* ReactNativeQuickstart-tvOSTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 8EA5257F25D348DD009FAFE7 /* ReactNativeQuickstartTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 8EA5258725D348DD009FAFE7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstartTests" */; + buildPhases = ( + 8EA5257C25D348DD009FAFE7 /* Sources */, + 8EA5257D25D348DD009FAFE7 /* Frameworks */, + 8EA5257E25D348DD009FAFE7 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 8EA5258625D348DD009FAFE7 /* PBXTargetDependency */, + ); + name = ReactNativeQuickstartTests; + productName = PassioSdkExampleTests; + productReference = 8EA5258025D348DD009FAFE7 /* ReactNativeQuickstartTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 83CBB9F71A601CBA00E9B192 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1230; + LastUpgradeCheck = 1340; + TargetAttributes = { + 13B07F861A680F5B00A75B9A = { + DevelopmentTeam = LCT9TTNDNR; + LastSwiftMigration = 1120; + }; + 2D02E47A1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + }; + 2D02E48F1E0B4A5D006451C7 = { + CreatedOnToolsVersion = 8.2.1; + ProvisioningStyle = Automatic; + TestTargetID = 2D02E47A1E0B4A5D006451C7; + }; + 8EA5257F25D348DD009FAFE7 = { + CreatedOnToolsVersion = 12.3; + DevelopmentTeam = S6KCQR7CVM; + ProvisioningStyle = Automatic; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + }; + }; + buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeQuickstart" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 83CBB9F61A601CBA00E9B192; + productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 13B07F861A680F5B00A75B9A /* ReactNativeQuickstart */, + 2D02E47A1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS */, + 2D02E48F1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOSTests */, + 8EA5257F25D348DD009FAFE7 /* ReactNativeQuickstartTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 13B07F8E1A680F5B00A75B9A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8E24E86925DEE806009C758F /* LaunchScreen.storyboard in Resources */, + 8E24E86B25DEE806009C758F /* Images.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4791E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48E1E0B4A5D006451C7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8EA5257E25D348DD009FAFE7 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + 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 = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + }; + 1F8F576F8ABD7BAC0B18DB27 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ReactNativeQuickstart/Pods-ReactNativeQuickstart-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/DoubleConversion/DoubleConversion.framework", + "${BUILT_PRODUCTS_DIR}/FBReactNativeSpec/FBReactNativeSpec.framework", + "${BUILT_PRODUCTS_DIR}/Folly/folly.framework", + "${BUILT_PRODUCTS_DIR}/RCTTypeSafety/RCTTypeSafety.framework", + "${BUILT_PRODUCTS_DIR}/React-Core/React.framework", + "${BUILT_PRODUCTS_DIR}/React-CoreModules/CoreModules.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTAnimation/RCTAnimation.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTBlob/RCTBlob.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTImage/RCTImage.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTLinking/RCTLinking.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTNetwork/RCTNetwork.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTSettings/RCTSettings.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTText/RCTText.framework", + "${BUILT_PRODUCTS_DIR}/React-RCTVibration/RCTVibration.framework", + "${BUILT_PRODUCTS_DIR}/React-cxxreact/cxxreact.framework", + "${BUILT_PRODUCTS_DIR}/React-jsi/jsi.framework", + "${BUILT_PRODUCTS_DIR}/React-jsiexecutor/jsireact.framework", + "${BUILT_PRODUCTS_DIR}/React-jsinspector/jsinspector.framework", + "${BUILT_PRODUCTS_DIR}/ReactCommon/ReactCommon.framework", + "${BUILT_PRODUCTS_DIR}/ReactNativePassioSDK/ReactNativePassioSDK.framework", + "${BUILT_PRODUCTS_DIR}/Yoga/yoga.framework", + "${BUILT_PRODUCTS_DIR}/glog/glog.framework", + "${BUILT_PRODUCTS_DIR}/rn-fetch-blob/rn_fetch_blob.framework", + "${PODS_XCFRAMEWORKS_BUILD_DIR}/ReactNativePassioSDK/PassioNutritionAISDK.framework/PassioNutritionAISDK", + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DoubleConversion.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FBReactNativeSpec.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/folly.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTTypeSafety.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/React.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CoreModules.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTAnimation.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTBlob.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTImage.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTLinking.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTNetwork.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTSettings.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTText.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RCTVibration.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/cxxreact.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsi.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsireact.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/jsinspector.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactCommon.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ReactNativePassioSDK.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/yoga.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/glog.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/rn_fetch_blob.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PassioNutritionAISDK.framework", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReactNativeQuickstart/Pods-ReactNativeQuickstart-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 2D02E4CB1E0B4B27006451C7 /* 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 = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh"; + }; + 4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ReactNativeQuickstart-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + FD10A7F022414F080027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; + FD10A7F122414F3F0027D42C /* Start Packager */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + name = "Start Packager"; + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 13B07F871A680F5B00A75B9A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8E24E86C25DEE806009C758F /* AppDelegate.m in Sources */, + 8E24E86A25DEE806009C758F /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E4771E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 2D02E48C1E0B4A5D006451C7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8EA5257C25D348DD009FAFE7 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8EA5258325D348DD009FAFE7 /* ReactNativeQuickstartTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 2D02E4921E0B4A5D006451C7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 2D02E47A1E0B4A5D006451C7 /* ReactNativeQuickstart-tvOS */; + targetProxy = 2D02E4911E0B4A5D006451C7 /* PBXContainerItemProxy */; + }; + 8EA5258625D348DD009FAFE7 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 13B07F861A680F5B00A75B9A /* ReactNativeQuickstart */; + targetProxy = 8EA5258525D348DD009FAFE7 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 13B07F941A680F5B00A75B9A /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = B43209A727A2A5D4475A07D0 /* Pods-ReactNativeQuickstart.debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 10; + DEVELOPMENT_TEAM = LCT9TTNDNR; + ENABLE_BITCODE = NO; + FRAMEWORK_SEARCH_PATHS = ( + "$(SRCROOT)/../../ios/Frameworks/**", + "$(inherited)", + ); + INFOPLIST_FILE = ReactNativeQuickstart/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.4.8; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.passiolife.reactnativequickstart; + PRODUCT_NAME = ReactNativeQuickstart; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 13B07F951A680F5B00A75B9A /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = D8275BA8740CD64EB98AD29E /* Pods-ReactNativeQuickstart.release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = 10; + DEVELOPMENT_TEAM = LCT9TTNDNR; + FRAMEWORK_SEARCH_PATHS = ( + "$(SRCROOT)/../../ios/Frameworks/**", + "$(inherited)", + ); + INFOPLIST_FILE = ReactNativeQuickstart/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + MARKETING_VERSION = 1.4.8; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.passiolife.reactnativequickstart; + PRODUCT_NAME = ReactNativeQuickstart; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; + 2D02E4971E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "PassioSdkExample-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.PassioSdkExample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Debug; + }; + 2D02E4981E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image"; + ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "PassioSdkExample-tvOS/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.PassioSdkExample-tvOS"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TARGETED_DEVICE_FAMILY = 3; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Release; + }; + 2D02E4991E0B4A5E006451C7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_TESTABILITY = YES; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "PassioSdkExample-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.PassioSdkExample-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeQuickstart-tvOS.app/ReactNativeQuickstart-tvOS"; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Debug; + }; + 2D02E49A1E0B4A5E006451C7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_NO_COMMON_BLOCKS = YES; + INFOPLIST_FILE = "PassioSdkExample-tvOSTests/Info.plist"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + OTHER_LDFLAGS = ( + "$(inherited)", + "-ObjC", + "-lc++", + ); + PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.PassioSdkExample-tvOSTests"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SDKROOT = appletvos; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeQuickstart-tvOS.app/ReactNativeQuickstart-tvOS"; + TVOS_DEPLOYMENT_TARGET = 12.0; + }; + name = Release; + }; + 83CBBA201A601CBA00E9B192 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + 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; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LIBRARY_SEARCH_PATHS = ( + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + VALIDATE_WORKSPACE = YES; + }; + name = Debug; + }; + 83CBBA211A601CBA00E9B192 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + 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_NO_COMMON_BLOCKS = YES; + 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; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; + LIBRARY_SEARCH_PATHS = ( + "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", + "\"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)\"", + "\"$(inherited)\"", + ); + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + VALIDATE_PRODUCT = YES; + VALIDATE_WORKSPACE = YES; + }; + name = Release; + }; + 8EA5258825D348DD009FAFE7 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + DEBUG_INFORMATION_FORMAT = dwarf; + DEVELOPMENT_TEAM = S6KCQR7CVM; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = PassioSdkExampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PassioSdkExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeQuickstart.app/ReactNativeQuickstart"; + }; + name = Debug; + }; + 8EA5258925D348DD009FAFE7 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_STYLE = Automatic; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DEVELOPMENT_TEAM = S6KCQR7CVM; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = PassioSdkExampleTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 14.3; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MTL_FAST_MATH = YES; + PRODUCT_BUNDLE_IDENTIFIER = com.example.PassioSdkExampleTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ReactNativeQuickstart.app/ReactNativeQuickstart"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 13B07F941A680F5B00A75B9A /* Debug */, + 13B07F951A680F5B00A75B9A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BA1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart-tvOS" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4971E0B4A5E006451C7 /* Debug */, + 2D02E4981E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 2D02E4BB1E0B4A5E006451C7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstart-tvOSTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2D02E4991E0B4A5E006451C7 /* Debug */, + 2D02E49A1E0B4A5E006451C7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "ReactNativeQuickstart" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 83CBBA201A601CBA00E9B192 /* Debug */, + 83CBBA211A601CBA00E9B192 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 8EA5258725D348DD009FAFE7 /* Build configuration list for PBXNativeTarget "ReactNativeQuickstartTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8EA5258825D348DD009FAFE7 /* Debug */, + 8EA5258925D348DD009FAFE7 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 83CBB9F71A601CBA00E9B192 /* Project object */; +} diff --git a/example/ios/ReactNativeQuickstart.xcodeproj/xcshareddata/xcschemes/ReactNativeQuickstart.xcscheme b/example/ios/ReactNativeQuickstart.xcodeproj/xcshareddata/xcschemes/ReactNativeQuickstart.xcscheme new file mode 100644 index 0000000..30b257e --- /dev/null +++ b/example/ios/ReactNativeQuickstart.xcodeproj/xcshareddata/xcschemes/ReactNativeQuickstart.xcscheme @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/ReactNativeQuickstart.xcworkspace/contents.xcworkspacedata b/example/ios/ReactNativeQuickstart.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..b0a2471 --- /dev/null +++ b/example/ios/ReactNativeQuickstart.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/example/ios/ReactNativeQuickstart.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/ReactNativeQuickstart.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/ReactNativeQuickstart.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/ReactNativeQuickstart/AppDelegate.h b/example/ios/ReactNativeQuickstart/AppDelegate.h new file mode 100644 index 0000000..9484e8a --- /dev/null +++ b/example/ios/ReactNativeQuickstart/AppDelegate.h @@ -0,0 +1,10 @@ + + +#import +#import + +@interface AppDelegate : UIResponder + +@property (nonatomic, strong) UIWindow *window; + +@end diff --git a/example/ios/ReactNativeQuickstart/AppDelegate.m b/example/ios/ReactNativeQuickstart/AppDelegate.m new file mode 100644 index 0000000..e89d758 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/AppDelegate.m @@ -0,0 +1,56 @@ +#import "AppDelegate.h" + +#import +#import +#import + +#ifdef FB_SONARKIT_ENABLED +#import +#import +#import +#import +#import +#import +static void InitializeFlipper(UIApplication *application) { + FlipperClient *client = [FlipperClient sharedClient]; + SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; + [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; + [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; + [client addPlugin:[FlipperKitReactPlugin new]]; + [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; + [client start]; +} +#endif + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + #ifdef FB_SONARKIT_ENABLED + InitializeFlipper(application); + #endif + RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions]; + RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge + moduleName:@"PassioSdkExample" + initialProperties:nil]; + + rootView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1]; + + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; + UIViewController *rootViewController = [UIViewController new]; + rootViewController.view = rootView; + self.window.rootViewController = rootViewController; + [self.window makeKeyAndVisible]; + return YES; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Contents.json b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..04c5f72 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "filename" : "Icon-App-20x20@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-20x20@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-29x29@1x-1.png", + "idiom" : "iphone", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-29x29@2x-1.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-29x29@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-40x40@2x-1.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-40x40@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-60x60@2x.png", + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "filename" : "Icon-App-60x60@3x.png", + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "filename" : "Icon-App-20x20@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-20x20@2x-1.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" + }, + { + "filename" : "Icon-App-29x29@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-29x29@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "29x29" + }, + { + "filename" : "Icon-App-40x40@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-40x40@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "40x40" + }, + { + "filename" : "Icon-App-76x76@1x.png", + "idiom" : "ipad", + "scale" : "1x", + "size" : "76x76" + }, + { + "filename" : "Icon-App-76x76@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "76x76" + }, + { + "filename" : "Icon-App-83.5x83.5@2x.png", + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "filename" : "ItunesArtwork@2x.png", + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..001fff8 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png new file mode 100644 index 0000000..e2a837a Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x-1.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..e2a837a Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..a153a50 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png new file mode 100644 index 0000000..ef066c9 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x-1.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..ef066c9 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png new file mode 100644 index 0000000..ca5f1a3 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x-1.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..ca5f1a3 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..0bd6793 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..e2a837a Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png new file mode 100644 index 0000000..c26c661 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x-1.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c26c661 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..881d30f Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..881d30f Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..798370c Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..1c13c00 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..95b861f Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..2e37e02 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png new file mode 100644 index 0000000..0ec064a Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png differ diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/Contents.json b/example/ios/ReactNativeQuickstart/Images.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/Contents.json b/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/Contents.json new file mode 100644 index 0000000..ee09c70 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "passio_logo.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/passio_logo.png b/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/passio_logo.png new file mode 100644 index 0000000..e907618 Binary files /dev/null and b/example/ios/ReactNativeQuickstart/Images.xcassets/passio_logo.imageset/passio_logo.png differ diff --git a/example/ios/ReactNativeQuickstart/Info.plist b/example/ios/ReactNativeQuickstart/Info.plist new file mode 100644 index 0000000..0fe97cb --- /dev/null +++ b/example/ios/ReactNativeQuickstart/Info.plist @@ -0,0 +1,57 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + RN Quick Start + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(MARKETING_VERSION) + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSExceptionDomains + + localhost + + NSExceptionAllowsInsecureHTTPLoads + + + + + NSCameraUsageDescription + The camera is used for real-time food detection. + NSLocationWhenInUseUsageDescription + + UILaunchStoryboardName + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + + UIViewControllerBasedStatusBarAppearance + + + diff --git a/example/ios/ReactNativeQuickstart/LaunchScreen.storyboard b/example/ios/ReactNativeQuickstart/LaunchScreen.storyboard new file mode 100644 index 0000000..b973452 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/LaunchScreen.storyboard @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/ReactNativeQuickstart/main.m b/example/ios/ReactNativeQuickstart/main.m new file mode 100644 index 0000000..c316cf8 --- /dev/null +++ b/example/ios/ReactNativeQuickstart/main.m @@ -0,0 +1,16 @@ +/** + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#import + +#import "AppDelegate.h" + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); + } +} diff --git a/example/ios/ReactNativeQuickstartTests/Info.plist b/example/ios/ReactNativeQuickstartTests/Info.plist new file mode 100644 index 0000000..64d65ca --- /dev/null +++ b/example/ios/ReactNativeQuickstartTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/example/ios/ReactNativeQuickstartTests/ReactNativeQuickstartTests.swift b/example/ios/ReactNativeQuickstartTests/ReactNativeQuickstartTests.swift new file mode 100644 index 0000000..6e3f405 --- /dev/null +++ b/example/ios/ReactNativeQuickstartTests/ReactNativeQuickstartTests.swift @@ -0,0 +1,32 @@ +// +// ReactNativeQuickstartTests.swift +// ReactNativeQuickstartTests +// +// Created by Patrick Goley on 2/9/21. +// + +import XCTest + +class PassioSdkExampleTests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testPerformanceExample() throws { + // This is an example of a performance test case. + measure { + // Put the code you want to measure the time of here. + } + } + +} diff --git a/example/metro.config.js b/example/metro.config.js new file mode 100644 index 0000000..78ba911 --- /dev/null +++ b/example/metro.config.js @@ -0,0 +1,40 @@ +const path = require('path') +const blacklist = require('metro-config/src/defaults/blacklist') +const escape = require('escape-string-regexp') +const pak = require('../package.json') + +const root = path.resolve(__dirname, '..') + +const modules = Object.keys({ + ...pak.peerDependencies, +}) + +module.exports = { + projectRoot: __dirname, + watchFolders: [root], + + // We need to make sure that only one version is loaded for peerDependencies + // So we blacklist them at the root, and alias them to the versions in example's node_modules + resolver: { + blacklistRE: blacklist( + modules.map( + (m) => + new RegExp(`^${escape(path.join(root, 'node_modules', m))}\\/.*$`) + ) + ), + + extraNodeModules: modules.reduce((acc, name) => { + acc[name] = path.join(__dirname, 'node_modules', name) + return acc + }, {}), + }, + + transformer: { + getTransformOptions: async () => ({ + transform: { + experimentalImportSupport: false, + inlineRequires: true, + }, + }), + }, +} diff --git a/example/package.json b/example/package.json new file mode 100644 index 0000000..7a59428 --- /dev/null +++ b/example/package.json @@ -0,0 +1,28 @@ +{ + "name": "nutritionai-react-native-sdk-v2-example", + "description": "Example app for nutritionai-react-native-sdk-v2", + "version": "1.0.0", + "private": true, + "scripts": { + "android": "adb reverse tcp:8081 tcp:8081 && react-native start", + "ios": "react-native run-ios", + "bundle-ios": "react-native bundle --dev false --entry-file index.js --bundle-output ios/main.jsbundle --platform ios", + "start": "react-native start", + "adb-tcp": "adb reverse tcp:8081 tcp:8081", + "bundle-android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/", + "release-apk": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/build/intermediates/res/merged/release/ && rm -rf android/app/src/main/res/drawable-* && rm -rf android/app/src/main/res/raw/*", + "reinstall": "cd ..; yarn prepare && cd example; rm -rf node_modules/ && rm -rf yarn.lock && yarn && cd ios; pod install; cd .." + }, + "dependencies": { + "@passiolife/nutritionai-react-native-sdk-v2": "link:../", + "react": "17.0.2 ", + "react-native": "0.68.5", + "rn-fetch-blob": "^0.12.0" + }, + "devDependencies": { + "@babel/core": "^7.12.9", + "@babel/runtime": "^7.12.5", + "babel-plugin-module-resolver": "^4.0.0", + "metro-react-native-babel-preset": "^0.67.0" + } +} diff --git a/example/src/App.hooks.tsx b/example/src/App.hooks.tsx new file mode 100644 index 0000000..edf5148 --- /dev/null +++ b/example/src/App.hooks.tsx @@ -0,0 +1,104 @@ +import { useEffect, useState } from 'react' + +import { + CompletedDownloadingFile, + DownloadingError, + PassioSDK, +} from '@passiolife/nutritionai-react-native-sdk-v2' +import { downloadFile } from './utils/downloadFile' + +export type SDKStatus = 'init' | 'downloading' | 'error' | 'ready' + +export const usePassioSDK = ({ + key, + debugMode = false, + autoUpdate = false, +}: { + key: string + debugMode?: boolean + autoUpdate?: boolean +}) => { + const [localModelURLs, setLocalModelURLs] = useState() + const [missingFiles, setMissingFiles] = useState([]) + const [loadingState, setLoadingState] = useState('init') + const [leftFile, setDownloadingLeft] = useState(null) + + useEffect(() => { + async function configure() { + try { + const status = await PassioSDK.configure({ + key: key, + debugMode: debugMode, + autoUpdate: autoUpdate, + localModelURLs: autoUpdate ? undefined : localModelURLs, + }) + switch (status.mode) { + case 'notReady': + setMissingFiles(status.missingFiles) + return + case 'isReadyForDetection': + setLoadingState('ready') + return + case 'error': + console.error(`PassioSDK Error ${status.errorMessage}`) + setLoadingState('error') + return + } + } catch (err) { + console.error(`PassioSDK Error ${err}`) + setLoadingState('error') + } + } + configure() + }, [key, localModelURLs, debugMode, autoUpdate]) + + useEffect(() => { + if (!missingFiles.length) { + return + } + async function download() { + setLoadingState('downloading') + const downloads = missingFiles.map(downloadFile) + try { + const localFiles = await Promise.all(downloads) + setLocalModelURLs(localFiles) + } catch (err) { + console.error(`PassioSDK Error ${err}`) + setLoadingState('error') + } + } + download() + }, [missingFiles]) + + useEffect(() => { + const callBacks = PassioSDK.onDowloadingPassioModelCallBacks({ + completedDownloadingFile: ({ filesLeft }: CompletedDownloadingFile) => { + console.log('filesLeft ===>', filesLeft) + setDownloadingLeft(filesLeft) + }, + downloadingError: ({ message }: DownloadingError) => { + console.log('DownloadingError ===>', message) + }, + }) + return () => callBacks.remove() + }, []) + + return { + loadingState, + leftFile, + } +} + +export const useCameraAuthorization = () => { + const [authorized, setAuthorized] = useState(false) + + useEffect(() => { + async function getAuth() { + const isAuthorized = await PassioSDK.requestCameraAuthorization() + setAuthorized(isAuthorized) + } + getAuth() + }, []) + + return authorized +} diff --git a/example/src/App.tsx b/example/src/App.tsx new file mode 100644 index 0000000..b7da735 --- /dev/null +++ b/example/src/App.tsx @@ -0,0 +1,24 @@ +import * as React from 'react' +import { StyleSheet, View } from 'react-native' +import { LoadingContainerView } from './LoadingContainerView' + +export default function App() { + return ( + + + + ) +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: 'center', + justifyContent: 'center', + }, + box: { + width: 60, + height: 60, + marginVertical: 20, + }, +}) diff --git a/example/src/DetectionLabelListView.tsx b/example/src/DetectionLabelListView.tsx new file mode 100644 index 0000000..37741dd --- /dev/null +++ b/example/src/DetectionLabelListView.tsx @@ -0,0 +1,88 @@ +import { + IconSize, + PassioIDEntityType, + PassioIconView, +} from '@passiolife/nutritionai-react-native-sdk-v2' +import { StyleSheet, Text, View } from 'react-native' + +import React from 'react' + +export interface Candidate { + name: string + passioID: string + entityType: PassioIDEntityType + foodItem?: { + ingredientsDescription?: string + } +} + +interface Props { + candidates: Candidate[] +} + +export const DetectionLabelListView = (props: Props) => { + return ( + + {props.candidates.map((candidate, i) => ( + + ))} + + ) +} + +const CandidateView = ({ name, passioID, foodItem, entityType }: Candidate) => { + return ( + + + {passioID ? ( + + ) : null} + {name} + + {foodItem?.ingredientsDescription ? ( + + {foodItem.ingredientsDescription} + + ) : null} + + ) +} + +const styles = StyleSheet.create({ + container: { + backgroundColor: 'rgba(0, 0, 0, 0)', + flex: 1, + justifyContent: 'flex-end', + }, + candidate: { + backgroundColor: '#333333', + padding: 6, + }, + row: { + flexDirection: 'row', + justifyContent: 'flex-start', + }, + item: { + fontSize: 20, + fontWeight: '400', + height: '100%', + padding: 6, + textTransform: 'capitalize', + color: 'white', + }, + icon: { + width: 50, + height: 50, + }, + ingredients: { + opacity: 0.8, + color: 'white', + }, +}) diff --git a/example/src/FoodDetectionView.tsx b/example/src/FoodDetectionView.tsx new file mode 100644 index 0000000..2aa3311 --- /dev/null +++ b/example/src/FoodDetectionView.tsx @@ -0,0 +1,167 @@ +import { + BarcodeCandidate, + DetectedCandidate, + DetectionCameraView, + FoodDetectionConfig, + FoodDetectionEvent, + PackagedFoodCode, + PassioIDAttributes, + PassioSDK, +} from '@passiolife/nutritionai-react-native-sdk-v2' +import { Candidate, DetectionLabelListView } from './DetectionLabelListView' +import React, { useEffect, useState } from 'react' +import { StyleSheet, Text, TouchableOpacity, View } from 'react-native' + +type State = { + candidates: Candidate[] +} + +type Props = { onStopPressed: () => void } + +const eventLogging = false +const attributeLogging = false + +export const FoodDectionView = (props: Props) => { + const [state, setState] = useState({ candidates: [] }) + + useEffect(() => { + const config: FoodDetectionConfig = { + detectBarcodes: true, + detectPackagedFood: true, + detectNutritionFacts: true, + } + const subscription = PassioSDK.startFoodDetection( + config, + async (detection: FoodDetectionEvent) => { + if (eventLogging) { + console.log( + 'Food detection event: \n', + JSON.stringify(detection, null, 2) + ) + } + const { candidates, nutritionFacts } = detection + if (candidates?.barcodeCandidates?.length) { + const attributes = await getAttributesForBarcodeCandidates( + candidates.barcodeCandidates + ) + setState({ candidates: attributes }) + } else if (candidates?.packagedFoodCode?.length) { + const attributes = await getAttributesForPackagedFoodCandidates( + candidates.packagedFoodCode + ) + setState({ candidates: attributes }) + } else if (candidates?.detectedCandidates?.length) { + const attributes = await getAttributesFromVisualCandidates( + candidates.detectedCandidates + ) + setState({ + candidates: attributes, + }) + } else if (nutritionFacts) { + console.log(nutritionFacts) + //TODO UI for nutrition facts + } else { + setState({ candidates: [] }) + } + } + ) + return () => subscription.remove() + }, []) + + return ( + + + + + + + + ✕ + + + + ) +} + +const styles = StyleSheet.create({ + container: { + backgroundColor: 'black', + width: '100%', + flex: 1, + flexDirection: 'column', + }, + camera: { + flex: 1, + }, + text: { + color: 'white', + fontSize: 30, + }, + labelOverlay: { + position: 'absolute', + paddingBottom: 50, + width: '100%', + height: '100%', + }, + closeButton: { + position: 'absolute', + top: 45, + right: 25, + color: 'white', + }, +}) + +async function getAttributesFromVisualCandidates( + candidates: DetectedCandidate[] +): Promise { + const getAttributes = candidates.map(({ passioID }) => { + return PassioSDK.getAttributesForPassioID(passioID).then( + (attr: PassioIDAttributes | null) => { + attributeLogging && + console.log( + 'Got visual candidate attributes ', + JSON.stringify(attr, null, 2) + ) + return attr + } + ) + }) + const attrs = await Promise.all(getAttributes) + return attrs.filter(notEmpty) +} + +async function getAttributesForBarcodeCandidates( + candidates: BarcodeCandidate[] +): Promise { + const getAttributes = candidates.map(({ barcode }) => { + return PassioSDK.fetchAttributesForBarcode(barcode).then( + (attr: PassioIDAttributes | null) => { + attributeLogging && + console.log('Got barcode attributes ', JSON.stringify(attr, null, 2)) + return attr + } + ) + }) + const attrs = await Promise.all(getAttributes) + return attrs.filter(notEmpty) +} + +async function getAttributesForPackagedFoodCandidates( + candidates: PackagedFoodCode[] +): Promise { + const getAttributes = candidates.map((packagedFoodCode) => { + return PassioSDK.fetchPassioIDAttributesForPackagedFood( + packagedFoodCode + ).then((attr: PassioIDAttributes | null) => { + attributeLogging && + console.log('Got OCR attributes ', JSON.stringify(attr, null, 2)) + return attr + }) + }) + const attrs = await Promise.all(getAttributes) + return attrs.filter(notEmpty) +} + +function notEmpty(value: TValue | null | undefined): value is TValue { + return value !== null && value !== undefined +} diff --git a/example/src/LoadingContainerView.tsx b/example/src/LoadingContainerView.tsx new file mode 100644 index 0000000..3c9ffa6 --- /dev/null +++ b/example/src/LoadingContainerView.tsx @@ -0,0 +1,74 @@ +import React, { useCallback, useState } from 'react' +import { StyleSheet, View, Image, Button, Text } from 'react-native' +import { FoodDectionView } from './FoodDetectionView' +import { SDKStatus, useCameraAuthorization, usePassioSDK } from './App.hooks' + +export const LoadingContainerView = () => { + const [isStarted, setIsStarted] = useState(false) + + const cameraAuthorized = useCameraAuthorization() + + const sdkStatus = usePassioSDK({ + key: '', + autoUpdate: true, + }) + + const onStart = useCallback(() => { + setIsStarted(true) + }, []) + + const onStop = useCallback(() => { + setIsStarted(false) + }, []) + + if (isStarted) { + return + } + + return ( + + ) +} + +const logo = require('./assets/passio_logo.png') + +const LoadingView = (props: { + status: SDKStatus + cameraAuthorized: boolean + fileLeft: number | null + onPressStart: () => void +}) => { + return ( + + + {props.status === 'downloading' ? ( + {`'Downloading models... `} + ) : null} + {props.status === 'error' ? {'Error!'} : null} + {props.fileLeft !== null && props.fileLeft !== 0 ? ( + {`Downloading file lefts... ${props.fileLeft}`} + ) : null} + {props.status === 'ready' && props.cameraAuthorized ? ( +