mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-04 17:49:23 +08:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eb0e0b8771 | ||
|
|
15d5e57e92 | ||
|
|
def873e9e3 | ||
|
|
9e9b40f155 |
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"name": "react-native-web-monorepo",
|
||||
"scripts": {
|
||||
"clean": "del ./packages/*/dist",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "babel-plugin-react-native-web",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"description": "Babel plugin for React Native for Web",
|
||||
"main": "index.js",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "benchmarks",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"scripts": {
|
||||
"build": "mkdir -p dist && cp -f index.html dist/index.html && ./node_modules/.bin/webpack-cli --config ./webpack.config.js",
|
||||
"release": "yarn build && git checkout gh-pages && rm -rf ../../benchmarks && mv dist ../../benchmarks && git add -A && git commit -m \"Benchmarks deploy\" && git push origin gh-pages && git checkout -"
|
||||
@@ -18,7 +18,7 @@
|
||||
"react-dom": "^16.3.2",
|
||||
"react-fela": "^7.2.0",
|
||||
"react-jss": "^8.4.0",
|
||||
"react-native-web": "0.7.0",
|
||||
"react-native-web": "0.7.2",
|
||||
"reactxp": "^1.1.1",
|
||||
"styled-components": "^3.2.6",
|
||||
"styled-jsx": "^2.2.6",
|
||||
@@ -26,7 +26,7 @@
|
||||
"styletron-react": "^4.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-react-native-web": "0.7.0",
|
||||
"babel-plugin-react-native-web": "0.7.2",
|
||||
"css-loader": "^0.28.11",
|
||||
"style-loader": "^0.21.0",
|
||||
"url-loader": "^1.0.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "react-native-web",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"description": "React Native for Web",
|
||||
"module": "dist/index.js",
|
||||
"main": "dist/cjs/index.js",
|
||||
|
||||
@@ -7,12 +7,18 @@
|
||||
* @noflow
|
||||
*/
|
||||
|
||||
import '../../modules/injectResponderEventPlugin';
|
||||
|
||||
import AccessibilityUtil from '../../modules/AccessibilityUtil';
|
||||
import createDOMProps from '../../modules/createDOMProps';
|
||||
import normalizeNativeEvent from '../../modules/normalizeNativeEvent';
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import ResponderEventPlugin from '../../modules/ResponderEventPlugin';
|
||||
|
||||
const { EventPluginHub } = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
|
||||
EventPluginHub.injection.injectEventPluginsByName({
|
||||
ResponderEventPlugin
|
||||
});
|
||||
|
||||
/**
|
||||
* Ensure event handlers receive an event of the expected shape. The 'button'
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
// based on https://github.com/facebook/react/pull/4303/files
|
||||
|
||||
import normalizeNativeEvent from '../normalizeNativeEvent';
|
||||
import ReactDOM from 'react-dom';
|
||||
import ReactDOMUnstableNativeDependencies from 'react-dom/unstable-native-dependencies';
|
||||
|
||||
const { EventPluginHub } = ReactDOM.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
const { ResponderEventPlugin, ResponderTouchHistoryStore } = ReactDOMUnstableNativeDependencies;
|
||||
|
||||
const topMouseDown = 'topMouseDown';
|
||||
@@ -78,6 +76,4 @@ ResponderEventPlugin.extractEvents = (topLevelType, targetInst, nativeEvent, nat
|
||||
);
|
||||
};
|
||||
|
||||
EventPluginHub.injection.injectEventPluginsByName({
|
||||
ResponderEventPlugin
|
||||
});
|
||||
export default ResponderEventPlugin;
|
||||
@@ -70,4 +70,4 @@ class Batchinator {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Batchinator;
|
||||
export default Batchinator;
|
||||
|
||||
@@ -8,16 +8,8 @@
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
* found when Flow v0.54 was deployed. To see the error delete this comment and
|
||||
* run Flow. */
|
||||
const performanceNow = require('fbjs/lib/performanceNow');
|
||||
/* $FlowFixMe(>=0.54.0 site=react_native_oss) This comment suppresses an error
|
||||
* found when Flow v0.54 was deployed. To see the error delete this comment and
|
||||
* run Flow. */
|
||||
const warning = require('fbjs/lib/warning');
|
||||
import performanceNow from 'fbjs/lib/performanceNow';
|
||||
import warning from 'fbjs/lib/warning';
|
||||
|
||||
export type FillRateInfo = Info;
|
||||
|
||||
@@ -221,4 +213,4 @@ class FillRateHelper {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = FillRateHelper;
|
||||
export default FillRateHelper;
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
* @noflow
|
||||
* @format
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
import invariant from 'fbjs/lib/invariant';
|
||||
|
||||
export type ViewToken = {
|
||||
item: any,
|
||||
@@ -275,4 +274,4 @@ function _isEntirelyVisible(top: number, bottom: number, viewportHeight: number)
|
||||
return top >= 0 && bottom <= viewportHeight && bottom > top;
|
||||
}
|
||||
|
||||
module.exports = ViewabilityHelper;
|
||||
export default ViewabilityHelper;
|
||||
|
||||
@@ -7,16 +7,15 @@
|
||||
* @flow
|
||||
* @format
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
const invariant = require('fbjs/lib/invariant');
|
||||
import invariant from 'fbjs/lib/invariant';
|
||||
|
||||
/**
|
||||
* Used to find the indices of the frames that overlap the given offsets. Useful for finding the
|
||||
* items that bound different windows of content, such as the visible area or the buffered overscan
|
||||
* area.
|
||||
*/
|
||||
function elementsThatOverlapOffsets(
|
||||
export function elementsThatOverlapOffsets(
|
||||
offsets: Array<number>,
|
||||
itemCount: number,
|
||||
getFrameMetrics: (index: number) => { length: number, offset: number }
|
||||
@@ -50,7 +49,7 @@ function elementsThatOverlapOffsets(
|
||||
* can restrict the number of new items render at once so that content can appear on the screen
|
||||
* faster.
|
||||
*/
|
||||
function newRangeCount(
|
||||
export function newRangeCount(
|
||||
prev: { first: number, last: number },
|
||||
next: { first: number, last: number }
|
||||
): number {
|
||||
@@ -68,7 +67,7 @@ function newRangeCount(
|
||||
* prioritizes the visible area first, then expands that with overscan regions ahead and behind,
|
||||
* biased in the direction of scroll.
|
||||
*/
|
||||
function computeWindowedRenderLimits(
|
||||
export function computeWindowedRenderLimits(
|
||||
props: {
|
||||
data: any,
|
||||
getItemCount: (data: any) => number,
|
||||
@@ -201,4 +200,4 @@ const VirtualizeUtils = {
|
||||
newRangeCount
|
||||
};
|
||||
|
||||
module.exports = VirtualizeUtils;
|
||||
export default VirtualizeUtils;
|
||||
|
||||
@@ -1593,4 +1593,4 @@ const styles = StyleSheet.create({
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = VirtualizedList;
|
||||
export default VirtualizedList;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"private": true,
|
||||
"name": "website",
|
||||
"version": "0.7.0",
|
||||
"version": "0.7.2",
|
||||
"scripts": {
|
||||
"build": "build-storybook -o ./dist -c ./storybook/.storybook",
|
||||
"start": "start-storybook -p 9001 -c ./storybook/.storybook",
|
||||
@@ -12,10 +12,10 @@
|
||||
"@storybook/react": "^3.4.3",
|
||||
"react": "^16.3.2",
|
||||
"react-dom": "^16.3.2",
|
||||
"react-native-web": "0.7.0"
|
||||
"react-native-web": "0.7.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-react-native-web": "0.7.0",
|
||||
"babel-plugin-react-native-web": "0.7.2",
|
||||
"url-loader": "^1.0.1",
|
||||
"webpack": "^4.8.1"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user