@codecademy/variance
0.26.10.26.2-alpha.c8dfb9.0
~
Modified (3 files)
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,8 +1,8 @@
{
"name": "@codecademy/variance",
"description": "Constraint based CSS in JS for building scalable design systems",
- "version": "0.26.1",
+ "version": "0.26.2-alpha.c8dfb9.0",
"author": "codecaaron <[email protected]>",
"dependencies": {
"csstype": "^3.0.7",
"lodash": "^4.17.23" Index: package/dist/types/config.d.ts
===================================================================
--- package/dist/types/config.d.ts
+++ package/dist/types/config.d.ts
@@ -29,9 +29,9 @@
type BasePropertyKey<P> = P extends DirectionalProperty ? P['physical'] : P;
export type ScaleValue<Config extends Prop> = Config['scale'] extends keyof Theme ? keyof Theme[Config['scale']] | PropertyValues<BasePropertyKey<Config['property']>> : Config['scale'] extends MapScale ? keyof Config['scale'] | PropertyValues<BasePropertyKey<Config['property']>> : Config['scale'] extends ArrayScale ? Config['scale'][number] | PropertyValues<BasePropertyKey<Config['property']>> : PropertyValues<BasePropertyKey<Config['property']>, true>;
export type Scale<Config extends Prop> = ResponsiveProp<ScaleValue<Config> | ((theme: Theme) => ScaleValue<Config>)>;
export interface TransformFn<P extends string, Config extends Prop> {
- (value: Scale<Config> | Scale<Config>, prop: P, props: ThemeProps<{
+ (value: Scale<Config>, prop: P, props: ThemeProps<{
[K in P]?: Scale<Config>;
}>): CSSObject;
}
export interface PropTransformer<P extends string, C extends Prop> extends AbstractPropTransformer, Prop { Index: package/dist/utils/responsive.d.ts
===================================================================
--- package/dist/utils/responsive.d.ts
+++ package/dist/utils/responsive.d.ts
@@ -3,9 +3,9 @@
import { Breakpoints } from '../types/theme';
/**
* Destructures the themes breakpoints into an ordered structure to traverse
*/
-export declare const parseBreakpoints: (breakpoints?: Breakpoints | undefined) => BreakpointCache | null;
+export declare const parseBreakpoints: (breakpoints?: Breakpoints) => BreakpointCache | null;
export declare const isMediaArray: (val: unknown) => val is (string | number)[];
export declare const isMediaMap: (val: object) => val is BreakpointMap<string | number>;
interface ResponsiveParser<Bp extends BreakpointMap<string | number> | (string | number)[]> {
<C extends AbstractPropTransformer>(value: Bp, props: ThemeProps, config: C, breakpoints: Bp): CSSObject;