@animus-ui/core 0.1.1-fffe37d2.0 → 0.2.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +66 -8
  2. package/CLAUDE.md +352 -0
  3. package/dist/Animus.d.ts +77 -63
  4. package/dist/AnimusConfig.d.ts +8 -8
  5. package/dist/AnimusExtended.d.ts +49 -0
  6. package/dist/__fixtures__/testConfig.d.ts +153 -153
  7. package/dist/compatTheme.d.ts +28 -20
  8. package/dist/config.d.ts +2321 -2193
  9. package/dist/createAnimus.d.ts +2 -2
  10. package/dist/index.d.ts +1084 -1019
  11. package/dist/index.js +1950 -0
  12. package/dist/legacy/compose.d.ts +2 -2
  13. package/dist/legacy/config.d.ts +86 -85
  14. package/dist/legacy/core.d.ts +12 -12
  15. package/dist/legacy/create.d.ts +2 -2
  16. package/dist/legacy/createCss.d.ts +2 -2
  17. package/dist/legacy/createParser.d.ts +2 -9
  18. package/dist/legacy/createStates.d.ts +2 -2
  19. package/dist/legacy/createTransform.d.ts +2 -2
  20. package/dist/legacy/createVariant.d.ts +2 -2
  21. package/dist/legacy/responsive.d.ts +14 -14
  22. package/dist/properties/getStylePropNames.d.ts +1 -1
  23. package/dist/properties/orderPropNames.d.ts +6 -6
  24. package/dist/properties/styledOptions.d.ts +20 -20
  25. package/dist/scales/createScale.d.ts +6 -3
  26. package/dist/scales/lookupScaleValue.d.ts +3 -3
  27. package/dist/static-poc/atomic-css.d.ts +14 -0
  28. package/dist/static-poc/run-poc.d.ts +5 -0
  29. package/dist/static-poc/static-mode.d.ts +15 -0
  30. package/dist/static-poc/validate-poc.d.ts +5 -0
  31. package/dist/styles/createParser.d.ts +2 -9
  32. package/dist/styles/createPropertyStyle.d.ts +4 -3
  33. package/dist/styles/createStylist.d.ts +2 -2
  34. package/dist/styles/responsive.d.ts +14 -14
  35. package/dist/transforms/border.d.ts +1 -1
  36. package/dist/transforms/grid.d.ts +4 -4
  37. package/dist/transforms/index.d.ts +4 -4
  38. package/dist/transforms/size.d.ts +2 -2
  39. package/dist/transforms/utils.d.ts +2 -1
  40. package/dist/types/config.d.ts +50 -44
  41. package/dist/types/properties.d.ts +23 -26
  42. package/dist/types/props.d.ts +34 -43
  43. package/dist/types/scales.d.ts +2 -2
  44. package/dist/types/shared.d.ts +4 -4
  45. package/dist/types/theme.d.ts +17 -17
  46. package/dist/types/utils.d.ts +4 -4
  47. package/docs/AGENT-QUESTIONS.md +79 -0
  48. package/docs/agentic-alliance.md +415 -0
  49. package/docs/ai-collaboration-guide.md +141 -0
  50. package/docs/critical-findings.md +87 -0
  51. package/docs/gemini-tamagui-compiler-learnings.md +393 -0
  52. package/docs/tamagui-compiler-learnings.md +575 -0
  53. package/jest.config.js +1 -0
  54. package/package.json +11 -9
  55. package/rollup.config.js +2 -2
  56. package/tsconfig.json +4 -2
  57. package/dist/index.cjs.js +0 -1
  58. package/dist/index.esm.js +0 -1
