@animus-ui/core 0.1.1-beta.9 → 0.1.1-c1f8c140.1

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.
Files changed (46) hide show
  1. package/CHANGELOG.md +38 -18
  2. package/dist/Animus.d.ts +75 -63
  3. package/dist/AnimusConfig.d.ts +8 -8
  4. package/dist/AnimusExtended.d.ts +47 -0
  5. package/dist/__fixtures__/testConfig.d.ts +153 -153
  6. package/dist/compatTheme.d.ts +28 -20
  7. package/dist/config.d.ts +2321 -2193
  8. package/dist/createAnimus.d.ts +2 -2
  9. package/dist/index.d.ts +1084 -1019
  10. package/dist/index.js +1946 -0
  11. package/dist/legacy/compose.d.ts +2 -2
  12. package/dist/legacy/config.d.ts +86 -85
  13. package/dist/legacy/core.d.ts +12 -12
  14. package/dist/legacy/create.d.ts +2 -2
  15. package/dist/legacy/createCss.d.ts +2 -2
  16. package/dist/legacy/createParser.d.ts +2 -9
  17. package/dist/legacy/createStates.d.ts +2 -2
  18. package/dist/legacy/createTransform.d.ts +2 -2
  19. package/dist/legacy/createVariant.d.ts +2 -2
  20. package/dist/legacy/responsive.d.ts +14 -14
  21. package/dist/properties/getStylePropNames.d.ts +1 -1
  22. package/dist/properties/orderPropNames.d.ts +6 -6
  23. package/dist/properties/styledOptions.d.ts +20 -21
  24. package/dist/scales/createScale.d.ts +6 -3
  25. package/dist/scales/lookupScaleValue.d.ts +3 -3
  26. package/dist/styles/createParser.d.ts +2 -9
  27. package/dist/styles/createPropertyStyle.d.ts +4 -3
  28. package/dist/styles/createStylist.d.ts +2 -2
  29. package/dist/styles/responsive.d.ts +14 -14
  30. package/dist/transforms/border.d.ts +1 -1
  31. package/dist/transforms/grid.d.ts +4 -4
  32. package/dist/transforms/index.d.ts +4 -4
  33. package/dist/transforms/size.d.ts +2 -2
  34. package/dist/transforms/utils.d.ts +2 -2
  35. package/dist/types/config.d.ts +50 -44
  36. package/dist/types/properties.d.ts +23 -26
  37. package/dist/types/props.d.ts +34 -43
  38. package/dist/types/scales.d.ts +2 -2
  39. package/dist/types/shared.d.ts +4 -4
  40. package/dist/types/theme.d.ts +17 -17
  41. package/dist/types/utils.d.ts +4 -4
  42. package/package.json +9 -9
  43. package/rollup.config.js +2 -2
  44. package/tsconfig.json +4 -2
  45. package/dist/index.cjs.js +0 -1
  46. package/dist/index.esm.js +0 -1
package/CHANGELOG.md CHANGED
@@ -3,86 +3,106 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [0.1.1-beta.9](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.8...@animus-ui/core@0.1.1-beta.9) (2022-01-18)
6
+ ## [0.1.1-beta.24](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.23...@animus-ui/core@0.1.1-beta.24) (2023-03-15)
7
7
 
8
8
  **Note:** Version bump only for package @animus-ui/core
9
9
 
10
+ ## [0.1.1-beta.23](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.22...@animus-ui/core@0.1.1-beta.23) (2023-03-15)
10
11
 
12
+ **Note:** Version bump only for package @animus-ui/core
11
13
 
14
+ ## [0.1.1-beta.22](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.21...@animus-ui/core@0.1.1-beta.22) (2023-03-13)
12
15
 
16
+ **Note:** Version bump only for package @animus-ui/core
13
17
 
14
- ## [0.1.1-beta.8](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.7...@animus-ui/core@0.1.1-beta.8) (2022-01-16)
18
+ ## [0.1.1-beta.21](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.20...@animus-ui/core@0.1.1-beta.21) (2022-03-25)
15
19
 
16
20
  **Note:** Version bump only for package @animus-ui/core
17
21
 
22
+ ## [0.1.1-beta.20](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.19...@animus-ui/core@0.1.1-beta.20) (2022-02-14)
18
23
 
24
+ **Note:** Version bump only for package @animus-ui/core
19
25
 
26
+ ## [0.1.1-beta.19](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.18...@animus-ui/core@0.1.1-beta.19) (2022-02-14)
20
27
 
28
+ **Note:** Version bump only for package @animus-ui/core
21
29
 
22
- ## [0.1.1-beta.7](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.6...@animus-ui/core@0.1.1-beta.7) (2022-01-16)
30
+ ## [0.1.1-beta.18](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.17...@animus-ui/core@0.1.1-beta.18) (2022-02-11)
23
31
 
24
32
  **Note:** Version bump only for package @animus-ui/core
25
33
 
34
+ ## [0.1.1-beta.17](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.16...@animus-ui/core@0.1.1-beta.17) (2022-02-02)
26
35
 
36
+ **Note:** Version bump only for package @animus-ui/core
27
37
 
38
+ ## [0.1.1-beta.16](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.15...@animus-ui/core@0.1.1-beta.16) (2022-02-02)
28
39
 
40
+ **Note:** Version bump only for package @animus-ui/core
29
41
 
30
- ## [0.1.1-beta.6](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.5...@animus-ui/core@0.1.1-beta.6) (2022-01-11)
42
+ ## [0.1.1-beta.15](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.14...@animus-ui/core@0.1.1-beta.15) (2022-01-26)
31
43
 
32
44
  **Note:** Version bump only for package @animus-ui/core
33
45
 
46
+ ## [0.1.1-beta.14](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.13...@animus-ui/core@0.1.1-beta.14) (2022-01-24)
34
47
 
48
+ **Note:** Version bump only for package @animus-ui/core
35
49
 
50
+ ## [0.1.1-beta.13](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.12...@animus-ui/core@0.1.1-beta.13) (2022-01-24)
36
51
 
52
+ **Note:** Version bump only for package @animus-ui/core
37
53
 
38
- ## [0.1.1-beta.5](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.4...@animus-ui/core@0.1.1-beta.5) (2022-01-09)
54
+ ## [0.1.1-beta.12](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.11...@animus-ui/core@0.1.1-beta.12) (2022-01-24)
39
55
 
40
56
  **Note:** Version bump only for package @animus-ui/core
41
57
 
58
+ ## [0.1.1-beta.11](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.10...@animus-ui/core@0.1.1-beta.11) (2022-01-24)
42
59
 
60
+ **Note:** Version bump only for package @animus-ui/core
43
61
 
62
+ ## [0.1.1-beta.10](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.9...@animus-ui/core@0.1.1-beta.10) (2022-01-23)
44
63
 
64
+ **Note:** Version bump only for package @animus-ui/core
45
65
 
46
- ## [0.1.1-beta.4](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.3...@animus-ui/core@0.1.1-beta.4) (2022-01-09)
66
+ ## [0.1.1-beta.9](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.8...@animus-ui/core@0.1.1-beta.9) (2022-01-18)
47
67
 
48
68
  **Note:** Version bump only for package @animus-ui/core
49
69
 
70
+ ## [0.1.1-beta.8](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.7...@animus-ui/core@0.1.1-beta.8) (2022-01-16)
50
71
 
72
+ **Note:** Version bump only for package @animus-ui/core
51
73
 
74
+ ## [0.1.1-beta.7](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.6...@animus-ui/core@0.1.1-beta.7) (2022-01-16)
52
75
 
76
+ **Note:** Version bump only for package @animus-ui/core
53
77
 
54
- ## [0.1.1-beta.3](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.2...@animus-ui/core@0.1.1-beta.3) (2022-01-09)
78
+ ## [0.1.1-beta.6](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.5...@animus-ui/core@0.1.1-beta.6) (2022-01-11)
55
79
 
