contain-by-screen
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -9,7 +9,6 @@ module.exports = { | ||
}, | ||
"extends": ["eslint:recommended", "plugin:react/recommended"], | ||
"extends": ["eslint:recommended"], | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"experimentalObjectRestSpread": true, | ||
"jsx": true | ||
}, | ||
@@ -19,5 +18,8 @@ "sourceType": "module" | ||
"plugins": [ | ||
"react" | ||
"flowtype" | ||
], | ||
"rules": { | ||
"flowtype/define-flow-type": 1, | ||
"flowtype/require-valid-file-annotation": ["error", "always"], | ||
"indent": ["error", 2], | ||
@@ -24,0 +26,0 @@ "linebreak-style": ["error", "unix"], |
@@ -63,4 +63,4 @@ 'use strict'; | ||
var coord = positionAndAlign(elRect, anchorRect, choice, buffers); | ||
var _top = coord.top; | ||
var _left = coord.left; | ||
var _top = coord.top, | ||
_left = coord.left; | ||
@@ -105,5 +105,5 @@ if (_top - buffers.all - buffers.top >= 0 && _left - buffers.all - buffers.left >= 0 && _top + elRect.height + buffers.all + buffers.bottom <= window.innerHeight && _left + elRect.width + buffers.all + buffers.right <= window.innerWidth) { | ||
function positionAndAlign(elRect, anchorRect, _ref, buffers) { | ||
var position = _ref.position; | ||
var hAlign = _ref.hAlign; | ||
var vAlign = _ref.vAlign; | ||
var position = _ref.position, | ||
hAlign = _ref.hAlign, | ||
vAlign = _ref.vAlign; | ||
@@ -191,2 +191,2 @@ var top = 0, | ||
module.exports = exports['default']; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJjb250YWluQnlTY3JlZW4iLCJlbGVtZW50IiwiYW5jaG9yUG9pbnQiLCJvcHRpb25zIiwicHJvY2VzcyIsImVudiIsIk5PREVfRU5WIiwid2luZG93IiwiZ2V0Q29tcHV0ZWRTdHlsZSIsInN0eWxlIiwicG9zaXRpb24iLCJjb25zb2xlIiwiZXJyb3Ii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yKCdTaG91bGQgbm90IGhhcHBlbicpO1xuICAgIH1cbiAgICBzd2l0Y2ggKHZBbGlnbikge1xuICAgIGNhc2UgJ2NlbnRlcic6XG4gICAgICB0b3AgPSBNYXRoLnJvdW5kKChhbmNob3JSZWN0LnRvcCArIGFuY2hvclJlY3QuYm90dG9tIC0gZWxSZWN0LmhlaWdodCkvMik7XG4gICAgICBicmVhaztcbiAgICBjYXNlICd0b3AnOlxuICAgICAgdG9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LnRvcCk7XG4gICAgICBicmVhaztcbiAgICBjYXNlICdib3R0b20nOlxuICAgICAgdG9wID0gTWF0aC5yb3VuZChhbmNob3JSZWN0LmJvdHRvbSAtIGVsUmVjdC5oZWlnaHQpO1xuICAgICAgYnJlYWs7XG4gICAgZGVmYXVsdDogdGhyb3cgbmV3IEVycm9yKCdTaG91bGQgbm90IGhhcHBlbicpO1xuICAgIH1cbiAgfVxuICByZXR1cm4ge3RvcCwgbGVmdH07XG59XG4iXX0= |
{ | ||
"name": "contain-by-screen", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Position a dropdown element near a button in a way that fits on the screen.", | ||
"main": "js/index.js", | ||
"scripts": { | ||
"prepublish": "babel -s inline -d js/ src/ && flow-copy-source -v src js", | ||
"prepare": "rimraf js && babel -s inline -d js/ src/ && flow-copy-source -v src js", | ||
"test": "npm run lint && npm run flow_check && mocha", | ||
@@ -35,3 +35,3 @@ "flow_check": "flow check", | ||
"babel-cli": "^6.14.0", | ||
"babel-eslint": "^6.1.2", | ||
"babel-eslint": "^7.2.3", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
@@ -43,13 +43,14 @@ "babel-plugin-transform-class-properties": "^6.11.5", | ||
"babel-register": "^6.14.0", | ||
"eslint": "^3.4.0", | ||
"eslint-plugin-react": "^6.2.0", | ||
"flow-bin": "^0.32.0", | ||
"eslint": "^4.3.0", | ||
"eslint-plugin-flowtype": "^2.35.0", | ||
"flow-bin": "^0.51.1", | ||
"flow-copy-source": "^1.0.1", | ||
"mocha": "^3.0.2" | ||
"mocha": "^3.0.2", | ||
"rimraf": "^2.6.1" | ||
}, | ||
"dependencies": { | ||
"babel-runtime": "^6.11.6", | ||
"envify": "^3.4.1", | ||
"babel-runtime": "^6.23.0", | ||
"envify": "^4.1.0", | ||
"lodash": "^4.6.1" | ||
} | ||
} |
@@ -57,18 +57,20 @@ # contain-by-screen | ||
this much larger in all directions, requiring it to be placed with the given | ||
amount of space between it, the anchor element when position is not "cover", | ||
and the edges of the screen. The buffer option is useful if the element has | ||
amount of space away from the anchor element (when position is not "cover") and | ||
the edges of the screen. The buffer option is useful if the element has | ||
children which are positioned such that they escape the boundaries of the | ||
element. Buffers do not affect alignment with the anchor element. | ||
`topBuffer` specifies an additional buffer space only for the top edge. | ||
`topBuffer`, `bottomBuffer`, `leftBuffer`, and `rightBuffer` specify an | ||
additional buffer space for a specific edge. | ||
`bottomBuffer` specifies an additional buffer space only for the bottom edge. | ||
## Related | ||
`leftBuffer` specifies an additional buffer space only for the left edge. | ||
The project [react-float-anchor](https://github.com/StreakYC/react-float-anchor) | ||
is a React wrapper around this function, and | ||
[react-menu-list](https://github.com/StreakYC/react-menu-list) is a library that | ||
uses it for building interactive menus. | ||
`rightBuffer` specifies an additional buffer space only for the right edge. | ||
## Types | ||
Full [Flow](http://flowtype.org/) type declarations for this module are | ||
Full [Flow](https://flowtype.org/) type declarations for this module are | ||
included! |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
37259
209
76
0
14
+ Addedenvify@4.1.0(transitive)
+ Addedesprima@4.0.1(transitive)
- Removedacorn@5.7.4(transitive)
- Removedamdefine@1.0.1(transitive)
- Removedast-types@0.9.6(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbase62@1.2.8(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcommoner@0.10.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddefined@1.0.1(transitive)
- Removeddetective@4.7.1(transitive)
- Removedenvify@3.4.1(transitive)
- Removedesprima@3.1.3(transitive)
- Removedesprima-fb@15001.1.0-dev-harmony-fb(transitive)
- Removedglob@5.0.15(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedjstransform@11.0.3(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedprivate@0.1.8(transitive)
- Removedq@1.5.1(transitive)
- Removedrecast@0.11.23(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsource-map@0.4.40.5.7(transitive)
- Removedwrappy@1.0.2(transitive)
Updatedbabel-runtime@^6.23.0
Updatedenvify@^4.1.0