@pandacss/studio 0.38.0 → 0.39.0

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 (34) hide show
  1. package/package.json +7 -7
  2. package/styled-system/css/css.d.ts +11 -2
  3. package/styled-system/helpers.mjs +1 -1
  4. package/styled-system/jsx/aspect-ratio.mjs +1 -1
  5. package/styled-system/jsx/bleed.mjs +1 -1
  6. package/styled-system/jsx/box.mjs +1 -1
  7. package/styled-system/jsx/center.mjs +1 -1
  8. package/styled-system/jsx/circle.mjs +1 -1
  9. package/styled-system/jsx/container.mjs +1 -1
  10. package/styled-system/jsx/cq.mjs +1 -1
  11. package/styled-system/jsx/divider.mjs +1 -1
  12. package/styled-system/jsx/factory.mjs +2 -2
  13. package/styled-system/jsx/flex.mjs +1 -1
  14. package/styled-system/jsx/float.mjs +1 -1
  15. package/styled-system/jsx/grid-item.mjs +1 -1
  16. package/styled-system/jsx/grid.mjs +1 -1
  17. package/styled-system/jsx/hstack.mjs +1 -1
  18. package/styled-system/jsx/index.d.ts +0 -1
  19. package/styled-system/jsx/index.mjs +0 -1
  20. package/styled-system/jsx/link-box.mjs +1 -1
  21. package/styled-system/jsx/link-overlay.mjs +1 -1
  22. package/styled-system/jsx/spacer.mjs +1 -1
  23. package/styled-system/jsx/square.mjs +1 -1
  24. package/styled-system/jsx/stack.mjs +1 -1
  25. package/styled-system/jsx/visually-hidden.mjs +1 -1
  26. package/styled-system/jsx/vstack.mjs +1 -1
  27. package/styled-system/jsx/wrap.mjs +1 -1
  28. package/styled-system/patterns/index.d.ts +0 -1
  29. package/styled-system/patterns/index.mjs +0 -1
  30. package/styled-system/patterns/link-overlay.mjs +0 -3
  31. package/styled-system/tokens/tokens.d.ts +0 -3
  32. package/styled-system/types/composition.d.ts +39 -12
  33. package/styled-system/types/prop-type.d.ts +2 -1
  34. package/styled-system/types/style-props.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pandacss/studio",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "The automated token documentation for Panda CSS",
5
5
  "main": "dist/studio.js",
6
6
  "module": "dist/studio.mjs",
@@ -48,12 +48,12 @@
48
48
  "react": "18.2.0",
49
49
  "react-dom": "18.2.0",
50
50
  "vite": "5.1.7",
51
- "@pandacss/config": "0.38.0",
52
- "@pandacss/logger": "0.38.0",
53
- "@pandacss/shared": "0.38.0",
54
- "@pandacss/token-dictionary": "0.38.0",
55
- "@pandacss/types": "0.38.0",
56
- "@pandacss/astro-plugin-studio": "0.38.0"
51
+ "@pandacss/config": "0.39.0",
52
+ "@pandacss/logger": "0.39.0",
53
+ "@pandacss/shared": "0.39.0",
54
+ "@pandacss/token-dictionary": "0.39.0",
55
+ "@pandacss/types": "0.39.0",
56
+ "@pandacss/astro-plugin-studio": "0.39.0"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@types/react": "18.2.55",
@@ -1,9 +1,18 @@
1
1
  /* eslint-disable */
2
2
  import type { SystemStyleObject } from '../types/index';
3
3
 
4
+ type Styles = SystemStyleObject | undefined | null | false
5
+
4
6
  interface CssFunction {
5
- (...styles: Array<SystemStyleObject | undefined | null | false>): string
6
- raw: (...styles: Array<SystemStyleObject | undefined | null | false>) => SystemStyleObject
7
+ (styles: Styles): string
8
+ (styles: Styles[]): string
9
+ (...styles: Array<Styles | Styles[]>): string
10
+ (styles: Styles): string
11
+
12
+ raw: (styles: Styles) => string
13
+ raw: (styles: Styles[]) => string
14
+ raw: (...styles: Array<Styles | Styles[]>) => string
15
+ raw: (styles: Styles) => string
7
16
  }
8
17
 
9
18
  export declare const css: CssFunction;
@@ -180,7 +180,7 @@ function createCss(context) {
180
180
  });
181
181
  }
182
182
  function compactStyles(...styles) {
183
- return styles.filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
183
+ return styles.flat().filter((style) => isObject(style) && Object.keys(compact(style)).length > 0);
184
184
  }
