@pandacss/shared 0.0.0-dev-20240209014930 → 0.0.0-dev-20240211191317
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +24 -3
- package/dist/index.d.ts +24 -3
- package/dist/index.js +121 -1
- package/dist/index.mjs +120 -1
- package/dist/{shared-z3agWt4M.d.mts → shared-4wnn7ulW.d.mts} +1 -1
- package/dist/{shared-z3agWt4M.d.ts → shared-4wnn7ulW.d.ts} +1 -1
- package/dist/shared.d.mts +1 -1
- package/dist/shared.d.ts +1 -1
- package/dist/shared.js +2 -1
- package/dist/shared.mjs +2 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-
|
|
2
|
-
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-
|
|
1
|
+
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-4wnn7ulW.mjs';
|
|
2
|
+
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-4wnn7ulW.mjs';
|
|
3
3
|
export { astish } from './astish.mjs';
|
|
4
4
|
|
|
5
5
|
declare const getArbitraryValue: (_value: string) => string;
|
|
@@ -78,6 +78,27 @@ declare const createRegex: (item: Array<string | RegExp>) => RegExp;
|
|
|
78
78
|
declare const stringifyJson: (config: Record<string, any>) => string;
|
|
79
79
|
declare const parseJson: (config: string) => any;
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Get the property priority: the higher the priority, the higher the resulting
|
|
83
|
+
* specificity of the atom. For example, if we had:
|
|
84
|
+
*
|
|
85
|
+
* ```tsx
|
|
86
|
+
* import { css } from '@pandacss/dev';
|
|
87
|
+
*
|
|
88
|
+
* css({
|
|
89
|
+
* backgroundColor: 'blue',
|
|
90
|
+
* background: 'red',
|
|
91
|
+
* })
|
|
92
|
+
*
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* and so the more specific selector would win
|
|
96
|
+
*
|
|
97
|
+
* Taken from
|
|
98
|
+
* @see https://github.com/callstack/linaria/blob/049a4ccb77e29f3628353352db21bd446fa04a2e/packages/atomic/src/processors/helpers/propertyPriority.ts
|
|
99
|
+
*/
|
|
100
|
+
declare function getPropertyPriority(property: string): 1 | 2;
|
|
101
|
+
|
|
81
102
|
declare function splitBy(value: string, separator?: string): any[];
|
|
82
103
|
declare function splitDotPath(path: string): string[];
|
|
83
104
|
declare function getNegativePath(path: string[]): string[];
|
|
@@ -104,4 +125,4 @@ declare function traverse(obj: any, callback: CallbackFn, options?: {
|
|
|
104
125
|
|
|
105
126
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
106
127
|
|
|
107
|
-
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 };
|
|
128
|
+
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, getPropertyPriority, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-
|
|
2
|
-
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-
|
|
1
|
+
import { W as WalkObjectStopFn, M as MappedObject, C as CreateCssContext } from './shared-4wnn7ulW.js';
|
|
2
|
+
export { x as WalkObjectOptions, f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, a as isBoolean, b as isFunction, j as isImportant, c as isObject, i as isString, z as mapObject, m as markImportant, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, w as withoutImportant, k as withoutSpace } from './shared-4wnn7ulW.js';
|
|
3
3
|
export { astish } from './astish.js';
|
|
4
4
|
|
|
5
5
|
declare const getArbitraryValue: (_value: string) => string;
|
|
@@ -78,6 +78,27 @@ declare const createRegex: (item: Array<string | RegExp>) => RegExp;
|
|
|
78
78
|
declare const stringifyJson: (config: Record<string, any>) => string;
|
|
79
79
|
declare const parseJson: (config: string) => any;
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Get the property priority: the higher the priority, the higher the resulting
|
|
83
|
+
* specificity of the atom. For example, if we had:
|
|
84
|
+
*
|
|
85
|
+
* ```tsx
|
|
86
|
+
* import { css } from '@pandacss/dev';
|
|
87
|
+
*
|
|
88
|
+
* css({
|
|
89
|
+
* backgroundColor: 'blue',
|
|
90
|
+
* background: 'red',
|
|
91
|
+
* })
|
|
92
|
+
*
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* and so the more specific selector would win
|
|
96
|
+
*
|
|
97
|
+
* Taken from
|
|
98
|
+
* @see https://github.com/callstack/linaria/blob/049a4ccb77e29f3628353352db21bd446fa04a2e/packages/atomic/src/processors/helpers/propertyPriority.ts
|
|
99
|
+
*/
|
|
100
|
+
declare function getPropertyPriority(property: string): 1 | 2;
|
|
101
|
+
|
|
81
102
|
declare function splitBy(value: string, separator?: string): any[];
|
|
82
103
|
declare function splitDotPath(path: string): string[];
|
|
83
104
|
declare function getNegativePath(path: string[]): string[];
|
|
@@ -104,4 +125,4 @@ declare function traverse(obj: any, callback: CallbackFn, options?: {
|
|
|
104
125
|
|
|
105
126
|
declare function unionType(values: IterableIterator<string> | string[] | readonly string[] | Set<string>): string;
|
|
106
127
|
|
|
107
|
-
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 };
|
|
128
|
+
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, getPropertyPriority, getUnit, isCssFunction, isCssUnit, isCssVar, isObjectOrArray, mapEntries, mapToJson, normalizeStyleObject, parseJson, splitBy, splitDotPath, stringifyJson, toEm, toPx, toRem, toResponsiveObject, traverse, uncapitalize, unionType };
|
package/dist/index.js
CHANGED
|
@@ -42,6 +42,7 @@ __export(src_exports, {
|
|
|
42
42
|
getNegativePath: () => getNegativePath,
|
|
43
43
|
getOrCreateSet: () => getOrCreateSet,
|
|
44
44
|
getPatternStyles: () => getPatternStyles,
|
|
45
|
+
getPropertyPriority: () => getPropertyPriority,
|
|
45
46
|
getSlotCompoundVariant: () => getSlotCompoundVariant,
|
|
46
47
|
getSlotRecipes: () => getSlotRecipes,
|
|
47
48
|
getUnit: () => getUnit,
|
|
@@ -351,7 +352,8 @@ function createCss(context) {
|
|
|
351
352
|
}
|
|
352
353
|
return result;
|
|
353
354
|
};
|
|
354
|
-
return memo((
|
|
355
|
+
return memo(({ base, ...styles } = {}) => {
|
|
356
|
+
const styleObject = Object.assign(styles, base);
|
|
355
357
|
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
356
358
|
const classNames = /* @__PURE__ */ new Set();
|
|
357
359
|
walkObject(normalizedObject, (value, paths) => {
|
|
@@ -620,6 +622,123 @@ var parseJson = (config) => {
|
|
|
620
622
|
return JSON.parse(config);
|
|
621
623
|
};
|
|
622
624
|
|
|
625
|
+
// src/shorthand-properties.ts
|
|
626
|
+
var shorthandProperties = {
|
|
627
|
+
animation: [
|
|
628
|
+
"animationName",
|
|
629
|
+
"animationDuration",
|
|
630
|
+
"animationTimingFunction",
|
|
631
|
+
"animationDelay",
|
|
632
|
+
"animationIterationCount",
|
|
633
|
+
"animationDirection",
|
|
634
|
+
"animationFillMode",
|
|
635
|
+
"animationPlayState"
|
|
636
|
+
],
|
|
637
|
+
background: [
|
|
638
|
+
"backgroundImage",
|
|
639
|
+
"backgroundPosition",
|
|
640
|
+
"backgroundSize",
|
|
641
|
+
"backgroundRepeat",
|
|
642
|
+
"backgroundAttachment",
|
|
643
|
+
"backgroundOrigin",
|
|
644
|
+
"backgroundClip",
|
|
645
|
+
"backgroundColor"
|
|
646
|
+
],
|
|
647
|
+
backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
|
|
648
|
+
border: ["borderWidth", "borderStyle", "borderColor"],
|
|
649
|
+
borderBlockEnd: ["borderBlockEndWidth", "borderBlockEndStyle", "borderBlockEndColor"],
|
|
650
|
+
borderBlockStart: ["borderBlockStartWidth", "borderBlockStartStyle", "borderBlockStartColor"],
|
|
651
|
+
borderBottom: ["borderBottomWidth", "borderBottomStyle", "borderBottomColor"],
|
|
652
|
+
borderColor: ["borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"],
|
|
653
|
+
borderImage: ["borderImageSource", "borderImageSlice", "borderImageWidth", "borderImageOutset", "borderImageRepeat"],
|
|
654
|
+
borderInlineEnd: ["borderInlineEndWidth", "borderInlineEndStyle", "borderInlineEndColor"],
|
|
655
|
+
borderInlineStart: ["borderInlineStartWidth", "borderInlineStartStyle", "borderInlineStartColor"],
|
|
656
|
+
borderLeft: ["borderLeftWidth", "borderLeftStyle", "borderLeftColor"],
|
|
657
|
+
borderRadius: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"],
|
|
658
|
+
borderRight: ["borderRightWidth", "borderRightStyle", "borderRightColor"],
|
|
659
|
+
borderStyle: ["borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle"],
|
|
660
|
+
borderTop: ["borderTopWidth", "borderTopStyle", "borderTopColor"],
|
|
661
|
+
borderWidth: ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"],
|
|
662
|
+
columnRule: ["columnRuleWidth", "columnRuleStyle", "columnRuleColor"],
|
|
663
|
+
columns: ["columnWidth", "columnCount"],
|
|
664
|
+
container: ["contain", "content"],
|
|
665
|
+
containIntrinsicSize: ["containIntrinsicSizeInline", "containIntrinsicSizeBlock"],
|
|
666
|
+
cue: ["cueBefore", "cueAfter"],
|
|
667
|
+
flex: ["flexGrow", "flexShrink", "flexBasis"],
|
|
668
|
+
flexFlow: ["flexDirection", "flexWrap"],
|
|
669
|
+
font: [
|
|
670
|
+
"fontStyle",
|
|
671
|
+
"fontVariantCaps",
|
|
672
|
+
"fontVariantEastAsian",
|
|
673
|
+
"fontVariantLigatures",
|
|
674
|
+
"fontVariantNumeric",
|
|
675
|
+
"fontVariantPosition",
|
|
676
|
+
"fontWeight",
|
|
677
|
+
"fontStretch",
|
|
678
|
+
"fontSize",
|
|
679
|
+
"lineHeight",
|
|
680
|
+
"fontFamily"
|
|
681
|
+
],
|
|
682
|
+
fontSynthesis: ["fontSynthesisWeight", "fontSynthesisStyle", "fontSynthesisSmallCaps"],
|
|
683
|
+
fontVariant: [
|
|
684
|
+
"fontVariantCaps",
|
|
685
|
+
"fontVariantEastAsian",
|
|
686
|
+
"fontVariantLigatures",
|
|
687
|
+
"fontVariantNumeric",
|
|
688
|
+
"fontVariantPosition"
|
|
689
|
+
],
|
|
690
|
+
gap: ["columnGap", "rowGap"],
|
|
691
|
+
grid: [
|
|
692
|
+
"gridTemplateColumns",
|
|
693
|
+
"gridTemplateRows",
|
|
694
|
+
"gridTemplateAreas",
|
|
695
|
+
"gridAutoColumns",
|
|
696
|
+
"gridAutoRows",
|
|
697
|
+
"gridAutoFlow"
|
|
698
|
+
],
|
|
699
|
+
gridArea: ["gridRowStart", "gridColumnStart", "gridRowEnd", "gridColumnEnd"],
|
|
700
|
+
gridColumn: ["gridColumnStart", "gridColumnEnd"],
|
|
701
|
+
gridGap: ["gridColumnGap", "gridRowGap"],
|
|
702
|
+
gridRow: ["gridRowStart", "gridRowEnd"],
|
|
703
|
+
gridTemplate: ["gridTemplateColumns", "gridTemplateRows", "gridTemplateAreas"],
|
|
704
|
+
inset: ["top", "right", "bottom", "left"],
|
|
705
|
+
listStyle: ["listStyleType", "listStylePosition", "listStyleImage"],
|
|
706
|
+
margin: ["marginTop", "marginRight", "marginBottom", "marginLeft"],
|
|
707
|
+
mask: ["maskImage", "maskMode", "maskRepeat", "maskPosition", "maskClip", "maskOrigin", "maskSize", "maskComposite"],
|
|
708
|
+
maskBorder: [
|
|
709
|
+
"maskBorderSource",
|
|
710
|
+
"maskBorderMode",
|
|
711
|
+
"maskBorderSlice",
|
|
712
|
+
"maskBorderWidth",
|
|
713
|
+
"maskBorderOutset",
|
|
714
|
+
"maskBorderRepeat"
|
|
715
|
+
],
|
|
716
|
+
offset: ["offsetPosition", "offsetPath", "offsetDistance", "offsetRotate", "offsetAnchor"],
|
|
717
|
+
outline: ["outlineWidth", "outlineStyle", "outlineColor"],
|
|
718
|
+
overflow: ["overflowX", "overflowY"],
|
|
719
|
+
padding: ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
|
|
720
|
+
pause: ["pauseBefore", "pauseAfter"],
|
|
721
|
+
placeContent: ["alignContent", "justifyContent"],
|
|
722
|
+
placeItems: ["alignItems", "justifyItems"],
|
|
723
|
+
placeSelf: ["alignSelf", "justifySelf"],
|
|
724
|
+
rest: ["restBefore", "restAfter"],
|
|
725
|
+
scrollMargin: ["scrollMarginTop", "scrollMarginRight", "scrollMarginBottom", "scrollMarginLeft"],
|
|
726
|
+
scrollPadding: ["scrollPaddingTop", "scrollPaddingRight", "scrollPaddingBottom", "scrollPaddingLeft"],
|
|
727
|
+
scrollPaddingBlock: ["scrollPaddingBlockStart", "scrollPaddingBlockEnd"],
|
|
728
|
+
scrollPaddingInline: ["scrollPaddingInlineStart", "scrollPaddingInlineEnd"],
|
|
729
|
+
scrollSnapMargin: ["scrollSnapMarginTop", "scrollSnapMarginRight", "scrollSnapMarginBottom", "scrollSnapMarginLeft"],
|
|
730
|
+
scrollSnapMarginBlock: ["scrollSnapMarginBlockStart", "scrollSnapMarginBlockEnd"],
|
|
731
|
+
scrollSnapMarginInline: ["scrollSnapMarginInlineStart", "scrollSnapMarginInlineEnd"],
|
|
732
|
+
scrollTimeline: ["scrollTimelineSource", "scrollTimelineOrientation"],
|
|
733
|
+
textDecoration: ["textDecorationLine", "textDecorationStyle", "textDecorationColor"],
|
|
734
|
+
textEmphasis: ["textEmphasisStyle", "textEmphasisColor"],
|
|
735
|
+
transition: ["transitionProperty", "transitionDuration", "transitionTimingFunction", "transitionDelay"]
|
|
736
|
+
};
|
|
737
|
+
var longhands = Object.values(shorthandProperties).reduce((a, b) => [...a, ...b], []);
|
|
738
|
+
function getPropertyPriority(property) {
|
|
739
|
+
return longhands.includes(property) ? 2 : 1;
|
|
740
|
+
}
|
|
741
|
+
|
|
623
742
|
// src/slot.ts
|
|
624
743
|
var getSlotRecipes = (recipe = {}) => {
|
|
625
744
|
const init = (slot) => ({
|
|
@@ -781,6 +900,7 @@ var uniq = (...items) => items.filter(Boolean).reduce((acc, item) => Array.from(
|
|
|
781
900
|
getNegativePath,
|
|
782
901
|
getOrCreateSet,
|
|
783
902
|
getPatternStyles,
|
|
903
|
+
getPropertyPriority,
|
|
784
904
|
getSlotCompoundVariant,
|
|
785
905
|
getSlotRecipes,
|
|
786
906
|
getUnit,
|
package/dist/index.mjs
CHANGED
|
@@ -265,7 +265,8 @@ function createCss(context) {
|
|
|
265
265
|
}
|
|
266
266
|
return result;
|
|
267
267
|
};
|
|
268
|
-
return memo((
|
|
268
|
+
return memo(({ base, ...styles } = {}) => {
|
|
269
|
+
const styleObject = Object.assign(styles, base);
|
|
269
270
|
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
270
271
|
const classNames = /* @__PURE__ */ new Set();
|
|
271
272
|
walkObject(normalizedObject, (value, paths) => {
|
|
@@ -534,6 +535,123 @@ var parseJson = (config) => {
|
|
|
534
535
|
return JSON.parse(config);
|
|
535
536
|
};
|
|
536
537
|
|
|
538
|
+
// src/shorthand-properties.ts
|
|
539
|
+
var shorthandProperties = {
|
|
540
|
+
animation: [
|
|
541
|
+
"animationName",
|
|
542
|
+
"animationDuration",
|
|
543
|
+
"animationTimingFunction",
|
|
544
|
+
"animationDelay",
|
|
545
|
+
"animationIterationCount",
|
|
546
|
+
"animationDirection",
|
|
547
|
+
"animationFillMode",
|
|
548
|
+
"animationPlayState"
|
|
549
|
+
],
|
|
550
|
+
background: [
|
|
551
|
+
"backgroundImage",
|
|
552
|
+
"backgroundPosition",
|
|
553
|
+
"backgroundSize",
|
|
554
|
+
"backgroundRepeat",
|
|
555
|
+
"backgroundAttachment",
|
|
556
|
+
"backgroundOrigin",
|
|
557
|
+
"backgroundClip",
|
|
558
|
+
"backgroundColor"
|
|
559
|
+
],
|
|
560
|
+
backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
|
|
561
|
+
border: ["borderWidth", "borderStyle", "borderColor"],
|
|
562
|
+
borderBlockEnd: ["borderBlockEndWidth", "borderBlockEndStyle", "borderBlockEndColor"],
|
|
563
|
+
borderBlockStart: ["borderBlockStartWidth", "borderBlockStartStyle", "borderBlockStartColor"],
|
|
564
|
+
borderBottom: ["borderBottomWidth", "borderBottomStyle", "borderBottomColor"],
|
|
565
|
+
borderColor: ["borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor"],
|
|
566
|
+
borderImage: ["borderImageSource", "borderImageSlice", "borderImageWidth", "borderImageOutset", "borderImageRepeat"],
|
|
567
|
+
borderInlineEnd: ["borderInlineEndWidth", "borderInlineEndStyle", "borderInlineEndColor"],
|
|
568
|
+
borderInlineStart: ["borderInlineStartWidth", "borderInlineStartStyle", "borderInlineStartColor"],
|
|
569
|
+
borderLeft: ["borderLeftWidth", "borderLeftStyle", "borderLeftColor"],
|
|
570
|
+
borderRadius: ["borderTopLeftRadius", "borderTopRightRadius", "borderBottomRightRadius", "borderBottomLeftRadius"],
|
|
571
|
+
borderRight: ["borderRightWidth", "borderRightStyle", "borderRightColor"],
|
|
572
|
+
borderStyle: ["borderTopStyle", "borderRightStyle", "borderBottomStyle", "borderLeftStyle"],
|
|
573
|
+
borderTop: ["borderTopWidth", "borderTopStyle", "borderTopColor"],
|
|
574
|
+
borderWidth: ["borderTopWidth", "borderRightWidth", "borderBottomWidth", "borderLeftWidth"],
|
|
575
|
+
columnRule: ["columnRuleWidth", "columnRuleStyle", "columnRuleColor"],
|
|
576
|
+
columns: ["columnWidth", "columnCount"],
|
|
577
|
+
container: ["contain", "content"],
|
|
578
|
+
containIntrinsicSize: ["containIntrinsicSizeInline", "containIntrinsicSizeBlock"],
|
|
579
|
+
cue: ["cueBefore", "cueAfter"],
|
|
580
|
+
flex: ["flexGrow", "flexShrink", "flexBasis"],
|
|
581
|
+
flexFlow: ["flexDirection", "flexWrap"],
|
|
582
|
+
font: [
|
|
583
|
+
"fontStyle",
|
|
584
|
+
"fontVariantCaps",
|
|
585
|
+
"fontVariantEastAsian",
|
|
586
|
+
"fontVariantLigatures",
|
|
587
|
+
"fontVariantNumeric",
|
|
588
|
+
"fontVariantPosition",
|
|
589
|
+
"fontWeight",
|
|
590
|
+
"fontStretch",
|
|
591
|
+
"fontSize",
|
|
592
|
+
"lineHeight",
|
|
593
|
+
"fontFamily"
|
|
594
|
+
],
|
|
595
|
+
fontSynthesis: ["fontSynthesisWeight", "fontSynthesisStyle", "fontSynthesisSmallCaps"],
|
|
596
|
+
fontVariant: [
|
|
597
|
+
"fontVariantCaps",
|
|
598
|
+
"fontVariantEastAsian",
|
|
599
|
+
"fontVariantLigatures",
|
|
600
|
+
"fontVariantNumeric",
|
|
601
|
+
"fontVariantPosition"
|
|
602
|
+
],
|
|
603
|
+
gap: ["columnGap", "rowGap"],
|
|
604
|
+
grid: [
|
|
605
|
+
"gridTemplateColumns",
|
|
606
|
+
"gridTemplateRows",
|
|
607
|
+
"gridTemplateAreas",
|
|
608
|
+
"gridAutoColumns",
|
|
609
|
+
"gridAutoRows",
|
|
610
|
+
"gridAutoFlow"
|
|
611
|
+
],
|
|
612
|
+
gridArea: ["gridRowStart", "gridColumnStart", "gridRowEnd", "gridColumnEnd"],
|
|
613
|
+
gridColumn: ["gridColumnStart", "gridColumnEnd"],
|
|
614
|
+
gridGap: ["gridColumnGap", "gridRowGap"],
|
|
615
|
+
gridRow: ["gridRowStart", "gridRowEnd"],
|
|
616
|
+
gridTemplate: ["gridTemplateColumns", "gridTemplateRows", "gridTemplateAreas"],
|
|
617
|
+
inset: ["top", "right", "bottom", "left"],
|
|
618
|
+
listStyle: ["listStyleType", "listStylePosition", "listStyleImage"],
|
|
619
|
+
margin: ["marginTop", "marginRight", "marginBottom", "marginLeft"],
|
|
620
|
+
mask: ["maskImage", "maskMode", "maskRepeat", "maskPosition", "maskClip", "maskOrigin", "maskSize", "maskComposite"],
|
|
621
|
+
maskBorder: [
|
|
622
|
+
"maskBorderSource",
|
|
623
|
+
"maskBorderMode",
|
|
624
|
+
"maskBorderSlice",
|
|
625
|
+
"maskBorderWidth",
|
|
626
|
+
"maskBorderOutset",
|
|
627
|
+
"maskBorderRepeat"
|
|
628
|
+
],
|
|
629
|
+
offset: ["offsetPosition", "offsetPath", "offsetDistance", "offsetRotate", "offsetAnchor"],
|
|
630
|
+
outline: ["outlineWidth", "outlineStyle", "outlineColor"],
|
|
631
|
+
overflow: ["overflowX", "overflowY"],
|
|
632
|
+
padding: ["paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
|
|
633
|
+
pause: ["pauseBefore", "pauseAfter"],
|
|
634
|
+
placeContent: ["alignContent", "justifyContent"],
|
|
635
|
+
placeItems: ["alignItems", "justifyItems"],
|
|
636
|
+
placeSelf: ["alignSelf", "justifySelf"],
|
|
637
|
+
rest: ["restBefore", "restAfter"],
|
|
638
|
+
scrollMargin: ["scrollMarginTop", "scrollMarginRight", "scrollMarginBottom", "scrollMarginLeft"],
|
|
639
|
+
scrollPadding: ["scrollPaddingTop", "scrollPaddingRight", "scrollPaddingBottom", "scrollPaddingLeft"],
|
|
640
|
+
scrollPaddingBlock: ["scrollPaddingBlockStart", "scrollPaddingBlockEnd"],
|
|
641
|
+
scrollPaddingInline: ["scrollPaddingInlineStart", "scrollPaddingInlineEnd"],
|
|
642
|
+
scrollSnapMargin: ["scrollSnapMarginTop", "scrollSnapMarginRight", "scrollSnapMarginBottom", "scrollSnapMarginLeft"],
|
|
643
|
+
scrollSnapMarginBlock: ["scrollSnapMarginBlockStart", "scrollSnapMarginBlockEnd"],
|
|
644
|
+
scrollSnapMarginInline: ["scrollSnapMarginInlineStart", "scrollSnapMarginInlineEnd"],
|
|
645
|
+
scrollTimeline: ["scrollTimelineSource", "scrollTimelineOrientation"],
|
|
646
|
+
textDecoration: ["textDecorationLine", "textDecorationStyle", "textDecorationColor"],
|
|
647
|
+
textEmphasis: ["textEmphasisStyle", "textEmphasisColor"],
|
|
648
|
+
transition: ["transitionProperty", "transitionDuration", "transitionTimingFunction", "transitionDelay"]
|
|
649
|
+
};
|
|
650
|
+
var longhands = Object.values(shorthandProperties).reduce((a, b) => [...a, ...b], []);
|
|
651
|
+
function getPropertyPriority(property) {
|
|
652
|
+
return longhands.includes(property) ? 2 : 1;
|
|
653
|
+
}
|
|
654
|
+
|
|
537
655
|
// src/slot.ts
|
|
538
656
|
var getSlotRecipes = (recipe = {}) => {
|
|
539
657
|
const init = (slot) => ({
|
|
@@ -694,6 +812,7 @@ export {
|
|
|
694
812
|
getNegativePath,
|
|
695
813
|
getOrCreateSet,
|
|
696
814
|
getPatternStyles,
|
|
815
|
+
getPropertyPriority,
|
|
697
816
|
getSlotCompoundVariant,
|
|
698
817
|
getSlotRecipes,
|
|
699
818
|
getUnit,
|
|
@@ -29,7 +29,7 @@ interface CreateCssContext {
|
|
|
29
29
|
finalize: (paths: string[]) => string[];
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
declare function createCss(context: CreateCssContext): (
|
|
32
|
+
declare function createCss(context: CreateCssContext): ({ base, ...styles }?: Record<string, any>) => string;
|
|
33
33
|
interface StyleObject {
|
|
34
34
|
[key: string]: any;
|
|
35
35
|
}
|
|
@@ -29,7 +29,7 @@ interface CreateCssContext {
|
|
|
29
29
|
finalize: (paths: string[]) => string[];
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
|
-
declare function createCss(context: CreateCssContext): (
|
|
32
|
+
declare function createCss(context: CreateCssContext): ({ base, ...styles }?: Record<string, any>) => string;
|
|
33
33
|
interface StyleObject {
|
|
34
34
|
[key: string]: any;
|
|
35
35
|
}
|
package/dist/shared.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-
|
|
1
|
+
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-4wnn7ulW.mjs';
|
package/dist/shared.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-
|
|
1
|
+
export { f as compact, d as createCss, e as createMergeCss, h as filterBaseConditions, q as getPatternStyles, s as getSlotCompoundVariant, r as getSlotRecipes, l as hypenateProperty, g as isBaseCondition, c as isObject, z as mapObject, n as memo, o as mergeProps, p as patternFns, u as splitProps, t as toHash, v as uniq, y as walkObject, k as withoutSpace } from './shared-4wnn7ulW.js';
|
package/dist/shared.js
CHANGED
|
@@ -201,7 +201,8 @@ function createCss(context) {
|
|
|
201
201
|
}
|
|
202
202
|
return result;
|
|
203
203
|
};
|
|
204
|
-
return memo((
|
|
204
|
+
return memo(({ base, ...styles } = {}) => {
|
|
205
|
+
const styleObject = Object.assign(styles, base);
|
|
205
206
|
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
206
207
|
const classNames = /* @__PURE__ */ new Set();
|
|
207
208
|
walkObject(normalizedObject, (value, paths) => {
|
package/dist/shared.mjs
CHANGED
|
@@ -157,7 +157,8 @@ function createCss(context) {
|
|
|
157
157
|
}
|
|
158
158
|
return result;
|
|
159
159
|
};
|
|
160
|
-
return memo((
|
|
160
|
+
return memo(({ base, ...styles } = {}) => {
|
|
161
|
+
const styleObject = Object.assign(styles, base);
|
|
161
162
|
const normalizedObject = normalizeStyleObject(styleObject, context);
|
|
162
163
|
const classNames = /* @__PURE__ */ new Set();
|
|
163
164
|
walkObject(normalizedObject, (value, paths) => {
|