@codecademy/variance 0.26.1-alpha.2a681b.0 → 0.26.1-alpha.40e3a3.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/core.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { AbstractParser, AbstractPropTransformer, Compose, CSS, Parser, Prop, PropTransformer, States, TransformerMap, Variant } from './types/config';
2
2
  export declare const variance: {
3
3
  createParser<Config extends Record<string, AbstractPropTransformer>>(config: Config): Parser<Config>;
4
- createTransform<P extends string, Config_1 extends Prop>(prop: P, config: Config_1): PropTransformer<P, Config_1>;
4
+ createTransform<P extends string, Config extends Prop>(prop: P, config: Config): PropTransformer<P, Config>;
5
5
  compose<Args extends AbstractParser[]>(...parsers: Args): Parser<Compose<Args>>;
6
- createCss<Config_2 extends Record<string, Prop>, P_1 extends Parser<TransformerMap<Config_2>>>(config: Config_2): CSS<P_1>;
7
- createVariant<Config_3 extends Record<string, Prop>, P_2 extends Parser<TransformerMap<Config_3>>>(config: Config_3): Variant<P_2>;
8
- createStates<Config_4 extends Record<string, Prop>, P_3 extends Parser<TransformerMap<Config_4>>>(config: Config_4): States<P_3>;
9
- create<Config_5 extends Record<string, Prop>>(config: Config_5): Parser<TransformerMap<Config_5>>;
6
+ createCss<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): CSS<P>;
7
+ createVariant<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): Variant<P>;
8
+ createStates<Config extends Record<string, Prop>, P extends Parser<TransformerMap<Config>>>(config: Config): States<P>;
9
+ create<Config extends Record<string, Prop>>(config: Config): Parser<TransformerMap<Config>>;
10
10
  };
@@ -39,7 +39,9 @@ class ThemeBuilder {
39
39
  const {
40
40
  variables,
41
41
  tokens
42
- } = serializeTokens(flatColors, 'color', this.#theme);
42
+ } = serializeTokens(
43
+ // TS 5.9+ no longer resolves LiteralPaths<> as assignable to SerializedTokensInput; flattened scales are plain token maps at runtime.
44
+ flatColors, 'color', this.#theme);
43
45
  this.#theme = merge({}, this.#theme, {
44
46
  colors: tokens,
45
47
  _variables: {
@@ -1,5 +1,5 @@
1
1
  import { Prop } from '../types/config';
2
2
  import { ThemeProps } from '../types/props';
3
3
  type GetScaleValue = (val: string | number, props: ThemeProps) => string | number | undefined;
4
- export declare const createScaleLookup: (scale: Prop['scale']) => GetScaleValue;
4
+ export declare const createScaleLookup: (scale: Prop["scale"]) => GetScaleValue;
5
5
  export {};
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.1-alpha.2a681b.0",
4
+ "version": "0.26.1-alpha.40e3a3.0",
5
5
  "author": "codecaaron <aaron@codecademy.com>",
6
6
  "dependencies": {
7
7
  "csstype": "^3.0.7",
@@ -32,5 +32,5 @@
32
32
  "build": "nx build @codecademy/variance"
33
33
  },
34
34
  "types": "dist/index.d.ts",
35
- "gitHead": "b325f3474496b9fe2f8035686ad12a6a3ce98c1d"
35
+ "gitHead": "cf6124f51a2e9835858e248aa86efe757e1653f6"
36
36
  }