Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stylexjs/stylex

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stylexjs/stylex - npm Package Compare versions

Comparing version 0.1.0-beta.7 to 0.2.0-beta.8

23

lib/stylex.d.ts

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc