@animus-ui/core 0.1.1-beta.23 → 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 +5 -93
  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 +221 -270
  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,198 +3,110 @@
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.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)
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
7
 
8
8
  **Note:** Version bump only for package @animus-ui/core
9
9
 
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)
10
11
 
12
+ **Note:** Version bump only for package @animus-ui/core
11
13
 
14
+ ## [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)
12
15
 
16
+ **Note:** Version bump only for package @animus-ui/core
13
17
 
14
18
  ## [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)
15
19
 
16
20
  **Note:** Version bump only for package @animus-ui/core
17
21
 
18
-
19
-
20
-
21
-
22
22
  ## [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)
23
23
 
24
24
  **Note:** Version bump only for package @animus-ui/core
25
25
 
26
-
27
-
28
-
29
-
30
26
  ## [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)
31
27
 
32
28
  **Note:** Version bump only for package @animus-ui/core
33
29
 
34
-
35
-
36
-
37
-
38
30
  ## [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)
39
31
 
40
32
  **Note:** Version bump only for package @animus-ui/core
41
33
 
42
-
43
-
44
-
45
-
46
34
  ## [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)
47
35
 
48
36
  **Note:** Version bump only for package @animus-ui/core
49
37
 
50
-
51
-
52
-
53
-
54
38
  ## [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)
55
39
 
56
40
  **Note:** Version bump only for package @animus-ui/core
57
41
 
58
-
59
-
60
-
61
-
62
42
  ## [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)
63
43
 
64
44
  **Note:** Version bump only for package @animus-ui/core
65
45
 
66
-
67
-
68
-
69
-
70
46
  ## [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)
71
47
 
72
48
  **Note:** Version bump only for package @animus-ui/core
73
49
 
74
-
75
-
76
-
77
-
78
50
  ## [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)
79
51
 
80
52
  **Note:** Version bump only for package @animus-ui/core
81
53
 
82
-
83
-
84
-
85
-
86
54
  ## [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)
87
55
 
88
56
  **Note:** Version bump only for package @animus-ui/core
89
57
 
90
-
91
-
92
-
93
-
94
58
  ## [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)
95
59
 
96
60
  **Note:** Version bump only for package @animus-ui/core
97
61
 
98
-
99
-
100
-
101
-
102
62
  ## [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)
103
63
 
104
64
  **Note:** Version bump only for package @animus-ui/core
105
65
 
106
-
107
-
108
-
109
-
110
66
  ## [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)
111
67
 
112
68
  **Note:** Version bump only for package @animus-ui/core
113
69
 
114
-
115
-
116
-
117
-
118
70
  ## [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)
119
71
 
120
72
  **Note:** Version bump only for package @animus-ui/core
121
73
 
122
-
123
-
124
-
125
-
126
74
  ## [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)
127
75
 
128
76
  **Note:** Version bump only for package @animus-ui/core
129
77
 
130
-
131
-
132
-
133
-
134
78
  ## [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)
135
79
 
136
80
  **Note:** Version bump only for package @animus-ui/core
137
81
 
138
-
139
-
140
-
141
-
142
82
  ## [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)
143
83
 
144
84
  **Note:** Version bump only for package @animus-ui/core
145
85
 
146
-
147
-
148
-
149
-
150
86
  ## [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)
151
87
 
152
88
  **Note:** Version bump only for package @animus-ui/core
153
89
 
154
-
155
-
156
-
157
-
158
90
  ## [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)
159
91
 
160
92
  **Note:** Version bump only for package @animus-ui/core
161
93
 
162
-
163
-
164
-
165
-
166
94
  ## [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)
167
95
 
168
96
  **Note:** Version bump only for package @animus-ui/core
169
97
 
170
-
171
-
172
-
173
-
174
98
  ## 0.1.1-beta.2 (2022-01-09)
175
99
 
176
-
177
-
178
100
  ## 0.1.1-beta.1 (2022-01-09)
179
101
 
180
-
181
-
182
102
  ## 0.1.1-beta.0 (2022-01-09)
183
103
 
184
104
  **Note:** Version bump only for package @animus-ui/core
185
105
 
186
-
187
-
188
-
189
-
190
106
  ## [0.1.1-beta.1](https://github.com/codecaaron/animus/compare/v0.1.1-beta.0...v0.1.1-beta.1) (2022-01-09)
191
107
 
192
108
  **Note:** Version bump only for package @animus-ui/core
193
109
 
194
-
195
-
196
-
197
-
198
110
  ## 0.1.1-beta.0 (2022-01-09)
199
111
 
200
112
  **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
+ }