@animus-ui/core 0.1.1-beta.24 → 0.1.1-beta.25

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 (42) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Animus.d.ts +75 -76
  3. package/dist/AnimusConfig.d.ts +8 -8
  4. package/dist/AnimusExtended.d.ts +47 -48
  5. package/dist/__fixtures__/testConfig.d.ts +153 -153
  6. package/dist/compatTheme.d.ts +28 -28
  7. package/dist/config.d.ts +2321 -2321
  8. package/dist/createAnimus.d.ts +2 -2
  9. package/dist/index.d.ts +1084 -1084
  10. package/dist/index.js +216 -265
  11. package/dist/legacy/compose.d.ts +2 -2
  12. package/dist/legacy/config.d.ts +86 -86
  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 -2
  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 -20
  24. package/dist/scales/createScale.d.ts +6 -6
  25. package/dist/scales/lookupScaleValue.d.ts +3 -3
  26. package/dist/styles/createParser.d.ts +2 -2
  27. package/dist/styles/createPropertyStyle.d.ts +4 -4
  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 -50
  36. package/dist/types/properties.d.ts +23 -23
  37. package/dist/types/props.d.ts +34 -34
  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 +6 -6
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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.25](https://github.com/codecaaron/animus/compare/@animus-ui/core@0.1.1-beta.24...@animus-ui/core@0.1.1-beta.25) (2025-05-29)
7
+
8
+ **Note:** Version bump only for package @animus-ui/core
9
+
6
10
  ## [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
11
 
8
12
  **Note:** Version bump only for package @animus-ui/core
package/dist/Animus.d.ts CHANGED
@@ -1,76 +1,75 @@
1
- /// <reference types="react" />
2
- import { AnimusExtended } from './AnimusExtended';
3
- import { CSSPropMap, CSSProps, Parser, Prop, SystemProps, VariantConfig } from './types/config';
4
- import { AbstractProps, ThemeProps } from './types/props';
5
- import { CSSObject } from './types/shared';
6
- import { Arg } from './types/utils';
7
- 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>> {
8
- propRegistry: PropRegistry;
9
- groupRegistry: GroupRegistry;
10
- parser: BaseParser;
11
- baseStyles: BaseStyles;
12
- statesConfig: States;
13
- variants: Variants;
14
- activeGroups: ActiveGroups;
15
- custom: CustomProps;
16
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps);
17
- extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
18
- asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
19
- theme?: import("@emotion/react").Theme | undefined;
20
- as?: import("react").ElementType<any> | undefined;
21
- } & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never) & {
22
- theme?: import("@emotion/react").Theme | undefined;
23
- }, JSX.IntrinsicElements[T], {}> & {
24
- extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
25
- };
26
- asComponent<T extends (props: {
27
- className?: string;
28
- }) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
29
- theme?: import("@emotion/react").Theme | undefined;
30
- } & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never), {}, {}> & {
31
- extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
32
- };
33
- build(): (props: ThemeProps<Omit<Arg<BaseParser> extends infer T ? { [K in keyof T as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_1 ? { [K_3 in keyof T_1]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never)>) => CSSObject;
34
- }
35
- 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, {}> {
36
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups);
37
- props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusWithAll<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
38
- }
39
- 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, {}> {
40
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants, states: States);
41
- groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusWithSystem<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, Record<PickedGroups, true>>;
42
- }
43
- 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, {}> {
44
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles, variants: Variants);
45
- states<Props extends AbstractProps>(config: CSSPropMap<Props, SystemProps<BaseParser>>): AnimusWithStates<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, CSSPropMap<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
46
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
47
- prop?: PropKey;
48
- defaultVariant?: keyof Props;
49
- base?: CSSProps<Base, SystemProps<BaseParser>>;
50
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
51
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
52
- prop?: PropKey | undefined;
53
- defaultVariant?: keyof Props | undefined;
54
- base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
55
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
56
- }>>;
57
- }
58
- 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, {}> {
59
- constructor(props: PropRegistry, groups: GroupRegistry, parser: BaseParser, base: BaseStyles);
60
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
61
- prop?: PropKey;
62
- defaultVariant?: keyof Props;
63
- base?: CSSProps<Base, SystemProps<BaseParser>>;
64
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
65
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Record<PropKey, {
66
- prop?: PropKey | undefined;
67
- defaultVariant?: keyof Props | undefined;
68
- base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
69
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
70
- }>>;
71
- }
72
- export declare class Animus<PropRegistry extends Record<string, Prop>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseParser extends Parser<PropRegistry>> extends AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, {}> {
73
- constructor(props: PropRegistry, groups: GroupRegistry);
74
- styles<Props extends AbstractProps>(config: CSSProps<Props, SystemProps<BaseParser>>): AnimusWithBase<PropRegistry, GroupRegistry, BaseParser, CSSProps<Props, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>>>;
75
- }
76
- 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 { 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
- }
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
+ }
@@ -1,48 +1,47 @@
1
- /// <reference types="react" />
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 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>> {
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
- 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>;
18
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
19
- prop?: PropKey;
20
- defaultVariant?: keyof Props;
21
- base?: CSSProps<Base, SystemProps<BaseParser>>;
22
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
23
- }): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants & Record<PropKey, {
24
- prop?: PropKey | undefined;
25
- defaultVariant?: keyof Props | undefined;
26
- base?: CSSProps<Base, SystemProps<BaseParser, Omit<Arg<BaseParser>, "theme">>> | undefined;
27
- variants: CSSPropMap<Props, SystemProps<BaseParser>>;
28
- }>, States, ActiveGroups, CustomProps>;
29
- 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>;
30
- groups<PickedGroups extends keyof GroupRegistry>(config: Record<PickedGroups, true>): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups & Record<PickedGroups, true>, CustomProps>;
31
- props<CustomProps extends Record<string, Prop>>(config: CustomProps): AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, {} & CustomProps & CustomProps>;
32
- asElement<T extends keyof JSX.IntrinsicElements>(component: T): import("@emotion/styled").StyledComponent<{
33
- theme?: import("@emotion/react").Theme | undefined;
34
- as?: import("react").ElementType<any> | undefined;
35
- } & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never) & {
36
- theme?: import("@emotion/react").Theme | undefined;
37
- }, JSX.IntrinsicElements[T], {}> & {
38
- extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
39
- };
40
- asComponent<T extends (props: {
41
- className?: string;
42
- }) => any>(AsComponent: T): import("@emotion/styled").StyledComponent<JSX.LibraryManagedAttributes<T, import("react").ComponentProps<T>> & {
43
- theme?: import("@emotion/react").Theme | undefined;
44
- } & Omit<Arg<BaseParser> extends infer T_1 ? { [K in keyof T_1 as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_2 ? { [K_3 in keyof T_2]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never), {}, {}> & {
45
- extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
46
- };
47
- build(): (props: ThemeProps<Omit<Arg<BaseParser> extends infer T ? { [K in keyof T as K extends GroupRegistry[Extract<keyof ActiveGroups, keyof GroupRegistry>][number] ? K : never]?: Arg<BaseParser>[K] | undefined; } : never, "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; } & (import("./types/config").ParserProps<CustomProps> extends infer T_1 ? { [K_3 in keyof T_1]: import("./types/config").ParserProps<CustomProps>[K_3]; } : never)>) => CSSObject;
48
- }
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
+ }