@pallas-ui/style-context 0.1.0 → 0.1.1

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.
Files changed (49) hide show
  1. package/dist/index.js +26 -22
  2. package/dist/index.mjs +26 -22
  3. package/package.json +4 -4
  4. package/styled-system/css/conditions.mjs +1 -1
  5. package/styled-system/css/css.mjs +1 -1
  6. package/styled-system/css/sva.mjs +9 -4
  7. package/styled-system/helpers.mjs +12 -20
  8. package/styled-system/jsx/create-style-context.d.ts +54 -0
  9. package/styled-system/jsx/create-style-context.mjs +118 -0
  10. package/styled-system/jsx/factory.mjs +14 -5
  11. package/styled-system/jsx/index.d.ts +1 -0
  12. package/styled-system/jsx/index.mjs +1 -0
  13. package/styled-system/jsx/is-valid-prop.mjs +2 -2
  14. package/styled-system/patterns/aspect-ratio.d.ts +0 -1
  15. package/styled-system/patterns/bleed.d.ts +0 -1
  16. package/styled-system/patterns/box.d.ts +0 -1
  17. package/styled-system/patterns/center.d.ts +0 -1
  18. package/styled-system/patterns/circle.d.ts +0 -1
  19. package/styled-system/patterns/container.d.ts +0 -1
  20. package/styled-system/patterns/cq.d.ts +0 -1
  21. package/styled-system/patterns/divider.d.ts +0 -1
  22. package/styled-system/patterns/flex.d.ts +0 -1
  23. package/styled-system/patterns/float.d.ts +0 -1
  24. package/styled-system/patterns/grid-item.d.ts +0 -1
  25. package/styled-system/patterns/grid.d.ts +0 -1
  26. package/styled-system/patterns/grid.mjs +1 -1
  27. package/styled-system/patterns/hstack.d.ts +0 -1
  28. package/styled-system/patterns/hstack.mjs +1 -1
  29. package/styled-system/patterns/link-overlay.d.ts +0 -1
  30. package/styled-system/patterns/spacer.d.ts +0 -1
  31. package/styled-system/patterns/spacer.mjs +6 -2
  32. package/styled-system/patterns/square.d.ts +0 -1
  33. package/styled-system/patterns/stack.d.ts +0 -1
  34. package/styled-system/patterns/stack.mjs +1 -1
  35. package/styled-system/patterns/visually-hidden.d.ts +0 -1
  36. package/styled-system/patterns/vstack.d.ts +0 -1
  37. package/styled-system/patterns/vstack.mjs +1 -1
  38. package/styled-system/patterns/wrap.d.ts +0 -1
  39. package/styled-system/patterns/wrap.mjs +1 -1
  40. package/styled-system/tokens/index.mjs +43 -7
  41. package/styled-system/tokens/tokens.d.ts +5 -5
  42. package/styled-system/types/composition.d.ts +86 -23
  43. package/styled-system/types/conditions.d.ts +49 -13
  44. package/styled-system/types/csstype.d.ts +6405 -5133
  45. package/styled-system/types/jsx.d.ts +27 -10
  46. package/styled-system/types/pattern.d.ts +4 -4
  47. package/styled-system/types/prop-type.d.ts +11 -1
  48. package/styled-system/types/style-props.d.ts +2851 -2230
  49. package/styled-system/types/system-types.d.ts +44 -2
@@ -22,14 +22,12 @@ function toChar(code) {
22
22
  function toName(code) {
23
23
  let name = "";
24
24
  let x;
25
- for (x = Math.abs(code); x > 52; x = x / 52 | 0)
26
- name = toChar(x % 52) + name;
25
+ for (x = Math.abs(code); x > 52; x = x / 52 | 0) name = toChar(x % 52) + name;
27
26
  return toChar(x % 52) + name;
28
27
  }
29
28
  function toPhash(h, x) {
30
29
  let i = x.length;
31
- while (i)
32
- h = h * 33 ^ x.charCodeAt(--i);
30
+ while (i) h = h * 33 ^ x.charCodeAt(--i);
33
31
  return h;
34
32
  }
35
33
  function toHash(value) {
@@ -64,11 +62,12 @@ var memo = (fn) => {
64
62
  };
65
63
 
66
64
  // src/merge-props.ts
65
+ var MERGE_OMIT = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
67
66
  function mergeProps(...sources) {
68
67
  return sources.reduce((prev, obj) => {
69
- if (!obj)
70
- return prev;
68
+ if (!obj) return prev;
71
69
  Object.keys(obj).forEach((key) => {
70
+ if (MERGE_OMIT.has(key)) return;
72
71
  const prevValue = prev[key];
73
72
  const value = obj[key];
74
73
  if (isObject(prevValue) && isObject(value)) {
@@ -106,10 +105,8 @@ function walkObject(target, predicate, options = {}) {
106
105
  return inner(target);
107
106
  }
108
107
  function mapObject(obj, fn) {
109
- if (Array.isArray(obj))
110
- return obj.map((value) => fn(value));
111
- if (!isObject(obj))
112
- return fn(obj);
108
+ if (Array.isArray(obj)) return obj.map((value) => fn(value));
109
+ if (!isObject(obj)) return fn(obj);
113
110
  return walkObject(obj, (value) => fn(value));
114
111
  }
115
112
 
@@ -167,15 +164,13 @@ function createCss(context) {
167
164
  const normalizedObject = normalizeStyleObject(styleObject, context);
168
165
  const classNames = /* @__PURE__ */ new Set();
169
166
  walkObject(normalizedObject, (value, paths) => {
170
- if (value == null)
171
- return;
167
+ if (value == null) return;
172
168
  const important = isImportant(value);
173
169
  const [prop, ...allConditions] = conds.shift(paths);
174
170
  const conditions = filterBaseConditions(allConditions);
175
171
  const transformed = utility.transform(prop, withoutImportant(sanitize(value)));
176
172
  let className = hashFn(conditions, transformed.className);
177
- if (important)
178
- className = `${className}!`;
173
+ if (important) className = `${className}!`;
179
174
  classNames.add(className);
180
175
  });
181
176
  return Array.from(classNames).join(" ");
@@ -187,8 +182,7 @@ function compactStyles(...styles) {
187
182
  function createMergeCss(context) {
188
183
  function resolve(styles) {
189
184
  const allStyles = compactStyles(...styles);
190
- if (allStyles.length === 1)
191
- return allStyles;
185
+ if (allStyles.length === 1) return allStyles;
192
186
  return allStyles.map((style) => normalizeStyleObject(style, context));
193
187
  }
194
188
  function mergeCss(...styles) {
@@ -204,8 +198,7 @@ function createMergeCss(context) {
204
198
  var wordRegex = /([A-Z])/g;
205
199
  var msRegex = /^ms-/;
206
200
  var hypenateProperty = memo((property) => {
207
- if (property.startsWith("--"))
208
- return property;
201
+ if (property.startsWith("--")) return property;
209
202
  return property.replace(wordRegex, "-$1").replace(msRegex, "-ms-").toLowerCase();
210
203
  });
211
204
 
@@ -231,8 +224,7 @@ var patternFns = {
231
224
  isCssUnit
232
225
  };
233
226
  var getPatternStyles = (pattern, styles) => {
234
- if (!pattern?.defaultValues)
235
- return styles;
227
+ if (!pattern?.defaultValues) return styles;
236
228
  const defaults = typeof pattern.defaultValues === "function" ? pattern.defaultValues(styles) : pattern.defaultValues;
237
229
  return Object.assign({}, defaults, compact(styles));
238
230
  };
@@ -0,0 +1,54 @@
1
+ /* eslint-disable */
2
+ import type { SlotRecipeRuntimeFn, RecipeVariantProps } from '../types/recipe';
3
+ import type { JsxHTMLProps, JsxStyleProps, Assign } from '../types/system-types';
4
+ import type { JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx';
5
+ import type { ComponentType, ElementType } from 'react'
6
+
7
+ interface UnstyledProps {
8
+ unstyled?: boolean | undefined
9
+ }
10
+
11
+ type SvaFn<S extends string = any> = SlotRecipeRuntimeFn<S, any>
12
+ interface SlotRecipeFn {
13
+ __type: any
14
+ __slot: string
15
+ (props?: any): any
16
+ }
17
+ type SlotRecipe = SvaFn | SlotRecipeFn
18
+
19
+ type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
20
+
21
+ interface WithProviderOptions<P = {}> {
22
+ defaultProps?: (Partial<P> & DataAttrs) | undefined
23
+ }
24
+
25
+ type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
26
+ JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
27
+ >
28
+
29
+ type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
30
+ ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
31
+ >
32
+
33
+ type StyleContextConsumer<T extends ElementType> = ComponentType<
34
+ JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
35
+ >
36
+
37
+ export interface StyleContext<R extends SlotRecipe> {
38
+ withRootProvider: <T extends ElementType>(
39
+ Component: T,
40
+ options?: WithProviderOptions<ComponentProps<T>> | undefined
41
+ ) => StyleContextRootProvider<T, R>
42
+ withProvider: <T extends ElementType>(
43
+ Component: T,
44
+ slot: InferSlot<R>,
45
+ options?: JsxFactoryOptions<ComponentProps<T>> | undefined
46
+ ) => StyleContextProvider<T, R>
47
+ withContext: <T extends ElementType>(
48
+ Component: T,
49
+ slot: InferSlot<R>,
50
+ options?: JsxFactoryOptions<ComponentProps<T>> | undefined
51
+ ) => StyleContextConsumer<T>
52
+ }
53
+
54
+ export declare function createStyleContext<R extends SlotRecipe>(recipe: R): StyleContext<R>
@@ -0,0 +1,118 @@
1
+ 'use client'
2
+
3
+ import { cx, css, sva } from '../css/index.mjs';
4
+ import { styled } from './factory.mjs';
5
+ import { getDisplayName } from './factory-helper.mjs';
6
+ import { createContext, useContext, createElement, forwardRef } from 'react'
7
+
8
+ function createSafeContext(contextName) {
9
+ const Context = createContext(undefined)
10
+ const useStyleContext = (componentName, slot) => {
11
+ const context = useContext(Context)
12
+ if (context === undefined) {
13
+ const componentInfo = componentName ? `Component "${componentName}"` : 'A component'
14
+ const slotInfo = slot ? ` (slot: "${slot}")` : ''
15
+
16
+ throw new Error(
17
+ `${componentInfo}${slotInfo} cannot access ${contextName} because it's missing its Provider.`
18
+ )
19
+ }
20
+ return context
21
+ }
22
+ return [Context, useStyleContext]
23
+ }
24
+
25
+ export function createStyleContext(recipe) {
26
+ const isConfigRecipe = '__recipe__' in recipe
27
+ const recipeName = isConfigRecipe && recipe.__name__ ? recipe.__name__ : undefined
28
+ const contextName = recipeName ? `createStyleContext("${recipeName}")` : 'createStyleContext'
29
+
30
+ const [StyleContext, useStyleContext] = createSafeContext(contextName)
31
+ const svaFn = isConfigRecipe ? recipe : sva(recipe.config)
32
+
33
+ const getResolvedProps = (props, slotStyles) => {
34
+ const { unstyled, ...restProps } = props
35
+ if (unstyled) return restProps
36
+ if (isConfigRecipe) {
37
+ return { ...restProps, className: cx(slotStyles, restProps.className) }
38
+ }
39
+ return { ...slotStyles, ...restProps }
40
+ }
41
+
42
+ const withRootProvider = (Component, options) => {
43
+ const WithRootProvider = (props) => {
44
+ const [variantProps, otherProps] = svaFn.splitVariantProps(props)
45
+
46
+ const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
47
+ slotStyles._classNameMap = svaFn.classNameMap
48
+
49
+ const mergedProps = options?.defaultProps
50
+ ? { ...options.defaultProps, ...otherProps }
51
+ : otherProps
52
+
53
+ return createElement(StyleContext.Provider, {
54
+ value: slotStyles,
55
+ children: createElement(Component, mergedProps)
56
+ })
57
+ }
58
+
59
+ const componentName = getDisplayName(Component)
60
+ WithRootProvider.displayName = `withRootProvider(${componentName})`
61
+
62
+ return WithRootProvider
63
+ }
64
+
65
+ const withProvider = (Component, slot, options) => {
66
+ const StyledComponent = styled(Component, {}, options)
67
+
68
+ const WithProvider = forwardRef((props, ref) => {
69
+ const [variantProps, restProps] = svaFn.splitVariantProps(props)
70
+
71
+ const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
72
+ slotStyles._classNameMap = svaFn.classNameMap
73
+
74
+ const propsWithClass = { ...restProps, className: restProps.className ?? options?.defaultProps?.className }
75
+ const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
76
+ return createElement(StyleContext.Provider, {
77
+ value: slotStyles,
78
+ children: createElement(StyledComponent, {
79
+ ...resolvedProps,
80
+ className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
81
+ ref,
82
+ })
83
+ })
84
+ })
85
+
86
+ const componentName = getDisplayName(Component)
87
+ WithProvider.displayName = `withProvider(${componentName})`
88
+
89
+ return WithProvider
90
+ }
91
+
92
+ const withContext = (Component, slot, options) => {
93
+ const StyledComponent = styled(Component, {}, options)
94
+ const componentName = getDisplayName(Component)
95
+
96
+ const WithContext = forwardRef((props, ref) => {
97
+ const slotStyles = useStyleContext(componentName, slot)
98
+
99
+ const propsWithClass = { ...props, className: props.className ?? options?.defaultProps?.className }
100
+ const resolvedProps = getResolvedProps(propsWithClass, slotStyles[slot])
101
+ return createElement(StyledComponent, {
102
+ ...resolvedProps,
103
+ className: cx(resolvedProps.className, slotStyles._classNameMap[slot]),
104
+ ref,
105
+ })
106
+ })
107
+
108
+ WithContext.displayName = `withContext(${componentName})`
109
+
110
+ return WithContext
111
+ }
112
+
113
+ return {
114
+ withRootProvider,
115
+ withProvider,
116
+ withContext,
117
+ }
118
+ }
@@ -8,8 +8,11 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
8
8
  const cvaFn = configOrCva.__cva__ || configOrCva.__recipe__ ? configOrCva : cva(configOrCva)
9
9
 
10
10
  const forwardFn = options.shouldForwardProp || defaultShouldForwardProp
11
- const shouldForwardProp = (prop) => forwardFn(prop, cvaFn.variantKeys)
12
-
11
+ const shouldForwardProp = (prop) => {
12
+ if (options.forwardProps?.includes(prop)) return true
13
+ return forwardFn(prop, cvaFn.variantKeys)
14
+ }
15
+
13
16
  const defaultProps = Object.assign(
14
17
  options.dataAttr && configOrCva.__name__ ? { 'data-recipe': configOrCva.__name__ } : {},
15
18
  options.defaultProps,
@@ -20,7 +23,7 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
20
23
  const __base__ = Dynamic.__base__ || Dynamic
21
24
 
22
25
  const StyledComponent = /* @__PURE__ */ forwardRef(function StyledComponent(props, ref) {
23
- const { as: Element = __base__, children, ...restProps } = props
26
+ const { as: Element = __base__, unstyled, children, ...restProps } = props
24
27
 
25
28
  const combinedProps = useMemo(() => Object.assign({}, defaultProps, restProps), [restProps])
26
29
 
@@ -40,7 +43,13 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
40
43
  return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className)
41
44
  }
42
45
 
43
- const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
46
+ const classes = () => {
47
+ if (unstyled) {
48
+ const { css: cssStyles, ...propStyles } = styleProps
49
+ return cx(css(propStyles, cssStyles), combinedProps.className)
50
+ }
51
+ return configOrCva.__recipe__ ? recipeClass() : cvaClass()
52
+ }
44
53
 
45
54
  return createElement(Element, {
46
55
  ref,
@@ -48,7 +57,7 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
48
57
  ...elementProps,
49
58
  ...normalizeHTMLProps(htmlProps),
50
59
  className: classes(),
51
- }, combinedProps.children ?? children)
60
+ }, children ?? combinedProps.children)
52
61
  })
53
62
 
54
63
  const name = getDisplayName(__base__)
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable */
2
2
  export * from './factory';
3
3
  export * from './is-valid-prop';
4
+ export * from './create-style-context';
4
5
  export * from './box';
5
6
  export * from './flex';
6
7
  export * from './stack';
@@ -1,5 +1,6 @@
1
1
  export * from './factory.mjs';
2
2
  export * from './is-valid-prop.mjs';
3
+ export * from './create-style-context.mjs';
3
4
  export * from './box.mjs';
4
5
  export * from './flex.mjs';
5
6
  export * from './stack.mjs';
@@ -1,9 +1,9 @@
1
1
  import { splitProps } from '../helpers.mjs';
2
2
  import { memo } from '../helpers.mjs';
3
3
  // src/index.ts
4
- var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_default,_optional,_open,_closed,_fullscreen,_loading,_currentPage,_currentStep,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_starting,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle"
4
+ var userGeneratedStr = "css,pos,insetX,insetY,insetEnd,end,insetStart,start,flexDir,p,pl,pr,pt,pb,py,paddingY,paddingX,px,pe,paddingEnd,ps,paddingStart,ml,mr,mt,mb,m,my,marginY,mx,marginX,me,marginEnd,ms,marginStart,ringWidth,ringColor,ring,ringOffset,w,minW,maxW,h,minH,maxH,textShadowColor,bgPosition,bgPositionX,bgPositionY,bgAttachment,bgClip,bg,bgColor,bgOrigin,bgImage,bgRepeat,bgBlendMode,bgSize,bgGradient,bgLinear,bgRadial,bgConic,rounded,roundedTopLeft,roundedTopRight,roundedBottomRight,roundedBottomLeft,roundedTop,roundedRight,roundedBottom,roundedLeft,roundedStartStart,roundedStartEnd,roundedStart,roundedEndStart,roundedEndEnd,roundedEnd,borderX,borderXWidth,borderXColor,borderY,borderYWidth,borderYColor,borderStart,borderStartWidth,borderStartColor,borderEnd,borderEndWidth,borderEndColor,shadow,shadowColor,x,y,z,scrollMarginY,scrollMarginX,scrollPaddingY,scrollPaddingX,aspectRatio,boxDecorationBreak,zIndex,boxSizing,objectPosition,objectFit,overscrollBehavior,overscrollBehaviorX,overscrollBehaviorY,position,top,left,inset,insetInline,insetBlock,insetBlockEnd,insetBlockStart,insetInlineEnd,insetInlineStart,right,bottom,float,visibility,display,hideFrom,hideBelow,flexBasis,flex,flexDirection,flexGrow,flexShrink,gridTemplateColumns,gridTemplateRows,gridColumn,gridRow,gridColumnStart,gridColumnEnd,gridAutoFlow,gridAutoColumns,gridAutoRows,gap,gridGap,gridRowGap,gridColumnGap,rowGap,columnGap,justifyContent,alignContent,alignItems,alignSelf,padding,paddingLeft,paddingRight,paddingTop,paddingBottom,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingInline,paddingInlineEnd,paddingInlineStart,marginLeft,marginRight,marginTop,marginBottom,margin,marginBlock,marginBlockEnd,marginBlockStart,marginInline,marginInlineEnd,marginInlineStart,spaceX,spaceY,outlineWidth,outlineColor,outline,outlineOffset,focusRing,focusVisibleRing,focusRingColor,focusRingOffset,focusRingWidth,focusRingStyle,divideX,divideY,divideColor,divideStyle,width,inlineSize,minWidth,minInlineSize,maxWidth,maxInlineSize,height,blockSize,minHeight,minBlockSize,maxHeight,maxBlockSize,boxSize,color,fontFamily,fontSize,fontSizeAdjust,fontPalette,fontKerning,fontFeatureSettings,fontWeight,fontSmoothing,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariationSettings,fontVariantNumeric,letterSpacing,lineHeight,textAlign,textDecoration,textDecorationColor,textEmphasisColor,textDecorationStyle,textDecorationThickness,textUnderlineOffset,textTransform,textIndent,textShadow,WebkitTextFillColor,textOverflow,verticalAlign,wordBreak,textWrap,truncate,lineClamp,listStyleType,listStylePosition,listStyleImage,listStyle,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundAttachment,backgroundClip,background,backgroundColor,backgroundOrigin,backgroundImage,backgroundRepeat,backgroundBlendMode,backgroundSize,backgroundGradient,backgroundLinear,backgroundRadial,backgroundConic,textGradient,gradientFromPosition,gradientToPosition,gradientFrom,gradientTo,gradientVia,gradientViaPosition,borderRadius,borderTopLeftRadius,borderTopRightRadius,borderBottomRightRadius,borderBottomLeftRadius,borderTopRadius,borderRightRadius,borderBottomRadius,borderLeftRadius,borderStartStartRadius,borderStartEndRadius,borderStartRadius,borderEndStartRadius,borderEndEndRadius,borderEndRadius,border,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,borderBlockStartWidth,borderBlockEndWidth,borderColor,borderInline,borderInlineWidth,borderInlineColor,borderBlock,borderBlockWidth,borderBlockColor,borderLeft,borderLeftColor,borderInlineStart,borderInlineStartWidth,borderInlineStartColor,borderRight,borderRightColor,borderInlineEnd,borderInlineEndWidth,borderInlineEndColor,borderTop,borderTopColor,borderBottom,borderBottomColor,borderBlockEnd,borderBlockEndColor,borderBlockStart,borderBlockStartColor,opacity,boxShadow,boxShadowColor,mixBlendMode,filter,brightness,contrast,grayscale,hueRotate,invert,saturate,sepia,dropShadow,blur,backdropFilter,backdropBlur,backdropBrightness,backdropContrast,backdropGrayscale,backdropHueRotate,backdropInvert,backdropOpacity,backdropSaturate,backdropSepia,borderCollapse,borderSpacing,borderSpacingX,borderSpacingY,tableLayout,transitionTimingFunction,transitionDelay,transitionDuration,transitionProperty,transition,animation,animationName,animationTimingFunction,animationDuration,animationDelay,animationPlayState,animationComposition,animationFillMode,animationDirection,animationIterationCount,animationRange,animationState,animationRangeStart,animationRangeEnd,animationTimeline,transformOrigin,transformBox,transformStyle,transform,rotate,rotateX,rotateY,rotateZ,scale,scaleX,scaleY,translate,translateX,translateY,translateZ,accentColor,caretColor,scrollBehavior,scrollbar,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollMargin,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollMarginBottom,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollPaddingBottom,scrollSnapAlign,scrollSnapStop,scrollSnapType,scrollSnapStrictness,scrollSnapMargin,scrollSnapMarginTop,scrollSnapMarginBottom,scrollSnapMarginLeft,scrollSnapMarginRight,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,touchAction,userSelect,overflow,overflowWrap,overflowX,overflowY,overflowAnchor,overflowBlock,overflowInline,overflowClipBox,overflowClipMargin,overscrollBehaviorBlock,overscrollBehaviorInline,fill,stroke,strokeWidth,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,srOnly,debug,appearance,backfaceVisibility,clipPath,hyphens,mask,maskImage,maskSize,textSizeAdjust,container,containerName,containerType,cursor,colorPalette,_hover,_focus,_focusWithin,_focusVisible,_disabled,_active,_visited,_target,_readOnly,_readWrite,_empty,_checked,_enabled,_expanded,_highlighted,_complete,_incomplete,_dragging,_before,_after,_firstLetter,_firstLine,_marker,_selection,_file,_backdrop,_first,_last,_only,_even,_odd,_firstOfType,_lastOfType,_onlyOfType,_peerFocus,_peerHover,_peerActive,_peerFocusWithin,_peerFocusVisible,_peerDisabled,_peerChecked,_peerInvalid,_peerExpanded,_peerPlaceholderShown,_groupFocus,_groupHover,_groupActive,_groupFocusWithin,_groupFocusVisible,_groupDisabled,_groupChecked,_groupExpanded,_groupInvalid,_indeterminate,_required,_valid,_invalid,_autofill,_inRange,_outOfRange,_placeholder,_placeholderShown,_pressed,_selected,_grabbed,_underValue,_overValue,_atValue,_default,_optional,_open,_closed,_fullscreen,_loading,_hidden,_current,_currentPage,_currentStep,_today,_unavailable,_rangeStart,_rangeEnd,_now,_topmost,_motionReduce,_motionSafe,_print,_landscape,_portrait,_dark,_light,_osDark,_osLight,_highContrast,_lessContrast,_moreContrast,_ltr,_rtl,_scrollbar,_scrollbarThumb,_scrollbarTrack,_horizontal,_vertical,_icon,_starting,_noscript,_invertedColors,sm,smOnly,smDown,md,mdOnly,mdDown,lg,lgOnly,lgDown,xl,xlOnly,xlDown,2xl,2xlOnly,2xlDown,smToMd,smToLg,smToXl,smTo2xl,mdToLg,mdToXl,mdTo2xl,lgToXl,lgTo2xl,xlTo2xl,@/xs,@/sm,@/md,@/lg,@/xl,@/2xl,@/3xl,@/4xl,@/5xl,@/6xl,@/7xl,@/8xl,textStyle"
5
5
  var userGenerated = userGeneratedStr.split(",");
6
- var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimingFunction,animationTimeline,appearance,aspectRatio,azimuth,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockStyle,borderBlockWidth,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineEnd,borderInlineColor,borderInlineStyle,borderInlineWidth,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,color,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicSize,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,counterIncrement,counterReset,counterSet,cursor,direction,display,emptyCells,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontVariationSettings,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inputSecurity,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,printColorAdjust,quotes,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,scale,scrollbarColor,scrollbarGutter,scrollbarWidth,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockStart,scrollMarginBlockEnd,scrollMarginBottom,scrollMarginInline,scrollMarginInlineStart,scrollMarginInlineEnd,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockStart,scrollPaddingBlockEnd,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineStart,scrollPaddingInlineEnd,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,shapeImageThreshold,shapeMargin,shapeOutside,tabSize,tableLayout,textAlign,textAlignLast,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,zIndex,zoom,alignmentBaseline,baselineShift,clipRule,colorInterpolation,colorRendering,dominantBaseline,fill,fillOpacity,fillRule,floodColor,floodOpacity,glyphOrientationVertical,lightingColor,marker,markerEnd,markerMid,markerStart,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,textAnchor,vectorEffect";
6
+ var cssPropertiesStr = "WebkitAppearance,WebkitBorderBefore,WebkitBorderBeforeColor,WebkitBorderBeforeStyle,WebkitBorderBeforeWidth,WebkitBoxReflect,WebkitLineClamp,WebkitMask,WebkitMaskAttachment,WebkitMaskClip,WebkitMaskComposite,WebkitMaskImage,WebkitMaskOrigin,WebkitMaskPosition,WebkitMaskPositionX,WebkitMaskPositionY,WebkitMaskRepeat,WebkitMaskRepeatX,WebkitMaskRepeatY,WebkitMaskSize,WebkitOverflowScrolling,WebkitTapHighlightColor,WebkitTextFillColor,WebkitTextStroke,WebkitTextStrokeColor,WebkitTextStrokeWidth,WebkitTouchCallout,WebkitUserModify,WebkitUserSelect,accentColor,alignContent,alignItems,alignSelf,alignTracks,all,anchorName,anchorScope,animation,animationComposition,animationDelay,animationDirection,animationDuration,animationFillMode,animationIterationCount,animationName,animationPlayState,animationRange,animationRangeEnd,animationRangeStart,animationTimeline,animationTimingFunction,appearance,aspectRatio,backdropFilter,backfaceVisibility,background,backgroundAttachment,backgroundBlendMode,backgroundClip,backgroundColor,backgroundImage,backgroundOrigin,backgroundPosition,backgroundPositionX,backgroundPositionY,backgroundRepeat,backgroundSize,blockSize,border,borderBlock,borderBlockColor,borderBlockEnd,borderBlockEndColor,borderBlockEndStyle,borderBlockEndWidth,borderBlockStart,borderBlockStartColor,borderBlockStartStyle,borderBlockStartWidth,borderBlockStyle,borderBlockWidth,borderBottom,borderBottomColor,borderBottomLeftRadius,borderBottomRightRadius,borderBottomStyle,borderBottomWidth,borderCollapse,borderColor,borderEndEndRadius,borderEndStartRadius,borderImage,borderImageOutset,borderImageRepeat,borderImageSlice,borderImageSource,borderImageWidth,borderInline,borderInlineColor,borderInlineEnd,borderInlineEndColor,borderInlineEndStyle,borderInlineEndWidth,borderInlineStart,borderInlineStartColor,borderInlineStartStyle,borderInlineStartWidth,borderInlineStyle,borderInlineWidth,borderLeft,borderLeftColor,borderLeftStyle,borderLeftWidth,borderRadius,borderRight,borderRightColor,borderRightStyle,borderRightWidth,borderSpacing,borderStartEndRadius,borderStartStartRadius,borderStyle,borderTop,borderTopColor,borderTopLeftRadius,borderTopRightRadius,borderTopStyle,borderTopWidth,borderWidth,bottom,boxAlign,boxDecorationBreak,boxDirection,boxFlex,boxFlexGroup,boxLines,boxOrdinalGroup,boxOrient,boxPack,boxShadow,boxSizing,breakAfter,breakBefore,breakInside,captionSide,caret,caretColor,caretShape,clear,clip,clipPath,clipRule,color,colorInterpolationFilters,colorScheme,columnCount,columnFill,columnGap,columnRule,columnRuleColor,columnRuleStyle,columnRuleWidth,columnSpan,columnWidth,columns,contain,containIntrinsicBlockSize,containIntrinsicHeight,containIntrinsicInlineSize,containIntrinsicSize,containIntrinsicWidth,container,containerName,containerType,content,contentVisibility,cornerShape,counterIncrement,counterReset,counterSet,cursor,cx,cy,d,direction,display,dominantBaseline,emptyCells,fieldSizing,fill,fillOpacity,fillRule,filter,flex,flexBasis,flexDirection,flexFlow,flexGrow,flexShrink,flexWrap,float,floodColor,floodOpacity,font,fontFamily,fontFeatureSettings,fontKerning,fontLanguageOverride,fontOpticalSizing,fontPalette,fontSize,fontSizeAdjust,fontSmooth,fontStretch,fontStyle,fontSynthesis,fontSynthesisPosition,fontSynthesisSmallCaps,fontSynthesisStyle,fontSynthesisWeight,fontVariant,fontVariantAlternates,fontVariantCaps,fontVariantEastAsian,fontVariantEmoji,fontVariantLigatures,fontVariantNumeric,fontVariantPosition,fontVariationSettings,fontWeight,forcedColorAdjust,gap,grid,gridArea,gridAutoColumns,gridAutoFlow,gridAutoRows,gridColumn,gridColumnEnd,gridColumnGap,gridColumnStart,gridGap,gridRow,gridRowEnd,gridRowGap,gridRowStart,gridTemplate,gridTemplateAreas,gridTemplateColumns,gridTemplateRows,hangingPunctuation,height,hyphenateCharacter,hyphenateLimitChars,hyphens,imageOrientation,imageRendering,imageResolution,imeMode,initialLetter,initialLetterAlign,inlineSize,inset,insetBlock,insetBlockEnd,insetBlockStart,insetInline,insetInlineEnd,insetInlineStart,interpolateSize,isolation,justifyContent,justifyItems,justifySelf,justifyTracks,left,letterSpacing,lightingColor,lineBreak,lineClamp,lineHeight,lineHeightStep,listStyle,listStyleImage,listStylePosition,listStyleType,margin,marginBlock,marginBlockEnd,marginBlockStart,marginBottom,marginInline,marginInlineEnd,marginInlineStart,marginLeft,marginRight,marginTop,marginTrim,marker,markerEnd,markerMid,markerStart,mask,maskBorder,maskBorderMode,maskBorderOutset,maskBorderRepeat,maskBorderSlice,maskBorderSource,maskBorderWidth,maskClip,maskComposite,maskImage,maskMode,maskOrigin,maskPosition,maskRepeat,maskSize,maskType,masonryAutoFlow,mathDepth,mathShift,mathStyle,maxBlockSize,maxHeight,maxInlineSize,maxLines,maxWidth,minBlockSize,minHeight,minInlineSize,minWidth,mixBlendMode,objectFit,objectPosition,offset,offsetAnchor,offsetDistance,offsetPath,offsetPosition,offsetRotate,opacity,order,orphans,outline,outlineColor,outlineOffset,outlineStyle,outlineWidth,overflow,overflowAnchor,overflowBlock,overflowClipBox,overflowClipMargin,overflowInline,overflowWrap,overflowX,overflowY,overlay,overscrollBehavior,overscrollBehaviorBlock,overscrollBehaviorInline,overscrollBehaviorX,overscrollBehaviorY,padding,paddingBlock,paddingBlockEnd,paddingBlockStart,paddingBottom,paddingInline,paddingInlineEnd,paddingInlineStart,paddingLeft,paddingRight,paddingTop,page,pageBreakAfter,pageBreakBefore,pageBreakInside,paintOrder,perspective,perspectiveOrigin,placeContent,placeItems,placeSelf,pointerEvents,position,positionAnchor,positionArea,positionTry,positionTryFallbacks,positionTryOrder,positionVisibility,printColorAdjust,quotes,r,resize,right,rotate,rowGap,rubyAlign,rubyMerge,rubyPosition,rx,ry,scale,scrollBehavior,scrollMargin,scrollMarginBlock,scrollMarginBlockEnd,scrollMarginBlockStart,scrollMarginBottom,scrollMarginInline,scrollMarginInlineEnd,scrollMarginInlineStart,scrollMarginLeft,scrollMarginRight,scrollMarginTop,scrollPadding,scrollPaddingBlock,scrollPaddingBlockEnd,scrollPaddingBlockStart,scrollPaddingBottom,scrollPaddingInline,scrollPaddingInlineEnd,scrollPaddingInlineStart,scrollPaddingLeft,scrollPaddingRight,scrollPaddingTop,scrollSnapAlign,scrollSnapCoordinate,scrollSnapDestination,scrollSnapPointsX,scrollSnapPointsY,scrollSnapStop,scrollSnapType,scrollSnapTypeX,scrollSnapTypeY,scrollTimeline,scrollTimelineAxis,scrollTimelineName,scrollbarColor,scrollbarGutter,scrollbarWidth,shapeImageThreshold,shapeMargin,shapeOutside,shapeRendering,stopColor,stopOpacity,stroke,strokeDasharray,strokeDashoffset,strokeLinecap,strokeLinejoin,strokeMiterlimit,strokeOpacity,strokeWidth,tabSize,tableLayout,textAlign,textAlignLast,textAnchor,textBox,textBoxEdge,textBoxTrim,textCombineUpright,textDecoration,textDecorationColor,textDecorationLine,textDecorationSkip,textDecorationSkipInk,textDecorationStyle,textDecorationThickness,textEmphasis,textEmphasisColor,textEmphasisPosition,textEmphasisStyle,textIndent,textJustify,textOrientation,textOverflow,textRendering,textShadow,textSizeAdjust,textSpacingTrim,textTransform,textUnderlineOffset,textUnderlinePosition,textWrap,textWrapMode,textWrapStyle,timelineScope,top,touchAction,transform,transformBox,transformOrigin,transformStyle,transition,transitionBehavior,transitionDelay,transitionDuration,transitionProperty,transitionTimingFunction,translate,unicodeBidi,userSelect,vectorEffect,verticalAlign,viewTimeline,viewTimelineAxis,viewTimelineInset,viewTimelineName,viewTransitionName,visibility,whiteSpace,whiteSpaceCollapse,widows,width,willChange,wordBreak,wordSpacing,wordWrap,writingMode,x,y,zIndex,zoom,alignmentBaseline,baselineShift,colorInterpolation,colorRendering,glyphOrientationVertical";
7
7
  var allCssProperties = cssPropertiesStr.split(",").concat(userGenerated);
8
8
  var properties = new Map(allCssProperties.map((prop) => [prop, true]));
9
9
  var cssPropertySelectorRegex = /&|@/;
@@ -9,7 +9,6 @@ export interface AspectRatioProperties {
9
9
  ratio?: ConditionalValue<number>
10
10
  }
11
11
 
12
-
13
12
  interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
14
13
 
15
14
  interface AspectRatioPatternFn {
@@ -10,7 +10,6 @@ export interface BleedProperties {
10
10
  block?: SystemProperties["marginBlock"]
11
11
  }
12
12
 
13
-
14
13
  interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
15
14
 
16
15
  interface BleedPatternFn {
@@ -9,7 +9,6 @@ export interface BoxProperties {
9
9
 
10
10
  }
11
11
 
12
-
13
12
  interface BoxStyles extends BoxProperties, DistributiveOmit<SystemStyleObject, keyof BoxProperties > {}
14
13
 
15
14
  interface BoxPatternFn {
@@ -9,7 +9,6 @@ export interface CenterProperties {
9
9
  inline?: ConditionalValue<boolean>
10
10
  }
11
11
 
12
-
13
12
  interface CenterStyles extends CenterProperties, DistributiveOmit<SystemStyleObject, keyof CenterProperties > {}
14
13
 
15
14
  interface CenterPatternFn {
@@ -9,7 +9,6 @@ export interface CircleProperties {
9
9
  size?: SystemProperties["width"]
10
10
  }
11
11
 
12
-
13
12
  interface CircleStyles extends CircleProperties, DistributiveOmit<SystemStyleObject, keyof CircleProperties > {}
14
13
 
15
14
  interface CirclePatternFn {
@@ -9,7 +9,6 @@ export interface ContainerProperties {
9
9
 
10
10
  }
11
11
 
12
-
13
12
  interface ContainerStyles extends ContainerProperties, DistributiveOmit<SystemStyleObject, keyof ContainerProperties > {}
14
13
 
15
14
  interface ContainerPatternFn {
@@ -10,7 +10,6 @@ export interface CqProperties {
10
10
  type?: SystemProperties["containerType"]
11
11
  }
12
12
 
13
-
14
13
  interface CqStyles extends CqProperties, DistributiveOmit<SystemStyleObject, keyof CqProperties > {}
15
14
 
16
15
  interface CqPatternFn {
@@ -11,7 +11,6 @@ export interface DividerProperties {
11
11
  color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
12
12
  }
13
13
 
14
-
15
14
  interface DividerStyles extends DividerProperties, DistributiveOmit<SystemStyleObject, keyof DividerProperties > {}
16
15
 
17
16
  interface DividerPatternFn {
@@ -15,7 +15,6 @@ export interface FlexProperties {
15
15
  shrink?: SystemProperties["flexShrink"]
16
16
  }
17
17
 
18
-
19
18
  interface FlexStyles extends FlexProperties, DistributiveOmit<SystemStyleObject, keyof FlexProperties > {}
20
19
 
21
20
  interface FlexPatternFn {
@@ -12,7 +12,6 @@ export interface FloatProperties {
12
12
  placement?: ConditionalValue<"bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start">
13
13
  }
14
14
 
15
-
16
15
  interface FloatStyles extends FloatProperties, DistributiveOmit<SystemStyleObject, keyof FloatProperties > {}
17
16
 
18
17
  interface FloatPatternFn {
@@ -14,7 +14,6 @@ export interface GridItemProperties {
14
14
  rowEnd?: ConditionalValue<number>
15
15
  }
16
16
 
17
-
18
17
  interface GridItemStyles extends GridItemProperties, DistributiveOmit<SystemStyleObject, keyof GridItemProperties > {}
19
18
 
20
19
  interface GridItemPatternFn {
@@ -13,7 +13,6 @@ export interface GridProperties {
13
13
  minChildWidth?: ConditionalValue<Tokens["sizes"] | Properties["width"]>
14
14
  }
15
15
 
16
-
17
16
  interface GridStyles extends GridProperties, DistributiveOmit<SystemStyleObject, keyof GridProperties > {}
18
17
 
19
18
  interface GridPatternFn {
@@ -15,7 +15,7 @@ transform(props, { map, isCssUnit }) {
15
15
  };
16
16
  },
17
17
  defaultValues(props) {
18
- return { gap: props.columnGap || props.rowGap ? void 0 : "10px" };
18
+ return { gap: props.columnGap || props.rowGap ? void 0 : "8px" };
19
19
  }}
20
20
 
21
21
  export const getGridStyle = (styles = {}) => {
@@ -10,7 +10,6 @@ export interface HstackProperties {
10
10
  gap?: SystemProperties["gap"]
11
11
  }
12
12
 
13
-
14
13
  interface HstackStyles extends HstackProperties, DistributiveOmit<SystemStyleObject, keyof HstackProperties > {}
15
14
 
16
15
  interface HstackPatternFn {
@@ -13,7 +13,7 @@ transform(props) {
13
13
  ...rest
14
14
  };
15
15
  },
16
- defaultValues:{gap:'10px'}}
16
+ defaultValues:{gap:'8px'}}
17
17
 
18
18
  export const getHstackStyle = (styles = {}) => {
19
19
  const _styles = getPatternStyles(hstackConfig, styles)
@@ -9,7 +9,6 @@ export interface LinkOverlayProperties {
9
9
 
10
10
  }
11
11
 
12
-
13
12
  interface LinkOverlayStyles extends LinkOverlayProperties, DistributiveOmit<SystemStyleObject, keyof LinkOverlayProperties > {}
14
13
 
15
14
  interface LinkOverlayPatternFn {
@@ -9,7 +9,6 @@ export interface SpacerProperties {
9
9
  size?: ConditionalValue<Tokens["spacing"]>
10
10
  }
11
11
 
12
-
13
12
  interface SpacerStyles extends SpacerProperties, DistributiveOmit<SystemStyleObject, keyof SpacerProperties > {}
14
13
 
15
14
  interface SpacerPatternFn {
@@ -2,12 +2,16 @@ import { getPatternStyles, patternFns } from '../helpers.mjs';
2
2
  import { css } from '../css/index.mjs';
3
3
 
4
4
  const spacerConfig = {
5
- transform(props, { map }) {
5
+ transform(props, { map, isCssUnit, isCssVar }) {
6
6
  const { size, ...rest } = props;
7
7
  return {
8
8
  alignSelf: "stretch",
9
9
  justifySelf: "stretch",
10
- flex: map(size, (v) => v == null ? "1" : `0 0 ${v}`),
10
+ flex: map(size, (v) => {
11
+ if (v == null) return "1";
12
+ const val = isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
13
+ return `0 0 ${val}`;
14
+ }),
11
15
  ...rest
12
16
  };
13
17
  }}
@@ -9,7 +9,6 @@ export interface SquareProperties {
9
9
  size?: SystemProperties["width"]
10
10
  }
11
11
 
12
-
13
12
  interface SquareStyles extends SquareProperties, DistributiveOmit<SystemStyleObject, keyof SquareProperties > {}
14
13
 
15
14
  interface SquarePatternFn {
@@ -12,7 +12,6 @@ export interface StackProperties {
12
12
  gap?: SystemProperties["gap"]
13
13
  }
14
14
 
15
-
16
15
  interface StackStyles extends StackProperties, DistributiveOmit<SystemStyleObject, keyof StackProperties > {}
17
16
 
18
17
  interface StackPatternFn {
@@ -13,7 +13,7 @@ transform(props) {
13
13
  ...rest
14
14
  };
15
15
  },
16
- defaultValues:{direction:'column',gap:'10px'}}
16
+ defaultValues:{direction:'column',gap:'8px'}}
17
17
 
18
18
  export const getStackStyle = (styles = {}) => {
19
19
  const _styles = getPatternStyles(stackConfig, styles)
@@ -9,7 +9,6 @@ export interface VisuallyHiddenProperties {
9
9
 
10
10
  }
11
11
 
12
-
13
12
  interface VisuallyHiddenStyles extends VisuallyHiddenProperties, DistributiveOmit<SystemStyleObject, keyof VisuallyHiddenProperties > {}
14
13
 
15
14
  interface VisuallyHiddenPatternFn {
@@ -10,7 +10,6 @@ export interface VstackProperties {
10
10
  gap?: SystemProperties["gap"]
11
11
  }
12
12
 
13
-
14
13
  interface VstackStyles extends VstackProperties, DistributiveOmit<SystemStyleObject, keyof VstackProperties > {}
15
14
 
16
15
  interface VstackPatternFn {
@@ -13,7 +13,7 @@ transform(props) {
13
13
  ...rest
14
14
  };
15
15
  },
16
- defaultValues:{gap:'10px'}}
16
+ defaultValues:{gap:'8px'}}
17
17
 
18
18
  export const getVstackStyle = (styles = {}) => {
19
19
  const _styles = getPatternStyles(vstackConfig, styles)
@@ -13,7 +13,6 @@ export interface WrapProperties {
13
13
  justify?: SystemProperties["justifyContent"]
14
14
  }
15
15
 
16
-
17
16
  interface WrapStyles extends WrapProperties, DistributiveOmit<SystemStyleObject, keyof WrapProperties > {}
18
17
 
19
18
  interface WrapPatternFn {