Socket
Socket
Sign inDemoInstall

ringside

Package Overview
Dependencies
8
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.0

dist/utils.d.ts

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="0.2.0"></a>
# [0.2.0](https://github.com/rylnd/ringside/compare/v0.1.1...v0.2.0) (2017-12-20)
### Bug Fixes
* improper positioning in Safari et al. ([a8708ae](https://github.com/rylnd/ringside/commit/a8708ae))
<a name="0.1.1"></a>

@@ -7,0 +17,0 @@ ## [0.1.1](https://github.com/rylnd/ringside/compare/v0.1.0...v0.1.1) (2017-12-04)

2

dist/index.browser.js
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ringside = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.ringside=i():t.ringside=i()}(this,function(){return function(t){function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e(1);i.default=n.default,i.Ringside=n.default},function(t,i,e){"use strict";var n=this&&this.__assign||Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++){i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t};Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function t(t,i,e,n){this.innerBounds=t,this.outerBounds=i,this.height=e,this.width=n,this.orientations=["top","right","bottom","left"],this.hAlignments=["start","center","end"],this.vAlignments=["top","middle","bottom"],this.topLane={name:"top",x:this.outerBounds.x,y:this.outerBounds.y,width:this.outerBounds.width,height:this.innerBounds.y-this.outerBounds.y},this.leftLane={name:"left",x:this.outerBounds.x,y:this.outerBounds.y,height:this.outerBounds.height,width:this.innerBounds.x-this.outerBounds.x},this.rightLane={name:"right",x:this.innerBounds.right,y:this.outerBounds.y,height:this.outerBounds.height,width:this.outerBounds.right-this.innerBounds.right},this.bottomLane={name:"bottom",x:this.outerBounds.x,y:this.innerBounds.bottom,height:this.outerBounds.bottom-this.innerBounds.bottom,width:this.outerBounds.width}}return t.prototype.top=function(){return this.positions("top")},t.prototype.bottom=function(){return this.positions("bottom")},t.prototype.right=function(){return this.positions("right")},t.prototype.left=function(){return this.positions("left")},t.prototype.lanes=function(){return[this.topLane,this.rightLane,this.bottomLane,this.leftLane]},t.prototype.positions=function(t){var i=this;return this.hAlignments.reduce(function(e,o){return i.vAlignments.reduce(function(e,r){var s=i.alignedPosition(t,o,r);return n({},e,(h={},h[o]=n({},e[o],(u={},u[r]=s,u)),h[r]=n({},e[r],(a={},a[o]=s,a)),h));var h,u,a},e)},{})},t.prototype.alignedPosition=function(t,i,e){var o=this.boundingBox(t,i),r=this.fitsBounds(o),s=this.alignInBounds(o,t,i,e);return n({},s,{fits:r})},t.prototype.boundingBox=function(t,i){var e=this.relativeLane(t,"center"),o=this.relativeProps(t),r=o.width,s=o.x,h=n({},e);return h[r]=this.boundingWidth(t,i),h[s]=this.boundingX(t,i,h[r]),h},t.prototype.boundingWidth=function(t,i){var e=this.relativeProps(t).width,n=this.relativeLane(t,i),o=this.innerBounds[e]+n[e];if("center"===i){return o-(o-this[e])}return o},t.prototype.boundingX=function(t,i,e){var n=this.relativeProps(t),o=n.width,r=n.x,s=n.xScale;return"start"===i&&s(1)<0||"end"===i&&s(1)>0?this.innerBounds[r]+this.innerBounds[o]-e:"center"===i?this.innerBounds[r]+(this.innerBounds[o]-this[o])/2:this.innerBounds[r]},t.prototype.fitsBounds=function(t){return this.height<=t.height&&this.width<=t.width&&this.outerBounds.left<=t.x&&this.outerBounds.top<=t.y&&this.outerBounds.right>=t.x+t.width&&this.outerBounds.bottom>=t.y+t.height},t.prototype.alignInBounds=function(t,i,e,n){var o=this.relativeProps(i),r=o.x,s=o.y;return h={height:this.height,width:this.width},h[r]=this.alignHorizontal(t,i,e),h[s]=this.alignVertical(t,i,n),h;var h},t.prototype.alignHorizontal=function(t,i,e){var n=this.relativeProps(i),o=n.width,r=n.x,s=n.xScale;return"start"===e&&s(1)<0||"end"===e&&s(1)>0?t[r]+t[o]-this[o]:"center"===e?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.alignVertical=function(t,i,e){var n=this.relativeProps(i),o=n.height,r=n.y,s=n.yScale;return"bottom"===e&&s(1)<0||"top"===e&&s(1)>0?t[r]+t[o]-this[o]:"middle"===e?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.relativeProp=function(t,i,e){return void 0===e&&(e=0),t[(this.lanes().map(function(t){return t.name}).indexOf(i)+t.length+e)%t.length]},t.prototype.relativeProps=function(t){var i=function(t){return t},e=function(t){return-t};return{height:this.relativeProp(["height","width"],t),width:this.relativeProp(["width","height"],t),x:this.relativeProp(["x","y"],t),y:this.relativeProp(["y","x"],t),xScale:this.relativeProp([i,i,e,e],t),yScale:this.relativeProp([e,i,i,e],t)}},t.prototype.relativeLane=function(t,i){var e={start:1,center:0,end:-1}[i];return this.relativeProp(this.lanes(),t,e)},t}();i.default=o}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ringside=e():t.ringside=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1);e.default=n.default,e.Ringside=n.default},function(t,e,i){"use strict";var n=this&&this.__assign||Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var o=i(2),r=function(){function t(t,e,i,n){this.height=i,this.width=n,this.orientations=["top","right","bottom","left"],this.hAlignments=["start","center","end"],this.vAlignments=["top","middle","bottom"],this.innerBounds=o.ClientToDOM(t),this.outerBounds=o.ClientToDOM(e),this.topLane={name:"top",x:this.outerBounds.x,y:this.outerBounds.y,width:this.outerBounds.width,height:this.innerBounds.y-this.outerBounds.y},this.leftLane={name:"left",x:this.outerBounds.x,y:this.outerBounds.y,height:this.outerBounds.height,width:this.innerBounds.x-this.outerBounds.x},this.rightLane={name:"right",x:this.innerBounds.right,y:this.outerBounds.y,height:this.outerBounds.height,width:this.outerBounds.right-this.innerBounds.right},this.bottomLane={name:"bottom",x:this.outerBounds.x,y:this.innerBounds.bottom,height:this.outerBounds.bottom-this.innerBounds.bottom,width:this.outerBounds.width}}return t.prototype.top=function(){return this.positions("top")},t.prototype.bottom=function(){return this.positions("bottom")},t.prototype.right=function(){return this.positions("right")},t.prototype.left=function(){return this.positions("left")},t.prototype.lanes=function(){return[this.topLane,this.rightLane,this.bottomLane,this.leftLane]},t.prototype.positions=function(t){var e=this;return this.hAlignments.reduce(function(i,o){return e.vAlignments.reduce(function(i,r){var s=e.alignedPosition(t,o,r);return n({},i,(h={},h[o]=n({},i[o],(u={},u[r]=s,u)),h[r]=n({},i[r],(d={},d[o]=s,d)),h));var h,u,d},i)},{})},t.prototype.alignedPosition=function(t,e,i){var o=this.boundingBox(t,e),r=this.fitsBounds(o),s=this.alignInBounds(o,t,e,i);return n({},s,{fits:r})},t.prototype.boundingBox=function(t,e){var i=this.relativeLane(t,"center"),o=this.relativeProps(t),r=o.width,s=o.x,h=n({},i);return h[r]=this.boundingWidth(t,e),h[s]=this.boundingX(t,e,h[r]),h},t.prototype.boundingWidth=function(t,e){var i=this.relativeProps(t).width,n=this.relativeLane(t,e),o=this.innerBounds[i]+n[i];if("center"===e){return o-(o-this[i])}return o},t.prototype.boundingX=function(t,e,i){var n=this.relativeProps(t),o=n.width,r=n.x,s=n.xScale;return"start"===e&&s(1)<0||"end"===e&&s(1)>0?this.innerBounds[r]+this.innerBounds[o]-i:"center"===e?this.innerBounds[r]+(this.innerBounds[o]-this[o])/2:this.innerBounds[r]},t.prototype.fitsBounds=function(t){return this.height<=t.height&&this.width<=t.width&&this.outerBounds.left<=t.x&&this.outerBounds.top<=t.y&&this.outerBounds.right>=t.x+t.width&&this.outerBounds.bottom>=t.y+t.height},t.prototype.alignInBounds=function(t,e,i,n){var o=this.relativeProps(e),r=o.x,s=o.y;return h={height:this.height,width:this.width},h[r]=this.alignHorizontal(t,e,i),h[s]=this.alignVertical(t,e,n),h;var h},t.prototype.alignHorizontal=function(t,e,i){var n=this.relativeProps(e),o=n.width,r=n.x,s=n.xScale;return"start"===i&&s(1)<0||"end"===i&&s(1)>0?t[r]+t[o]-this[o]:"center"===i?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.alignVertical=function(t,e,i){var n=this.relativeProps(e),o=n.height,r=n.y,s=n.yScale;return"bottom"===i&&s(1)<0||"top"===i&&s(1)>0?t[r]+t[o]-this[o]:"middle"===i?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.relativeProp=function(t,e,i){return void 0===i&&(i=0),t[(this.lanes().map(function(t){return t.name}).indexOf(e)+t.length+i)%t.length]},t.prototype.relativeProps=function(t){var e=function(t){return t},i=function(t){return-t};return{height:this.relativeProp(["height","width"],t),width:this.relativeProp(["width","height"],t),x:this.relativeProp(["x","y"],t),y:this.relativeProp(["y","x"],t),xScale:this.relativeProp([e,e,i,i],t),yScale:this.relativeProp([i,e,e,i],t)}},t.prototype.relativeLane=function(t,e){var i={start:1,center:0,end:-1}[e];return this.relativeProp(this.lanes(),t,i)},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rectToDOMRect=function(t,e,i,n){return{x:t,y:e,height:i,width:n,top:e,left:t,bottom:e+i,right:t+n}},e.ClientToDOM=function(t){return e.rectToDOMRect(t.left,t.top,t.height,t.width)}}])});
},{}]},{},[1])(1)
});

@@ -1,1 +0,1 @@

!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i():"function"==typeof define&&define.amd?define([],i):"object"==typeof exports?exports.ringside=i():t.ringside=i()}(this,function(){return function(t){function i(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e(1);i.default=n.default,i.Ringside=n.default},function(t,i,e){"use strict";var n=this&&this.__assign||Object.assign||function(t){for(var i,e=1,n=arguments.length;e<n;e++){i=arguments[e];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t};Object.defineProperty(i,"__esModule",{value:!0});var o=function(){function t(t,i,e,n){this.innerBounds=t,this.outerBounds=i,this.height=e,this.width=n,this.orientations=["top","right","bottom","left"],this.hAlignments=["start","center","end"],this.vAlignments=["top","middle","bottom"],this.topLane={name:"top",x:this.outerBounds.x,y:this.outerBounds.y,width:this.outerBounds.width,height:this.innerBounds.y-this.outerBounds.y},this.leftLane={name:"left",x:this.outerBounds.x,y:this.outerBounds.y,height:this.outerBounds.height,width:this.innerBounds.x-this.outerBounds.x},this.rightLane={name:"right",x:this.innerBounds.right,y:this.outerBounds.y,height:this.outerBounds.height,width:this.outerBounds.right-this.innerBounds.right},this.bottomLane={name:"bottom",x:this.outerBounds.x,y:this.innerBounds.bottom,height:this.outerBounds.bottom-this.innerBounds.bottom,width:this.outerBounds.width}}return t.prototype.top=function(){return this.positions("top")},t.prototype.bottom=function(){return this.positions("bottom")},t.prototype.right=function(){return this.positions("right")},t.prototype.left=function(){return this.positions("left")},t.prototype.lanes=function(){return[this.topLane,this.rightLane,this.bottomLane,this.leftLane]},t.prototype.positions=function(t){var i=this;return this.hAlignments.reduce(function(e,o){return i.vAlignments.reduce(function(e,r){var s=i.alignedPosition(t,o,r);return n({},e,(h={},h[o]=n({},e[o],(u={},u[r]=s,u)),h[r]=n({},e[r],(a={},a[o]=s,a)),h));var h,u,a},e)},{})},t.prototype.alignedPosition=function(t,i,e){var o=this.boundingBox(t,i),r=this.fitsBounds(o),s=this.alignInBounds(o,t,i,e);return n({},s,{fits:r})},t.prototype.boundingBox=function(t,i){var e=this.relativeLane(t,"center"),o=this.relativeProps(t),r=o.width,s=o.x,h=n({},e);return h[r]=this.boundingWidth(t,i),h[s]=this.boundingX(t,i,h[r]),h},t.prototype.boundingWidth=function(t,i){var e=this.relativeProps(t).width,n=this.relativeLane(t,i),o=this.innerBounds[e]+n[e];if("center"===i){return o-(o-this[e])}return o},t.prototype.boundingX=function(t,i,e){var n=this.relativeProps(t),o=n.width,r=n.x,s=n.xScale;return"start"===i&&s(1)<0||"end"===i&&s(1)>0?this.innerBounds[r]+this.innerBounds[o]-e:"center"===i?this.innerBounds[r]+(this.innerBounds[o]-this[o])/2:this.innerBounds[r]},t.prototype.fitsBounds=function(t){return this.height<=t.height&&this.width<=t.width&&this.outerBounds.left<=t.x&&this.outerBounds.top<=t.y&&this.outerBounds.right>=t.x+t.width&&this.outerBounds.bottom>=t.y+t.height},t.prototype.alignInBounds=function(t,i,e,n){var o=this.relativeProps(i),r=o.x,s=o.y;return h={height:this.height,width:this.width},h[r]=this.alignHorizontal(t,i,e),h[s]=this.alignVertical(t,i,n),h;var h},t.prototype.alignHorizontal=function(t,i,e){var n=this.relativeProps(i),o=n.width,r=n.x,s=n.xScale;return"start"===e&&s(1)<0||"end"===e&&s(1)>0?t[r]+t[o]-this[o]:"center"===e?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.alignVertical=function(t,i,e){var n=this.relativeProps(i),o=n.height,r=n.y,s=n.yScale;return"bottom"===e&&s(1)<0||"top"===e&&s(1)>0?t[r]+t[o]-this[o]:"middle"===e?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.relativeProp=function(t,i,e){return void 0===e&&(e=0),t[(this.lanes().map(function(t){return t.name}).indexOf(i)+t.length+e)%t.length]},t.prototype.relativeProps=function(t){var i=function(t){return t},e=function(t){return-t};return{height:this.relativeProp(["height","width"],t),width:this.relativeProp(["width","height"],t),x:this.relativeProp(["x","y"],t),y:this.relativeProp(["y","x"],t),xScale:this.relativeProp([i,i,e,e],t),yScale:this.relativeProp([e,i,i,e],t)}},t.prototype.relativeLane=function(t,i){var e={start:1,center:0,end:-1}[i];return this.relativeProp(this.lanes(),t,e)},t}();i.default=o}])});
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ringside=e():t.ringside=e()}(this,function(){return function(t){function e(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var i={};return e.m=t,e.c=i,e.d=function(t,i,n){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:n})},e.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i(1);e.default=n.default,e.Ringside=n.default},function(t,e,i){"use strict";var n=this&&this.__assign||Object.assign||function(t){for(var e,i=1,n=arguments.length;i<n;i++){e=arguments[i];for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])}return t};Object.defineProperty(e,"__esModule",{value:!0});var o=i(2),r=function(){function t(t,e,i,n){this.height=i,this.width=n,this.orientations=["top","right","bottom","left"],this.hAlignments=["start","center","end"],this.vAlignments=["top","middle","bottom"],this.innerBounds=o.ClientToDOM(t),this.outerBounds=o.ClientToDOM(e),this.topLane={name:"top",x:this.outerBounds.x,y:this.outerBounds.y,width:this.outerBounds.width,height:this.innerBounds.y-this.outerBounds.y},this.leftLane={name:"left",x:this.outerBounds.x,y:this.outerBounds.y,height:this.outerBounds.height,width:this.innerBounds.x-this.outerBounds.x},this.rightLane={name:"right",x:this.innerBounds.right,y:this.outerBounds.y,height:this.outerBounds.height,width:this.outerBounds.right-this.innerBounds.right},this.bottomLane={name:"bottom",x:this.outerBounds.x,y:this.innerBounds.bottom,height:this.outerBounds.bottom-this.innerBounds.bottom,width:this.outerBounds.width}}return t.prototype.top=function(){return this.positions("top")},t.prototype.bottom=function(){return this.positions("bottom")},t.prototype.right=function(){return this.positions("right")},t.prototype.left=function(){return this.positions("left")},t.prototype.lanes=function(){return[this.topLane,this.rightLane,this.bottomLane,this.leftLane]},t.prototype.positions=function(t){var e=this;return this.hAlignments.reduce(function(i,o){return e.vAlignments.reduce(function(i,r){var s=e.alignedPosition(t,o,r);return n({},i,(h={},h[o]=n({},i[o],(u={},u[r]=s,u)),h[r]=n({},i[r],(d={},d[o]=s,d)),h));var h,u,d},i)},{})},t.prototype.alignedPosition=function(t,e,i){var o=this.boundingBox(t,e),r=this.fitsBounds(o),s=this.alignInBounds(o,t,e,i);return n({},s,{fits:r})},t.prototype.boundingBox=function(t,e){var i=this.relativeLane(t,"center"),o=this.relativeProps(t),r=o.width,s=o.x,h=n({},i);return h[r]=this.boundingWidth(t,e),h[s]=this.boundingX(t,e,h[r]),h},t.prototype.boundingWidth=function(t,e){var i=this.relativeProps(t).width,n=this.relativeLane(t,e),o=this.innerBounds[i]+n[i];if("center"===e){return o-(o-this[i])}return o},t.prototype.boundingX=function(t,e,i){var n=this.relativeProps(t),o=n.width,r=n.x,s=n.xScale;return"start"===e&&s(1)<0||"end"===e&&s(1)>0?this.innerBounds[r]+this.innerBounds[o]-i:"center"===e?this.innerBounds[r]+(this.innerBounds[o]-this[o])/2:this.innerBounds[r]},t.prototype.fitsBounds=function(t){return this.height<=t.height&&this.width<=t.width&&this.outerBounds.left<=t.x&&this.outerBounds.top<=t.y&&this.outerBounds.right>=t.x+t.width&&this.outerBounds.bottom>=t.y+t.height},t.prototype.alignInBounds=function(t,e,i,n){var o=this.relativeProps(e),r=o.x,s=o.y;return h={height:this.height,width:this.width},h[r]=this.alignHorizontal(t,e,i),h[s]=this.alignVertical(t,e,n),h;var h},t.prototype.alignHorizontal=function(t,e,i){var n=this.relativeProps(e),o=n.width,r=n.x,s=n.xScale;return"start"===i&&s(1)<0||"end"===i&&s(1)>0?t[r]+t[o]-this[o]:"center"===i?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.alignVertical=function(t,e,i){var n=this.relativeProps(e),o=n.height,r=n.y,s=n.yScale;return"bottom"===i&&s(1)<0||"top"===i&&s(1)>0?t[r]+t[o]-this[o]:"middle"===i?t[r]+(t[o]-this[o])/2:t[r]},t.prototype.relativeProp=function(t,e,i){return void 0===i&&(i=0),t[(this.lanes().map(function(t){return t.name}).indexOf(e)+t.length+i)%t.length]},t.prototype.relativeProps=function(t){var e=function(t){return t},i=function(t){return-t};return{height:this.relativeProp(["height","width"],t),width:this.relativeProp(["width","height"],t),x:this.relativeProp(["x","y"],t),y:this.relativeProp(["y","x"],t),xScale:this.relativeProp([e,e,i,i],t),yScale:this.relativeProp([i,e,e,i],t)}},t.prototype.relativeLane=function(t,e){var i={start:1,center:0,end:-1}[e];return this.relativeProp(this.lanes(),t,i)},t}();e.default=r},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.rectToDOMRect=function(t,e,i,n){return{x:t,y:e,height:i,width:n,top:e,left:t,bottom:e+i,right:t+n}},e.ClientToDOM=function(t){return e.rectToDOMRect(t.left,t.top,t.height,t.width)}}])});

@@ -36,4 +36,2 @@ import { DOMRect, RectProps } from './types';

declare class Ringside implements RingsideInterface {
readonly innerBounds: DOMRect;
readonly outerBounds: DOMRect;
readonly height: number;

@@ -45,6 +43,8 @@ readonly width: number;

readonly leftLane: Lane;
readonly innerBounds: DOMRect;
readonly outerBounds: DOMRect;
orientations: Orientation[];
hAlignments: HAlignment[];
vAlignments: VAlignment[];
constructor(innerBounds: DOMRect, outerBounds: DOMRect, height: number, width: number);
constructor(innerBounds: ClientRect, outerBounds: ClientRect, height: number, width: number);
top(): PositionedSide;

@@ -51,0 +51,0 @@ bottom(): PositionedSide;

{
"name": "ringside",
"version": "0.1.1",
"version": "0.2.0",
"description": "Positions a rectangle between inner and outer bounds",

@@ -20,3 +20,3 @@ "main": "dist/index.js",

"prepare": "npm run build && npm test",
"release": "standard-version && npm pack",
"release": "standard-version",
"storybook": "start-storybook -p 9001 -c .storybook"

@@ -23,0 +23,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc