@pandacss/studio 1.2.0 → 1.3.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.
- package/dist/studio.d.mts +3 -3
- package/dist/studio.d.ts +3 -3
- package/package.json +7 -7
- package/styled-system/jsx/factory.mjs +1 -1
- package/styled-system/types/composition.d.ts +83 -23
- package/styled-system/types/jsx.d.ts +12 -5
- package/styled-system/types/prop-type.d.ts +2 -1
- package/styled-system/types/style-props.d.ts +1 -1
- package/tsconfig.json +18 -2
package/dist/studio.d.mts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface BuildOpts {
|
|
2
2
|
outDir: string;
|
|
3
3
|
configPath: string;
|
|
4
|
-
port?: string;
|
|
5
|
-
host?: boolean;
|
|
6
|
-
base?: string;
|
|
4
|
+
port?: string | undefined;
|
|
5
|
+
host?: boolean | undefined;
|
|
6
|
+
base?: string | undefined;
|
|
7
7
|
}
|
|
8
8
|
declare function buildStudio({ outDir, configPath, base }: BuildOpts): Promise<void>;
|
|
9
9
|
declare function serveStudio({ configPath, port, host, outDir, base }: BuildOpts): Promise<void>;
|
package/dist/studio.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
interface BuildOpts {
|
|
2
2
|
outDir: string;
|
|
3
3
|
configPath: string;
|
|
4
|
-
port?: string;
|
|
5
|
-
host?: boolean;
|
|
6
|
-
base?: string;
|
|
4
|
+
port?: string | undefined;
|
|
5
|
+
host?: boolean | undefined;
|
|
6
|
+
base?: string | undefined;
|
|
7
7
|
}
|
|
8
8
|
declare function buildStudio({ outDir, configPath, base }: BuildOpts): Promise<void>;
|
|
9
9
|
declare function serveStudio({ configPath, port, host, outDir, base }: BuildOpts): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pandacss/studio",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.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": "19.1.1",
|
|
49
49
|
"react-dom": "19.1.1",
|
|
50
50
|
"vite": "7.0.6",
|
|
51
|
-
"@pandacss/config": "1.
|
|
52
|
-
"@pandacss/logger": "1.
|
|
53
|
-
"@pandacss/shared": "1.
|
|
54
|
-
"@pandacss/token-dictionary": "1.
|
|
55
|
-
"@pandacss/types": "1.
|
|
56
|
-
"@pandacss/astro-plugin-studio": "1.
|
|
51
|
+
"@pandacss/config": "1.3.0",
|
|
52
|
+
"@pandacss/logger": "1.3.0",
|
|
53
|
+
"@pandacss/shared": "1.3.0",
|
|
54
|
+
"@pandacss/token-dictionary": "1.3.0",
|
|
55
|
+
"@pandacss/types": "1.3.0",
|
|
56
|
+
"@pandacss/astro-plugin-studio": "1.3.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/react": "18.2.55",
|
|
@@ -57,7 +57,7 @@ function styledFn(Dynamic, configOrCva = {}, options = {}) {
|
|
|
57
57
|
...elementProps,
|
|
58
58
|
...normalizeHTMLProps(htmlProps),
|
|
59
59
|
className: classes(),
|
|
60
|
-
},
|
|
60
|
+
}, children ?? combinedProps.children)
|
|
61
61
|
})
|
|
62
62
|
|
|
63
63
|
const name = getDisplayName(__base__)
|
|
@@ -15,6 +15,8 @@ interface Recursive<T> {
|
|
|
15
15
|
* -----------------------------------------------------------------------------*/
|
|
16
16
|
|
|
17
17
|
type TextStyleProperty =
|
|
18
|
+
| 'color'
|
|
19
|
+
| 'direction'
|
|
18
20
|
| 'font'
|
|
19
21
|
| 'fontFamily'
|
|
20
22
|
| 'fontFeatureSettings'
|
|
@@ -35,6 +37,7 @@ type TextStyleProperty =
|
|
|
35
37
|
| 'fontVariantPosition'
|
|
36
38
|
| 'fontVariationSettings'
|
|
37
39
|
| 'fontWeight'
|
|
40
|
+
| 'hangingPunctuation'
|
|
38
41
|
| 'hypens'
|
|
39
42
|
| 'hyphenateCharacter'
|
|
40
43
|
| 'hyphenateLimitChars'
|
|
@@ -43,11 +46,17 @@ type TextStyleProperty =
|
|
|
43
46
|
| 'lineHeight'
|
|
44
47
|
| 'quotes'
|
|
45
48
|
| 'overflowWrap'
|
|
49
|
+
| 'tabSize'
|
|
50
|
+
| 'textAlign'
|
|
51
|
+
| 'textAlignLast'
|
|
46
52
|
| 'textCombineUpright'
|
|
47
53
|
| 'textDecoration'
|
|
48
54
|
| 'textDecorationColor'
|
|
49
55
|
| 'textDecorationLine'
|
|
56
|
+
| 'textDecorationSkip'
|
|
57
|
+
| 'textDecorationSkipBox'
|
|
50
58
|
| 'textDecorationSkipInk'
|
|
59
|
+
| 'textDecorationSkipInset'
|
|
51
60
|
| 'textDecorationStyle'
|
|
52
61
|
| 'textDecorationThickness'
|
|
53
62
|
| 'textEmphasis'
|
|
@@ -60,16 +69,21 @@ type TextStyleProperty =
|
|
|
60
69
|
| 'textOverflow'
|
|
61
70
|
| 'textRendering'
|
|
62
71
|
| 'textShadow'
|
|
72
|
+
| 'textStroke'
|
|
73
|
+
| 'textStrokeColor'
|
|
74
|
+
| 'textStrokeWidth'
|
|
63
75
|
| 'textTransform'
|
|
64
76
|
| 'textUnderlineOffset'
|
|
65
77
|
| 'textUnderlinePosition'
|
|
66
78
|
| 'textWrap'
|
|
67
79
|
| 'textWrapMode'
|
|
68
80
|
| 'textWrapStyle'
|
|
81
|
+
| 'unicodeBidi'
|
|
69
82
|
| 'verticalAlign'
|
|
70
83
|
| 'whiteSpace'
|
|
71
84
|
| 'wordBreak'
|
|
72
85
|
| 'wordSpacing'
|
|
86
|
+
| 'writingMode'
|
|
73
87
|
|
|
74
88
|
export type TextStyle = CompositionStyleObject<TextStyleProperty>
|
|
75
89
|
|
|
@@ -79,17 +93,11 @@ export type TextStyles = Recursive<Token<TextStyle>>
|
|
|
79
93
|
* Layer styles
|
|
80
94
|
* -----------------------------------------------------------------------------*/
|
|
81
95
|
|
|
82
|
-
type
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
| 'Inline'
|
|
88
|
-
| 'Block'
|
|
89
|
-
| 'InlineStart'
|
|
90
|
-
| 'InlineEnd'
|
|
91
|
-
| 'BlockStart'
|
|
92
|
-
| 'BlockEnd'
|
|
96
|
+
type LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'
|
|
97
|
+
|
|
98
|
+
type PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'
|
|
99
|
+
|
|
100
|
+
type Placement = PhysicalPlacement | LogicalPlacement
|
|
93
101
|
|
|
94
102
|
type Radius =
|
|
95
103
|
| `Top${'Right' | 'Left'}`
|
|
@@ -98,20 +106,80 @@ type Radius =
|
|
|
98
106
|
| `End${'Start' | 'End'}`
|
|
99
107
|
|
|
100
108
|
type LayerStyleProperty =
|
|
109
|
+
| 'aspectRatio'
|
|
101
110
|
| 'background'
|
|
102
111
|
| 'backgroundColor'
|
|
103
112
|
| 'backgroundImage'
|
|
104
|
-
| 'borderRadius'
|
|
105
113
|
| 'border'
|
|
106
|
-
| 'borderWidth'
|
|
107
114
|
| 'borderColor'
|
|
115
|
+
| 'borderImage'
|
|
116
|
+
| 'borderImageOutset'
|
|
117
|
+
| 'borderImageRepeat'
|
|
118
|
+
| 'borderImageSlice'
|
|
119
|
+
| 'borderImageSource'
|
|
120
|
+
| 'borderImageWidth'
|
|
121
|
+
| 'borderRadius'
|
|
108
122
|
| 'borderStyle'
|
|
123
|
+
| 'borderWidth'
|
|
124
|
+
| `border${Placement}`
|
|
125
|
+
| `border${Placement}Color`
|
|
126
|
+
| `border${Placement}Style`
|
|
127
|
+
| `border${Placement}Width`
|
|
128
|
+
| 'borderRadius'
|
|
129
|
+
| `border${Radius}Radius`
|
|
109
130
|
| 'boxShadow'
|
|
131
|
+
| 'boxShadowColor'
|
|
132
|
+
| 'clipPath'
|
|
133
|
+
| 'color'
|
|
134
|
+
| 'contain'
|
|
135
|
+
| 'content'
|
|
136
|
+
| 'contentVisibility'
|
|
137
|
+
| 'cursor'
|
|
138
|
+
| 'display'
|
|
110
139
|
| 'filter'
|
|
111
140
|
| 'backdropFilter'
|
|
112
|
-
| '
|
|
113
|
-
| '
|
|
141
|
+
| 'height'
|
|
142
|
+
| 'width'
|
|
143
|
+
| 'minHeight'
|
|
144
|
+
| 'minWidth'
|
|
145
|
+
| 'maxHeight'
|
|
146
|
+
| 'maxWidth'
|
|
147
|
+
| `margin${Placement}`
|
|
148
|
+
| 'inset'
|
|
149
|
+
| `inset${LogicalPlacement}`
|
|
150
|
+
| Lowercase<PhysicalPlacement>
|
|
151
|
+
| 'isolation'
|
|
152
|
+
| 'mask'
|
|
153
|
+
| 'maskClip'
|
|
154
|
+
| 'maskComposite'
|
|
155
|
+
| 'maskImage'
|
|
156
|
+
| 'maskMode'
|
|
157
|
+
| 'maskOrigin'
|
|
158
|
+
| 'maskPosition'
|
|
159
|
+
| 'maskRepeat'
|
|
160
|
+
| 'maskSize'
|
|
161
|
+
| 'mixBlendMode'
|
|
162
|
+
| 'objectFit'
|
|
163
|
+
| 'objectPosition'
|
|
114
164
|
| 'opacity'
|
|
165
|
+
| 'outline'
|
|
166
|
+
| 'outlineColor'
|
|
167
|
+
| 'outlineOffset'
|
|
168
|
+
| 'outlineStyle'
|
|
169
|
+
| 'outlineWidth'
|
|
170
|
+
| 'overflow'
|
|
171
|
+
| 'overflowX'
|
|
172
|
+
| 'overflowY'
|
|
173
|
+
| 'padding'
|
|
174
|
+
| `padding${Placement}`
|
|
175
|
+
| 'pointerEvents'
|
|
176
|
+
| 'position'
|
|
177
|
+
| 'resize'
|
|
178
|
+
| 'transform'
|
|
179
|
+
| 'transition'
|
|
180
|
+
| 'visibility'
|
|
181
|
+
| 'willChange'
|
|
182
|
+
| 'zIndex'
|
|
115
183
|
| 'backgroundBlendMode'
|
|
116
184
|
| 'backgroundAttachment'
|
|
117
185
|
| 'backgroundClip'
|
|
@@ -119,14 +187,6 @@ type LayerStyleProperty =
|
|
|
119
187
|
| 'backgroundPosition'
|
|
120
188
|
| 'backgroundRepeat'
|
|
121
189
|
| 'backgroundSize'
|
|
122
|
-
| `border${Placement}`
|
|
123
|
-
| `border${Placement}Width`
|
|
124
|
-
| 'borderRadius'
|
|
125
|
-
| `border${Radius}Radius`
|
|
126
|
-
| `border${Placement}Color`
|
|
127
|
-
| `border${Placement}Style`
|
|
128
|
-
| 'padding'
|
|
129
|
-
| `padding${Placement}`
|
|
130
190
|
|
|
131
191
|
export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
132
192
|
|
|
@@ -14,13 +14,20 @@ export interface UnstyledProps {
|
|
|
14
14
|
unstyled?: boolean | undefined
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
export interface AsProps {
|
|
18
|
+
/**
|
|
19
|
+
* The element to render as
|
|
20
|
+
*/
|
|
21
|
+
as?: ElementType | undefined
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
export type ComponentProps<T extends ElementType> = DistributiveOmit<ComponentPropsWithoutRef<T>, 'ref'> & {
|
|
18
25
|
ref?: Ref<ElementRef<T>>
|
|
19
26
|
}
|
|
20
27
|
|
|
21
28
|
export interface PandaComponent<T extends ElementType, P extends Dict = {}> {
|
|
22
|
-
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
23
|
-
displayName?: string
|
|
29
|
+
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
30
|
+
displayName?: string | undefined
|
|
24
31
|
}
|
|
25
32
|
|
|
26
33
|
interface RecipeFn {
|
|
@@ -29,12 +36,12 @@ interface RecipeFn {
|
|
|
29
36
|
|
|
30
37
|
interface JsxFactoryOptions<TProps extends Dict> {
|
|
31
38
|
dataAttr?: boolean
|
|
32
|
-
defaultProps?: TProps
|
|
39
|
+
defaultProps?: Partial<TProps>
|
|
33
40
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
34
41
|
forwardProps?: string[]
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, P>;
|
|
44
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
|
|
38
45
|
|
|
39
46
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends PandaComponent<infer A, infer B>
|
|
40
47
|
? PandaComponent<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -55,6 +62,6 @@ export type JsxElements = {
|
|
|
55
62
|
|
|
56
63
|
export type Panda = JsxFactory & JsxElements
|
|
57
64
|
|
|
58
|
-
export type HTMLPandaProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
65
|
+
export type HTMLPandaProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
59
66
|
|
|
60
67
|
export type PandaVariantProps<T extends PandaComponent<any, any>> = T extends PandaComponent<any, infer Props> ? Props : never
|
|
@@ -150,7 +150,8 @@ export interface UtilityValues {
|
|
|
150
150
|
transitionTimingFunction: Tokens["easings"];
|
|
151
151
|
transitionDelay: Tokens["durations"];
|
|
152
152
|
transitionDuration: Tokens["durations"];
|
|
153
|
-
|
|
153
|
+
transitionProperty: "common" | "colors" | "size" | "position" | "background";
|
|
154
|
+
transition: "all" | "common" | "size" | "position" | "background" | "colors" | "opacity" | "shadow" | "transform";
|
|
154
155
|
animation: Tokens["animations"];
|
|
155
156
|
animationName: "spin" | "ping" | "pulse" | "bounce";
|
|
156
157
|
animationTimingFunction: Tokens["easings"];
|
|
@@ -5907,7 +5907,7 @@ transitionDuration?: ConditionalValue<UtilityValues["transitionDuration"] | CssV
|
|
|
5907
5907
|
*
|
|
5908
5908
|
* @see https://developer.mozilla.org/docs/Web/CSS/transition-property
|
|
5909
5909
|
*/
|
|
5910
|
-
transitionProperty?: ConditionalValue<CssProperties["transitionProperty"] | AnyString>
|
|
5910
|
+
transitionProperty?: ConditionalValue<UtilityValues["transitionProperty"] | CssVars | CssProperties["transitionProperty"] | AnyString>
|
|
5911
5911
|
/**
|
|
5912
5912
|
* The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect.
|
|
5913
5913
|
*
|
package/tsconfig.json
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"include": ["src", "__tests__"],
|
|
2
|
+
"include": ["src", "__tests__", "astro.config.mjs"],
|
|
4
3
|
"compilerOptions": {
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"lib": ["ES2022"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"moduleResolution": "Bundler",
|
|
8
|
+
"allowImportingTsExtensions": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"verbatimModuleSyntax": true,
|
|
11
|
+
"isolatedModules": true,
|
|
12
|
+
"noEmit": true,
|
|
5
13
|
"jsx": "preserve",
|
|
14
|
+
"strict": true,
|
|
15
|
+
"noUnusedLocals": true,
|
|
16
|
+
"noUnusedParameters": true,
|
|
17
|
+
// "exactOptionalPropertyTypes": true,
|
|
18
|
+
"skipLibCheck": true,
|
|
19
|
+
"forceConsistentCasingInFileNames": true,
|
|
20
|
+
"esModuleInterop": true,
|
|
21
|
+
"allowJs": true,
|
|
6
22
|
"customConditions": ["source"]
|
|
7
23
|
}
|
|
8
24
|
}
|