@@ -0,0 +1,49 @@
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
+ extend: () => AnimusExtended<PropRegistry, GroupRegistry, BaseParser, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
48
+ };
49
+ }
@@ -1,153 +1,153 @@
1
- export declare const testConfig: {
2
- readonly textColor: {
3
- readonly property: "color";
4
- };
5
- readonly bg: {
6
- readonly property: "backgroundColor";
7
- };
8
- readonly borderColor: {
9
- readonly property: "borderColor";
10
- };
11
- readonly borderColorX: {
12
- readonly property: "borderColor";
13
- readonly properties: readonly ["borderLeftColor", "borderRightColor"];
14
- readonly scale: "colors";
15
- };
16
- readonly borderColorY: {
17
- readonly property: "borderColor";
18
- readonly properties: readonly ["borderTopColor", "borderBottomColor"];
19
- readonly scale: "colors";
20
- };
21
- readonly borderColorLeft: {
22
- readonly property: "borderLeftColor";
23
- };
24
- readonly borderColorRight: {
25
- readonly property: "borderRightColor";
26
- };
27
- readonly borderColorTop: {
28
- readonly property: "borderTopColor";
29
- };
30
- readonly borderColorBottom: {
31
- readonly property: "borderBottomColor";
32
- };
33
- readonly border: {
34
- readonly property: "border";
35
- };
36
- readonly borderX: {
37
- readonly property: "border";
38
- readonly properties: readonly ["borderLeft", "borderRight"];
39
- };
40
- readonly borderY: {
41
- readonly property: "border";
42
- readonly properties: readonly ["borderTop", "borderBottom"];
43
- };
44
- readonly borderTop: {
45
- readonly property: "borderTop";
46
- };
47
- readonly borderRight: {
48
- readonly property: "borderRight";
49
- };
50
- readonly borderBottom: {
51
- readonly property: "borderBottom";
52
- };
53
- readonly borderLeft: {
54
- readonly property: "borderLeft";
55
- };
56
- readonly borderWidth: {
57
- readonly property: "borderWidth";
58
- };
59
- readonly borderWidthX: {
60
- readonly property: "borderWidth";
61
- readonly properties: readonly ["borderLeftWidth", "borderRightWidth"];
62
- };
63
- readonly borderWidthY: {
64
- readonly property: "borderWidth";
65
- readonly properties: readonly ["borderTopWidth", "borderBottomWidth"];
66
- };
67
- readonly borderRadius: {
68
- readonly property: "borderRadius";
69
- };
70
- readonly borderRadiusLeft: {
71
- readonly property: "borderRadius";
72
- readonly properties: readonly ["borderTopLeftRadius", "borderBottomLeftRadius"];
73
- };
74
- readonly borderRadiusTop: {
75
- readonly property: "borderRadius";
76
- readonly properties: readonly ["borderTopLeftRadius", "borderTopRightRadius"];
77
- };
78
- readonly borderRadiusBottom: {
79
- readonly property: "borderRadius";
80
- readonly properties: readonly ["borderBottomLeftRadius", "borderBottomRightRadius"];
81
- };
82
- readonly borderRadiusRight: {
83
- readonly property: "borderRadius";
84
- readonly properties: readonly ["borderTopRightRadius", "borderBottomRightRadius"];
85
- };
86
- readonly borderStyle: {
87
- readonly property: "borderStyle";
88
- };
89
- readonly borderStyleX: {
90
- readonly property: "borderStyle";
91
- readonly properties: readonly ["borderLeftStyle", "borderRightStyle"];
92
- };
93
- readonly borderStyleY: {
94
- readonly property: "borderStyle";
95
- readonly properties: readonly ["borderTopStyle", "borderBottomStyle"];
96
- };
97
- readonly flex: {
98
- readonly property: "flex";
99
- };
100
- readonly flexBasis: {
101
- readonly property: "flexBasis";
102
- };
103
- readonly p: {
104
- readonly property: "padding";
105
- };
106
- readonly px: {
107
- readonly property: "padding";
108
- readonly properties: readonly ["paddingLeft", "paddingRight"];
109
- readonly scale: "spacing";
110
- };
111
- readonly py: {
112
- readonly property: "padding";
113
- readonly properties: readonly ["paddingTop", "paddingBottom"];
114
- readonly scale: "spacing";
115
- };
116
- readonly pt: {
117
- readonly property: "paddingTop";
118
- };
119
- readonly pb: {
120
- readonly property: "paddingBottom";
121
- };
122
- readonly pr: {
123
- readonly property: "paddingRight";
124
- };
125
- readonly pl: {
126
- readonly property: "paddingLeft";
127
- };
128
- readonly m: {
129
- readonly property: "margin";
130
- };
131
- readonly mx: {
132
- readonly property: "margin";
133
- readonly properties: readonly ["marginLeft", "marginRight"];
134
- readonly scale: "spacing";
135
- };
136
- readonly my: {
137
- readonly property: "margin";
138
- readonly properties: readonly ["marginTop", "marginBottom"];
139
- readonly scale: "spacing";
140
- };
141
- readonly mt: {
142
- readonly property: "marginTop";
143
- };
144
- readonly mb: {
145
- readonly property: "marginBottom";
146
- };
147
- readonly mr: {
148
- readonly property: "marginRight";
149
- };
150
- readonly ml: {
151
- readonly property: "marginLeft";
152
- };
153
- };
1
+ export declare const testConfig: {
2
+ readonly textColor: {
3
+ readonly property: "color";
4
+ };
5
+ readonly bg: {
6
+ readonly property: "backgroundColor";
7
+ };
8
+ readonly borderColor: {
9
+ readonly property: "borderColor";
10
+ };
11
+ readonly borderColorX: {
12
+ readonly property: "borderColor";
13
+ readonly properties: readonly ["borderLeftColor", "borderRightColor"];
14
+ readonly scale: "colors";
15
+ };
16
+ readonly borderColorY: {
17
+ readonly property: "borderColor";
18
+ readonly properties: readonly ["borderTopColor", "borderBottomColor"];
19
+ readonly scale: "colors";
20
+ };
21
+ readonly borderColorLeft: {
22
+ readonly property: "borderLeftColor";
23
+ };
24
+ readonly borderColorRight: {
25
+ readonly property: "borderRightColor";
26
+ };
27
+ readonly borderColorTop: {
28
+ readonly property: "borderTopColor";
29
+ };
30
+ readonly borderColorBottom: {
31
+ readonly property: "borderBottomColor";
32
+ };
33
+ readonly border: {
34
+ readonly property: "border";
35
+ };
36
+ readonly borderX: {
37
+ readonly property: "border";
38
+ readonly properties: readonly ["borderLeft", "borderRight"];
39
+ };
40
+ readonly borderY: {
41
+ readonly property: "border";
42
+ readonly properties: readonly ["borderTop", "borderBottom"];
43
+ };
44
+ readonly borderTop: {
45
+ readonly property: "borderTop";
46
+ };
47
+ readonly borderRight: {
48
+ readonly property: "borderRight";
49
+ };
50
+ readonly borderBottom: {
51
+ readonly property: "borderBottom";
52
+ };
53
+ readonly borderLeft: {
54
+ readonly property: "borderLeft";
55
+ };
56
+ readonly borderWidth: {
57
+ readonly property: "borderWidth";
58
+ };
59
+ readonly borderWidthX: {
60
+ readonly property: "borderWidth";
61
+ readonly properties: readonly ["borderLeftWidth", "borderRightWidth"];
62
+ };
63
+ readonly borderWidthY: {
64
+ readonly property: "borderWidth";
65
+ readonly properties: readonly ["borderTopWidth", "borderBottomWidth"];
66
+ };
67
+ readonly borderRadius: {
68
+ readonly property: "borderRadius";
69
+ };
70
+ readonly borderRadiusLeft: {
71
+ readonly property: "borderRadius";
72
+ readonly properties: readonly ["borderTopLeftRadius", "borderBottomLeftRadius"];
73
+ };
74
+ readonly borderRadiusTop: {
75
+ readonly property: "borderRadius";
76
+ readonly properties: readonly ["borderTopLeftRadius", "borderTopRightRadius"];
77
+ };
78
+ readonly borderRadiusBottom: {
79
+ readonly property: "borderRadius";
80
+ readonly properties: readonly ["borderBottomLeftRadius", "borderBottomRightRadius"];
81
+ };
82
+ readonly borderRadiusRight: {
83
+ readonly property: "borderRadius";
84
+ readonly properties: readonly ["borderTopRightRadius", "borderBottomRightRadius"];
85
+ };
86
+ readonly borderStyle: {
87
+ readonly property: "borderStyle";
88
+ };
89
+ readonly borderStyleX: {
90
+ readonly property: "borderStyle";
91
+ readonly properties: readonly ["borderLeftStyle", "borderRightStyle"];
92
+ };
93
+ readonly borderStyleY: {
94
+ readonly property: "borderStyle";
95
+ readonly properties: readonly ["borderTopStyle", "borderBottomStyle"];
96
+ };
97
+ readonly flex: {
98
+ readonly property: "flex";
99
+ };
100
+ readonly flexBasis: {
101
+ readonly property: "flexBasis";
102
+ };
103
+ readonly p: {
104
+ readonly property: "padding";
105
+ };
106
+ readonly px: {
107
+ readonly property: "padding";
108
+ readonly properties: readonly ["paddingLeft", "paddingRight"];
109
+ readonly scale: "spacing";
110
+ };
111
+ readonly py: {
112
+ readonly property: "padding";
113
+ readonly properties: readonly ["paddingTop", "paddingBottom"];
114
+ readonly scale: "spacing";
115
+ };
116
+ readonly pt: {
117
+ readonly property: "paddingTop";
118
+ };
119
+ readonly pb: {
120
+ readonly property: "paddingBottom";
121
+ };
122
+ readonly pr: {
123
+ readonly property: "paddingRight";
124
+ };
125
+ readonly pl: {
126
+ readonly property: "paddingLeft";
127
+ };
128
+ readonly m: {
129
+ readonly property: "margin";
130
+ };
131
+ readonly mx: {
132
+ readonly property: "margin";
133
+ readonly properties: readonly ["marginLeft", "marginRight"];
134
+ readonly scale: "spacing";
135
+ };
136
+ readonly my: {
137
+ readonly property: "margin";
138
+ readonly properties: readonly ["marginTop", "marginBottom"];
139
+ readonly scale: "spacing";
140
+ };
141
+ readonly mt: {
142
+ readonly property: "marginTop";
143
+ };
144
+ readonly mb: {
145
+ readonly property: "marginBottom";
146
+ };
147
+ readonly mr: {
148
+ readonly property: "marginRight";
149
+ };
150
+ readonly ml: {
151
+ readonly property: "marginLeft";
152
+ };
153
+ };
@@ -1,20 +1,28 @@
1
- export declare const compatTheme: {
2
- readonly spacing: readonly [0, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96];
3
- readonly fontSize: readonly [64, 44, 34, 26, 22, 20, 18, 16, 14];
4
- readonly lineHeight: {
5
- readonly body: 1.5;
6
- readonly heading: 1;
7
- };
8
- readonly fontWeight: readonly [400, 600, 700];
9
- readonly fontFamily: {
10
- readonly body: "Verdana, sans-serif";
11
- readonly heading: "Verdana, Lato, sans-serif";
12
- readonly monospace: "monospace";
13
- };
14
- readonly radii: readonly [2, 4, 6, 8];
15
- readonly borders: readonly [1, 2, 3];
16
- readonly colors: {};
17
- readonly modes: {};
18
- readonly mode: undefined;
19
- };
20
- export declare type CompatTheme = typeof compatTheme;
1
+ export declare const compatTheme: {
2
+ readonly breakpoints: {
3
+ readonly xs: 480;
4
+ readonly sm: 768;
5
+ readonly md: 1024;
6
+ readonly lg: 1200;
7
+ readonly xl: 1440;
8
+ };
9
+ readonly space: readonly [0, 2, 4, 8, 12, 16, 24, 32, 40, 48, 64, 96];
10
+ readonly fontSizes: readonly [64, 44, 34, 26, 22, 20, 18, 16, 14];
11
+ readonly lineHeights: ((string & {}) | (number & {}))[];
12
+ readonly letterSpacings: {};
13
+ readonly fontWeights: ((string & {}) | (number & {}))[];
14
+ readonly fonts: {};
15
+ readonly radii: ((string & {}) | (number & {}))[];
16
+ readonly borders: ((string & {}) | (number & {}))[];
17
+ readonly borderWidths: ((string & {}) | (number & {}))[];
18
+ readonly colors: {};
19
+ readonly gradients: {};
20
+ readonly shadows: {};
21
+ readonly modes: {};
22
+ readonly transitions: {};
23
+ readonly animations: {};
24
+ readonly zIndices: {};
25
+ readonly opacities: {};
26
+ readonly mode: undefined;
27
+ };
28
+ export type CompatTheme = typeof compatTheme;