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

@chakra-ui/breakpoint-utils

Package Overview
Dependencies
Maintainers
3
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chakra-ui/breakpoint-utils - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

15

dist/index.cjs.js

@@ -25,2 +25,3 @@ "use strict";

arrayToObjectNotation: () => arrayToObjectNotation,
breakpoints: () => breakpoints,
isCustomBreakpoint: () => isCustomBreakpoint,

@@ -30,2 +31,3 @@ isResponsiveObjectLike: () => isResponsiveObjectLike,

objectToArrayNotation: () => objectToArrayNotation,
px: () => px,
toMediaQueryString: () => toMediaQueryString

@@ -42,3 +44,10 @@ });

// src/responsive.ts
var breakpoints = Object.freeze(["base", "sm", "md", "lg", "xl", "2xl"]);
var breakpoints = Object.freeze([
"base",
"sm",
"md",
"lg",
"xl",
"2xl"
]);
function mapResponsive(prop, mapper) {

@@ -99,3 +108,3 @@ if (Array.isArray(prop)) {

var sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;
var sortBps = (breakpoints2) => Object.entries(breakpoints2).sort(sortByBreakpointValue);
var sortBps = (breakpoints2) => Object.fromEntries(Object.entries(breakpoints2).sort(sortByBreakpointValue));
function normalize(breakpoints2) {

@@ -185,2 +194,3 @@ const sorted = sortBps(breakpoints2);

arrayToObjectNotation,
breakpoints,
isCustomBreakpoint,

@@ -190,3 +200,4 @@ isResponsiveObjectLike,

objectToArrayNotation,
px,
toMediaQueryString
});

5

dist/index.d.ts

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

declare const breakpoints: readonly string[];
declare function mapResponsive(prop: any, mapper: (val: any) => any): any;

@@ -14,2 +15,3 @@ declare function objectToArrayNotation(obj: Record<string, any>, bps?: readonly string[]): any[];

declare function px(value: number | string | null): string | null;
declare function toMediaQueryString(min: string | null, max?: string): string;

@@ -47,3 +49,4 @@ declare function analyzeBreakpoints(breakpoints: Record<string, any>): {

} | null;
declare type AnalyzeBreakpointsReturn = ReturnType<typeof analyzeBreakpoints>;
export { analyzeBreakpoints, arrayToObjectNotation, isCustomBreakpoint, isResponsiveObjectLike, mapResponsive, objectToArrayNotation, toMediaQueryString };
export { AnalyzeBreakpointsReturn, analyzeBreakpoints, arrayToObjectNotation, breakpoints, isCustomBreakpoint, isResponsiveObjectLike, mapResponsive, objectToArrayNotation, px, toMediaQueryString };

@@ -8,3 +8,10 @@ // ../shared-utils/dist/index.esm.js

// src/responsive.ts
var breakpoints = Object.freeze(["base", "sm", "md", "lg", "xl", "2xl"]);
var breakpoints = Object.freeze([
"base",
"sm",
"md",
"lg",
"xl",
"2xl"
]);
function mapResponsive(prop, mapper) {

@@ -65,3 +72,3 @@ if (Array.isArray(prop)) {

var sortByBreakpointValue = (a, b) => parseInt(a[1], 10) > parseInt(b[1], 10) ? 1 : -1;
var sortBps = (breakpoints2) => Object.entries(breakpoints2).sort(sortByBreakpointValue);
var sortBps = (breakpoints2) => Object.fromEntries(Object.entries(breakpoints2).sort(sortByBreakpointValue));
function normalize(breakpoints2) {

@@ -150,2 +157,3 @@ const sorted = sortBps(breakpoints2);

arrayToObjectNotation,
breakpoints,
isCustomBreakpoint,

@@ -155,3 +163,4 @@ isResponsiveObjectLike,

objectToArrayNotation,
px,
toMediaQueryString
};
{
"name": "@chakra-ui/breakpoint-utils",
"version": "2.0.2",
"version": "2.0.3",
"description": "",

@@ -32,3 +32,3 @@ "keywords": [

"devDependencies": {
"@chakra-ui/shared-utils": "0.0.0-dev-20220820120308"
"@chakra-ui/shared-utils": "2.0.1"
},

@@ -35,0 +35,0 @@ "scripts": {

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