@codecademy/variance 0.26.2-alpha.ac2b28.0 → 0.26.2-alpha.c8dfb9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/types/config.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ type BasePropertyKey<P> = P extends DirectionalProperty ? P['physical'] : P;
|
|
|
30
30
|
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>;
|
|
31
31
|
export type Scale<Config extends Prop> = ResponsiveProp<ScaleValue<Config> | ((theme: Theme) => ScaleValue<Config>)>;
|
|
32
32
|
export interface TransformFn<P extends string, Config extends Prop> {
|
|
33
|
-
(value: Scale<Config
|
|
33
|
+
(value: Scale<Config>, prop: P, props: ThemeProps<{
|
|
34
34
|
[K in P]?: Scale<Config>;
|
|
35
35
|
}>): CSSObject;
|
|
36
36
|
}
|
|
@@ -4,7 +4,7 @@ import { Breakpoints } from '../types/theme';
|
|
|
4
4
|
/**
|
|
5
5
|
* Destructures the themes breakpoints into an ordered structure to traverse
|
|
6
6
|
*/
|
|
7
|
-
export declare const parseBreakpoints: (breakpoints?: Breakpoints
|
|
7
|
+
export declare const parseBreakpoints: (breakpoints?: Breakpoints) => BreakpointCache | null;
|
|
8
8
|
export declare const isMediaArray: (val: unknown) => val is (string | number)[];
|
|
9
9
|
export declare const isMediaMap: (val: object) => val is BreakpointMap<string | number>;
|
|
10
10
|
interface ResponsiveParser<Bp extends BreakpointMap<string | number> | (string | number)[]> {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/variance",
|
|
3
3
|
"description": "Constraint based CSS in JS for building scalable design systems",
|
|
4
|
-
"version": "0.26.2-alpha.
|
|
4
|
+
"version": "0.26.2-alpha.c8dfb9.0",
|
|
5
5
|
"author": "codecaaron <aaron@codecademy.com>",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"csstype": "^3.0.7",
|