185
185
  function createMergeCss(context) {
186
186
  function resolve(styles) {
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getAspectRatioStyle } from '../patterns/aspect-ratio.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getBleedStyle } from '../patterns/bleed.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getBoxStyle } from '../patterns/box.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getCenterStyle } from '../patterns/center.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getCircleStyle } from '../patterns/circle.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getContainerStyle } from '../patterns/container.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getCqStyle } from '../patterns/cq.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getDividerStyle } from '../patterns/divider.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -31,13 +31,13 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
31
31
  function recipeClass() {
32
32
  const { css: cssStyles, ...propStyles } = styleProps
33
33
  const compoundVariantStyles = __cvaFn__.__getCompoundVariantCss__?.(variantProps)
34
- return cx(__cvaFn__(variantProps, false), css(compoundVariantStyles, propStyles, ...(Array.isArray(cssStyles) ? cssStyles : [cssStyles])), combinedProps.className)
34
+ return cx(__cvaFn__(variantProps, false), css(compoundVariantStyles, propStyles, cssStyles), combinedProps.className)
35
35
  }
36
36
 
37
37
  function cvaClass() {
38
38
  const { css: cssStyles, ...propStyles } = styleProps
39
39
  const cvaStyles = __cvaFn__.raw(variantProps)
40
- return cx(css(cvaStyles, propStyles, ...(Array.isArray(cssStyles) ? cssStyles : [cssStyles])), combinedProps.className)
40
+ return cx(css(cvaStyles, propStyles, cssStyles), combinedProps.className)
41
41
  }
42
42
 
43
43
  const classes = configOrCva.__recipe__ ? recipeClass : cvaClass
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getFlexStyle } from '../patterns/flex.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getFloatStyle } from '../patterns/float.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getGridItemStyle } from '../patterns/grid-item.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getGridStyle } from '../patterns/grid.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getHstackStyle } from '../patterns/hstack.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -10,7 +10,6 @@ export * from './spacer';
10
10
  export * from './square';
11
11
  export * from './circle';
12
12
  export * from './center';
13
- export * from './link-box';
14
13
  export * from './link-overlay';
15
14
  export * from './aspect-ratio';
16
15
  export * from './grid';
@@ -9,7 +9,6 @@ export * from './spacer.mjs';
9
9
  export * from './square.mjs';
10
10
  export * from './circle.mjs';
11
11
  export * from './center.mjs';
12
- export * from './link-box.mjs';
13
12
  export * from './link-overlay.mjs';
14
13
  export * from './aspect-ratio.mjs';
15
14
  export * from './grid.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getLinkBoxStyle } from '../patterns/link-box.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getLinkOverlayStyle } from '../patterns/link-overlay.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getSpacerStyle } from '../patterns/spacer.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getSquareStyle } from '../patterns/square.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getStackStyle } from '../patterns/stack.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getVisuallyHiddenStyle } from '../patterns/visually-hidden.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getVstackStyle } from '../patterns/vstack.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -1,5 +1,5 @@
1
1
  import { createElement, forwardRef } from 'react'
2
- import { mergeCss } from '../css/css.mjs';
2
+
3
3
  import { splitProps } from '../helpers.mjs';
4
4
  import { getWrapStyle } from '../patterns/wrap.mjs';
5
5
  import { panda } from './factory.mjs';
@@ -8,7 +8,6 @@ export * from './spacer';
8
8
  export * from './square';
9
9
  export * from './circle';
10
10
  export * from './center';
11
- export * from './link-box';
12
11
  export * from './link-overlay';
13
12
  export * from './aspect-ratio';
14
13
  export * from './grid';
@@ -7,7 +7,6 @@ export * from './spacer.mjs';
7
7
  export * from './square.mjs';
8
8
  export * from './circle.mjs';
9
9
  export * from './center.mjs';
10
- export * from './link-box.mjs';
11
10
  export * from './link-overlay.mjs';
12
11
  export * from './aspect-ratio.mjs';
13
12
  export * from './grid.mjs';
