Comparing version 4.0.0-alpha.43 to 4.0.0-alpha.47
@@ -180,3 +180,7 @@ import { Platform } from 'react-native'; | ||
} | ||
const prop = key in aliases ? aliases[key] : key; | ||
const themedAliases = { | ||
...aliases, | ||
...theme.aliases, | ||
}; | ||
const prop = key in themedAliases ? themedAliases[key] : key; | ||
const scaleName = prop in scales ? scales[prop] : undefined; | ||
@@ -183,0 +187,0 @@ // @ts-expect-error |
@@ -101,2 +101,5 @@ import type { ViewStyle, TextStyle, ImageStyle } from 'react-native'; | ||
}>; | ||
aliases?: { | ||
[key: string]: keyof TextStyle; | ||
}; | ||
types?: { | ||
@@ -103,0 +106,0 @@ /** |
@@ -20,3 +20,3 @@ import type { ThemeUICSSProperties } from '@theme-ui/css'; | ||
}; | ||
type StyleableSxProperties = Exclude<Exclude<keyof ThemeUICSSProperties, 'textShadow' | 'boxShadow' | 'variant'> | keyof ViewStyle | keyof TextStyle | keyof ImageStyle, keyof NativeSx | keyof WebShadowSx>; | ||
type StyleableSxProperties = Exclude<Exclude<keyof ThemeUICSSProperties, 'textShadow' | 'boxShadow' | 'variant'> | keyof ViewStyle | keyof TextStyle | keyof DripsyFinalTheme['aliases'] | keyof ImageStyle, keyof NativeSx | keyof WebShadowSx>; | ||
type NativeStyleProperties = ViewStyle & TextStyle & ImageStyle; | ||
@@ -46,3 +46,3 @@ type MaybeNativeStyleValue<StyleKeyOrAlias extends StyleableSxProperties, StyleKey = AliasToStyleKey<StyleKeyOrAlias>> = StyleKey extends keyof NativeStyleProperties ? NativeStyleProperties[StyleKey] : MaybeThemeUiStyle<StyleKeyOrAlias>; | ||
type MaybeScaleFromStyleKeyOrAlias<StyleKey extends StyleableSxProperties> = MaybeScaleFromStyleKey<AliasToStyleKey<StyleKey>>; | ||
type AliasToStyleKey<StyleKeyOrAlias extends StyleableSxProperties> = StyleKeyOrAlias extends keyof Aliases ? Aliases[StyleKeyOrAlias] : StyleKeyOrAlias; | ||
type AliasToStyleKey<StyleKeyOrAlias extends StyleableSxProperties> = StyleKeyOrAlias extends keyof Aliases ? Aliases[StyleKeyOrAlias] : StyleKeyOrAlias extends keyof DripsyFinalTheme['aliases'] ? DripsyFinalTheme['aliases'][StyleKeyOrAlias] : StyleKeyOrAlias; | ||
type MaybeTokensObjectFromScale<Key extends Scales[keyof Scales]> = Key extends keyof DripsyFinalTheme ? DripsyFinalTheme[Key] : never; | ||
@@ -49,0 +49,0 @@ type MaybeTokenOptionsFromScale<Key extends Scales[keyof Scales] | undefined> = Key extends Scales[keyof Scales] ? MaybeTokensObjectFromScale<Key> extends Record<string, unknown> ? `${Extract<keyof MaybeTokensObjectFromScale<Key>, string>}` : undefined : undefined; |
{ | ||
"name": "dripsy", | ||
"version": "4.0.0-alpha.43+f89ea07", | ||
"version": "4.0.0-alpha.47+30b0c4a", | ||
"description": "🍷 A super-simple responsive design system for React Native Web.", | ||
@@ -89,3 +89,3 @@ "main": "build/index.js", | ||
"sideEffects": false, | ||
"gitHead": "f89ea076e4732a2e951bb9c4e89cb65474c39ddf" | ||
"gitHead": "30b0c4ac0c984a8a22cdf1745da6be0b735f502f" | ||
} |
@@ -0,1 +1,3 @@ | ||
import { DripsyFinalTheme } from '../types-v2/declarations' | ||
export const aliases = { | ||
@@ -2,0 +4,0 @@ zi: 'zIndex', |
@@ -131,2 +131,5 @@ import type { ViewStyle, TextStyle, ImageStyle } from 'react-native' | ||
}> | ||
aliases?: { | ||
[key: string]: keyof TextStyle | ||
} | ||
types?: { | ||
@@ -133,0 +136,0 @@ /** |
@@ -71,2 +71,3 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ | ||
| keyof TextStyle | ||
| keyof DripsyFinalTheme['aliases'] | ||
| keyof ImageStyle, | ||
@@ -224,2 +225,4 @@ keyof NativeSx | keyof WebShadowSx | ||
? Aliases[StyleKeyOrAlias] | ||
: StyleKeyOrAlias extends keyof DripsyFinalTheme['aliases'] | ||
? DripsyFinalTheme['aliases'][StyleKeyOrAlias] | ||
: StyleKeyOrAlias | ||
@@ -226,0 +229,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
299168
204
4451