Showing preview only (1,181K chars total). Download the full file or copy to clipboard to get everything.
Repository: olofd/react-native-photos-framework
Branch: master
Commit: adaa91d8bd13
Files: 333
Total size: 1.1 MB
Directory structure:
gitextract_pkp7bq6l/
├── .gitignore
├── .travis.yml
├── .vscode/
│ └── launch.json
├── .watchmanconfig
├── LICENSE
├── Makefile
├── README.md
├── __tests__/
│ └── change-observer-handler.test.js
├── event-emitter.js
├── example/
│ ├── .babelrc
│ ├── .buckconfig
│ ├── .flowconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .npmignore
│ ├── .vscode/
│ │ ├── launch.json
│ │ ├── launchReactNative.js
│ │ └── typings/
│ │ ├── react/
│ │ │ ├── react-addons-create-fragment.d.ts
│ │ │ ├── react-addons-css-transition-group.d.ts
│ │ │ ├── react-addons-linked-state-mixin.d.ts
│ │ │ ├── react-addons-perf.d.ts
│ │ │ ├── react-addons-pure-render-mixin.d.ts
│ │ │ ├── react-addons-test-utils.d.ts
│ │ │ ├── react-addons-transition-group.d.ts
│ │ │ ├── react-addons-update.d.ts
│ │ │ ├── react-dom.d.ts
│ │ │ ├── react-global.d.ts
│ │ │ └── react.d.ts
│ │ └── react-native/
│ │ └── react-native.d.ts
│ ├── .watchmanconfig
│ ├── README.md
│ ├── album-list.js
│ ├── android/
│ │ ├── app/
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── example/
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res/
│ │ │ └── values/
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle/
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── keystores/
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── index.android.js
│ ├── index.ios-ajax.js
│ ├── index.ios.js
│ ├── ios/
│ │ ├── Example/
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj/
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets/
│ │ │ │ └── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ ├── Example.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── xcshareddata/
│ │ │ └── xcschemes/
│ │ │ └── Example.xcscheme
│ │ └── ExampleTests/
│ │ ├── ExampleTests.m
│ │ └── Info.plist
│ ├── library-test.js
│ ├── package.json
│ ├── react-native-camera-roll-picker/
│ │ ├── ImageItem.js
│ │ ├── camera-roll-picker.js
│ │ └── index.ios.js
│ ├── react-native-photos-framework/
│ │ ├── event-emitter.js
│ │ └── index.js
│ └── tsconfig.json
├── index.js
├── install.js
├── ios/
│ ├── RNPhotosFramework/
│ │ ├── ImageHelpers.h
│ │ ├── ImageHelpers.m
│ │ ├── PHAssetWithCollectionIndex.h
│ │ ├── PHAssetWithCollectionIndex.m
│ │ ├── PHAssetsService.h
│ │ ├── PHAssetsService.m
│ │ ├── PHCache.h
│ │ ├── PHCache.m
│ │ ├── PHCachedFetchResult.h
│ │ ├── PHCachedFetchResult.m
│ │ ├── PHCachingImageManagerInstance.h
│ │ ├── PHCachingImageManagerInstance.m
│ │ ├── PHCancellationToken.h
│ │ ├── PHCancellationToken.m
│ │ ├── PHCancellationTokenManager.h
│ │ ├── PHCancellationTokenManager.m
│ │ ├── PHChangeObserver.h
│ │ ├── PHChangeObserver.m
│ │ ├── PHCollectionService.h
│ │ ├── PHCollectionService.m
│ │ ├── PHCreateMediaQueue.h
│ │ ├── PHCreateMediaQueue.m
│ │ ├── PHFetchOptionsService.h
│ │ ├── PHFetchOptionsService.m
│ │ ├── PHOperationResult.h
│ │ ├── PHOperationResult.m
│ │ ├── PHSaveAsset.h
│ │ ├── PHSaveAsset.m
│ │ ├── PHSaveAssetFileRequest.h
│ │ ├── PHSaveAssetFileRequest.m
│ │ ├── PHSaveAssetRequest.h
│ │ ├── PHSaveAssetRequest.m
│ │ ├── PHSaveAssetToFileOperationResult.h
│ │ ├── PHSaveAssetToFileOperationResult.m
│ │ ├── PHVideoExporter.h
│ │ ├── PHVideoExporter.m
│ │ ├── RCTConvert+RNPhotosFramework.h
│ │ ├── RCTConvert+RNPhotosFramework.m
│ │ ├── RCTImageResizer.h
│ │ ├── RCTImageResizer.m
│ │ ├── RNPFFileDownloader.h
│ │ ├── RNPFFileDownloader.m
│ │ ├── RNPFGlobals.h
│ │ ├── RNPFHelpers.h
│ │ ├── RNPFHelpers.m
│ │ ├── RNPFImageLoader.h
│ │ ├── RNPFImageLoader.m
│ │ ├── RNPFManager.h
│ │ ├── RNPFManager.m
│ │ ├── RNPFUrlRequestHandler.h
│ │ ├── RNPFUrlRequestHandler.m
│ │ ├── RNPhotosFramework.h
│ │ ├── RNPhotosFramework.m
│ │ ├── SDAVAssetExportSession.h
│ │ ├── SDAVAssetExportSession.m
│ │ ├── iDebounce.h
│ │ └── iDebounce.m
│ ├── RNPhotosFramework.xcodeproj/
│ │ └── project.pbxproj
│ └── RNPhotosFrameworkTests/
│ ├── Info.plist
│ ├── PHAssetsService_getAssetsForFetchResultTests.m
│ └── RCTConvert+RNPhotosFrameworkTests.m
├── local-cli/
│ ├── android/
│ │ └── android.js
│ ├── bundle/
│ │ ├── assetPathUtils.js
│ │ ├── buildBundle.js
│ │ ├── bundle.js
│ │ ├── bundleCommandLineArgs.js
│ │ ├── getAssetDestPathAndroid.js
│ │ ├── getAssetDestPathIOS.js
│ │ ├── output/
│ │ │ ├── bundle.js
│ │ │ ├── meta.js
│ │ │ ├── prepack.js
│ │ │ ├── unbundle/
│ │ │ │ ├── as-assets.js
│ │ │ │ ├── as-indexed-file.js
│ │ │ │ ├── build-unbundle-sourcemap-with-metadata.js
│ │ │ │ ├── index.js
│ │ │ │ ├── magic-number.js
│ │ │ │ ├── util.js
│ │ │ │ └── write-sourcemap.js
│ │ │ └── writeFile.js
│ │ ├── saveAssets.js
│ │ ├── sign.js
│ │ ├── signedsource.js
│ │ └── unbundle.js
│ ├── cli.js
│ ├── cliEntry.js
│ ├── commands.js
│ ├── core/
│ │ ├── config/
│ │ │ ├── android/
│ │ │ │ ├── findAndroidAppFolder.js
│ │ │ │ ├── findManifest.js
│ │ │ │ ├── findPackageClassName.js
│ │ │ │ ├── index.js
│ │ │ │ └── readManifest.js
│ │ │ ├── findAssets.js
│ │ │ ├── index.js
│ │ │ ├── ios/
│ │ │ │ ├── findProject.js
│ │ │ │ └── index.js
│ │ │ └── wrapCommands.js
│ │ ├── findPlugins.js
│ │ ├── getCommands.js
│ │ └── makeCommand.js
│ ├── default.config.js
│ ├── dependencies/
│ │ └── dependencies.js
│ ├── generate/
│ │ └── generate.js
│ ├── generate-android.js
│ ├── generator/
│ │ └── index.js
│ ├── generator-android/
│ │ ├── index.js
│ │ └── templates/
│ │ ├── bin/
│ │ │ ├── gradle/
│ │ │ │ └── wrapper/
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradlew
│ │ │ └── gradlew.bat
│ │ ├── package/
│ │ │ ├── MainActivity.java
│ │ │ └── MainApplication.java
│ │ └── src/
│ │ ├── app/
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res/
│ │ │ └── values/
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── keystores/
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── generator-ios/
│ │ ├── index.js
│ │ └── templates/
│ │ ├── app/
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj/
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets/
│ │ │ │ └── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ ├── tests/
│ │ │ ├── Info.plist
│ │ │ └── Tests.m
│ │ └── xcodeproj/
│ │ ├── project.pbxproj
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── _xcscheme
│ ├── generator-utils.js
│ ├── init/
│ │ └── init.js
│ ├── install/
│ │ ├── install.js
│ │ └── uninstall.js
│ ├── library/
│ │ └── library.js
│ ├── link/
│ │ ├── android/
│ │ │ ├── copyAssets.js
│ │ │ ├── fs.js
│ │ │ ├── isInstalled.js
│ │ │ ├── patches/
│ │ │ │ ├── applyParams.js
│ │ │ │ ├── applyPatch.js
│ │ │ │ ├── makeBuildPatch.js
│ │ │ │ ├── makeImportPatch.js
│ │ │ │ ├── makePackagePatch.js
│ │ │ │ ├── makeSettingsPatch.js
│ │ │ │ ├── makeStringsPatch.js
│ │ │ │ └── revokePatch.js
│ │ │ ├── registerNativeModule.js
│ │ │ ├── unlinkAssets.js
│ │ │ └── unregisterNativeModule.js
│ │ ├── commandStub.js
│ │ ├── getDependencyConfig.js
│ │ ├── getProjectDependencies.js
│ │ ├── groupFilesByType.js
│ │ ├── ios/
│ │ │ ├── addFileToProject.js
│ │ │ ├── addProjectToLibraries.js
│ │ │ ├── addSharedLibraries.js
│ │ │ ├── addToHeaderSearchPaths.js
│ │ │ ├── copyAssets.js
│ │ │ ├── createGroup.js
│ │ │ ├── createGroupWithMessage.js
│ │ │ ├── getBuildProperty.js
│ │ │ ├── getGroup.js
│ │ │ ├── getHeaderSearchPath.js
│ │ │ ├── getHeadersInFolder.js
│ │ │ ├── getPlist.js
│ │ │ ├── getPlistPath.js
│ │ │ ├── getProducts.js
│ │ │ ├── hasLibraryImported.js
│ │ │ ├── isInstalled.js
│ │ │ ├── mapHeaderSearchPaths.js
│ │ │ ├── registerNativeModule.js
│ │ │ ├── removeFromHeaderSearchPaths.js
│ │ │ ├── removeFromPbxItemContainerProxySection.js
│ │ │ ├── removeFromPbxReferenceProxySection.js
│ │ │ ├── removeFromProjectReferences.js
│ │ │ ├── removeFromStaticLibraries.js
│ │ │ ├── removeProductGroup.js
│ │ │ ├── removeProjectFromLibraries.js
│ │ │ ├── removeProjectFromProject.js
│ │ │ ├── removeSharedLibraries.js
│ │ │ ├── unlinkAssets.js
│ │ │ └── unregisterNativeModule.js
│ │ ├── link.js
│ │ ├── pollParams.js
│ │ ├── promiseWaterfall.js
│ │ ├── promisify.js
│ │ └── unlink.js
│ ├── logAndroid/
│ │ └── logAndroid.js
│ ├── logIOS/
│ │ └── logIOS.js
│ ├── runAndroid/
│ │ ├── adb.js
│ │ └── runAndroid.js
│ ├── runIOS/
│ │ ├── findMatchingSimulator.js
│ │ ├── findXcodeProject.js
│ │ ├── parseIOSDevicesList.js
│ │ └── runIOS.js
│ ├── server/
│ │ ├── checkNodeVersion.js
│ │ ├── findSymlinksPaths.js
│ │ ├── formatBanner.js
│ │ ├── middleware/
│ │ │ ├── copyToClipBoardMiddleware.js
│ │ │ ├── cpuProfilerMiddleware.js
│ │ │ ├── getDevToolsMiddleware.js
│ │ │ ├── heapCapture/
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Makefile
│ │ │ │ ├── heapCapture.html
│ │ │ │ ├── out/
│ │ │ │ │ ├── aggrow.js
│ │ │ │ │ ├── heapCapture.js
│ │ │ │ │ └── table.js
│ │ │ │ └── src/
│ │ │ │ ├── aggrow.js
│ │ │ │ ├── heapCapture.js
│ │ │ │ └── table.js
│ │ │ ├── heapCaptureMiddleware.js
│ │ │ ├── index.html
│ │ │ ├── indexPage.js
│ │ │ ├── jscProfilerMiddleware.js
│ │ │ ├── loadRawBodyMiddleware.js
│ │ │ ├── openStackFrameInEditorMiddleware.js
│ │ │ ├── statusPageMiddleware.js
│ │ │ └── systraceProfileMiddleware.js
│ │ ├── runServer.js
│ │ ├── server.js
│ │ └── util/
│ │ ├── attachHMRServer.js
│ │ ├── copyToClipBoard.js
│ │ ├── debugger.html
│ │ ├── debuggerWorker.js
│ │ ├── launchEditor.js
│ │ ├── messageSocket.js
│ │ └── webSocketProxy.js
│ ├── setup_env.bat
│ ├── setup_env.sh
│ ├── upgrade/
│ │ └── upgrade.js
│ ├── util/
│ │ ├── Config.js
│ │ ├── assertRequiredOptions.js
│ │ ├── copyAndReplace.js
│ │ ├── isPackagerRunning.js
│ │ ├── isValidPackageName.js
│ │ ├── log.js
│ │ ├── parseCommandLine.js
│ │ └── walk.js
│ └── wrong-react-native.js
├── package.json
├── react-native-photos-framework.podspec
├── scripts/
│ ├── objc-test-ios.sh
│ └── objc-test.sh
└── src/
├── .watchmanconfig
├── ajax-helper.js
├── album-query-result-base.js
├── album-query-result-collection.js
├── album-query-result.js
├── album.js
├── asset.js
├── change-observer-handler.js
├── image-asset.js
├── index.js
├── instagram-app-sort.js
├── photo-app-sort.js
├── uuid-generator.js
├── video-asset.js
└── video-props-resolver.js
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IJ
#
.idea
.gradle
local.properties
# node.js
#
node_modules/
npm-debug.log
article-web/article-web.zip
example/react-native-photos-framework/src/
# REMINDER: do not edit Icon^M^M Carriage Returns
Icon
# END REMINDER
================================================
FILE: .travis.yml
================================================
language: objective-c
osx_image: xcode8.2
install:
- nvm use 6.9.1
- wget https://github.com/yarnpkg/yarn/releases/download/v0.18.1/yarn-0.18.1.js
- export yarn="node $(pwd)/yarn-0.18.1.js"
- $yarn install
- cd example && $yarn install && cd ..
script:
- if [[ "$TEST_TYPE" = objc-ios ]]; then set -o pipefail && xcodebuild test -verbose -project example/ios/Example.xcodeproj -scheme Example -destination 'id=E40727B3-41FB-4D6E-B4CB-BFA87109EB12' | xcpretty; fi
- if [[ "$TEST_TYPE" = js ]]; then npm test -- --maxWorkers=1; fi
env:
matrix:
- TEST_TYPE=objc-ios
- TEST_TYPE=js
branches:
only:
- master
- /^.*-stable$/
notifications:
email:
recipients:
- olof.dahlbom@me.com
on_failure: change
on_success: change
================================================
FILE: .vscode/launch.json
================================================
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "iPhone 5s",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}
================================================
FILE: .watchmanconfig
================================================
{
"ignore_dirs": [
".git",
"node_modules"
]
}
123
ffmpeg -i ~/Desktop/Untitled.mov -s 304x540 -pix_fmt rgb24 -r 15 -f gif - | gifsicle --optimize=4 --delay=4 > ~/Desktop/out.gif
cp ~/Desktop/out.gif ~/Dropbox/Public/screenshots/Screencast-`date +"%Y.%m.%d-%H.%M"`.gif
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2016 Juli Racca
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: Makefile
================================================
test:
xcodebuild test -workspace ios/RNPhotosFramework.xcworkspace -scheme RNPhotosFramework -destination 'platform=iOS Simulator,name=iPhone 5s'
================================================
FILE: README.md
================================================
# react-native-photos-framework [](https://travis-ci.org/olofd/react-native-photos-framework) [](https://badge.fury.io/js/react-native-photos-framework) [](https://beerpay.io/olofd/react-native-photos-framework)
### Example project
#### NOTE: This is not a GUI-component, it's an API. The example project just shows off some of the the capabilities of this API.