@@ -4,12 +4,9 @@ import { css } from '../css/index.mjs';
4
4
  const linkOverlayConfig = {
5
5
  transform(props) {
6
6
  return {
7
- position: "static",
8
7
  _before: {
9
8
  content: '""',
10
- display: "block",
11
9
  position: "absolute",
12
- cursor: "inherit",
13
10
  inset: "0",
14
11
  zIndex: "0",
15
12
  ...props["_before"]
@@ -39,8 +39,6 @@ export type AssetToken = "check"
39
39
 
40
40
  export type BreakpointToken = "sm" | "md" | "lg" | "xl" | "2xl"
41
41
 
42
- export type AnimationName = "spin" | "ping" | "pulse" | "bounce"
43
-
44
42
  export type Tokens = {
45
43
  aspectRatios: AspectRatioToken
46
44
  borders: BorderToken
@@ -60,7 +58,6 @@ export type Tokens = {
60
58
  colors: ColorToken
61
59
  assets: AssetToken
62
60
  breakpoints: BreakpointToken
63
- animationName: AnimationName
64
61
  } & { [token: string]: never }
65
62
 
66
63
  export type TokenCategory = "aspectRatios" | "zIndex" | "opacity" | "colors" | "fonts" | "fontSizes" | "fontWeights" | "lineHeights" | "letterSpacings" | "sizes" | "shadows" | "spacing" | "radii" | "borders" | "borderWidths" | "durations" | "easings" | "animations" | "blurs" | "gradients" | "breakpoints" | "assets"
@@ -15,34 +15,61 @@ interface Recursive<T> {
15
15
  * -----------------------------------------------------------------------------*/
16
16
 
17
17
  type TextStyleProperty =
18
+ | 'font'
19
+ | 'fontFamily'
20
+ | 'fontFeatureSettings'
21
+ | 'fontKerning'
22
+ | 'fontLanguageOverride'
23
+ | 'fontOpticalSizing'
24
+ | 'fontPalette'
18
25
  | 'fontSize'
19
26
  | 'fontSizeAdjust'
20
- | 'fontVariationSettings'
21
- | 'fontVariantPosition'
22
- | 'fontVariantCaps'
23
- | 'fontVariantNumeric'
27
+ | 'fontStretch'
28
+ | 'fontStyle'
29
+ | 'fontSynthesis'
30
+ | 'fontVariant'
24
31
  | 'fontVariantAlternates'
32
+ | 'fontVariantCaps'
25
33
  | 'fontVariantLigatures'
26
- | 'fontFamily'
34
+ | 'fontVariantNumeric'
35
+ | 'fontVariantPosition'
36
+ | 'fontVariationSettings'
27
37
  | 'fontWeight'
28
- | 'fontSynthesis'
29
- | 'fontStyle'
30
- | 'fontVariant'
31
- | 'lineHeight'
38
+ | 'hypens'
39
+ | 'hyphenateCharacter'
40
+ | 'hyphenateLimitChars'
32
41
  | 'letterSpacing'
42
+ | 'lineBreak'
43
+ | 'lineHeight'
44
+ | 'quotes'
45
+ | 'overflowWrap'
46
+ | 'textCombineUpright'
33
47
  | 'textDecoration'
34
- | 'textTransform'
35
- | 'textIndent'
36
48
  | 'textDecorationColor'
37
49
  | 'textDecorationLine'
50
+ | 'textDecorationSkipInk'
38
51
  | 'textDecorationStyle'
52
+ | 'textDecorationThickness'
53
+ | 'textEmphasis'
39
54
  | 'textEmphasisColor'
40
55
  | 'textEmphasisPosition'
41
56
  | 'textEmphasisStyle'
42
- | 'hyphenateCharacter'
57
+ | 'textIndent'
58
+ | 'textJustify'
43
59
  | 'textOrientation'
44
60
  | 'textOverflow'
45
61
  | 'textRendering'
62
+ | 'textShadow'
63
+ | 'textTransform'
64
+ | 'textUnderlineOffset'
65
+ | 'textUnderlinePosition'
66
+ | 'textWrap'
67
+ | 'textWrapMode'
68
+ | 'textWrapStyle'
69
+ | 'verticalAlign'
70
+ | 'whiteSpace'
71
+ | 'wordBreak'
72
+ | 'wordSpacing'
46
73
 
47
74
  export type TextStyle = CompositionStyleObject<TextStyleProperty>
48
75
 
@@ -16,7 +16,7 @@ export interface UtilityValues {
16
16
  insetInlineStart: Tokens["spacing"];
17
17
  right: Tokens["spacing"];
18
18
  bottom: Tokens["spacing"];
19
- float: "left" | "right" | "start" | "end";
19
+ float: "start" | "end" | CssProperties["float"];
20
20
  hideFrom: Tokens["breakpoints"];
21
21
  hideBelow: Tokens["breakpoints"];
22
22
  flexBasis: Tokens["spacing"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
@@ -148,6 +148,7 @@ export interface UtilityValues {
148
148
  transitionDuration: Tokens["durations"];
149
149
  transition: "all" | "common" | "background" | "colors" | "opacity" | "shadow" | "transform";
150
150
  animation: Tokens["animations"];
151
+ animationName: "spin" | "ping" | "pulse" | "bounce";
151
152
  animationTimingFunction: Tokens["easings"];
152
153
  animationDuration: Tokens["durations"];
153
154
  animationDelay: Tokens["durations"];
@@ -429,7 +429,7 @@ animationIterationCount?: ConditionalValue<CssProperties["animationIterationCoun
429
429
  *
430
430
  * @see https://developer.mozilla.org/docs/Web/CSS/animation-name
431
431
  */
432
- animationName?: ConditionalValue<CssProperties["animationName"] | AnyString>
432
+ animationName?: ConditionalValue<UtilityValues["animationName"] | CssVars | CssProperties["animationName"] | AnyString>
433
433
  /**
434
434
  * The **`animation-play-state`** CSS property sets whether an animation is running or paused.
435
435
  *