@animus-ui/system 0.1.9 → 0.1.12
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 +3 -2
- package/dist/Animus.d.ts.map +1 -1
- package/dist/AnimusExtended.d.ts +3 -2
- 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 +6 -0
- package/dist/class-resolver.d.ts.map +1 -0
- package/dist/class-resolver.js +2 -0
- 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-EpwTL9Sa.js +228 -0
- package/dist/createComposedFamily-C4NovMcd.js +115 -0
- package/dist/groups/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +318 -408
- 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 +10 -9
- 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 +2 -7
- package/dist/runtime-entry.d.ts.map +1 -1
- package/dist/runtime-entry.js +2 -1
- package/dist/selectors.d.ts +6 -45
- package/dist/selectors.d.ts.map +1 -1
- package/dist/{size-DHdmBc64.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 +17 -4
- package/dist/assert-root-slot-B83scqPh.js +0 -21
- package/dist/createComposedFamily-3ZugjBpU.js +0 -472
package/dist/conditions.d.ts
CHANGED
|
@@ -1,147 +1,67 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Condition alias registry
|
|
3
|
-
* strings
|
|
4
|
-
* selector alias registry (`selectors.ts`): alias → `{ value, order, kind }`.
|
|
5
|
-
*
|
|
6
|
-
* `order` determines cascade precedence within a layer (aliased conditions emit
|
|
7
|
-
* in registry order, per design D4). `kind` is inferred from the at-rule prefix
|
|
8
|
-
* of `value` (design D3) and drives which at-rule the extractor wraps the block
|
|
9
|
-
* in. Serialized into the manifest as the NEW `conditionAliases` field, leaving
|
|
10
|
-
* `selectorAliases` byte-for-byte unchanged.
|
|
11
|
-
*
|
|
12
|
-
* This module hosts BOTH the runtime registry and the authoring TYPE surface
|
|
13
|
-
* (inc 04): the augmentable `Conditions`/`Selectors` publication, the
|
|
14
|
-
* `ConditionsOf`/`SelectorsOf` extractors, the branded rejection types
|
|
15
|
-
* (`UnknownConditionAlias`/`UnknownAtRule`, plus the cross-registry
|
|
16
|
-
* `ReservedBySelectorRegistry`/`ReservedByConditionRegistry`), and the shallow
|
|
17
|
-
* `RawAtRuleKey` shapes consumed by `ThemedCSSProps`' kind-dispatched arms.
|
|
18
|
-
* `addConditions()` constrains values to `AtRuleValue` at the type level;
|
|
19
|
-
* `inferConditionKind` remains the runtime fail-loud check.
|
|
2
|
+
* Condition alias registry: `_`-prefixed alias keys → at-rule condition
|
|
3
|
+
* strings, plus the authoring type surface consumers augment.
|
|
20
4
|
*/
|
|
21
|
-
/** The three condition kinds, inferred from the at-rule prefix of the value. */
|
|
22
5
|
export type ConditionKind = 'media' | 'container' | 'supports';
|
|
23
6
|
/**
|
|
24
|
-
* Augmentable registry of registered condition alias keys. Empty
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* ```ts
|
|
28
|
-
* declare module '@animus-ui/system' {
|
|
29
|
-
* interface Conditions extends Record<ConditionsOf<typeof ds>, true> {}
|
|
30
|
-
* }
|
|
31
|
-
* ```
|
|
32
|
-
*
|
|
33
|
-
* When this interface is empty (no publication), `ThemedCSSProps` keeps
|
|
34
|
-
* `_`-prefixed block keys permissive — the same graceful degradation the
|
|
35
|
-
* augmentable `Theme` uses (empty theme ⇒ raw CSS values). Once populated, the
|
|
36
|
-
* validating arms engage: unknown `_` keys resolve to `UnknownConditionAlias`.
|
|
37
|
-
*
|
|
38
|
-
* JOINT NAMESPACE (inc-04 F8/F9): condition and selector aliases share the one
|
|
39
|
-
* `_` block-key namespace, so publishing EITHER `Conditions` OR `Selectors`
|
|
40
|
-
* flips BOTH namespaces from permissive to validating (see `KnownUnderscoreKey`
|
|
41
|
-
* in `types/config.ts`, whose gate reads `keyof Conditions | keyof Selectors`).
|
|
42
|
-
*
|
|
43
|
-
* Built-in condition aliases (`BUILT_IN_CONDITIONS`, design D8) are NOT members
|
|
44
|
-
* of this interface — they live in the static `BuiltInConditionAlias` union
|
|
45
|
-
* (`types/config.ts`), mirroring `BuiltInSelectorAlias`. Defaulting members here
|
|
46
|
-
* would make publication permanently non-empty and destroy the degradation
|
|
47
|
-
* contract above (a non-augmenting consumer with custom aliases would flip from
|
|
48
|
-
* permissive to branded-rejection the day built-ins shipped).
|
|
7
|
+
* Augmentable registry of registered condition alias keys. Empty keeps `_`
|
|
8
|
+
* block keys permissive; publishing either registry validates both.
|
|
49
9
|
*/
|
|
50
10
|
export interface Conditions {
|
|
51
11
|
}
|
|
52
12
|
declare const CONDS_BRAND: unique symbol;
|
|
53
13
|
declare const SELS_BRAND: unique symbol;
|
|
54
14
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* consumer's augmentation site. Type-only — never present at runtime.
|
|
15
|
+
* Type-only phantom brand on a built system, carrying the registered
|
|
16
|
+
* condition (`C`) and selector (`S`) alias keys to the augmentation site.
|
|
58
17
|
*/
|
|
59
18
|
export interface RegistryBrand<C extends string = never, S extends string = never> {
|
|
60
19
|
readonly [CONDS_BRAND]?: C;
|
|
61
20
|
readonly [SELS_BRAND]?: S;
|
|
62
21
|
}
|
|
63
|
-
/** Extract the registered condition alias keys from a built system. */
|
|
64
22
|
export type ConditionsOf<Sys> = Sys extends RegistryBrand<infer C, string> ? C : never;
|
|
65
|
-
/** Extract the registered custom selector alias keys from a built system. */
|
|
66
23
|
export type SelectorsOf<Sys> = Sys extends RegistryBrand<string, infer S> ? S : never;
|
|
67
24
|
/**
|
|
68
|
-
* Branded rejection for a `_
|
|
69
|
-
*
|
|
70
|
-
* nor a built-in condition alias.
|
|
71
|
-
* The type name carries the offending key; the `hint` states the remedy. Never
|
|
72
|
-
* a bare `never` arm — `never` produces a misleading "not assignable to
|
|
73
|
-
* 'undefined'" (design D9, measured).
|
|
25
|
+
* Branded rejection for a `_` block key that no registry owns. Not a bare
|
|
26
|
+
* `never`: that reports a misleading "not assignable to 'undefined'".
|
|
74
27
|
*/
|
|
75
28
|
export interface UnknownConditionAlias<K extends string> {
|
|
76
29
|
readonly __unknownConditionAlias: K;
|
|
77
30
|
readonly hint: `"${K}" is not a registered condition or selector alias. Register it with .addConditions() / .addSelectors(), or use a raw "&…" selector or "@media|@container|@supports (…)" key.`;
|
|
78
31
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Branded rejection for an `@`-prefixed block key that does not match an
|
|
81
|
-
* accepted at-rule shape (`@media …` / `@container …` / `@supports …`). The
|
|
82
|
-
* type name carries the offending key; the `hint` states the remedy.
|
|
83
|
-
*/
|
|
84
32
|
export interface UnknownAtRule<K extends string> {
|
|
85
33
|
readonly __unknownAtRule: K;
|
|
86
34
|
readonly hint: `"${K}" is not a valid at-rule block key. At-rule keys must begin with "@media ", "@container ", or "@supports " followed by a parenthesized/feature tail.`;
|
|
87
35
|
}
|
|
88
36
|
/**
|
|
89
|
-
*
|
|
90
|
-
*
|
|
91
|
-
* the chain. A name resolves through exactly one registry; the runtime throw in
|
|
92
|
-
* `mergeConditions` is this type's fail-loud backstop.
|
|
93
|
-
*
|
|
94
|
-
* The rejecting arm must be a real type, never a bare `never`: in VALUE
|
|
95
|
-
* position a `never` arm makes inference for the whole record fall back to the
|
|
96
|
-
* constraint, dropping BOTH the check and the literal key accumulation — the
|
|
97
|
-
* gate silently becomes a no-op.
|
|
98
|
-
*
|
|
99
|
-
* The static `BuiltInSelectorAlias`/`BuiltInConditionAlias` unions must stay in
|
|
100
|
-
* sync with `BUILT_IN_SELECTORS`/`BUILT_IN_CONDITIONS` (25 and 9 entries today)
|
|
101
|
-
* or this compile-time gate and the construction-time throw disagree.
|
|
37
|
+
* Rejection for an `addConditions()` key the selector registry owns. Never a
|
|
38
|
+
* bare `never`: in VALUE position it drops both the check and accumulation.
|
|
102
39
|
*/
|
|
103
40
|
export interface ReservedBySelectorRegistry<K extends string> {
|
|
104
41
|
readonly __reservedBySelectorRegistry: K;
|
|
105
42
|
readonly hint: `"${K}" is already a selector alias — condition and selector alias names must be disjoint. Rename this condition alias, or redefine the selector with .addSelectors().`;
|
|
106
43
|
}
|
|
107
|
-
/**
|
|
108
|
-
* Branded rejection for an `addSelectors()` key already owned by the CONDITION
|
|
109
|
-
* registry — a built-in (`BuiltInConditionAlias`) or one registered earlier in
|
|
110
|
-
* the chain. Mirror of `ReservedBySelectorRegistry`; the runtime throw in
|
|
111
|
-
* `addSelectors` is the backstop.
|
|
112
|
-
*/
|
|
113
44
|
export interface ReservedByConditionRegistry<K extends string> {
|
|
114
45
|
readonly __reservedByConditionRegistry: K;
|
|
115
46
|
readonly hint: `"${K}" is already a condition alias — condition and selector alias names must be disjoint. Rename this selector alias, or redefine the condition with .addConditions().`;
|
|
116
47
|
}
|
|
117
48
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* (`Record<`_${string}`, …>`) widens the phantom `Conds`/`Sels` union to
|
|
121
|
-
* `` `_${string}` ``; a gate that subtracted it verbatim would then match every
|
|
122
|
-
* subsequent key and reject legal aliases with a misleading brand. A widened
|
|
123
|
-
* registration must not poison the opposite-registry gate — it goes quiet and
|
|
124
|
-
* the construction-time throw stays the backstop for the names the type layer
|
|
125
|
-
* can no longer enumerate. Built-ins are subtracted separately and are
|
|
126
|
-
* unaffected.
|
|
49
|
+
* Alias names, or `never` once the union has widened to the whole `_`
|
|
50
|
+
* pattern — a widened union would reject every legal alias downstream.
|
|
127
51
|
*/
|
|
128
52
|
export type NarrowedAliases<U extends string> = `_${string}` extends U ? never : U;
|
|
129
53
|
/**
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
* unions) and stay out — Rust validates queries for real; the type layer stops
|
|
133
|
-
* at the prefix. The trailing space after each at-rule name is load-bearing: it
|
|
134
|
-
* rejects prefix typos (`@containr …`, `@medi …`) without a closed grammar.
|
|
54
|
+
* Prefix + tail only: a deep query grammar hits TS2589. The trailing space
|
|
55
|
+
* is load-bearing — it rejects prefix typos (`@medi …`) without a grammar.
|
|
135
56
|
*/
|
|
136
57
|
export type RawAtRuleKey = `@media ${string}` | `@container ${string}` | `@supports ${string}`;
|
|
137
58
|
/**
|
|
138
|
-
*
|
|
139
|
-
* as `RawAtRuleKey`, minus its trailing space — a value may open its query
|
|
59
|
+
* No trailing space, unlike `RawAtRuleKey`: a value may open its query
|
|
140
60
|
* immediately (`@media(width>=40em)`).
|
|
141
61
|
*/
|
|
142
62
|
export type AtRuleValue = `@media${string}` | `@container${string}` | `@supports${string}`;
|
|
143
63
|
export interface ConditionAlias {
|
|
144
|
-
/** Full at-rule condition string, e.g. `@media
|
|
64
|
+
/** Full at-rule condition string, e.g. `@media print`. */
|
|
145
65
|
value: string;
|
|
146
66
|
/** Sort index for cascade ordering within a layer. */
|
|
147
67
|
order: number;
|
|
@@ -150,61 +70,24 @@ export interface ConditionAlias {
|
|
|
150
70
|
}
|
|
151
71
|
export type ConditionAliasMap = Record<string, ConditionAlias>;
|
|
152
72
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* The Panda-compatible media-feature set: motion, print, orientation, contrast,
|
|
156
|
-
* and OS color-scheme preferences. Every alias is a pure `@media` feature query
|
|
157
|
-
* (`kind: 'media'`). Color-mode aliases (`_dark` / `_light`) are DELIBERATELY
|
|
158
|
-
* excluded — they are selector-kind (`[data-color-mode]`) surface owned by the
|
|
159
|
-
* `system-color-scheme` change, not media features.
|
|
160
|
-
*
|
|
161
|
-
* ORDER BAND (inc-03 full-pass): built-ins occupy a reserved band BELOW the user
|
|
162
|
-
* band — one slot of 10 per alias in table row order, 300–380. The user band
|
|
163
|
-
* starts at 500 (`mergeConditions` floors allocation at 490 → first user alias
|
|
164
|
-
* is 500), so built-ins and user registrations never interleave on collision.
|
|
165
|
-
* This mirrors the selector registry's real layout (built-ins 10–440, users
|
|
166
|
-
* 500+).
|
|
167
|
-
*
|
|
168
|
-
* The static type-level mirror is `BuiltInConditionAlias` in `types/config.ts`
|
|
169
|
-
* (added to `KnownUnderscoreKey`'s VALIDATING branch, exactly like
|
|
170
|
-
* `BuiltInSelectorAlias`). Built-ins are NOT members of the augmentable
|
|
171
|
-
* `Conditions` interface: interface members would make publication permanently
|
|
172
|
-
* non-empty, killing inc-04's graceful-degradation contract. The
|
|
173
|
-
* `types.test-d.tsx` drift positives keep the two in sync.
|
|
73
|
+
* Media-feature aliases only — color-mode aliases are selector-kind. The
|
|
74
|
+
* reserved order band (300–380) sits below the user band (500+).
|
|
174
75
|
*/
|
|
175
76
|
export declare const BUILT_IN_CONDITIONS: ConditionAliasMap;
|
|
176
77
|
/**
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
* supported at-rule name. The compile-time complement is `addConditions()`'s
|
|
180
|
-
* value constraint (`@media`/`@container`/`@supports`-prefixed template
|
|
181
|
-
* literals); this runtime throw remains the backstop for untyped callers.
|
|
78
|
+
* Throws on an unsupported prefix — the runtime backstop for untyped
|
|
79
|
+
* callers, complementing `addConditions()`'s value constraint.
|
|
182
80
|
*/
|
|
183
81
|
export declare function inferConditionKind(value: string): ConditionKind;
|
|
184
82
|
/**
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
* - User aliases override built-ins of the same name, preserving the existing
|
|
188
|
-
* order (mirrors `mergeSelectors`).
|
|
189
|
-
* - New aliases allocate orders CONTINUING from the highest existing order
|
|
190
|
-
* (floored at 490, so the first user alias lands at 500) rather than
|
|
191
|
-
* restarting at 500 each call — chained `.addConditions()` calls must not
|
|
192
|
-
* collide on order 500.
|
|
193
|
-
* - Fails loud when a condition alias name is already reserved by the SELECTOR
|
|
194
|
-
* alias registry (`reservedSelectorNames`): the two registries share the `_`
|
|
195
|
-
* namespace at the call site and their names MUST be disjoint, else a block
|
|
196
|
-
* key would be ambiguous. The error names the offending alias and both
|
|
197
|
-
* registries.
|
|
83
|
+
* Overrides keep the existing order; new aliases continue past the highest
|
|
84
|
+
* existing order (floor 490) so chained calls never collide on 500.
|
|
198
85
|
*/
|
|
199
86
|
export declare function mergeConditions(base: ConditionAliasMap, custom: Record<string, string>, reservedSelectorNames?: ReadonlySet<string>): ConditionAliasMap;
|
|
200
|
-
/** Get the sorted alias keys for deterministic cascade ordering. */
|
|
201
87
|
export declare function getSortedConditionKeys(map: ConditionAliasMap): string[];
|
|
202
88
|
/**
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* JSON is deterministic. Distinct in SHAPE from the selector map (which
|
|
206
|
-
* flattens to `alias → selector`) — the object entry is forward-compatible
|
|
207
|
-
* with a future multi-valued `values: string[]` property (design D3).
|
|
89
|
+
* Emits `alias → { value, order, kind }` in cascade order so the JSON is
|
|
90
|
+
* deterministic.
|
|
208
91
|
*/
|
|
209
92
|
export declare function serializeConditionMap(map: ConditionAliasMap): Record<string, ConditionAlias>;
|
|
210
93
|
export {};
|
package/dist/conditions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditions.d.ts","sourceRoot":"","sources":["../src/conditions.ts"],"names":[],"mappings":"AAAA
|
|
1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vE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,GAAG,EAAE,iBAAiB,GACrB,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAMhC"}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { isUnitlessProperty } from "@animus-ui/properties";
|
|
2
|
+
//#region src/runtime/is-dev.ts
|
|
3
|
+
/**
|
|
4
|
+
* The define token is tested as the initializer's own conditional, never from
|
|
5
|
+
* inside the fallback: only there can a minifier drop the dev-gated code.
|
|
6
|
+
*/
|
|
7
|
+
const IS_DEV = typeof __ANIMUS_DEV__ === "boolean" ? __ANIMUS_DEV__ : (() => {
|
|
8
|
+
try {
|
|
9
|
+
if (typeof process !== "undefined" && typeof process.env === "undefined") return true;
|
|
10
|
+
return process.env.NODE_ENV !== "production";
|
|
11
|
+
} catch {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
14
|
+
})();
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/runtime/witness.ts
|
|
17
|
+
const WITNESS_CAP = 5e3;
|
|
18
|
+
function recordWitness(component, prop, value, outcome) {
|
|
19
|
+
if (!IS_DEV) return;
|
|
20
|
+
const g = globalThis;
|
|
21
|
+
const buf = g.__ANIMUS_WITNESS__ ??= [];
|
|
22
|
+
buf.push({
|
|
23
|
+
component,
|
|
24
|
+
prop,
|
|
25
|
+
value: String(value),
|
|
26
|
+
outcome
|
|
27
|
+
});
|
|
28
|
+
if (buf.length > 5e3) buf.splice(0, buf.length - WITNESS_CAP);
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/runtime/resolveClasses.ts
|
|
32
|
+
/**
|
|
33
|
+
* A mixed property set resolves to unitless: a bare number on a length
|
|
34
|
+
* property is dropped by the parser, `px` on a unitless one shifts layout.
|
|
35
|
+
*/
|
|
36
|
+
function applyUnitFallback(value, cssProperties) {
|
|
37
|
+
if (typeof value === "number") {
|
|
38
|
+
if (cssProperties.some(isUnitlessProperty)) return String(value);
|
|
39
|
+
return `${value}px`;
|
|
40
|
+
}
|
|
41
|
+
return String(value);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The key format is fixed by the Rust css generator; a divergence here misses
|
|
45
|
+
* every static class lookup.
|
|
46
|
+
*/
|
|
47
|
+
function serializeValueKey(value) {
|
|
48
|
+
if (typeof value === "number" || typeof value === "string") return String(value);
|
|
49
|
+
if (typeof value === "object" && value !== null && !Array.isArray(value)) return Object.keys(value).sort().map((k) => `${k}:${value[k]}`).join("|");
|
|
50
|
+
return String(value);
|
|
51
|
+
}
|
|
52
|
+
function isValidTransformResult(result) {
|
|
53
|
+
return typeof result === "string" || typeof result === "number" && Number.isFinite(result);
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* The domain is results that failed `isValidTransformResult`; a valid string
|
|
57
|
+
* or finite number passed here is mislabeled.
|
|
58
|
+
*/
|
|
59
|
+
function describeResultShape(result) {
|
|
60
|
+
if (result === null) return "null";
|
|
61
|
+
if (Array.isArray(result)) return "array";
|
|
62
|
+
if (typeof result === "number") return "non-finite-number";
|
|
63
|
+
return typeof result;
|
|
64
|
+
}
|
|
65
|
+
function resolveEntry(value, dc) {
|
|
66
|
+
const key = String(value);
|
|
67
|
+
const scaleResolved = dc.scaleValues?.[key];
|
|
68
|
+
if (scaleResolved != null) {
|
|
69
|
+
const transformed = dc.transform ? dc.transform(scaleResolved) : scaleResolved;
|
|
70
|
+
if (dc.transform && !isValidTransformResult(transformed)) return { shape: describeResultShape(transformed) };
|
|
71
|
+
return String(transformed);
|
|
72
|
+
}
|
|
73
|
+
const transformed = dc.transform ? dc.transform(value) : value;
|
|
74
|
+
if (dc.transform && !isValidTransformResult(transformed)) return { shape: describeResultShape(transformed) };
|
|
75
|
+
if (typeof transformed !== "number") return String(transformed);
|
|
76
|
+
return applyUnitFallback(transformed, dc.properties && dc.properties.length > 0 ? dc.properties : dc.property ? [dc.property] : []);
|
|
77
|
+
}
|
|
78
|
+
const warnedDrops = /* @__PURE__ */ new Set();
|
|
79
|
+
function warnDroppedValue(baseClassName, propName, serializedValue) {
|
|
80
|
+
if (IS_DEV) {
|
|
81
|
+
const dedupeKey = `${baseClassName}|${propName}`;
|
|
82
|
+
if (warnedDrops.has(dedupeKey)) return;
|
|
83
|
+
warnedDrops.add(dedupeKey);
|
|
84
|
+
console.warn(`[animus:drop] ${baseClassName}: value ${serializedValue} on prop '${propName}' matched no static class and no dynamic slot — it will not render. If this prop should accept runtime values, ensure its dynamic config is emitted.`);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* A value taken from a variant default emits `--{prop}-default`, not the
|
|
89
|
+
* value, so the compose override rule misses and the parent's value wins.
|
|
90
|
+
*/
|
|
91
|
+
function applyVariantClasses(classes, baseClassName, props, config) {
|
|
92
|
+
if (!config.variants) return;
|
|
93
|
+
for (const [prop, vc] of Object.entries(config.variants)) {
|
|
94
|
+
const value = props[prop] ?? vc.default;
|
|
95
|
+
if (value != null) {
|
|
96
|
+
const isDefault = !(prop in props) && vc.default != null;
|
|
97
|
+
classes.push(`${baseClassName}--${prop}-${isDefault ? "default" : value}`);
|
|
98
|
+
recordWitness(baseClassName, prop, value, "static");
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function applyCompoundClasses(classes, props, config) {
|
|
103
|
+
if (!config.compounds) return;
|
|
104
|
+
for (const compound of config.compounds) {
|
|
105
|
+
let match = true;
|
|
106
|
+
for (const [prop, expected] of Object.entries(compound.conditions)) {
|
|
107
|
+
const current = props[prop] ?? config.variants?.[prop]?.default;
|
|
108
|
+
if (Array.isArray(expected) ? !expected.includes(current) : current !== expected) {
|
|
109
|
+
match = false;
|
|
110
|
+
break;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (match) classes.push(compound.className);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function applyStateClasses(classes, baseClassName, props, config, activeStates) {
|
|
117
|
+
if (!config.states) return;
|
|
118
|
+
for (const state of config.states) if (props[state]) {
|
|
119
|
+
classes.push(`${baseClassName}--${state}`);
|
|
120
|
+
activeStates.push(state);
|
|
121
|
+
recordWitness(baseClassName, state, "true", "static");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const warnedInvalidResults = /* @__PURE__ */ new Set();
|
|
125
|
+
function warnInvalidTransformResult(baseClassName, propName, shape) {
|
|
126
|
+
if (IS_DEV) {
|
|
127
|
+
const dedupeKey = `${baseClassName}|${propName}`;
|
|
128
|
+
if (warnedInvalidResults.has(dedupeKey)) return;
|
|
129
|
+
warnedInvalidResults.add(dedupeKey);
|
|
130
|
+
console.warn(`[animus:drop] ${baseClassName}: transform for prop '${propName}' returned ${shape} — expected string or finite number; value dropped`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Resolution is staged so a drop is atomic: one invalid transform result
|
|
135
|
+
* anywhere leaves `classes` and `dynStyle` untouched.
|
|
136
|
+
*/
|
|
137
|
+
function applyDynamicProp(classes, dynStyle, propValue, dc) {
|
|
138
|
+
const staged = [];
|
|
139
|
+
if (typeof propValue === "object" && propValue !== null && !Array.isArray(propValue)) for (const [bp, bpVal] of Object.entries(propValue)) {
|
|
140
|
+
if (bpVal == null) continue;
|
|
141
|
+
const resolved = resolveEntry(bpVal, dc);
|
|
142
|
+
if (typeof resolved !== "string") return resolved;
|
|
143
|
+
staged.push(bp === "_" ? [
|
|
144
|
+
dc.slotClass,
|
|
145
|
+
dc.varName,
|
|
146
|
+
resolved
|
|
147
|
+
] : [
|
|
148
|
+
`${dc.slotClass}-${bp}`,
|
|
149
|
+
`${dc.varName}-${bp}`,
|
|
150
|
+
resolved
|
|
151
|
+
]);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const resolved = resolveEntry(propValue, dc);
|
|
155
|
+
if (typeof resolved !== "string") return resolved;
|
|
156
|
+
staged.push([
|
|
157
|
+
dc.slotClass,
|
|
158
|
+
dc.varName,
|
|
159
|
+
resolved
|
|
160
|
+
]);
|
|
161
|
+
}
|
|
162
|
+
for (const [slotClass, varName, resolved] of staged) {
|
|
163
|
+
classes.push(slotClass);
|
|
164
|
+
dynStyle[varName] = resolved;
|
|
165
|
+
}
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
function resolveClasses(baseClassName, props, config, systemPropMap, dynamicPropConfig) {
|
|
169
|
+
const classes = [baseClassName];
|
|
170
|
+
let dynStyle;
|
|
171
|
+
applyVariantClasses(classes, baseClassName, props, config);
|
|
172
|
+
applyCompoundClasses(classes, props, config);
|
|
173
|
+
const activeStates = [];
|
|
174
|
+
applyStateClasses(classes, baseClassName, props, config, activeStates);
|
|
175
|
+
const systemPropNames = config.systemPropNames || [];
|
|
176
|
+
if (systemPropNames.length > 0) {
|
|
177
|
+
const { customPropMap, customDynamicConfig } = config;
|
|
178
|
+
for (const propName of systemPropNames) {
|
|
179
|
+
if (!(propName in props)) continue;
|
|
180
|
+
const propValue = props[propName];
|
|
181
|
+
if (propValue == null) continue;
|
|
182
|
+
const key = serializeValueKey(propValue);
|
|
183
|
+
const cls = customPropMap?.[propName]?.[key] ?? systemPropMap?.[propName]?.[key];
|
|
184
|
+
if (cls) {
|
|
185
|
+
classes.push(cls);
|
|
186
|
+
recordWitness(baseClassName, propName, key, "static");
|
|
187
|
+
} else {
|
|
188
|
+
const dc = customDynamicConfig?.[propName] ?? dynamicPropConfig?.[propName];
|
|
189
|
+
if (dc) {
|
|
190
|
+
const staged = dynStyle ?? {};
|
|
191
|
+
const invalid = applyDynamicProp(classes, staged, propValue, dc);
|
|
192
|
+
if (invalid === null) {
|
|
193
|
+
dynStyle = staged;
|
|
194
|
+
recordWitness(baseClassName, propName, key, "dynamic");
|
|
195
|
+
} else {
|
|
196
|
+
warnInvalidTransformResult(baseClassName, propName, invalid.shape);
|
|
197
|
+
recordWitness(baseClassName, propName, key, "drop");
|
|
198
|
+
}
|
|
199
|
+
} else {
|
|
200
|
+
warnDroppedValue(baseClassName, propName, key);
|
|
201
|
+
recordWitness(baseClassName, propName, key, "drop");
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
return {
|
|
207
|
+
classes,
|
|
208
|
+
dynamicStyle: dynStyle,
|
|
209
|
+
activeStates
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
//#endregion
|
|
213
|
+
//#region src/runtime/createClassResolver.ts
|
|
214
|
+
function serializeDynamicStyle(style) {
|
|
215
|
+
return Object.entries(style).map(([property, value]) => `${property}: ${value}`).join("; ");
|
|
216
|
+
}
|
|
217
|
+
function createClassResolver(className, config, systemPropMap, dynamicPropConfig) {
|
|
218
|
+
const resolveAttributes = (props) => {
|
|
219
|
+
const { classes, dynamicStyle } = resolveClasses(className, props || {}, config, systemPropMap, dynamicPropConfig);
|
|
220
|
+
const attributes = { class: classes.join(" ") };
|
|
221
|
+
if (dynamicStyle && Object.keys(dynamicStyle).length > 0) attributes.style = serializeDynamicStyle(dynamicStyle);
|
|
222
|
+
return attributes;
|
|
223
|
+
};
|
|
224
|
+
const resolver = (props) => resolveClasses(className, props || {}, config, systemPropMap, dynamicPropConfig).classes.join(" ");
|
|
225
|
+
return Object.assign(resolver, { attrs: resolveAttributes });
|
|
226
|
+
}
|
|
227
|
+
//#endregion
|
|
228
|
+
export { resolveClasses as n, createClassResolver as t };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { n as resolveClasses } from "./createClassResolver-EpwTL9Sa.js";
|
|
2
|
+
import { t as assertRootSlot } from "./assert-root-slot-C3Lp9MNJ.js";
|
|
3
|
+
import { Children, cloneElement, createElement, forwardRef, isValidElement } from "react";
|
|
4
|
+
//#region src/runtime/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* A new callback on every call: the runtime stays hook-free so components
|
|
7
|
+
* work in server components, which rules memoization out.
|
|
8
|
+
*/
|
|
9
|
+
function composeRefs(...refs) {
|
|
10
|
+
return (node) => {
|
|
11
|
+
for (const ref of refs) if (typeof ref === "function") ref(node);
|
|
12
|
+
else if (ref) ref.current = node;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* `data-*` and `aria-*` reach the DOM even when they key a variant or state,
|
|
17
|
+
* so headless libraries driving those attributes still see them.
|
|
18
|
+
*/
|
|
19
|
+
function forwardProps(props, filterProps, domProps) {
|
|
20
|
+
for (const [key, value] of Object.entries(props)) {
|
|
21
|
+
if (key === "className") continue;
|
|
22
|
+
if (!(key.startsWith("data-") || key.startsWith("aria-")) && filterProps.has(key)) continue;
|
|
23
|
+
domProps[key] = value;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* The child wins every conflict: parent props spread under the child's own, so
|
|
28
|
+
* a handler declared on the child replaces the parent's instead of chaining.
|
|
29
|
+
*/
|
|
30
|
+
function renderAsChild(className, filterProps, props, ref, classes, dynamicStyle) {
|
|
31
|
+
const child = Children.only(props.children);
|
|
32
|
+
if (!isValidElement(child)) throw new Error(`${className}: asChild requires a single React element as children`);
|
|
33
|
+
const childRef = child.ref;
|
|
34
|
+
const mergedClassName = [classes.join(" "), child.props.className].filter(Boolean).join(" ");
|
|
35
|
+
const mergedStyle = dynamicStyle || props.style || child.props.style ? {
|
|
36
|
+
...props.style,
|
|
37
|
+
...child.props.style,
|
|
38
|
+
...dynamicStyle
|
|
39
|
+
} : void 0;
|
|
40
|
+
const parentProps = {};
|
|
41
|
+
forwardProps(props, filterProps, parentProps);
|
|
42
|
+
delete parentProps.children;
|
|
43
|
+
delete parentProps.style;
|
|
44
|
+
delete parentProps.ref;
|
|
45
|
+
return cloneElement(child, {
|
|
46
|
+
...parentProps,
|
|
47
|
+
...child.props,
|
|
48
|
+
ref: composeRefs(ref, childRef),
|
|
49
|
+
className: mergedClassName,
|
|
50
|
+
...mergedStyle ? { style: mergedStyle } : {}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function renderElement(element, filterProps, props, ref, classes, dynamicStyle) {
|
|
54
|
+
const target = props.as || element;
|
|
55
|
+
const domProps = {
|
|
56
|
+
ref,
|
|
57
|
+
className: classes.join(" ")
|
|
58
|
+
};
|
|
59
|
+
forwardProps(props, filterProps, domProps);
|
|
60
|
+
if (dynamicStyle) domProps.style = props.style ? {
|
|
61
|
+
...props.style,
|
|
62
|
+
...dynamicStyle
|
|
63
|
+
} : dynamicStyle;
|
|
64
|
+
return createElement(target, domProps);
|
|
65
|
+
}
|
|
66
|
+
function createComponent(element, className, config, systemPropMap, dynamicPropConfig) {
|
|
67
|
+
const variantProps = config.variants ? Object.keys(config.variants) : [];
|
|
68
|
+
const stateProps = config.states || [];
|
|
69
|
+
const systemPropNames = config.systemPropNames || [];
|
|
70
|
+
const filterProps = /* @__PURE__ */ new Set([
|
|
71
|
+
"as",
|
|
72
|
+
"asChild",
|
|
73
|
+
...variantProps,
|
|
74
|
+
...stateProps,
|
|
75
|
+
...systemPropNames
|
|
76
|
+
]);
|
|
77
|
+
const Component = forwardRef((props, ref) => {
|
|
78
|
+
const { classes, dynamicStyle } = resolveClasses(className, props, config, systemPropMap, dynamicPropConfig);
|
|
79
|
+
if (props.className) classes.push(props.className);
|
|
80
|
+
return props.asChild ? renderAsChild(className, filterProps, props, ref, classes, dynamicStyle) : renderElement(element, filterProps, props, ref, classes, dynamicStyle);
|
|
81
|
+
});
|
|
82
|
+
Component.displayName = className;
|
|
83
|
+
const variantDefaults = {};
|
|
84
|
+
if (config.variants) {
|
|
85
|
+
for (const [prop, vc] of Object.entries(config.variants)) if (vc.default != null) variantDefaults[prop] = vc.default;
|
|
86
|
+
}
|
|
87
|
+
return Object.assign(Component, {
|
|
88
|
+
variantDefaults: Object.freeze(variantDefaults),
|
|
89
|
+
extend: () => {
|
|
90
|
+
throw new Error(`Cannot extend extracted component "${className}" at runtime. Extensions must be authored in source code using the builder API (e.g. import the original component and call .extend() there) so the extraction pipeline can resolve them at build time.`);
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/runtime/createComposedFamily.ts
|
|
96
|
+
/**
|
|
97
|
+
* The extraction emitter rewrites `compose()` calls to this form. It stays
|
|
98
|
+
* hook- and context-free so composed families work in server components.
|
|
99
|
+
*/
|
|
100
|
+
function createComposedFamily(slots, config) {
|
|
101
|
+
assertRootSlot(slots, "createComposedFamily");
|
|
102
|
+
const { name } = config;
|
|
103
|
+
const result = {};
|
|
104
|
+
for (const [slotName, SourceComponent] of Object.entries(slots)) {
|
|
105
|
+
const Wrapper = forwardRef((props, ref) => createElement(SourceComponent, {
|
|
106
|
+
...props,
|
|
107
|
+
ref
|
|
108
|
+
}, props.children));
|
|
109
|
+
Wrapper.displayName = `${name}.${slotName}`;
|
|
110
|
+
result[slotName] = Wrapper;
|
|
111
|
+
}
|
|
112
|
+
return result;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
export { createComponent as n, createComposedFamily as t };
|
package/dist/groups/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as borderShorthand, i as gridItemRatio, n as size, o as createScale, r as gridItem } from "../size-
|
|
1
|
+
import { a as borderShorthand, i as gridItemRatio, n as size, o as createScale, r as gridItem } from "../size-C6jqxiQy.js";
|
|
2
2
|
//#region src/groups/index.ts
|
|
3
3
|
const color = {
|
|
4
4
|
color: {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ export { compose } from './compose';
|
|
|
4
4
|
export type { KeyframeFrameMap, KeyframeRef, Keyframes } from './keyframes';
|
|
5
5
|
export { asset, ASSET_PLACEHOLDER_PREFIX, type AssetRef } from './asset.js';
|
|
6
6
|
export { createComponent } from './runtime';
|
|
7
|
-
export { createClassResolver } from './runtime/createClassResolver';
|
|
7
|
+
export { type ClassResolver, type ClassResolverAttributes, createClassResolver, } from './runtime/createClassResolver';
|
|
8
8
|
export { createComposedFamily } from './runtime/createComposedFamily';
|
|
9
|
-
export type { CreateKeyframesFactory, FontFace, FontFaceSrc, GlobalStyleBlock, GlobalStyleMap, GlobalStylesFactory, LibraryBundle, RegistrySnapshot, SerializedConfig, SystemBuilderStage, SystemInstance, } from './SystemBuilder';
|
|
9
|
+
export type { CreateKeyframesFactory, FontFace, FontFaceSrc, GlobalStyleBlock, GlobalStyleMap, GlobalStylesFactory, KeyframesFrameData, LibraryBundle, RegisterableGlobalStyles, RegisterableKeyframes, RegistrySnapshot, SealedSystemInstance, SerializedConfig, SystemBuilderStage, SystemBundle, SystemInstance, VocabularyCollisionEntry, VocabularyGlobalStyleEntry, VocabularyKeyframesEntry, VocabularyLegacyVerbEntry, VocabularyNameCollision, VocabularyOf, VocabularyRecord, } from './SystemBuilder';
|
|
10
10
|
export { createSystem, SystemBuilder } from './SystemBuilder';
|
|
11
11
|
export { createScale, numericOrStringScale, numericScale, stringScale, } from './scales/createScale';
|
|
12
12
|
export { type AtRuleValue, BUILT_IN_CONDITIONS, type ConditionAlias, type ConditionAliasMap, type ConditionKind, type Conditions, type ConditionsOf, type NarrowedAliases, type RawAtRuleKey, type RegistryBrand, type ReservedByConditionRegistry, type ReservedBySelectorRegistry, type SelectorsOf, type UnknownAtRule, type UnknownConditionAlias, } from './conditions.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EAAE,gBAAgB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAE,KA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