react-intersection-observer
Advanced tools
Comparing version 0.3.1 to 0.3.2
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
@@ -112,3 +114,3 @@ | ||
return (0, _react.createElement)(tag, Object.assign({}, props, { | ||
return (0, _react.createElement)(tag, _extends({}, props, { | ||
ref: this.handleNode | ||
@@ -132,3 +134,3 @@ }), | ||
children: _propTypes2.default.oneOfType([_propTypes2.default.func, _propTypes2.default.node]), | ||
/** Only trigger this method once */ | ||
/** Only trigger the inView callback once */ | ||
triggerOnce: _propTypes2.default.bool, | ||
@@ -135,0 +137,0 @@ /** Number between 0 and 1 indicating the the percentage that should be visible before triggering */ |
{ | ||
"name": "react-intersection-observer", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API", | ||
"main": "lib/index.js", | ||
"browser": "lib/index.js", | ||
"module": "es/index.js", | ||
"jsnext:main": "es/index.js", | ||
"author": "Daniel Schmidt", | ||
@@ -21,7 +22,11 @@ "repository": { | ||
"scripts": { | ||
"build:lib": "rm -rf lib && NODE_ENV=development babel src --out-dir lib", | ||
"build": "rm -rf lib && npm run build:lib && npm run build:es", | ||
"build:es": "BABEL_ENV=es babel src --out-dir es --ignore __*,*.story.js,*.test.js", | ||
"build:lib": "babel src --out-dir lib --ignore __*,*.story.js,*.test.js", | ||
"build:storybook": "build-storybook --output-dir example", | ||
"dev": "concurrently -k -r 'jest --watch' 'npm run storybook'", | ||
"lint": "eslint {src,stories,tests}/. ", | ||
"precommit": "lint-staged", | ||
"prepublish": "npm run build:lib", | ||
"postcommit": "git reset", | ||
"prepublish": "npm run build", | ||
"pretty": "prettier '{src,tests,stories}/**/*.js' --write --no-semi --single-quote --trailing-comma all", | ||
@@ -40,7 +45,20 @@ "storybook": "start-storybook -p 9000", | ||
"presets": [ | ||
"react-app" | ||
"env", | ||
"react", | ||
"stage-2" | ||
], | ||
"plugins": [ | ||
"transform-es2015-modules-commonjs" | ||
] | ||
"env": { | ||
"es": { | ||
"presets": [ | ||
[ | ||
"env", | ||
{ | ||
"modules": false | ||
} | ||
], | ||
"react", | ||
"stage-2" | ||
] | ||
} | ||
} | ||
}, | ||
@@ -62,28 +80,31 @@ "eslintConfig": { | ||
"peerDependencies": { | ||
"prop-types": "^15.5.10", | ||
"react": "^0.14.0 || ^15.0.0" | ||
"prop-types": "^15.5.10 || ^16.0.0", | ||
"react": "^0.14.0 || ^15.0.0 || ^16.0.0" | ||
}, | ||
"devDependencies": { | ||
"@kadira/storybook": "^2.35.3", | ||
"@storybook/addon-actions": "^3.1.9", | ||
"@storybook/addon-options": "^3.1.6", | ||
"@storybook/react": "^3.1.9", | ||
"babel-cli": "^6.24.1", | ||
"babel-core": "^6.24.1", | ||
"babel-core": "^6.25.0", | ||
"babel-jest": "^20.0.3", | ||
"babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", | ||
"babel-preset-react-app": "^3.0.0", | ||
"babel-runtime": "6.23.0", | ||
"enzyme": "^2.8.2", | ||
"babel-preset-env": "^1.6.0", | ||
"babel-preset-react": "^6.24.1", | ||
"babel-preset-stage-2": "^6.24.1", | ||
"concurrently": "3.5.0", | ||
"enzyme": "^2.9.1", | ||
"enzyme-to-json": "^1.5.1", | ||
"eslint": "^3.19.0", | ||
"eslint-config-insilico": "^3.0.2", | ||
"eslint-config-prettier": "^2.1.1", | ||
"husky": "^0.13.4", | ||
"intersection-observer": "^0.2.1", | ||
"eslint": "^4.2.0", | ||
"eslint-config-insilico": "^4.1.0", | ||
"eslint-config-prettier": "^2.3.0", | ||
"husky": "^0.14.3", | ||
"intersection-observer": "^0.4.0", | ||
"jest": "^20.0.4", | ||
"lint-staged": "^3.5.1", | ||
"prettier": "^1.3.1", | ||
"lint-staged": "^4.0.2", | ||
"prettier": "^1.5.3", | ||
"prop-types": "^15.5.10", | ||
"react": "^15.5.4", | ||
"react-dom": "^15.5.4", | ||
"react-test-renderer": "^15.5.4" | ||
"react": "^15.6.1", | ||
"react-dom": "^15.6.1", | ||
"react-test-renderer": "^15.6.1" | ||
} | ||
} |
@@ -5,3 +5,3 @@ # react-intersection-observer | ||
[![Travis](https://travis-ci.org/thebuilder/react-intersection-observer.svg?branch=master)](https://travis-ci.org/thebuilder/react-intersection-observer) | ||
[![Dependency Status](https://david-dm.org/thebuilder/react-intersection-observer.svg)](https://david-dm.org/thebuilder/react-intersection-observer) | ||
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier) | ||
[![npm](https://img.shields.io/npm/v/react-intersection-observer.svg)](https://www.npmjs.com/package/react-intersection-observer) | ||
@@ -8,0 +8,0 @@ |
@@ -22,3 +22,3 @@ import React, { Component, createElement } from 'react' // eslint-disable-line no-unused-vars | ||
children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), | ||
/** Only trigger this method once */ | ||
/** Only trigger the inView callback once */ | ||
triggerOnce: PropTypes.bool, | ||
@@ -25,0 +25,0 @@ /** Number between 0 and 1 indicating the the percentage that should be visible before triggering */ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
34532
13
589
24