@animus-ui/system 0.1.11 → 0.1.13
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/README.md +124 -51
- package/dist/Animus.d.ts +1 -1
- package/dist/Animus.d.ts.map +1 -1
- package/dist/AnimusExtended.d.ts +1 -1
- package/dist/AnimusExtended.d.ts.map +1 -1
- package/dist/SystemBuilder.d.ts +184 -155
- package/dist/SystemBuilder.d.ts.map +1 -1
- package/dist/appearance/index.d.ts +0 -68
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.js +0 -91
- package/dist/assert-root-slot-C3Lp9MNJ.js +10 -0
- package/dist/asset.d.ts +4 -13
- package/dist/asset.d.ts.map +1 -1
- package/dist/bootstrap/createAppearanceBootstrap.d.ts +0 -57
- package/dist/bootstrap/createAppearanceBootstrap.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +4 -58
- package/dist/class-resolver.d.ts +2 -4
- package/dist/class-resolver.d.ts.map +1 -1
- package/dist/class-resolver.js +1 -1
- package/dist/compose.d.ts +2 -16
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +3 -17
- package/dist/composeWithContext.d.ts +4 -15
- package/dist/composeWithContext.d.ts.map +1 -1
- package/dist/composeWithContext.js +5 -16
- package/dist/conditions.d.ts +24 -141
- package/dist/conditions.d.ts.map +1 -1
- package/dist/{createClassResolver-BWyEQ5KZ.js → createClassResolver-EpwTL9Sa.js} +12 -113
- package/dist/{createComposedFamily-k5tTujGI.js → createComposedFamily-C4NovMcd.js} +11 -49
- package/dist/groups/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +318 -409
- package/dist/keyframes.d.ts +2 -23
- package/dist/keyframes.d.ts.map +1 -1
- package/dist/runtime/assert-root-slot.d.ts +2 -13
- package/dist/runtime/assert-root-slot.d.ts.map +1 -1
- package/dist/runtime/createClassResolver.d.ts +0 -8
- package/dist/runtime/createClassResolver.d.ts.map +1 -1
- package/dist/runtime/createComposedFamily.d.ts +2 -7
- package/dist/runtime/createComposedFamily.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -16
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/is-dev.d.ts +2 -42
- package/dist/runtime/is-dev.d.ts.map +1 -1
- package/dist/runtime/resolveClasses.d.ts +8 -33
- package/dist/runtime/resolveClasses.d.ts.map +1 -1
- package/dist/runtime/witness.d.ts +0 -8
- package/dist/runtime/witness.d.ts.map +1 -1
- package/dist/runtime-entry.d.ts +1 -6
- package/dist/runtime-entry.d.ts.map +1 -1
- package/dist/runtime-entry.js +2 -2
- package/dist/selectors.d.ts +6 -45
- package/dist/selectors.d.ts.map +1 -1
- package/dist/{size-CcVEGaen.js → size-C6jqxiQy.js} +7 -34
- package/dist/theme/createTheme.d.ts +26 -95
- package/dist/theme/createTheme.d.ts.map +1 -1
- package/dist/theme/flattenScale.d.ts +4 -10
- package/dist/theme/flattenScale.d.ts.map +1 -1
- package/dist/theme/resolveReferences.d.ts +7 -35
- package/dist/theme/resolveReferences.d.ts.map +1 -1
- package/dist/theme/serializeTokens.d.ts +0 -3
- package/dist/theme/serializeTokens.d.ts.map +1 -1
- package/dist/theme/types.d.ts +4 -26
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/utils.d.ts +1 -18
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/transforms/border.d.ts +1 -4
- package/dist/transforms/border.d.ts.map +1 -1
- package/dist/transforms/createTransform.d.ts +6 -31
- package/dist/transforms/createTransform.d.ts.map +1 -1
- package/dist/transforms/grid.d.ts +2 -12
- package/dist/transforms/grid.d.ts.map +1 -1
- package/dist/transforms/size.d.ts +2 -8
- package/dist/transforms/size.d.ts.map +1 -1
- package/dist/types/component.d.ts +9 -105
- package/dist/types/component.d.ts.map +1 -1
- package/dist/types/config.d.ts +12 -141
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/theme.d.ts +8 -165
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/utils/deepMerge.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/assert-root-slot-B73sDJ1Q.js +0 -21
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import type { ComponentProps, ComponentPropsWithRef, ComponentType, ForwardRefExoticComponent, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, ComponentPropsWithRef, ComponentType, ForwardRefExoticComponent, JSX, ReactNode } from 'react';
|
|
2
2
|
import type { AnimusExtended } from '../AnimusExtended';
|
|
3
3
|
import type { AbstractParser, CSSPropMap, CSSProps, Prop, SelectorAliasProps, SystemProps, ThemedScale, VariantConfig } from './config';
|
|
4
4
|
import type { AbstractProps } from './props';
|
|
5
5
|
declare const ConsumerProps: unique symbol;
|
|
6
6
|
declare const VariantConfigBrand: unique symbol;
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* plus the phantom brands. Using `any` as P avoids expanding the
|
|
11
|
-
* full 8-generic AnimusComponent intersection, preventing TS2590
|
|
12
|
-
* "union type too complex" when the property registry is large.
|
|
8
|
+
* Structural constraint for compose() slots. `any` as P avoids expanding the
|
|
9
|
+
* full AnimusComponent intersection, which hits TS2590 on large registries.
|
|
13
10
|
*/
|
|
14
11
|
export type AnyBrandedComponent = ForwardRefExoticComponent<any> & {
|
|
15
12
|
readonly [ConsumerProps]: unknown;
|
|
@@ -19,64 +16,30 @@ export type AnyBrandedComponent = ForwardRefExoticComponent<any> & {
|
|
|
19
16
|
type ExtendFn<PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, BS, V, S, AG, CP> = {
|
|
20
17
|
extend: () => AnimusExtended<PR, GR, BS & CSSProps<AbstractProps, SystemProps<AbstractParser>>, V & Record<string, VariantConfig>, S & CSSPropMap<AbstractProps, SystemProps<AbstractParser>>, AG & Record<string, true>, CP & Record<string, Prop>>;
|
|
21
18
|
};
|
|
22
|
-
/**
|
|
23
|
-
* Compute the group prop names from active groups.
|
|
24
|
-
* GR maps group names to prop name arrays, AG records which groups are active.
|
|
25
|
-
* The result is the union of prop names from all active groups.
|
|
26
|
-
*/
|
|
27
19
|
type ActiveGroupPropNames<PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, AG> = GR[Extract<keyof StripIndex<AG>, keyof GR>][number] | Extract<keyof StripIndex<AG>, keyof PR>;
|
|
28
|
-
/**
|
|
29
|
-
* Compute the group system props — each active group prop accepts its scale-resolved type.
|
|
30
|
-
* Uses the augmented Theme interface via ThemedScale (no generic T needed).
|
|
31
|
-
*/
|
|
32
20
|
type GroupProps<PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, AG> = {
|
|
33
21
|
[K in ActiveGroupPropNames<PR, GR, AG> as K extends string ? K : never]?: ThemedScale<PR[K & keyof PR]>;
|
|
34
22
|
};
|
|
35
|
-
/**
|
|
36
|
-
* Compute custom prop types from .props() config.
|
|
37
|
-
* Each key K in CP maps to ThemedScale<CP[K]>.
|
|
38
|
-
* StripIndex removes index signatures from ExtendFn constraint intersections.
|
|
39
|
-
*/
|
|
40
23
|
type CustomPropValues<CP extends Record<string, Prop>> = {
|
|
41
24
|
[K in keyof StripIndex<CP>]?: ThemedScale<StripIndex<CP>[K & keyof StripIndex<CP>]>;
|
|
42
25
|
};
|
|
43
|
-
/** Strip string/number index signatures, keeping only literal keys. */
|
|
44
26
|
type StripIndex<T> = {
|
|
45
27
|
[K in keyof T as string extends K ? never : number extends K ? never : K]: T[K];
|
|
46
28
|
};
|
|
47
|
-
/**
|
|
48
|
-
* Compute variant props — each variant key accepts one of its variant values.
|
|
49
|
-
* StripIndex removes index signatures from ExtendFn constraint intersections.
|
|
50
|
-
*/
|
|
51
29
|
type VariantProps<V> = {
|
|
52
30
|
[K in keyof StripIndex<V>]?: StripIndex<V>[K] extends VariantConfig ? keyof StripIndex<V>[K]['variants'] : string;
|
|
53
31
|
};
|
|
54
|
-
/**
|
|
55
|
-
* Compute state props — each state key is a boolean toggle.
|
|
56
|
-
* StripIndex removes index signatures from ExtendFn constraint intersections.
|
|
57
|
-
*/
|
|
58
32
|
type StateProps<S> = {
|
|
59
33
|
[K in keyof StripIndex<S>]?: boolean;
|
|
60
34
|
};
|
|
61
35
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
* The runtime (filterProps in createComponent) already strips these before
|
|
65
|
-
* forwarding to the DOM element; this ensures the types match.
|
|
66
|
-
*
|
|
67
|
-
* Computed from each source individually (not keyof an intersection) to
|
|
68
|
-
* avoid TS2590 "union type too complex" during declaration emit.
|
|
36
|
+
* Keys Animus consumes; the runtime strips them before DOM forwarding.
|
|
37
|
+
* Unioned per source — `keyof` of the intersection hits TS2590 on emit.
|
|
69
38
|
*/
|
|
70
39
|
type AnimusManagedKeys<PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, V, S, AG, CP extends Record<string, Prop>> = ActiveGroupPropNames<PR, GR, AG> | keyof VariantProps<V> | keyof StateProps<S> | keyof StripIndex<CP> | 'as' | 'asChild' | 'className' | 'children';
|
|
71
40
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* and carried on the ConsumerProps brand for zero-inference access.
|
|
75
|
-
*/
|
|
76
|
-
/**
|
|
77
|
-
* Resolved group props — computed once, reused for both direct group
|
|
78
|
-
* props and selector alias value types. Ensures TypeScript's structural
|
|
79
|
-
* cache hits on the same mapped type instead of re-deriving.
|
|
41
|
+
* Named alias so group props and selector-alias values share one mapped type;
|
|
42
|
+
* inlining it re-derives the type instead of hitting the structural cache.
|
|
80
43
|
*/
|
|
81
44
|
type ResolvedGroupProps<PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, AG> = GroupProps<PR, GR, AG>;
|
|
82
45
|
type AnimusConsumerProps<El extends keyof JSX.IntrinsicElements, PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, V, S, AG, CP extends Record<string, Prop>> = Omit<ComponentPropsWithRef<El>, AnimusManagedKeys<PR, GR, V, S, AG, CP>> & ResolvedGroupProps<PR, GR, AG> & VariantProps<V> & StateProps<S> & CustomPropValues<CP> & SelectorAliasProps<ResolvedGroupProps<PR, GR, AG>> & {
|
|
@@ -85,25 +48,14 @@ type AnimusConsumerProps<El extends keyof JSX.IntrinsicElements, PR extends Reco
|
|
|
85
48
|
className?: string;
|
|
86
49
|
children?: ReactNode;
|
|
87
50
|
};
|
|
88
|
-
/** Component type for .asElement() — HTML element tag with full Animus props. */
|
|
89
51
|
export type AnimusComponent<El extends keyof JSX.IntrinsicElements, PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, BS, V, S, AG, CP extends Record<string, Prop>> = ForwardRefExoticComponent<AnimusConsumerProps<El, PR, GR, V, S, AG, CP>> & ExtendFn<PR, GR, BS, V, S, AG, CP> & {
|
|
90
52
|
readonly [ConsumerProps]: AnimusConsumerProps<El, PR, GR, V, S, AG, CP>;
|
|
91
53
|
readonly [VariantConfigBrand]: V;
|
|
92
|
-
/** Effective-default contract: variant axis → default option. */
|
|
93
54
|
readonly variantDefaults: Readonly<Record<string, string>>;
|
|
94
55
|
};
|
|
95
56
|
/**
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
* its required props stay required at the callsite. Animus-managed keys are
|
|
99
|
-
* removed first: the runtime consumes those, and keeping them would
|
|
100
|
-
* intersect a variant union with the wrapped component's own type for the
|
|
101
|
-
* same key (collapsing it to never). C is already inferred by .asComponent()
|
|
102
|
-
* before this type is applied, so ComponentProps<C> is a strictly downstream
|
|
103
|
-
* derivation. Named (not inlined) so the same type serves as
|
|
104
|
-
* ForwardRefExoticComponent's P parameter AND the ConsumerProps brand —
|
|
105
|
-
* compose() reads the brand by indexed access instead of inferring through
|
|
106
|
-
* ForwardRefExoticComponent.
|
|
57
|
+
* Managed keys are removed from the wrapped component's props first —
|
|
58
|
+
* intersecting a variant union with its own type for a key collapses to never.
|
|
107
59
|
*/
|
|
108
60
|
type AnimusWrappedConsumerProps<C extends ComponentType<any>, PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, V, S, CP extends Record<string, Prop>> = Omit<ComponentProps<C>, AnimusManagedKeys<PR, GR, V, S, {}, CP>> & Record<string, any> & GroupProps<PR, GR, {}> & VariantProps<V> & StateProps<S> & SelectorAliasProps<GroupProps<PR, GR, {}>> & {
|
|
109
61
|
as?: keyof JSX.IntrinsicElements | ComponentType<any>;
|
|
@@ -111,26 +63,14 @@ type AnimusWrappedConsumerProps<C extends ComponentType<any>, PR extends Record<
|
|
|
111
63
|
className?: string;
|
|
112
64
|
children?: ReactNode;
|
|
113
65
|
};
|
|
114
|
-
/** Component type for .asComponent() — wraps an existing React component. */
|
|
115
66
|
export type AnimusWrappedComponent<C extends ComponentType<any>, PR extends Record<string, Prop>, GR extends Record<string, (keyof PR)[]>, BS, V, S, AG, CP extends Record<string, Prop>> = ForwardRefExoticComponent<AnimusWrappedConsumerProps<C, PR, GR, V, S, CP>> & ExtendFn<PR, GR, BS, V, S, AG, CP> & {
|
|
116
67
|
readonly [ConsumerProps]: AnimusWrappedConsumerProps<C, PR, GR, V, S, CP>;
|
|
117
68
|
readonly [VariantConfigBrand]: V;
|
|
118
|
-
/** Effective-default contract: variant axis → default option. */
|
|
119
69
|
readonly variantDefaults: Readonly<Record<string, string>>;
|
|
120
70
|
};
|
|
121
|
-
/**
|
|
122
|
-
* Strip string index signatures from a type, keeping only
|
|
123
|
-
* explicitly-declared keys. Needed because ExtendFn widens V
|
|
124
|
-
* with `& Record<string, VariantConfig>`.
|
|
125
|
-
*/
|
|
126
71
|
type StripStringIndex<T> = {
|
|
127
72
|
[K in keyof T as string extends K ? never : K]: T[K];
|
|
128
73
|
};
|
|
129
|
-
/**
|
|
130
|
-
* Extract the raw variant config (V generic) from an AnimusComponent.
|
|
131
|
-
* Prefers the VariantConfigBrand (direct indexed access, no conditional
|
|
132
|
-
* inference). Falls back to extend() inference for non-branded components.
|
|
133
|
-
*/
|
|
134
74
|
export type ExtractVariantsConfig<C> = C extends {
|
|
135
75
|
readonly [VariantConfigBrand]: infer V;
|
|
136
76
|
} ? StripStringIndex<V> : C extends {
|
|
@@ -138,41 +78,12 @@ export type ExtractVariantsConfig<C> = C extends {
|
|
|
138
78
|
variants: infer V;
|
|
139
79
|
};
|
|
140
80
|
} ? StripStringIndex<V> : {};
|
|
141
|
-
/**
|
|
142
|
-
* Extract consumer-facing variant props from an AnimusComponent.
|
|
143
|
-
* Returns { size?: 'sm' | 'lg', variant?: 'fill' | 'ghost', ... }
|
|
144
|
-
*/
|
|
145
81
|
export type VariantPropsOf<C> = VariantProps<ExtractVariantsConfig<C>>;
|
|
146
|
-
/**
|
|
147
|
-
* Extract the Root slot component from a Slots record.
|
|
148
|
-
* Convention: the key must be literally 'Root' (exact match).
|
|
149
|
-
*/
|
|
150
82
|
type RootSlot<Slots extends Record<string, unknown>> = 'Root' extends keyof Slots ? Slots['Root'] : never;
|
|
151
|
-
/**
|
|
152
|
-
* Variant keys that exist on the Root slot.
|
|
153
|
-
* Only Root variant keys are valid as shared keys — Root is the
|
|
154
|
-
* source of truth and must accept the prop for CSS cascade to work.
|
|
155
|
-
*/
|
|
156
83
|
type RootVariantKeys<Slots extends Record<string, unknown>> = keyof VariantPropsOf<RootSlot<Slots>> & string;
|
|
157
|
-
/**
|
|
158
|
-
* Configuration object for shared variant propagation.
|
|
159
|
-
* Keys are variant names from Root. Value is `true` to share.
|
|
160
|
-
* Non-Root slots that have matching variant keys receive the
|
|
161
|
-
* value via CSS cascade. Slots without the key are unaffected.
|
|
162
|
-
*
|
|
163
|
-
* @example
|
|
164
|
-
* compose(slots, { shared: { density: true, intent: true } })
|
|
165
|
-
*/
|
|
166
84
|
export type SharedConfig<Slots extends Record<string, unknown>> = {
|
|
167
85
|
[K in RootVariantKeys<Slots>]?: true;
|
|
168
86
|
};
|
|
169
|
-
/**
|
|
170
|
-
* Seal a component's props for compose output.
|
|
171
|
-
* Prefers the ConsumerProps brand (direct indexed access — zero conditional
|
|
172
|
-
* inference) over PropsOf (which must structurally match and infer through
|
|
173
|
-
* ForwardRefExoticComponent). This eliminates the depth explosion that
|
|
174
|
-
* occurs in Next.js environments where the TS plugin adds overhead.
|
|
175
|
-
*/
|
|
176
87
|
type SealedProps<C> = C extends {
|
|
177
88
|
readonly [ConsumerProps]: infer P;
|
|
178
89
|
} ? Omit<P, 'extend'> & {
|
|
@@ -182,13 +93,6 @@ type SealedProps<C> = C extends {
|
|
|
182
93
|
className?: string;
|
|
183
94
|
children?: ReactNode;
|
|
184
95
|
} : never;
|
|
185
|
-
/**
|
|
186
|
-
* The output of compose() — a record of slot names mapped to sealed
|
|
187
|
-
* React components. Slot keys must be PascalCase (Root, Control, Label).
|
|
188
|
-
* Props are pre-resolved per-slot via SealedProps to avoid depth
|
|
189
|
-
* explosion when this type appears inside Next.js generated
|
|
190
|
-
* `typeof import()` contexts.
|
|
191
|
-
*/
|
|
192
96
|
export type ComposedFamily<Slots extends Record<string, unknown>> = {
|
|
193
97
|
[K in keyof Slots]: ForwardRefExoticComponent<SealedProps<Slots[K]>>;
|
|
194
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/types/component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,yBAAyB,EACzB,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EACV,cAAc,EACd,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,aAAa,EACd,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/types/component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc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
|
package/dist/types/config.d.ts
CHANGED
|
@@ -15,7 +15,10 @@ export interface Prop extends BaseProperty {
|
|
|
15
15
|
scale?: string | MapScale | ArrayScale;
|
|
16
16
|
variable?: string;
|
|
17
17
|
negative?: boolean;
|
|
18
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* When false, scale-bound props accept arbitrary strings alongside scale
|
|
20
|
+
* keys. Defaults to true.
|
|
21
|
+
*/
|
|
19
22
|
strict?: boolean;
|
|
20
23
|
currentVar?: string;
|
|
21
24
|
transform?: (val: string | number, prop?: string, props?: AbstractProps) => string | number | CSSObject;
|
|
@@ -29,28 +32,9 @@ export interface AbstractParser {
|
|
|
29
32
|
config: Record<string, Prop>;
|
|
30
33
|
}
|
|
31
34
|
type IsEmpty<T> = [] extends T ? true : false | {} extends T ? true : false;
|
|
32
|
-
/**
|
|
33
|
-
* When `strict: false`, always include globals ((string & {}) | 0) for typeahead
|
|
34
|
-
* with escape hatch, regardless of whether the scale has values.
|
|
35
|
-
* When strict is omitted or true, fall back to IsEmpty (current behavior).
|
|
36
|
-
*/
|
|
37
35
|
type StrictOrEmpty<Config extends Prop, ScaleT> = Config['strict'] extends false ? true : IsEmpty<ScaleT>;
|
|
38
|
-
/**
|
|
39
|
-
* Negate numeric literal types.
|
|
40
|
-
* `NegateKeys<4 | 8 | 16>` → `-4 | -8 | -16`
|
|
41
|
-
* Excludes 0 (negative zero is meaningless).
|
|
42
|
-
*/
|
|
43
36
|
type NegateKeys<T> = T extends number ? T extends 0 ? never : `-${T}` extends `${infer N extends number}` ? N : never : never;
|
|
44
37
|
export type PropertyValues<Property extends Prop, IncludeGlobals = false> = Exclude<PropertyTypes<IncludeGlobals extends true ? (string & {}) | 0 : never>[Property['property']], IncludeGlobals extends true ? never : object | any[]>;
|
|
45
|
-
/**
|
|
46
|
-
* Resolve scale values from T directly. No CompatTheme fallback.
|
|
47
|
-
*
|
|
48
|
-
* Resolution order:
|
|
49
|
-
* 1. If scale is a key of T's token scales → keyof T[scale]
|
|
50
|
-
* 2. If scale is an inline MapScale → keyof scale
|
|
51
|
-
* 3. If scale is an inline ArrayScale → scale[number]
|
|
52
|
-
* 4. Otherwise → raw CSS property values
|
|
53
|
-
*/
|
|
54
38
|
type NegativeOf<Config extends Prop, Keys> = Config['negative'] extends true ? NegateKeys<Extract<Keys, number>> : never;
|
|
55
39
|
export type ScaleValue<Config extends Prop, T extends BaseTheme> = Config['scale'] extends keyof TokenScales<T> ? keyof TokenScales<T>[Config['scale']] | NegativeOf<Config, keyof TokenScales<T>[Config['scale']]> | PropertyValues<Config, StrictOrEmpty<Config, TokenScales<T>[Config['scale']]>> : Config['scale'] extends MapScale ? keyof Config['scale'] | NegativeOf<Config, keyof Config['scale']> | PropertyValues<Config, StrictOrEmpty<Config, Config['scale']>> : Config['scale'] extends ArrayScale ? Config['scale'][number] | PropertyValues<Config, StrictOrEmpty<Config, Config['scale']>> : PropertyValues<Config, true>;
|
|
56
40
|
export type Scale<Config extends Prop, T extends BaseTheme> = ResponsiveProp<ScaleValue<Config, T>>;
|
|
@@ -65,91 +49,24 @@ export interface Parser<Config extends Record<string, Prop>, T extends BaseTheme
|
|
|
65
49
|
export type SystemProps<P extends AbstractParser, SafeProps = Omit<Arg<P>, 'theme'>> = {
|
|
66
50
|
[K in keyof SafeProps]: SafeProps[K];
|
|
67
51
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Theme-fixed scale value — uses the augmentable Theme interface
|
|
70
|
-
* instead of a generic T. This enables type-safe CSS object constraints
|
|
71
|
-
* without threading T through the entire class hierarchy.
|
|
72
|
-
*/
|
|
73
|
-
/** Colors-only: accept `{colors.key/number}` opacity syntax in component styles. */
|
|
74
52
|
type ColorOpacityRef<Config extends Prop> = Config['scale'] extends 'colors' ? 'colors' extends keyof TokenScales<Theme> ? `{colors.${keyof TokenScales<Theme>[Config['scale'] & keyof TokenScales<Theme>] & string}/${number}}` : never : never;
|
|
75
53
|
/**
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
* admitted verbatim as string values on strict scale-typed props. The resolver
|
|
79
|
-
* already accepts and emits these opaquely (container units transit the
|
|
80
|
-
* scale-lookup/transform/pass-through paths with no special awareness); this
|
|
81
|
-
* union closes the type-side gap so `gap: '2cqi'` typechecks WITHOUT widening a
|
|
82
|
-
* strict scale prop to arbitrary strings (`'2vw'` stays rejected — admission is
|
|
83
|
-
* these six suffixes only). Shallow, flat union — no cross-products (the repo's
|
|
84
|
-
* TS2589 zone is string-embedded unions). The `${number}` prefix is
|
|
85
|
-
* load-bearing: a bare `'cqi'` (no numeric part) is not assignable.
|
|
54
|
+
* The six container-query units, admitted on strict scale props ('2vw' stays
|
|
55
|
+
* rejected). The union stays flat — cross-products hit TS2589.
|
|
86
56
|
*/
|
|
87
57
|
export type ContainerUnitValue = `${number}cqw` | `${number}cqi` | `${number}cqh` | `${number}cqb` | `${number}cqmin` | `${number}cqmax`;
|
|
88
58
|
export type ThemedScaleValue<Config extends Prop> = Config['scale'] extends keyof TokenScales<Theme> ? keyof TokenScales<Theme>[Config['scale']] | NegativeOf<Config, keyof TokenScales<Theme>[Config['scale']]> | PropertyValues<Config, StrictOrEmpty<Config, TokenScales<Theme>[Config['scale']]>> | ColorOpacityRef<Config> | ContainerUnitValue : Config['scale'] extends MapScale ? keyof Config['scale'] | NegativeOf<Config, keyof Config['scale']> | PropertyValues<Config, StrictOrEmpty<Config, Config['scale']>> | ContainerUnitValue : Config['scale'] extends ArrayScale ? Config['scale'][number] | PropertyValues<Config, StrictOrEmpty<Config, Config['scale']>> : PropertyValues<Config, true>;
|
|
89
59
|
export type ThemedScale<Config extends Prop> = ResponsiveProp<ThemedScaleValue<Config>>;
|
|
90
|
-
/** Raw nested-selector block keys. The subject `&` may sit anywhere in the
|
|
91
|
-
* key — leading (`'&:hover'`, `'& > *'`), ancestor-prefixed
|
|
92
|
-
* (`'[aria-sort="ascending"] &'`, `'.group:hover &:hover'`), or repeated
|
|
93
|
-
* (`'& + &'`); resolution substitutes the composed class at every unquoted
|
|
94
|
-
* subject position. */
|
|
95
60
|
type RawSelectorKey = `${string}&${string}`;
|
|
96
|
-
/**
|
|
97
|
-
* Published alias keys: registered condition aliases + registered
|
|
98
|
-
* custom selector aliases, drawn from the augmentable `Conditions`/`Selectors`
|
|
99
|
-
* interfaces. `never` until a consumer augments.
|
|
100
|
-
*
|
|
101
|
-
* JOINT NAMESPACE: conditions and selectors share the single `_`
|
|
102
|
-
* block-key namespace, so this gate reads BOTH interfaces. Publishing EITHER
|
|
103
|
-
* `Conditions` OR `Selectors` makes this non-`never`, which flips
|
|
104
|
-
* `KnownUnderscoreKey` (below) from permissive to validating for the WHOLE `_`
|
|
105
|
-
* namespace — not just the published side. This joint gate is documented here
|
|
106
|
-
* and at the `Conditions` interface declaration (`conditions.ts`); the
|
|
107
|
-
* `Selectors` interface (`selectors.ts`) feeds the same `keyof … | keyof …`
|
|
108
|
-
* union.
|
|
109
|
-
*/
|
|
110
61
|
type PublishedAliasKeys = Extract<keyof Conditions | keyof Selectors, `_${string}`>;
|
|
111
|
-
/**
|
|
112
|
-
* The `_`-prefixed keys accepted as recursing block keys.
|
|
113
|
-
*
|
|
114
|
-
* Graceful degradation (mirrors the empty-`Theme` fallback and
|
|
115
|
-
* `MediaQueryMap`'s `string extends BreakpointKeys` branch): when no condition
|
|
116
|
-
* or selector aliases are published, ALL `_${string}` keys stay permissive —
|
|
117
|
-
* a system that registered aliases via `.addConditions()` but did not augment
|
|
118
|
-
* `Conditions` (e.g. the vite-app fixture) still authors its aliased blocks
|
|
119
|
-
* without error. Once a publication exists, built-in selector aliases AND
|
|
120
|
-
* built-in condition aliases plus the published keys recurse; every other `_`
|
|
121
|
-
* key falls to the branded `UnknownConditionAlias` arm.
|
|
122
|
-
*
|
|
123
|
-
* Built-ins (`BuiltInSelectorAlias | BuiltInConditionAlias`) are STATIC unions
|
|
124
|
-
* in the validating branch, never members of the augmentable interfaces (design
|
|
125
|
-
* D8; see `BUILT_IN_CONDITIONS` in `conditions.ts`) — so `_motionReduce`,
|
|
126
|
-
* `_osDark`, … type as valid block keys with ZERO condition registrations, yet
|
|
127
|
-
* an empty publication keeps the whole namespace permissive (graceful
|
|
128
|
-
* degradation preserved).
|
|
129
|
-
*/
|
|
130
62
|
type KnownUnderscoreKey = [PublishedAliasKeys] extends [never] ? `_${string}` : BuiltInSelectorAlias | BuiltInConditionAlias | PublishedAliasKeys;
|
|
131
|
-
/** Pass-through CSS property value (plus `animationName` widening). */
|
|
132
63
|
type PassThroughProp<K extends keyof PropertyTypes> = K extends 'animationName' ? ResponsiveProp<KeyframeRef<string> | PropertyTypes[K]> : ResponsiveProp<PropertyTypes[K]>;
|
|
133
|
-
/**
|
|
134
|
-
* The `_`-prefixed MEMBERS of a recursing block body. Optional members over a
|
|
135
|
-
* closed set (built-ins + published) reject unknown `_` keys at depth as excess
|
|
136
|
-
* properties; when nothing is published the set opens to `` `_${string}` `` —
|
|
137
|
-
* a pattern index signature — keeping non-augmenting systems permissive.
|
|
138
|
-
*/
|
|
139
64
|
type UnderscoreBlockMembers<Config extends Record<string, Prop>> = {
|
|
140
65
|
[K in KnownUnderscoreKey]?: ThemedBlockBody<Config>;
|
|
141
66
|
};
|
|
142
67
|
/**
|
|
143
|
-
*
|
|
144
|
-
*
|
|
145
|
-
* build emits). Deliberately a FIXED type (no reference to the outer inferred
|
|
146
|
-
* `Props`): a `ThemedCSSProps<Props[K], …>` arm would be reverse-mapped-inferred
|
|
147
|
-
* away at the `.styles()` call boundary and silently stop CHECKING nested values
|
|
148
|
-
* (booleans/off-scale keys would pass). Structuring the body as a fixed
|
|
149
|
-
* intersection restores structural checking at every depth — scale-typed props
|
|
150
|
-
* inside a nested block retain their scale-key validation. Raw `'&…'`/at-rule
|
|
151
|
-
* keys and `_`-aliases recurse; every other nested key is a pass-through CSS
|
|
152
|
-
* prop or an excess property.
|
|
68
|
+
* Must stay a FIXED type: an arm referencing the outer inferred `Props` is
|
|
69
|
+
* reverse-mapped away at `.styles()` and stops checking nested values.
|
|
153
70
|
*/
|
|
154
71
|
type ThemedBlockBody<Config extends Record<string, Prop>> = {
|
|
155
72
|
[K in Exclude<keyof PropertyTypes, keyof Config>]?: PassThroughProp<K>;
|
|
@@ -158,28 +75,6 @@ type ThemedBlockBody<Config extends Record<string, Prop>> = {
|
|
|
158
75
|
} & {
|
|
159
76
|
[K in RawSelectorKey | RawAtRuleKey]?: ThemedBlockBody<Config>;
|
|
160
77
|
} & UnderscoreBlockMembers<Config>;
|
|
161
|
-
/**
|
|
162
|
-
* Theme-aware CSS props — uses the augmentable Theme interface to constrain
|
|
163
|
-
* values per-key, plus kind-dispatched arms for block keys.
|
|
164
|
-
* No generic T and no `Conditions`/`Selectors` generic thread through the
|
|
165
|
-
* `Animus` class family — the arms read the augmentable interfaces directly,
|
|
166
|
-
* the same publication mechanism as the augmented `Theme`.
|
|
167
|
-
*
|
|
168
|
-
* Arm dispatch per key `K`:
|
|
169
|
-
* 1. registered system prop (`keyof Config`) → `ThemedScale` (scale-narrowed).
|
|
170
|
-
* 2. block keys — raw `'&…'` selectors, valid raw `'@media|@container|
|
|
171
|
-
* @supports …'` at-rules, and known/permissive `_`-aliases — recurse into
|
|
172
|
-
* `ThemedBlockBody` (the complete, checked, themed surface).
|
|
173
|
-
* 3. pass-through CSS property (`keyof PropertyTypes`) → `ResponsiveProp<…>`
|
|
174
|
-
* so breakpoint value maps work on every themed prop, not only
|
|
175
|
-
* propConfig-registered ones. `animationName` keeps its `KeyframeRef`
|
|
176
|
-
* widening (`animationName: motion.ember`).
|
|
177
|
-
* 4. unknown `_`-prefixed key (publication present) → branded
|
|
178
|
-
* `UnknownConditionAlias<K>` naming the key + remedy.
|
|
179
|
-
* 5. unknown `@`-prefixed key (malformed at-rule) → branded `UnknownAtRule<K>`.
|
|
180
|
-
* 6. anything else → the legacy accept-object (non-`_`/`@` junk keys are out
|
|
181
|
-
* of D9's scope; unchanged behavior).
|
|
182
|
-
*/
|
|
183
78
|
export type ThemedCSSProps<Props, Config extends Record<string, Prop>> = {
|
|
184
79
|
[K in keyof Props]?: K extends keyof Config ? ThemedScale<Config[K]> : K extends RawSelectorKey ? ThemedBlockBody<Config> : K extends RawAtRuleKey ? ThemedBlockBody<Config> : K extends KnownUnderscoreKey ? ThemedBlockBody<Config> : K extends keyof PropertyTypes ? PassThroughProp<K> : K extends `_${string}` ? UnknownConditionAlias<K & string> : K extends `@${string}` ? UnknownAtRule<K & string> : Omit<PropertyTypes, keyof Config> & {
|
|
185
80
|
[P in keyof Config]?: ThemedScale<Config[P]>;
|
|
@@ -204,38 +99,14 @@ export type CSSPropMap<Props, System> = {
|
|
|
204
99
|
export type CSSProps<Props, System> = {
|
|
205
100
|
[K in keyof Props]?: K extends keyof System ? System[K] : K extends keyof PropertyTypes ? PropertyTypes[K] : Omit<PropertyTypes, keyof System> & Omit<System, 'theme'>;
|
|
206
101
|
};
|
|
207
|
-
/**
|
|
208
|
-
* Built-in selector alias keys.
|
|
209
|
-
* Each maps to one or more CSS selectors (e.g. `_hover` → `&:hover`).
|
|
210
|
-
*/
|
|
211
102
|
export type BuiltInSelectorAlias = '_link' | '_visited' | '_hover' | '_focus' | '_focusVisible' | '_focusWithin' | '_active' | '_target' | '_disabled' | '_checked' | '_invalid' | '_required' | '_readOnly' | '_expanded' | '_selected' | '_pressed' | '_before' | '_after' | '_placeholder' | '_selection' | '_first' | '_last' | '_even' | '_odd' | '_empty';
|
|
212
103
|
/**
|
|
213
|
-
* Built-in
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* `conditions.ts
|
|
217
|
-
* `types.test-d.tsx` positives are the drift guard).
|
|
218
|
-
*
|
|
219
|
-
* This is a STATIC union folded into `KnownUnderscoreKey`'s validating branch,
|
|
220
|
-
* exactly like `BuiltInSelectorAlias` — NOT default members of the augmentable
|
|
221
|
-
* `Conditions` interface. Interface members would make publication permanently
|
|
222
|
-
* non-empty and break inc-04's graceful-degradation contract (a non-augmenting
|
|
223
|
-
* consumer with custom aliases would flip from permissive to branded-rejection
|
|
224
|
-
* the day built-ins shipped). Color-mode aliases (`_dark` / `_light`) are OUT —
|
|
225
|
-
* they are selector-kind surface owned by the `system-color-scheme` change.
|
|
104
|
+
* Built-in media-condition aliases. A static union, never members of the
|
|
105
|
+
* augmentable `Conditions`: membership would make the `_` namespace validating
|
|
106
|
+
* for every consumer. Every alias needs a matching entry in
|
|
107
|
+
* `BUILT_IN_CONDITIONS` in conditions.ts, and only type tests catch that drift.
|
|
226
108
|
*/
|
|
227
109
|
export type BuiltInConditionAlias = '_motionReduce' | '_motionSafe' | '_print' | '_portrait' | '_landscape' | '_moreContrast' | '_lessContrast' | '_osDark' | '_osLight';
|
|
228
|
-
/**
|
|
229
|
-
* Selector alias props for component callsite.
|
|
230
|
-
* Each alias key accepts the same prop interface as the component's
|
|
231
|
-
* system groups, wrapped in Partial<>.
|
|
232
|
-
*
|
|
233
|
-
* Built-in selector aliases come from the static `BuiltInSelectorAlias` union;
|
|
234
|
-
* registered CUSTOM selector aliases fold in from the augmentable `Selectors`
|
|
235
|
-
* interface, making the `selector-alias-callsite` custom-alias
|
|
236
|
-
* promise true. Condition aliases are deliberately NOT included — conditions
|
|
237
|
-
* are block-position only (media-condition-aliases spec), never callsite props.
|
|
238
|
-
*/
|
|
239
110
|
export type SelectorAliasProps<GroupPropValues> = {
|
|
240
111
|
[K in BuiltInSelectorAlias | Extract<keyof Selectors, `_${string}`>]?: Partial<GroupPropValues>;
|
|
241
112
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC3B,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,a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