@pandacss/shared
Advanced tools
Comparing version 0.0.0-dev-20240201185610 to 0.0.0-dev-20240201214314
@@ -74,3 +74,2 @@ import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-F25j1lrb.js'; | ||
declare function toResponsiveObject(values: string[], breakpoints: string[]): Record<string, string>; | ||
declare function normalizeShorthand(styles: Record<string, any>, context: NormalizeContext): MappedObject<Record<string, any>, any>; | ||
declare function normalizeStyleObject(styles: Record<string, any>, context: NormalizeContext, shorthand?: boolean): MappedObject<Record<string, any>, any>; | ||
@@ -109,2 +108,2 @@ | ||
export { CreateCssContext, type CssVar, type CssVarOptions, type MapToRecord, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeShorthand, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType }; | ||
export { CreateCssContext, type CssVar, type CssVarOptions, type MapToRecord, MappedObject, PandaError, type PandaErrorCode, WalkObjectStopFn, calc, camelCaseProperty, capitalize, createRegex, cssVar, dashCase, deepSet, entries, esc, flatten, fromEntries, getArbitraryValue, getDotPath, getNegativePath, getOrCreateSet, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType }; |
@@ -65,3 +65,2 @@ "use strict"; | ||
mergeProps: () => mergeProps, | ||
normalizeShorthand: () => normalizeShorthand, | ||
normalizeStyleObject: () => normalizeStyleObject, | ||
@@ -320,10 +319,2 @@ parseJson: () => parseJson, | ||
} | ||
function normalizeShorthand(styles, context) { | ||
const { hasShorthand, resolveShorthand } = context.utility; | ||
return walkObject(styles, (v) => v, { | ||
getKey: (prop) => { | ||
return hasShorthand ? resolveShorthand(prop) : prop; | ||
} | ||
}); | ||
} | ||
function normalizeStyleObject(styles, context, shorthand = true) { | ||
@@ -391,3 +382,3 @@ const { utility, conditions } = context; | ||
return allStyles; | ||
return allStyles.map((style) => normalizeShorthand(style, context)); | ||
return allStyles.map((style) => normalizeStyleObject(style, context)); | ||
} | ||
@@ -816,3 +807,2 @@ function mergeCss(...styles) { | ||
mergeProps, | ||
normalizeShorthand, | ||
normalizeStyleObject, | ||
@@ -819,0 +809,0 @@ parseJson, |
@@ -168,10 +168,2 @@ "use strict"; | ||
} | ||
function normalizeShorthand(styles, context) { | ||
const { hasShorthand, resolveShorthand } = context.utility; | ||
return walkObject(styles, (v) => v, { | ||
getKey: (prop) => { | ||
return hasShorthand ? resolveShorthand(prop) : prop; | ||
} | ||
}); | ||
} | ||
function normalizeStyleObject(styles, context, shorthand = true) { | ||
@@ -239,3 +231,3 @@ const { utility, conditions } = context; | ||
return allStyles; | ||
return allStyles.map((style) => normalizeShorthand(style, context)); | ||
return allStyles.map((style) => normalizeStyleObject(style, context)); | ||
} | ||
@@ -242,0 +234,0 @@ function mergeCss(...styles) { |
{ | ||
"name": "@pandacss/shared", | ||
"version": "0.0.0-dev-20240201185610", | ||
"version": "0.0.0-dev-20240201214314", | ||
"description": "Shared utilities for css panda", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
89510
2386
182