#### Breaking Changes
react-native header imports have changed in v0.40, and that means breaking changes for all! [Reference PR & Discussion](https://github.com/lwansbrough/react-native-camera/pull/544).
This library is updated to work with the new imports.
Use version < 0.0.64 if your still < RN 0.40.
### Description
Load photos/videos and more from CameraRoll and iCloud.
Uses Apples photos framework.
- Advanced options for loading and filtering.
- Support for displaying both Images and Videos simply in your app.
- Create, modify, delete photos, videos and albums.
- Support for sending photos and videos to a server using Ajax.
- Change-tracking. (eg. someone takes a new photo while your app is open, this library will provide you with events to refresh your collection so it will display the latest changes to the photo-library).
React Native comes with it's own CameraRoll library.
This however uses ALAssetLibrary which is a deprecated API from Apple
and can only load photos and videos stored on the users device.
This is not what your user expects today. Most users photos live on iCloud and these won't show if you use ALAssetLibrary.
If you use this library (Photos framework) you can display the users local resources and the users iCloud resources.
### Installation:
`npm i react-native-photos-framework --save && react-native link react-native-photos-framework`
NOTE: When running `npm install` this library will try to automatically add `NSPhotoLibraryUsageDescription` to your Info.plist.
Check that it is there after the install or update it's value from the default:
`Using photo library to select pictures`
(Will not do anything if you have already defined this key in Info.plist)
# Simple example:
~~~js
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, {Component} from 'react';
import {AppRegistry, StyleSheet, Text, View, Image} from 'react-native';
import RNPhotosFramework from 'react-native-photos-framework';
export default class AwesomeProject extends Component {
constructor() {
super();
this.state = {
images : []
};
}
componentDidMount() {
RNPhotosFramework.requestAuthorization().then((statusObj) => {
if (statusObj.isAuthorized) {
RNPhotosFramework.getAlbums({
type: 'smartAlbum',
subType: 'smartAlbumUserLibrary',
assetCount: 'exact',
fetchOptions: {
sortDescriptors: [
{
key: 'title',
ascending: true
}
],
includeHiddenAssets: false,
includeAllBurstAssets: false
},
//When you say 'trackInsertsAndDeletes or trackChanges' for an albums query result,
//They will be cached and tracking will start.
//Call queryResult.stopTracking() to stop this. ex. on componentDidUnmount
trackInsertsAndDeletes: true,
trackChanges: false
}).then((queryResult) => {
const album = queryResult.albums[0];
return album.getAssets({
//The fetch-options from the outer query will apply here, if we get
startIndex: 0,
endIndex: 10,
//When you say 'trackInsertsAndDeletes or trackAssetsChange' for an albums assets,
//They will be cached and tracking will start.
//Call album.stopTracking() to stop this. ex. on componentDidUnmount
trackInsertsAndDeletes: true,
trackChanges: false
}).then((response) => {
this.setState({
images : response.assets
});
});
});
}
});
}
renderImage(asset, index) {
return (
<Image key={index} source={asset.image} style={{width : 100, height : 100}}></Image>
);
}
render() {
return (
<View style={styles.container}>
{this.state.images.map(this.renderImage.bind(this))}
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF'
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5
}
});
AppRegistry.registerComponent('AwesomeProject', () => AwesomeProject);
~~~
# API-documentation:
## Library (Top level):
## Static methods:
### authorizationStatus
~~~js
RNPhotosFramework.authorizationStatus().then(() => {
});
~~~
Signature: `RNPhotosFramework.authorizationStatus() : Promise<{status : string, isAuthorized : boolean}>`.
Fetches the current authorization-status.
NOTE: You can receive the following statuses :
* `notDetermined` //Before user has granted permission,
* `restricted` //User is restricted by policy, cannot use Photos,
* `denied` //User has denied permission,
* `authorized` //User has granted permission
### requestAuthorization
~~~js
RNPhotosFramework.requestAuthorization().then((statusObj) => {
if(statusObj.isAuthorized) {
...start using the library.
}
});
~~~
Signature: `RNPhotosFramework.requestAuthorization() : Promise<{status : string, isAuthorized : boolean}>`.
This will prompt the user to grant access to the user library at first start.
If you do not call this method explicitly before using any of the other functions in this library, the grant-access-dialog will appear for the user automatically at the first function-call into the library. But only one function-call can automatically
trigger this dialog, so if another call comes into Photos Framework before the user has granted you access, that function-call will fail. Therefore I urge you to call this method explicitly before you start using the rest of the library to not experience unexpected behaviour.
NOTE: You do not have to first check the authorizationStatus before calling this. If the user has granted access before, this will just return authorized-status.
NOTE: See available statuses in doc. about: `authorizationStatus`
## Working with Content:
##### `fetchOptions`
fetchOptions is a query-object which can be sent both when fetching albums with
`getAlbums` and when fetching assets with `getAssets`. Below you can see the available options
for fetchOptions. You can also read Apple's documentation around [PHFetchOptions here](https://developer.apple.com/reference/photos/phfetchoptions).
(Many of the args map one-to-one with native data structures.)
| Prop | Default | Type | Description |
| :------------ |:---------------:| :---------------:| :-----|
| mediaTypes (Only for `getAssets`) | - | `array<string>` | Defines what mediaType the asset should be. Array combined with OR-operator. e.g. ['image', 'video'] will return both photos and videos. Converted in Native to PHAssetMediaType. Accepted values: `image`, `video`, `audio`, `unknown` |
| mediaSubTypes (Only for `getAssets`) | - | `array<string>` | Defines what subtype the asset should be. Array combined with OR-operator. e.g. ['photoPanorama', 'photoHDR'] will return both panorama and HDR-assets. Converted in Native to PHAssetMediaSubtype. Accepted enum-values: `none`, `photoPanorama`, `photoHDR`, `photoScreenshot`, `photoLive`, `videoStreamed`, `videoHighFrameRate`, `videoTimeLapse` (mediaTypes and mediaSubTypes are combined with AND-operator) |
| sourceTypes (Only for `getAssets`) | - | `array<string>` | Defines where the asset should come from originally. Array combined with OR-operator. Converted in Native to PHAssetSourceType. Accepted enum-values: `none`, `userLibrary`, `cloudShared`, `itunesSynced`. (not supported and ignored in iOS 8) |
| includeHiddenAssets | false | `boolean` | A Boolean value that determines whether the fetch result includes assets marked as hidden. |
| includeAllBurstAssets | false | `boolean` | A Boolean value that determines whether the fetch result includes all assets from burst photo sequences. |
| fetchLimit | 0 | `number` | The maximum number of objects to include in the fetch result. Remember to not use this in the wrong way combined with startIndex and endIndex. 0 means unlimited. |
| sortDescriptors | - | `array<{key : <string>, ascending : <boolean>}>` | Multiple sortDescriptors which decide how the result should be sorted. |
# Retrieving Assets (photos/videos/audio):
~~~js
import RNPhotosFramework from 'react-native-photos-framework';
RNPhotosFramework.getAssets({
//Example props below. Many optional.
// You can call this function multiple times providing startIndex and endIndex as
// pagination.
startIndex: 0,
endIndex: 100,
fetchOptions : {
// Media types you wish to display. See table below for possible options. Where
// is the image located? See table below for possible options.
sourceTypes: ['userLibrary'],
sortDescriptors : [
{
key: 'creationDate',
ascending: true,
}
]
}
}).then((response) => console.log(response.assets));
~~~
###### Props to `getAssets`
| Prop | Default | Type | Description |
| :------------ |:---------------:| :---------------:| :-----|
| fetchOptions | - | `object` | See above. |
| startIndex | 0 | `number` | startIndex-offset for fetching |
| endIndex | 0 | `number` | endIndex-offset stop for fetching |
| includeMetadata | false | `boolean` | Include a lot of metadata about the asset (See below). You can also choose to get this metaData at a later point by calling `asset.getMetadata()` (See below) |
| includeResourcesMetadata | false | `boolean` | Include metadata about the orginal resources that make up the asset. Like type and original filename. You can also choose to get this metaData at a later point by calling `asset.getResourcesMetadata()`. |
| prepareForSizeDisplay | - | `Rect(width, height)` | The size of the image you soon will display after running the query. This is highly optional and only there for optimizations of big lists. Prepares the images for display in Photos by using PHCachingImageManager |
| prepareScale | 2.0 | `number` | The scale to prepare the image in. |
| assetDisplayStartToEnd | false | `boolean` | Retrieves assets from the beginning of the library when set to true. Using this sorting option preserves the native order of assets as they are viewed in the Photos app. |
| assetDisplayBottomUp | false | `boolean` | Used to arrange assets from the bottom to top of screen when scrolling up to view paginated results. |
### Example of asset response with `includeMetadata : true`
~~~
creationDate : 1466766146
duration : 17.647 (video)
width : 1920
height : 1080
isFavorite : false
isHidden : false
localIdentifier : "3D5E6260-2B63-472E-A38A-3B543E936E8C/L0/001"
location : Object
mediaSubTypes : null
mediaType : "video"
modificationDate : 1466766146
sourceType : "userLibrary"
uri : "photos://3D5E6260-2B63-472E-A38A-3B543E936E8C/L0/001"
~~~
(`sourceType` is not supported in iOS 8)
# Retrieving albums and enumerating their assets:
~~~js
RNPhotosFramework.getAlbums({
type: 'album',
subType: 'any',
assetCount: 'exact',
fetchOptions: {
sortDescriptors : [
{
key: 'title',
ascending: true
}
],
includeHiddenAssets: false,
includeAllBurstAssets: false
},
//When you say 'trackInsertsAndDeletes or trackChanges' for an albums query result,
//They will be cached and tracking will start.
//Call queryResult.stopTracking() to stop this. ex. on componentDidUnmount
trackInsertsAndDeletes : true,
trackChanges : false
}).then((queryResult) => {
const album = queryResult.albums[0];
return album.getAssets({
//The fetch-options from the outer query will apply here, if we get
startIndex: 0,
endIndex: 10,
//When you say 'trackInsertsAndDeletes or trackAssetsChange' for an albums assets,
//They will be cached and tracking will start.
//Call album.stopTracking() to stop this. ex. on componentDidUnmount
trackInsertsAndDeletes : true,
trackChanges : false
}).then((response) => {
console.log(response.assets, 'The assets in the first album');
});
});
~~~
###### Props to `getAlbums`
Get albums allow to query the Photos Framework for asset-albums. Both User-created ones and Smart-albums.
Note that Apple creates a lot of dynamic, so called Smart Albums, like : 'Recently added', 'Favourites' etc.
NOTE: There is also another method called `getAlbumsMany`. This could be considered a low-level-method of the API. It is constructed so that this library can build more accessible methods on top of one joint native-call: like getUserTopAlbums in pure JS.
The getAlbumsMany-api can take multiple queries (array<albumquery>) and return an array<albumqueryresult></albumqueryresult>.
NOTE about Apple Bug for album titles in iOS 10.
The album.title property is suppose to be localized
to your language out of the box. But this will only work if
you have a language translation file included in your
project. The native property is called localizedTitle.
If you only see english names as titles for smart albums,
eg. 'All Photos' even though you run on a different language
iPhone, check this question out:
http://stackoverflow.com/questions/42579544/ios-phassetcollection-localizedtitle-always-returning-english-name
| Prop | Default | Type | Description |
| :------------ |:---------------:| :---------------:| :-----|
| fetchOptions | - | `object` | See above. |
| assetFetchOptions | - | `object` | Fetch options used when loading assets from album returned. You can choose to pass these fetchOptions here to affect `previewAssets` and `assetCount` in the album according to these options. Note: If you supply fetchOptions when later calling getAssets, those options will override these options. |
| type | `album` | `string` | Defines what type of album/collection you wish to retrieve. Converted in Native to PHAssetCollectionType. Accepted enum-values: `album`, `smartAlbum`, `moment` |
| subType | `any` | `string` | Defines what subType the album/collection you wish to retrieve should have. Converted in Native to PHAssetCollectionSubtype. Accepted enum-values: `any`, `albumRegular`, `syncedEvent`, `syncedFaces`, `syncedAlbum`, `imported`, `albumMyPhotoStream`, `albumCloudShared`, `smartAlbumGeneric`, `smartAlbumPanoramas`, `smartAlbumVideos`, `smartAlbumFavorites`, `smartAlbumTimelapses`, `smartAlbumAllHidden`, `smartAlbumRecentlyAdded`, `smartAlbumBursts`, `smartAlbumSlomoVideos`, `smartAlbumUserLibrary`, `smartAlbumSelfPortraits`, `smartAlbumScreenshots` |
| assetCount | `estimated` | `string/enum` | You can choose to get `estimated` count of the collection or `exact`-count. Of course these have different performance-impacts. Returns -1 if the estimated count can't be fetched quickly. Remember that your of course fetchOptions affects this count. |
| previewAssets | - | `number` | If you set this to a number, say 2, you will get the first two images from the album included in the album-response. This is so you can show a small preview-thumbnail for the album if you like to. |
| includeMetadata | false | `boolean` | Include some meta data about the album. You can also choose to get this metaData at a later point by calling album.getMetadata (See below) |
| noCache | `false` | `boolean` | If you set this flag to true. The result won't get cached or tracked for changes. |
| preCacheAssets | `false` | `boolean` | If you set this property to true all assets of all albums your query returned will be cached and change-tracking will start. |
| trackInsertsAndDeletes | `false` | `boolean` | If you set this to true. You will get called back on `queryResult.onChange` when a Insert or Delete happens. See observing changes below for more details. |
| trackChanges | `false` | `boolean` | If you set this to true. You will get called back on `queryResult.onChange` when a Change happens to the query-result. See observing changes below for more details. |
# Working with Albums:
## Static methods:
### Base methods:
~~~js
//Fetches albums for params. See above
RNPhotosFramework.getAlbums(params)
//Fetches many queries
//as SingleQueryResult : boolean. if true, will return response as one single response.
RNPhotosFramework.getAlbumsMany([params, params...], asSingleQueryResult);
//Prebuilt query for fetching the most typical albums:
//Camera-Roll, User-albums and user-shared-albums.
RNPhotosFramework.getAlbumsCommon(params)
~~~
### createAlbum
~~~js
RNPhotosFramework.createAlbum('test-album').then((album) => {
//You can now use the album like any other album:
return album.getAssets().then((photos) => {});
});
~~~
Signature: RNPhotosFramework.createAlbum(albumTitle) : Promise<album>.
There is also another multi-method you can use here:
Signature: RNPhotosFramework.createAlbums(albumTitles) : Promise<album>.
NOTE: Alums can have the same name. All resources in Photos are unique on their
localIdentifier. You can use the below methods to tackle this:
### getAlbumsByTitle
~~~js
RNPhotosFramework.getAlbumsByTitle('test-album').then((albums) => {});
~~~
Signature: RNPhotosFramework.getAlbumsByTitle(albumTitle) : Promise<array<album>>.
Many albums can have the same title. Returns all matching albums.
There is also another multi-method you can use here:
Signature: RNPhotosFramework.getAlbumsByTitles(albumTitles) : Promise<array<album>>.
Signature: RNPhotosFramework.getAlbumsWithParams({albumTitles, ...otherThingLikeFetchOptionsOrType/SubType}) : Promise<array<album>>.
### getAlbumByLocalIdentifier and getAlbumByLocalIdentifiers
~~~js
RNPhotosFramework.getAlbumByLocalIdentifier(localIdentifier).then((album) => {});
~~~
Signature: RNPhotosFramework.getAlbumByLocalIdentifier(localIdentifier) : Promise<album>.
All alums carry their localIdentifier on album.localIdentifier.
## Album instance-methods:
### addAssetToAlbum and addAssetsToAlbum
~~~js
album.addAssetToAlbum(asset).then((status) => {});
~~~
Signature: album.addAssetToAlbum(asset) : Promise<status>.
Add an asset/assets to an album.
NOTE: Can only be called with assets that are stored in the library already.
If you have a image that you want to save to the library see createAsset.
### removeAssetFromAlbum and removeAssetsFromAlbum
~~~js
album.removeAssetFromAlbum(asset).then((status) => {});
~~~
Signature: album.removeAssetFromAlbum(asset) : Promise<status>.
Remove asset from album.
NOTE: Can only be called with assets that are stored in the library already.
If you have a image that you want to save to the library see createAsset.
### updateTitle
~~~js
album.updateTitle(newTitle).then((status) => {});
~~~
Signature: album.updateTitle(string) : Promise<status>.
Change title on an album.
### delete
~~~js
album.delete().then((status) => {});
~~~
Signature: album.delete() : Promise<status>.
Delete an album.
### getMetadata
~~~js
album.getMetadata().then((mutatedAlbumWithMetadata) => {});
~~~
Fetch meta data for a specific album. You can also include metadata on all albums in the first `getAlbum`-call
by explicitly setting option `includeMetadata: true`.
# Working with Assets (Images/Photos):
When you retrieve assets from the API you will get back an Asset object.
There is nothing special about this object. I've defined it as a class so
that it can have some instance-methods.
## All Assets. (Video/Image)
These are methods and options that apply to all kinds of assets.
(NOTE: Creating new assets has it's own chapter down below).
## Asset instance-methods:
#### setHidden
~~~js
asset.setHidden(hiddenBoolean).then((resultOfOperation) => {
});
~~~
Hides or un-hides a specific asset. Will prompt the user when an asset is about to be hidden.
#### setFavorite
~~~js
asset.setFavorite(favoriteBoolean).then((resultOfOperation) => {
});
~~~
Marks/Unmarks the asset as favorite.
#### setCreationDate
~~~js
asset.setCreationDate(jsDate).then((resultOfOperation) => {
});
~~~
Updates the assets creationDate.
#### setLocation
~~~js
asset.setLocation({
lat : Number //required,
lng : Number //required,
altitude : Number //optional, Altitue above sea-level
heading : Number //optional, cource/heading from 0 (North) to 359.9.
speed : Number //optional, speed in m/s.
timeStamp : JSDate //optional, timestamp. Defaults to Now.
}).then((resultOfOperation) => {
});
~~~
Updates the assets location.
#### getMetadata
~~~js
asset.getMetadata().then((mutatedAssetWithMetadata) => {});
~~~
Fetch metadata for a specific asset. You can also include metadata on all assets in the first `getAsset`-call by explicitly setting option `includeMetadata: true`.
#### getResourcesMetadata
~~~js
asset.getResourcesMetadata().then((mutatedAssetWithResourcesMetadata) => {
console.log(mutatedAssetWithResourcesMetadata.resourcesMetadata);
});
~~~
Fetch resource-metadata for a specific asset, this includes original filename, type, uti (uniformTypeIdentifier) and localidentifier. You can also include resource-metadata on all assets in the first `getAsset`-call by explicitly setting option `includeResourcesMetadata: true`.
### Update Asset metaData
NOTE: When updating metaData, there is two ways of dealing with the result of the update operation.
Either your asset-collection updates automatically by using `Change-Tracking` (See below).
This means that the updated asset will be replaced in your collection, but the asset you
executed the change on will be unaffected. So calling `setHidden(true)` will still
have isHidden : false, after your update, but it will be replaced with a new asset
in your collection via `Change-Tracking`. (Remember to track changes with `trackChanges : true` when calling `getAssets`)
If you choose to NOT use `Change-Tracking` you can call `refreshMetadata` on the asset
after your update-operation:
~~~js
asset.setHidden(hiddenBoolean).then((resultOfOperation) => {
asset.refreshMetadata().then(() => {
console.log('The JS-asset should now reflect your changes');
});
});
~~~
NOTE2: You can update multiple assets at once by calling
~~~js
RNPhotosFramework.updateAssets({
[assetOne.localIdentifier] : {
//Will only update properties provided:
hidden, favorite, creationDate, location
},
[assetTwo.localIdentifier] : {
hidden, favorite, creationDate, location
}
...etc
});
~~~
#### delete
~~~js
asset.delete().then((status) => {
});
~~~
Delete asset.
## Images/Photo-Assets
An Image/Photo-asset is fully compatible with RN's `<Image source={asset.image}></Image>`-tag.
This includes all resizeModes.
NOTE: Use the property `.image` on an asset for the `<Image>`-tag. Otherwise
RN will freeze your asset object. And they are, right now at least, mutable.
## Image-Asset instance-methods:
#### getImageMetadata
~~~js
asset.getImageMetadata().then((mutatedAssetWithImageMetadata) => {
console.log(mutatedAssetWithResourcesMetadata.imageMetadata);
});
~~~
Fetch image specific metadata for a specific image-asset, this includes formats and sizes.
## withOptions for Images/Photos
`withOptions` define special rules and options when loading an asset.
If you want to know more about how an asset is loaded. Read below on chapter `About Asset-Loaders`.
### deliveryMode
Apple's Photo Framework will download images from iCloud on demand, and will generally be very smart about caching and loading resources quickly. You can however define how an Image should be loaded. We have 3 different options in PHImageRequestOptionsDeliveryMode:
~~~
PHImageRequestOptionsDeliveryModeOpportunistic = 0, // client may get several image results when the call is asynchronous or will get one result when the call is synchronous
PHImageRequestOptionsDeliveryModeHighQualityFormat = 1, // client will get one result only and it will be as asked or better than asked (sync requests are automatically processed this way regardless of the specified mode)
PHImageRequestOptionsDeliveryModeFastFormat = 2 // client will get one result only and it may be degraded
~~~
This library defaults to loading assets with `PHImageRequestOptionsDeliveryModeHighQualityFormat`.
This can be considered to be the same as RN normally loads images. It will simply download the image in the size of your <Image> (iCloud-images are stored in multiple sizes, and Photos Framework will download the one closest to your target size) and display it.
But you can choose to use the other two deliveryMode's to. you do this by calling:
~~~js
const assetWithNewDeliveryMode = asset.withOptions({
//one of opportunistic|highQuality|fast
deliveryMode : 'opportunistic'
});
~~~
If you choose to use opportunistic here you will see a low-res-version of the image displayed
while the highQuality version of the resource is downloaded. NOTE: This library will call correct lifecycle callback's on your image-tag when this is used: the
`<Image onPartialLoad={//Low-res-callback} onLoad={//High-res-callback} onProgress={//downloadCallback}>`
## Video-Assets
Video assets can be played by using a special branch of the great library `react-native-video`.
This branch adds the capability of loading Videos from Photos-framework and works
as expected, but is otherwise the same as the orignal project. So you can play
local or remote files as well and if you already use `react-native-video` for
other content, you should just be able to replace the version.
NOTE: Let me and the `react-native-video`-guys know if you want this to go into thir master.
### Install `react-native-video`:
`npm install git://github.com/olofd/react-native-video.git#react-native-photos-framework --save && react-native link`
or add : `"react-native-video": "git://github.com/olofd/react-native-video.git#react-native-photos-framework"` to your package.json and run npm install.
### Displaying video
~~~jsx
<Video source={this.props.asset.video} //Use the asset.video-property.
ref={(ref) => {
this.player = ref
}}
resizeMode='cover'
muted={false}
paused={this.state.videoPaused}
style={styles.thumbVideo}/>
~~~
For more info on supported properties see:
[react-native-video](https://github.com/olofd/react-native-video/tree/react-native-photos-framework)
## withOptions for Video-Asset.
`withOptions` define special rules and options when loading an asset.
(Implemented in [react-native-video)](https://github.com/olofd/react-native-video/tree/react-native-photos-framework)
| Prop | Default | Type | Description |
| :------------ |:---------------:| :---------------:| :-----|
| deliveryMode | `'automatic'` | `string/enum` | Maps to native [PHVideoRequestOptionsDeliveryMode (Apple's docs)](https://developer.apple.com/reference/photos/phvideorequestoptionsdeliverymode?language=objc). Possible values : `automatic`, `mediumQuality`, `highQuality`, `fast`|
| version | `'current'` | `string/enum` | Maps to native [PHVideoRequestOptionsVersion (Apple's docs)](https://developer.apple.com/reference/photos/phvideorequestoptionsversion). Possible values : `current`, `original`|
### withOptions example usage for video:
~~~js
const assetWithNewDeliveryMode = asset.withOptions({
deliveryMode : 'mediumQuality'
});
~~~
### About Asset-Loaders:
~~~
NOTE about RN's concept of Image loaders:
RN has a plugin-like system for displaying Images/Photos.
This means that any library (like this library) can define it's own
ImageLoader. When RN later gets a request to display a <Image> it will query
all ImageLoaders loaded in the system and ask which loader can load a specific resource.
If the resource starts with `https://` for instance, RN's own network-image-loader will take care of loading that resource. While if the scheme of the resource is `asset-library://` another ImageLoader will load that Image.
This library defines it's own ImageLoader which can load images from iCloud. (RN actually already have a ImageLoader that can load iCloud images, but we define our own/extend their original loader so we can have some extra functionality on our loader. (See deliveryMode below)).
A ´uri´ that our loader can load is defined in scheme: `photos://` and localIdentifier eg: `9509A678-2A07-405F-B3C6-49FD806915CC/L0/001`
URI-example: photos://9509A678-2A07-405F-B3C6-49FD806915CC/L0/001
~~~
# Creating Assets:
You can use this library to save images and videos to the users iCloud library.
NOTE: Creating image-assets uses RN's ImageLoader-system behind the scenes and should therefore be able to accept/save any image/photo that you can display in RN.
### Static methods:
### createImageAsset
~~~js
RCTCameraRollRNPhotosFrameworkManager.createImageAsset(imageWithUriProp);
~~~
Signature: album.createImageAsset(params) : Promise<Asset>.
Create a image-asset
### createVideoAsset
~~~js
RCTCameraRollRNPhotosFrameworkManager.createVideoAsset(videoWithUriProp);
~~~
Signature: album.createVideoAsset(params) : Promise<Asset>.
Create a image-asset
### createAssets
~~~js
RCTCameraRollRNPhotosFrameworkManager.createAssets({
images : [{ uri : 'https://some-uri-local-or-remote.jpg' }],
videos : [{ uri : 'https://some-uri-local-or-remote.jpg' }]
album : album //(OPTIONAL) some album that you want to add the asset to when it's been added to the library.
includeMetadata : true //The result of this function call will return new assets. should this have metadata on them? See docs of getAssets for more info.
});
~~~
Signature: album.createAssets(params) : Promise<array<Asset>>.
Base function for creating assets. Will return the successfully created new assets.
If the function returns less Assets then you sent as input, the ones not returned did fail.
# Sending assets to server using AJAX
This library implements the interface `RCTURLRequestHandler`. This means
it supports sending assets as files with AJAX to your server of choice out of the box.
You can send both Images and Videos with your ajax-library of choice.
The simplest way of doing this is by doing it the good old way:
~~~js
//Create a JS object with these props.
//The only thing required is the asset.uri and a name of the file.
const photo = {
uri: asset.uri,
type: 'image/jpeg',
name: 'photo.jpg',
};
const body = new FormData();
body.append('photo', photo);
const xhr = new XMLHttpRequest();
xhr.open('POST', 'http://your-server-url/upload');
xhr.send(body);
~~~
### Ajax-Helper.
This library does however include a helper to abstract over a simple upload.
This helper does promisify and help you to simply sending assets over the wire.
It also loads the original filename of the assets and their mimeType before sending.
You can supply your own `modifyAssetData` callback to change the name if you want to before
sending. This helper operates over multiple Assets, so you always give it an array of Assets (Can contain only one item). It will upload the assets async in parallell and give you progress of the overall operation as well (For progressbars etc.).
This helper sits outside of the rest of the library to not bloat for people not wanting it, and needs to be required/imported seperatly. (See example below).
~~~js
import {postAssets} from 'react-native-photos-framework/src/ajax-helper';
const ajaxPromise = postAssets(assets, {
url: 'http://localhost:3000/upload',
headers : {},
onProgress: (progressPercentage, details) => {
console.log('On Progress called', progressPercentage);
},
onComplete : (asset, status, responseText, xhr) => {
console.log('Asset upload completed successfully');
},
onError : (asset, status, responseText, xhr) => {
console.log('Asset upload failed');
},
onFinnished : (completedItems) => {
console.log('Operation complete');
},
modifyAssetData : (postableAsset, asset) => {
postableAsset.name = `${postableAsset.name}-special-name-maybe-guid.jpg`;
return postableAsset;
}
}).then((result) => {
console.log('Operation complete, promise resolved', result);
return result;
});
~~~
# Change-Tracking/Observing library changes
You can register listeners for library-change-detection on different levels of the api.
## Library-level
You can detect globally if the library changed by:
~~~js
RNPhotosFramework.onLibraryChange(() => {
console.log('Library Change');
});
~~~
No details provided
## AlbumQueryResult-level
You can register a listener that receives updates when any of the albums that result contains
changes (Not if their assets change, only the Albums get those messages, see below).
You currently receive the following events: `AlbumTitleChanged` (More to come).
~~~js
const unsubscribeFunc = albumsFetchResult.onChange((changeDetails, update) => {
if(changeDetails.hasIncrementalChanges) {
update((updatedFetchResult) => {
this.setState({albumsFetchResult: updatedFetchResult});
});
} else {
//Do full reload here..
}
});
~~~
NOTE: If a change occures that affects one of the AlbumQueryResults albums that change will also be passed along to the album.
## Album/Assets-level
To receive change-updates on an album's assets you need to supply at least one of these
two arguments when calling `getAssets` on that album:
`trackInsertsAndDeletes : true` or
`trackChanges : true`
(See `Retrieving albums and enumerating their assets` above)
On an album object you can do:
~~~js
const unsubscribeFunc = album.onChange((changeDetails, update) => {
if(changeDetails.hasIncrementalChanges) {
//Important! Assets must be supplied in original fetch-order.
update(this.state.assets, (updatedAssetArray) => {
this.setState({
assets : updatedAssetArray
});
},
//If RNPF needs to retrive more assets to complete the change,
//eg. a move happened that moved a previous out of array-index asset into your corrently loaded assets.
//Here you can apply a param obj for options on how to load those assets. eg. ´includeMetadata : true´.
{
includeMetadata : true
});
}else {
//Do full reload here..
}
});
~~~
The update-function will apply the changes to your collection.
Call the unsubscribeFunc in order to unsubscribe from the onChange event.
~~~js
componentDidUnmount: function () {
unsubscribeFunc();
album.stopTracking();
}
~~~
## Support on Beerpay
Hey dude! Help me out for a couple of :beers:!
[](https://beerpay.io/olofd/react-native-photos-framework) [](https://beerpay.io/olofd/react-native-photos-framework?focus=wish)
================================================
FILE: __tests__/change-observer-handler.test.js
================================================
import {
assetArrayObserverHandler,
collectionArrayObserverHandler
} from '../src/change-observer-handler.js';
function toNumberedCollectionIndex(arr) {
return arr.reduce((str, asset) => {
if (!asset || asset.collectionIndex === undefined || asset.id === undefined) {
return 'ERROR';
}
return str += asset.collectionIndex.toString() + asset.id.toString();
}, '');
}
//START--------------------BASIC FUNCTIONALLITY--------------------START
//START---------SINGULAR ADD--------------START
describe('SINGULAR ADD', () => {
it('insert singular in middle of assetCollection with normal order starting from 0', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'c',
collectionIndex: 1
}, {
id: 'd',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b2c3d');
});
});
it('insert singular before array starts should not insert only increment collectionIndecies', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'a',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'b',
collectionIndex: 3
}, {
id: 'c',
collectionIndex: 4
}, {
id: 'd',
collectionIndex: 5
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('4b5c6d');
});
});
it('insert singular before array starts should not insert only increment collectionIndecies', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'a',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'd',
collectionIndex: 8
}, {
id: 'c',
collectionIndex: 7
}, {
id: 'b',
collectionIndex: 6
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('9d8c7b');
});
});
it('insert singular in middle of assetCollection with normal order starting from 3', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 4
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 3
}, {
id: 'c',
collectionIndex: 4
}, {
id: 'd',
collectionIndex: 5
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('3a4b5c6d');
});
});
it('insert singular in middle of assetCollection with reversed order', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 2
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 2
}, {
id: 'c',
collectionIndex: 1
}, {
id: 'd',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('3a2b1c0d');
});
});
});
//END---------SINGULAR ADD--------------END
//START---------PLURALIS ADD--------------START
describe('PLURALIS ADD', () => {
it('insert multiple in middle of assetCollection with normal order', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'a',
collectionIndex: 0
}
}, {
obj: {
id: 'c',
collectionIndex: 2
}
}]
};
const arr = [{
id: 'b',
collectionIndex: 0
}, {
id: 'd',
collectionIndex: 1
}, {
id: 'e',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b2c3d4e');
});
});
it('insert multiple in middle of assetCollection with reversed order', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'd',
collectionIndex: 3
}
}, {
obj: {
id: 'e',
collectionIndex: 4
}
}]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('4e3d2c1b0a');
});
});
it('insert multiple in empty collection and expect reversed order', () => {
const changeDetails = {
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 0
}
}, {
obj: {
id: 'a',
collectionIndex: 1
}
}]
};
const arr = [];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, undefined, 'reversed').then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('1a0b');
});
});
});
//END---------PLURALIS ADD--------------END
//START---------SINGULAR REMOVE--------------START
describe('SINGULAR REMOVE', () => {
it('remove singular in middle of assetCollection with normal order', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'b',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1c');
});
});
it('remove singular in middle of assetCollection with reversed order', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'c',
collectionIndex: 2
}
}]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('1b0a');
});
});
it('remove singular before array starts should not remove only decrement collectionIndecies, normal', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'a',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'b',
collectionIndex: 7
}, {
id: 'c',
collectionIndex: 8
}, {
id: 'd',
collectionIndex: 9
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('6b7c8d');
});
});
it('remove singular before array starts should not remove only decrement collectionIndecies, reversed', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'a',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'd',
collectionIndex: 3
}, {
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2d1c0b');
});
});
});
//END---------SINGULAR REMOVE--------------END
//START---------PLURALIS REMOVE--------------START
describe('PLURALIS REMOVE', () => {
it('remove multiple in middle of assetCollection with normal order', () => {
const changeDetails = {
removedObjects: [
//1b2c
{
obj: {
id: 'a',
collectionIndex: 1
}
},
//1b
{
obj: {
id: 'c',
collectionIndex: 3
}
}
]
};
const arr = [{
id: 'a',
collectionIndex: 1
}, {
id: 'b',
collectionIndex: 2
}, {
id: 'c',
collectionIndex: 3
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('1b');
});
});
it('remove multiple in middle of assetCollection with reversed order', () => {
const changeDetails = {
removedObjects: [
//2b1a
{
obj: {
id: 'c',
collectionIndex: 3
}
}, {
obj: {
id: 'a',
collectionIndex: 1
}
}
]
};
const arr = [{
id: 'c',
collectionIndex: 3
}, {
id: 'b',
collectionIndex: 2
}, {
id: 'a',
collectionIndex: 1
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('1b');
});
});
});
//END---------PLURALIS REMOVE--------------END
//START---------SINGULAR CHANGE--------------START
describe('SINGULAR CHANGE', () => {
it('change singular in middle of assetCollection with normal order', () => {
const changeDetails = {
changedObjects: [{
obj: {
id: 'b-changed',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b-changed2c');
});
});
it('change singular in middle of assetCollection with reversed order', () => {
const changeDetails = {
changedObjects: [{
obj: {
id: 'a-changed',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2c1b0a-changed');
});
});
});
//END---------SINGULAR CHANGE--------------END
//START---------PLURALIS CHANGE--------------START
describe('PLURALIS CHANGE', () => {
it('change multiple in middle of assetCollection with normal order', () => {
const changeDetails = {
changedObjects: [{
obj: {
id: 'a-changed',
collectionIndex: 0
}
}, {
obj: {
id: 'c-changed',
collectionIndex: 2
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a-changed1b2c-changed');
});
});
it('change multiple in middle of assetCollection with reversed order', () => {
const changeDetails = {
changedObjects: [{
obj: {
id: 'c-changed',
collectionIndex: 2
}
}, {
obj: {
id: 'a-changed',
collectionIndex: 0
}
}]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2c-changed1b0a-changed');
});
});
});
//END---------PLURALIS CHANGE--------------END
//START---------SINGULAR MOVE--------------START
describe('SINGULAR MOVE', () => {
it('move singular in middle of assetCollection with normal order', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [1, 2, 2, 1]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1c2b');
});
});
it('move singular in middle of assetCollection with reversed order', () => {
const changeDetails = {
moves: [1, 2, 2, 1]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2b1c0a');
});
});
});
//END---------SINGULAR MOVE--------------END
//START---------PLURALIS MOVE--------------START
describe('PLURALIS MOVE', () => {
it('move pluralis in middle of assetCollection with normal order', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [0, 2, 2, 0, 3, 1, 1, 3]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}, {
id: 'd',
collectionIndex: 3
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0c1d2a3b');
});
});
it('move pluralis in middle of assetCollection with reversed order', () => {
const changeDetails = {
moves: [0, 2, 2, 0, 3, 1, 1, 3]
};
const arr = [{
id: 'd',
collectionIndex: 3
}, {
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('3b2a1d0c');
});
});
});
//END---------PLURALIS MOVE--------------END
//END--------------------BASIC FUNCTIONALLITY--------------------END
//START--------------------EDGE CASES AND OUTSIDE INDEX CHANGES--------------------START
//START---------EDGES--------------START
describe('ERRONEOUS INPUT', () => {
it('should throw when input is scrambled', () => {
const changeDetails = {
insertedObjects: [{
obj: {
collectionIndex: 1
}
}]
};
const arr = [{
collectionIndex: 1
}, {
collectionIndex: 0
}, {
collectionIndex: 2
}];
expect(() => {
return assetArrayObserverHandler(changeDetails, arr, (obj) => {});
}).toThrow();
});
});
it('should do nothing to input if hasIncrementalChanges is false', () => {
const changeDetails = {
hasIncrementalChanges: false,
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'c',
collectionIndex: 1
}, {
id: 'd',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1c2d');
});
});
//END---------EDGES--------------END
//START---------OUTSIDE INDEX MOVE--------------START
describe('OUTSIDE INDEX MOVE', () => {
it('move asset from outside of index bounds should trigger fetch request', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [1, 3, 3, 1]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
let f = jest.fn();
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (missingIndecies, finnishFunc) => {
expect(missingIndecies[0]).toBe(1);
finnishFunc();
}).then((result) => {});
});
it('moves outside of collection should not change collection', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [5, 6, 6, 7]
};
const arr = [{
id: 'a',
collectionIndex: 1
}, {
id: 'b',
collectionIndex: 2
}, {
id: 'c',
collectionIndex: 3
}];
let f = jest.fn();
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, f).then((result) => {
expect(f).not.toHaveBeenCalled();
expect(toNumberedCollectionIndex(result)).toBe('1a2b3c');
});
});
it('moves from side to side should not change collection', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [0, 4, 4, 0]
};
const arr = [{
id: 'a',
collectionIndex: 1
}, {
id: 'b',
collectionIndex: 2
}, {
id: 'c',
collectionIndex: 3
}];
let f = jest.fn();
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, f).then((result) => {
expect(f).not.toHaveBeenCalled();
expect(toNumberedCollectionIndex(result)).toBe('1a2b3c');
});
});
it('move singular asset from outside of index bounds should trigger fetch request and insert that index', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [1, 5, 5, 1]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'e',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (arrayOfMissingIndecies, finnishFunc) => {
return finnishFunc(arrayOfMissingIndecies.map((index) => {
return {
collectionIndex: index,
id: 'b'
}
}));
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b2c');
});
});
it('move pluralis assets from outside of index bounds should trigger fetch request and insert at those indecies', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [5, 1, 1, 5, 2, 7, 7, 2]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'e',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (arrayOfMissingIndecies, finnishFunc) => {
return finnishFunc(arrayOfMissingIndecies.map((index) => {
return {
collectionIndex: index,
id: index === 1 ? 'b' : 'c'
}
}));
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b2c');
});
});
it('move pluralis assets from outside of index bounds, if asset is not returned return non-error-output', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [5, 1, 1, 5, 2, 7, 7, 2]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'e',
collectionIndex: 1
}, {
id: 'c',
collectionIndex: 2
}, {
id: 'd',
collectionIndex: 3
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (arrayOfMissingIndecies, finnishFunc) => {
return finnishFunc([{
collectionIndex: 1,
id: 'b'
}]);
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1b2d');
});
});
it('should be able to handle simple out of index move', () => {
//Changes in position always happens like this, in paired atomic steps:
const changeDetails = {
moves: [1, 0, 0, 1]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'a',
collectionIndex: 1
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (arrayOfMissingIndecies, finnishFunc) => {
expect(arrayOfMissingIndecies[0]).toBe(1);
finnishFunc([{
collectionIndex: 1,
id: 'b'
}]);
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2c1b');
});
});
it('move singular in middle of assetCollection with reversed order', () => {
const changeDetails = {
moves: [1, 2, 2, 1]
};
const arr = [{
id: 'c',
collectionIndex: 2
}, {
id: 'b',
collectionIndex: 1
}, {
id: 'a',
collectionIndex: 0
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('2b1c0a');
});
});
});
//END---------OUTSIDE INDEX MOVE--------------END
//START---------MIXED OPAERTAIONS--------------START
describe('MIXED OPERATIONS', () => {
it('Handle a mixed operation with REMOVE, INSERT, MOVE and CHANGE', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'c',
collectionIndex: 1
}
}],
insertedObjects: [{
obj: {
id: 'x',
collectionIndex: 0
}
}],
moves: [0, 1, 1, 0, 9, 7, 7, 9],
changedObjects: [{
obj: {
id: 'k',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'c',
collectionIndex: 1
}, {
id: 'd',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, () => {}, 'normal', (step, arr) => {
if (step === 'remove') {
expect(toNumberedCollectionIndex(arr)).toBe('0a1d');
}
if (step === 'insert') {
expect(toNumberedCollectionIndex(arr)).toBe('0x1a2d');
}
if (step === 'move') {
expect(toNumberedCollectionIndex(arr)).toBe('0a1x2d');
}
if (step === 'change') {
expect(toNumberedCollectionIndex(arr)).toBe('0a1k2d');
}
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1k2d');
});
});
it('Handle a mixed operation with REMOVE, INSERT, MOVE and CHANGE with normal indecies and fetches', () => {
const changeDetails = {
insertedObjects: [
//6g5f4d
{
obj: {
id: 'a',
collectionIndex: 0
}
}, {
obj: {
id: 'e',
collectionIndex: 4
}
}
]
};
const arr = [{
id: 'd',
collectionIndex: 3
}, {
id: 'f',
collectionIndex: 4
}, {
id: 'g',
collectionIndex: 5
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, () => {}, 'normal', (step, arr) => {
if (step === 'insert') {
expect(toNumberedCollectionIndex(arr)).toBe('4e5d6f7g');
}
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('4e5d6f7g');
});
});
it('Handle a mixed operation with REMOVE, INSERT, MOVE and CHANGE with reverse indecies and fetches', () => {
const changeDetails = {
insertedObjects: [
//6g5f4d
{
obj: {
id: 'a',
collectionIndex: 0
}
}, {
obj: {
id: 'e',
collectionIndex: 4
}
}
]
};
const arr = [{
id: 'g',
collectionIndex: 5
}, {
id: 'f',
collectionIndex: 4
}, {
id: 'd',
collectionIndex: 3
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, () => {}, 'normal', (step, arr) => {
if (step === 'insert') {
expect(toNumberedCollectionIndex(arr)).toBe('7g6f5d4e');
}
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('7g6f5d4e');
});
});
it('Handle a mixed operation with REMOVE, INSERT, MOVE and CHANGE with reverse indecies and fetches', () => {
const changeDetails = {
removedObjects: [{
obj: {
id: 'd',
collectionIndex: 3
}
}],
insertedObjects: [{
obj: {
id: 'q',
collectionIndex: 0
}
}, {
obj: {
id: 'x',
collectionIndex: 9
}
}, {
obj: {
id: 'g',
collectionIndex: 6
}
}, {
obj: {
id: 'h',
collectionIndex: 4
}
}],
moves: [3, 4, 4, 3],
changedObjects: [{
obj: {
id: 'k',
collectionIndex: 5
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 3
}, {
id: 'c',
collectionIndex: 4
}, {
id: 'd',
collectionIndex: 5
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}, (indecies, finnishFunc) => {
expect(indecies[0]).toBe(4);
finnishFunc([{
collectionIndex: 4,
id: 'q'
}]);
}, 'normal', (step, arr) => {
if (step === 'remove') {
expect(toNumberedCollectionIndex(arr)).toBe('3c4d');
}
if (step === 'insert') {
expect(toNumberedCollectionIndex(arr)).toBe('4h5c6d7g');
}
if (step === 'move') {
expect(toNumberedCollectionIndex(arr)).toBe('4q5c6d7g');
}
if (step === 'change') {
expect(toNumberedCollectionIndex(arr)).toBe('4q5k6d7g');
}
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('4q5k6d7g');
});
});
});
it('should do nothing to input if hasIncrementalChanges is false', () => {
const changeDetails = {
hasIncrementalChanges: false,
insertedObjects: [{
obj: {
id: 'b',
collectionIndex: 1
}
}]
};
const arr = [{
id: 'a',
collectionIndex: 0
}, {
id: 'c',
collectionIndex: 1
}, {
id: 'd',
collectionIndex: 2
}];
return assetArrayObserverHandler(changeDetails, arr, (obj) => {
return obj;
}).then((result) => {
expect(toNumberedCollectionIndex(result)).toBe('0a1c2d');
});
});
//END---------MIXED OPAERTAIONS--------------END
//END--------------------EDGE CASES AND OUTSIDE INDEX CHANGES--------------------END
================================================
FILE: event-emitter.js
================================================
import EventEmitter from '../react-native/Libraries/vendor/emitter/EventEmitter';
export default EventEmitter;
================================================
FILE: example/.babelrc
================================================
{
"presets": ["react-native"]
}
================================================
FILE: example/.buckconfig
================================================
[android]
target = Google Inc.:Google APIs:23
[maven_repositories]
central = https://repo1.maven.org/maven2
================================================
FILE: example/.flowconfig
================================================
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
.*/Libraries/react-native/ReactNative.js
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow
flow/
[options]
module.system=haste
experimental.strict_type_args=true
munge_underscores=true
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FixMe
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(>=0\\.\\(3[0-6]\\|[1-2][0-9]\\|[0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(>=0\\.\\(3[0-6]\\|1[0-9]\\|[1-2][0-9]\\).[0-9]\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
unsafe.enable_getters_and_setters=true
[version]
^0.36.0
================================================
FILE: example/.gitattributes
================================================
*.pbxproj -text
================================================
FILE: example/.gitignore
================================================
# OSX
#
.DS_Store
# 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/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
# BUCK
buck-out/
\.buckd/
android/app/libs
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
================================================
FILE: example/.npmignore
================================================
Example
demo
================================================
FILE: example/.vscode/launch.json
================================================
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Android",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "android",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug iOS",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "ios",
"target": "iPhone 6s",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Attach to packager",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "attach",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
},
{
"name": "Debug in Exponent",
"program": "${workspaceRoot}/.vscode/launchReactNative.js",
"type": "reactnative",
"request": "launch",
"platform": "exponent",
"internalDebuggerPort": 9090,
"sourceMaps": true,
"outDir": "${workspaceRoot}/.vscode/.react"
}
]
}
================================================
FILE: example/.vscode/launchReactNative.js
================================================
// This file is automatically generated by vscode-react-native@0.2.1
// Please do not modify it manually. All changes will be lost.
try {
var path = require("path");
var Launcher = require("/Users/olda/.vscode/extensions/vsmobile.vscode-react-native-0.2.1/out/debugger/launcher.js").Launcher;
new Launcher(path.resolve(__dirname, "..")).launch();
} catch (e) {
throw new Error("Unable to launch application. Try deleting .vscode/launchReactNative.js and restarting vscode.");
}
================================================
FILE: example/.vscode/typings/react/react-addons-create-fragment.d.ts
================================================
// Type definitions for React v0.14 (react-addons-create-fragment)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
namespace __Addons {
export function createFragment(object: { [key: string]: ReactNode }): ReactFragment;
}
}
declare module "react-addons-create-fragment" {
export = __React.__Addons.createFragment;
}
================================================
FILE: example/.vscode/typings/react/react-addons-css-transition-group.d.ts
================================================
// Type definitions for React v0.14 (react-addons-css-transition-group)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
/// <reference path="react-addons-transition-group.d.ts" />
declare namespace __React {
interface CSSTransitionGroupTransitionName {
enter: string;
enterActive?: string;
leave: string;
leaveActive?: string;
appear?: string;
appearActive?: string;
}
interface CSSTransitionGroupProps extends TransitionGroupProps {
transitionName: string | CSSTransitionGroupTransitionName;
transitionAppear?: boolean;
transitionAppearTimeout?: number;
transitionEnter?: boolean;
transitionEnterTimeout?: number;
transitionLeave?: boolean;
transitionLeaveTimeout?: number;
}
type CSSTransitionGroup = ComponentClass<CSSTransitionGroupProps>;
namespace __Addons {
export var CSSTransitionGroup: __React.CSSTransitionGroup;
}
}
declare module "react-addons-css-transition-group" {
var CSSTransitionGroup: __React.CSSTransitionGroup;
type CSSTransitionGroup = __React.CSSTransitionGroup;
export = CSSTransitionGroup;
}
================================================
FILE: example/.vscode/typings/react/react-addons-linked-state-mixin.d.ts
================================================
// Type definitions for React v0.14 (react-addons-linked-state-mixin)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface ReactLink<T> {
value: T;
requestChange(newValue: T): void;
}
interface LinkedStateMixin extends Mixin<any, any> {
linkState<T>(key: string): ReactLink<T>;
}
interface HTMLAttributes {
checkedLink?: ReactLink<boolean>;
valueLink?: ReactLink<boolean | string | number>;
}
namespace __Addons {
export var LinkedStateMixin: LinkedStateMixin;
}
}
declare module "react-addons-linked-state-mixin" {
var LinkedStateMixin: __React.LinkedStateMixin;
type LinkedStateMixin = __React.LinkedStateMixin;
export = LinkedStateMixin;
}
================================================
FILE: example/.vscode/typings/react/react-addons-perf.d.ts
================================================
// Type definitions for React v0.14 (react-addons-perf)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface ComponentPerfContext {
current: string;
owner: string;
}
interface NumericPerfContext {
[key: string]: number;
}
interface Measurements {
exclusive: NumericPerfContext;
inclusive: NumericPerfContext;
render: NumericPerfContext;
counts: NumericPerfContext;
writes: NumericPerfContext;
displayNames: {
[key: string]: ComponentPerfContext;
};
totalTime: number;
}
namespace __Addons {
namespace Perf {
export function start(): void;
export function stop(): void;
export function printInclusive(measurements: Measurements[]): void;
export function printExclusive(measurements: Measurements[]): void;
export function printWasted(measurements: Measurements[]): void;
export function printDOM(measurements: Measurements[]): void;
export function getLastMeasurements(): Measurements[];
}
}
}
declare module "react-addons-perf" {
import Perf = __React.__Addons.Perf;
export = Perf;
}
================================================
FILE: example/.vscode/typings/react/react-addons-pure-render-mixin.d.ts
================================================
// Type definitions for React v0.14 (react-addons-pure-render-mixin)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface PureRenderMixin extends Mixin<any, any> {}
namespace __Addons {
export var PureRenderMixin: PureRenderMixin;
}
}
declare module "react-addons-pure-render-mixin" {
var PureRenderMixin: __React.PureRenderMixin;
type PureRenderMixin = __React.PureRenderMixin;
export = PureRenderMixin;
}
================================================
FILE: example/.vscode/typings/react/react-addons-test-utils.d.ts
================================================
// Type definitions for React v0.14 (react-addons-test-utils)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface SyntheticEventData {
altKey?: boolean;
button?: number;
buttons?: number;
clientX?: number;
clientY?: number;
changedTouches?: TouchList;
charCode?: boolean;
clipboardData?: DataTransfer;
ctrlKey?: boolean;
deltaMode?: number;
deltaX?: number;
deltaY?: number;
deltaZ?: number;
detail?: number;
getModifierState?(key: string): boolean;
key?: string;
keyCode?: number;
locale?: string;
location?: number;
metaKey?: boolean;
pageX?: number;
pageY?: number;
relatedTarget?: EventTarget;
repeat?: boolean;
screenX?: number;
screenY?: number;
shiftKey?: boolean;
targetTouches?: TouchList;
touches?: TouchList;
view?: AbstractView;
which?: number;
}
interface EventSimulator {
(element: Element, eventData?: SyntheticEventData): void;
(component: Component<any, any>, eventData?: SyntheticEventData): void;
}
interface MockedComponentClass {
new(): any;
}
class ShallowRenderer {
getRenderOutput<E extends ReactElement<any>>(): E;
getRenderOutput(): ReactElement<any>;
render(element: ReactElement<any>, context?: any): void;
unmount(): void;
}
namespace __Addons {
namespace TestUtils {
namespace Simulate {
export var blur: EventSimulator;
export var change: EventSimulator;
export var click: EventSimulator;
export var cut: EventSimulator;
export var doubleClick: EventSimulator;
export var drag: EventSimulator;
export var dragEnd: EventSimulator;
export var dragEnter: EventSimulator;
export var dragExit: EventSimulator;
export var dragLeave: EventSimulator;
export var dragOver: EventSimulator;
export var dragStart: EventSimulator;
export var drop: EventSimulator;
export var focus: EventSimulator;
export var input: EventSimulator;
export var keyDown: EventSimulator;
export var keyPress: EventSimulator;
export var keyUp: EventSimulator;
export var mouseDown: EventSimulator;
export var mouseEnter: EventSimulator;
export var mouseLeave: EventSimulator;
export var mouseMove: EventSimulator;
export var mouseOut: EventSimulator;
export var mouseOver: EventSimulator;
export var mouseUp: EventSimulator;
export var paste: EventSimulator;
export var scroll: EventSimulator;
export var submit: EventSimulator;
export var touchCancel: EventSimulator;
export var touchEnd: EventSimulator;
export var touchMove: EventSimulator;
export var touchStart: EventSimulator;
export var wheel: EventSimulator;
}
export function renderIntoDocument(
element: DOMElement<any>): Element;
export function renderIntoDocument<P>(
element: ReactElement<P>): Component<P, any>;
export function renderIntoDocument<C extends Component<any, any>>(
element: ReactElement<any>): C;
export function mockComponent(
mocked: MockedComponentClass, mockTagName?: string): typeof TestUtils;
export function isElementOfType(
element: ReactElement<any>, type: ReactType): boolean;
export function isDOMComponent(instance: ReactInstance): boolean;
export function isCompositeComponent(instance: ReactInstance): boolean;
export function isCompositeComponentWithType(
instance: ReactInstance,
type: ComponentClass<any>): boolean;
export function findAllInRenderedTree(
root: Component<any, any>,
fn: (i: ReactInstance) => boolean): ReactInstance[];
export function scryRenderedDOMComponentsWithClass(
root: Component<any, any>,
className: string): Element[];
export function findRenderedDOMComponentWithClass(
root: Component<any, any>,
className: string): Element;
export function scryRenderedDOMComponentsWithTag(
root: Component<any, any>,
tagName: string): Element[];
export function findRenderedDOMComponentWithTag(
root: Component<any, any>,
tagName: string): Element;
export function scryRenderedComponentsWithType<P>(
root: Component<any, any>,
type: ComponentClass<P>): Component<P, {}>[];
export function scryRenderedComponentsWithType<C extends Component<any, any>>(
root: Component<any, any>,
type: ComponentClass<any>): C[];
export function findRenderedComponentWithType<P>(
root: Component<any, any>,
type: ComponentClass<P>): Component<P, {}>;
export function findRenderedComponentWithType<C extends Component<any, any>>(
root: Component<any, any>,
type: ComponentClass<any>): C;
export function createRenderer(): ShallowRenderer;
}
}
}
declare module "react-addons-test-utils" {
import TestUtils = __React.__Addons.TestUtils;
export = TestUtils;
}
================================================
FILE: example/.vscode/typings/react/react-addons-transition-group.d.ts
================================================
// Type definitions for React v0.14 (react-addons-transition-group)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface TransitionGroupProps {
component?: ReactType;
childFactory?: (child: ReactElement<any>) => ReactElement<any>;
}
type TransitionGroup = ComponentClass<TransitionGroupProps>;
namespace __Addons {
export var TransitionGroup: __React.TransitionGroup;
}
}
declare module "react-addons-transition-group" {
var TransitionGroup: __React.TransitionGroup;
type TransitionGroup = __React.TransitionGroup;
export = TransitionGroup;
}
================================================
FILE: example/.vscode/typings/react/react-addons-update.d.ts
================================================
// Type definitions for React v0.14 (react-addons-update)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
interface UpdateSpecCommand {
$set?: any;
$merge?: {};
$apply?(value: any): any;
}
interface UpdateSpecPath {
[key: string]: UpdateSpec;
}
type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
interface UpdateArraySpec extends UpdateSpecCommand {
$push?: any[];
$unshift?: any[];
$splice?: any[][];
}
namespace __Addons {
export function update(value: any[], spec: UpdateArraySpec): any[];
export function update(value: {}, spec: UpdateSpec): any;
}
}
declare module "react-addons-update" {
export = __React.__Addons.update;
}
================================================
FILE: example/.vscode/typings/react/react-dom.d.ts
================================================
// Type definitions for React v0.14 (react-dom)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
declare namespace __React {
namespace __DOM {
function findDOMNode<E extends Element>(instance: ReactInstance): E;
function findDOMNode(instance: ReactInstance): Element;
function render<P>(
element: DOMElement<P>,
container: Element,
callback?: (element: Element) => any): Element;
function render<P, S>(
element: ClassicElement<P>,
container: Element,
callback?: (component: ClassicComponent<P, S>) => any): ClassicComponent<P, S>;
function render<P, S>(
element: ReactElement<P>,
container: Element,
callback?: (component: Component<P, S>) => any): Component<P, S>;
function unmountComponentAtNode(container: Element): boolean;
var version: string;
function unstable_batchedUpdates<A, B>(callback: (a: A, b: B) => any, a: A, b: B): void;
function unstable_batchedUpdates<A>(callback: (a: A) => any, a: A): void;
function unstable_batchedUpdates(callback: () => any): void;
function unstable_renderSubtreeIntoContainer<P>(
parentComponent: Component<any, any>,
nextElement: DOMElement<P>,
container: Element,
callback?: (element: Element) => any): Element;
function unstable_renderSubtreeIntoContainer<P, S>(
parentComponent: Component<any, any>,
nextElement: ClassicElement<P>,
container: Element,
callback?: (component: ClassicComponent<P, S>) => any): ClassicComponent<P, S>;
function unstable_renderSubtreeIntoContainer<P, S>(
parentComponent: Component<any, any>,
nextElement: ReactElement<P>,
container: Element,
callback?: (component: Component<P, S>) => any): Component<P, S>;
}
namespace __DOMServer {
function renderToString(element: ReactElement<any>): string;
function renderToStaticMarkup(element: ReactElement<any>): string;
var version: string;
}
}
declare module "react-dom" {
import DOM = __React.__DOM;
export = DOM;
}
declare module "react-dom/server" {
import DOMServer = __React.__DOMServer;
export = DOMServer;
}
================================================
FILE: example/.vscode/typings/react/react-global.d.ts
================================================
// Type definitions for React v0.14 (namespace)
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="react.d.ts" />
/// <reference path="react-dom.d.ts" />
/// <reference path="react-addons-create-fragment.d.ts" />
/// <reference path="react-addons-css-transition-group.d.ts" />
/// <reference path="react-addons-linked-state-mixin.d.ts" />
/// <reference path="react-addons-perf.d.ts" />
/// <reference path="react-addons-pure-render-mixin.d.ts" />
/// <reference path="react-addons-test-utils.d.ts" />
/// <reference path="react-addons-transition-group.d.ts" />
/// <reference path="react-addons-update.d.ts" />
import React = __React;
import ReactDOM = __React.__DOM;
declare namespace __React {
export import addons = __React.__Addons;
}
================================================
FILE: example/.vscode/typings/react/react.d.ts
================================================
// Type definitions for React v0.14
// Project: http://facebook.github.io/react/
// Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
declare namespace __React {
//
// React Elements
// ----------------------------------------------------------------------
type ReactType = string | ComponentClass<any> | StatelessComponent<any>;
interface ReactElement<P extends Props<any>> {
type: string | ComponentClass<P> | StatelessComponent<P>;
props: P;
key: string | number;
ref: string | ((component: Component<P, any> | Element) => any);
}
interface ClassicElement<P> extends ReactElement<P> {
type: ClassicComponentClass<P>;
ref: string | ((component: ClassicComponent<P, any>) => any);
}
interface DOMElement<P extends Props<Element>> extends ReactElement<P> {
type: string;
ref: string | ((element: Element) => any);
}
interface ReactHTMLElement extends DOMElement<HTMLProps<HTMLElement>> {
ref: string | ((element: HTMLElement) => any);
}
interface ReactSVGElement extends DOMElement<SVGProps> {
ref: string | ((element: SVGElement) => any);
}
//
// Factories
// ----------------------------------------------------------------------
interface Factory<P> {
(props?: P, ...children: ReactNode[]): ReactElement<P>;
}
interface ClassicFactory<P> extends Factory<P> {
(props?: P, ...children: ReactNode[]): ClassicElement<P>;
}
interface DOMFactory<P extends Props<Element>> extends Factory<P> {
(props?: P, ...children: ReactNode[]): DOMElement<P>;
}
type HTMLFactory = DOMFactory<HTMLProps<HTMLElement>>;
type SVGFactory = DOMFactory<SVGProps>;
//
// React Nodes
// http://facebook.github.io/react/docs/glossary.html
// ----------------------------------------------------------------------
type ReactText = string | number;
type ReactChild = ReactElement<any> | ReactText;
// Should be Array<ReactNode> but type aliases cannot be recursive
type ReactFragment = {} | Array<ReactChild | any[] | boolean>;
type ReactNode = ReactChild | ReactFragment | boolean;
//
// Top Level API
// ----------------------------------------------------------------------
function createClass<P, S>(spec: ComponentSpec<P, S>): ClassicComponentClass<P>;
function createFactory<P>(type: string): DOMFactory<P>;
function createFactory<P>(type: ClassicComponentClass<P>): ClassicFactory<P>;
function createFactory<P>(type: ComponentClass<P> | StatelessComponent<P>): Factory<P>;
function createElement<P>(
type: string,
props?: P,
...children: ReactNode[]): DOMElement<P>;
function createElement<P>(
type: ClassicComponentClass<P>,
props?: P,
...children: ReactNode[]): ClassicElement<P>;
function createElement<P>(
type: ComponentClass<P> | StatelessComponent<P>,
props?: P,
...children: ReactNode[]): ReactElement<P>;
function cloneElement<P>(
element: DOMElement<P>,
props?: P,
...children: ReactNode[]): DOMElement<P>;
function cloneElement<P>(
element: ClassicElement<P>,
props?: P,
...children: ReactNode[]): ClassicElement<P>;
function cloneElement<P>(
element: ReactElement<P>,
props?: P,
...children: ReactNode[]): ReactElement<P>;
function isValidElement(object: {}): boolean;
var DOM: ReactDOM;
var PropTypes: ReactPropTypes;
var Children: ReactChildren;
//
// Component API
// ----------------------------------------------------------------------
type ReactInstance = Component<any, any> | Element;
// Base component for plain JS classes
class Component<P, S> implements ComponentLifecycle<P, S> {
constructor(props?: P, context?: any);
setState(f: (prevState: S, props: P) => S, callback?: () => any): void;
setState(state: S, callback?: () => any): void;
forceUpdate(callBack?: () => any): void;
render(): JSX.Element;
props: P;
state: S;
context: {};
refs: {
[key: string]: ReactInstance
};
}
interface ClassicComponent<P, S> extends Component<P, S> {
replaceState(nextState: S, callback?: () => any): void;
isMounted(): boolean;
getInitialState?(): S;
}
interface ChildContextProvider<CC> {
getChildContext(): CC;
}
//
// Class Interfaces
// ----------------------------------------------------------------------
interface StatelessComponent<P> {
(props?: P, context?: any): ReactElement<any>;
propTypes?: ValidationMap<P>;
contextTypes?: ValidationMap<any>;
defaultProps?: P;
displayName?: string;
}
interface ComponentClass<P> {
new(props?: P, context?: any): Component<P, any>;
propTypes?: ValidationMap<P>;
contextTypes?: ValidationMap<any>;
childContextTypes?: ValidationMap<any>;
defaultProps?: P;
}
interface ClassicComponentClass<P> extends ComponentClass<P> {
new(props?: P, context?: any): ClassicComponent<P, any>;
getDefaultProps?(): P;
displayName?: string;
}
//
// Component Specs and Lifecycle
// ----------------------------------------------------------------------
interface ComponentLifecycle<P, S> {
componentWillMount?(): void;
componentDidMount?(): void;
componentWillReceiveProps?(nextProps: P, nextContext: any): void;
shouldComponentUpdate?(nextProps: P, nextState: S, nextContext: any): boolean;
componentWillUpdate?(nextProps: P, nextState: S, nextContext: any): void;
componentDidUpdate?(prevProps: P, prevState: S, prevContext: any): void;
componentWillUnmount?(): void;
}
interface Mixin<P, S> extends ComponentLifecycle<P, S> {
mixins?: Mixin<P, S>;
statics?: {
[key: string]: any;
};
displayName?: string;
propTypes?: ValidationMap<any>;
contextTypes?: ValidationMap<any>;
childContextTypes?: ValidationMap<any>;
getDefaultProps?(): P;
getInitialState?(): S;
}
interface ComponentSpec<P, S> extends Mixin<P, S> {
render(): ReactElement<any>;
[propertyName: string]: any;
}
//
// Event System
// ----------------------------------------------------------------------
interface SyntheticEvent {
bubbles: boolean;
cancelable: boolean;
currentTarget: EventTarget;
defaultPrevented: boolean;
eventPhase: number;
isTrusted: boolean;
nativeEvent: Event;
preventDefault(): void;
stopPropagation(): void;
target: EventTarget;
timeStamp: Date;
type: string;
}
interface ClipboardEvent extends SyntheticEvent {
clipboardData: DataTransfer;
}
interface CompositionEvent extends SyntheticEvent {
data: string;
}
interface DragEvent extends SyntheticEvent {
dataTransfer: DataTransfer;
}
interface FocusEvent extends SyntheticEvent {
relatedTarget: EventTarget;
}
interface FormEvent extends SyntheticEvent {
}
interface KeyboardEvent extends SyntheticEvent {
altKey: boolean;
charCode: number;
ctrlKey: boolean;
getModifierState(key: string): boolean;
key: string;
keyCode: number;
locale: string;
location: number;
metaKey: boolean;
repeat: boolean;
shiftKey: boolean;
which: number;
}
interface MouseEvent extends SyntheticEvent {
altKey: boolean;
button: number;
buttons: number;
clientX: number;
clientY: number;
ctrlKey: boolean;
getModifierState(key: string): boolean;
metaKey: boolean;
pageX: number;
pageY: number;
relatedTarget: EventTarget;
screenX: number;
screenY: number;
shiftKey: boolean;
}
interface TouchEvent extends SyntheticEvent {
altKey: boolean;
changedTouches: TouchList;
ctrlKey: boolean;
getModifierState(key: string): boolean;
metaKey: boolean;
shiftKey: boolean;
targetTouches: TouchList;
touches: TouchList;
}
interface UIEvent extends SyntheticEvent {
detail: number;
view: AbstractView;
}
interface WheelEvent extends SyntheticEvent {
deltaMode: number;
deltaX: number;
deltaY: number;
deltaZ: number;
}
//
// Event Handler Types
// ----------------------------------------------------------------------
interface EventHandler<E extends SyntheticEvent> {
(event: E): void;
}
type ReactEventHandler = EventHandler<SyntheticEvent>;
type ClipboardEventHandler = EventHandler<ClipboardEvent>;
type CompositionEventHandler = EventHandler<CompositionEvent>;
type DragEventHandler = EventHandler<DragEvent>;
type FocusEventHandler = EventHandler<FocusEvent>;
type FormEventHandler = EventHandler<FormEvent>;
type KeyboardEventHandler = EventHandler<KeyboardEvent>;
type MouseEventHandler = EventHandler<MouseEvent>;
type TouchEventHandler = EventHandler<TouchEvent>;
type UIEventHandler = EventHandler<UIEvent>;
type WheelEventHandler = EventHandler<WheelEvent>;
//
// Props / DOM Attributes
// ----------------------------------------------------------------------
interface Props<T> {
children?: ReactNode;
key?: string | number;
ref?: string | ((component: T) => any);
}
interface HTMLProps<T> extends HTMLAttributes, Props<T> {
}
interface SVGProps extends SVGAttributes, Props<SVGElement> {
}
interface DOMAttributes {
dangerouslySetInnerHTML?: {
__html: string;
};
// Clipboard Events
onCopy?: ClipboardEventHandler;
onCut?: ClipboardEventHandler;
onPaste?: ClipboardEventHandler;
// Composition Events
onCompositionEnd?: CompositionEventHandler;
onCompositionStart?: CompositionEventHandler;
onCompositionUpdate?: CompositionEventHandler;
// Focus Events
onFocus?: FocusEventHandler;
onBlur?: FocusEventHandler;
// Form Events
onChange?: FormEventHandler;
onInput?: FormEventHandler;
onSubmit?: FormEventHandler;
// Image Events
onLoad?: ReactEventHandler;
onError?: ReactEventHandler; // also a Media Event
// Keyboard Events
onKeyDown?: KeyboardEventHandler;
onKeyPress?: KeyboardEventHandler;
onKeyUp?: KeyboardEventHandler;
// Media Events
onAbort?: ReactEventHandler;
onCanPlay?: ReactEventHandler;
onCanPlayThrough?: ReactEventHandler;
onDurationChange?: ReactEventHandler;
onEmptied?: ReactEventHandler;
onEncrypted?: ReactEventHandler;
onEnded?: ReactEventHandler;
onLoadedData?: ReactEventHandler;
onLoadedMetadata?: ReactEventHandler;
onLoadStart?: ReactEventHandler;
onPause?: ReactEventHandler;
onPlay?: ReactEventHandler;
onPlaying?: ReactEventHandler;
onProgress?: ReactEventHandler;
onRateChange?: ReactEventHandler;
onSeeked?: ReactEventHandler;
onSeeking?: ReactEventHandler;
onStalled?: ReactEventHandler;
onSuspend?: ReactEventHandler;
onTimeUpdate?: ReactEventHandler;
onVolumeChange?: ReactEventHandler;
onWaiting?: ReactEventHandler;
// MouseEvents
onClick?: MouseEventHandler;
onContextMenu?: MouseEventHandler;
onDoubleClick?: MouseEventHandler;
onDrag?: DragEventHandler;
onDragEnd?: DragEventHandler;
onDragEnter?: DragEventHandler;
onDragExit?: DragEventHandler;
onDragLeave?: DragEventHandler;
onDragOver?: DragEventHandler;
onDragStart?: DragEventHandler;
onDrop?: DragEventHandler;
onMouseDown?: MouseEventHandler;
onMouseEnter?: MouseEventHandler;
onMouseLeave?: MouseEventHandler;
onMouseMove?: MouseEventHandler;
onMouseOut?: MouseEventHandler;
onMouseOver?: MouseEventHandler;
onMouseUp?: MouseEventHandler;
// Selection Events
onSelect?: ReactEventHandler;
// Touch Events
onTouchCancel?: TouchEventHandler;
onTouchEnd?: TouchEventHandler;
onTouchMove?: TouchEventHandler;
onTouchStart?: TouchEventHandler;
// UI Events
onScroll?: UIEventHandler;
// Wheel Events
onWheel?: WheelEventHandler;
}
// This interface is not complete. Only properties accepting
// unitless numbers are listed here (see CSSProperty.js in React)
interface CSSProperties {
boxFlex?: number;
boxFlexGroup?: number;
columnCount?: number;
flex?: number | string;
flexGrow?: number;
flexShrink?: number;
fontWeight?: number | string;
lineClamp?: number;
lineHeight?: number | string;
opacity?: number;
order?: number;
orphans?: number;
widows?: number;
zIndex?: number;
zoom?: number;
fontSize?: number | string;
// SVG-related properties
fillOpacity?: number;
strokeOpacity?: number;
strokeWidth?: number;
// Remaining properties auto-extracted from http://docs.webplatform.org.
// License: http://docs.webplatform.org/wiki/Template:CC-by-3.0
/**
* Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how justify-content aligns individual items within the main-axis.
*/
alignContent?: any;
/**
* Sets the default alignment in the cross axis for all of the flex container's items, including anonymous flex items, similarly to how justify-content aligns items along the main axis.
*/
alignItems?: any;
/**
* Allows the default alignment to be overridden for individual flex items.
*/
alignSelf?: any;
/**
* This property allows precise alignment of elements, such as graphics, that do not have a baseline-table or lack the desired baseline in their baseline-table. With the alignment-adjust property, the position of the baseline identified by the alignment-baseline can be explicitly determined. It also determines precisely the alignment point for each glyph within a textual element.
*/
alignmentAdjust?: any;
alignmentBaseline?: any;
/**
* Defines a length of time to elapse before an animation starts, allowing an animation to begin execution some time after it is applied.
*/
animationDelay?: any;
/**
* Defines whether an animation should run in reverse on some or all cycles.
*/
animationDirection?: any;
/**
* Specifies how many times an animation cycle should play.
*/
animationIterationCount?: any;
/**
* Defines the list of animations that apply to the element.
*/
animationName?: any;
/**
* Defines whether an animation is running or paused.
*/
animationPlayState?: any;
/**
* Allows changing the style of any element to platform-based interface elements or vice versa.
*/
appearance?: any;
/**
* Determines whether or not the “back” side of a transformed element is visible when facing the viewer.
*/
backfaceVisibility?: any;
/**
* This property describes how the element's background images should blend with each other and the element's background color.
* The value is a list of blend modes that corresponds to each background image. Each element in the list will apply to the corresponding element of background-image. If a property doesn’t have enough comma-separated values to match the number of layers, the UA must calculate its used value by repeating the list of values until there are enough.
*/
backgroundBlendMode?: any;
backgroundColor?: any;
backgroundComposite?: any;
/**
* Applies one or more background images to an element. These can be any valid CSS image, including url() paths to image files or CSS gradients.
*/
backgroundImage?: any;
/**
* Specifies what the background-position property is relative to.
*/
backgroundOrigin?: any;
/**
* Sets the horizontal position of a background image.
*/
backgroundPositionX?: any;
/**
* Background-repeat defines if and how background images will be repeated after they have been sized and positioned
*/
backgroundRepeat?: any;
/**
* Obsolete - spec retired, not implemented.
*/
baselineShift?: any;
/**
* Non standard. Sets or retrieves the location of the Dynamic HTML (DHTML) behavior.
*/
behavior?: any;
/**
* Shorthand property that defines the different properties of all four sides of an element's border in a single declaration. It can be used to set border-width, border-style and border-color, or a subset of these.
*/
border?: any;
/**
* Defines the shape of the border of the bottom-left corner.
*/
borderBottomLeftRadius?: any;
/**
* Defines the shape of the border of the bottom-right corner.
*/
borderBottomRightRadius?: any;
/**
* Sets the width of an element's bottom border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
*/
borderBottomWidth?: any;
/**
* Border-collapse can be used for collapsing the borders between table cells
*/
borderCollapse?: any;
/**
* The CSS border-color property sets the color of an element's four borders. This property can have from one to four values, made up of the elementary properties: • border-top-color
* • border-right-color
* • border-bottom-color
* • border-left-color The default color is the currentColor of each of these values.
* If you provide one value, it sets the color for the element. Two values set the horizontal and vertical values, respectively. Providing three values sets the top, vertical, and bottom values, in that order. Four values set all for sides: top, right, bottom, and left, in that order.
*/
borderColor?: any;
/**
* Specifies different corner clipping effects, such as scoop (inner curves), bevel (straight cuts) or notch (cut-off rectangles). Works along with border-radius to specify the size of each corner effect.
*/
borderCornerShape?: any;
/**
* The property border-image-source is used to set the image to be used instead of the border style. If this is set to none the border-style is used instead.
*/
borderImageSource?: any;
/**
* The border-image-width CSS property defines the offset to use for dividing the border image in nine parts, the top-left corner, central top edge, top-right-corner, central right edge, bottom-right corner, central bottom edge, bottom-left corner, and central right edge. They represent inward distance from the top, right, bottom, and left edges.
*/
borderImageWidth?: any;
/**
* Shorthand property that defines the border-width, border-style and border-color of an element's left border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the left border — border-left-width, border-left-style and border-left-color.
*/
borderLeft?: any;
/**
* The CSS border-left-color property sets the color of an element's left border. This page explains the border-left-color value, but often you will find it more convenient to fix the border's left color as part of a shorthand set, either border-left or border-color.
* Colors can be defined several ways. For more information, see Usage.
*/
borderLeftColor?: any;
/**
* Sets the style of an element's left border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
*/
borderLeftStyle?: any;
/**
* Sets the width of an element's left border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
*/
borderLeftWidth?: any;
/**
* Shorthand property that defines the border-width, border-style and border-color of an element's right border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the right border — border-right-width, border-right-style and border-right-color.
*/
borderRight?: any;
/**
* Sets the color of an element's right border. This page explains the border-right-color value, but often you will find it more convenient to fix the border's right color as part of a shorthand set, either border-right or border-color.
* Colors can be defined several ways. For more information, see Usage.
*/
borderRightColor?: any;
/**
* Sets the style of an element's right border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
*/
borderRightStyle?: any;
/**
* Sets the width of an element's right border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
*/
borderRightWidth?: any;
/**
* Specifies the distance between the borders of adjacent cells.
*/
borderSpacing?: any;
/**
* Sets the style of an element's four borders. This property can have from one to four values. With only one value, the value will be applied to all four borders; otherwise, this works as a shorthand property for each of border-top-style, border-right-style, border-bottom-style, border-left-style, where each border style may be assigned a separate value.
*/
borderStyle?: any;
/**
* Shorthand property that defines the border-width, border-style and border-color of an element's top border in a single declaration. Note that you can use the corresponding longhand properties to set specific individual properties of the top border — border-top-width, border-top-style and border-top-color.
*/
borderTop?: any;
/**
* Sets the color of an element's top border. This page explains the border-top-color value, but often you will find it more convenient to fix the border's top color as part of a shorthand set, either border-top or border-color.
* Colors can be defined several ways. For more information, see Usage.
*/
borderTopColor?: any;
/**
* Sets the rounding of the top-left corner of the element.
*/
borderTopLeftRadius?: any;
/**
* Sets the rounding of the top-right corner of the element.
*/
borderTopRightRadius?: any;
/**
* Sets the style of an element's top border. To set all four borders, use the shorthand property, border-style. Otherwise, you can set the borders individually with border-top-style, border-right-style, border-bottom-style, border-left-style.
*/
borderTopStyle?: any;
/**
* Sets the width of an element's top border. To set all four borders, use the border-width shorthand property which sets the values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
*/
borderTopWidth?: any;
/**
* Sets the width of an element's four borders. This property can have from one to four values. This is a shorthand property for setting values simultaneously for border-top-width, border-right-width, border-bottom-width, and border-left-width.
*/
borderWidth?: any;
/**
* Obsolete.
*/
boxAlign?: any;
/**
* Breaks a box into fragments creating new borders, padding and repeating backgrounds or lets it stay as a continuous box on a page break, column break, or, for inline elements, at a line break.
*/
boxDecorationBreak?: any;
/**
* Deprecated
*/
boxDirection?: any;
/**
* Do not use. This property has been replaced by the flex-wrap property.
* Gets or sets a value that specifies the direction to add successive rows or columns when the value of box-lines is set to multiple.
*/
boxLineProgression?: any;
/**
* Do not use. This property has been replaced by the flex-wrap property.
* Gets or sets a value that specifies whether child elements wrap onto multiple lines or columns based on the space available in the object.
*/
boxLines?: any;
/**
* Do not use. This property has been replaced by flex-order.
* Specifies the ordinal group that a child element of the object belongs to. This ordinal value identifies the display order (along the axis defined by the box-orient property) for the group.
*/
boxOrdinalGroup?: any;
/**
* The CSS break-after property allows you to force a break on multi-column layouts. More specifically, it allows you to force a break after an element. It allows you to determine if a break should occur, and what type of break it should be. The break-after CSS property describes how the page, column or region break behaves after the generated box. If there is no generated box, the property is ignored.
*/
breakAfter?: any;
/**
* Control page/column/region breaks that fall above a block of content
*/
breakBefore?: any;
/**
* Control page/column/region breaks that fall within a block of content
*/
breakInside?: any;
/**
* The clear CSS property specifies if an element can be positioned next to or must be positioned below the floating elements that precede it in the markup.
*/
clear?: any;
/**
* Deprecated; see clip-path.
* Lets you specify the dimensions of an absolutely positioned element that should be visible, and the element is clipped into this shape, and displayed.
*/
clip?: any;
/**
* Clipping crops an graphic, so that only a portion of the graphic is rendered, or filled. This clip-rule property, when used with the clip-path property, defines which clip rule, or algorithm, to use when filling the different parts of a graphics.
*/
clipRule?: any;
/**
* The color property sets the color of an element's foreground content (usually text), accepting any standard CSS color from keywords and hex values to RGB(a) and HSL(a).
*/
color?: any;
/**
* Specifies how to fill columns (balanced or sequential).
*/
columnFill?: any;
/**
* The column-gap property controls the width of the gap between columns in multi-column elements.
*/
columnGap?: any;
/**
* Sets the width, style, and color of the rule between columns.
*/
columnRule?: any;
/**
* Specifies the color of the rule between columns.
*/
columnRuleColor?: any;
/**
* Specifies the width of the rule between columns.
*/
columnRuleWidth?: any;
/**
* The column-span CSS property makes it possible for an element to span across all columns when its value is set to all. An element that spans more than one column is called a spanning element.
*/
columnSpan?: any;
/**
* Specifies the width of columns in multi-column elements.
*/
columnWidth?: any;
/**
* This property is a shorthand property for setting column-width and/or column-count.
*/
columns?: any;
/**
* The counter-increment property accepts one or more names of counters (identifiers), each one optionally followed by an integer which specifies the value by which the counter should be incremented (e.g. if the value is 2, the counter increases by 2 each time it is invoked).
*/
counterIncrement?: any;
/**
* The counter-reset property contains a list of one or more names of counters, each one optionally followed by an integer (otherwise, the integer defaults to 0.) Each time the given element is invoked, the counters specified by the property are set to the given integer.
*/
counterReset?: any;
/**
* The cue property specifies sound files (known as an "auditory icon") to be played by speech media agents before and after presenting an element's content; if only one file is specified, it is played both before and after. The volume at which the file(s) should be played, relative to the volume of the main element, may also be specified. The icon files may also be set separately with the cue-before and cue-after properties.
*/
cue?: any;
/**
* The cue-after property specifies a sound file (known as an "auditory icon") to be played by speech media agents after presenting an element's content; the volume at which the file should be played may also be specified. The shorthand property cue sets cue sounds for both before and after the element is presented.
*/
cueAfter?: any;
/**
* The direction CSS property specifies the text direction/writing direction. The rtl is used for Hebrew or Arabic text, the ltr is for other languages.
*/
direction?: any;
/**
* This property specifies the type of rendering box used for an element. It is a shorthand property for many other display properties.
*/
display?: any;
/**
* The ‘fill’ property paints the interior of the given graphical element. The area to be painted consists of any areas inside the outline of the shape. To determine the inside of the shape, all subpaths are considered, and the interior is determined according to the rules associated with the current value of the ‘fill-rule’ property. The zero-width geometric outline of a shape is included in the area to be painted.
*/
fill?: any;
/**
* The ‘fill-rule’ property indicates the algorithm which is to be used to determine what parts of the canvas are included inside the shape. For a simple, non-intersecting path, it is intuitively clear what region lies "inside"; however, for a more complex path, such as a path that intersects itself or where one subpath encloses another, the interpretation of "inside" is not so obvious.
* The ‘fill-rule’ property provides two options for how the inside of a shape is determined:
*/
fillRule?: any;
/**
* Applies various image processing effects. This property is largely unsupported. See Compatibility section for more information.
*/
filter?: any;
/**
* Obsolete, do not use. This property has been renamed to align-items.
* Specifies the alignment (perpendicular to the layout axis defined by the flex-direction property) of child elements of the object.
*/
flexAlign?: any;
/**
* The flex-basis CSS property describes the initial main size of the flex item before any free space is distributed according to the flex factors described in the flex property (flex-grow and flex-shrink).
*/
flexBasis?: any;
/**
* The flex-direction CSS property describes how flex items are placed in the flex container, by setting the direction of the flex container's main axis.
*/
flexDirection?: any;
/**
* The flex-flow CSS property defines the flex container's main and cross axis. It is a shorthand property for the flex-direction and flex-wrap properties.
*/
flexFlow?: any;
/**
* Do not use. This property has been renamed to align-self
* Specifies the alignment (perpendicular to the layout axis defined by flex-direction) of child elements of the object.
*/
flexItemAlign?: any;
/**
* Do not use. This property has been renamed to align-content.
* Specifies how a flexbox's lines align within the flexbox when there is extra space along the axis that is perpendicular to the axis defined by the flex-direction property.
*/
flexLinePack?: any;
/**
* Gets or sets a value that specifies the ordinal group that a flexbox element belongs to. This ordinal value identifies the display order for the group.
*/
flexOrder?: any;
/**
* Elements which have the style float are floated horizontally. These elements can move as far to the left or right of the containing element. All elements after the floating element will flow around it, but elements before the floating element are not impacted. If several floating elements are placed after each other, they will float next to each other as long as there is room.
*/
float?: any;
/**
* Flows content from a named flow (specified by a corresponding flow-into) through selected elements to form a dynamic chain of layout regions.
*/
flowFrom?: any;
/**
* The font property is shorthand that allows you to do one of two things: you can either set up six of the most mature font properties in one line, or you can set one of a choice of keywords to adopt a system font setting.
*/
font?: any;
/**
* The font-family property allows one or more font family names and/or generic family names to be specified for usage on the selected element(s)' text. The browser then goes through the list; for each character in the selection it applies the first font family that has an available glyph for that character.
*/
fontFamily?: any;
/**
* The font-kerning property allows contextual adjustment of inter-glyph spacing, i.e. the spaces between the characters in text. This property controls <bold>metric kerning</bold> - that utilizes adjustment data contained in the font. Optical Kerning is not supported as yet.
*/
fontKerning?: any;
/**
* The font-size-adjust property adjusts the font-size of the fallback fonts defined with font-family, so that the x-height is the same no matter what font is used. This preserves the readability of the text when fallback happens.
*/
fontSizeAdjust?: any;
/**
* Allows you to expand or condense the widths for a normal, condensed, or expanded font face.
*/
fontStretch?: any;
/**
* The font-style property allows normal, italic, or oblique faces to be selected. Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face. Oblique faces can be simulated by artificially sloping the glyphs of the regular face.
*/
fontStyle?: any;
/**
* This value specifies whether the user agent is allowed to synthesize bold or oblique font faces when a font family lacks bold or italic faces.
*/
fontSynthesis?: any;
/**
* The font-variant property enables you to select the small-caps font within a font family.
*/
fontVariant?: any;
/**
* Fonts can provide alternate glyphs in addition to default glyph for a character. This property provides control over the selection of these alternate glyphs.
*/
fontVariantAlternates?: any;
/**
* Lays out one or more grid items bound by 4 grid lines. Shorthand for setting grid-column-start, grid-column-end, grid-row-start, and grid-row-end in a single declaration.
*/
gridArea?: any;
/**
* Controls a grid item's placement in a grid area, particularly grid position and a grid span. Shorthand for setting grid-column-start and grid-column-end in a single declaration.
*/
gridColumn?: any;
/**
* Controls a grid item's placement in a grid area as well as grid position and a grid span. The grid-column-end property (with grid-row-start, grid-row-end, and grid-column-start) determines a grid item's placement by specifying the grid lines of a grid item's grid area.
*/
gridColumnEnd?: any;
/**
* Determines a grid item's placement by specifying the starting grid lines of a grid item's grid area . A grid item's placement in a grid area consists of a grid position and a grid span. See also ( grid-row-start, grid-row-end, and grid-column-end)
*/
gridColumnStart?: any;
/**
* Gets or sets a value that indicates which row an element within a Grid should appear in. Shorthand for setting grid-row-start and grid-row-end in a single declaration.
*/
gridRow?: any;
/**
* Determines a grid item’s placement by specifying the block-end. A grid item's placement in a grid area consists of a grid position and a grid span. The grid-row-end property (with grid-row-start, grid-column-start, and grid-column-end) determines a grid item's placement by specifying the grid lines of a grid item's grid area.
*/
gridRowEnd?: any;
/**
* Specifies a row position based upon an integer location, string value, or desired row size.
* css/properties/grid-row is used as short-hand for grid-row-position and grid-row-position
*/
gridRowPosition?: any;
gridRowSpan?: any;
/**
* Specifies named grid areas which are not associated with any particular grid item, but can be referenced from the grid-placement properties. The syntax of the grid-template-areas property also provides a visualization of the structure of the grid, making the overall layout of the grid container easier to understand.
*/
gridTemplateAreas?: any;
/**
* Specifies (with grid-template-rows) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid.
*/
gridTemplateColumns?: any;
/**
* Specifies (with grid-template-columns) the line names and track sizing functions of the grid. Each sizing function can be specified as a length, a percentage of the grid container’s size, a measurement of the contents occupying the column or row, or a fraction of the free space in the grid.
*/
gridTemplateRows?: any;
/**
* Sets the height of an element. The content area of the element height does not include the padding, border, and margin of the element.
*/
height?: any;
/**
* Specifies the minimum number of characters in a hyphenated word
*/
hyphenateLimitChars?: any;
/**
* Indicates the maximum number of successive hyphenated lines in an element. The ‘no-limit’ value means that there is no limit.
*/
hyphenateLimitLines?: any;
/**
* Specifies the maximum amount of trailing whitespace (before justification) that may be left in a line before hyphenation is triggered to pull part of a word from the next line back up into the current one.
*/
hyphenateLimitZone?: any;
/**
* Specifies whether or not words in a sentence can be split by the use of a manual or automatic hyphenation mechanism.
*/
hyphens?: any;
imeMode?: any;
layoutGrid?: any;
layoutGridChar?: any;
layoutGridLine?: any;
layoutGridMode?: any;
layoutGridType?: any;
/**
* Sets the left edge of an element
*/
left?: any;
/**
* The letter-spacing CSS property specifies the spacing behavior between text characters.
*/
letterSpacing?: any;
/**
* Deprecated. Gets or sets line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean.
*/
lineBreak?: any;
/**
* Shorthand property that sets the list-style-type, list-style-position and list-style-image properties in one declaration.
*/
listStyle?: any;
/**
* This property sets the image that will be used as the list item marker. When the image is available, it will replace the marker set with the 'list-style-type' marker. That also means that if the image is not available, it will show the style specified by list-style-property
*/
listStyleImage?: any;
/**
* Specifies if the list-item markers should appear inside or outside the content flow.
*/
listStylePosition?: any;
/**
* Specifies the type of list-item marker in a list.
*/
listStyleType?: any;
/**
* The margin property is shorthand to allow you to set all four margins of an element at once. Its equivalent longhand properties are margin-top, margin-right, margin-bottom and margin-left. Negative values are also allowed.
*/
margin?: any;
/**
* margin-bottom sets the bottom margin of an element.
*/
marginBottom?: any;
/**
* margin-left sets the left margin of an element.
*/
marginLeft?: any;
/**
* margin-right sets the right margin of an element.
*/
marginRight?: any;
/**
* margin-top sets the top margin of an element.
*/
marginTop?: any;
/**
* The marquee-direction determines the initial direction in which the marquee content moves.
*/
marqueeDirection?: any;
/**
* The 'marquee-style' property determines a marquee's scrolling behavior.
*/
marqueeStyle?: any;
/**
* This property is shorthand for setting mask-image, mask-mode, mask-repeat, mask-position, mask-clip, mask-origin, mask-composite and mask-size. Omitted values are set to their original properties' initial values.
*/
mask?: any;
/**
* This property is shorthand for setting mask-border-source, mask-border-slice, mask-border-width, mask-border-outset, and mask-border-repeat. Omitted values are set to their original properties' initial values.
*/
maskBorder?: any;
/**
* This property specifies how the images for the sides and the middle part of the mask image are scaled and tiled. The first keyword applies to the horizontal sides, the second one applies to the vertical ones. If the second keyword is absent, it is assumed to be the same as the first, similar to the CSS border-image-repeat property.
*/
maskBorderRepeat?: any;
/**
* This property specifies inward offsets from the top, right, bottom, and left edges of the mask image, dividing it into nine regions: four corners, four edges, and a middle. The middle image part is discarded and treated as fully transparent black unless the fill keyword is present. The four values set the top, right, bottom and left offsets in that order, similar to the CSS border-image-slice property.
*/
maskBorderSlice?: any;
/**
* Specifies an image to be used as a mask. An image that is empty, fails to download, is non-existent, or cannot be displayed is ignored and does not mask the element.
*/
maskBorderSource?: any;
/**
* This property sets the width of the mask box image, similar to the CSS border-image-width property.
*/
maskBorderWidth?: any;
/**
* Determines the mask painting area, which defines the area that is affected by the mask. The painted content of an element may be restricted to this area.
*/
maskClip?: any;
/**
* For elements rendered as a single box, specifies the mask positioning area. For elements rendered as multiple boxes (e.g., inline boxes on several lines, boxes on several pages) specifies which boxes box-decoration-break operates on to determine the mask positioning area(s).
*/
maskOrigin?: any;
/**
* This property must not be used. It is no longer included in any standard or standard track specification, nor is it implemented in any browser. It is only used when the text-align-last property is set to size. It controls allowed adjustments of font-size to fit line content.
*/
maxFontSize?: any;
/**
* Sets the maximum height for an element. It prevents the height of the element to exceed the specified value. If min-height is specified and is greater than max-height, max-height is overridden.
*/
maxHeight?: any;
/**
* Sets the maximum width for an element. It limits the width property to be larger than the value specified in max-width.
*/
maxWidth?: any;
/**
* Sets the minimum height for an element. It prevents the height of the element to be smaller than the specified value. The value of min-height overrides both max-height and height.
*/
minHeight?: any;
/**
* Sets the minimum width of an element. It limits the width property to be not smaller than the value specified in min-width.
*/
minWidth?: any;
/**
* The CSS outline property is a shorthand property for setting one or more of the individual outline properties outline-style, outline-width and outline-color in a single rule. In most cases the use of this shortcut is preferable and more convenient.
* Outlines differ from borders in the following ways: • Outlines do not take up space, they are drawn above the content.
* • Outlines may be non-rectangular. They are rectangular in Gecko/Firefox. Internet Explorer attempts to place the smallest contiguous outline around all elements or shapes that are indicated to have an outline. Opera draws a non-rectangular shape around a construct.
*/
outline?: any;
/**
* The outline-color property sets the color of the outline of an element. An outline is a line that is drawn around elements, outside the border edge, to make the element stand out.
*/
outlineColor?: any;
/**
* The outline-offset property offsets the outline and draw it beyond the border edge.
*/
outlineOffset?: any;
/**
* The overflow property controls how extra content exceeding the bounding box of an element is rendered. It can be used in conjunction with an element that has a fixed width and height, to eliminate text-induced page distortion.
*/
overflow?: any;
/**
* Specifies the preferred scrolling methods for elements that overflow.
*/
overflowStyle?: any;
/**
* The overflow-x property is a specific case of the generic overflow property. It controls how extra content exceeding the x-axis of the bounding box of an element is rendered.
*/
overflowX?: any;
/**
* The padding optional CSS property sets the required padding space on one to four sides of an element. The padding area is the space between an element and its border. Negative values are not allowed but decimal values are permitted. The element size is treated as fixed, and the content of the element shifts toward the center as padding is increased.
* The padding property is a shorthand to avoid setting each side separately (padding-top, padding-right, padding-bottom, padding-left).
*/
padding?: any;
/**
* The padding-bottom CSS property of an element sets the padding space required on the bottom of an element. The padding area is the space between the content of the element and its border. Contrary to margin-bottom values, negative values of padding-bottom are invalid.
*/
paddingBottom?: any;
/**
* The padding-left CSS property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-left values, negative values of padding-left are invalid.
*/
paddingLeft?: any;
/**
* The padding-right CSS property of an element sets the padding space required on the right side of an element. The padding area is the space between the content of the element and its border. Contrary to margin-right values, negative values of padding-right are invalid.
*/
paddingRight?: any;
/**
* The padding-top CSS property of an element sets the padding space required on the top of an element. The padding area is the space between the content of the element and its border. Contrary to margin-top values, negative values of padding-top are invalid.
*/
paddingTop?: any;
/**
* The page-break-after property is supported in all major browsers. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
*/
pageBreakAfter?: any;
/**
* The page-break-before property sets the page-breaking behavior before an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
*/
pageBreakBefore?: any;
/**
* Sets the page-breaking behavior inside an element. With CSS3, page-break-* properties are only aliases of the break-* properties. The CSS3 Fragmentation spec defines breaks for all CSS box fragmentation.
*/
pageBreakInside?: any;
/**
* The pause property determines how long a speech media agent should pause before and after presenting an element. It is a shorthand for the pause-before and pause-after properties.
*/
pause?: any;
/**
* The pause-after property determines how long a speech media agent should pause after presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after.
*/
pauseAfter?: any;
/**
* The pause-before property determines how long a speech media agent should pause before presenting an element. It may be replaced by the shorthand property pause, which sets pause time before and after.
*/
pauseBefore?: any;
/**
* The perspective property defines how far an element is placed from the view on the z-axis, from the screen to the viewer.
* Perspective defines how an object is viewed. In graphic arts, perspective is the representation on a flat surface of what the viewer's eye would see in a 3D space. (See Wikipedia for more information about graphical perspective and for related illustrations.)
* The illusion of perspective on a flat surface, such as a computer screen, is created by projecting points on the flat surface as they would appear if the flat surface were a window through which the viewer was looking at the object. In discussion of virtual environments, this flat surface is called a projection plane.
*/
perspective?: any;
/**
* The perspective-origin property establishes the origin for the perspective property. It effectively sets the X and Y position at which the viewer appears to be looking at the children of the element.
* When used with perspective, perspective-origin changes the appearance of an object, as if a viewer were looking at it from a different origin. An object appears differently if a viewer is looking directly at it versus looking at it from below, above, or from the side. Thus, the perspective-origin is like a vanishing point.
* The default value of perspective-origin is 50% 50%. This displays an object as if the viewer's eye were positioned directly at the center of the screen, both top-to-bottom and left-to-right. A value of 0% 0% changes the object as if the viewer was looking toward the top left angle. A value of 100% 100% changes the appearance as if viewed toward the bottom right angle.
*/
perspectiveOrigin?: any;
/**
* The pointer-events property allows you to control whether an element can be the target for the pointing device (e.g, mouse, pen) events.
*/
pointerEvents?: any;
/**
* The position property controls the type of positioning used by an element within its parent elements. The effect of the position property depends on a lot of factors, for example the position property of parent elements.
*/
position?: any;
/**
* Obsolete: unsupported.
* This property determines whether or not a full-width punctuation mark character should be trimmed if it appears at the beginning of a line, so that its "ink" lines up with the first glyph in the line above and below.
*/
punctuationTrim?: any;
/**
* Sets the type of quotation marks for embedded quotations.
*/
quotes?: any;
/**
* Controls whether the last region in a chain displays additional 'overset' content according its default overflow property, or if it displays a fragment of content as if it were flowing into a subsequent region.
*/
regionFragment?: any;
/**
* The rest-after property determines how long a speech media agent should pause after presenting an element's main content, before presenting that element's exit cue sound. It may be replaced by the shorthand property rest, which sets rest time before and after.
*/
restAfter?: any;
/**
* The rest-before property determines how long a speech media agent should pause after presenting an intro cue sound for an element, before presenting that element's main content. It may be replaced by the shorthand property rest, which sets rest time before and after.
*/
restBefore?: any;
/**
* Specifies the position an element in relation to the right side of the containing element.
*/
right?: any;
rubyAlign?: any;
rubyPosition?: any;
/**
* Defines the alpha channel threshold used to extract a shape from an image. Can be thought of as a "minimum opacity" threshold; that is, a value of 0.5 means that the shape will enclose all the pixels that are more than 50% opaque.
*/
shapeImageThreshold?: any;
/**
* A future level of CSS Shapes will define a shape-inside property, which will define a shape to wrap content within the element. See Editor's Draft <http://dev.w3.org/csswg/css-shapes/> and CSSWG wiki page on next-level plans <http://wiki.csswg.org/spec/css-shapes>
*/
shapeInside?: any;
/**
* Adds a margin to a shape-outside. In effect, defines a new shape that is the smallest contour around all the points that are the shape-margin distance outward perpendicular to each point on the underlying shape. For points where a perpendicular direction is not defined (e.g., a triangle corner), takes all points on a circle centered at the point and with a radius of the shape-margin distance. This property accepts only non-negative values.
*/
shapeMargin?: any;
/**
* Declares a shape around which text should be wrapped, with possible modifications from the shape-margin property. The shape defined by shape-outside and shape-margin changes the geometry of a float element's float area.
*/
shapeOutside?: any;
/**
* The speak property determines whether or not a speech synthesizer will read aloud the contents of an element.
*/
speak?: any;
/**
* The speak-as property determines how the speech synthesizer interprets the content: words as whole words or as a sequence of letters, numbers as a numerical value or a sequence of digits, punctuation as pauses in speech or named punctuation characters.
*/
speakAs?: any;
/**
* The tab-size CSS property is used to customise the width of a tab (U+0009) character.
*/
tabSize?: any;
/**
* The 'table-layout' property controls the algorithm used to lay out the table cells, rows, and columns.
*/
tableLayout?: any;
/**
* The text-align CSS property describes how inline content like text is aligned in its parent block element. text-align does not control the alignment of block elements itself, only their inline content.
*/
textAlign?: any;
/**
* The text-align-last CSS property describes how the last line of a block element or a line before line break is aligned in its parent block element.
*/
textAlignLast?: any;
/**
* The text-decoration CSS property is used to set the text formatting to underline, overline, line-through or blink.
* underline and overline decorations are positioned under the text, line-through over it.
*/
textDecoration?: any;
/**
* Sets the color of any text decoration, such as underlines, overlines, and strike throughs.
*/
textDecorationColor?: any;
/**
* Sets what kind of line decorations are added to an element, such as underlines, overlines, etc.
*/
textDecorationLine?: any;
textDecorationLineThrough?: any;
textDecorationNone?: any;
textDecorationOverline?: any;
/**
* Specifies what parts of an element’s content are skipped over when applying any text decoration.
*/
textDecorationSkip?: any;
/**
* This property specifies the style of the text decoration line drawn on the specified element. The intended meaning for the values are the same as those of the border-style-properties.
*/
textDecorationStyle?: any;
textDecorationUnderline?: any;
/**
* The text-emphasis property will apply special emphasis marks to the elements text. Slightly similar to the text-decoration property only that this property can have affect on the line-height. It also is noted that this is shorthand for text-emphasis-style and for text-emphasis-color.
*/
textEmphasis?: any;
/**
* The text-emphasis-color property specifies the foreground color of the emphasis marks.
*/
textEmphasisColor?: any;
/**
* The text-emphasis-style property applies special emphasis marks to an element's text.
*/
textEmphasisStyle?: any;
/**
* This property helps determine an inline box's block-progression dimension, derived from the text-height and font-size properties for non-replaced elements, the height or the width for replaced elements, and the stacked block-progression dimension for inline-block elements. The block-progression dimension determines the position of the padding, border and margin for the element.
*/
textHeight?: any;
/**
* Specifies the amount of space horizontally that should be left on the first line of the text of an element. This horizontal spacing is at the beginning of the first line and is in respect to the left edge of the containing block box.
*/
textIndent?: any;
textJustifyTrim?: any;
textKashidaSpace?: any;
/**
* The text-line-through property is a shorthand property for text-line-through-style, text-line-through-color and text-line-through-mode. (Considered obsolete; use text-decoration instead.)
*/
textLineThrough?: any;
/**
* Specifies the line colors for the line-through text decoration.
* (Considered obsolete; use text-decoration-color instead.)
*/
textLineThroughColor?: any;
/**
* Sets the mode for the line-through text decoration, determining whether the text decoration affects the space characters or not.
* (Considered obsolete; use text-decoration-skip instead.)
*/
textLineThroughMode?: any;
/**
* Specifies the line style for line-through text decoration.
* (Considered obsolete; use text-decoration-style instead.)
*/
textLineThroughStyle?: any;
/**
* Specifies the line width for the line-through text decoration.
*/
textLineThroughWidth?: any;
/**
* The text-overflow shorthand CSS property determines how overflowed content that is not displayed is signaled to the users. It can be clipped, display an ellipsis ('…', U+2026 HORIZONTAL ELLIPSIS) or a Web author-defined string. It covers the two long-hand properties text-overflow-mode and text-overflow-ellipsis
*/
textOverflow?: any;
/**
* The text-overline property is the shorthand for the text-overline-style, text-overline-width, text-overline-color, and text-overline-mode properties.
*/
textOverline?: any;
/**
* Specifies the line color for the overline text decoration.
*/
textOverlineColor?: any;
/**
* Sets the mode for the overline text decoration, determining whether the text decoration affects the space characters or not.
*/
textOverlineMode?: any;
/**
* Specifies the line style for overline text decoration.
*/
textOverlineStyle?: any;
/**
* Specifies the line width for the overline text decoration.
*/
textOverlineWidth?: any;
/**
* The text-rendering CSS property provides information to the browser about how to optimize when rendering text. Options are: legibility, speed or geometric precision.
*/
textRendering?: any;
/**
* Obsolete: unsupported.
*/
textScript?: any;
/**
* The CSS text-shadow property applies one or more drop shadows to the text and <text-decorations> of an element. Each shadow is specified as an offset from the text, along with optional color and blur radius values.
*/
textShadow?: any;
/**
* This property transforms text for styling purposes. (It has no effect on the underlying content.)
*/
textTransform?: any;
/**
* Unsupported.
* This property will add a underline position value to the element that has an underline defined.
*/
textUnderlinePosition?: any;
/**
* After review this should be replaced by text-decoration should it not?
* This property will set the underline style for text with a line value for underline, overline, and line-through.
*/
textUnderlineStyle?: any;
/**
* This property specifies how far an absolutely positioned box's top margin edge is offset below the top edge of the box's containing block. For relatively positioned boxes, the offset is with respect to the top edges of the box itself (i.e., the box is given a position in the normal flow, then offset from that position according to these properties).
*/
top?: any;
/**
* Determines whether touch input may trigger default behavior supplied by the user agent, such as panning or zooming.
*/
touchAction?: any;
/**
* CSS transforms allow elements styled with CSS to be transformed in two-dimensional or three-dimensional space. Using this property, elements can be translated, rotated, scaled, and skewed. The value list may consist of 2D and/or 3D transform values.
*/
transform?: any;
/**
* This property defines the origin of the transformation axes relative to the element to which the transformation is applied.
*/
transformOrigin?: any;
/**
* This property allows you to define the relative position of the origin of the transformation grid along the z-axis.
*/
transformOriginZ?: any;
/**
* This property specifies how nested elements are rendered in 3D space relative to their parent.
*/
transformStyle?: any;
/**
* The transition CSS property is a shorthand property for transition-property, transition-duration, transition-timing-function, and transition-delay. It allows to define the transition between two states of an element.
*/
transition?: any;
/**
* Defines when the transition will start. A value of ‘0s’ means the transition will execute as soon as the property is changed. Otherwise, the value specifies an offset from the moment the property is changed, and the transition will delay execution by that offset.
*/
transitionDelay?: any;
/**
* The 'transition-duration' property specifies the length of time a transition animation takes to complete.
*/
transitionDuration?: any;
/**
* The 'transition-property' property specifies the name of the CSS property to which the transition is applied.
*/
transitionProperty?: any;
/**
* Sets the pace of action within a transition
*/
transitionTimingFunction?: any;
/**
* The unicode-bidi CSS property specifies the level of embedding with respect to the bidirectional algorithm.
*/
unicodeBidi?: any;
/**
* unicode-range allows you to set a specific range of characters to be downloaded from a font (embedded using @font-face) and made available for use on the current page.
*/
unicodeRange?: any;
/**
* This is for all the high level UX stuff.
*/
userFocus?: any;
/**
* For inputing user content
*/
userInput?: any;
/**
* The vertical-align property controls how inline elements or text are vertically aligned compared to the baseline. If this property is used on table-cells it controls the vertical alignment of content of the table cell.
*/
verticalAlign?: any;
/**
* The visibility property specifies whether the boxes generated by an element are rendered.
*/
visibility?: any;
/**
* The voice-balance property sets the apparent position (in stereo sound) of the synthesized voice for spoken media.
*/
voiceBalance?: any;
/**
* The voice-duration property allows the author to explicitly set the amount of time it should take a speech synthesizer to read an element's content, for example to allow the speech to be synchronized with other media. With a value of auto (the default) the length of time it takes to read the content is determined by the content itself and the voice-rate property.
*/
voiceDuration?: any;
/**
* The voice-family property sets the speaker's voice used by a speech media agent to read an element. The speaker may be specified as a named character (to match a voice option in the speech reading software) or as a generic description of the age and gender of the voice. Similar to the font-family property for visual media, a comma-separated list of fallback options may be given in case the speech reader does not recognize the character name or cannot synthesize the requested combination of generic properties.
*/
voiceFamily?: any;
/**
* The voice-pitch property sets pitch or tone (high or low) for the synthesized speech when reading an element; the pitch may be specified absolutely or relative to the normal pitch for the voice-family used to read the text.
*/
voicePitch?: any;
/**
* The voice-range property determines how much variation in pitch or tone will be created by the speech synthesize when reading an element. Emphasized text, grammatical structures and punctuation may all be rendered as changes in pitch, this property determines how strong or obvious those changes are; large ranges are associated with enthusiastic or emotional speech, while small ranges are associated with flat or mechanical speech.
*/
voiceRange?: any;
/**
* The voice-rate property sets the speed at which the voice synthesized by a speech media agent will read content.
*/
voiceRate?: any;
/**
* The voice-stress property sets the level of vocal emphasis to be used for synthesized speech reading the element.
*/
voiceStress?: any;
/**
* The voice-volume property sets the volume for spoken content in speech media. It replaces the deprecated volume property.
*/
voiceVolume?: any;
/**
* The white-space property controls whether and how white space inside the element is collapsed, and whether lines may wrap at unforced "soft wrap" opportunities.
*/
whiteSpace?: any;
/**
* Obsolete: unsupported.
*/
whiteSpaceTreatment?: any;
/**
* Specifies the width of the content area of an element. The content area of the element width does not include the padding, border, and margin of the element.
*/
width?: any;
/**
* The word-break property is often used when there is long generated content that is strung together without and spaces or hyphens to beak apart. A common case of this is when there is a long URL that does not have any hyphens. This case could potentially cause the breaking of the layout as it could extend past the parent element.
*/
wordBreak?: any;
/**
* The word-spacing CSS property specifies the spacing behavior between "words".
*/
wordSpacing?: any;
/**
* An alias of css/properties/overflow-wrap, word-wrap defines whether to break words when the content exceeds the boundaries of its container.
*/
wordWrap?: any;
/**
* Specifies how exclusions affect inline content within block-level elements. Elements lay out their inline content in their content area but wrap around exclusion areas.
*/
wrapFlow?: any;
/**
* Set the value that is used to offset the inner wrap shape from other shapes. Inline content that intersects a shape with this property will be pushed by this shape's margin.
*/
wrapMargin?: any;
/**
* Obsolete and unsupported. Do not use.
* This CSS property controls the text when it reaches the end of the block in which it is enclosed.
*/
wrapOption?: any;
/**
* writing-mode specifies if lines of text are laid out horizontally or vertically, and the direction which lines of text and blocks progress.
*/
writingMode?: any;
[propertyName: string]: any;
}
interface HTMLAttributes extends DOMAttributes {
// React-specific Attributes
defaultChecked?: boolean;
defaultValue?: string | string[];
// Standard HTML Attributes
accept?: string;
acceptCharset?: string;
accessKey?: string;
action?: string;
allowFullScreen?: boolean;
allowTransparency?: boolean;
alt?: string;
async?: boolean;
autoComplete?: string;
autoFocus?: boolean;
autoPlay?: boolean;
capture?: boolean;
cellPadding?: number | string;
cellSpacing?: number | string;
charSet?: string;
challenge?: string;
checked?: boolean;
classID?: string;
className?: string;
cols?: number;
colSpan?: number;
content?: string;
contentEditable?: boolean;
contextMenu?: string;
controls?: boolean;
coords?: string;
crossOrigin?: string;
data?: string;
dateTime?: string;
default?: boolean;
defer?: boolean;
dir?: string;
disabled?: boolean;
download?: any;
draggable?: boolean;
encType?: string;
form?: string;
formAction?: string;
formEncType?: string;
formMethod?: string;
formNoValidate?: boolean;
formTarget?: string;
frameBorder?: number | string;
headers?: string;
height?: number | string;
hidden?: boolean;
high?: number;
href?: string;
hrefLang?: string;
htmlFor?: string;
httpEquiv?: string;
icon?: string;
id?: string;
inputMode?: string;
integrity?: string;
is?: string;
keyParams?: string;
keyType?: string;
kind?: string;
label?: string;
lang?: string;
list?: string;
loop?: boolean;
low?: number;
manifest?: string;
marginHeight?: number;
marginWidth?: number;
max?: number | string;
maxLength?: number;
media?: string;
mediaGroup?: string;
method?: string;
min?: number | string;
minLength?: number;
multiple?: boolean;
muted?: boolean;
name?: string;
noValidate?: boolean;
open?: boolean;
optimum?: number;
pattern?: string;
placeholder?: string;
poster?: string;
preload?: string;
radioGroup?: string;
readOnly?: boolean;
rel?: string;
required?: boolean;
role?: string;
rows?: number;
rowSpan?: number;
sandbox?: string;
scope?: string;
scoped?: boolean;
scrolling?: string;
seamless?: boolean;
selected?: boolean;
shape?: string;
size?: number;
sizes?: string;
span?: number;
spellCheck?: boolean;
src?: string;
srcDoc?: string;
srcLang?: string;
srcSet?: string;
start?: number;
step?: number | string;
style?: CSSProperties;
summary?: string;
tabIndex?: number;
target?: string;
title?: string;
type?: string;
useMap?: string;
value?: string | string[];
width?: number | string;
wmode?: string;
wrap?: string;
// RDFa Attributes
about?: string;
datatype?: string;
inlist?: any;
prefix?: string;
property?: string;
resource?: string;
typeof?: string;
vocab?: string;
// Non-standard Attributes
autoCapitalize?: string;
autoCorrect?: string;
autoSave?: string;
color?: string;
itemProp?: string;
itemScope?: boolean;
itemType?: string;
itemID?: string;
itemRef?: string;
results?: number;
security?: string;
unselectable?: boolean;
}
interface SVGAttributes extends HTMLAttributes {
clipPath?: string;
cx?: number | string;
cy?: number | string;
d?: string;
dx?: number | string;
dy?: number | string;
fill?: string;
fillOpacity?: number | string;
fontFamily?: string;
fontSize?: number | string;
fx?: number | string;
fy?: number | string;
gradientTransform?: string;
gradientUnits?: string;
markerEnd?: string;
markerMid?: string;
markerStart?: string;
offset?: number | string;
opacity?: number | string;
patternContentUnits?: string;
patternUnits?: string;
points?: string;
preserveAspectRatio?: string;
r?: number | string;
rx?: number | string;
ry?: number | string;
spreadMethod?: string;
stopColor?: string;
stopOpacity?: number | string;
stroke?: string;
strokeDasharray?: string;
strokeLinecap?: string;
strokeMiterlimit?: string;
strokeOpacity?: number | string;
strokeWidth?: number | string;
textAnchor?: string;
transform?: string;
version?: string;
viewBox?: string;
x1?: number | string;
x2?: number | string;
x?: number | string;
xlinkActuate?: string;
xlinkArcrole?: string;
xlinkHref?: string;
xlinkRole?: string;
xlinkShow?: string;
xlinkTitle?: string;
xlinkType?: string;
xmlBase?: string;
xmlLang?: string;
xmlSpace?: string;
y1?: number | string;
y2?: number | string;
y?: number | string;
}
//
// React.DOM
// ----------------------------------------------------------------------
interface ReactDOM {
// HTML
a: HTMLFactory;
abbr: HTMLFactory;
address: HTMLFactory;
area: HTMLFactory;
article: HTMLFactory;
aside: HTMLFactory;
audio: HTMLFactory;
b: HTMLFactory;
base: HTMLFactory;
bdi: HTMLFactory;
bdo: HTMLFactory;
big: HTMLFactory;
blockquote: HTMLFactory;
body: HTMLFactory;
br: HTMLFactory;
button: HTMLFactory;
canvas: HTMLFactory;
caption: HTMLFactory;
cite: HTMLFactory;
code: HTMLFactory;
col: HTMLFactory;
colgroup: HTMLFactory;
data: HTMLFactory;
datalist: HTMLFactory;
dd: HTMLFactory;
del: HTMLFactory;
details: HTMLFactory;
dfn: HTMLFactory;
dialog: HTMLFactory;
div: HTMLFactory;
dl: HTMLFactory;
dt: HTMLFactory;
em: HTMLFactory;
embed: HTMLFactory;
fieldset: HTMLFactory;
figcaption: HTMLFactory;
figure: HTMLFactory;
footer: HTMLFactory;
form: HTMLFactory;
h1: HTMLFactory;
h2: HTMLFactory;
h3: HTMLFactory;
h4: HTMLFactory;
h5: HTMLFactory;
h6: HTMLFactory;
head: HTMLFactory;
header: HTMLFactory;
hr: HTMLFactory;
html: HTMLFactory;
i: HTMLFactory;
iframe: HTMLFactory;
img: HTMLFactory;
input: HTMLFactory;
ins: HTMLFactory;
kbd: HTMLFactory;
keygen: HTMLFactory;
label: HTMLFactory;
legend: HTMLFactory;
li: HTMLFactory;
link: HTMLFactory;
main: HTMLFactory;
map: HTMLFactory;
mark: HTMLFactory;
menu: HTMLFactory;
menuitem: HTMLFactory;
meta: HTMLFactory;
meter: HTMLFactory;
nav: HTMLFactory;
noscript: HTMLFactory;
object: HTMLFactory;
ol: HTMLFactory;
optgroup: HTMLFactory;
option: HTMLFactory;
output: HTMLFactory;
p: HTMLFactory;
param: HTMLFactory;
picture: HTMLFactory;
pre: HTMLFactory;
progress: HTMLFactory;
q: HTMLFactory;
rp: HTMLFactory;
rt: HTMLFactory;
ruby: HTMLFactory;
s: HTMLFactory;
samp: HTMLFactory;
script: HTMLFactory;
section: HTMLFactory;
select: HTMLFactory;
small: HTMLFactory;
source: HTMLFactory;
span: HTMLFactory;
strong: HTMLFactory;
style: HTMLFactory;
sub: HTMLFactory;
summary: HTMLFactory;
sup: HTMLFactory;
table: HTMLFactory;
tbody: HTMLFactory;
td: HTMLFactory;
textarea: HTMLFactory;
tfoot: HTMLFactory;
th: HTMLFactory;
thead: HTMLFactory;
time: HTMLFactory;
title: HTMLFactory;
tr: HTMLFactory;
track: HTMLFactory;
u: HTMLFactory;
ul: HTMLFactory;
"var": HTMLFactory;
video: HTMLFactory;
wbr: HTMLFactory;
// SVG
svg: SVGFactory;
circle: SVGFactory;
defs: SVGFactory;
ellipse: SVGFactory;
g: SVGFactory;
image: SVGFactory;
line: SVGFactory;
linearGradient: SVGFactory;
mask: SVGFactory;
path: SVGFactory;
pattern: SVGFactory;
polygon: SVGFactory;
polyline: SVGFactory;
radialGradient: SVGFactory;
rect: SVGFactory;
stop: SVGFactory;
text: SVGFactory;
tspan: SVGFactory;
}
//
// React.PropTypes
// ----------------------------------------------------------------------
interface Validator<T> {
(object: T, key: string, componentName: string): Error;
}
interface Requireable<T> extends Validator<T> {
isRequired: Validator<T>;
}
interface ValidationMap<T> {
[key: string]: Validator<T>;
}
interface ReactPropTypes {
any: Requireable<any>;
array: Requireable<any>;
bool: Requireable<any>;
func: Requireable<any>;
number: Requireable<any>;
object: Requireable<any>;
string: Requireable<any>;
node: Requireable<any>;
element: Requireable<any>;
instanceOf(expectedClass: {}): Requireable<any>;
oneOf(types: any[]): Requireable<any>;
oneOfType(types: Validator<any>[]): Requireable<any>;
arrayOf(type: Validator<any>): Requireable<any>;
objectOf(type: Validator<any>): Requireable<any>;
shape(type: ValidationMap<any>): Requireable<any>;
}
//
// React.Children
// ----------------------------------------------------------------------
interface ReactChildren {
map<T>(children: ReactNode, fn: (child: ReactChild, index: number) => T): T[];
forEach(children: ReactNode, fn: (child: ReactChild, index: number) => any): void;
count(children: ReactNode): number;
only(children: ReactNode): ReactElement<any>;
toArray(children: ReactNode): ReactChild[];
}
//
// Browser Interfaces
// https://github.com/nikeee/2048-typescript/blob/master/2048/js/touch.d.ts
// ----------------------------------------------------------------------
interface AbstractView {
styleMedia: StyleMedia;
document: Document;
}
interface Touch {
identifier: number;
target: EventTarget;
screenX: number;
screenY: number;
clientX: number;
clientY: number;
pageX: number;
pageY: number;
}
interface TouchList {
[index: number]: Touch;
length: number;
item(index: number): Touch;
identifiedTouch(identifier: number): Touch;
}
}
declare module "react" {
export = __React;
}
declare namespace JSX {
import React = __React;
interface Element extends React.ReactElement<any> { }
interface ElementClass extends React.Component<any, any> {
render(): JSX.Element;
}
interface ElementAttributesProperty { props: {}; }
interface IntrinsicAttributes {
key?: string | number;
}
interface IntrinsicClassAttributes<T> {
ref?: string | ((classInstance: T) => void);
}
interface IntrinsicElements {
// HTML
a: React.HTMLProps<HTMLAnchorElement>;
abbr: React.HTMLProps<HTMLElement>;
address: React.HTMLProps<HTMLElement>;
area: React.HTMLProps<HTMLAreaElement>;
article: React.HTMLProps<HTMLElement>;
aside: React.HTMLProps<HTMLElement>;
audio: React.HTMLProps<HTMLAudioElement>;
b: React.HTMLProps<HTMLElement>;
base: React.HTMLProps<HTMLBaseElement>;
bdi: React.HTMLProps<HTMLElement>;
bdo: React.HTMLProps<HTMLElement>;
big: React.HTMLProps<HTMLElement>;
blockquote: React.HTMLProps<HTMLElement>;
body: React.HTMLProps<HTMLBodyElement>;
br: React.HTMLProps<HTMLBRElement>;
button: React.HTMLProps<HTMLButtonElement>;
canvas: React.HTMLProps<HTMLCanvasElement>;
caption: React.HTMLProps<HTMLElement>;
cite: React.HTMLProps<HTMLElement>;
code: React.HTMLProps<HTMLElement>;
col: React.HTMLProps<HTMLTableColElement>;
colgroup: React.HTMLProps<HTMLTableColElement>;
data: React.HTMLProps<HTMLElement>;
datalist: React.HTMLProps<HTMLDataListElement>;
dd: React.HTMLProps<HTMLElement>;
del: React.HTMLProps<HTMLElement>;
details: React.HTMLProps<HTMLElement>;
dfn: React.HTMLProps<HTMLElement>;
dialog: React.HTMLProps<HTMLElement>;
div: React.HTMLProps<HTMLDivElement>;
dl: React.HTMLProps<HTMLDListElement>;
dt: React.HTMLProps<HTMLElement>;
em: React.HTMLProps<HTMLElement>;
embed: React.HTMLProps<HTMLEmbedElement>;
fieldset: React.HTMLProps<HTMLFieldSetElement>;
figcaption: React.HTMLProps<HTMLElement>;
figure: React.HTMLProps<HTMLElement>;
footer: React.HTMLProps<HTMLElement>;
form: React.HTMLProps<HTMLFormElement>;
h1: React.HTMLProps<HTMLHeadingElement>;
h2: React.HTMLProps<HTMLHeadingElement>;
h3: React.HTMLProps<HTMLHeadingElement>;
h4: React.HTMLProps<HTMLHeadingElement>;
h5: React.HTMLProps<HTMLHeadingElement>;
h6: React.HTMLProps<HTMLHeadingElement>;
head: React.HTMLProps<HTMLHeadElement>;
header: React.HTMLProps<HTMLElement>;
hr: React.HTMLProps<HTMLHRElement>;
html: React.HTMLProps<HTMLHtmlElement>;
i: React.HTMLProps<HTMLElement>;
iframe: React.HTMLProps<HTMLIFrameElement>;
img: React.HTMLProps<HTMLImageElement>;
input: React.HTMLProps<HTMLInputElement>;
ins: React.HTMLProps<HTMLModElement>;
kbd: React.HTMLProps<HTMLElement>;
keygen: React.HTMLProps<HTMLElement>;
label: React.HTMLProps<HTMLLabelElement>;
legend: React.HTMLProps<HTMLLegendElement>;
li: React.HTMLProps<HTMLLIElement>;
link: React.HTMLProps<HTMLLinkElement>;
main: React.HTMLProps<HTMLElement>;
map: React.HTMLProps<HTMLMapElement>;
mark: React.HTMLProps<HTMLElement>;
menu: React.HTMLProps<HTMLElement>;
menuitem: React.HTMLProps<HTMLElement>;
meta: React.HTMLProps<HTMLMetaElement>;
meter: React.HTMLProps<HTMLElement>;
nav: React.HTMLProps<HTMLElement>;
noscript: React.HTMLProps<HTMLElement>;
object: React.HTMLProps<HTMLObjectElement>;
ol: React.HTMLProps<HTMLOListElement>;
optgroup: React.HTMLProps<HTMLOptGroupElement>;
option: React.HTMLProps<HTMLOptionElement>;
output: React.HTMLProps<HTMLElement>;
p: React.HTMLProps<HTMLParagraphElement>;
param: React.HTMLProps<HTMLParamElement>;
picture: React.HTMLProps<HTMLElement>;
pre: React.HTMLProps<HTMLPreElement>;
progress: React.HTMLProps<HTMLProgressElement>;
q: React.HTMLProps<HTMLQuoteElement>;
rp: React.HTMLProps<HTMLElement>;
rt: React.HTMLProps<HTMLElement>;
ruby: React.HTMLProps<HTMLElement>;
s: React.HTMLProps<HTMLElement>;
samp: React.HTMLProps<HTMLElement>;
script: React.HTMLProps<HTMLElement>;
section: React.HTMLProps<HTMLElement>;
select: React.HTMLProps<HTMLSelectElement>;
small: React.HTMLProps<HTMLElement>;
source: React.HTMLProps<HTMLSourceElement>;
span: React.HTMLProps<HTMLSpanElement>;
strong: React.HTMLProps<HTMLElement>;
style: React.HTMLProps<HTMLStyleElement>;
sub: React.HTMLProps<HTMLElement>;
summary: React.HTMLProps<HTMLElement>;
sup: React.HTMLProps<HTMLElement>;
table: React.HTMLProps<HTMLTableElement>;
tbody: React.HTMLProps<HTMLTableSectionElement>;
td: React.HTMLProps<HTMLTableDataCellElement>;
textarea: React.HTMLProps<HTMLTextAreaElement>;
tfoot: React.HTMLProps<HTMLTableSectionElement>;
th: React.HTMLProps<HTMLTableHeaderCellElement>;
thead: React.HTMLProps<HTMLTableSectionElement>;
time: React.HTMLProps<HTMLElement>;
title: React.HTMLProps<HTMLTitleElement>;
tr: React.HTMLProps<HTMLTableRowElement>;
track: React.HTMLProps<HTMLTrackElement>;
u: React.HTMLProps<HTMLElement>;
ul: React.HTMLProps<HTMLUListElement>;
"var": React.HTMLProps<HTMLElement>;
video: React.HTMLProps<HTMLVideoElement>;
wbr: React.HTMLProps<HTMLElement>;
// SVG
svg: React.SVGProps;
circle: React.SVGProps;
clipPath: React.SVGProps;
defs: React.SVGProps;
ellipse: React.SVGProps;
g: React.SVGProps;
image: React.SVGProps;
line: React.SVGProps;
linearGradient: React.SVGProps;
mask: React.SVGProps;
path: React.SVGProps;
pattern: React.SVGProps;
polygon: React.SVGProps;
polyline: React.SVGProps;
radialGradient: React.SVGProps;
rect: React.SVGProps;
stop: React.SVGProps;
text: React.SVGProps;
tspan: React.SVGProps;
}
}
================================================
FILE: example/.vscode/typings/react-native/react-native.d.ts
================================================
// Type definitions for react-native 0.14
// Project: https://github.com/facebook/react-native
// Definitions by: Bruno Grieder <https://github.com/bgrieder>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// USING: these definitions are meant to be used with the TSC compiler target set to ES6
//
// USAGE EXAMPLES: check the RNTSExplorer project at https://github.com/bgrieder/RNTSExplorer
//
// CONTRIBUTING: please open pull requests and make sure that the changes do not break RNTSExplorer (they should not)
// Do not hesitate to open a pull request against RNTSExplorer to provide an example for a case not covered by the current App
//
// CREDITS: This work is based on an original work made by Bernd Paradies: https://github.com/bparadie
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// <reference path="../react/react.d.ts" />
//so we know what is "original" React
import React = __React;
//react-native "extends" react
declare namespace __React {
/**
* Represents the completion of an asynchronous operation
* @see lib.es6.d.ts
*/
export interface Promise<T> {
/**
* Attaches callbacks for the resolution and/or rejection of the Promise.
* @param onfulfilled The callback to execute when the Promise is resolved.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of which ever callback is executed.
*/
then<TResult>( onfulfilled?: ( value: T ) => TResult | Promise<TResult>, onrejected?: ( reason: any ) => TResult | Promise<TResult> ): Promise<TResult>;
/**
* Attaches a callback for only the rejection of the Promise.
* @param onrejected The callback to execute when the Promise is rejected.
* @returns A Promise for the completion of the callback.
*/
catch( onrejected?: ( reason: any ) => T | Promise<T> ): Promise<T>;
// not in lib.es6.d.ts but called by react-native
done( callback?: ( value: T ) => void ): void;
}
export interface PromiseConstructor {
/**
* A reference to the prototype.
*/
prototype: Promise<any>;
/**
* Creates a new Promise.
* @param init A callback used to initialize the promise. This callback is passed two arguments:
* a resolve callback used resolve the promise with a value or the result of another promise,
* and a reject callback used to reject the promise with a provided reason or error.
*/
new <T>( init: ( resolve: ( value?: T | Promise<T> ) => void, reject: ( reason?: any ) => void ) => void ): Promise<T>;
<T>( init: ( resolve: ( value?: T | Promise<T> ) => void, reject: ( reason?: any ) => void ) => void ): Promise<T>;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any Promise is rejected.
* @param values An array of Promises.
* @returns A new Promise.
*/
all<T>( values: (T | Promise<T>)[] ): Promise<T[]>;
/**
* Creates a Promise that is resolved with an array of results when all of the provided Promises
* resolve, or rejected when any Promise is rejected.
* @param values An array of values.
* @returns A new Promise.
*/
all( values: Promise<void>[] ): Promise<void>;
/**
* Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
* or rejected.
* @param values An array of Promises.
* @returns A new Promise.
*/
race<T>( values: (T | Promise<T>)[] ): Promise<T>;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject( reason: any ): Promise<void>;
/**
* Creates a new rejected promise for the provided reason.
* @param reason The reason the promise was rejected.
* @returns A new rejected Promise.
*/
reject<T>( reason: any ): Promise<T>;
/**
* Creates a new resolved promise for the provided value.
* @param value A promise.
* @returns A promise whose internal state matches the provided promise.
*/
resolve<T>( value: T | Promise<T> ): Promise<T>;
/**
* Creates a new resolved promise .
* @returns A resolved promise.
*/
resolve(): Promise<void>;
}
// @see lib.es6.d.ts
export var Promise: PromiseConstructor;
//TODO: BGR: Replace with ComponentClass ?
// node_modules/react-tools/src/classic/class/ReactClass.js
export interface ReactClass<D, P, S> {
// TODO:
}
// see react-jsx.d.ts
export function createElement<P>( type: React.ReactType,
props?: P,
...children: React.ReactNode[] ): React.ReactElement<P>;
export type Runnable = ( appParameters: any ) => void;
// Similar to React.SyntheticEvent except for nativeEvent
interface NativeSyntheticEvent<T> {
bubbles: boolean
cancelable: boolean
currentTarget: EventTarget
defaultPrevented: boolean
eventPhase: number
isTrusted: boolean
nativeEvent: T
preventDefault(): void
stopPropagation(): void
target: EventTarget
timeStamp: Date
type: string
}
export interface NativeTouchEvent {
/**
* Array of all touch events that have changed since the last event
*/
changedTouches: NativeTouchEvent[]
/**
* The ID of the touch
*/
identifier: string
/**
* The X position of the touch, relative to the element
*/
locationX: number
/**
* The Y position of the touch, relative to the element
*/
locationY: number
/**
* The X position of the touch, relative to the screen
*/
pageX: number
/**
* The Y position of the touch, relative to the screen
*/
pageY: number
/**
* The node id of the element receiving the touch event
*/
target: string
/**
* A time identifier for the touch, useful for velocity calculation
*/
timestamp: number
/**
* Array of all current touches on the screen
*/
touches : NativeTouchEvent[]
}
export interface GestureResponderEvent extends NativeSyntheticEvent<NativeTouchEvent> {
}
export interface PointProperties {
x: number
y: number
}
export interface Insets {
top?: number
left?: number
bottom?: number
right?: number
}
/**
* //FIXME: need to find documentation on which compoenent is a native (i.e. non composite component)
*/
export interface NativeComponent {
setNativeProps: ( props: Object ) => void
}
/**
* //FIXME: need to find documentation on which component is a TTouchable and can implement that interface
* @see React.DOMAtributes
*/
export interface Touchable {
onTouchStart?: ( event: GestureResponderEvent ) => void
onTouchMove?: ( event: GestureResponderEvent ) => void
onTouchEnd?: ( event: GestureResponderEvent ) => void
onTouchCancel?: ( event: GestureResponderEvent ) => void
onTouchEndCapture?: ( event: GestureResponderEvent ) => void
}
export type AppConfig = {
appKey: string;
component: ReactClass<any, any, any>;
run?: Runnable;
}
// https://github.com/facebook/react-native/blob/master/Libraries/AppRegistry/AppRegistry.js
export class AppRegistry {
static registerConfig( config: AppConfig[] ): void;
static registerComponent( appKey: string, getComponentFunc: () => React.ComponentClass<any> ): string;
static registerRunnable( appKey: string, func: Runnable ): string;
static runApplication( appKey: string, appParameters: any ): void;
}
export interface LayoutAnimationTypes {
spring: string
linear: string
easeInEaseOut: string
easeIn: string
easeOut: string
}
export interface LayoutAnimationProperties {
opacity: string
scaleXY: string
}
export interface LayoutAnimationAnim {
duration?: number
delay?: number
springDamping?: number
initialVelocity?: number
type?: string //LayoutAnimationTypes
property?: string //LayoutAnimationProperties
}
export interface LayoutAnimationConfig {
duration: number
create?: LayoutAnimationAnim
update?: LayoutAnimationAnim
delete?: LayoutAnimationAnim
}
export interface LayoutAnimationStatic {
configureNext: ( config: LayoutAnimationConfig, onAnimationDidEnd?: () => void, onError?: ( error?: any ) => void ) => void
create: ( duration: number, type?: string, creationProp?: string ) => LayoutAnimationConfig
Types: LayoutAnimationTypes
Properties: LayoutAnimationProperties
configChecker: ( conf: {config: LayoutAnimationConfig}, name: string, next: stri
gitextract_pkp7bq6l/
├── .gitignore
├── .travis.yml
├── .vscode/
│ └── launch.json
├── .watchmanconfig
├── LICENSE
├── Makefile
├── README.md
├── __tests__/
│ └── change-observer-handler.test.js
├── event-emitter.js
├── example/
│ ├── .babelrc
│ ├── .buckconfig
│ ├── .flowconfig
│ ├── .gitattributes
│ ├── .gitignore
│ ├── .npmignore
│ ├── .vscode/
│ │ ├── launch.json
│ │ ├── launchReactNative.js
│ │ └── typings/
│ │ ├── react/
│ │ │ ├── react-addons-create-fragment.d.ts
│ │ │ ├── react-addons-css-transition-group.d.ts
│ │ │ ├── react-addons-linked-state-mixin.d.ts
│ │ │ ├── react-addons-perf.d.ts
│ │ │ ├── react-addons-pure-render-mixin.d.ts
│ │ │ ├── react-addons-test-utils.d.ts
│ │ │ ├── react-addons-transition-group.d.ts
│ │ │ ├── react-addons-update.d.ts
│ │ │ ├── react-dom.d.ts
│ │ │ ├── react-global.d.ts
│ │ │ └── react.d.ts
│ │ └── react-native/
│ │ └── react-native.d.ts
│ ├── .watchmanconfig
│ ├── README.md
│ ├── album-list.js
│ ├── android/
│ │ ├── app/
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ ├── java/
│ │ │ │ └── com/
│ │ │ │ └── example/
│ │ │ │ ├── MainActivity.java
│ │ │ │ └── MainApplication.java
│ │ │ └── res/
│ │ │ └── values/
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle/
│ │ │ └── wrapper/
│ │ │ ├── gradle-wrapper.jar
│ │ │ └── gradle-wrapper.properties
│ │ ├── gradle.properties
│ │ ├── gradlew
│ │ ├── gradlew.bat
│ │ ├── keystores/
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── index.android.js
│ ├── index.ios-ajax.js
│ ├── index.ios.js
│ ├── ios/
│ │ ├── Example/
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj/
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets/
│ │ │ │ └── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ ├── Example.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ └── xcshareddata/
│ │ │ └── xcschemes/
│ │ │ └── Example.xcscheme
│ │ └── ExampleTests/
│ │ ├── ExampleTests.m
│ │ └── Info.plist
│ ├── library-test.js
│ ├── package.json
│ ├── react-native-camera-roll-picker/
│ │ ├── ImageItem.js
│ │ ├── camera-roll-picker.js
│ │ └── index.ios.js
│ ├── react-native-photos-framework/
│ │ ├── event-emitter.js
│ │ └── index.js
│ └── tsconfig.json
├── index.js
├── install.js
├── ios/
│ ├── RNPhotosFramework/
│ │ ├── ImageHelpers.h
│ │ ├── ImageHelpers.m
│ │ ├── PHAssetWithCollectionIndex.h
│ │ ├── PHAssetWithCollectionIndex.m
│ │ ├── PHAssetsService.h
│ │ ├── PHAssetsService.m
│ │ ├── PHCache.h
│ │ ├── PHCache.m
│ │ ├── PHCachedFetchResult.h
│ │ ├── PHCachedFetchResult.m
│ │ ├── PHCachingImageManagerInstance.h
│ │ ├── PHCachingImageManagerInstance.m
│ │ ├── PHCancellationToken.h
│ │ ├── PHCancellationToken.m
│ │ ├── PHCancellationTokenManager.h
│ │ ├── PHCancellationTokenManager.m
│ │ ├── PHChangeObserver.h
│ │ ├── PHChangeObserver.m
│ │ ├── PHCollectionService.h
│ │ ├── PHCollectionService.m
│ │ ├── PHCreateMediaQueue.h
│ │ ├── PHCreateMediaQueue.m
│ │ ├── PHFetchOptionsService.h
│ │ ├── PHFetchOptionsService.m
│ │ ├── PHOperationResult.h
│ │ ├── PHOperationResult.m
│ │ ├── PHSaveAsset.h
│ │ ├── PHSaveAsset.m
│ │ ├── PHSaveAssetFileRequest.h
│ │ ├── PHSaveAssetFileRequest.m
│ │ ├── PHSaveAssetRequest.h
│ │ ├── PHSaveAssetRequest.m
│ │ ├── PHSaveAssetToFileOperationResult.h
│ │ ├── PHSaveAssetToFileOperationResult.m
│ │ ├── PHVideoExporter.h
│ │ ├── PHVideoExporter.m
│ │ ├── RCTConvert+RNPhotosFramework.h
│ │ ├── RCTConvert+RNPhotosFramework.m
│ │ ├── RCTImageResizer.h
│ │ ├── RCTImageResizer.m
│ │ ├── RNPFFileDownloader.h
│ │ ├── RNPFFileDownloader.m
│ │ ├── RNPFGlobals.h
│ │ ├── RNPFHelpers.h
│ │ ├── RNPFHelpers.m
│ │ ├── RNPFImageLoader.h
│ │ ├── RNPFImageLoader.m
│ │ ├── RNPFManager.h
│ │ ├── RNPFManager.m
│ │ ├── RNPFUrlRequestHandler.h
│ │ ├── RNPFUrlRequestHandler.m
│ │ ├── RNPhotosFramework.h
│ │ ├── RNPhotosFramework.m
│ │ ├── SDAVAssetExportSession.h
│ │ ├── SDAVAssetExportSession.m
│ │ ├── iDebounce.h
│ │ └── iDebounce.m
│ ├── RNPhotosFramework.xcodeproj/
│ │ └── project.pbxproj
│ └── RNPhotosFrameworkTests/
│ ├── Info.plist
│ ├── PHAssetsService_getAssetsForFetchResultTests.m
│ └── RCTConvert+RNPhotosFrameworkTests.m
├── local-cli/
│ ├── android/
│ │ └── android.js
│ ├── bundle/
│ │ ├── assetPathUtils.js
│ │ ├── buildBundle.js
│ │ ├── bundle.js
│ │ ├── bundleCommandLineArgs.js
│ │ ├── getAssetDestPathAndroid.js
│ │ ├── getAssetDestPathIOS.js
│ │ ├── output/
│ │ │ ├── bundle.js
│ │ │ ├── meta.js
│ │ │ ├── prepack.js
│ │ │ ├── unbundle/
│ │ │ │ ├── as-assets.js
│ │ │ │ ├── as-indexed-file.js
│ │ │ │ ├── build-unbundle-sourcemap-with-metadata.js
│ │ │ │ ├── index.js
│ │ │ │ ├── magic-number.js
│ │ │ │ ├── util.js
│ │ │ │ └── write-sourcemap.js
│ │ │ └── writeFile.js
│ │ ├── saveAssets.js
│ │ ├── sign.js
│ │ ├── signedsource.js
│ │ └── unbundle.js
│ ├── cli.js
│ ├── cliEntry.js
│ ├── commands.js
│ ├── core/
│ │ ├── config/
│ │ │ ├── android/
│ │ │ │ ├── findAndroidAppFolder.js
│ │ │ │ ├── findManifest.js
│ │ │ │ ├── findPackageClassName.js
│ │ │ │ ├── index.js
│ │ │ │ └── readManifest.js
│ │ │ ├── findAssets.js
│ │ │ ├── index.js
│ │ │ ├── ios/
│ │ │ │ ├── findProject.js
│ │ │ │ └── index.js
│ │ │ └── wrapCommands.js
│ │ ├── findPlugins.js
│ │ ├── getCommands.js
│ │ └── makeCommand.js
│ ├── default.config.js
│ ├── dependencies/
│ │ └── dependencies.js
│ ├── generate/
│ │ └── generate.js
│ ├── generate-android.js
│ ├── generator/
│ │ └── index.js
│ ├── generator-android/
│ │ ├── index.js
│ │ └── templates/
│ │ ├── bin/
│ │ │ ├── gradle/
│ │ │ │ └── wrapper/
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradlew
│ │ │ └── gradlew.bat
│ │ ├── package/
│ │ │ ├── MainActivity.java
│ │ │ └── MainApplication.java
│ │ └── src/
│ │ ├── app/
│ │ │ ├── BUCK
│ │ │ ├── build.gradle
│ │ │ ├── proguard-rules.pro
│ │ │ └── src/
│ │ │ └── main/
│ │ │ ├── AndroidManifest.xml
│ │ │ └── res/
│ │ │ └── values/
│ │ │ ├── strings.xml
│ │ │ └── styles.xml
│ │ ├── build.gradle
│ │ ├── gradle.properties
│ │ ├── keystores/
│ │ │ ├── BUCK
│ │ │ └── debug.keystore.properties
│ │ └── settings.gradle
│ ├── generator-ios/
│ │ ├── index.js
│ │ └── templates/
│ │ ├── app/
│ │ │ ├── AppDelegate.h
│ │ │ ├── AppDelegate.m
│ │ │ ├── Base.lproj/
│ │ │ │ └── LaunchScreen.xib
│ │ │ ├── Images.xcassets/
│ │ │ │ └── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ ├── Info.plist
│ │ │ └── main.m
│ │ ├── tests/
│ │ │ ├── Info.plist
│ │ │ └── Tests.m
│ │ └── xcodeproj/
│ │ ├── project.pbxproj
│ │ └── xcshareddata/
│ │ └── xcschemes/
│ │ └── _xcscheme
│ ├── generator-utils.js
│ ├── init/
│ │ └── init.js
│ ├── install/
│ │ ├── install.js
│ │ └── uninstall.js
│ ├── library/
│ │ └── library.js
│ ├── link/
│ │ ├── android/
│ │ │ ├── copyAssets.js
│ │ │ ├── fs.js
│ │ │ ├── isInstalled.js
│ │ │ ├── patches/
│ │ │ │ ├── applyParams.js
│ │ │ │ ├── applyPatch.js
│ │ │ │ ├── makeBuildPatch.js
│ │ │ │ ├── makeImportPatch.js
│ │ │ │ ├── makePackagePatch.js
│ │ │ │ ├── makeSettingsPatch.js
│ │ │ │ ├── makeStringsPatch.js
│ │ │ │ └── revokePatch.js
│ │ │ ├── registerNativeModule.js
│ │ │ ├── unlinkAssets.js
│ │ │ └── unregisterNativeModule.js
│ │ ├── commandStub.js
│ │ ├── getDependencyConfig.js
│ │ ├── getProjectDependencies.js
│ │ ├── groupFilesByType.js
│ │ ├── ios/
│ │ │ ├── addFileToProject.js
│ │ │ ├── addProjectToLibraries.js
│ │ │ ├── addSharedLibraries.js
│ │ │ ├── addToHeaderSearchPaths.js
│ │ │ ├── copyAssets.js
│ │ │ ├── createGroup.js
│ │ │ ├── createGroupWithMessage.js
│ │ │ ├── getBuildProperty.js
│ │ │ ├── getGroup.js
│ │ │ ├── getHeaderSearchPath.js
│ │ │ ├── getHeadersInFolder.js
│ │ │ ├── getPlist.js
│ │ │ ├── getPlistPath.js
│ │ │ ├── getProducts.js
│ │ │ ├── hasLibraryImported.js
│ │ │ ├── isInstalled.js
│ │ │ ├── mapHeaderSearchPaths.js
│ │ │ ├── registerNativeModule.js
│ │ │ ├── removeFromHeaderSearchPaths.js
│ │ │ ├── removeFromPbxItemContainerProxySection.js
│ │ │ ├── removeFromPbxReferenceProxySection.js
│ │ │ ├── removeFromProjectReferences.js
│ │ │ ├── removeFromStaticLibraries.js
│ │ │ ├── removeProductGroup.js
│ │ │ ├── removeProjectFromLibraries.js
│ │ │ ├── removeProjectFromProject.js
│ │ │ ├── removeSharedLibraries.js
│ │ │ ├── unlinkAssets.js
│ │ │ └── unregisterNativeModule.js
│ │ ├── link.js
│ │ ├── pollParams.js
│ │ ├── promiseWaterfall.js
│ │ ├── promisify.js
│ │ └── unlink.js
│ ├── logAndroid/
│ │ └── logAndroid.js
│ ├── logIOS/
│ │ └── logIOS.js
│ ├── runAndroid/
│ │ ├── adb.js
│ │ └── runAndroid.js
│ ├── runIOS/
│ │ ├── findMatchingSimulator.js
│ │ ├── findXcodeProject.js
│ │ ├── parseIOSDevicesList.js
│ │ └── runIOS.js
│ ├── server/
│ │ ├── checkNodeVersion.js
│ │ ├── findSymlinksPaths.js
│ │ ├── formatBanner.js
│ │ ├── middleware/
│ │ │ ├── copyToClipBoardMiddleware.js
│ │ │ ├── cpuProfilerMiddleware.js
│ │ │ ├── getDevToolsMiddleware.js
│ │ │ ├── heapCapture/
│ │ │ │ ├── .npmignore
│ │ │ │ ├── Makefile
│ │ │ │ ├── heapCapture.html
│ │ │ │ ├── out/
│ │ │ │ │ ├── aggrow.js
│ │ │ │ │ ├── heapCapture.js
│ │ │ │ │ └── table.js
│ │ │ │ └── src/
│ │ │ │ ├── aggrow.js
│ │ │ │ ├── heapCapture.js
│ │ │ │ └── table.js
│ │ │ ├── heapCaptureMiddleware.js
│ │ │ ├── index.html
│ │ │ ├── indexPage.js
│ │ │ ├── jscProfilerMiddleware.js
│ │ │ ├── loadRawBodyMiddleware.js
│ │ │ ├── openStackFrameInEditorMiddleware.js
│ │ │ ├── statusPageMiddleware.js
│ │ │ └── systraceProfileMiddleware.js
│ │ ├── runServer.js
│ │ ├── server.js
│ │ └── util/
│ │ ├── attachHMRServer.js
│ │ ├── copyToClipBoard.js
│ │ ├── debugger.html
│ │ ├── debuggerWorker.js
│ │ ├── launchEditor.js
│ │ ├── messageSocket.js
│ │ └── webSocketProxy.js
│ ├── setup_env.bat
│ ├── setup_env.sh
│ ├── upgrade/
│ │ └── upgrade.js
│ ├── util/
│ │ ├── Config.js
│ │ ├── assertRequiredOptions.js
│ │ ├── copyAndReplace.js
│ │ ├── isPackagerRunning.js
│ │ ├── isValidPackageName.js
│ │ ├── log.js
│ │ ├── parseCommandLine.js
│ │ └── walk.js
│ └── wrong-react-native.js
├── package.json
├── react-native-photos-framework.podspec
├── scripts/
│ ├── objc-test-ios.sh
│ └── objc-test.sh
└── src/
├── .watchmanconfig
├── ajax-helper.js
├── album-query-result-base.js
├── album-query-result-collection.js
├── album-query-result.js
├── album.js
├── asset.js
├── change-observer-handler.js
├── image-asset.js
├── index.js
├── instagram-app-sort.js
├── photo-app-sort.js
├── uuid-generator.js
├── video-asset.js
└── video-props-resolver.js
SYMBOL INDEX (703 symbols across 101 files)
FILE: __tests__/change-observer-handler.test.js
function toNumberedCollectionIndex (line 6) | function toNumberedCollectionIndex(arr) {
FILE: example/.vscode/typings/react-native/react-native.d.ts
type Promise (line 32) | interface Promise<T> {
type PromiseConstructor (line 53) | interface PromiseConstructor {
type ReactClass (line 126) | interface ReactClass<D, P, S> {
type Runnable (line 136) | type Runnable = ( appParameters: any ) => void;
type NativeSyntheticEvent (line 140) | interface NativeSyntheticEvent<T> {
type NativeTouchEvent (line 155) | interface NativeTouchEvent {
type GestureResponderEvent (line 202) | interface GestureResponderEvent extends NativeSyntheticEvent<NativeTouch...
type PointProperties (line 206) | interface PointProperties {
type Insets (line 211) | interface Insets {
type NativeComponent (line 221) | interface NativeComponent {
type Touchable (line 229) | interface Touchable {
type AppConfig (line 237) | type AppConfig = {
class AppRegistry (line 244) | class AppRegistry {
type LayoutAnimationTypes (line 254) | interface LayoutAnimationTypes {
type LayoutAnimationProperties (line 262) | interface LayoutAnimationProperties {
type LayoutAnimationAnim (line 267) | interface LayoutAnimationAnim {
type LayoutAnimationConfig (line 276) | interface LayoutAnimationConfig {
type LayoutAnimationStatic (line 283) | interface LayoutAnimationStatic {
type FlexStyle (line 303) | interface FlexStyle {
type TransformsStyle (line 340) | interface TransformsStyle {
type StyleSheetProperties (line 352) | interface StyleSheetProperties {
type LayoutRectangle (line 356) | interface LayoutRectangle {
type LayoutChangeEvent (line 364) | interface LayoutChangeEvent {
type TextStyle (line 371) | interface TextStyle extends ViewStyle {
type TextPropertiesIOS (line 387) | interface TextPropertiesIOS {
type TextProperties (line 397) | interface TextProperties extends React.Props<TextProperties> {
type TextStatic (line 436) | interface TextStatic extends React.ComponentClass<TextProperties> {
type TextInputIOSProperties (line 445) | interface TextInputIOSProperties {
type TextInputAndroidProperties (line 501) | interface TextInputAndroidProperties {
type TextInputProperties (line 531) | interface TextInputProperties extends TextInputIOSProperties, TextInputA...
type TextInputStatic (line 663) | interface TextInputStatic extends NativeComponent, React.ComponentClass<...
type GestureResponderHandlers (line 694) | interface GestureResponderHandlers {
type ViewStyle (line 786) | interface ViewStyle extends FlexStyle, TransformsStyle {
type ViewPropertiesIOS (line 807) | interface ViewPropertiesIOS {
type ViewPropertiesAndroid (line 830) | interface ViewPropertiesAndroid {
type ViewProperties (line 901) | interface ViewProperties extends ViewPropertiesAndroid, ViewPropertiesIO...
type ViewStatic (line 978) | interface ViewStatic extends NativeComponent, React.ComponentClass<ViewP...
type NavState (line 985) | interface NavState {
type WebViewPropertiesAndroid (line 996) | interface WebViewPropertiesAndroid {
type WebViewPropertiesIOS (line 1004) | interface WebViewPropertiesIOS {
type WebViewProperties (line 1015) | interface WebViewProperties extends WebViewPropertiesAndroid, WebViewPro...
type WebViewStatic (line 1058) | interface WebViewStatic extends React.ComponentClass<WebViewProperties> {
type SegmentedControlIOSProperties (line 1069) | interface SegmentedControlIOSProperties {
type NavigatorIOSProperties (line 1074) | interface NavigatorIOSProperties extends React.Props<NavigatorIOSStatic> {
type NavigationIOS (line 1127) | interface NavigationIOS {
type NavigatorIOSStatic (line 1174) | interface NavigatorIOSStatic extends NavigationIOS, React.ComponentClass...
type ActivityIndicatorIOSProperties (line 1181) | interface ActivityIndicatorIOSProperties extends React.Props<ActivityInd...
type ActivityIndicatorIOSStatic (line 1214) | interface ActivityIndicatorIOSStatic extends React.ComponentClass<Activi...
type DatePickerIOSProperties (line 1218) | interface DatePickerIOSProperties extends React.Props<DatePickerIOSStati...
type DatePickerIOSStatic (line 1266) | interface DatePickerIOSStatic extends React.ComponentClass<DatePickerIOS...
type PickerIOSItemProperties (line 1273) | interface PickerIOSItemProperties extends React.Props<PickerIOSItemStati...
type PickerIOSItemStatic (line 1281) | interface PickerIOSItemStatic extends React.ComponentClass<PickerIOSItem...
type PickerIOSProperties (line 1289) | interface PickerIOSProperties extends React.Props<PickerIOSStatic> {
type PickerIOSStatic (line 1302) | interface PickerIOSStatic extends React.ComponentClass<PickerIOSProperti...
type SliderIOSProperties (line 1311) | interface SliderIOSProperties extends React.Props<SliderIOSStatic> {
type SliderIOSStatic (line 1371) | interface SliderIOSStatic extends React.ComponentClass<SliderIOSProperti...
type SwitchIOSStyle (line 1379) | interface SwitchIOSStyle extends ViewStyle {
type SwitchIOSProperties (line 1388) | interface SwitchIOSProperties extends React.Props<SwitchIOSStatic> {
type SwitchIOSStatic (line 1432) | interface SwitchIOSStatic extends React.ComponentClass<SwitchIOSProperti...
type ImageResizeModeStatic (line 1440) | interface ImageResizeModeStatic {
type ImageStyle (line 1463) | interface ImageStyle extends FlexStyle, TransformsStyle {
type ImagePropertiesIOS (line 1474) | interface ImagePropertiesIOS {
type ImageProperties (line 1527) | interface ImageProperties extends ImagePropertiesIOS, React.Props<Image> {
type ImageStatic (line 1565) | interface ImageStatic extends React.ComponentClass<ImageProperties> {
type ListViewProperties (line 1574) | interface ListViewProperties extends ScrollViewProperties, React.Props<L...
type ListViewStatic (line 1683) | interface ListViewStatic extends React.ComponentClass<ListViewProperties> {
type MapViewAnnotation (line 1688) | interface MapViewAnnotation {
type MapViewRegion (line 1701) | interface MapViewRegion {
type MapViewPropertiesIOS (line 1708) | interface MapViewPropertiesIOS {
type MapViewProperties (line 1717) | interface MapViewProperties extends MapViewPropertiesIOS, Touchable, Rea...
type MapViewStatic (line 1819) | interface MapViewStatic extends React.ComponentClass<MapViewProperties> {
type TouchableWithoutFeedbackAndroidProperties (line 1823) | interface TouchableWithoutFeedbackAndroidProperties {
type TouchableWithoutFeedbackIOSProperties (line 1834) | interface TouchableWithoutFeedbackIOSProperties {
type TouchableWithoutFeedbackProperties (line 1849) | interface TouchableWithoutFeedbackProperties extends TouchableWithoutFee...
type TouchableWithoutFeedbackProps (line 1897) | interface TouchableWithoutFeedbackProps extends TouchableWithoutFeedback...
type TouchableWithoutFeedbackStatic (line 1908) | interface TouchableWithoutFeedbackStatic extends React.ComponentClass<To...
type TouchableHighlightProperties (line 1916) | interface TouchableHighlightProperties extends TouchableWithoutFeedbackP...
type TouchableHighlightStatic (line 1959) | interface TouchableHighlightStatic extends React.ComponentClass<Touchabl...
type TouchableOpacityProperties (line 1966) | interface TouchableOpacityProperties extends TouchableWithoutFeedbackPro...
type TouchableOpacityStatic (line 1982) | interface TouchableOpacityStatic extends React.ComponentClass<TouchableO...
type TouchableNativeFeedbackProperties (line 1989) | interface TouchableNativeFeedbackProperties extends TouchableWithoutFeed...
type TouchableNativeFeedbackStatic (line 2011) | interface TouchableNativeFeedbackStatic extends React.ComponentClass<Tou...
type LeftToRightGesture (line 2018) | interface LeftToRightGesture {
type AnimationInterpolator (line 2022) | interface AnimationInterpolator {
type SceneConfig (line 2027) | interface SceneConfig {
type SceneConfigs (line 2049) | interface SceneConfigs {
type Route (line 2057) | interface Route {
type NavigatorProperties (line 2081) | interface NavigatorProperties extends React.Props<Navigator> {
type NavigatorStatic (line 2151) | interface NavigatorStatic extends React.ComponentClass<NavigatorProperti...
type NavState (line 2223) | interface NavState {
type NavigationBarStyle (line 2229) | interface NavigationBarStyle {
type NavigationBarRouteMapper (line 2234) | interface NavigationBarRouteMapper {
type NavigationBarProperties (line 2243) | interface NavigationBarProperties extends React.Props<NavigationBarStati...
type NavigationBarStatic (line 2250) | interface NavigationBarStatic extends React.ComponentClass<NavigationBar...
type NavigationBar (line 2255) | type NavigationBar = NavigationBarStatic
type BreadcrumbNavigationBarStyle (line 2259) | interface BreadcrumbNavigationBarStyle {
type BreadcrumbNavigationBarRouteMapper (line 2263) | interface BreadcrumbNavigationBarRouteMapper {
type BreadcrumbNavigationBarProperties (line 2274) | interface BreadcrumbNavigationBarProperties extends React.Props<Breadcru...
type BreadcrumbNavigationBarStatic (line 2281) | interface BreadcrumbNavigationBarStatic extends React.ComponentClass<Bre...
type BreadcrumbNavigationBar (line 2285) | type BreadcrumbNavigationBar = BreadcrumbNavigationBarStatic
type StyleSheetStatic (line 2291) | interface StyleSheetStatic extends React.ComponentClass<StyleSheetProper...
type DataSourceAssetCallback (line 2298) | interface DataSourceAssetCallback {
type ListViewDataSource (line 2308) | interface ListViewDataSource {
type TabBarItemProperties (line 2380) | interface TabBarItemProperties extends React.Props<TabBarItemStatic> {
type TabBarItemStatic (line 2429) | interface TabBarItemStatic extends React.ComponentClass<TabBarItemProper...
type TabBarIOSProperties (line 2435) | interface TabBarIOSProperties extends React.Props<TabBarIOSStatic> {
type TabBarIOSStatic (line 2455) | interface TabBarIOSStatic extends React.ComponentClass<TabBarIOSProperti...
type PixelRatioStatic (line 2460) | interface PixelRatioStatic {
type DeviceEventSubscriptionStatic (line 2464) | interface DeviceEventSubscriptionStatic {
type DeviceEventEmitterStatic (line 2468) | interface DeviceEventEmitterStatic {
type ScaledSize (line 2473) | interface ScaledSize {
type InteractionManagerStatic (line 2480) | interface InteractionManagerStatic {
type ScrollViewStyle (line 2485) | interface ScrollViewStyle extends FlexStyle, TransformsStyle {
type ScrollViewIOSProperties (line 2514) | interface ScrollViewIOSProperties {
type ScrollViewProperties (line 2668) | interface ScrollViewProperties extends ScrollViewIOSProperties, Touchable {
type ScrollViewProps (line 2741) | interface ScrollViewProps extends ScrollViewProperties, React.Props<Scro...
type ScrollViewStatic (line 2745) | interface ScrollViewStatic extends React.ComponentClass<ScrollViewProps> {
type NativeScrollRectangle (line 2750) | interface NativeScrollRectangle {
type NativeScrollPoint (line 2757) | interface NativeScrollPoint {
type NativeScrollSize (line 2762) | interface NativeScrollSize {
type NativeScrollEvent (line 2767) | interface NativeScrollEvent {
type ActionSheetIOSOptions (line 2785) | interface ActionSheetIOSOptions {
type ShareActionSheetIOSOptions (line 2795) | interface ShareActionSheetIOSOptions {
type ActionSheetIOSStatic (line 2804) | interface ActionSheetIOSStatic {
type AdSupportIOSStatic (line 2813) | interface AdSupportIOSStatic {
type AlertIOSButton (line 2818) | interface AlertIOSButton {
type AlertIOSStatic (line 2834) | interface AlertIOSStatic {
type AppStateIOSStatic (line 2856) | interface AppStateIOSStatic {
type AsyncStorageStatic (line 2871) | interface AsyncStorageStatic {
type CameraRollFetchParams (line 2929) | interface CameraRollFetchParams {
type CameraRollNodeInfo (line 2937) | interface CameraRollNodeInfo {
type CameraRollEdgeInfo (line 2944) | interface CameraRollEdgeInfo {
type CameraRollAssetInfo (line 2948) | interface CameraRollAssetInfo {
type CameraRollStatic (line 2959) | interface CameraRollStatic {
type FetchableListenable (line 2991) | interface FetchableListenable<T> {
type NetInfoStatic (line 3019) | interface NetInfoStatic extends FetchableListenable<string> {
type PanResponderGestureState (line 3033) | interface PanResponderGestureState {
type PanResponderCallbacks (line 3094) | interface PanResponderCallbacks {
type PanResponderInstance (line 3110) | interface PanResponderInstance {
type PanResponderStatic (line 3122) | interface PanResponderStatic {
type PushNotificationPermissions (line 3157) | interface PushNotificationPermissions {
type PushNotification (line 3163) | interface PushNotification {
type PushNotificationIOSStatic (line 3200) | interface PushNotificationIOSStatic {
type StatusBarStyle (line 3258) | type StatusBarStyle = string
type StatusBarAnimation (line 3263) | type StatusBarAnimation = string
type StatusBarIOSStatic (line 3271) | interface StatusBarIOSStatic {
type VibrationIOSStatic (line 3291) | interface VibrationIOSStatic {
type ActivityIndicatorIOS (line 3305) | type ActivityIndicatorIOS = ActivityIndicatorIOSStatic
type DatePickerIOS (line 3308) | type DatePickerIOS = DatePickerIOSStatic
type Image (line 3311) | type Image = ImageStatic
type LayoutAnimation (line 3314) | type LayoutAnimation = LayoutAnimationStatic
type ListView (line 3317) | type ListView = ListViewStatic
type MapView (line 3320) | type MapView = MapViewStatic
type Navigator (line 3323) | type Navigator = NavigatorStatic
type NavigatorIOS (line 3326) | type NavigatorIOS = NavigatorIOSStatic
type PickerIOS (line 3329) | type PickerIOS = PickerIOSStatic
type SliderIOS (line 3332) | type SliderIOS = SliderIOSStatic
type ScrollView (line 3335) | type ScrollView = ScrollViewStatic
type StyleSheet (line 3338) | type StyleSheet = StyleSheetStatic
type SwitchIOS (line 3341) | type SwitchIOS = SwitchIOSStatic
type TabBarIOS (line 3344) | type TabBarIOS = TabBarIOSStatic
type Text (line 3347) | type Text = TextStatic
type TextInput (line 3350) | type TextInput = TextInputStatic
type TouchableHighlight (line 3353) | type TouchableHighlight = TouchableHighlightStatic
type TouchableNativeFeedback (line 3356) | type TouchableNativeFeedback = TouchableNativeFeedbackStatic
type TouchableOpacity (line 3359) | type TouchableOpacity = TouchableOpacityStatic
type TouchableWithoutFeedback (line 3362) | type TouchableWithoutFeedback= TouchableWithoutFeedbackStatic
type View (line 3365) | type View = ViewStatic
type WebView (line 3368) | type WebView = WebViewStatic
type ActionSheetIOS (line 3373) | type ActionSheetIOS = ActionSheetIOSStatic
type AdSupportIOS (line 3376) | type AdSupportIOS = AdSupportIOSStatic
type AlertIOS (line 3379) | type AlertIOS = AlertIOSStatic
type AppStateIOS (line 3382) | type AppStateIOS = AppStateIOSStatic
type AsyncStorage (line 3385) | type AsyncStorage = AsyncStorageStatic
type CameraRoll (line 3388) | type CameraRoll = CameraRollStatic
type NetInfo (line 3391) | type NetInfo = NetInfoStatic
type PanResponder (line 3394) | type PanResponder = PanResponderStatic
type PushNotificationIOS (line 3397) | type PushNotificationIOS = PushNotificationIOSStatic
type StatusBarIOS (line 3400) | type StatusBarIOS = StatusBarIOSStatic
type VibrationIOS (line 3403) | type VibrationIOS = VibrationIOSStatic
type DeviceEventSubscription (line 3415) | type DeviceEventSubscription = DeviceEventSubscriptionStatic
type GlobalStatic (line 3427) | interface GlobalStatic {
type TestModuleStatic (line 3445) | interface TestModuleStatic {
type TestModule (line 3453) | type TestModule = TestModuleStatic
type Dimensions (line 3474) | interface Dimensions {
FILE: example/.vscode/typings/react/react-addons-css-transition-group.d.ts
type CSSTransitionGroupTransitionName (line 10) | interface CSSTransitionGroupTransitionName {
type CSSTransitionGroupProps (line 19) | interface CSSTransitionGroupProps extends TransitionGroupProps {
type CSSTransitionGroup (line 29) | type CSSTransitionGroup = ComponentClass<CSSTransitionGroupProps>;
type CSSTransitionGroup (line 38) | type CSSTransitionGroup = __React.CSSTransitionGroup;
FILE: example/.vscode/typings/react/react-addons-linked-state-mixin.d.ts
type ReactLink (line 9) | interface ReactLink<T> {
type LinkedStateMixin (line 14) | interface LinkedStateMixin extends Mixin<any, any> {
type HTMLAttributes (line 18) | interface HTMLAttributes {
type LinkedStateMixin (line 30) | type LinkedStateMixin = __React.LinkedStateMixin;
FILE: example/.vscode/typings/react/react-addons-perf.d.ts
type ComponentPerfContext (line 9) | interface ComponentPerfContext {
type NumericPerfContext (line 14) | interface NumericPerfContext {
type Measurements (line 18) | interface Measurements {
FILE: example/.vscode/typings/react/react-addons-pure-render-mixin.d.ts
type PureRenderMixin (line 9) | interface PureRenderMixin extends Mixin<any, any> {}
type PureRenderMixin (line 18) | type PureRenderMixin = __React.PureRenderMixin;
FILE: example/.vscode/typings/react/react-addons-test-utils.d.ts
type SyntheticEventData (line 9) | interface SyntheticEventData {
type EventSimulator (line 43) | interface EventSimulator {
type MockedComponentClass (line 48) | interface MockedComponentClass {
class ShallowRenderer (line 52) | class ShallowRenderer {
FILE: example/.vscode/typings/react/react-addons-transition-group.d.ts
type TransitionGroupProps (line 10) | interface TransitionGroupProps {
type TransitionGroup (line 15) | type TransitionGroup = ComponentClass<TransitionGroupProps>;
type TransitionGroup (line 24) | type TransitionGroup = __React.TransitionGroup;
FILE: example/.vscode/typings/react/react-addons-update.d.ts
type UpdateSpecCommand (line 9) | interface UpdateSpecCommand {
type UpdateSpecPath (line 15) | interface UpdateSpecPath {
type UpdateSpec (line 19) | type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
type UpdateArraySpec (line 21) | interface UpdateArraySpec extends UpdateSpecCommand {
FILE: example/.vscode/typings/react/react.d.ts
type ReactType (line 12) | type ReactType = string | ComponentClass<any> | StatelessComponent<any>;
type ReactElement (line 14) | interface ReactElement<P extends Props<any>> {
type ClassicElement (line 21) | interface ClassicElement<P> extends ReactElement<P> {
type DOMElement (line 26) | interface DOMElement<P extends Props<Element>> extends ReactElement<P> {
type ReactHTMLElement (line 31) | interface ReactHTMLElement extends DOMElement<HTMLProps<HTMLElement>> {
type ReactSVGElement (line 35) | interface ReactSVGElement extends DOMElement<SVGProps> {
type Factory (line 43) | interface Factory<P> {
type ClassicFactory (line 47) | interface ClassicFactory<P> extends Factory<P> {
type DOMFactory (line 51) | interface DOMFactory<P extends Props<Element>> extends Factory<P> {
type HTMLFactory (line 55) | type HTMLFactory = DOMFactory<HTMLProps<HTMLElement>>;
type SVGFactory (line 56) | type SVGFactory = DOMFactory<SVGProps>;
type ReactText (line 63) | type ReactText = string | number;
type ReactChild (line 64) | type ReactChild = ReactElement<any> | ReactText;
type ReactFragment (line 67) | type ReactFragment = {} | Array<ReactChild | any[] | boolean>;
type ReactNode (line 68) | type ReactNode = ReactChild | ReactFragment | boolean;
type ReactInstance (line 116) | type ReactInstance = Component<any, any> | Element;
class Component (line 119) | class Component<P, S> implements ComponentLifecycle<P, S> {
type ClassicComponent (line 133) | interface ClassicComponent<P, S> extends Component<P, S> {
type ChildContextProvider (line 139) | interface ChildContextProvider<CC> {
type StatelessComponent (line 147) | interface StatelessComponent<P> {
type ComponentClass (line 155) | interface ComponentClass<P> {
type ClassicComponentClass (line 163) | interface ClassicComponentClass<P> extends ComponentClass<P> {
type ComponentLifecycle (line 173) | interface ComponentLifecycle<P, S> {
type Mixin (line 183) | interface Mixin<P, S> extends ComponentLifecycle<P, S> {
type ComponentSpec (line 198) | interface ComponentSpec<P, S> extends Mixin<P, S> {
type SyntheticEvent (line 208) | interface SyntheticEvent {
type ClipboardEvent (line 223) | interface ClipboardEvent extends SyntheticEvent {
type CompositionEvent (line 227) | interface CompositionEvent extends SyntheticEvent {
type DragEvent (line 231) | interface DragEvent extends SyntheticEvent {
type FocusEvent (line 235) | interface FocusEvent extends SyntheticEvent {
type FormEvent (line 239) | interface FormEvent extends SyntheticEvent {
type KeyboardEvent (line 242) | interface KeyboardEvent extends SyntheticEvent {
type MouseEvent (line 257) | interface MouseEvent extends SyntheticEvent {
type TouchEvent (line 274) | interface TouchEvent extends SyntheticEvent {
type UIEvent (line 285) | interface UIEvent extends SyntheticEvent {
type WheelEvent (line 290) | interface WheelEvent extends SyntheticEvent {
type EventHandler (line 301) | interface EventHandler<E extends SyntheticEvent> {
type ReactEventHandler (line 305) | type ReactEventHandler = EventHandler<SyntheticEvent>;
type ClipboardEventHandler (line 307) | type ClipboardEventHandler = EventHandler<ClipboardEvent>;
type CompositionEventHandler (line 308) | type CompositionEventHandler = EventHandler<CompositionEvent>;
type DragEventHandler (line 309) | type DragEventHandler = EventHandler<DragEvent>;
type FocusEventHandler (line 310) | type FocusEventHandler = EventHandler<FocusEvent>;
type FormEventHandler (line 311) | type FormEventHandler = EventHandler<FormEvent>;
type KeyboardEventHandler (line 312) | type KeyboardEventHandler = EventHandler<KeyboardEvent>;
type MouseEventHandler (line 313) | type MouseEventHandler = EventHandler<MouseEvent>;
type TouchEventHandler (line 314) | type TouchEventHandler = EventHandler<TouchEvent>;
type UIEventHandler (line 315) | type UIEventHandler = EventHandler<UIEvent>;
type WheelEventHandler (line 316) | type WheelEventHandler = EventHandler<WheelEvent>;
type Props (line 322) | interface Props<T> {
type HTMLProps (line 328) | interface HTMLProps<T> extends HTMLAttributes, Props<T> {
type SVGProps (line 331) | interface SVGProps extends SVGAttributes, Props<SVGElement> {
type DOMAttributes (line 334) | interface DOMAttributes {
type CSSProperties (line 429) | interface CSSProperties {
type HTMLAttributes (line 1692) | interface HTMLAttributes extends DOMAttributes {
type SVGAttributes (line 1843) | interface SVGAttributes extends HTMLAttributes {
type ReactDOM (line 1905) | interface ReactDOM {
type Validator (line 2045) | interface Validator<T> {
type Requireable (line 2049) | interface Requireable<T> extends Validator<T> {
type ValidationMap (line 2053) | interface ValidationMap<T> {
type ReactPropTypes (line 2057) | interface ReactPropTypes {
type ReactChildren (line 2079) | interface ReactChildren {
type AbstractView (line 2092) | interface AbstractView {
type Touch (line 2097) | interface Touch {
type TouchList (line 2108) | interface TouchList {
type Element (line 2123) | interface Element extends React.ReactElement<any> { }
type ElementClass (line 2124) | interface ElementClass extends React.Component<any, any> {
type ElementAttributesProperty (line 2127) | interface ElementAttributesProperty { props: {}; }
type IntrinsicAttributes (line 2129) | interface IntrinsicAttributes {
type IntrinsicClassAttributes (line 2133) | interface IntrinsicClassAttributes<T> {
type IntrinsicElements (line 2137) | interface IntrinsicElements {
FILE: example/album-list.js
class AlbumList (line 20) | class AlbumList extends Component {
method constructor (line 22) | constructor() {
method componentDidMount (line 33) | componentDidMount() {
method onEditAlbums (line 45) | onEditAlbums() {
method createAlbum (line 58) | createAlbum(albumName) {
method onAlbumAdd (line 62) | onAlbumAdd() {
method renderRightButton (line 77) | renderRightButton(props, a) {
method renderLeftButton (line 87) | renderLeftButton() {
method componentWillMount (line 97) | componentWillMount() {
method renderFinnishEditingButton (line 134) | renderFinnishEditingButton() {
method componentWillReceiveProps (line 144) | componentWillReceiveProps(nextProps) {
method chunk (line 163) | chunk(arr, len) {
method albumPropsToListView (line 173) | albumPropsToListView(props) {
method onAlbumPress (line 185) | onAlbumPress(album) {
method _renderAlbum (line 189) | _renderAlbum(album, index, columnIndex) {
method renderTextField (line 232) | renderTextField(editable, album, rowIndex, columnIndex) {
method renderRemoveIcon (line 251) | renderRemoveIcon(album) {
method _renderRow (line 264) | _renderRow(albums, sectionIndex, rowIndex) {
method render (line 272) | render() {
FILE: example/android/app/src/main/java/com/example/MainActivity.java
class MainActivity (line 5) | public class MainActivity extends ReactActivity {
method getMainComponentName (line 11) | @Override
FILE: example/android/app/src/main/java/com/example/MainApplication.java
class MainApplication (line 18) | public class MainApplication extends Application implements ReactApplica...
method getUseDeveloperSupport (line 21) | @Override
method getPackages (line 26) | @Override
method getReactNativeHost (line 36) | @Override
method onCreate (line 41) | @Override
FILE: example/index.android.js
class Example (line 15) | class Example extends Component {
method render (line 16) | render() {
FILE: example/index.ios-ajax.js
class Example (line 12) | class Example extends Component {
method constructor (line 14) | constructor() {
method componentDidMount (line 21) | componentDidMount() {
method renderImage (line 99) | renderImage(asset, index) {
method render (line 105) | render() {
FILE: example/index.ios.js
class Example (line 10) | class Example extends Component {
method constructor (line 12) | constructor() {
method render (line 19) | render() {
FILE: example/library-test.js
constant TEST_ALBUM_ONE (line 3) | const TEST_ALBUM_ONE = 'RNPF-test-1';
constant TEST_ALBUM_TWO (line 4) | const TEST_ALBUM_TWO = 'RNPF-test-2';
class LibraryTest (line 6) | class LibraryTest {
method addTestImagesToAlbumOne (line 8) | addTestImagesToAlbumOne(album) {
method addTestImagesToAlbumTwo (line 21) | addTestImagesToAlbumTwo(album) {
method _componentWillMount (line 39) | _componentWillMount() {
method readd (line 57) | readd() {
method removeAlbums (line 72) | removeAlbums(albums) {
method cleanUp (line 76) | cleanUp() {
method testAlbumsExist (line 108) | testAlbumsExist() {
FILE: example/react-native-camera-roll-picker/ImageItem.js
class ImageItem (line 12) | class ImageItem extends Component {
method constructor (line 13) | constructor(props) {
method componentWillMount (line 18) | componentWillMount() {
method toogleVideoPlay (line 28) | toogleVideoPlay() {
method renderVideo (line 34) | renderVideo() {
method renderVideoSymbol (line 57) | renderVideoSymbol() {
method render (line 68) | render() {
method _handleClick (line 97) | _handleClick(item) {
FILE: example/react-native-camera-roll-picker/camera-roll-picker.js
class CameraRollPicker (line 17) | class CameraRollPicker extends Component {
method constructor (line 18) | constructor(props) {
method componentWillReceiveProps (line 33) | componentWillReceiveProps(nextProps) {
method fetch (line 48) | fetch() {
method componentWillMount (line 58) | componentWillMount() {
method componentWillUnmount (line 79) | componentWillUnmount() {
method _fetch (line 87) | _fetch(reset, nextProps) {
method _appendImages (line 176) | _appendImages(data) {
method render (line 200) | render() {
method _renderImage (line 255) | _renderImage(item) {
method _renderRow (line 277) | _renderRow(rowData) {
method _renderFooterSpinner (line 292) | _renderFooterSpinner() {
method _onEndReached (line 299) | _onEndReached() {
method _selectImage (line 305) | _selectImage(image) {
method _nEveryRow (line 330) | _nEveryRow(data, n) {
method _arrayObjectIndexOf (line 352) | _arrayObjectIndexOf(array, property, value) {
FILE: example/react-native-camera-roll-picker/index.ios.js
class ReactNativeCameraRollPicker (line 16) | class ReactNativeCameraRollPicker extends Component {
method constructor (line 17) | constructor(props) {
method componentDidMount (line 27) | componentDidMount() {
method removeSelectedFromAlbum (line 36) | removeSelectedFromAlbum() {
method deleteSelectedFromLibrary (line 43) | deleteSelectedFromLibrary() {
method afterRemove (line 62) | afterRemove() {
method removeSelectedImages (line 66) | removeSelectedImages() {
method renderRightButton (line 86) | renderRightButton(edit, hasSelectedMedia) {
method onEditAlbum (line 118) | onEditAlbum() {
method componentWillReceiveProps (line 124) | componentWillReceiveProps(nextProps) {
method getSelectedImages (line 134) | getSelectedImages(images, current) {
method downloadTenRandom (line 144) | downloadTenRandom() {
method insertLocalImage (line 173) | insertLocalImage() {
method insertTwoLocalImages (line 192) | insertTwoLocalImages() {
method insertLocalVideo (line 211) | insertLocalVideo() {
method insertTwoLocalVideos (line 228) | insertTwoLocalVideos() {
method insertRemoteLocalVideo (line 249) | insertRemoteLocalVideo() {
method downloadDialog (line 288) | downloadDialog() {
method render (line 333) | render() {
FILE: ios/RNPhotosFramework/RNPFManager.h
function interface (line 24) | interface RNPFManager : RCTEventEmitter <RCTBridgeModule> {
FILE: local-cli/android/android.js
function android (line 14) | function android(argv, config, args) {
FILE: local-cli/bundle/assetPathUtils.js
function getAndroidAssetSuffix (line 11) | function getAndroidAssetSuffix(scale) {
function getAndroidDrawableFolderName (line 22) | function getAndroidDrawableFolderName(asset, scale) {
function getAndroidResourceIdentifier (line 34) | function getAndroidResourceIdentifier(asset) {
function getBasePath (line 43) | function getBasePath(asset) {
FILE: local-cli/bundle/buildBundle.js
function saveBundle (line 18) | function saveBundle(output, bundle, args) {
function buildBundle (line 24) | function buildBundle(args, config, output = outputBundle, packagerInstan...
FILE: local-cli/bundle/bundle.js
function bundleWithOutput (line 18) | function bundleWithOutput(argv, config, args, output, packagerInstance) {
function bundle (line 25) | function bundle(argv, config, args, packagerInstance) {
FILE: local-cli/bundle/getAssetDestPathAndroid.js
function getAssetDestPathAndroid (line 14) | function getAssetDestPathAndroid(asset, scale) {
FILE: local-cli/bundle/getAssetDestPathIOS.js
function getAssetDestPathIOS (line 13) | function getAssetDestPathIOS(asset, scale) {
FILE: local-cli/bundle/output/bundle.js
function buildBundle (line 15) | function buildBundle(packagerClient, requestOptions) {
function createCodeWithMap (line 22) | function createCodeWithMap(bundle, dev) {
function saveBundleAndMap (line 29) | function saveBundleAndMap(bundle, options, log) {
FILE: local-cli/bundle/output/meta.js
function tryAsciiPromotion (line 34) | function tryAsciiPromotion(string, encoding) {
FILE: local-cli/bundle/output/prepack.js
function buildPrepackBundle (line 13) | function buildPrepackBundle(packagerClient, requestOptions) {
function savePrepackBundle (line 17) | function savePrepackBundle(bundle, options, log) {
FILE: local-cli/bundle/output/unbundle/as-assets.js
constant MAGIC_UNBUNDLE_NUMBER (line 18) | const MAGIC_UNBUNDLE_NUMBER = require('./magic-number');
constant MAGIC_UNBUNDLE_FILENAME (line 21) | const MAGIC_UNBUNDLE_FILENAME = 'UNBUNDLE';
constant MODULES_DIR (line 22) | const MODULES_DIR = 'js-modules';
function saveAsAssets (line 31) | function saveAsAssets(bundle, options, log) {
function createDir (line 64) | function createDir(dirName) {
function writeModuleFile (line 69) | function writeModuleFile(module, modulesDir, encoding) {
function writeModules (line 74) | function writeModules(modules, modulesDir, encoding) {
function writeMagicFlagFile (line 80) | function writeMagicFlagFile(outputDir) {
FILE: local-cli/bundle/output/unbundle/as-indexed-file.js
constant MAGIC_UNBUNDLE_FILE_HEADER (line 17) | const MAGIC_UNBUNDLE_FILE_HEADER = require('./magic-number');
constant SIZEOF_UINT32 (line 18) | const SIZEOF_UINT32 = 4;
function saveAsIndexedFile (line 27) | function saveAsIndexedFile(bundle, options, log) {
function writeBuffers (line 62) | function writeBuffers(stream, buffers) {
function nullTerminatedBuffer (line 71) | function nullTerminatedBuffer(contents, encoding) {
function moduleToBuffer (line 75) | function moduleToBuffer(id, code, encoding) {
function entryOffset (line 82) | function entryOffset(n) {
function buildModuleTable (line 88) | function buildModuleTable(startupCode, buffers, moduleGroups) {
function groupCode (line 129) | function groupCode(rootCode, moduleGroup, modulesById) {
function buildModuleBuffers (line 141) | function buildModuleBuffers(modules, moduleGroups, encoding) {
function buildTableAndContents (line 155) | function buildTableAndContents(startupCode, modules, moduleGroups, encod...
function ModuleGroups (line 173) | function ModuleGroups(groups, modules) {
FILE: local-cli/bundle/output/unbundle/index.js
function buildBundle (line 14) | function buildBundle(packagerClient, requestOptions) {
function saveUnbundle (line 22) | function saveUnbundle(bundle, options, log) {
FILE: local-cli/bundle/output/unbundle/util.js
function lineToLineSourceMap (line 15) | function lineToLineSourceMap(source, filename) {
function combineSourceMaps (line 34) | function combineSourceMaps({modules, withCustomOffsets, moduleGroups}) {
FILE: local-cli/bundle/output/unbundle/write-sourcemap.js
function writeSourcemap (line 14) | function writeSourcemap(fileName, contents, log) {
FILE: local-cli/bundle/output/writeFile.js
function writeFile (line 14) | function writeFile(file, data, encoding) {
FILE: local-cli/bundle/saveAssets.js
function saveAssets (line 18) | function saveAssets(
function copyAll (line 46) | function copyAll(filesToCopy) {
function copy (line 71) | function copy(src, dest, callback) {
FILE: local-cli/bundle/sign.js
function sign (line 14) | function sign(source) {
FILE: local-cli/bundle/signedsource.js
function signing_token (line 39) | function signing_token() {
function is_signed (line 48) | function is_signed(file_data) {
function sign (line 59) | function sign(file_data) {
function verify_signature (line 79) | function verify_signature(file_data) {
FILE: local-cli/bundle/unbundle.js
function unbundle (line 17) | function unbundle(argv, config, args, packagerInstance) {
FILE: local-cli/cliEntry.js
function printHelpInformation (line 49) | function printHelpInformation() {
function printUnknownCommand (line 92) | function printUnknownCommand(cmdName) {
function getCliConfig (line 140) | function getCliConfig() {
function run (line 158) | function run() {
FILE: local-cli/core/config/ios/findProject.js
constant GLOB_PATTERN (line 7) | const GLOB_PATTERN = '**/*.xcodeproj';
constant TEST_PROJECTS (line 12) | const TEST_PROJECTS = /test|example|sample/i;
constant IOS_BASE (line 17) | const IOS_BASE = 'ios';
constant GLOB_EXCLUDE_PATTERN (line 22) | const GLOB_EXCLUDE_PATTERN = ['**/@(Pods|node_modules)/**'];
FILE: local-cli/default.config.js
method getProjectRoots (line 15) | getProjectRoots() {
method getAssetRoots (line 27) | getAssetRoots() {
method getAssetExts (line 36) | getAssetExts() {
method getBlacklistRE (line 44) | getBlacklistRE(platform) {
method getTransformModulePath (line 52) | getTransformModulePath() {
function getRoots (line 57) | function getRoots() {
FILE: local-cli/dependencies/dependencies.js
function dependencies (line 15) | function dependencies(argv, config, args, packagerInstance) {
FILE: local-cli/generate/generate.js
function generate (line 19) | function generate(argv, config) {
function _generate (line 25) | function _generate(argv, config, resolve, reject) {
FILE: local-cli/generator-android/index.js
function validatePackageName (line 16) | function validatePackageName(name) {
FILE: local-cli/generator-android/templates/package/MainActivity.java
class MainActivity (line 5) | public class MainActivity extends ReactActivity {
method getMainComponentName (line 11) | @Override
FILE: local-cli/generator-android/templates/package/MainApplication.java
class MainApplication (line 15) | public class MainApplication extends Application implements ReactApplica...
method getUseDeveloperSupport (line 18) | @Override
method getPackages (line 23) | @Override
method getReactNativeHost (line 31) | @Override
FILE: local-cli/generator-utils.js
function copyAndReplace (line 14) | function copyAndReplace(src, dest, replacements) {
function walk (line 28) | function walk(current) {
FILE: local-cli/init/init.js
class CreateSuppressingTerminalAdapter (line 15) | class CreateSuppressingTerminalAdapter extends TerminalAdapter {
method constructor (line 16) | constructor() {
function init (line 30) | function init(projectDir, argsOrName) {
FILE: local-cli/install/install.js
function install (line 10) | function install(args, config) {
FILE: local-cli/install/uninstall.js
function uninstall (line 10) | function uninstall(args, config) {
FILE: local-cli/library/library.js
function library (line 21) | function library(argv, config, args) {
FILE: local-cli/link/ios/getHeadersInFolder.js
constant GLOB_EXCLUDE_PATTERN (line 4) | const GLOB_EXCLUDE_PATTERN = ['node_modules/**', 'Pods/**', 'Examples/**...
FILE: local-cli/link/link.js
function link (line 145) | function link(args, config) {
FILE: local-cli/link/unlink.js
function unlink (line 67) | function unlink(args, config) {
FILE: local-cli/logAndroid/logAndroid.js
function logAndroid (line 18) | function logAndroid() {
function _logAndroid (line 24) | function _logAndroid() {
FILE: local-cli/logIOS/logIOS.js
function logIOS (line 12) | function logIOS() {
function _logIOS (line 18) | function _logIOS() {
function _findAvailableDevice (line 45) | function _findAvailableDevice(devices) {
function tailDeviceLogs (line 55) | function tailDeviceLogs(udid) {
FILE: local-cli/runAndroid/adb.js
function parseDevicesResult (line 17) | function parseDevicesResult(result: string): Array<string> {
function getDevices (line 38) | function getDevices(): Array<string> {
FILE: local-cli/runAndroid/runAndroid.js
function checkAndroid (line 20) | function checkAndroid(root) {
function runAndroid (line 27) | function runAndroid(argv, config, args) {
function getAdbPath (line 47) | function getAdbPath() {
function tryRunAdbReverse (line 54) | function tryRunAdbReverse(device) {
function buildAndRun (line 79) | function buildAndRun(args) {
function startServerInNewWindow (line 172) | function startServerInNewWindow() {
FILE: local-cli/runIOS/findMatchingSimulator.js
function findMatchingSimulator (line 22) | function findMatchingSimulator(simulators, simulatorName) {
FILE: local-cli/runIOS/parseIOSDevicesList.js
function parseIOSDevicesList (line 22) | function parseIOSDevicesList(text: string): Array<IOSDeviceInfo> {
FILE: local-cli/runIOS/runIOS.js
function runIOS (line 18) | function runIOS(argv, config, args) {
function runOnDeviceByUdid (line 51) | function runOnDeviceByUdid(udid, scheme, xcodeProject, devices) {
function runOnSimulator (line 66) | function runOnSimulator(xcodeProject, args, inferredSchemeName, scheme){
function runOnDevice (line 105) | function runOnDevice(selectedDevice, scheme, xcodeProject){
function buildProject (line 124) | function buildProject(xcodeProject, udid, scheme) {
function matchingDevice (line 135) | function matchingDevice(devices, deviceName) {
function matchingDeviceByUdid (line 143) | function matchingDeviceByUdid(devices, udid) {
function formattedDeviceName (line 151) | function formattedDeviceName(simulator) {
function printFoundDevices (line 155) | function printFoundDevices(devices){
FILE: local-cli/server/findSymlinksPaths.js
function rootExists (line 44) | function rootExists(roots, child) {
function isDescendant (line 48) | function isDescendant(root, child) {
FILE: local-cli/server/formatBanner.js
function formatBanner (line 45) | function formatBanner(message, options) {
function spaces (line 94) | function spaces(number) {
function repeatString (line 98) | function repeatString(string, number) {
function arrayOf (line 102) | function arrayOf(value, number) {
FILE: local-cli/server/middleware/getDevToolsMiddleware.js
function getChromeAppName (line 17) | function getChromeAppName() {
function launchChromeDevTools (line 28) | function launchChromeDevTools(port) {
function escapePath (line 38) | function escapePath(path) {
function launchDevTools (line 42) | function launchDevTools(options, isChromeConnected) {
FILE: local-cli/server/middleware/heapCapture/out/aggrow.js
function stringInterner (line 19) | function stringInterner(){// eslint-disable-line no-unused-vars
function stackData (line 40) | function stackData(stackIdMap,maxDepth){// eslint-disable-line no-unused...
function stackRegistry (line 49) | function stackRegistry(interner){// eslint-disable-line no-unused-vars
function aggrow (line 119) | function aggrow(strings,stacks,numRows){// eslint-disable-line no-unused...
FILE: local-cli/server/middleware/heapCapture/out/heapCapture.js
function RefVisitor (line 13) | function RefVisitor(refs,id){
function forEachRef (line 109) | function forEachRef(refs,callback){
function firstRef (line 117) | function firstRef(refs,callback){
function getInternalInstanceName (line 127) | function getInternalInstanceName(visitor){
function buildReactComponentTree (line 148) | function buildReactComponentTree(visitor,registry){
function markReactComponentTree (line 169) | function markReactComponentTree(refs,registry){
function functionUrlFileName (line 216) | function functionUrlFileName(visitor){
function markModules (line 230) | function markModules(refs){
function registerPathToRoot (line 256) | function registerPathToRoot(refs,registry){
function captureRegistry (line 295) | function captureRegistry(){
FILE: local-cli/server/middleware/heapCapture/out/table.js
function defineProperties (line 16) | function defineProperties(target,props){for(var i=0;i<props.length;i++){...
function _classCallCheck (line 16) | function _classCallCheck(instance,Constructor){if(!(instance instanceof ...
function _possibleConstructorReturn (line 16) | function _possibleConstructorReturn(self,call){if(!self){throw new Refer...
function _inherits (line 16) | function _inherits(subClass,superClass){if(typeof superClass!=="function...
function Draggable (line 21) | function Draggable(props){_classCallCheck(this,Draggable);return _possib...
function dragStart (line 27) | function dragStart(e){
function DropTarget (line 42) | function DropTarget(props){_classCallCheck(this,DropTarget);return _poss...
function TableHeader (line 79) | function TableHeader(props){_classCallCheck(this,TableHeader);return _po...
function Table (line 170) | function Table(props){_classCallCheck(this,Table);var _this4=_possibleCo...
FILE: local-cli/server/middleware/heapCapture/src/aggrow.js
function stringInterner (line 19) | function stringInterner() { // eslint-disable-line no-unused-vars
function stackData (line 40) | function stackData(stackIdMap, maxDepth) { // eslint-disable-line no-unu...
function stackRegistry (line 49) | function stackRegistry(interner) { // eslint-disable-line no-unused-vars
function aggrow (line 119) | function aggrow(strings, stacks, numRows) { // eslint-disable-line no-un...
FILE: local-cli/server/middleware/heapCapture/src/heapCapture.js
function RefVisitor (line 13) | function RefVisitor(refs, id) {
function forEachRef (line 109) | function forEachRef(refs, callback) {
function firstRef (line 117) | function firstRef(refs, callback) {
function getInternalInstanceName (line 127) | function getInternalInstanceName(visitor) {
function buildReactComponentTree (line 148) | function buildReactComponentTree(visitor, registry) {
function markReactComponentTree (line 169) | function markReactComponentTree(refs, registry) {
function functionUrlFileName (line 216) | function functionUrlFileName(visitor) {
function markModules (line 230) | function markModules(refs) {
function registerPathToRoot (line 256) | function registerPathToRoot(refs, registry) {
function captureRegistry (line 295) | function captureRegistry() {
FILE: local-cli/server/middleware/heapCapture/src/table.js
class Draggable (line 20) | class Draggable extends React.Component { // eslint-disable-line no-unus...
method constructor (line 21) | constructor(props) {
method render (line 25) | render() {
class DropTarget (line 41) | class DropTarget extends React.Component { // eslint-disable-line no-unu...
method constructor (line 42) | constructor(props) {
method render (line 46) | render() {
class TableHeader (line 78) | class TableHeader extends React.Component {
method constructor (line 79) | constructor(props) {
method render (line 82) | render() {
class Table (line 169) | class Table extends React.Component { // eslint-disable-line no-unused-vars
method constructor (line 170) | constructor(props) {
method scroll (line 179) | scroll(e) {
method _contractRow (line 188) | _contractRow(row) {
method _expandRow (line 200) | _expandRow(row) {
method _keepCursorInViewport (line 212) | _keepCursorInViewport() {
method keydown (line 224) | keydown(e) {
method dropAction (line 269) | dropAction(s, d) {
method render (line 313) | render() {
method renderVirtualizedRows (line 333) | renderVirtualizedRows() {
method renderRow (line 348) | renderRow(row) {
method componentDidMount (line 458) | componentDidMount() {
method componentWillUnmount (line 463) | componentWillUnmount() {
FILE: local-cli/server/middleware/heapCaptureMiddleware.js
function getSourceMapForUrl (line 23) | function getSourceMapForUrl(url, onFailure, onSuccess) {
function getSourceMapsForCapture (line 65) | function getSourceMapsForCapture(capture, onFailure, onSuccess) {
function symbolicateHeapCaptureFunctions (line 95) | function symbolicateHeapCaptureFunctions(capture, onFailure, onSuccess) {
FILE: local-cli/server/middleware/jscProfilerMiddleware.js
class TreeTransformator (line 17) | class TreeTransformator {
method constructor (line 18) | constructor() {
method transform (line 22) | transform(tree, callback) {
method transformNode (line 29) | transformNode(tree) {
method afterUrlsCacheBuild (line 49) | afterUrlsCacheBuild(tree, callback) {
method gatherUrls (line 69) | gatherUrls(tree, urls) {
method callUrlCached (line 75) | callUrlCached(url, callback) {
FILE: local-cli/server/runServer.js
function runServer (line 30) | function runServer(args, config, readyCallback) {
function getPackagerServer (line 76) | function getPackagerServer(args, config) {
FILE: local-cli/server/server.js
constant NODE_MODULES (line 16) | const NODE_MODULES = path.resolve(__dirname, '..', '..', '..');
function server (line 21) | function server(argv, config, args) {
FILE: local-cli/server/util/attachHMRServer.js
function attachHMRServer (line 23) | function attachHMRServer({httpServer, path, packagerServer}) {
function arrayEquals (line 326) | function arrayEquals(arrayA, arrayB) {
function time (line 337) | function time() {
FILE: local-cli/server/util/copyToClipBoard.js
function copyToClipBoard (line 18) | function copyToClipBoard(content) {
FILE: local-cli/server/util/launchEditor.js
function isTerminalEditor (line 17) | function isTerminalEditor(editor) {
function addWorkspaceToArgumentsIfExists (line 39) | function addWorkspaceToArgumentsIfExists(args, workspace) {
function getArgumentsForLineNumber (line 46) | function getArgumentsForLineNumber(editor, fileName, lineNumber, workspa...
function guessEditor (line 77) | function guessEditor() {
function printInstructions (line 104) | function printInstructions(title) {
function transformToAbsolutePathIfNeeded (line 118) | function transformToAbsolutePathIfNeeded(pathName) {
function findRootForFile (line 125) | function findRootForFile(projectRoots, fileName) {
function launchEditor (line 134) | function launchEditor(fileName, lineNumber, projectRoots) {
FILE: local-cli/server/util/messageSocket.js
function attachToServer (line 12) | function attachToServer(server, path) {
FILE: local-cli/server/util/webSocketProxy.js
function attachToServer (line 12) | function attachToServer(server, path) {
FILE: local-cli/upgrade/upgrade.js
function upgrade (line 18) | function upgrade(args, config) {
FILE: local-cli/util/Config.js
constant RN_CLI_CONFIG (line 15) | const RN_CLI_CONFIG = 'rn-cli.config.js';
method get (line 28) | get(cwd, defaultConfig, pathToConfig) {
method findConfigPath (line 55) | findConfigPath(cwd) {
function findParentDirectory (line 63) | function findParentDirectory(currentFullPath, filename) {
FILE: local-cli/util/copyAndReplace.js
function copyAndReplace (line 13) | function copyAndReplace(src, dest, replacements) {
FILE: local-cli/util/isPackagerRunning.js
function isPackagerRunning (line 22) | function isPackagerRunning() {
FILE: local-cli/util/isValidPackageName.js
function isValidPackageName (line 11) | function isValidPackageName(name) {
FILE: local-cli/util/log.js
function disable (line 13) | function disable() {
function log (line 17) | function log(stream, module) {
FILE: local-cli/util/parseCommandLine.js
function parseCommandLine (line 26) | function parseCommandLine(config, args) {
FILE: local-cli/util/walk.js
function walk (line 14) | function walk(current) {
FILE: src/ajax-helper.js
function postAssets (line 3) | function postAssets(assets, {
function postAsset (line 91) | function postAsset(postableAsset, {
FILE: src/album-query-result-base.js
class AlbumQueryResultBase (line 6) | class AlbumQueryResultBase extends EventEmitter {
method instagramAppAlbumSort (line 8) | instagramAppAlbumSort() {
method photoAppAlbumSort (line 12) | photoAppAlbumSort() {
method sortAlbumsByTypeObject (line 16) | sortAlbumsByTypeObject(typeArray) {
method getSortWeigth (line 31) | getSortWeigth(albumObj, typeArray) {
method onChange (line 41) | onChange(changeHandler) {
FILE: src/album-query-result-collection.js
class AlbumQueryResultCollection (line 4) | class AlbumQueryResultCollection extends AlbumQueryResultBase {
method constructor (line 5) | constructor(queryFetchResults, fetchParams, eventEmitter) {
method albums (line 12) | get albums() {
method onQueryResultChange (line 20) | onQueryResultChange(changeDetails, updateFunc, queryResult) {
method stopTracking (line 27) | stopTracking() {
FILE: src/album-query-result.js
class AlbumQueryResult (line 6) | class AlbumQueryResult extends AlbumQueryResultBase {
method constructor (line 7) | constructor(obj, fetchParams, eventEmitter) {
method stopTracking (line 26) | stopTracking() {
method applyChangeDetails (line 30) | applyChangeDetails(changeDetails, callback) {
FILE: src/album.js
class Album (line 10) | class Album extends EventEmitter {
method constructor (line 12) | constructor(obj, fetchOptions, eventEmitter) {
method newAssetsRequested (line 45) | newAssetsRequested(indecies, fetchOptions, callback) {
method deleteContentPermitted (line 53) | deleteContentPermitted() {
method removeContentPermitted (line 57) | removeContentPermitted() {
method addContentPermitted (line 61) | addContentPermitted() {
method createContentPermitted (line 65) | createContentPermitted() {
method reArrangeContentPermitted (line 69) | reArrangeContentPermitted() {
method deletePermitted (line 73) | deletePermitted() {
method renamePermitted (line 77) | renamePermitted() {
method _canPerformOperation (line 81) | _canPerformOperation(index) {
method stopTracking (line 85) | stopTracking() {
method getAssets (line 89) | getAssets(params) {
method getAssetsWithIndecies (line 103) | getAssetsWithIndecies(params) {
method addAsset (line 116) | addAsset(asset) {
method addAssets (line 120) | addAssets(assets) {
method removeAsset (line 128) | removeAsset(asset) {
method removeAssets (line 132) | removeAssets(assets) {
method updateTitle (line 140) | updateTitle(newTitle) {
method delete (line 148) | delete() {
method onChange (line 152) | onChange(cb) {
method _emitChange (line 157) | _emitChange(...args) {
FILE: src/asset.js
class Asset (line 2) | class Asset {
method constructor (line 4) | constructor(assetObj) {
method uri (line 9) | get uri() {
method image (line 26) | get image() {
method creationDate (line 44) | get creationDate() {
method modificationDate (line 48) | get modificationDate() {
method toJsDate (line 52) | toJsDate(UTCProperty, cachedProperty) {
method getMetadata (line 64) | getMetadata() {
method refreshMetadata (line 68) | refreshMetadata() {
method getResourcesMetadata (line 72) | getResourcesMetadata() {
method _fetchExtraData (line 76) | _fetchExtraData(nativeMethod, alreadyLoadedProperty, force) {
method serialize (line 94) | serialize(obj) {
method withOptions (line 105) | withOptions(options) {
method delete (line 110) | delete() {
method setHidden (line 114) | setHidden(hidden) {
method setFavorite (line 118) | setFavorite(favorite) {
method setCreationDate (line 122) | setCreationDate(jsDate) {
method setLocation (line 126) | setLocation(latLngObj) {
method saveAssetToDisk (line 131) | saveAssetToDisk(options, onProgress, generateFileName) {
method _updateProperty (line 142) | _updateProperty(property, value, precheckValue) {
FILE: src/change-observer-handler.js
function updateHandler (line 1) | function updateHandler(arr, cb) {
function enumerateMoves (line 10) | function enumerateMoves(arr, changeDetails, indexTranslater, cb) {
function indeciesIsReversedNormalOrScrambled (line 25) | function indeciesIsReversedNormalOrScrambled(arr, changeDetails, prefere...
function getObjectIndex (line 59) | function getObjectIndex(updatedObj, indexTranslater, arr, operation) {
function getMissingIndecies (line 66) | function getMissingIndecies(changeDetails, arr, indexTranslater) {
function assetArrayObserverHandler (line 83) | function assetArrayObserverHandler(changeDetails, arr, createNewObjFunc,...
function modifyIndex (line 119) | function modifyIndex(arr, index, operation) {
function collectionArrayObserverHandler (line 131) | function collectionArrayObserverHandler(changeDetails, arr,
FILE: src/image-asset.js
class ImageAsset (line 3) | class ImageAsset extends Asset {
method constructor (line 4) | constructor(assetObj, options) {
method getImageMetadata (line 8) | getImageMetadata() {
FILE: src/index.js
class RNPhotosFramework (line 23) | class RNPhotosFramework {
method constructor (line 24) | constructor() {
method onLibraryChange (line 67) | onLibraryChange(cb) {
method libraryStartup (line 71) | libraryStartup() {
method authorizationStatus (line 75) | authorizationStatus() {
method requestAuthorization (line 79) | requestAuthorization() {
method setAllowsCachingHighQualityImages (line 83) | setAllowsCachingHighQualityImages(allowed) {
method addAssetsToAlbum (line 87) | addAssetsToAlbum(params) {
method removeAssetsFromAlbum (line 91) | removeAssetsFromAlbum(params) {
method getAssets (line 95) | getAssets(params) {
method getAssetsWithIndecies (line 121) | getAssetsWithIndecies(params) {
method getAlbumsCommon (line 129) | getAlbumsCommon(params, asSingleQueryResult) {
method getAlbums (line 153) | getAlbums(params) {
method getAlbumsMany (line 159) | getAlbumsMany(params, asSingleQueryResult) {
method _getAlbumsManyRaw (line 180) | _getAlbumsManyRaw(params) {
method getAlbumsByTitle (line 184) | getAlbumsByTitle(title) {
method getAlbumsByTitles (line 190) | getAlbumsByTitles(titles) {
method getAlbumsWithParams (line 198) | getAlbumsWithParams(params) {
method createAlbum (line 204) | createAlbum(albumTitle) {
method createAlbums (line 210) | createAlbums(albumTitles) {
method updateAlbumTitle (line 218) | updateAlbumTitle(params) {
method updateAssets (line 223) | updateAssets(assetUpdateObjs) {
method getAssetsMetadata (line 234) | getAssetsMetadata(assetsLocalIdentifiers) {
method getAssetsResourcesMetadata (line 238) | getAssetsResourcesMetadata(assetsLocalIdentifiers) {
method updateAssetsWithResoucesMetadata (line 242) | updateAssetsWithResoucesMetadata(assets) {
method getImageAssetsMetadata (line 264) | getImageAssetsMetadata(assetsLocalIdentifiers) {
method deleteAssets (line 268) | deleteAssets(assets) {
method deleteAlbums (line 274) | deleteAlbums(albums) {
method createImageAsset (line 280) | createImageAsset(image) {
method createVideoAsset (line 286) | createVideoAsset(video) {
method getPostableAssets (line 292) | getPostableAssets(localIdentifiers) {
method createAssets (line 296) | createAssets(params, onProgress) {
method withUniqueEventListener (line 337) | withUniqueEventListener(eventName, params, cb) {
method stopTracking (line 356) | stopTracking(cacheKey) {
method asSingleQueryResult (line 369) | asSingleQueryResult(albumQueryResultList, params, eventEmitter) {
method createJsAsset (line 377) | createJsAsset(nativeObj, options) {
method saveAssetsToDisk (line 396) | saveAssetsToDisk(assetsWithOptions, options, generateFileName) {
FILE: src/uuid-generator.js
function s4 (line 2) | function s4() {
FILE: src/video-asset.js
class VideoAsset (line 4) | class VideoAsset extends Asset {
method constructor (line 5) | constructor(assetObj, options) {
method video (line 9) | get video() {
FILE: src/video-props-resolver.js
function videoPropsResolver (line 3) | function videoPropsResolver(props) {
Condensed preview — 333 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,182K chars).
[
{
"path": ".gitignore",
"chars": 486,
"preview": "# OSX\n#\n.DS_Store\n\n# Xcode\n#\nbuild/\n*.pbxuser\n!default.pbxuser\n*.mode1v3\n!default.mode1v3\n*.mode2v3\n!default.mode2v3\n*.p"
},
{
"path": ".travis.yml",
"chars": 773,
"preview": "language: objective-c\n\nosx_image: xcode8.2\n\ninstall:\n - nvm use 6.9.1\n - wget https://github.com/yarnpkg/yarn/releases"
},
{
"path": ".vscode/launch.json",
"chars": 809,
"preview": "{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Debug Android\",\n \"program\": "
},
{
"path": ".watchmanconfig",
"chars": 285,
"preview": "{\n \"ignore_dirs\": [\n \".git\",\n \"node_modules\"\n ]\n}\n\n\n123\n\n\nffmpeg -i ~/Desktop/Untitled.mov -s 304x540 -pix_fmt r"
},
{
"path": "LICENSE",
"chars": 1067,
"preview": "MIT License\n\nCopyright (c) 2016 Juli Racca\n\nPermission is hereby granted, free of charge, to any person obtaining a copy"
},
{
"path": "Makefile",
"chars": 147,
"preview": "test:\n\txcodebuild test -workspace ios/RNPhotosFramework.xcworkspace -scheme RNPhotosFramework -destination 'platform=iOS"
},
{
"path": "README.md",
"chars": 36068,
"preview": "# react-native-photos-framework [\n// Project: http://facebook.github.io/react/\n// Defin"
},
{
"path": "example/.vscode/typings/react/react-addons-css-transition-group.d.ts",
"chars": 1392,
"preview": "// Type definitions for React v0.14 (react-addons-css-transition-group)\n// Project: http://facebook.github.io/react/\n// "
},
{
"path": "example/.vscode/typings/react/react-addons-linked-state-mixin.d.ts",
"chars": 990,
"preview": "// Type definitions for React v0.14 (react-addons-linked-state-mixin)\n// Project: http://facebook.github.io/react/\n// De"
},
{
"path": "example/.vscode/typings/react/react-addons-perf.d.ts",
"chars": 1479,
"preview": "// Type definitions for React v0.14 (react-addons-perf)\n// Project: http://facebook.github.io/react/\n// Definitions by: "
},
{
"path": "example/.vscode/typings/react/react-addons-pure-render-mixin.d.ts",
"chars": 692,
"preview": "// Type definitions for React v0.14 (react-addons-pure-render-mixin)\n// Project: http://facebook.github.io/react/\n// Def"
},
{
"path": "example/.vscode/typings/react/react-addons-test-utils.d.ts",
"chars": 6144,
"preview": "// Type definitions for React v0.14 (react-addons-test-utils)\n// Project: http://facebook.github.io/react/\n// Definition"
},
{
"path": "example/.vscode/typings/react/react-addons-transition-group.d.ts",
"chars": 854,
"preview": "// Type definitions for React v0.14 (react-addons-transition-group)\n// Project: http://facebook.github.io/react/\n// Defi"
},
{
"path": "example/.vscode/typings/react/react-addons-update.d.ts",
"chars": 996,
"preview": "// Type definitions for React v0.14 (react-addons-update)\n// Project: http://facebook.github.io/react/\n// Definitions by"
},
{
"path": "example/.vscode/typings/react/react-dom.d.ts",
"chars": 2571,
"preview": "// Type definitions for React v0.14 (react-dom)\n// Project: http://facebook.github.io/react/\n// Definitions by: Asana <h"
},
{
"path": "example/.vscode/typings/react/react-global.d.ts",
"chars": 945,
"preview": "// Type definitions for React v0.14 (namespace)\n// Project: http://facebook.github.io/react/\n// Definitions by: Asana <h"
},
{
"path": "example/.vscode/typings/react/react.d.ts",
"chars": 92049,
"preview": "// Type definitions for React v0.14\n// Project: http://facebook.github.io/react/\n// Definitions by: Asana <https://asana"
},
{
"path": "example/.vscode/typings/react-native/react-native.d.ts",
"chars": 121601,
"preview": "// Type definitions for react-native 0.14\n// Project: https://github.com/facebook/react-native\n// Definitions by: Bruno "
},
{
"path": "example/.watchmanconfig",
"chars": 2,
"preview": "{}"
},
{
"path": "example/README.md",
"chars": 308,
"preview": "###Example usage react-native-photos-framework\n\nNOTICE: The base of the example code is taken from this repository:\nhttp"
},
{
"path": "example/album-list.js",
"chars": 8347,
"preview": "import React, { Component } from 'react';\nimport {\n View,\n StyleSheet,\n Text,\n Image,\n ListView,\n TouchableOpacity"
},
{
"path": "example/android/app/BUCK",
"chars": 1501,
"preview": "import re\n\n# To learn about Buck see [Docs](https://buckbuild.com/).\n# To run your application with Buck:\n# - install Bu"
},
{
"path": "example/android/app/build.gradle",
"chars": 5497,
"preview": "apply plugin: \"com.android.application\"\n\nimport com.android.build.OutputFile\n\n/**\n * The react.gradle file registers a t"
},
{
"path": "example/android/app/proguard-rules.pro",
"chars": 2480,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /u"
},
{
"path": "example/android/app/src/main/AndroidManifest.xml",
"chars": 1093,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"com.example\"\n android:versionCode=\""
},
{
"path": "example/android/app/src/main/java/com/example/MainActivity.java",
"chars": 359,
"preview": "package com.example;\n\nimport com.facebook.react.ReactActivity;\n\npublic class MainActivity extends ReactActivity {\n\n /"
},
{
"path": "example/android/app/src/main/java/com/example/MainApplication.java",
"chars": 1196,
"preview": "package com.example;\n\nimport android.app.Application;\nimport android.util.Log;\n\nimport com.facebook.react.ReactApplicati"
},
{
"path": "example/android/app/src/main/res/values/strings.xml",
"chars": 70,
"preview": "<resources>\n <string name=\"app_name\">Example</string>\n</resources>\n"
},
{
"path": "example/android/app/src/main/res/values/styles.xml",
"chars": 192,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">"
},
{
"path": "example/android/build.gradle",
"chars": 642,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "example/android/gradle/wrapper/gradle-wrapper.properties",
"chars": 200,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dist"
},
{
"path": "example/android/gradle.properties",
"chars": 887,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "example/android/gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "example/android/gradlew.bat",
"chars": 2404,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "example/android/keystores/BUCK",
"chars": 138,
"preview": "keystore(\n name = 'debug',\n store = 'debug.keystore',\n properties = 'debug.keystore.properties',\n visibility = [\n "
},
{
"path": "example/android/keystores/debug.keystore.properties",
"chars": 105,
"preview": "key.store=debug.keystore\nkey.alias=androiddebugkey\nkey.store.password=android\nkey.alias.password=android\n"
},
{
"path": "example/android/settings.gradle",
"chars": 366,
"preview": "rootProject.name = 'Example'\ninclude ':react-native-fetch-blob'\nproject(':react-native-fetch-blob').projectDir = new Fil"
},
{
"path": "example/index.android.js",
"chars": 1097,
"preview": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n * @flow\n */\n\nimport React, { Component } fro"
},
{
"path": "example/index.ios-ajax.js",
"chars": 5171,
"preview": "/**\n * Sample React Native App\n * https://github.com/facebook/react-native\n * @flow\n */\n\nimport React, { Component } fro"
},
{
"path": "example/index.ios.js",
"chars": 976,
"preview": "console.debug = console.debug || console.log;\nimport React, { Component } from 'react';\nimport { AppRegistry, StyleSheet"
},
{
"path": "example/ios/Example/AppDelegate.h",
"chars": 451,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "example/ios/Example/AppDelegate.m",
"chars": 1386,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "example/ios/Example/Base.lproj/LaunchScreen.xib",
"chars": 3710,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "example/ios/Example/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 753,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"20x20\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "example/ios/Example/Info.plist",
"chars": 1956,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "example/ios/Example/main.m",
"chars": 510,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "example/ios/Example.xcodeproj/project.pbxproj",
"chars": 50086,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "example/ios/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme",
"chars": 4959,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Scheme\n LastUpgradeVersion = \"0820\"\n version = \"1.3\">\n <BuildAction\n "
},
{
"path": "example/ios/ExampleTests/ExampleTests.m",
"chars": 2072,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "example/ios/ExampleTests/Info.plist",
"chars": 765,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "example/library-test.js",
"chars": 3785,
"preview": "import RNPhotosFramework from 'react-native-photos-framework';\nvar simple_timer = require('simple-timer');\nconst TEST_AL"
},
{
"path": "example/package.json",
"chars": 992,
"preview": "{\n \"name\": \"Example\",\n \"version\": \"0.0.1\",\n \"private\": true,\n \"scripts\": {\n \"start\": \"node node_modules/react-nat"
},
{
"path": "example/react-native-camera-roll-picker/ImageItem.js",
"chars": 4824,
"preview": "import React, { Component } from 'react';\nimport {\n Image,\n StyleSheet,\n Dimensions,\n TouchableOpacity,\n Text,\n Vi"
},
{
"path": "example/react-native-camera-roll-picker/camera-roll-picker.js",
"chars": 11138,
"preview": "import React, { Component } from 'react';\nimport {\n CameraRoll,\n Platform,\n StyleSheet,\n View,\n Text,\n ListView,\n "
},
{
"path": "example/react-native-camera-roll-picker/index.ios.js",
"chars": 9997,
"preview": "import React, { Component } from 'react';\nimport {\n AppRegistry,\n StyleSheet,\n Text,\n View,\n TouchableOpacity,\n Al"
},
{
"path": "example/react-native-photos-framework/event-emitter.js",
"chars": 70,
"preview": "import EventEmitter from \"EventEmitter\";\nexport default EventEmitter;\n"
},
{
"path": "example/react-native-photos-framework/index.js",
"chars": 67,
"preview": "import RNPFManager from './src/index';\nexport default RNPFManager;\n"
},
{
"path": "example/tsconfig.json",
"chars": 63,
"preview": "{\"compilerOptions\":{\"allowJs\":true},\"exclude\":[\"node_modules\"]}"
},
{
"path": "index.js",
"chars": 67,
"preview": "import RNPFManager from './src/index';\nexport default RNPFManager;\n"
},
{
"path": "install.js",
"chars": 1201,
"preview": "const fs = require('fs');\nconst path = require('path');\nconst configPath = path.join(process.cwd(), '../../package.json'"
},
{
"path": "ios/RNPhotosFramework/ImageHelpers.h",
"chars": 2969,
"preview": "/*\n File: ImageHelpers.h\n\n Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple\n Inc. (\"Apple\") in co"
},
{
"path": "ios/RNPhotosFramework/ImageHelpers.m",
"chars": 7748,
"preview": "/*\n File: ImageHelpers.m\n\n Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple\n Inc. (\"Apple\") in co"
},
{
"path": "ios/RNPhotosFramework/PHAssetWithCollectionIndex.h",
"chars": 383,
"preview": "#import <Foundation/Foundation.h>\n@import Photos;\n@interface PHAssetWithCollectionIndex : NSObject\n\n- (instancetype)init"
},
{
"path": "ios/RNPhotosFramework/PHAssetWithCollectionIndex.m",
"chars": 760,
"preview": "#import \"PHAssetWithCollectionIndex.h\"\n\n@implementation PHAssetWithCollectionIndex\n\n- (instancetype)initWithAsset:(PHAss"
},
{
"path": "ios/RNPhotosFramework/PHAssetsService.h",
"chars": 1951,
"preview": "#import <Foundation/Foundation.h>\n#import \"PHAssetWithCollectionIndex.h\"\n@import Photos;\n@import MobileCoreServices;\n\n@i"
},
{
"path": "ios/RNPhotosFramework/PHAssetsService.m",
"chars": 18879,
"preview": "#import \"PHAssetsService.h\"\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n#import \"PHFetchOption"
},
{
"path": "ios/RNPhotosFramework/PHCache.h",
"chars": 725,
"preview": "#import \"PHCachedFetchResult.h\"\n#import <Foundation/Foundation.h>\n@import Photos;\n@interface PHCache : NSObject\n\n+ (PHCa"
},
{
"path": "ios/RNPhotosFramework/PHCache.m",
"chars": 1657,
"preview": "#import \"PHCache.h\"\n\n@implementation PHCache\n\n+ (PHCache *)sharedPHCache {\n static PHCache *sharedPHCache = nil;\n "
},
{
"path": "ios/RNPhotosFramework/PHCachedFetchResult.h",
"chars": 373,
"preview": "#import <Foundation/Foundation.h>\n@import Photos;\n@interface PHCachedFetchResult : NSObject\n\n- (instancetype)initWithFet"
},
{
"path": "ios/RNPhotosFramework/PHCachedFetchResult.m",
"chars": 406,
"preview": "#import \"PHCachedFetchResult.h\"\n\n@implementation PHCachedFetchResult\n- (instancetype)initWithFetchResult:(PHFetchResult "
},
{
"path": "ios/RNPhotosFramework/PHCachingImageManagerInstance.h",
"chars": 161,
"preview": "#import <Foundation/Foundation.h>\n@import Photos;\n\n@interface PHCachingImageManagerInstance : NSObject\n\n+ (PHCachingImag"
},
{
"path": "ios/RNPhotosFramework/PHCachingImageManagerInstance.m",
"chars": 453,
"preview": "#import \"PHCachingImageManagerInstance.h\"\n\n@implementation PHCachingImageManagerInstance\n\n#pragma mark Singleton Methods"
},
{
"path": "ios/RNPhotosFramework/PHCancellationToken.h",
"chars": 152,
"preview": "#import <Foundation/Foundation.h>\n\n@interface PHCancellationToken : NSObject\n\n@property (strong, atomic) NSString* id;\n@"
},
{
"path": "ios/RNPhotosFramework/PHCancellationToken.m",
"chars": 75,
"preview": "#import \"PHCancellationToken.h\"\n\n@implementation PHCancellationToken\n\n@end\n"
},
{
"path": "ios/RNPhotosFramework/PHCancellationTokenManager.h",
"chars": 370,
"preview": "//\n// PHCancellationTokenManager.h\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2017-09-03.\n// Copyright © "
},
{
"path": "ios/RNPhotosFramework/PHCancellationTokenManager.m",
"chars": 564,
"preview": "//\n// PHCancellationTokenManager.m\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2017-09-03.\n// Copyright © "
},
{
"path": "ios/RNPhotosFramework/PHChangeObserver.h",
"chars": 412,
"preview": "#import <Foundation/Foundation.h>\n#import <React/RCTBridge.h>\n#import \"PHCachedFetchResult.h\"\n#import \"PHCachedFetchResu"
},
{
"path": "ios/RNPhotosFramework/PHChangeObserver.m",
"chars": 11023,
"preview": "#import \"PHChangeObserver.h\"\n#import <React/RCTBridge.h>\n#import <React/RCTEventDispatcher.h>\n#import \"PHCachedFetchResu"
},
{
"path": "ios/RNPhotosFramework/PHCollectionService.h",
"chars": 1962,
"preview": "#import <Foundation/Foundation.h>\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n@import Photos;\n"
},
{
"path": "ios/RNPhotosFramework/PHCollectionService.m",
"chars": 15256,
"preview": "#import \"PHCollectionService.h\"\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n#import \"PHFetchOp"
},
{
"path": "ios/RNPhotosFramework/PHCreateMediaQueue.h",
"chars": 238,
"preview": "//\n// PHCreateMediaQueue.h\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2017-01-12.\n// Copyright © 2017 Olo"
},
{
"path": "ios/RNPhotosFramework/PHCreateMediaQueue.m",
"chars": 229,
"preview": "//\n// PHCreateMediaQueue.m\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2017-01-12.\n// Copyright © 2017 Olo"
},
{
"path": "ios/RNPhotosFramework/PHFetchOptionsService.h",
"chars": 253,
"preview": "#import <Foundation/Foundation.h>\n@import Photos;\n@interface PHFetchOptionsService : NSObject\n+(PHFetchOptions *)getAsse"
},
{
"path": "ios/RNPhotosFramework/PHFetchOptionsService.m",
"chars": 6565,
"preview": "#import \"PHFetchOptionsService.h\"\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n@import Photos;\n"
},
{
"path": "ios/RNPhotosFramework/PHOperationResult.h",
"chars": 350,
"preview": "#import <Foundation/Foundation.h>\n\n@interface PHOperationResult : NSObject\n\n- (instancetype)initWithLocalIdentifier:(NSS"
},
{
"path": "ios/RNPhotosFramework/PHOperationResult.m",
"chars": 366,
"preview": "#import \"PHOperationResult.h\"\n\n@implementation PHOperationResult\n- (instancetype)initWithLocalIdentifier:(NSString *)loc"
},
{
"path": "ios/RNPhotosFramework/PHSaveAsset.h",
"chars": 215,
"preview": "#import <Foundation/Foundation.h>\n\n@interface PHSaveAsset : NSObject\n@property (strong, nonatomic) NSString *uri;\n@prope"
},
{
"path": "ios/RNPhotosFramework/PHSaveAsset.m",
"chars": 59,
"preview": "#import \"PHSaveAsset.h\"\n\n@implementation PHSaveAsset\n\n@end\n"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetFileRequest.h",
"chars": 630,
"preview": "#import <Foundation/Foundation.h>\n@import Photos;\n\n@interface PHSaveAssetFileRequest : NSObject\n@property (strong, nonat"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetFileRequest.m",
"chars": 81,
"preview": "#import \"PHSaveAssetFileRequest.h\"\n\n@implementation PHSaveAssetFileRequest\n\n@end\n"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetRequest.h",
"chars": 203,
"preview": "#import <Foundation/Foundation.h>\n#import \"PHSaveAsset.h\"\n@interface PHSaveAssetRequest : NSObject\n@property (strong, no"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetRequest.m",
"chars": 73,
"preview": "#import \"PHSaveAssetRequest.h\"\n\n@implementation PHSaveAssetRequest\n\n@end\n"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetToFileOperationResult.h",
"chars": 334,
"preview": "#import <Foundation/Foundation.h>\n#import \"PHOperationResult.h\"\n\n@interface PHSaveAssetToFileOperationResult : PHOperati"
},
{
"path": "ios/RNPhotosFramework/PHSaveAssetToFileOperationResult.m",
"chars": 418,
"preview": "#import \"PHSaveAssetToFileOperationResult.h\"\n\n@implementation PHSaveAssetToFileOperationResult\n\n- (instancetype)initWith"
},
{
"path": "ios/RNPhotosFramework/PHVideoExporter.h",
"chars": 779,
"preview": "#import <Foundation/Foundation.h>\n#import \"SDAVAssetExportSession.h\"\n\n@interface PHVideoExporter : NSObject\n\ntypedef voi"
},
{
"path": "ios/RNPhotosFramework/PHVideoExporter.m",
"chars": 5030,
"preview": "#import \"PHVideoExporter.h\"\n#import <React/RCTConvert.h>\n@implementation PHVideoExporter\n\n-(void (^_Nonnull)()) exportVi"
},
{
"path": "ios/RNPhotosFramework/RCTConvert+RNPhotosFramework.h",
"chars": 1808,
"preview": "#import <Foundation/Foundation.h>\n#import \"PHSaveAssetRequest.h\"\n#import \"RNPFHelpers.h\"\n#import \"PHSaveAssetFileRequest"
},
{
"path": "ios/RNPhotosFramework/RCTConvert+RNPhotosFramework.m",
"chars": 14993,
"preview": "#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n\n@import Photos;\n@implementation RCTConvert(ReactN"
},
{
"path": "ios/RNPhotosFramework/RCTImageResizer.h",
"chars": 541,
"preview": "#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n@interface RNPFImageResizer : NSObject\n+(void) createResizedI"
},
{
"path": "ios/RNPhotosFramework/RCTImageResizer.m",
"chars": 3763,
"preview": "#include \"RCTImageResizer.h\"\n#include \"ImageHelpers.h\"\n#import <React/RCTImageLoader.h>\n\n@implementation RNPFImageResize"
},
{
"path": "ios/RNPhotosFramework/RNPFFileDownloader.h",
"chars": 873,
"preview": "#import <Foundation/Foundation.h>\n\n@interface RNPFFileDownloader : NSObject<NSURLSessionDownloadDelegate>\n\ntypedef void "
},
{
"path": "ios/RNPhotosFramework/RNPFFileDownloader.m",
"chars": 2499,
"preview": "#import \"RNPFFileDownloader.h\"\n\n@implementation RNPFFileDownloader\n\n- (void)startDownload:(NSURL *)url andSaveWithExtens"
},
{
"path": "ios/RNPhotosFramework/RNPFGlobals.h",
"chars": 133,
"preview": "#import <Foundation/Foundation.h>\n#define PHOTOS_SCHEME_IDENTIFIER @\"photos\"\n#define PHOTOS_SCHEME_IDENTIFIER_WITHSIGNS "
},
{
"path": "ios/RNPhotosFramework/RNPFHelpers.h",
"chars": 748,
"preview": "#import <Foundation/Foundation.h>\n#import <CoreLocation/CLLocation.h>\n@import Photos;\n\n@interface RNPFHelpers : NSObject"
},
{
"path": "ios/RNPhotosFramework/RNPFHelpers.m",
"chars": 4151,
"preview": "#import \"RNPFHelpers.h\"\n#import <CoreLocation/CLLocation.h>\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFra"
},
{
"path": "ios/RNPhotosFramework/RNPFImageLoader.h",
"chars": 389,
"preview": "#import <React/RCTImageLoader.h>\n#import \"PHCachingImageManagerInstance.h\"\n\ntypedef void (^RNPFDataLoaderCompletionBlock"
},
{
"path": "ios/RNPhotosFramework/RNPFImageLoader.m",
"chars": 12707,
"preview": "#import \"RNPFImageLoader.h\"\n#import <Photos/Photos.h>\n#import <React/RCTUtils.h>\n#import \"RNPFGlobals.h\"\n@implementation"
},
{
"path": "ios/RNPhotosFramework/RNPFManager.h",
"chars": 1305,
"preview": "#import <AssetsLibrary/AssetsLibrary.h>\n#import <React/RCTBridgeModule.h>\n#import <React/RCTConvert.h>\n#import <React/RC"
},
{
"path": "ios/RNPhotosFramework/RNPFManager.m",
"chars": 43283,
"preview": "#import <React/RCTConvert.h>\n#import <React/RCTImageLoader.h>\n#import <React/RCTLog.h>\n#import <React/RCTUtils.h>\n#impor"
},
{
"path": "ios/RNPhotosFramework/RNPFUrlRequestHandler.h",
"chars": 191,
"preview": "#import <Foundation/Foundation.h>\n#import <React/RCTBridge.h>\n#import <React/RCTURLRequestHandler.h>\n\n@interface RNPFUrl"
},
{
"path": "ios/RNPhotosFramework/RNPFUrlRequestHandler.m",
"chars": 1288,
"preview": "#import \"RNPFUrlRequestHandler.h\"\n#import <ImageIO/ImageIO.h>\n\n#import <React/RCTConvert.h>\n#import <React/RCTDefines.h>"
},
{
"path": "ios/RNPhotosFramework/RNPhotosFramework.h",
"chars": 236,
"preview": "//\n// RNPhotosFramework.h\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2016-10-19.\n// Copyright © 2016 Olof"
},
{
"path": "ios/RNPhotosFramework/RNPhotosFramework.m",
"chars": 226,
"preview": "//\n// RNPhotosFramework.m\n// RNPhotosFramework\n//\n// Created by Olof Dahlbom on 2016-10-19.\n// Copyright © 2016 Olof"
},
{
"path": "ios/RNPhotosFramework/SDAVAssetExportSession.h",
"chars": 6842,
"preview": "//\n// SDAVAssetExportSession.h\n//\n// This file is part of the SDAVAssetExportSession package.\n//\n// Created by Olivier "
},
{
"path": "ios/RNPhotosFramework/SDAVAssetExportSession.m",
"chars": 14760,
"preview": "//\n// SDAVAssetExportSession.m\n//\n// This file is part of the SDAVAssetExportSession package.\n//\n// Created by Olivier "
},
{
"path": "ios/RNPhotosFramework/iDebounce.h",
"chars": 251,
"preview": "#import <Foundation/Foundation.h>\n\ntypedef void (^iDebounceBlock)();\n\n@interface iDebounce : NSObject\n\n+(instancetype)sh"
},
{
"path": "ios/RNPhotosFramework/iDebounce.m",
"chars": 1716,
"preview": "#import \"iDebounce.h\"\n\n@interface iDebounce()\n\n@property (nonatomic, strong) NSMutableDictionary *iDebounceBlockMap;\n\n@e"
},
{
"path": "ios/RNPhotosFramework.xcodeproj/project.pbxproj",
"chars": 35297,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "ios/RNPhotosFrameworkTests/Info.plist",
"chars": 680,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "ios/RNPhotosFrameworkTests/PHAssetsService_getAssetsForFetchResultTests.m",
"chars": 5838,
"preview": "#pragma clang diagnostic ignored \"-Wincompatible-pointer-types\"\n\n#import <XCTest/XCTest.h>\n#import \"PHAssetsService.h\"\n#"
},
{
"path": "ios/RNPhotosFrameworkTests/RCTConvert+RNPhotosFrameworkTests.m",
"chars": 1431,
"preview": "#import <XCTest/XCTest.h>\n#import <React/RCTConvert.h>\n#import \"RCTConvert+RNPhotosFramework.h\"\n\n@interface RCTConvert_R"
},
{
"path": "local-cli/android/android.js",
"chars": 835,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/assetPathUtils.js",
"chars": 1611,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/buildBundle.js",
"chars": 2851,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/bundle.js",
"chars": 1182,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/bundleCommandLineArgs.js",
"chars": 1953,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/getAssetDestPathAndroid.js",
"chars": 720,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/getAssetDestPathIOS.js",
"chars": 621,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/bundle.js",
"chars": 1740,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/meta.js",
"chars": 1184,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/prepack.js",
"chars": 989,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/as-assets.js",
"chars": 2836,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/as-indexed-file.js",
"chars": 5436,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/build-unbundle-sourcemap-with-metadata.js",
"chars": 713,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/index.js",
"chars": 1030,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/magic-number.js",
"chars": 353,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/util.js",
"chars": 2598,
"preview": "/**\n * Copyright (c) 2016-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/unbundle/write-sourcemap.js",
"chars": 729,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/output/writeFile.js",
"chars": 625,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/saveAssets.js",
"chars": 2131,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/sign.js",
"chars": 708,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/signedsource.js",
"chars": 3497,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/bundle/unbundle.js",
"chars": 877,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/cli.js",
"chars": 754,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/cliEntry.js",
"chars": 4881,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/commands.js",
"chars": 1950,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/core/config/android/findAndroidAppFolder.js",
"chars": 422,
"preview": "const fs = require('fs');\nconst path = require('path');\n\n/**\n * @param {String} folder Folder to seek in\n * @return {St"
},
{
"path": "local-cli/core/config/android/findManifest.js",
"chars": 497,
"preview": "const glob = require('glob');\nconst path = require('path');\n\n/**\n * Find an android application path in the folder\n *\n *"
},
{
"path": "local-cli/core/config/android/findPackageClassName.js",
"chars": 656,
"preview": "const fs = require('fs');\nconst path = require('path');\nconst glob = require('glob');\n\n/**\n * Gets package's class name "
},
{
"path": "local-cli/core/config/android/index.js",
"chars": 2854,
"preview": "const path = require('path');\nconst fs = require('fs');\nconst glob = require('glob');\nconst findAndroidAppFolder = requi"
},
{
"path": "local-cli/core/config/android/readManifest.js",
"chars": 277,
"preview": "const fs = require('fs');\nconst xml = require('xmldoc');\n\n/**\n * @param {String} manifestPath\n * @return {XMLDocument} "
},
{
"path": "local-cli/core/config/findAssets.js",
"chars": 594,
"preview": "const glob = require('glob');\nconst path = require('path');\n\nconst findAssetsInFolder = (folder) =>\n glob.sync(path.joi"
},
{
"path": "local-cli/core/config/index.js",
"chars": 1419,
"preview": "const path = require('path');\n\nconst android = require('./android');\nconst ios = require('./ios');\nconst findAssets = re"
},
{
"path": "local-cli/core/config/ios/findProject.js",
"chars": 981,
"preview": "const glob = require('glob');\nconst path = require('path');\n\n/**\n * Glob pattern to look for xcodeproj\n */\nconst GLOB_PA"
},
{
"path": "local-cli/core/config/ios/index.js",
"chars": 1285,
"preview": "const path = require('path');\nconst findProject = require('./findProject');\n\n/**\n * For libraries specified without an e"
},
{
"path": "local-cli/core/config/wrapCommands.js",
"chars": 255,
"preview": "const makeCommand = require('../makeCommand');\n\nmodule.exports = function wrapCommands(commands) {\n const mappedCommand"
},
{
"path": "local-cli/core/findPlugins.js",
"chars": 1751,
"preview": "const path = require('path');\nconst union = require('lodash').union;\nconst uniq = require('lodash').uniq;\nconst flatten "
},
{
"path": "local-cli/core/getCommands.js",
"chars": 721,
"preview": "const path = require('path');\nconst findPlugins = require('./findPlugins');\nconst flatten = require('lodash').flatten;\n\n"
},
{
"path": "local-cli/core/makeCommand.js",
"chars": 583,
"preview": "const spawn = require('child_process').spawn;\n\nmodule.exports = function makeCommand(command) {\n return (cb) => {\n i"
},
{
"path": "local-cli/default.config.js",
"chars": 2110,
"preview": "'use strict';\n\nvar blacklist = require('../packager/blacklist');\nvar path = require('path');\nvar rnpmConfig = require('."
},
{
"path": "local-cli/dependencies/dependencies.js",
"chars": 3132,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generate/generate.js",
"chars": 1575,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generate-android.js",
"chars": 1030,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator/index.js",
"chars": 4205,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-android/index.js",
"chars": 2614,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-android/templates/bin/gradle/wrapper/gradle-wrapper.properties",
"chars": 200,
"preview": "distributionBase=GRADLE_USER_HOME\ndistributionPath=wrapper/dists\nzipStoreBase=GRADLE_USER_HOME\nzipStorePath=wrapper/dist"
},
{
"path": "local-cli/generator-android/templates/bin/gradlew",
"chars": 5080,
"preview": "#!/usr/bin/env bash\n\n##############################################################################\n##\n## Gradle start "
},
{
"path": "local-cli/generator-android/templates/bin/gradlew.bat",
"chars": 2404,
"preview": "@if \"%DEBUG%\" == \"\" @echo off\r\n@rem ##########################################################################\r\n@rem\r\n@r"
},
{
"path": "local-cli/generator-android/templates/package/MainActivity.java",
"chars": 366,
"preview": "package <%= package %>;\n\nimport com.facebook.react.ReactActivity;\n\npublic class MainActivity extends ReactActivity {\n\n "
},
{
"path": "local-cli/generator-android/templates/package/MainApplication.java",
"chars": 875,
"preview": "package <%= package %>;\n\nimport android.app.Application;\nimport android.util.Log;\n\nimport com.facebook.react.ReactApplic"
},
{
"path": "local-cli/generator-android/templates/src/app/BUCK",
"chars": 1507,
"preview": "import re\n\n# To learn about Buck see [Docs](https://buckbuild.com/).\n# To run your application with Buck:\n# - install Bu"
},
{
"path": "local-cli/generator-android/templates/src/app/build.gradle",
"chars": 5405,
"preview": "apply plugin: \"com.android.application\"\n\nimport com.android.build.OutputFile\n\n/**\n * The react.gradle file registers a t"
},
{
"path": "local-cli/generator-android/templates/src/app/proguard-rules.pro",
"chars": 2480,
"preview": "# Add project specific ProGuard rules here.\n# By default, the flags in this file are appended to flags specified\n# in /u"
},
{
"path": "local-cli/generator-android/templates/src/app/src/main/AndroidManifest.xml",
"chars": 1096,
"preview": "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\"\n package=\"<%= package %>\"\n android:versionCod"
},
{
"path": "local-cli/generator-android/templates/src/app/src/main/res/values/strings.xml",
"chars": 74,
"preview": "<resources>\n <string name=\"app_name\"><%= name %></string>\n</resources>\n"
},
{
"path": "local-cli/generator-android/templates/src/app/src/main/res/values/styles.xml",
"chars": 192,
"preview": "<resources>\n\n <!-- Base application theme. -->\n <style name=\"AppTheme\" parent=\"Theme.AppCompat.Light.NoActionBar\">"
},
{
"path": "local-cli/generator-android/templates/src/build.gradle",
"chars": 642,
"preview": "// Top-level build file where you can add configuration options common to all sub-projects/modules.\n\nbuildscript {\n r"
},
{
"path": "local-cli/generator-android/templates/src/gradle.properties",
"chars": 887,
"preview": "# Project-wide Gradle settings.\n\n# IDE (e.g. Android Studio) users:\n# Gradle settings configured through the IDE *will o"
},
{
"path": "local-cli/generator-android/templates/src/keystores/BUCK",
"chars": 138,
"preview": "keystore(\n name = 'debug',\n store = 'debug.keystore',\n properties = 'debug.keystore.properties',\n visibility = [\n "
},
{
"path": "local-cli/generator-android/templates/src/keystores/debug.keystore.properties",
"chars": 105,
"preview": "key.store=debug.keystore\nkey.alias=androiddebugkey\nkey.store.password=android\nkey.alias.password=android\n"
},
{
"path": "local-cli/generator-android/templates/src/settings.gradle",
"chars": 49,
"preview": "rootProject.name = '<%= name %>'\n\ninclude ':app'\n"
},
{
"path": "local-cli/generator-ios/index.js",
"chars": 2079,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-ios/templates/app/AppDelegate.h",
"chars": 451,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-ios/templates/app/AppDelegate.m",
"chars": 1378,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-ios/templates/app/Base.lproj/LaunchScreen.xib",
"chars": 3714,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" versi"
},
{
"path": "local-cli/generator-ios/templates/app/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 585,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "local-cli/generator-ios/templates/app/Info.plist",
"chars": 1620,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "local-cli/generator-ios/templates/app/main.m",
"chars": 510,
"preview": "/**\n * Copyright (c) 2015-present, Facebook, Inc.\n * All rights reserved.\n *\n * This source code is licensed under the B"
},
{
"path": "local-cli/generator-ios/templates/tests/Info.plist",
"chars": 765,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
}
]
// ... and 133 more files (download for full content)
About this extraction
This page contains the full source code of the olofd/react-native-photos-framework GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 333 files (1.1 MB), approximately 277.5k tokens, and a symbol index with 703 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.