diff --git a/Libraries/ART/ReactNativeART.js b/Libraries/ART/ReactNativeART.js index 3b5801d00..9bf9bc0b6 100644 --- a/Libraries/ART/ReactNativeART.js +++ b/Libraries/ART/ReactNativeART.js @@ -566,8 +566,14 @@ function Pattern(url, width, height, left, top) { this._brush = [PATTERN, url, +left || 0, +top || 0, +width, +height]; } -var ReactART = { +// This doesn't work on iOS and is just a placeholder to get Spectrum running. +// I will try to eliminate this dependency in Spectrum and remove it from +// ReactART proper. +function CSSBackgroundPattern() { + return new Color('rgba(0,0,0,0)'); +} +var ReactART = { LinearGradient: LinearGradient, RadialGradient: RadialGradient, Pattern: Pattern, @@ -578,7 +584,7 @@ var ReactART = { ClippingRectangle: ClippingRectangle, Shape: Shape, Text: Text, - + CSSBackgroundPattern: CSSBackgroundPattern }; module.exports = ReactART; diff --git a/Libraries/Components/TextInput/TextInput.js b/Libraries/Components/TextInput/TextInput.js index b835f0698..49ee8a9bd 100644 --- a/Libraries/Components/TextInput/TextInput.js +++ b/Libraries/Components/TextInput/TextInput.js @@ -86,6 +86,11 @@ type Event = Object; * ``` */ var TextInput = React.createClass({ + statics: { + /* TODO(brentvatne) docs are needed for this */ + State: TextInputState, + }, + propTypes: { /** * Can tell TextInput to automatically capitalize certain characters. diff --git a/Libraries/StyleSheet/StyleSheet.js b/Libraries/StyleSheet/StyleSheet.js index 796470ced..aa997b0a4 100644 --- a/Libraries/StyleSheet/StyleSheet.js +++ b/Libraries/StyleSheet/StyleSheet.js @@ -13,6 +13,7 @@ var StyleSheetRegistry = require('StyleSheetRegistry'); var StyleSheetValidation = require('StyleSheetValidation'); +var flattenStyle = require('flattenStyle'); /** * A StyleSheet is an abstraction similar to CSS StyleSheets @@ -59,6 +60,8 @@ var StyleSheetValidation = require('StyleSheetValidation'); * subsequent uses are going to refer an id (not implemented yet). */ class StyleSheet { + static flatten: typeof flattenStyle; + static create(obj: {[key: string]: any}): {[key: string]: number} { var result = {}; for (var key in obj) { @@ -69,4 +72,7 @@ class StyleSheet { } } +/* TODO(brentvatne) docs are needed for this */ +StyleSheet.flatten = flattenStyle; + module.exports = StyleSheet; diff --git a/Libraries/react-native/react-native.js b/Libraries/react-native/react-native.js index b461d87f3..0cc6afe3a 100644 --- a/Libraries/react-native/react-native.js +++ b/Libraries/react-native/react-native.js @@ -20,6 +20,7 @@ var ReactNative = Object.assign(Object.create(require('React')), { // Components ActivityIndicatorIOS: require('ActivityIndicatorIOS'), + ART: require('ReactNativeART'), DatePickerIOS: require('DatePickerIOS'), DrawerLayoutAndroid: require('DrawerLayoutAndroid'), Image: require('Image'), @@ -43,6 +44,7 @@ var ReactNative = Object.assign(Object.create(require('React')), { TextInput: require('TextInput'), ToastAndroid: require('ToastAndroid'), ToolbarAndroid: require('ToolbarAndroid'), + Touchable: require('Touchable'), TouchableHighlight: require('TouchableHighlight'), TouchableNativeFeedback: require('TouchableNativeFeedback'), TouchableOpacity: require('TouchableOpacity'), diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index c44c1c834..195ab7bb1 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -7,6 +7,11 @@ "from": "absolute-path@0.0.0", "resolved": "https://registry.npmjs.org/absolute-path/-/absolute-path-0.0.0.tgz" }, + "art": { + "version": "0.10.0", + "from": "art@0.10.0", + "resolved": "https://registry.npmjs.org/art/-/art-0.10.0.tgz" + }, "babel": { "version": "5.8.23", "from": "babel@5.8.23", diff --git a/package.json b/package.json index e8d1cf104..e836597d3 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,7 @@ }, "dependencies": { "absolute-path": "^0.0.0", + "art": "^0.10.0", "babel": "^5.8.23", "babel-core": "^5.8.23", "bser": "^1.0.2",