@chakra-ui/breakpoint-utils
Advanced tools
Comparing version 2.0.5 to 2.0.6
@@ -1,50 +0,2 @@ | ||
declare const breakpoints: readonly string[]; | ||
declare function mapResponsive(prop: any, mapper: (val: any) => any): any; | ||
declare function objectToArrayNotation(obj: Record<string, any>, bps?: readonly string[]): any[]; | ||
declare function arrayToObjectNotation(values: any[], bps?: readonly string[]): Record<string, any>; | ||
declare function isResponsiveObjectLike(obj: Record<string, any>, bps?: readonly string[]): boolean; | ||
/** | ||
* since breakpoints are defined as custom properties on an array, you may | ||
* `Object.keys(theme.breakpoints)` to retrieve both regular numeric indices | ||
* and custom breakpoints as string. | ||
* | ||
* This function returns true given a custom array property. | ||
*/ | ||
declare const isCustomBreakpoint: (v: string) => boolean; | ||
declare function px(value: number | string | null): string | null; | ||
declare function toMediaQueryString(min: string | null, max?: string): string; | ||
declare function analyzeBreakpoints(breakpoints: Record<string, any>): { | ||
keys: Set<string>; | ||
normalized: string[]; | ||
isResponsive(test: Record<string, any>): boolean; | ||
asObject: Record<string, any>; | ||
asArray: string[]; | ||
details: { | ||
_minW: string; | ||
breakpoint: string; | ||
minW: any; | ||
maxW: any; | ||
maxWQuery: string; | ||
minWQuery: string; | ||
minMaxQuery: string; | ||
}[]; | ||
media: (string | null)[]; | ||
/** | ||
* Converts the object responsive syntax to array syntax | ||
* | ||
* @example | ||
* toArrayValue({ base: 1, sm: 2, md: 3 }) // => [1, 2, 3] | ||
*/ | ||
toArrayValue(test: Record<string, any>): any[]; | ||
/** | ||
* Converts the array responsive syntax to object syntax | ||
* | ||
* @example | ||
* toObjectValue([1, 2, 3]) // => { base: 1, sm: 2, md: 3 } | ||
*/ | ||
toObjectValue(test: any[]): any; | ||
} | null; | ||
declare type AnalyzeBreakpointsReturn = ReturnType<typeof analyzeBreakpoints>; | ||
export { AnalyzeBreakpointsReturn, analyzeBreakpoints, arrayToObjectNotation, breakpoints, isCustomBreakpoint, isResponsiveObjectLike, mapResponsive, objectToArrayNotation, px, toMediaQueryString }; | ||
export { arrayToObjectNotation, breakpoints, isCustomBreakpoint, isResponsiveObjectLike, mapResponsive, objectToArrayNotation } from './responsive.js'; | ||
export { AnalyzeBreakpointsReturn, analyzeBreakpoints, px, toMediaQueryString } from './breakpoint.js'; |
{ | ||
"name": "@chakra-ui/breakpoint-utils", | ||
"version": "2.0.5", | ||
"version": "2.0.6", | ||
"description": "", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
"license": "MIT", | ||
"main": "dist/index.cjs.js", | ||
"main": "dist/index.js", | ||
"sideEffects": false, | ||
@@ -31,12 +31,23 @@ "files": [ | ||
"devDependencies": { | ||
"@chakra-ui/shared-utils": "2.0.3", | ||
"clean-package": "2.1.1" | ||
}, | ||
"module": "dist/index.esm.js", | ||
"clean-package": "../../../clean-package.config.json", | ||
"tsup": { | ||
"clean": true, | ||
"target": "es2019", | ||
"format": [ | ||
"cjs", | ||
"esm" | ||
] | ||
}, | ||
"dependencies": { | ||
"@chakra-ui/shared-utils": "2.0.4" | ||
}, | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": "./dist/index.esm.js", | ||
"require": "./dist/index.cjs.js", | ||
"types": "./dist/index.d.ts" | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
}, | ||
@@ -46,8 +57,8 @@ "./package.json": "./package.json" | ||
"scripts": { | ||
"build": "tsup src/index.ts --format=esm,cjs --dts", | ||
"build": "tsup src --dts", | ||
"dev": "pnpm build:fast -- --watch", | ||
"clean": "rimraf dist .turbo", | ||
"typecheck": "tsc --noEmit", | ||
"build:fast": "tsup src/index.ts --format=esm,cjs" | ||
"build:fast": "tsup src" | ||
} | ||
} |
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
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
24670
1
14
694
1
1
+ Added@chakra-ui/shared-utils@2.0.4(transitive)