Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chakra-ui/media-query

Package Overview
Dependencies
Maintainers
4
Versions
482
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/media-query - npm Package Compare versions

Comparing version 1.0.0-rc.4 to 1.0.0-rc.5

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# 1.0.0-rc.5 (2020-09-27)
**Note:** Version bump only for package @chakra-ui/media-query
# 1.0.0-rc.4 (2020-09-25)

@@ -8,0 +16,0 @@

2

dist/cjs/media-query.js

@@ -66,3 +66,3 @@ "use strict";

var getBreakpoint = function getBreakpoint(theme, value) {
return (0, _utils.get)(theme, "breakpoints." + value, value);
return (0, _utils.memoizedGet)(theme, "breakpoints." + value, value);
};

@@ -69,0 +69,0 @@

@@ -31,3 +31,3 @@ "use strict";

var obj = (0, _utils.isArray)(values) ? Object.fromEntries(Object.entries((0, _utils.arrayToObjectNotation)(values, breakpoints)).map(function (_ref) {
var obj = (0, _utils.isArray)(values) ? (0, _utils.fromEntries)(Object.entries((0, _utils.arrayToObjectNotation)(values, breakpoints)).map(function (_ref) {
var _ = _ref[0],

@@ -37,5 +37,4 @@ value = _ref[1];

})) : values;
var closest = (0, _mediaQuery.getClosestValue)(obj, breakpoint);
return closest;
return (0, _mediaQuery.getClosestValue)(obj, breakpoint);
}
//# sourceMappingURL=use-breakpoint-value.js.map
import { useMediaQuery } from "./use-media-query";
import * as React from "react";
import { useTheme } from "@chakra-ui/system";
import { get, __DEV__ } from "@chakra-ui/utils";
import { memoizedGet as get, __DEV__ } from "@chakra-ui/utils";

@@ -6,0 +6,0 @@ /**

import { getClosestValue } from "./media-query.utils";
import { useBreakpoint } from "./use-breakpoint";
import { isArray, arrayToObjectNotation } from "@chakra-ui/utils";
import { isArray, arrayToObjectNotation, fromEntries } from "@chakra-ui/utils";
import { useTheme } from "@chakra-ui/system";

@@ -23,9 +23,8 @@ /**

var obj = isArray(values) ? Object.fromEntries(Object.entries(arrayToObjectNotation(values, breakpoints)).map((_ref) => {
var obj = isArray(values) ? fromEntries(Object.entries(arrayToObjectNotation(values, breakpoints)).map((_ref) => {
var [_, value] = _ref;
return [value, value];
})) : values;
var closest = getClosestValue(obj, breakpoint);
return closest;
return getClosestValue(obj, breakpoint);
}
//# sourceMappingURL=use-breakpoint-value.js.map

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

export declare function getClosestValue(values: any, breakpoint: string): any;
export declare function getClosestValue<T = any>(values: Record<string, T>, breakpoint: string): T | undefined;

@@ -8,2 +8,2 @@ /**

*/
export declare function useBreakpointValue<T = any>(values: Record<string, T> | T[]): any;
export declare function useBreakpointValue<T = any>(values: Record<string, T> | T[]): T | undefined;
{
"name": "@chakra-ui/media-query",
"version": "1.0.0-rc.4",
"version": "1.0.0-rc.5",
"description": "A React hook for changing properties or visibility of a component based on css media query",

@@ -49,8 +49,8 @@ "keywords": [

"dependencies": {
"@chakra-ui/utils": "1.0.0-rc.4",
"@chakra-ui/utils": "1.0.0-rc.5",
"calculate-measurement": "0.1.0"
},
"devDependencies": {
"@chakra-ui/system": "1.0.0-rc.4",
"@chakra-ui/test-utils": "1.0.0-rc.4",
"@chakra-ui/system": "1.0.0-rc.5",
"@chakra-ui/test-utils": "1.0.0-rc.5",
"jest-matchmedia-mock": "^1.0.1"

@@ -63,3 +63,3 @@ },

},
"gitHead": "830b8587c572a4c20d6b56b256accd6686255819"
"gitHead": "b5c8482b778b19f27ea1d6c8ab6d5ed39c664afa"
}

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc