react-now-you-see-me
Advanced tools
Comparing version 1.5.9 to 1.5.10
@@ -19,2 +19,6 @@ "use strict"; | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
@@ -87,6 +91,10 @@ | ||
afterEach(_reactTestingLibrary.cleanup); | ||
test('renders as true when visible', function _callee() { | ||
test('renders as true when visible', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee() { | ||
var _renderInView, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee$(_context) { | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -102,5 +110,5 @@ switch (_context.prev = _context.next) { | ||
_context.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('true'); | ||
})); | ||
}); | ||
@@ -112,8 +120,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('renders as false when not in document', function _callee2() { | ||
}, _callee); | ||
}))); | ||
test('renders as false when not in document', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee2() { | ||
var _renderInView2, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee2$(_context2) { | ||
return regeneratorRuntime.wrap(function _callee2$(_context2) { | ||
while (1) { | ||
@@ -129,5 +141,5 @@ switch (_context2.prev = _context2.next) { | ||
_context2.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -139,8 +151,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('renders as true when within boundingLeft and boundingRight', function _callee3() { | ||
}, _callee2); | ||
}))); | ||
test('renders as true when within boundingLeft and boundingRight', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee3() { | ||
var _renderInView3, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee3$(_context3) { | ||
return regeneratorRuntime.wrap(function _callee3$(_context3) { | ||
while (1) { | ||
@@ -160,5 +176,5 @@ switch (_context3.prev = _context3.next) { | ||
_context3.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('true'); | ||
})); | ||
}); | ||
@@ -170,8 +186,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('renders as false when outside of boundingLeft', function _callee4() { | ||
}, _callee3); | ||
}))); | ||
test('renders as false when outside of boundingLeft', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee4() { | ||
var _renderInView4, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee4$(_context4) { | ||
return regeneratorRuntime.wrap(function _callee4$(_context4) { | ||
while (1) { | ||
@@ -191,5 +211,5 @@ switch (_context4.prev = _context4.next) { | ||
_context4.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -201,8 +221,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('renders as false when outside of boundingRight', function _callee5() { | ||
}, _callee4); | ||
}))); | ||
test('renders as false when outside of boundingRight', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee5() { | ||
var _renderInView5, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee5$(_context5) { | ||
return regeneratorRuntime.wrap(function _callee5$(_context5) { | ||
while (1) { | ||
@@ -222,5 +246,5 @@ switch (_context5.prev = _context5.next) { | ||
_context5.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -232,8 +256,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('boundingLeft continues to work even after prop change', function _callee6() { | ||
}, _callee5); | ||
}))); | ||
test('boundingLeft continues to work even after prop change', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee6() { | ||
var _renderInView6, getBox, setBoundingRect, rerender, scroll; | ||
return regeneratorRuntime.async(function _callee6$(_context6) { | ||
return regeneratorRuntime.wrap(function _callee6$(_context6) { | ||
while (1) { | ||
@@ -254,5 +282,5 @@ switch (_context6.prev = _context6.next) { | ||
_context6.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -268,5 +296,5 @@ case 4: | ||
_context6.next = 8; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -278,8 +306,12 @@ case 8: | ||
} | ||
}); | ||
}); | ||
test('boundingRight continues to work even after prop change', function _callee7() { | ||
}, _callee6); | ||
}))); | ||
test('boundingRight continues to work even after prop change', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee7() { | ||
var _renderInView7, getBox, setBoundingRect, rerender, scroll; | ||
return regeneratorRuntime.async(function _callee7$(_context7) { | ||
return regeneratorRuntime.wrap(function _callee7$(_context7) { | ||
while (1) { | ||
@@ -300,5 +332,5 @@ switch (_context7.prev = _context7.next) { | ||
_context7.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -314,5 +346,5 @@ case 4: | ||
_context7.next = 8; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -324,8 +356,12 @@ case 8: | ||
} | ||
}); | ||
}); | ||
test('inViewport accepts changed bounding props', function _callee8() { | ||
}, _callee7); | ||
}))); | ||
test('inViewport accepts changed bounding props', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee8() { | ||
var _renderInView8, getBox, setBoundingRect, rerender, scroll; | ||
return regeneratorRuntime.async(function _callee8$(_context8) { | ||
return regeneratorRuntime.wrap(function _callee8$(_context8) { | ||
while (1) { | ||
@@ -346,5 +382,5 @@ switch (_context8.prev = _context8.next) { | ||
_context8.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -360,5 +396,5 @@ case 4: | ||
_context8.next = 8; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('true'); | ||
})); | ||
}); | ||
@@ -370,8 +406,12 @@ case 8: | ||
} | ||
}); | ||
}); | ||
test('inViewport returns true for isFullyContained=false', function _callee9() { | ||
}, _callee8); | ||
}))); | ||
test('inViewport returns true for isFullyContained=false', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee9() { | ||
var _renderInView9, getBox, setBoundingRect; | ||
return regeneratorRuntime.async(function _callee9$(_context9) { | ||
return regeneratorRuntime.wrap(function _callee9$(_context9) { | ||
while (1) { | ||
@@ -393,5 +433,5 @@ switch (_context9.prev = _context9.next) { | ||
_context9.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('true'); | ||
})); | ||
}); | ||
@@ -403,8 +443,12 @@ case 4: | ||
} | ||
}); | ||
}); | ||
test('inViewport accepts changed isFullyContained prop', function _callee10() { | ||
}, _callee9); | ||
}))); | ||
test('inViewport accepts changed isFullyContained prop', | ||
/*#__PURE__*/ | ||
_asyncToGenerator( | ||
/*#__PURE__*/ | ||
regeneratorRuntime.mark(function _callee10() { | ||
var _renderInView10, getBox, setBoundingRect, rerender, scroll; | ||
return regeneratorRuntime.async(function _callee10$(_context10) { | ||
return regeneratorRuntime.wrap(function _callee10$(_context10) { | ||
while (1) { | ||
@@ -426,5 +470,5 @@ switch (_context10.prev = _context10.next) { | ||
_context10.next = 4; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('false'); | ||
})); | ||
}); | ||
@@ -438,5 +482,5 @@ case 4: | ||
_context10.next = 8; | ||
return regeneratorRuntime.awrap((0, _reactTestingLibrary.wait)(function () { | ||
return (0, _reactTestingLibrary.wait)(function () { | ||
return expect(getBox()).toHaveTextContent('true'); | ||
})); | ||
}); | ||
@@ -448,3 +492,3 @@ case 8: | ||
} | ||
}); | ||
}); | ||
}, _callee10); | ||
}))); |
{ | ||
"name": "react-now-you-see-me", | ||
"description": "A React component for determining when an element is within a given threshold of the viewport, horizontally.", | ||
"version": "1.5.9", | ||
"version": "1.5.10", | ||
"author": "Jane Web Team", | ||
@@ -48,8 +48,8 @@ "contributors": [ | ||
"devDependencies": { | ||
"@babel/cli": "7.7.5", | ||
"@babel/core": "7.7.5", | ||
"@babel/cli": "7.7.7", | ||
"@babel/core": "7.7.7", | ||
"@babel/plugin-proposal-class-properties": "7.7.4", | ||
"@babel/preset-env": "7.7.6", | ||
"@babel/preset-env": "7.7.7", | ||
"@babel/preset-react": "7.7.4", | ||
"@babel/register": "7.7.4", | ||
"@babel/register": "7.7.7", | ||
"babel-core": "7.0.0-bridge.0", | ||
@@ -60,6 +60,6 @@ "babel-eslint": "10.0.3", | ||
"babel-plugin-transform-react-remove-prop-types": "0.4.24", | ||
"core-js": "3.4.8", | ||
"core-js": "3.6.1", | ||
"coveralls": "3.0.9", | ||
"dom-testing-library": "2.5.0", | ||
"eslint": "6.7.2", | ||
"eslint": "6.8.0", | ||
"eslint-plugin-jane": "7.0.1", | ||
@@ -69,3 +69,3 @@ "husky": "3.1.0", | ||
"lint-staged": "9.5.0", | ||
"marked": "0.7.0", | ||
"marked": "0.8.0", | ||
"npm-run-all": "4.1.5", | ||
@@ -79,5 +79,5 @@ "prettier": "1.19.1", | ||
"sortpack": "2.0.4", | ||
"webpack": "4.41.2", | ||
"webpack": "4.41.5", | ||
"webpack-cli": "3.3.10", | ||
"webpack-dev-server": "3.9.0" | ||
"webpack-dev-server": "3.10.1" | ||
}, | ||
@@ -84,0 +84,0 @@ "jest": { |
38956
765