56
80
  **Note:** Version bump only for package @animus-ui/core
57
81
 
82
+ ## [0.1.1-beta.5](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.4...@animus-ui/core@0.1.1-beta.5) (2022-01-09)
58
83
 
84
+ **Note:** Version bump only for package @animus-ui/core
59
85
 
86
+ ## [0.1.1-beta.4](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.3...@animus-ui/core@0.1.1-beta.4) (2022-01-09)
60
87
 
88
+ **Note:** Version bump only for package @animus-ui/core
61
89
 
62
- ## 0.1.1-beta.2 (2022-01-09)
90
+ ## [0.1.1-beta.3](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.2...@animus-ui/core@0.1.1-beta.3) (2022-01-09)
63
91
 
92
+ **Note:** Version bump only for package @animus-ui/core
64
93
 
94
+ ## 0.1.1-beta.2 (2022-01-09)
65
95
 
66
96
  ## 0.1.1-beta.1 (2022-01-09)
67
97
 
68
-
69
-
70
98
  ## 0.1.1-beta.0 (2022-01-09)
71
99
 
72
100
  **Note:** Version bump only for package @animus-ui/core
73
101
 
74
-
75
-
76
-
77
-
78
102
  ## [0.1.1-beta.1](https://github.com/codecaaron/animus/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2022-01-09)
79
103
 
80
104
  **Note:** Version bump only for package @animus-ui/core
81
105
 
82
-
83
-
84
-
85
-
86
106
  ## 0.1.1-beta.0 (2022-01-09)
87
107
 
88
108
  **Note:** Version bump only for package @animus-ui/core
package/dist/Animus.d.ts CHANGED
@@ -1,63 +1,75 @@
1
- /// <reference types="react" />
2
- import { AbstractProps, CSSPropMap, CSSProps, ThemeProps } from './types/props';
3
- import { CSSObject } from './types/shared';
4
- import { Parser, Prop, SystemProps, VariantConfig } from './types/config';
5
- import { Arg } from './types/utils';
6
- export declare class AnimusWithAll<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, Prop>> {
7
- propRegistry: PropRegistry;
8
- groupRegistry: GroupRegistry;
9
- parser: BaseParser;
10
- baseStyles: BaseStyles;
11
- statesConfig: States;
12
- variants: Variants;
13
- activeGroups: ActiveGroups;
14
- custom: CustomProps;
15
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
16
- asComponent<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
17
- theme?: import("@emotion/react").Theme | undefined;
18
- as?: import("react").ElementType<any> | undefined;
19
- } & { [K_4 in keyof ThemeProps<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>]: ThemeProps<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>[K_4]; }, JSX.IntrinsicElements[T], {}>;
20
- build(): (props: { [K in keyof ThemeProps<{ [K_1 in keyof Arg<BaseParser> as K_1 extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K_1 : never]?: Arg<BaseParser>[K_1] | undefined; } & { [K_2 in keyof Variants]?: keyof Variants[K_2]["variants"] | undefined; } & { [K_3 in keyof States]?: boolean | undefined; } & { [K_4 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_4]; }>]: ThemeProps<{ [K_1 in keyof Arg<BaseParser> as K_1 extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K_1 : never]?: Arg<BaseParser>[K_1] | undefined; } & { [K_2 in keyof Variants]?: keyof Variants[K_2]["variants"] | undefined; } & { [K_3 in keyof States]?: boolean | undefined; } & { [K_4 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_4]; }>[K]; }) => CSSObject;
21
- }
22
- declare class AnimusWithSystem<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>> extends AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {}> {
23
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups);
24
- props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
25
- }
26
- declare class AnimusWithStates<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>> extends AnimusWithSystem<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, {}> {
27
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States);
28
- groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusWithSystem<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, Record<PickedGroups, true>>;
29
- }
30
- declare class AnimusWithVariants<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>> extends AnimusWithStates<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, {}> {
31
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants);
32
- states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<BaseParser>>): AnimusWithStates<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, CSSPropMap<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
33
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
34
- prop?: PropKey;
35
- defaultVariant?: keyof Props;
36
- base?: CSSProps<Base, SystemProps<BaseParser>>;
37
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
38
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
39
- prop?: PropKey | undefined;
40
- defaultVariant?: keyof Props | undefined;
41
- base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
42
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
43
- }>>;
44
- }
45
- declare class AnimusWithBase<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>> extends AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, {}> {
46
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles);
47
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
48
- prop?: PropKey;
49
- defaultVariant?: keyof Props;
50
- base?: CSSProps<Base, SystemProps<BaseParser>>;
51
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
52
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Record<PropKey, {
53
- prop?: PropKey | undefined;
54
- defaultVariant?: keyof Props | undefined;
55
- base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
56
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
57
- }>>;
58
- }
59
- export declare class Animus<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>> extends AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, {}> {
60
- constructor(props: PropRegistry, groups: GroupRegistry);
61
- styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<BaseParser>>): AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, CSSProps<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
62
- }
63
- export {};
1
+ import { AnimusExtended } from './AnimusExtended';
2
+ import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
3
+ import { AbstractProps, ThemeProps } from './types/props';
4
+ import { CSSObject } from './types/shared';
5
+ import { Arg } from './types/utils';
6
+ export declare class AnimusWithAll<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, Prop>> {
7
+ propRegistry: PropRegistry;
8
+ groupRegistry: GroupRegistry;
9
+ parser: BaseParser;
10
+ baseStyles: BaseStyles;
11
+ statesConfig: States;
12
+ variants: Variants;
13
+ activeGroups: ActiveGroups;
14
+ custom: CustomProps;
15
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
16
+ extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
17
+ asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
18
+ theme?: import("@emotion/react").Theme;
19
+ as?: React.ElementType;
20
+ } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; } & {
21
+ theme?: import("@emotion/react").Theme;
22
+ }, JSX.IntrinsicElements[T], {}> & {
23
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
24
+ };
25
+ asComponent<T extends (props: {
26
+ className?: string;
27
+ }) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
28
+ theme?: import("@emotion/react").Theme;
29
+ } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }, {}, {}> & {
30
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
31
+ };
32
+ build(): (props: ThemeProps<Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>) => CSSObject;
33
+ }
34
+ declare class AnimusWithSystem<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>> extends AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {}> {
35
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups);
36
+ props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
37
+ }
38
+ declare class AnimusWithStates<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>> extends AnimusWithSystem<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, {}> {
39
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States);
40
+ groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusWithSystem<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, Record<PickedGroups, true>>;
41
+ }
42
+ declare class AnimusWithVariants<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>> extends AnimusWithStates<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, {}> {
43
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants);
44
+ states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<BaseParser>>): AnimusWithStates<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, CSSPropMap<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
45
+ variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
46
+ prop?: PropKey;
47
+ defaultVariant?: keyof Props;
48
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
49
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
50
+ }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
51
+ prop?: PropKey;
52
+ defaultVariant?: keyof Props;
53
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
54
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
55
+ }>>;
56
+ }
57
+ declare class AnimusWithBase<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>> extends AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, {}> {
58
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles);
59
+ variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
60
+ prop?: PropKey;
61
+ defaultVariant?: keyof Props;
62
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
63
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
64
+ }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Record<PropKey, {
65
+ prop?: PropKey;
66
+ defaultVariant?: keyof Props;
67
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
68
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
69
+ }>>;
70
+ }
71
+ export declare class Animus<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>> extends AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, {}> {
72
+ constructor(props: PropRegistry, groups: GroupRegistry);
73
+ styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<BaseParser>>): AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, CSSProps<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
74
+ }
75
+ export {};
@@ -1,8 +1,8 @@
1
- import { Prop } from './types/config';
2
- import { Animus } from './Animus';
3
- export declare class AnimusConfig<C extends Record<string, Prop> = {}, G extends Record<string, (keyof C)[]> = {}> {
4
- #private;
5
- constructor(config?: C, groups?: G);
6
- addGroup<Name extends string, Conf extends Record<string, Prop>, PropNames extends keyof Conf>(name: Name, config: Conf): AnimusConfig<C & Conf, G & Record<Name, PropNames[]>>;
7
- build(): Animus<{ [K in keyof C]: C[K]; }, { [K_1 in keyof G]: G[K_1]; }, import("./types/config").Parser<{ [K in keyof C]: C[K]; }>>;
8
- }
1
+ import { Animus } from './Animus';
2
+ import { Prop } from './types/config';
3
+ export declare class AnimusConfig<C extends Record<string, Prop> = {}, G extends Record<string, (keyof C)[]> = {}> {
4
+ #private;
5
+ constructor(config?: C, groups?: G);
6
+ addGroup<Name extends string, Conf extends Record<string, Prop>, PropNames extends keyof Conf>(name: Name, config: Conf): AnimusConfig<C & Conf, G & Record<Name, PropNames[]>>;
7
+ build(): Animus<{ [K in keyof C]: C[K]; }, { [K_1 in keyof G]: G[K_1]; }, import("./types/config").Parser<{ [K in keyof C]: C[K]; }>>;
8
+ }
@@ -0,0 +1,47 @@
1
+ import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
2
+ import { AbstractProps, ThemeProps } from './types/props';
3
+ import { CSSObject } from './types/shared';
4
+ import { Arg } from './types/utils';
5
+ export declare class AnimusExtended<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>, BaseStyles extends CSSProps<AbstractProps, SystemProps<BaseParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<BaseParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, Prop>> {
6
+ propRegistry: PropRegistry;
7
+ groupRegistry: GroupRegistry;
8
+ parser: BaseParser;
9
+ baseStyles: BaseStyles;
10
+ statesConfig: States;
11
+ variants: Variants;
12
+ activeGroups: ActiveGroups;
13
+ custom: CustomProps;
14
+ constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
15
+ extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
16
+ styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<BaseParser>>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles & CSSProps<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>, Variants, States, ActiveGroups, CustomProps>;
17
+ variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
18
+ prop?: PropKey;
19
+ defaultVariant?: keyof Props;
20
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
21
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
22
+ }): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
23
+ prop?: PropKey;
24
+ defaultVariant?: keyof Props;
25
+ base?: CSSProps<Base, SystemProps<BaseParser>>;
26
+ variants: CSSPropMap<Props, SystemProps<BaseParser>>;
27
+ }>, States, ActiveGroups, CustomProps>;
28
+ states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<BaseParser>>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States & CSSPropMap<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>, ActiveGroups, CustomProps>;
29
+ groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups & Record<PickedGroups, true>, CustomProps>;
30
+ props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {} & CustomProps_1 & CustomProps>;
31
+ asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
32
+ theme?: import("@emotion/react").Theme;
33
+ as?: React.ElementType;
34
+ } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; } & {
35
+ theme?: import("@emotion/react").Theme;
36
+ }, JSX.IntrinsicElements[T], {}> & {
37
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
38
+ };
39
+ asComponent<T extends (props: {
40
+ className?: string;
41
+ }) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
42
+ theme?: import("@emotion/react").Theme;
43
+ } & Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }, {}, {}> & {
44
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
45
+ };
46
+ build(): (props: ThemeProps<Omit<{ [K in keyof Arg<BaseParser> as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; }, "theme" | keyof Variants | keyof States | keyof CustomProps> & { [K_1 in keyof Variants]?: keyof Variants[K_1]["variants"] | undefined; } & { [K_2 in keyof States]?: boolean | undefined; } & { [K_3 in keyof import("./types/config").ParserProps<CustomProps>]: import("./types/config").ParserProps<CustomProps>[K_3]; }>) => CSSObject;
47
+ }