@theme-ui/core
Advanced tools
Comparing version 0.16.2-develop.2 to 0.16.2-develop.5
@@ -5,3 +5,3 @@ import { Theme } from '@theme-ui/css'; | ||
export type { ThemeUIJSX } from './jsx-namespace'; | ||
export type { CSSObject, CSSOthersObject, CSSProperties, CSSPseudoSelectorProps, ColorMode, ColorModesScale, Label, ResponsiveStyleValue, Scale, StylePropertyValue, TLengthStyledSystem, Theme, ThemeDerivedStyles, ThemeStyles, ThemeUICSSObject, ThemeUICSSProperties, ThemeUIExtendedCSSProperties, ThemeUIStyleObject, VariantProperty, } from '@theme-ui/css'; | ||
export type { CSSObject, CSSOthersObject, CSSProperties, CSSPseudoSelectorProps, ColorMode, ColorModesScale, Label, ResponsiveStyleValue, Scale, StylePropertyValue, TLengthStyledSystem, ThemeDerivedStyles, ThemeStyles, ThemeUICSSObject, ThemeUICSSProperties, ThemeUIExtendedCSSProperties, ThemeUIStyleObject, VariantProperty, } from '@theme-ui/css'; | ||
export * from './types'; | ||
@@ -8,0 +8,0 @@ export declare const jsx: typeof React.createElement; |
import { Interpolation } from '@emotion/react'; | ||
import { ThemeUIStyleObject, Theme as ThemeUITheme } from '@theme-ui/css'; | ||
import { Scale, ScaleDict, ThemeUIStyleObject, Theme as ThemeUITheme } from '@theme-ui/css'; | ||
export interface UserThemes { | ||
} | ||
/** @internal */ | ||
export type _UserTheme = UserThemes[keyof UserThemes]; | ||
/** Theme without array scales, so it's easier to read from inside of .sx prop */ | ||
export type WidenedTheme = { | ||
[P in keyof ThemeUITheme]: ThemeUITheme[P] extends Scale<infer R> | undefined ? ScaleDict<R> : ThemeUITheme[P]; | ||
} & ThemeUITheme; | ||
export type Theme<TTheme = {}> = _UserTheme extends never ? ThemeUITheme<TTheme> : _UserTheme; | ||
/** @internal */ | ||
export type _JSXTheme = _UserTheme extends never ? WidenedTheme : _UserTheme; | ||
export interface SxProp { | ||
@@ -10,3 +21,3 @@ /** | ||
*/ | ||
sx?: ThemeUIStyleObject; | ||
sx?: ThemeUIStyleObject<_JSXTheme>; | ||
/** | ||
@@ -13,0 +24,0 @@ * Theme UI uses Emotion's JSX function. You can pass styles to it directly |
{ | ||
"name": "@theme-ui/core", | ||
"version": "0.16.2-develop.2", | ||
"version": "0.16.2-develop.5", | ||
"source": "src/index.ts", | ||
@@ -47,3 +47,3 @@ "main": "dist/theme-ui-core.cjs.js", | ||
"deepmerge": "^4.2.2", | ||
"@theme-ui/css": "^0.16.2-develop.2" | ||
"@theme-ui/css": "^0.16.2-develop.5" | ||
}, | ||
@@ -58,3 +58,3 @@ "peerDependencies": { | ||
"react": "^18.1.0", | ||
"@theme-ui/test-utils": "^0.16.2-develop.2" | ||
"@theme-ui/test-utils": "^0.16.2-develop.5" | ||
}, | ||
@@ -61,0 +61,0 @@ "preconstruct": { |
@@ -26,3 +26,2 @@ import { | ||
TLengthStyledSystem, | ||
Theme, | ||
ThemeDerivedStyles, | ||
@@ -29,0 +28,0 @@ ThemeStyles, |
import { Interpolation } from '@emotion/react' | ||
import { ThemeUIStyleObject, Theme as ThemeUITheme } from '@theme-ui/css' | ||
import { | ||
Scale, | ||
ScaleDict, | ||
ThemeUIStyleObject, | ||
Theme as ThemeUITheme, | ||
} from '@theme-ui/css' | ||
export interface UserThemes {} | ||
/** @internal */ | ||
export type _UserTheme = UserThemes[keyof UserThemes] | ||
/** Theme without array scales, so it's easier to read from inside of .sx prop */ | ||
export type WidenedTheme = { | ||
[P in keyof ThemeUITheme]: ThemeUITheme[P] extends Scale<infer R> | undefined | ||
? ScaleDict<R> | ||
: ThemeUITheme[P] | ||
} & ThemeUITheme | ||
export type Theme<TTheme = {}> = _UserTheme extends never | ||
? ThemeUITheme<TTheme> | ||
: _UserTheme | ||
/** @internal */ | ||
export type _JSXTheme = _UserTheme extends never ? WidenedTheme : _UserTheme | ||
export interface SxProp { | ||
@@ -11,3 +35,3 @@ /** | ||
*/ | ||
sx?: ThemeUIStyleObject | ||
sx?: ThemeUIStyleObject<_JSXTheme> | ||
/** | ||
@@ -14,0 +38,0 @@ * Theme UI uses Emotion's JSX function. You can pass styles to it directly |
Sorry, the diff of this file is not supported yet
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
67548
1742