Socket
Socket
Sign inDemoInstall

@stitches/core

Package Overview
Dependencies
Maintainers
3
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stitches/core - npm Package Compare versions

Comparing version 1.0.0-canary.2 to 1.0.0-canary.3

dist/index.iife.js

5

package.json
{
"name": "@stitches/core",
"version": "1.0.0-canary.2",
"version": "1.0.0-canary.3",
"description": "The modern CSS-in-JS library",

@@ -79,4 +79,3 @@ "type": "module",

"variables"
],
"gitHead": "f810d8569f43f81ea35ae9e4cd2d36df3e600de3"
]
}

3

types/index.d.ts

@@ -32,2 +32,5 @@ import type CreateStitches from './create-stitches'

/** Returns the properties, attributes, and children expected by a component. */
export type ComponentProps<Component> = Parameters<Component>[0]
/** Returns a type that expects a value to be a kind of CSS property value. */

@@ -34,0 +37,0 @@ export type PropertyValue<K extends keyof CSSUtil.CSSProperties> = { readonly [CSSUtil.$$PropertyValue]: K }

@@ -133,7 +133,4 @@ import type * as CSSUtil from './css-util'

StyledComponent.StyledComponentType<Composers>,
StyledComponent.StyledComponentProps<Composers>,
Media,
Theme,
ThemeMap,
Utils
StyledComponent.StyledComponentProps<Composers> & { css?: CSS },
Media
>

@@ -140,0 +137,0 @@ },

@@ -7,24 +7,10 @@ import type * as CSSUtil from './css-util'

export interface CssComponent<
TagName = 'span',
Type = 'span',
Props = {},
Media = Default.Media,
Theme = {},
ThemeMap = Default.ThemeMap,
Utils = {},
TransformedProps = TransformProps<Props, Media>,
CSS = CSSUtil.CSS<Media, Theme, ThemeMap, Utils>
Media = Default.Media
> {
<
Props extends {
css?: Props['css'] extends CSSUtil.CSS
? Props['css']
: CSS
}
>(
(
props?:
& Partial<TransformedProps>
& Props
& {
css?: Props['css']
}
& {
[name in number | string]: any

@@ -41,4 +27,4 @@ }

[$$StyledComponentType]: TagName
[$$StyledComponentProps]: Props
[$$StyledComponentType]: Type
[$$StyledComponentProps]: Omit<Props, 'css'>
[$$StyledComponentMedia]: Media

@@ -48,5 +34,12 @@ }

export type TransformProps<Props, Media> = {
[K in keyof Props]: Props[K] | {
[KMedia in Util.Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
}
[K in keyof Props]:
K extends 'css'
? Props['css'] extends CSSUtil.CSS
? Props['css']
: CSSUtil.CSS
:
| Props[K]
| {
[KMedia in Util.Prefixed<'@', 'initial' | keyof Media>]?: Props[K]
}
}

@@ -78,2 +71,4 @@

? T[0]
: T[0] extends (props: any) => any
? T[0]
: T[0] extends { [$$StyledComponentType]: unknown }

@@ -80,0 +75,0 @@ ? T[0][$$StyledComponentType]

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