New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

react-native-for-web

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-for-web - npm Package Compare versions

Comparing version

to
0.1.0

@@ -0,0 +0,0 @@ var gulp = require('gulp');

@@ -0,0 +0,0 @@ {

{
"name": "react-native-for-web",
"version": "0.0.1",
"version": "0.1.0",
"description": "A set of classes and react components to make work your react-native app in a browser. (with some limitations obviously)",

@@ -29,8 +29,10 @@ "main": "index.js",

"peerDependencies": {
"react": "^0.14.0-beta3"
"react": "^0.14.0-beta3",
"react-dom": "^0.14.0-beta3"
},
"devDependencies": {
"autoprefixer-core": "^5.2.1",
"babel-core": "^5.8.22",
"babel-core": "^5.8.23",
"babel-loader": "^5.3.2",
"eslint": "^1.3.1",
"gulp": "^3.9.0",

@@ -40,4 +42,4 @@ "gulp-less": "^3.0.3",

"gulp-sourcemaps": "^1.5.2",
"webpack": "^1.11.0"
"webpack": "^1.12.1"
}
}

@@ -8,6 +8,14 @@ var React = require('react');

// deconstruct props and extract the needed ones.
var {style, ...props} = this.props;
var {pointerEvents, style, children, ...props} = this.props;
// classNames
var classNames = ['view'];
// if pointer events available, push them into the class
if(pointerEvents) classNames.push('pointer-events-' + pointerEvents);
// return the component
return <div {...props} style={browserifyStyle(style)}>{this.props.children}</div>;
return <div {...props} className={classNames.join(' ')} style={browserifyStyle(style)}>
{children}
</div>;
}

@@ -14,0 +22,0 @@ }

module.exports = {
IE10: navigator.userAgent.toString().toLowerCase().indexOf("trident/6") > -1;
IE10: navigator.userAgent.toString().toLowerCase().indexOf("trident/6") > -1
};

@@ -0,0 +0,0 @@ // this module is responsible for apply a px suffix if property is numeric

@@ -0,0 +0,0 @@ // this module takes a react native style array/object and translates it into a browser friendly style

@@ -0,0 +0,0 @@ // this module is responsible for decoupling bidirectional props.

// This module is responsible for merging an array of nullish,
// styles or array of styles into a single plain object,
// this way we could even optimize the outgoing css
module.exports = (styles) => {
function mergeStyles(styles) {
// by default, return an empty object.

@@ -14,2 +15,4 @@ var mergedStyle = {};

if(!style) continue;
// if is array, flatten down
if(Array.isArray(style)) style = mergeStyles(style);
// merge into the merged one

@@ -24,2 +27,4 @@ mergedStyle = {

return mergedStyle;
};
}
module.exports = mergeStyles;

@@ -27,3 +27,3 @@ // this function resolves properties conflicts, this means that style props

for(var j = 0; j < translateProps.length; j++){
solvedStyle[translateProps[j]] = style[propsKeys[j]];
solvedStyle[translateProps[j]] = style[propsKeys[i]];
}

@@ -35,5 +35,5 @@ }else{

}
// returns the new style object
return solvedStyle;
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet