@stylexjs/stylex
Advanced tools
Comparing version 0.1.0-beta.7 to 0.2.0-beta.8
@@ -41,3 +41,3 @@ /** | ||
type Stylex$Create = <S extends StyleXNamespaceSet>( | ||
type Stylex$Create = <S extends NamespaceSet>( | ||
styles: S | ||
@@ -47,8 +47,5 @@ ) => $ReadOnly<{ | ||
readonly [P in keyof S[K]]: S[K][P] extends string | number | ||
? StyleXClassNameFor<P, S[K][P]> | ||
? ClassNameFor<P, S[K][P]> | ||
: { | ||
readonly [F in keyof S[K][P]]: StyleXClassNameFor< | ||
`${P}+${F}`, | ||
S[K][P][F] | ||
>; | ||
readonly [F in keyof S[K][P]]: ClassNameFor<`${P}+${F}`, S[K][P][F]>; | ||
}; | ||
@@ -61,15 +58,13 @@ }; | ||
) => { | ||
readonly [K in keyof S]: S[K] extends ClassNameFor<K, infer V> | ||
? V | ||
: Uncompiled<S[K]>; | ||
readonly [K in keyof S]: S[K] extends ClassNameFor<K, infer V> ? V : S[K]; | ||
}; | ||
type Stylex$Keyframes = <S extends StyleXNamespaceSet>( | ||
animationConfig: S | ||
) => string; | ||
type Stylex$Keyframes = <S extends NamespaceSet>(animationConfig: S) => string; | ||
type stylex = { | ||
type NestedArray<T> = T | Array<T | NestedArray<T>>; | ||
declare let stylex: { | ||
( | ||
...styles: ReadonlyArray< | ||
StyleXArray<(CompiledNamespace | null | undefined) | boolean> | ||
NestedArray<(CompiledNamespace | null | undefined) | boolean> | ||
> | ||
@@ -76,0 +71,0 @@ ): string; |
@@ -58,3 +58,3 @@ /** | ||
// Style declarations, e.g., opacity: 's3fkgpd' | ||
if (typeof value === 'string') { | ||
if (typeof value === 'string' || value === null) { | ||
// Skip adding to the chunks if property has already been seen | ||
@@ -64,3 +64,5 @@ if (!definedProperties.includes(prop)) { | ||
definedPropertiesChunk.push(prop); | ||
classNameChunk += classNameChunk ? ' ' + value : value; | ||
if (typeof value === 'string') { | ||
classNameChunk += classNameChunk ? ' ' + value : value; | ||
} | ||
} | ||
@@ -67,0 +69,0 @@ } |
{ | ||
"name": "@stylexjs/stylex", | ||
"version": "0.1.0-beta.7", | ||
"version": "0.2.0-beta.8", | ||
"description": "A minimal runtime styling library for web.", | ||
@@ -5,0 +5,0 @@ "main": "lib/stylex.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
15635
457