Socket
Socket
Sign inDemoInstall

@emotion/styled

Package Overview
Dependencies
Maintainers
3
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emotion/styled - npm Package Compare versions

Comparing version 11.0.0-next.7 to 11.0.0-next.8

22

CHANGELOG.md
# @emotion/styled
## 11.0.0-next.8
### Major Changes
- [`c643107`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@joltmode](https://github.com/joltmode)! - Reworked TypeScript definitions so it's easier to provide a type for Theme. Instead of creating custom instances (like before) you can augment builtin Theme interface like this:
```ts
declare module '@emotion/core' {
export interface Theme {
primaryColor: string
secondaryColor: string
}
}
```
### Patch Changes
- Updated dependencies [[`c643107`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`c643107`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`c643107`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b), [`c643107`](https://github.com/emotion-js/emotion/commit/c6431074cf52a4bb64587c86ce5d42fe2d49230b)]:
- babel-plugin-emotion@11.0.0-next.8
- @emotion/core@11.0.0-next.8
- @emotion/serialize@0.12.0-next.3
## 11.0.0-next.7

@@ -4,0 +26,0 @@

10

package.json
{
"name": "@emotion/styled",
"version": "11.0.0-next.7",
"version": "11.0.0-next.8",
"description": "styled API for emotion",

@@ -16,9 +16,9 @@ "main": "dist/styled.cjs.js",

"@emotion/is-prop-valid": "0.9.0-next.1",
"@emotion/serialize": "^0.11.15-next.2",
"@emotion/serialize": "^0.12.0-next.3",
"@emotion/utils": "0.11.2",
"babel-plugin-emotion": "^11.0.0-next.6"
"babel-plugin-emotion": "^11.0.0-next.8"
},
"peerDependencies": {
"@babel/core": "^7.0.0",
"@emotion/core": "^11.0.0-next.7",
"@emotion/core": "^11.0.0-next.8",
"react": ">=16.8.0"

@@ -33,3 +33,3 @@ },

"@babel/core": "^7.7.2",
"@emotion/core": "^11.0.0-next.7",
"@emotion/core": "^11.0.0-next.8",
"dtslint": "^0.3.0",

@@ -36,0 +36,0 @@ "react": "^16.11.0"

@@ -17,3 +17,3 @@ // Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>

import { ComponentSelector, Interpolation } from '@emotion/serialize'
import { PropsOf, DistributiveOmit } from '@emotion/core'
import { PropsOf, DistributiveOmit, Theme } from '@emotion/core'

@@ -23,4 +23,3 @@ export {

CSSObject,
FunctionInterpolation,
ObjectInterpolation
FunctionInterpolation
} from '@emotion/serialize'

@@ -78,3 +77,6 @@

Interpolation<
ComponentProps & SpecificComponentProps & StyleProps & AdditionalProps
ComponentProps &
SpecificComponentProps &
StyleProps &
AdditionalProps & { theme: Theme }
>

@@ -90,3 +92,6 @@ >

Interpolation<
ComponentProps & SpecificComponentProps & AdditionalProps & StyleProps
ComponentProps &
SpecificComponentProps &
StyleProps &
AdditionalProps & { theme: Theme }
>

@@ -106,3 +111,3 @@ >

*/
export interface CreateStyled<Theme extends {} = any> {
export interface CreateStyled {
<

@@ -116,7 +121,3 @@ C extends React.ComponentType<React.ComponentProps<C>>,

options: FilteringStyledOptions<PropsOf<C>, ForwardedProps>
): CreateStyledComponent<
Pick<PropsOf<C>, ForwardedProps> & { theme?: Theme },
{},
{ theme: Theme }
>
): CreateStyledComponent<Pick<PropsOf<C>, ForwardedProps> & { theme?: Theme }>

@@ -126,3 +127,3 @@ <C extends React.ComponentType<React.ComponentProps<C>>>(

options?: StyledOptions<PropsOf<C>>
): CreateStyledComponent<PropsOf<C> & { theme?: Theme }, {}, { theme: Theme }>
): CreateStyledComponent<PropsOf<C> & { theme?: Theme }>

@@ -137,4 +138,3 @@ <

{ theme?: Theme },
Pick<JSX.IntrinsicElements[Tag], ForwardedProps>,
{ theme: Theme }
Pick<JSX.IntrinsicElements[Tag], ForwardedProps>
>

@@ -145,7 +145,3 @@

options?: StyledOptions<JSX.IntrinsicElements[Tag]>
): CreateStyledComponent<
{ theme?: Theme },
JSX.IntrinsicElements[Tag],
{ theme: Theme }
>
): CreateStyledComponent<{ theme?: Theme }, JSX.IntrinsicElements[Tag]>
}

@@ -152,0 +148,0 @@

// Definitions by: Junyoung Clare Jang <https://github.com/Ailrun>
// TypeScript Version: 3.2
import { Theme } from '@emotion/core'
import { CreateStyled as BaseCreateStyled, CreateStyledComponent } from './base'

@@ -12,3 +13,2 @@

Interpolation,
ObjectInterpolation,
StyledComponent,

@@ -19,15 +19,12 @@ StyledOptions,

export type StyledTags<Theme extends {} = any> = {
export type StyledTags = {
[Tag in keyof JSX.IntrinsicElements]: CreateStyledComponent<
{ theme?: Theme },
JSX.IntrinsicElements[Tag],
{ theme: Theme }
JSX.IntrinsicElements[Tag]
>
}
export interface CreateStyled<Theme extends {} = any>
extends BaseCreateStyled<Theme>,
StyledTags<Theme> {}
export interface CreateStyled extends BaseCreateStyled, StyledTags {}
declare const styled: CreateStyled
export default styled

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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