js-media-query
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,3 +0,3 @@ | ||
import Media, { down, isMouse, isTouch, lg, max, md, min, query, sm, up, xl, xs } from "./Media"; | ||
import Media, { query, min, max, up, down, between, isTouch, isMouse, xs, sm, md, lg, xl, setBreakpoints } from "./Media"; | ||
export default Media; | ||
export { query, min, max, up, down, isTouch, isMouse, xs, sm, md, lg, xl }; | ||
export { query, min, max, up, down, between, isTouch, isMouse, xs, sm, md, lg, xl, setBreakpoints, }; |
@@ -1,2 +0,2 @@ | ||
function t(t){return window.matchMedia(t).matches}var n={xs:0,sm:576,md:768,lg:992,xl:1200};function i(n){return t(n)}function s(n){return t("(min-width: "+n+"px)")}function r(n){return t("(max-width: "+n+"px)")}function o(t){return s(t)}function e(t){return r(t)}function u(n,i){return t("(min-width: "+n+"px) and (max-width: "+i+"px)")}function x(){return t("(pointer: coarse)")}function p(){return t("(pointer: fine)")}function d(t){return void 0===t&&(t=n),o(t.xs)}function m(t){return void 0===t&&(t=n),o(t.sm)}function c(t){return void 0===t&&(t=n),o(t.md)}function h(t){return void 0===t&&(t=n),o(t.lg)}function a(t){return void 0===t&&(t=n),o(t.xl)}var f=function(t){var f=this;void 0===t&&(t=n),this.breakpoints=n,this.query=i,this.min=s,this.max=r,this.up=o,this.down=e,this.between=u,this.isTouch=x,this.isMouse=p,this.xs=function(){return d(f.breakpoints)},this.sm=function(){return m(f.breakpoints)},this.md=function(){return c(f.breakpoints)},this.lg=function(){return h(f.breakpoints)},this.xl=function(){return a(f.breakpoints)},this.setBreakpoints(t)};f.prototype.setBreakpoints=function(t){this.breakpoints={xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl}},f.query=i,f.min=s,f.max=r,f.up=o,f.down=e,f.between=u,f.isTouch=x,f.isMouse=p,f.xs=d,f.sm=m,f.md=c,f.lg=h,f.xl=a,f.setBreakpoints=function(t){this.breakpoints={xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl}},void 0!==window&&(window.Media=f),exports.default=f,exports.query=i,exports.min=s,exports.max=r,exports.up=o,exports.down=e,exports.isTouch=x,exports.isMouse=p,exports.xs=d,exports.sm=m,exports.md=c,exports.lg=h,exports.xl=a; | ||
function t(t){return window.matchMedia(t).matches}var n={xs:0,sm:576,md:768,lg:992,xl:1200};function i(n){return t(n)}function s(n){return t("(min-width: "+n+"px)")}function r(n){return t("(max-width: "+n+"px)")}function e(t){return s(t)}function o(t){return r(t)}function u(n,i){return t("(min-width: "+n+"px) and (max-width: "+i+"px)")}function x(){return t("(pointer: coarse)")}function p(){return t("(pointer: fine)")}function m(t){return void 0===t&&(t=n),e(t.xs)}function c(t){return void 0===t&&(t=n),e(t.sm)}function h(t){return void 0===t&&(t=n),e(t.md)}function a(t){return void 0===t&&(t=n),e(t.lg)}function d(t){return void 0===t&&(t=n),e(t.xl)}function f(t){this.breakpoints={xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl}}var l=function(t){var f=this;void 0===t&&(t=n),this.breakpoints=n,this.query=i,this.min=s,this.max=r,this.up=e,this.down=o,this.between=u,this.isTouch=x,this.isMouse=p,this.xs=function(){return m(f.breakpoints)},this.sm=function(){return c(f.breakpoints)},this.md=function(){return h(f.breakpoints)},this.lg=function(){return a(f.breakpoints)},this.xl=function(){return d(f.breakpoints)},this.setBreakpoints(t)};l.prototype.setBreakpoints=function(t){this.breakpoints={xs:t.xs,sm:t.sm,md:t.md,lg:t.lg,xl:t.xl}},l.query=i,l.min=s,l.max=r,l.up=e,l.down=o,l.between=u,l.isTouch=x,l.isMouse=p,l.xs=m,l.sm=c,l.md=h,l.lg=a,l.xl=d,l.setBreakpoints=f,exports.default=l,exports.query=i,exports.min=s,exports.max=r,exports.up=e,exports.down=o,exports.between=u,exports.isTouch=x,exports.isMouse=p,exports.xs=m,exports.sm=c,exports.md=h,exports.lg=a,exports.xl=d,exports.setBreakpoints=f; | ||
//# sourceMappingURL=media.js.map |
@@ -1,2 +0,2 @@ | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.media={})}(this,function(n){function t(n){return window.matchMedia(n).matches}var i={xs:0,sm:576,md:768,lg:992,xl:1200};function e(n){return t(n)}function o(n){return t("(min-width: "+n+"px)")}function s(n){return t("(max-width: "+n+"px)")}function r(n){return o(n)}function u(n){return s(n)}function d(n,i){return t("(min-width: "+n+"px) and (max-width: "+i+"px)")}function f(){return t("(pointer: coarse)")}function m(){return t("(pointer: fine)")}function c(n){return void 0===n&&(n=i),r(n.xs)}function x(n){return void 0===n&&(n=i),r(n.sm)}function a(n){return void 0===n&&(n=i),r(n.md)}function h(n){return void 0===n&&(n=i),r(n.lg)}function p(n){return void 0===n&&(n=i),r(n.xl)}var l=function(n){var t=this;void 0===n&&(n=i),this.breakpoints=i,this.query=e,this.min=o,this.max=s,this.up=r,this.down=u,this.between=d,this.isTouch=f,this.isMouse=m,this.xs=function(){return c(t.breakpoints)},this.sm=function(){return x(t.breakpoints)},this.md=function(){return a(t.breakpoints)},this.lg=function(){return h(t.breakpoints)},this.xl=function(){return p(t.breakpoints)},this.setBreakpoints(n)};l.prototype.setBreakpoints=function(n){this.breakpoints={xs:n.xs,sm:n.sm,md:n.md,lg:n.lg,xl:n.xl}},l.query=e,l.min=o,l.max=s,l.up=r,l.down=u,l.between=d,l.isTouch=f,l.isMouse=m,l.xs=c,l.sm=x,l.md=a,l.lg=h,l.xl=p,l.setBreakpoints=function(n){this.breakpoints={xs:n.xs,sm:n.sm,md:n.md,lg:n.lg,xl:n.xl}},void 0!==window&&(window.Media=l),n.default=l,n.query=e,n.min=o,n.max=s,n.up=r,n.down=u,n.isTouch=f,n.isMouse=m,n.xs=c,n.sm=x,n.md=a,n.lg=h,n.xl=p}); | ||
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.jsMediaQuery={})}(this,function(n){function t(n){return window.matchMedia(n).matches}var i={xs:0,sm:576,md:768,lg:992,xl:1200};function e(n){return t(n)}function s(n){return t("(min-width: "+n+"px)")}function o(n){return t("(max-width: "+n+"px)")}function r(n){return s(n)}function u(n){return o(n)}function d(n,i){return t("(min-width: "+n+"px) and (max-width: "+i+"px)")}function f(){return t("(pointer: coarse)")}function c(){return t("(pointer: fine)")}function m(n){return void 0===n&&(n=i),r(n.xs)}function x(n){return void 0===n&&(n=i),r(n.sm)}function p(n){return void 0===n&&(n=i),r(n.md)}function a(n){return void 0===n&&(n=i),r(n.lg)}function h(n){return void 0===n&&(n=i),r(n.xl)}function l(n){this.breakpoints={xs:n.xs,sm:n.sm,md:n.md,lg:n.lg,xl:n.xl}}var b=function(n){var t=this;void 0===n&&(n=i),this.breakpoints=i,this.query=e,this.min=s,this.max=o,this.up=r,this.down=u,this.between=d,this.isTouch=f,this.isMouse=c,this.xs=function(){return m(t.breakpoints)},this.sm=function(){return x(t.breakpoints)},this.md=function(){return p(t.breakpoints)},this.lg=function(){return a(t.breakpoints)},this.xl=function(){return h(t.breakpoints)},this.setBreakpoints(n)};b.prototype.setBreakpoints=function(n){this.breakpoints={xs:n.xs,sm:n.sm,md:n.md,lg:n.lg,xl:n.xl}},b.query=e,b.min=s,b.max=o,b.up=r,b.down=u,b.between=d,b.isTouch=f,b.isMouse=c,b.xs=m,b.sm=x,b.md=p,b.lg=a,b.xl=h,b.setBreakpoints=l,n.default=b,n.query=e,n.min=s,n.max=o,n.up=r,n.down=u,n.between=d,n.isTouch=f,n.isMouse=c,n.xs=m,n.sm=x,n.md=p,n.lg=a,n.xl=h,n.setBreakpoints=l}); | ||
//# sourceMappingURL=media.umd.js.map |
{ | ||
"name": "js-media-query", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "CSS Media query in js", | ||
@@ -5,0 +5,0 @@ "source": "src/index.ts", |
@@ -18,7 +18,2 @@ import Media, { | ||
if (window !== undefined) { | ||
// @ts-ignore | ||
window.Media = Media; | ||
} | ||
export default Media; | ||
@@ -25,0 +20,0 @@ export { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
45314
582