@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.
- package/CHANGELOG.md +5 -93
- package/dist/Animus.d.ts +75 -76
- package/dist/AnimusConfig.d.ts +8 -8
- package/dist/AnimusExtended.d.ts +47 -48
- package/dist/__fixtures__/testConfig.d.ts +153 -153
- package/dist/compatTheme.d.ts +28 -28
- package/dist/config.d.ts +2321 -2321
- package/dist/createAnimus.d.ts +2 -2
- package/dist/index.d.ts +1084 -1084
- package/dist/index.js +221 -270
- package/dist/legacy/compose.d.ts +2 -2
- package/dist/legacy/config.d.ts +86 -86
- package/dist/legacy/core.d.ts +12 -12
- package/dist/legacy/create.d.ts +2 -2
- package/dist/legacy/createCss.d.ts +2 -2
- package/dist/legacy/createParser.d.ts +2 -2
- package/dist/legacy/createStates.d.ts +2 -2
- package/dist/legacy/createTransform.d.ts +2 -2
- package/dist/legacy/createVariant.d.ts +2 -2
- package/dist/legacy/responsive.d.ts +14 -14
- package/dist/properties/getStylePropNames.d.ts +1 -1
- package/dist/properties/orderPropNames.d.ts +6 -6
- package/dist/properties/styledOptions.d.ts +20 -20
- package/dist/scales/createScale.d.ts +6 -6
- package/dist/scales/lookupScaleValue.d.ts +3 -3
- package/dist/styles/createParser.d.ts +2 -2
- package/dist/styles/createPropertyStyle.d.ts +4 -4
- package/dist/styles/createStylist.d.ts +2 -2
- package/dist/styles/responsive.d.ts +14 -14
- package/dist/transforms/border.d.ts +1 -1
- package/dist/transforms/grid.d.ts +4 -4
- package/dist/transforms/index.d.ts +4 -4
- package/dist/transforms/size.d.ts +2 -2
- package/dist/transforms/utils.d.ts +2 -2
- package/dist/types/config.d.ts +50 -50
- package/dist/types/properties.d.ts +23 -23
- package/dist/types/props.d.ts +34 -34
- package/dist/types/scales.d.ts +2 -2
- package/dist/types/shared.d.ts +4 -4
- package/dist/types/theme.d.ts +17 -17
- package/dist/types/utils.d.ts +4 -4
- 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.
|
|
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
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
custom: CustomProps;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
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 {};
|
package/dist/AnimusConfig.d.ts
CHANGED
|
@@ -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
|
+
}
|
package/dist/AnimusExtended.d.ts
CHANGED
|
@@ -1,48 +1,47 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
custom: CustomProps;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
};
|
|
47
|
-
|
|
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
|
+
}
|