@pandacss/generator 1.2.0 → 1.3.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.
- package/dist/index.js +196 -71
- package/dist/index.mjs +196 -71
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -1031,7 +1031,7 @@ function generatePreactJsxFactory(ctx) {
|
|
|
1031
1031
|
...normalizeHTMLProps(htmlProps),
|
|
1032
1032
|
ref,
|
|
1033
1033
|
className: classes()
|
|
1034
|
-
},
|
|
1034
|
+
}, children ?? combinedProps.children)
|
|
1035
1035
|
})
|
|
1036
1036
|
|
|
1037
1037
|
const name = getDisplayName(__base__)
|
|
@@ -1164,9 +1164,16 @@ export interface UnstyledProps {
|
|
|
1164
1164
|
unstyled?: boolean | undefined
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
+
export interface AsProps {
|
|
1168
|
+
/**
|
|
1169
|
+
* The element to render as
|
|
1170
|
+
*/
|
|
1171
|
+
as?: ElementType | undefined
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1167
1174
|
export interface ${componentName}<T extends ElementType, P extends Dict = {}> {
|
|
1168
|
-
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
1169
|
-
displayName?: string
|
|
1175
|
+
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
1176
|
+
displayName?: string | undefined
|
|
1170
1177
|
}
|
|
1171
1178
|
|
|
1172
1179
|
interface RecipeFn {
|
|
@@ -1175,12 +1182,12 @@ interface RecipeFn {
|
|
|
1175
1182
|
|
|
1176
1183
|
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
1177
1184
|
dataAttr?: boolean
|
|
1178
|
-
defaultProps?: TProps
|
|
1185
|
+
defaultProps?: Partial<TProps>
|
|
1179
1186
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
1180
1187
|
forwardProps?: string[]
|
|
1181
1188
|
}
|
|
1182
1189
|
|
|
1183
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, P>
|
|
1190
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>
|
|
1184
1191
|
|
|
1185
1192
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends ${componentName}<infer A, infer B>
|
|
1186
1193
|
? ${componentName}<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -1201,7 +1208,7 @@ export type JsxElements = {
|
|
|
1201
1208
|
|
|
1202
1209
|
export type ${upperName} = JsxFactory & JsxElements
|
|
1203
1210
|
|
|
1204
|
-
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
1211
|
+
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
1205
1212
|
|
|
1206
1213
|
export type ${variantName}<T extends ${componentName}<any, any>> = T extends ${componentName}<any, infer Props> ? Props : never
|
|
1207
1214
|
`
|
|
@@ -1237,16 +1244,20 @@ function generatePreactCreateStyleContext(ctx) {
|
|
|
1237
1244
|
)}
|
|
1238
1245
|
}
|
|
1239
1246
|
|
|
1240
|
-
const withRootProvider = (Component) => {
|
|
1247
|
+
const withRootProvider = (Component, options) => {
|
|
1241
1248
|
const WithRootProvider = (props) => {
|
|
1242
1249
|
const [variantProps, otherProps] = svaFn.splitVariantProps(props)
|
|
1243
1250
|
|
|
1244
1251
|
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
1245
1252
|
slotStyles._classNameMap = svaFn.classNameMap
|
|
1246
1253
|
|
|
1254
|
+
const mergedProps = options?.defaultProps
|
|
1255
|
+
? { ...options.defaultProps, ...otherProps }
|
|
1256
|
+
: otherProps
|
|
1257
|
+
|
|
1247
1258
|
return createElement(StyleContext.Provider, {
|
|
1248
1259
|
value: slotStyles,
|
|
1249
|
-
children: createElement(Component,
|
|
1260
|
+
children: createElement(Component, mergedProps)
|
|
1250
1261
|
})
|
|
1251
1262
|
}
|
|
1252
1263
|
|
|
@@ -1318,7 +1329,11 @@ function generatePreactCreateStyleContext(ctx) {
|
|
|
1318
1329
|
import type { ComponentType, ComponentProps, JSX } from 'preact/compat'
|
|
1319
1330
|
|
|
1320
1331
|
interface UnstyledProps {
|
|
1321
|
-
unstyled?: boolean
|
|
1332
|
+
unstyled?: boolean | undefined
|
|
1333
|
+
}
|
|
1334
|
+
|
|
1335
|
+
interface WithProviderOptions<P = {}> {
|
|
1336
|
+
defaultProps?: Partial<P> | undefined
|
|
1322
1337
|
}
|
|
1323
1338
|
|
|
1324
1339
|
type ElementType = JSX.ElementType
|
|
@@ -1336,22 +1351,29 @@ function generatePreactCreateStyleContext(ctx) {
|
|
|
1336
1351
|
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
1337
1352
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
1338
1353
|
>
|
|
1339
|
-
|
|
1354
|
+
|
|
1355
|
+
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
1356
|
+
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
1357
|
+
>
|
|
1358
|
+
|
|
1340
1359
|
type StyleContextConsumer<T extends ElementType> = ComponentType<
|
|
1341
1360
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
1342
1361
|
>
|
|
1343
1362
|
|
|
1344
1363
|
export interface StyleContext<R extends SlotRecipe> {
|
|
1345
|
-
withRootProvider: <T extends ElementType>(
|
|
1364
|
+
withRootProvider: <T extends ElementType>(
|
|
1365
|
+
Component: T,
|
|
1366
|
+
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
1367
|
+
) => StyleContextRootProvider<T, R>
|
|
1346
1368
|
withProvider: <T extends ElementType>(
|
|
1347
1369
|
Component: T,
|
|
1348
1370
|
slot: InferSlot<R>,
|
|
1349
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
1371
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
1350
1372
|
) => StyleContextProvider<T, R>
|
|
1351
1373
|
withContext: <T extends ElementType>(
|
|
1352
1374
|
Component: T,
|
|
1353
1375
|
slot: InferSlot<R>,
|
|
1354
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
1376
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
1355
1377
|
) => StyleContextConsumer<T>
|
|
1356
1378
|
}
|
|
1357
1379
|
|
|
@@ -1439,9 +1461,16 @@ interface Dict {
|
|
|
1439
1461
|
[k: string]: unknown
|
|
1440
1462
|
}
|
|
1441
1463
|
|
|
1464
|
+
export interface AsProps {
|
|
1465
|
+
/**
|
|
1466
|
+
* The element to render as
|
|
1467
|
+
*/
|
|
1468
|
+
as?: ElementType | undefined
|
|
1469
|
+
}
|
|
1470
|
+
|
|
1442
1471
|
export type ${componentName}<T extends ElementType> = {
|
|
1443
|
-
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T>) => JSX.Element
|
|
1444
|
-
displayName?: string
|
|
1472
|
+
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T> & AsProps) => JSX.Element
|
|
1473
|
+
displayName?: string | undefined
|
|
1445
1474
|
}
|
|
1446
1475
|
|
|
1447
1476
|
export interface JsxFactory {
|
|
@@ -1527,7 +1556,7 @@ function generateQwikJsxFactory(ctx) {
|
|
|
1527
1556
|
...elementProps,
|
|
1528
1557
|
...normalizeHTMLProps(htmlProps),
|
|
1529
1558
|
class: classes(),
|
|
1530
|
-
},
|
|
1559
|
+
}, children ?? combinedProps.children)
|
|
1531
1560
|
}
|
|
1532
1561
|
|
|
1533
1562
|
const name = getDisplayName(__base__)
|
|
@@ -1666,7 +1695,14 @@ export interface UnstyledProps {
|
|
|
1666
1695
|
unstyled?: boolean | undefined
|
|
1667
1696
|
}
|
|
1668
1697
|
|
|
1669
|
-
export interface
|
|
1698
|
+
export interface AsProps {
|
|
1699
|
+
/**
|
|
1700
|
+
* The element to render as
|
|
1701
|
+
*/
|
|
1702
|
+
as?: ElementType | undefined
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends Component<Assign<ComponentProps<T> & UnstyledProps & AsProps, Assign<PatchedHTMLProps, Assign<JsxStyleProps, P>>>> {}
|
|
1670
1706
|
|
|
1671
1707
|
interface RecipeFn {
|
|
1672
1708
|
__type: any
|
|
@@ -1674,12 +1710,12 @@ interface RecipeFn {
|
|
|
1674
1710
|
|
|
1675
1711
|
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
1676
1712
|
dataAttr?: boolean
|
|
1677
|
-
defaultProps?: TProps
|
|
1713
|
+
defaultProps?: Partial<TProps>
|
|
1678
1714
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
1679
1715
|
forwardProps?: string[]
|
|
1680
1716
|
}
|
|
1681
1717
|
|
|
1682
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, P>;
|
|
1718
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
|
|
1683
1719
|
|
|
1684
1720
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends ${componentName}<infer A, infer B>
|
|
1685
1721
|
? ${componentName}<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -1700,7 +1736,7 @@ export type JsxElements = {
|
|
|
1700
1736
|
|
|
1701
1737
|
export type ${upperName} = JsxFactory & JsxElements
|
|
1702
1738
|
|
|
1703
|
-
export type ${typeName}<T extends ElementType> = Assign<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
1739
|
+
export type ${typeName}<T extends ElementType> = Assign<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
1704
1740
|
|
|
1705
1741
|
export type ${variantName}<T extends ${componentName}<any, any>> = T extends ${componentName}<any, infer Props> ? Props : never
|
|
1706
1742
|
`
|
|
@@ -1791,8 +1827,15 @@ interface Dict {
|
|
|
1791
1827
|
[k: string]: unknown
|
|
1792
1828
|
}
|
|
1793
1829
|
|
|
1830
|
+
export interface AsProps {
|
|
1831
|
+
/**
|
|
1832
|
+
* The element to render as
|
|
1833
|
+
*/
|
|
1834
|
+
as?: ElementType | undefined
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1794
1837
|
export type ${componentName}<T extends ElementType> = {
|
|
1795
|
-
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T>) => JSX.Element
|
|
1838
|
+
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T> & AsProps) => JSX.Element
|
|
1796
1839
|
}
|
|
1797
1840
|
|
|
1798
1841
|
export interface JsxFactory {
|
|
@@ -1878,7 +1921,7 @@ function generateReactJsxFactory(ctx) {
|
|
|
1878
1921
|
...elementProps,
|
|
1879
1922
|
...normalizeHTMLProps(htmlProps),
|
|
1880
1923
|
className: classes(),
|
|
1881
|
-
},
|
|
1924
|
+
}, children ?? combinedProps.children)
|
|
1882
1925
|
})
|
|
1883
1926
|
|
|
1884
1927
|
const name = getDisplayName(__base__)
|
|
@@ -1991,7 +2034,7 @@ ${ctx.file.importType(upperName, "../types/jsx")}
|
|
|
1991
2034
|
export declare const ${factoryName}: ${upperName}
|
|
1992
2035
|
`,
|
|
1993
2036
|
jsxType: import_outdent27.outdent`
|
|
1994
|
-
import type {
|
|
2037
|
+
import type { ElementType, JSX, ComponentPropsWithRef, ComponentType, Component } from 'react'
|
|
1995
2038
|
${ctx.file.importType("RecipeDefinition, RecipeSelection, RecipeVariantRecord", "./recipe")}
|
|
1996
2039
|
${ctx.file.importType(
|
|
1997
2040
|
"Assign, DistributiveOmit, DistributiveUnion, JsxHTMLProps, JsxStyleProps, Pretty",
|
|
@@ -2009,27 +2052,34 @@ export interface UnstyledProps {
|
|
|
2009
2052
|
unstyled?: boolean | undefined
|
|
2010
2053
|
}
|
|
2011
2054
|
|
|
2012
|
-
export
|
|
2013
|
-
|
|
2055
|
+
export interface AsProps {
|
|
2056
|
+
/**
|
|
2057
|
+
* The element to render as
|
|
2058
|
+
*/
|
|
2059
|
+
as?: ElementType | undefined
|
|
2014
2060
|
}
|
|
2015
2061
|
|
|
2062
|
+
export type ComponentProps<T extends ElementType> = T extends ComponentType<infer P> | Component<infer P>
|
|
2063
|
+
? JSX.LibraryManagedAttributes<T, P>
|
|
2064
|
+
: ComponentPropsWithRef<T>
|
|
2065
|
+
|
|
2016
2066
|
export interface ${componentName}<T extends ElementType, P extends Dict = {}> {
|
|
2017
|
-
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
2018
|
-
displayName?: string
|
|
2067
|
+
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
2068
|
+
displayName?: string | undefined
|
|
2019
2069
|
}
|
|
2020
2070
|
|
|
2021
2071
|
interface RecipeFn {
|
|
2022
2072
|
__type: any
|
|
2023
2073
|
}
|
|
2024
2074
|
|
|
2025
|
-
interface JsxFactoryOptions<TProps extends Dict> {
|
|
2075
|
+
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
2026
2076
|
dataAttr?: boolean
|
|
2027
|
-
defaultProps?: TProps
|
|
2077
|
+
defaultProps?: Partial<TProps>
|
|
2028
2078
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
2029
2079
|
forwardProps?: string[]
|
|
2030
2080
|
}
|
|
2031
2081
|
|
|
2032
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, P>;
|
|
2082
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
|
|
2033
2083
|
|
|
2034
2084
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends ${componentName}<infer A, infer B>
|
|
2035
2085
|
? ${componentName}<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -2050,7 +2100,7 @@ export type JsxElements = {
|
|
|
2050
2100
|
|
|
2051
2101
|
export type ${upperName} = JsxFactory & JsxElements
|
|
2052
2102
|
|
|
2053
|
-
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
2103
|
+
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
2054
2104
|
|
|
2055
2105
|
export type ${variantName}<T extends ${componentName}<any, any>> = T extends ${componentName}<any, infer Props> ? Props : never
|
|
2056
2106
|
`
|
|
@@ -2085,16 +2135,20 @@ function generateReactCreateStyleContext(ctx) {
|
|
|
2085
2135
|
)}
|
|
2086
2136
|
}
|
|
2087
2137
|
|
|
2088
|
-
const withRootProvider = (Component) => {
|
|
2138
|
+
const withRootProvider = (Component, options) => {
|
|
2089
2139
|
const WithRootProvider = (props) => {
|
|
2090
2140
|
const [variantProps, otherProps] = svaFn.splitVariantProps(props)
|
|
2091
2141
|
|
|
2092
2142
|
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
2093
2143
|
slotStyles._classNameMap = svaFn.classNameMap
|
|
2094
2144
|
|
|
2145
|
+
const mergedProps = options?.defaultProps
|
|
2146
|
+
? { ...options.defaultProps, ...otherProps }
|
|
2147
|
+
: otherProps
|
|
2148
|
+
|
|
2095
2149
|
return createElement(StyleContext.Provider, {
|
|
2096
2150
|
value: slotStyles,
|
|
2097
|
-
children: createElement(Component,
|
|
2151
|
+
children: createElement(Component, mergedProps)
|
|
2098
2152
|
})
|
|
2099
2153
|
}
|
|
2100
2154
|
|
|
@@ -2162,11 +2216,11 @@ function generateReactCreateStyleContext(ctx) {
|
|
|
2162
2216
|
dts: import_outdent28.outdent`
|
|
2163
2217
|
${ctx.file.importType("SlotRecipeRuntimeFn, RecipeVariantProps", "../types/recipe")}
|
|
2164
2218
|
${ctx.file.importType("JsxHTMLProps, JsxStyleProps, Assign", "../types/system-types")}
|
|
2165
|
-
${ctx.file.importType("JsxFactoryOptions", "../types/jsx")}
|
|
2166
|
-
import type { ComponentType, ElementType
|
|
2219
|
+
${ctx.file.importType("JsxFactoryOptions, ComponentProps", "../types/jsx")}
|
|
2220
|
+
import type { ComponentType, ElementType } from 'react'
|
|
2167
2221
|
|
|
2168
2222
|
interface UnstyledProps {
|
|
2169
|
-
unstyled?: boolean
|
|
2223
|
+
unstyled?: boolean | undefined
|
|
2170
2224
|
}
|
|
2171
2225
|
|
|
2172
2226
|
type SvaFn<S extends string = any> = SlotRecipeRuntimeFn<S, any>
|
|
@@ -2179,29 +2233,36 @@ function generateReactCreateStyleContext(ctx) {
|
|
|
2179
2233
|
|
|
2180
2234
|
type InferSlot<R extends SlotRecipe> = R extends SlotRecipeFn ? R['__slot'] : R extends SvaFn<infer S> ? S : never
|
|
2181
2235
|
|
|
2182
|
-
|
|
2183
|
-
|
|
2236
|
+
interface WithProviderOptions<P = {}> {
|
|
2237
|
+
defaultProps?: Partial<P> | undefined
|
|
2184
2238
|
}
|
|
2185
2239
|
|
|
2186
2240
|
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
2187
2241
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
2188
2242
|
>
|
|
2243
|
+
|
|
2244
|
+
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = ComponentType<
|
|
2245
|
+
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
2246
|
+
>
|
|
2189
2247
|
|
|
2190
2248
|
type StyleContextConsumer<T extends ElementType> = ComponentType<
|
|
2191
2249
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
2192
2250
|
>
|
|
2193
2251
|
|
|
2194
2252
|
export interface StyleContext<R extends SlotRecipe> {
|
|
2195
|
-
withRootProvider: <T extends ElementType>(
|
|
2253
|
+
withRootProvider: <T extends ElementType>(
|
|
2254
|
+
Component: T,
|
|
2255
|
+
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
2256
|
+
) => StyleContextRootProvider<T, R>
|
|
2196
2257
|
withProvider: <T extends ElementType>(
|
|
2197
2258
|
Component: T,
|
|
2198
2259
|
slot: InferSlot<R>,
|
|
2199
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
2260
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
2200
2261
|
) => StyleContextProvider<T, R>
|
|
2201
2262
|
withContext: <T extends ElementType>(
|
|
2202
2263
|
Component: T,
|
|
2203
2264
|
slot: InferSlot<R>,
|
|
2204
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
2265
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
2205
2266
|
) => StyleContextConsumer<T>
|
|
2206
2267
|
}
|
|
2207
2268
|
|
|
@@ -2287,13 +2348,20 @@ interface Dict {
|
|
|
2287
2348
|
[k: string]: unknown
|
|
2288
2349
|
}
|
|
2289
2350
|
|
|
2351
|
+
export interface AsProps {
|
|
2352
|
+
/**
|
|
2353
|
+
* The element to render as
|
|
2354
|
+
*/
|
|
2355
|
+
as?: ElementType | undefined
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2290
2358
|
export type ComponentProps<T extends ElementType> = DistributiveOmit<ComponentPropsWithoutRef<T>, 'ref'> & {
|
|
2291
2359
|
ref?: Ref<ElementRef<T>>
|
|
2292
|
-
}
|
|
2360
|
+
} & AsProps
|
|
2293
2361
|
|
|
2294
2362
|
export type ${componentName}<T extends ElementType> = {
|
|
2295
2363
|
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T>) => JSX.Element
|
|
2296
|
-
displayName?: string
|
|
2364
|
+
displayName?: string | undefined
|
|
2297
2365
|
}
|
|
2298
2366
|
|
|
2299
2367
|
export interface JsxFactory {
|
|
@@ -2563,11 +2631,18 @@ export interface UnstyledProps {
|
|
|
2563
2631
|
unstyled?: boolean | undefined
|
|
2564
2632
|
}
|
|
2565
2633
|
|
|
2634
|
+
export interface AsProps {
|
|
2635
|
+
/**
|
|
2636
|
+
* The element to render as
|
|
2637
|
+
*/
|
|
2638
|
+
as?: ElementType | undefined
|
|
2639
|
+
}
|
|
2640
|
+
|
|
2566
2641
|
export type ElementType<P = any> = keyof JSX.IntrinsicElements | Component<P>
|
|
2567
2642
|
|
|
2568
2643
|
export interface ${componentName}<T extends ElementType, P extends Dict = {}> {
|
|
2569
|
-
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
2570
|
-
displayName?: string
|
|
2644
|
+
(props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
|
|
2645
|
+
displayName?: string | undefined
|
|
2571
2646
|
}
|
|
2572
2647
|
|
|
2573
2648
|
interface RecipeFn {
|
|
@@ -2576,12 +2651,12 @@ interface RecipeFn {
|
|
|
2576
2651
|
|
|
2577
2652
|
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
2578
2653
|
dataAttr?: boolean
|
|
2579
|
-
defaultProps?: TProps
|
|
2654
|
+
defaultProps?: Partial<TProps>
|
|
2580
2655
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
2581
2656
|
forwardProps?: string[]
|
|
2582
2657
|
}
|
|
2583
2658
|
|
|
2584
|
-
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, P>;
|
|
2659
|
+
export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
|
|
2585
2660
|
|
|
2586
2661
|
export type JsxElement<T extends ElementType, P extends Dict> = T extends ${componentName}<infer A, infer B>
|
|
2587
2662
|
? ${componentName}<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -2602,7 +2677,7 @@ export type JsxElements = {
|
|
|
2602
2677
|
|
|
2603
2678
|
export type ${upperName} = JsxFactory & JsxElements
|
|
2604
2679
|
|
|
2605
|
-
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
2680
|
+
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
2606
2681
|
|
|
2607
2682
|
export type ${variantName}<T extends ${componentName}<any, any>> = T extends ${componentName}<any, infer Props> ? Props : never
|
|
2608
2683
|
`
|
|
@@ -2639,15 +2714,17 @@ function generateSolidCreateStyleContext(ctx) {
|
|
|
2639
2714
|
}
|
|
2640
2715
|
|
|
2641
2716
|
|
|
2642
|
-
const withRootProvider = (Component) => {
|
|
2717
|
+
const withRootProvider = (Component, options) => {
|
|
2643
2718
|
const WithRootProvider = (props) => {
|
|
2644
2719
|
const finalProps = createMemo(() => {
|
|
2645
2720
|
const [variantProps, restProps] = svaFn.splitVariantProps(props)
|
|
2646
2721
|
|
|
2647
2722
|
const slotStyles = isConfigRecipe ? svaFn(variantProps) : svaFn.raw(variantProps)
|
|
2648
2723
|
slotStyles._classNameMap = svaFn.classNameMap
|
|
2724
|
+
|
|
2725
|
+
const mergedProps = options?.defaultProps ? mergeProps(options.defaultProps, restProps) : restProps
|
|
2649
2726
|
|
|
2650
|
-
return {
|
|
2727
|
+
return { mergedProps, slotStyles }
|
|
2651
2728
|
})
|
|
2652
2729
|
|
|
2653
2730
|
return createComponent(StyleContext.Provider, {
|
|
@@ -2655,7 +2732,7 @@ function generateSolidCreateStyleContext(ctx) {
|
|
|
2655
2732
|
get children() {
|
|
2656
2733
|
return createComponent(
|
|
2657
2734
|
Component,
|
|
2658
|
-
mergeProps(finalProps().
|
|
2735
|
+
mergeProps(finalProps().mergedProps, {
|
|
2659
2736
|
get children() {
|
|
2660
2737
|
return props.children
|
|
2661
2738
|
},
|
|
@@ -2744,7 +2821,11 @@ function generateSolidCreateStyleContext(ctx) {
|
|
|
2744
2821
|
import type { Component, JSX, ComponentProps } from 'solid-js'
|
|
2745
2822
|
|
|
2746
2823
|
interface UnstyledProps {
|
|
2747
|
-
unstyled?: boolean
|
|
2824
|
+
unstyled?: boolean | undefined
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
interface WithProviderOptions<P = {}> {
|
|
2828
|
+
defaultProps?: Partial<P> | undefined
|
|
2748
2829
|
}
|
|
2749
2830
|
type ElementType<P extends Record<string, any> = {}> = keyof JSX.IntrinsicElements | Component<P>
|
|
2750
2831
|
|
|
@@ -2761,22 +2842,29 @@ function generateSolidCreateStyleContext(ctx) {
|
|
|
2761
2842
|
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = Component<
|
|
2762
2843
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
2763
2844
|
>
|
|
2764
|
-
|
|
2845
|
+
|
|
2846
|
+
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = Component<
|
|
2847
|
+
ComponentProps<T> & UnstyledProps & RecipeVariantProps<R>
|
|
2848
|
+
>
|
|
2849
|
+
|
|
2765
2850
|
type StyleContextConsumer<T extends ElementType> = Component<
|
|
2766
2851
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
2767
2852
|
>
|
|
2768
2853
|
|
|
2769
2854
|
export interface StyleContext<R extends SlotRecipe> {
|
|
2770
|
-
withRootProvider: <T extends ElementType>(
|
|
2855
|
+
withRootProvider: <T extends ElementType>(
|
|
2856
|
+
Component: T,
|
|
2857
|
+
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
2858
|
+
) => StyleContextRootProvider<T, R>
|
|
2771
2859
|
withProvider: <T extends ElementType>(
|
|
2772
2860
|
Component: T,
|
|
2773
2861
|
slot: InferSlot<R>,
|
|
2774
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
2862
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
2775
2863
|
) => StyleContextProvider<T, R>
|
|
2776
2864
|
withContext: <T extends ElementType>(
|
|
2777
2865
|
Component: T,
|
|
2778
2866
|
slot: InferSlot<R>,
|
|
2779
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
2867
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
2780
2868
|
) => StyleContextConsumer<T>
|
|
2781
2869
|
}
|
|
2782
2870
|
|
|
@@ -2868,11 +2956,18 @@ interface Dict {
|
|
|
2868
2956
|
[k: string]: unknown
|
|
2869
2957
|
}
|
|
2870
2958
|
|
|
2959
|
+
export interface AsProps {
|
|
2960
|
+
/**
|
|
2961
|
+
* The element to render as
|
|
2962
|
+
*/
|
|
2963
|
+
as?: ElementType | undefined
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2871
2966
|
export type ElementType<P = any> = keyof JSX.IntrinsicElements | Component<P>
|
|
2872
2967
|
|
|
2873
2968
|
export type ${componentName}<T extends ElementType> = {
|
|
2874
|
-
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T>) => JSX.Element
|
|
2875
|
-
displayName?: string
|
|
2969
|
+
(args: { raw: readonly string[] | ArrayLike<string> }): (props: ComponentProps<T> & AsProps) => JSX.Element
|
|
2970
|
+
displayName?: string | undefined
|
|
2876
2971
|
}
|
|
2877
2972
|
|
|
2878
2973
|
export interface JsxFactory {
|
|
@@ -3146,8 +3241,15 @@ export interface UnstyledProps {
|
|
|
3146
3241
|
unstyled?: boolean | undefined
|
|
3147
3242
|
}
|
|
3148
3243
|
|
|
3244
|
+
export interface AsProps {
|
|
3245
|
+
/**
|
|
3246
|
+
* The element to render as
|
|
3247
|
+
*/
|
|
3248
|
+
as?: ElementType | undefined
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3149
3251
|
export interface ${componentName}<T extends ElementType, P extends Dict = {}> extends FunctionalComponent<
|
|
3150
|
-
JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P>>
|
|
3252
|
+
JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>
|
|
3151
3253
|
> {}
|
|
3152
3254
|
|
|
3153
3255
|
interface RecipeFn {
|
|
@@ -3156,12 +3258,12 @@ interface RecipeFn {
|
|
|
3156
3258
|
|
|
3157
3259
|
export interface JsxFactoryOptions<TProps extends Dict> {
|
|
3158
3260
|
dataAttr?: boolean
|
|
3159
|
-
defaultProps?: TProps
|
|
3261
|
+
defaultProps?: Partial<TProps>
|
|
3160
3262
|
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
|
|
3161
3263
|
forwardProps?: string[]
|
|
3162
3264
|
}
|
|
3163
3265
|
|
|
3164
|
-
export type JsxRecipeProps<T extends ElementType, P extends RecipeFn> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, Assign<JsxStyleProps, P['__type']>>;
|
|
3266
|
+
export type JsxRecipeProps<T extends ElementType, P extends RecipeFn> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P['__type']>>;
|
|
3165
3267
|
|
|
3166
3268
|
export type JsxElement<T extends ElementType, P> = T extends ${componentName}<infer A, infer B>
|
|
3167
3269
|
? ${componentName}<A, Pretty<DistributiveUnion<P, B>>>
|
|
@@ -3182,7 +3284,7 @@ export type JsxElements = {
|
|
|
3182
3284
|
|
|
3183
3285
|
export type ${upperName} = JsxFactory & JsxElements
|
|
3184
3286
|
|
|
3185
|
-
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps, JsxStyleProps>
|
|
3287
|
+
export type ${typeName}<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
|
|
3186
3288
|
|
|
3187
3289
|
export type ${variantName}<T extends ${componentName}<any, any>> = T extends ${componentName}<any, infer Props> ? Props : never
|
|
3188
3290
|
`
|
|
@@ -3217,7 +3319,7 @@ function generateVueCreateStyleContext(ctx) {
|
|
|
3217
3319
|
)}
|
|
3218
3320
|
}
|
|
3219
3321
|
|
|
3220
|
-
const withRootProvider = (Component) => {
|
|
3322
|
+
const withRootProvider = (Component, options) => {
|
|
3221
3323
|
const WithRootProvider = defineComponent({
|
|
3222
3324
|
props: svaFn.variantKeys,
|
|
3223
3325
|
setup(props, { slots }) {
|
|
@@ -3231,7 +3333,12 @@ function generateVueCreateStyleContext(ctx) {
|
|
|
3231
3333
|
|
|
3232
3334
|
provide(StyleContext, slotStyles)
|
|
3233
3335
|
|
|
3234
|
-
|
|
3336
|
+
const mergedProps = computed(() => {
|
|
3337
|
+
if (!options?.defaultProps) return otherProps
|
|
3338
|
+
return { ...options.defaultProps, ...otherProps }
|
|
3339
|
+
})
|
|
3340
|
+
|
|
3341
|
+
return () => h(Component, mergedProps.value, slots)
|
|
3235
3342
|
},
|
|
3236
3343
|
})
|
|
3237
3344
|
|
|
@@ -3322,7 +3429,11 @@ function generateVueCreateStyleContext(ctx) {
|
|
|
3322
3429
|
import type { Component, FunctionalComponent, NativeElements } from 'vue'
|
|
3323
3430
|
|
|
3324
3431
|
interface UnstyledProps {
|
|
3325
|
-
unstyled?: boolean
|
|
3432
|
+
unstyled?: boolean | undefined
|
|
3433
|
+
}
|
|
3434
|
+
|
|
3435
|
+
interface WithProviderOptions<P = {}> {
|
|
3436
|
+
defaultProps?: Partial<P> | undefined
|
|
3326
3437
|
}
|
|
3327
3438
|
|
|
3328
3439
|
// Add v-model support types
|
|
@@ -3353,22 +3464,29 @@ function generateVueCreateStyleContext(ctx) {
|
|
|
3353
3464
|
type StyleContextProvider<T extends ElementType, R extends SlotRecipe> = FunctionalComponent<
|
|
3354
3465
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps & VModelProps, Assign<RecipeVariantProps<R>, JsxStyleProps>>
|
|
3355
3466
|
>
|
|
3356
|
-
|
|
3467
|
+
|
|
3468
|
+
type StyleContextRootProvider<T extends ElementType, R extends SlotRecipe> = FunctionalComponent<
|
|
3469
|
+
ComponentProps<T> & UnstyledProps & VModelProps & RecipeVariantProps<R>
|
|
3470
|
+
>
|
|
3471
|
+
|
|
3357
3472
|
type StyleContextConsumer<T extends ElementType> = FunctionalComponent<
|
|
3358
3473
|
JsxHTMLProps<ComponentProps<T> & UnstyledProps & VModelProps, JsxStyleProps>
|
|
3359
3474
|
>
|
|
3360
3475
|
|
|
3361
3476
|
export interface StyleContext<R extends SlotRecipe> {
|
|
3362
|
-
withRootProvider: <T extends ElementType>(
|
|
3477
|
+
withRootProvider: <T extends ElementType>(
|
|
3478
|
+
Component: T,
|
|
3479
|
+
options?: WithProviderOptions<ComponentProps<T>> | undefined
|
|
3480
|
+
) => StyleContextRootProvider<T, R>
|
|
3363
3481
|
withProvider: <T extends ElementType>(
|
|
3364
3482
|
Component: T,
|
|
3365
3483
|
slot: InferSlot<R>,
|
|
3366
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
3484
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
3367
3485
|
) => StyleContextProvider<T, R>
|
|
3368
3486
|
withContext: <T extends ElementType>(
|
|
3369
3487
|
Component: T,
|
|
3370
3488
|
slot: InferSlot<R>,
|
|
3371
|
-
options?: JsxFactoryOptions<ComponentProps<T>>
|
|
3489
|
+
options?: JsxFactoryOptions<ComponentProps<T>> | undefined
|
|
3372
3490
|
) => StyleContextConsumer<T>
|
|
3373
3491
|
}
|
|
3374
3492
|
|
|
@@ -3492,8 +3610,15 @@ export type ComponentProps<T extends ElementType> = T extends IntrinsicElement
|
|
|
3492
3610
|
? Props
|
|
3493
3611
|
: never
|
|
3494
3612
|
|
|
3613
|
+
export interface AsProps {
|
|
3614
|
+
/**
|
|
3615
|
+
* The element to render as
|
|
3616
|
+
*/
|
|
3617
|
+
as?: ElementType | undefined
|
|
3618
|
+
}
|
|
3619
|
+
|
|
3495
3620
|
export type ${componentName}<T extends ElementType> = {
|
|
3496
|
-
(args: { raw: readonly string[] | ArrayLike<string> }): FunctionalComponent<ComponentProps<T
|
|
3621
|
+
(args: { raw: readonly string[] | ArrayLike<string> }): FunctionalComponent<ComponentProps<T> & AsProps>
|
|
3497
3622
|
}
|
|
3498
3623
|
|
|
3499
3624
|
export interface JsxFactory {
|
|
@@ -3583,7 +3708,7 @@ var import_ts_pattern14 = require("ts-pattern");
|
|
|
3583
3708
|
|
|
3584
3709
|
// src/artifacts/generated/composition.d.ts.json
|
|
3585
3710
|
var composition_d_ts_default = {
|
|
3586
|
-
content: "import type { CompositionStyleObject } from './system-types'\n\ninterface Token<T> {\n value: T\n description?: string\n}\n\ninterface Recursive<T> {\n [key: string]: Recursive<T> | T\n}\n\n/* -----------------------------------------------------------------------------\n * Text styles\n * -----------------------------------------------------------------------------*/\n\ntype TextStyleProperty =\n | 'font'\n | 'fontFamily'\n | 'fontFeatureSettings'\n | 'fontKerning'\n | 'fontLanguageOverride'\n | 'fontOpticalSizing'\n | 'fontPalette'\n | 'fontSize'\n | 'fontSizeAdjust'\n | 'fontStretch'\n | 'fontStyle'\n | 'fontSynthesis'\n | 'fontVariant'\n | 'fontVariantAlternates'\n | 'fontVariantCaps'\n | 'fontVariantLigatures'\n | 'fontVariantNumeric'\n | 'fontVariantPosition'\n | 'fontVariationSettings'\n | 'fontWeight'\n | 'hypens'\n | 'hyphenateCharacter'\n | 'hyphenateLimitChars'\n | 'letterSpacing'\n | 'lineBreak'\n | 'lineHeight'\n | 'quotes'\n | 'overflowWrap'\n | 'textCombineUpright'\n | 'textDecoration'\n | 'textDecorationColor'\n | 'textDecorationLine'\n | 'textDecorationSkipInk'\n | 'textDecorationStyle'\n | 'textDecorationThickness'\n | 'textEmphasis'\n | 'textEmphasisColor'\n | 'textEmphasisPosition'\n | 'textEmphasisStyle'\n | 'textIndent'\n | 'textJustify'\n | 'textOrientation'\n | 'textOverflow'\n | 'textRendering'\n | 'textShadow'\n | 'textTransform'\n | 'textUnderlineOffset'\n | 'textUnderlinePosition'\n | 'textWrap'\n | 'textWrapMode'\n | 'textWrapStyle'\n | 'verticalAlign'\n | 'whiteSpace'\n | 'wordBreak'\n | 'wordSpacing'\n\nexport type TextStyle = CompositionStyleObject<TextStyleProperty>\n\nexport type TextStyles = Recursive<Token<TextStyle>>\n\n/* -----------------------------------------------------------------------------\n * Layer styles\n * -----------------------------------------------------------------------------*/\n\ntype
|
|
3711
|
+
content: "import type { CompositionStyleObject } from './system-types'\n\ninterface Token<T> {\n value: T\n description?: string\n}\n\ninterface Recursive<T> {\n [key: string]: Recursive<T> | T\n}\n\n/* -----------------------------------------------------------------------------\n * Text styles\n * -----------------------------------------------------------------------------*/\n\ntype TextStyleProperty =\n | 'color'\n | 'direction'\n | 'font'\n | 'fontFamily'\n | 'fontFeatureSettings'\n | 'fontKerning'\n | 'fontLanguageOverride'\n | 'fontOpticalSizing'\n | 'fontPalette'\n | 'fontSize'\n | 'fontSizeAdjust'\n | 'fontStretch'\n | 'fontStyle'\n | 'fontSynthesis'\n | 'fontVariant'\n | 'fontVariantAlternates'\n | 'fontVariantCaps'\n | 'fontVariantLigatures'\n | 'fontVariantNumeric'\n | 'fontVariantPosition'\n | 'fontVariationSettings'\n | 'fontWeight'\n | 'hangingPunctuation'\n | 'hypens'\n | 'hyphenateCharacter'\n | 'hyphenateLimitChars'\n | 'letterSpacing'\n | 'lineBreak'\n | 'lineHeight'\n | 'quotes'\n | 'overflowWrap'\n | 'tabSize'\n | 'textAlign'\n | 'textAlignLast'\n | 'textCombineUpright'\n | 'textDecoration'\n | 'textDecorationColor'\n | 'textDecorationLine'\n | 'textDecorationSkip'\n | 'textDecorationSkipBox'\n | 'textDecorationSkipInk'\n | 'textDecorationSkipInset'\n | 'textDecorationStyle'\n | 'textDecorationThickness'\n | 'textEmphasis'\n | 'textEmphasisColor'\n | 'textEmphasisPosition'\n | 'textEmphasisStyle'\n | 'textIndent'\n | 'textJustify'\n | 'textOrientation'\n | 'textOverflow'\n | 'textRendering'\n | 'textShadow'\n | 'textStroke'\n | 'textStrokeColor'\n | 'textStrokeWidth'\n | 'textTransform'\n | 'textUnderlineOffset'\n | 'textUnderlinePosition'\n | 'textWrap'\n | 'textWrapMode'\n | 'textWrapStyle'\n | 'unicodeBidi'\n | 'verticalAlign'\n | 'whiteSpace'\n | 'wordBreak'\n | 'wordSpacing'\n | 'writingMode'\n\nexport type TextStyle = CompositionStyleObject<TextStyleProperty>\n\nexport type TextStyles = Recursive<Token<TextStyle>>\n\n/* -----------------------------------------------------------------------------\n * Layer styles\n * -----------------------------------------------------------------------------*/\n\ntype LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'\n\ntype PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'\n\ntype Placement = PhysicalPlacement | LogicalPlacement\n\ntype Radius =\n | `Top${'Right' | 'Left'}`\n | `Bottom${'Right' | 'Left'}`\n | `Start${'Start' | 'End'}`\n | `End${'Start' | 'End'}`\n\ntype LayerStyleProperty =\n | 'aspectRatio'\n | 'background'\n | 'backgroundColor'\n | 'backgroundImage'\n | 'border'\n | 'borderColor'\n | 'borderImage'\n | 'borderImageOutset'\n | 'borderImageRepeat'\n | 'borderImageSlice'\n | 'borderImageSource'\n | 'borderImageWidth'\n | 'borderRadius'\n | 'borderStyle'\n | 'borderWidth'\n | `border${Placement}`\n | `border${Placement}Color`\n | `border${Placement}Style`\n | `border${Placement}Width`\n | 'borderRadius'\n | `border${Radius}Radius`\n | 'boxShadow'\n | 'boxShadowColor'\n | 'clipPath'\n | 'color'\n | 'contain'\n | 'content'\n | 'contentVisibility'\n | 'cursor'\n | 'display'\n | 'filter'\n | 'backdropFilter'\n | 'height'\n | 'width'\n | 'minHeight'\n | 'minWidth'\n | 'maxHeight'\n | 'maxWidth'\n | `margin${Placement}`\n | 'inset'\n | `inset${LogicalPlacement}`\n | Lowercase<PhysicalPlacement>\n | 'isolation'\n | 'mask'\n | 'maskClip'\n | 'maskComposite'\n | 'maskImage'\n | 'maskMode'\n | 'maskOrigin'\n | 'maskPosition'\n | 'maskRepeat'\n | 'maskSize'\n | 'mixBlendMode'\n | 'objectFit'\n | 'objectPosition'\n | 'opacity'\n | 'outline'\n | 'outlineColor'\n | 'outlineOffset'\n | 'outlineStyle'\n | 'outlineWidth'\n | 'overflow'\n | 'overflowX'\n | 'overflowY'\n | 'padding'\n | `padding${Placement}`\n | 'pointerEvents'\n | 'position'\n | 'resize'\n | 'transform'\n | 'transition'\n | 'visibility'\n | 'willChange'\n | 'zIndex'\n | 'backgroundBlendMode'\n | 'backgroundAttachment'\n | 'backgroundClip'\n | 'backgroundOrigin'\n | 'backgroundPosition'\n | 'backgroundRepeat'\n | 'backgroundSize'\n\nexport type LayerStyle = CompositionStyleObject<LayerStyleProperty>\n\nexport type LayerStyles = Recursive<Token<LayerStyle>>\n\n/* -----------------------------------------------------------------------------\n * Motion styles\n * -----------------------------------------------------------------------------*/\n\ntype AnimationStyleProperty =\n | 'animation'\n | 'animationComposition'\n | 'animationDelay'\n | 'animationDirection'\n | 'animationDuration'\n | 'animationFillMode'\n | 'animationIterationCount'\n | 'animationName'\n | 'animationPlayState'\n | 'animationTimingFunction'\n | 'animationRange'\n | 'animationRangeStart'\n | 'animationRangeEnd'\n | 'animationTimeline'\n | 'transformOrigin'\n\nexport type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>\n\nexport type AnimationStyles = Recursive<Token<AnimationStyle>>\n\nexport interface CompositionStyles {\n textStyles: TextStyles\n layerStyles: LayerStyles\n animationStyles: AnimationStyles\n}\n"
|
|
3587
3712
|
};
|
|
3588
3713
|
|
|
3589
3714
|
// src/artifacts/generated/csstype.d.ts.json
|