@animus-ui/system 0.1.20 → 0.1.22
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/dist/appearance/controller.d.ts +35 -0
- package/dist/appearance/controller.d.ts.map +1 -0
- package/dist/appearance/controller.js +69 -0
- package/dist/appearance/index.d.ts +2 -7
- package/dist/appearance/react.d.ts +10 -0
- package/dist/appearance/react.d.ts.map +1 -0
- package/dist/appearance/react.js +12 -0
- package/dist/appearance/svelte.d.ts +12 -0
- package/dist/appearance/svelte.d.ts.map +1 -0
- package/dist/appearance/svelte.js +14 -0
- package/dist/bootstrap/index.d.ts +24 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +10 -2
- package/dist/class-resolver.d.ts +2 -6
- package/dist/class-resolver.js +1 -1
- package/dist/component-stJhG_A-.d.ts +659 -0
- package/dist/component-stJhG_A-.d.ts.map +1 -0
- package/dist/compose-BQi7TDtL.d.ts +15 -0
- package/dist/compose-BQi7TDtL.d.ts.map +1 -0
- package/dist/compose.d.ts +2 -12
- package/dist/composeWithContext.d.ts +9 -7
- package/dist/composeWithContext.d.ts.map +1 -1
- package/dist/createClassResolver-Do1nmvkf.d.ts +71 -0
- package/dist/createClassResolver-Do1nmvkf.d.ts.map +1 -0
- package/dist/{createClassResolver-DPLExqGy.js → createClassResolver-DtHjTYa7.js} +106 -79
- package/dist/createComposedFamily-BbA_d0QH.js +195 -0
- package/dist/createComposedFamily-BkrvSsfl.d.ts +40 -0
- package/dist/createComposedFamily-BkrvSsfl.d.ts.map +1 -0
- package/dist/groups/index.d.ts +702 -699
- package/dist/groups/index.d.ts.map +1 -1
- package/dist/index-BjJkQo64.d.ts +10 -0
- package/dist/index-BjJkQo64.d.ts.map +1 -0
- package/dist/index-C1AAiaiJ.d.ts +663 -0
- package/dist/index-C1AAiaiJ.d.ts.map +1 -0
- package/dist/index.d.ts +6 -26
- package/dist/index.js +141 -41
- package/dist/runtime-entry.d.ts +3 -5
- package/dist/runtime-entry.js +3 -3
- package/package.json +15 -3
- package/dist/Animus.d.ts +0 -81
- package/dist/Animus.d.ts.map +0 -1
- package/dist/AnimusExtended.d.ts +0 -82
- package/dist/AnimusExtended.d.ts.map +0 -1
- package/dist/SystemBuilder.d.ts +0 -305
- package/dist/SystemBuilder.d.ts.map +0 -1
- package/dist/appearance/index.d.ts.map +0 -1
- package/dist/asset.d.ts +0 -16
- package/dist/asset.d.ts.map +0 -1
- package/dist/bootstrap/createAppearanceBootstrap.d.ts +0 -14
- package/dist/bootstrap/createAppearanceBootstrap.d.ts.map +0 -1
- package/dist/class-resolver.d.ts.map +0 -1
- package/dist/compose.d.ts.map +0 -1
- package/dist/conditions.d.ts +0 -94
- package/dist/conditions.d.ts.map +0 -1
- package/dist/createComposedFamily-C6CLAsMx.js +0 -128
- package/dist/declarations.d.ts +0 -38
- package/dist/declarations.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/keyframes.d.ts +0 -24
- package/dist/keyframes.d.ts.map +0 -1
- package/dist/runtime/assert-root-slot.d.ts +0 -6
- package/dist/runtime/assert-root-slot.d.ts.map +0 -1
- package/dist/runtime/createClassResolver.d.ts +0 -11
- package/dist/runtime/createClassResolver.d.ts.map +0 -1
- package/dist/runtime/createComposedFamily.d.ts +0 -11
- package/dist/runtime/createComposedFamily.d.ts.map +0 -1
- package/dist/runtime/index.d.ts +0 -14
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/is-dev.d.ts +0 -6
- package/dist/runtime/is-dev.d.ts.map +0 -1
- package/dist/runtime/resolveClasses.d.ts +0 -83
- package/dist/runtime/resolveClasses.d.ts.map +0 -1
- package/dist/runtime/witness.d.ts +0 -10
- package/dist/runtime/witness.d.ts.map +0 -1
- package/dist/runtime-entry.d.ts.map +0 -1
- package/dist/scales/createScale.d.ts +0 -7
- package/dist/scales/createScale.d.ts.map +0 -1
- package/dist/selectors.d.ts +0 -27
- package/dist/selectors.d.ts.map +0 -1
- package/dist/theme/createTheme.d.ts +0 -170
- package/dist/theme/createTheme.d.ts.map +0 -1
- package/dist/theme/flattenScale.d.ts +0 -15
- package/dist/theme/flattenScale.d.ts.map +0 -1
- package/dist/theme/index.d.ts +0 -5
- package/dist/theme/index.d.ts.map +0 -1
- package/dist/theme/property-records.d.ts +0 -79
- package/dist/theme/property-records.d.ts.map +0 -1
- package/dist/theme/resolveReferences.d.ts +0 -27
- package/dist/theme/resolveReferences.d.ts.map +0 -1
- package/dist/theme/serializeTokens.d.ts +0 -5
- package/dist/theme/serializeTokens.d.ts.map +0 -1
- package/dist/theme/types.d.ts +0 -20
- package/dist/theme/types.d.ts.map +0 -1
- package/dist/theme/utils.d.ts +0 -11
- package/dist/theme/utils.d.ts.map +0 -1
- package/dist/transforms/border.d.ts +0 -3
- package/dist/transforms/border.d.ts.map +0 -1
- package/dist/transforms/createTransform.d.ts +0 -24
- package/dist/transforms/createTransform.d.ts.map +0 -1
- package/dist/transforms/grid.d.ts +0 -5
- package/dist/transforms/grid.d.ts.map +0 -1
- package/dist/transforms/index.d.ts +0 -5
- package/dist/transforms/index.d.ts.map +0 -1
- package/dist/transforms/size.d.ts +0 -5
- package/dist/transforms/size.d.ts.map +0 -1
- package/dist/types/component.d.ts +0 -100
- package/dist/types/component.d.ts.map +0 -1
- package/dist/types/config.d.ts +0 -149
- package/dist/types/config.d.ts.map +0 -1
- package/dist/types/properties.d.ts +0 -17
- package/dist/types/properties.d.ts.map +0 -1
- package/dist/types/props.d.ts +0 -19
- package/dist/types/props.d.ts.map +0 -1
- package/dist/types/scales.d.ts +0 -3
- package/dist/types/scales.d.ts.map +0 -1
- package/dist/types/shared.d.ts +0 -4
- package/dist/types/shared.d.ts.map +0 -1
- package/dist/types/theme.d.ts +0 -111
- package/dist/types/theme.d.ts.map +0 -1
- package/dist/types/utils.d.ts +0 -5
- package/dist/types/utils.d.ts.map +0 -1
- package/dist/utils/deepMerge.d.ts +0 -2
- package/dist/utils/deepMerge.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-stJhG_A-.d.ts","names":[],"sources":["../src/conditions.ts","../src/keyframes.ts","../src/selectors.ts","../src/types/properties.ts","../src/theme/flattenScale.ts","../src/types/shared.ts","../src/types/theme.ts","../src/types/props.ts","../src/types/scales.ts","../src/types/utils.ts","../src/types/config.ts","../src/types/styling-names.ts","../src/AnimusExtended.ts","../src/types/component.ts"],"mappings":";;;;;;;;KAKY;;;;;UAOK;cAEH;cACA;;;;;UAMG,cACf,0BACA;YAEU,eAAe;YACf,cAAc;;KAGd,aAAa,OACvB,YAAY,oBAAoB,aAAa;KAEnC,YAAY,OACtB,YAAY,4BAA4B,KAAK;;;;;UAM9B,sBAAsB;WAC5B,yBAAyB;WACzB,UAAU;;UAGJ,cAAc;WACpB,iBAAiB;WACjB,UAAU;;;;;;UAOJ,2BAA2B;WACjC,8BAA8B;WAC9B,UAAU;;UAGJ,4BAA4B;WAClC,+BAA+B;WAC/B,UAAU;;;;;;KAOT,gBAAgB,yCAAyC,YAEjE;;;;;KAMQ;;;;;KASA;UAKK;;EAEf;;EAEA;;EAEA,MAAM;;KAGI,oBAAoB,eAAe;;;;;cAMlC,qBAAqB;;;;;;;KCnGtB,mBAAmB,eAAe;UAE7B,YAAY;WAClB;WACA,QAAQ;EACjB;EACA;;KAGU,UAAU,YAAY,eAAe;WACtC;WACA,sBACG,WAAW;aACV;aACA,QAAQ,IAAI;;gBAIf,WAAW,eAAe,YAAY;;;;;;;UClBjC;EACf;EACA;;KAGU,mBAAmB,eAAe;;;;;UAO7B;cAEJ,oBAAoB;;;;KCV5B;EAEH,cACI;;KAWD,oBAAoB,iCACvB,mBAAmB,aACjB,iBAAiB,aAEjB,KAAK,mBAAmB,iCACxB,KAAK,cAAc,kBAAkB,sBACrC;KAEC;KAEA,kBACF,KAAK,cAAc,qBAAqB,oBACrC;KAMD;KAcA;KAIA,iBACF,KAAK,cAAc,qBAAqB,mBACrC,oBAAoB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ACxB,GACA,IACA,IACA,GACA,GACA,IACA;YAEQ,qBAAqB;WACtB,iBAAiB,SAAS;;KAGlC,iBAAiB,QACnB,WAAW,oBAAoB,YAAY,IAAI,EAAE;KAGxC,sBAAsB,KAAK;YAC3B,2BAA2B;IAEnC,iBAAiB,KACjB;EAAY;IAAgB,gBAAgB;;IAC1C,iBAAiB;KAGX,eAAe,KAAK,aAAa,sBAAsB;KAE9D,SAAS,cAAc,gDACL,QAAQ;KAE1B,gBAAgB,cAAc,iCAC3B,eAAe,SAAS;KAEpB,aAAa,cAAc,8BACpC,KAAK,gBAAgB;KAGnB,YAAY,KAAK;YACV,sBAAsB;IAE9B,KAAK;EACH;EACA,WAAW;IAEb,UAAU,gCAAgC,KACxC,KAAK;EACH;EACA,WAAW;;KAIP,eAAe,cAAc,8BACtC,WAAW,QAAQ,0BAA0B,YAAY,MAAM;;KAItD,iBACV,WAAW,eAAe,aAC1B,WAAW,sBAAsB,QACjC,GACA,GACA,IACA,WAAW,eAAe,eACxB,mBAAmB,IAAI,IAAI,MAC7B,aAAa,KACb,WAAW,KACX,iBAAiB,MACjB,mBAAmB,mBAAmB,IAAI,IAAI;;;;;;KAOpC,kBAAkB,KAAK;EACjC,oBAAoB,WAAW,eAAe;IAE5C;EACE,qBAAqB,WAAW,sBAAsB;EACtD,gBAAgB;EAChB,oBAAoB;EACpB,oBAAoB;EACpB,cAAc,WAAW,eAAe;IAExC,iBAAiB,IAAI,IAAI,GAAG,GAAG,IAAI"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { i as AnyBrandedComponent, o as ComposedFamily, s as SharedConfig } from "./component-stJhG_A-.js";
|
|
2
|
+
//#region src/compose.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Shared variants propagate through the CSS cascade, so a slot only inherits
|
|
5
|
+
* as a DOM descendant of Root; `composeWithContext` covers portaled children.
|
|
6
|
+
*/
|
|
7
|
+
declare function compose<Slots extends {
|
|
8
|
+
Root: AnyBrandedComponent;
|
|
9
|
+
} & Record<string, AnyBrandedComponent>, const Shared extends SharedConfig<Slots>>(slots: Slots, options: {
|
|
10
|
+
shared: Shared;
|
|
11
|
+
name?: string;
|
|
12
|
+
}): ComposedFamily<Slots>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { compose as t };
|
|
15
|
+
//# sourceMappingURL=compose-BQi7TDtL.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compose-BQi7TDtL.d.ts","names":[],"sources":["../src/compose.ts"],"mappings":";;;;;;iBAmBgB,QACd;EAAgB,MAAM;IAAwB,eAE5C,4BAEI,eAAe,aAAa,QAElC,OAAO,OACP;EAAW,QAAQ;EAAQ;IAC1B,eAAe"}
|
package/dist/compose.d.ts
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
* Shared variants propagate through the CSS cascade, so a slot only inherits
|
|
4
|
-
* as a DOM descendant of Root; `composeWithContext` covers portaled children.
|
|
5
|
-
*/
|
|
6
|
-
export declare function compose<Slots extends {
|
|
7
|
-
Root: AnyBrandedComponent;
|
|
8
|
-
} & Record<string, AnyBrandedComponent>, const Shared extends SharedConfig<Slots>>(slots: Slots, options: {
|
|
9
|
-
shared: Shared;
|
|
10
|
-
name?: string;
|
|
11
|
-
}): ComposedFamily<Slots>;
|
|
12
|
-
//# sourceMappingURL=compose.d.ts.map
|
|
1
|
+
import { t as compose } from "./compose-BQi7TDtL.js";
|
|
2
|
+
export { compose };
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { i as AnyBrandedComponent, o as ComposedFamily, s as SharedConfig } from "./component-stJhG_A-.js";
|
|
2
|
+
import { ForwardRefExoticComponent } from "react";
|
|
3
|
+
//#region src/composeWithContext.d.ts
|
|
3
4
|
/**
|
|
4
5
|
* Context transport for shared variants, for children rendered in portals,
|
|
5
6
|
* where the CSS descendant selectors `compose` relies on cannot reach.
|
|
6
7
|
*/
|
|
7
8
|
export declare function composeWithContext<Slots extends {
|
|
8
|
-
|
|
9
|
+
Root: AnyBrandedComponent;
|
|
9
10
|
} & Record<string, AnyBrandedComponent>, const Shared extends SharedConfig<Slots>>(slots: Slots, options: {
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
shared: Shared;
|
|
12
|
+
name?: string;
|
|
12
13
|
}): ComposedFamily<Slots>;
|
|
13
14
|
/**
|
|
14
15
|
* The extraction emitter rewrites `composeWithContext()` calls to this form
|
|
15
16
|
* and adds the `'use client'` directive its context hooks require.
|
|
16
17
|
*/
|
|
17
18
|
export declare function createComposedFamilyWithContext(slots: Record<string, ForwardRefExoticComponent<any>>, config: {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
name: string;
|
|
20
|
+
sharedKeys: string[];
|
|
20
21
|
}): Record<string, ForwardRefExoticComponent<any>>;
|
|
22
|
+
//#endregion
|
|
21
23
|
//# sourceMappingURL=composeWithContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"composeWithContext.d.ts","
|
|
1
|
+
{"version":3,"file":"composeWithContext.d.ts","names":[],"sources":["../src/composeWithContext.ts"],"mappings":";;;;;;;wBAuBgB,mBACd;EAAgB,MAAM;IAAwB,eAE5C,4BAEI,eAAe,aAAa,QAElC,OAAO,OACP;EAAW,QAAQ;EAAQ;IAC1B,eAAe;;;;;wBA6DF,gCACd,OAAO,eAAe,iCACtB;EAAU;EAAc;IACvB,eAAe"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
//#region src/runtime/resolveClasses.d.ts
|
|
2
|
+
interface VariantConfig {
|
|
3
|
+
options: string[];
|
|
4
|
+
default?: string;
|
|
5
|
+
}
|
|
6
|
+
interface CompoundConfig {
|
|
7
|
+
conditions: Record<string, string | string[]>;
|
|
8
|
+
className: string;
|
|
9
|
+
}
|
|
10
|
+
interface ClassResolverConfig {
|
|
11
|
+
variants?: Record<string, VariantConfig>;
|
|
12
|
+
compounds?: CompoundConfig[];
|
|
13
|
+
states?: string[];
|
|
14
|
+
systemPropNames?: string[];
|
|
15
|
+
customPropMap?: Record<string, Record<string, string>>;
|
|
16
|
+
customDynamicConfig?: DynamicPropConfig;
|
|
17
|
+
/** Callback props whose `customPropMap` keys are `typedValueKey`s. */
|
|
18
|
+
typedCustomProps?: readonly string[];
|
|
19
|
+
/** System props bound to a configured transform, whose `systemPropMap`
|
|
20
|
+
* keys are `typedValueKey`s. */
|
|
21
|
+
typedSystemProps?: readonly string[];
|
|
22
|
+
}
|
|
23
|
+
type SystemPropMap = Record<string, Record<string, string>>;
|
|
24
|
+
interface ValueDynamicPropConfig {
|
|
25
|
+
varName: string;
|
|
26
|
+
slotClass: string;
|
|
27
|
+
property?: string;
|
|
28
|
+
properties?: readonly string[];
|
|
29
|
+
/** The bound transform's readable name, for diagnostics. */
|
|
30
|
+
transformName?: string;
|
|
31
|
+
/** The bound definition's key in the generated `transforms` registry. */
|
|
32
|
+
transformId?: string;
|
|
33
|
+
transform?: (value: string | number) => string | number;
|
|
34
|
+
scaleValues?: Record<string, string | number>;
|
|
35
|
+
negative?: boolean;
|
|
36
|
+
/** Values outside `scaleValues` are dropped, not applied raw. */
|
|
37
|
+
strict?: boolean;
|
|
38
|
+
/** The keywords a strict prop admits beside its tokens. */
|
|
39
|
+
keywords?: readonly string[];
|
|
40
|
+
/** The custom property the prop's slot also writes. */
|
|
41
|
+
currentVar?: string;
|
|
42
|
+
kind?: never;
|
|
43
|
+
}
|
|
44
|
+
interface DeclarationDynamicPropConfig {
|
|
45
|
+
kind: 'declarations';
|
|
46
|
+
slotClass: string;
|
|
47
|
+
/** Member property → its variable; a breakpoint appends `-{bp}`. */
|
|
48
|
+
memberVars: Record<string, string>;
|
|
49
|
+
/** Scale key → member property → resolved CSS value. */
|
|
50
|
+
declarationScaleValues: Record<string, Record<string, string>>;
|
|
51
|
+
}
|
|
52
|
+
type DeclarationConfig = DeclarationDynamicPropConfig & { [K in Exclude<keyof ValueDynamicPropConfig, 'kind' | 'slotClass'>]?: never; };
|
|
53
|
+
type DynamicPropConfig = Record<string, ValueDynamicPropConfig | DeclarationConfig>;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/runtime/createClassResolver.d.ts
|
|
56
|
+
interface ClassResolverAttributes {
|
|
57
|
+
class: string;
|
|
58
|
+
style?: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Input defaults to an open record; a builder's `asClass()` narrows it to the
|
|
62
|
+
* props the builder admitted.
|
|
63
|
+
*/
|
|
64
|
+
interface ClassResolver<Props extends object = Record<string, unknown>> {
|
|
65
|
+
(props?: Props): string;
|
|
66
|
+
attrs(props?: Props): ClassResolverAttributes;
|
|
67
|
+
}
|
|
68
|
+
declare function createClassResolver(className: string, config: ClassResolverConfig, systemPropMap?: SystemPropMap, dynamicPropConfig?: DynamicPropConfig): ClassResolver;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { DynamicPropConfig as a, ClassResolverConfig as i, ClassResolverAttributes as n, SystemPropMap as o, createClassResolver as r, ClassResolver as t };
|
|
71
|
+
//# sourceMappingURL=createClassResolver-Do1nmvkf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createClassResolver-Do1nmvkf.d.ts","names":[],"sources":["../src/runtime/resolveClasses.ts","../src/runtime/createClassResolver.ts"],"mappings":";UAAU;EACR;EACA;;UAGQ;EACR,YAAY;EACZ;;UAGe;EACf,WAAW,eAAe;EAC1B,YAAY;EACZ;EACA;EACA,gBAAgB,eAAe;EAC/B,sBAAsB;;EAEtB;;;EAGA;;KAGU,gBAAgB,eAAe;UAEjC;EACR;EACA;EACA;EACA;;EAEA;;EAEA;EACA,aAAa;EACb,cAAc;EACd;;EAEA;;EAEA;;EAEA;EACA;;UAGQ;EACR;EACA;;EAEA,YAAY;;EAEZ,wBAAwB,eAAe;;KAGpC,oBAAoB,kCACtB,KAAK,cAAc;KAGV,oBAAoB,eAE9B,yBAAyB;;;UCvDV;EACf;EACA;;;;;;UAOe,cAAc,uBAAuB;GACnD,QAAQ;EACT,MAAM,QAAQ,QAAQ;;iBASR,oBACd,mBACA,QAAQ,qBACR,gBAAgB,eAChB,oBAAoB,oBACnB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isUnitlessProperty } from "@animus-ui/properties";
|
|
1
|
+
import { componentValues, decodedIdentifier, importantPriority, isUnitlessProperty, tokenize, variableReads } from "@animus-ui/properties";
|
|
2
2
|
//#region src/runtime/is-dev.ts
|
|
3
3
|
/**
|
|
4
4
|
* The define token is tested as the initializer's own conditional, never from
|
|
@@ -29,13 +29,32 @@ function recordWitness(component, prop, value, outcome) {
|
|
|
29
29
|
}
|
|
30
30
|
//#endregion
|
|
31
31
|
//#region src/runtime/resolveClasses.ts
|
|
32
|
+
/** Whether a property set is custom properties only, which read a value as
|
|
33
|
+
* written: no unit, and a trailing `!` that is no priority. */
|
|
34
|
+
function isCustomOnly(cssProperties) {
|
|
35
|
+
return cssProperties.length > 0 && cssProperties.every((property) => property.startsWith("--"));
|
|
36
|
+
}
|
|
37
|
+
/** The properties a slot's value is written to. */
|
|
38
|
+
function slotProperties(dc) {
|
|
39
|
+
return dc.properties && dc.properties.length > 0 ? dc.properties : dc.property ? [dc.property] : [];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A responsive value's entries by breakpoint, or a bare value at `_`. The
|
|
43
|
+
* value arrives without nullish breakpoints (`withoutAbsentBreakpoints`).
|
|
44
|
+
*/
|
|
45
|
+
function responsiveEntries(propValue) {
|
|
46
|
+
const responsive = typeof propValue === "object" && propValue !== null && !Array.isArray(propValue);
|
|
47
|
+
return [responsive, responsive ? Object.entries(propValue) : [["_", propValue]]];
|
|
48
|
+
}
|
|
32
49
|
/**
|
|
33
50
|
* A mixed property set resolves to unitless: a bare number on a length
|
|
34
51
|
* property is dropped by the parser, `px` on a unitless one shifts layout.
|
|
52
|
+
* Custom properties have no unit context, so a set of only those keeps the
|
|
53
|
+
* number as written, as the static path does.
|
|
35
54
|
*/
|
|
36
55
|
function applyUnitFallback(value, cssProperties) {
|
|
37
56
|
if (typeof value === "number") {
|
|
38
|
-
if (cssProperties.some(isUnitlessProperty)) return String(value);
|
|
57
|
+
if (isCustomOnly(cssProperties) || cssProperties.some(isUnitlessProperty)) return String(value);
|
|
39
58
|
return `${value}px`;
|
|
40
59
|
}
|
|
41
60
|
return String(value);
|
|
@@ -98,6 +117,15 @@ function isAdmittedWithoutToken(value, dc) {
|
|
|
98
117
|
if (typeof value !== "string") return true;
|
|
99
118
|
return value === "0" || dc.keywords?.includes(value) === true || value.includes("{") || CONTAINER_UNIT.test(value) || dc.property !== void 0 && SIZE_PROPERTY.test(dc.property) && (SIZE_LENGTH.test(value) || value.startsWith("calc("));
|
|
100
119
|
}
|
|
120
|
+
/** A CSS-wide keyword is a cascade instruction, not a value: no transform
|
|
121
|
+
* sees it, and through an inline variable it would act on the variable. */
|
|
122
|
+
const CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
123
|
+
"initial",
|
|
124
|
+
"inherit",
|
|
125
|
+
"unset",
|
|
126
|
+
"revert",
|
|
127
|
+
"revert-layer"
|
|
128
|
+
]);
|
|
101
129
|
function resolveEntry(value, dc) {
|
|
102
130
|
const key = String(value);
|
|
103
131
|
let scaleResolved = dc.scaleValues?.[key];
|
|
@@ -109,7 +137,8 @@ function resolveEntry(value, dc) {
|
|
|
109
137
|
if (scaleResolved == null && dc.strict && dc.scaleValues && !isAdmittedWithoutToken(value, dc)) return { entry: value };
|
|
110
138
|
const input = scaleResolved ?? value;
|
|
111
139
|
let transformed = input;
|
|
112
|
-
|
|
140
|
+
const keyword = scaleResolved == null && CSS_WIDE_KEYWORDS.has(value);
|
|
141
|
+
if (dc.transform && !keyword) {
|
|
113
142
|
try {
|
|
114
143
|
transformed = dc.transform(input);
|
|
115
144
|
} catch (cause) {
|
|
@@ -118,10 +147,8 @@ function resolveEntry(value, dc) {
|
|
|
118
147
|
if (!isValidTransformResult(transformed)) return { shape: describeResultShape(transformed) };
|
|
119
148
|
}
|
|
120
149
|
let css;
|
|
121
|
-
if (typeof transformed === "number")
|
|
122
|
-
|
|
123
|
-
css = applyUnitFallback(transformed, cssProperties);
|
|
124
|
-
} else css = String(transformed);
|
|
150
|
+
if (typeof transformed === "number") css = applyUnitFallback(transformed, slotProperties(dc));
|
|
151
|
+
else css = String(transformed);
|
|
125
152
|
return negate ? negateCssValue(css) : css;
|
|
126
153
|
}
|
|
127
154
|
const warnedDrops = /* @__PURE__ */ new Set();
|
|
@@ -136,13 +163,14 @@ function warnDroppedValue(baseClassName, propName, serializedValue, customOwned)
|
|
|
136
163
|
/**
|
|
137
164
|
* A value taken from a variant default emits `--{prop}-default`, not the
|
|
138
165
|
* value, so the compose override rule misses and the parent's value wins.
|
|
166
|
+
* An explicit `undefined` takes the default as an omitted prop does.
|
|
139
167
|
*/
|
|
140
168
|
function applyVariantClasses(classes, baseClassName, props, config) {
|
|
141
169
|
if (!config.variants) return;
|
|
142
170
|
for (const [prop, vc] of Object.entries(config.variants)) {
|
|
143
171
|
const value = props[prop] ?? vc.default;
|
|
144
172
|
if (value != null) {
|
|
145
|
-
const isDefault =
|
|
173
|
+
const isDefault = props[prop] == null && vc.default != null;
|
|
146
174
|
classes.push(`${baseClassName}--${prop}-${isDefault ? "default" : value}`);
|
|
147
175
|
recordWitness(baseClassName, prop, value, "static");
|
|
148
176
|
}
|
|
@@ -179,6 +207,16 @@ function warnInvalidTransformResult(baseClassName, propName, shape) {
|
|
|
179
207
|
console.warn(`[animus:drop] ${baseClassName}: transform for prop '${propName}' returned ${shape} — expected string or finite number; value dropped`);
|
|
180
208
|
}
|
|
181
209
|
}
|
|
210
|
+
const warnedImportant = /* @__PURE__ */ new Set();
|
|
211
|
+
/** Keyed by value: each runtime value that loses `!important` is reported once. */
|
|
212
|
+
function warnIgnoredImportant(baseClassName, propName, value) {
|
|
213
|
+
if (IS_DEV) {
|
|
214
|
+
const dedupeKey = `${baseClassName}|${propName}|${value}`;
|
|
215
|
+
if (warnedImportant.has(dedupeKey)) return;
|
|
216
|
+
warnedImportant.add(dedupeKey);
|
|
217
|
+
console.warn(`[animus:important] ${baseClassName}: !important is ignored on the runtime-generated value ${JSON.stringify(value)} of prop '${propName}' — a runtime value reaches CSS through a variable, which cannot carry it; declare the value literally to keep !important`);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
182
220
|
const warnedThrows = /* @__PURE__ */ new Set();
|
|
183
221
|
const warnedStrictMisses = /* @__PURE__ */ new Set();
|
|
184
222
|
/** Keyed by value, like a throw: each rejected input is reported once. */
|
|
@@ -226,51 +264,16 @@ function warnTransformThrow(baseClassName, propName, transformName, serializedVa
|
|
|
226
264
|
}
|
|
227
265
|
}
|
|
228
266
|
/**
|
|
229
|
-
* Whether `resolved` reads `currentVar`
|
|
230
|
-
* a
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
267
|
+
* Whether `resolved` reads `currentVar` through a `var()` at any depth, its
|
|
268
|
+
* fallbacks included: a function token whose decoded name is `var` in any
|
|
269
|
+
* case, with the decoded variable name as its first argument. Comments,
|
|
270
|
+
* quoted strings and `url()` read nothing. The extractor's static path skips
|
|
271
|
+
* its `currentVar` write by the same predicate.
|
|
234
272
|
*/
|
|
235
273
|
function readsCurrentVar(resolved, currentVar) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
if (char === "/" && resolved[at + 1] === "*") {
|
|
240
|
-
const end = resolved.indexOf("*/", at + 2);
|
|
241
|
-
at = end === -1 ? resolved.length : end + 1;
|
|
242
|
-
} else if (char === "\"" || char === "'") {
|
|
243
|
-
at += 1;
|
|
244
|
-
while (at < resolved.length && resolved[at] !== char) at += resolved[at] === "\\" ? 2 : 1;
|
|
245
|
-
} else if (char === "(") {
|
|
246
|
-
const isVar = at >= 3 && resolved.slice(at - 3, at).toLowerCase() === "var";
|
|
247
|
-
const inFallback = open.some((frame) => frame.isVar && frame.fallback);
|
|
248
|
-
if (isVar && !inFallback) {
|
|
249
|
-
const name = skipCssSpace(resolved.slice(at + 1));
|
|
250
|
-
const next = name.startsWith(currentVar) ? skipCssSpace(name.slice(currentVar.length))[0] : void 0;
|
|
251
|
-
if (next === ")" || next === ",") return true;
|
|
252
|
-
}
|
|
253
|
-
open.push({
|
|
254
|
-
isVar,
|
|
255
|
-
fallback: false
|
|
256
|
-
});
|
|
257
|
-
} else if (char === ",") {
|
|
258
|
-
const top = open.at(-1);
|
|
259
|
-
if (top?.isVar) top.fallback = true;
|
|
260
|
-
} else if (char === ")") open.pop();
|
|
261
|
-
}
|
|
262
|
-
return false;
|
|
263
|
-
}
|
|
264
|
-
/** `text` after its leading CSS whitespace (space, tab, line feed, carriage
|
|
265
|
-
* return, form feed) and comments. */
|
|
266
|
-
function skipCssSpace(text) {
|
|
267
|
-
let rest = text;
|
|
268
|
-
for (;;) {
|
|
269
|
-
const trimmed = rest.replace(/^[ \t\n\r\f]+/, "");
|
|
270
|
-
if (!trimmed.startsWith("/*")) return trimmed;
|
|
271
|
-
const end = trimmed.indexOf("*/", 2);
|
|
272
|
-
rest = end === -1 ? "" : trimmed.slice(end + 2);
|
|
273
|
-
}
|
|
274
|
+
if (!resolved.includes("(")) return false;
|
|
275
|
+
const destination = decodedIdentifier(currentVar);
|
|
276
|
+
return variableReads(componentValues(tokenize(resolved))).some((read) => read.name === destination);
|
|
274
277
|
}
|
|
275
278
|
/**
|
|
276
279
|
* A value that reads the prop's own `currentVar` takes the slot that leaves
|
|
@@ -279,34 +282,57 @@ function skipCssSpace(text) {
|
|
|
279
282
|
function slotClassFor(dc, resolved) {
|
|
280
283
|
return dc.currentVar !== void 0 && readsCurrentVar(resolved, dc.currentVar) ? `${dc.slotClass}--keep` : dc.slotClass;
|
|
281
284
|
}
|
|
282
|
-
/** Through an inline variable these would act on the variable itself. */
|
|
283
|
-
const CSS_WIDE_KEYWORDS = /* @__PURE__ */ new Set([
|
|
284
|
-
"initial",
|
|
285
|
-
"inherit",
|
|
286
|
-
"unset",
|
|
287
|
-
"revert",
|
|
288
|
-
"revert-layer"
|
|
289
|
-
]);
|
|
290
285
|
/**
|
|
291
286
|
* Resolution is staged so a drop is atomic: one entry that misses a strict
|
|
292
287
|
* scale, or one transform that throws or returns an invalid result, leaves
|
|
293
288
|
* `classes` and `dynStyle` untouched. A responsive entry that is a CSS-wide
|
|
294
289
|
* keyword takes the class extraction emits for it at that breakpoint.
|
|
290
|
+
*
|
|
291
|
+
* A slot is a CSS variable, which cannot carry `!important`. A literal that
|
|
292
|
+
* carries it, at a breakpoint, takes the class extraction emits for every
|
|
293
|
+
* literal branch it reads; a bare literal's class the caller already found.
|
|
294
|
+
* Any other value is runtime-generated: it resolves as at build time, where
|
|
295
|
+
* a trailing `!` is ` !important`, and the slot takes the result without the
|
|
296
|
+
* priority, which `ignoredImportant` hears of. Where only custom properties
|
|
297
|
+
* read the value, a trailing `!` is no priority, as at build time.
|
|
295
298
|
*/
|
|
296
|
-
function applyDynamicProp(classes, dynStyle, propValue, dc, literalClass) {
|
|
299
|
+
function applyDynamicProp(classes, dynStyle, propValue, dc, literalClass, ignoredImportant) {
|
|
297
300
|
const staged = [];
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
+
const [responsive, entries] = responsiveEntries(propValue);
|
|
302
|
+
const lookup = (bp, value) => literalClass(bp === "_" ? value : { [bp]: value });
|
|
303
|
+
for (const [bp, authored] of entries) {
|
|
304
|
+
let value = authored;
|
|
305
|
+
let ignored;
|
|
306
|
+
const priority = typeof authored === "string" ? importantPriority(authored) : void 0;
|
|
307
|
+
if (typeof authored === "string" && priority && (priority.spelling === "important" || !isCustomOnly(slotProperties(dc)))) {
|
|
308
|
+
const literal = responsive ? lookup(bp, authored) : void 0;
|
|
309
|
+
if (literal) {
|
|
310
|
+
staged.push([literal]);
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
ignored = authored;
|
|
314
|
+
if (priority.spelling === "shorthand") value = `${authored.slice(0, priority.end)} !important`;
|
|
315
|
+
}
|
|
316
|
+
const keywordClass = responsive && CSS_WIDE_KEYWORDS.has(value) ? lookup(bp, value) : void 0;
|
|
301
317
|
if (keywordClass) {
|
|
302
318
|
staged.push([keywordClass]);
|
|
303
319
|
continue;
|
|
304
320
|
}
|
|
305
|
-
|
|
306
|
-
if (typeof resolved !== "string") return "entry" in resolved ? {
|
|
321
|
+
let resolved = resolveEntry(value, dc);
|
|
322
|
+
if (typeof resolved !== "string") return "entry" in resolved && responsive ? {
|
|
307
323
|
...resolved,
|
|
308
324
|
breakpoint: bp
|
|
309
325
|
} : resolved;
|
|
326
|
+
if (ignored !== void 0) {
|
|
327
|
+
ignoredImportant(ignored);
|
|
328
|
+
const end = importantPriority(resolved)?.end;
|
|
329
|
+
resolved = end === void 0 ? resolved : resolved.slice(0, end);
|
|
330
|
+
const bareKeyword = CSS_WIDE_KEYWORDS.has(resolved) ? lookup(bp, resolved) : void 0;
|
|
331
|
+
if (bareKeyword) {
|
|
332
|
+
staged.push([bareKeyword]);
|
|
333
|
+
continue;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
310
336
|
const slotClass = slotClassFor(dc, resolved);
|
|
311
337
|
staged.push(bp === "_" ? [
|
|
312
338
|
slotClass,
|
|
@@ -318,15 +344,6 @@ function applyDynamicProp(classes, dynStyle, propValue, dc, literalClass) {
|
|
|
318
344
|
resolved
|
|
319
345
|
]);
|
|
320
346
|
}
|
|
321
|
-
else {
|
|
322
|
-
const resolved = resolveEntry(propValue, dc);
|
|
323
|
-
if (typeof resolved !== "string") return resolved;
|
|
324
|
-
staged.push([
|
|
325
|
-
slotClassFor(dc, resolved),
|
|
326
|
-
dc.varName,
|
|
327
|
-
resolved
|
|
328
|
-
]);
|
|
329
|
-
}
|
|
330
347
|
for (const [cls, varName, resolved] of staged) {
|
|
331
348
|
classes.push(cls);
|
|
332
349
|
if (varName !== void 0 && resolved !== void 0) dynStyle[varName] = resolved;
|
|
@@ -342,8 +359,7 @@ function applyDynamicProp(classes, dynStyle, propValue, dc, literalClass) {
|
|
|
342
359
|
function applyDeclarationProp(classes, dynStyle, propValue, dc) {
|
|
343
360
|
const records = dc.declarationScaleValues;
|
|
344
361
|
const memberVars = Object.entries(dc.memberVars);
|
|
345
|
-
const responsive =
|
|
346
|
-
const entries = responsive ? Object.entries(propValue).filter(([, value]) => value != null) : [["_", propValue]];
|
|
362
|
+
const [responsive, entries] = responsiveEntries(propValue);
|
|
347
363
|
const staged = [];
|
|
348
364
|
for (const [breakpoint, value] of entries) {
|
|
349
365
|
const key = String(value);
|
|
@@ -362,6 +378,18 @@ function applyDeclarationProp(classes, dynStyle, propValue, dc) {
|
|
|
362
378
|
}
|
|
363
379
|
return null;
|
|
364
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* A responsive value without its nullish breakpoints, so it keys the same
|
|
383
|
+
* static class as the value written without them; `undefined` when none
|
|
384
|
+
* remain, as if the prop were omitted.
|
|
385
|
+
*/
|
|
386
|
+
function withoutAbsentBreakpoints(value) {
|
|
387
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return value;
|
|
388
|
+
const entries = Object.entries(value);
|
|
389
|
+
if (entries.every(([, entry]) => entry != null)) return value;
|
|
390
|
+
const present = entries.filter(([, entry]) => entry != null);
|
|
391
|
+
return present.length > 0 ? Object.fromEntries(present) : void 0;
|
|
392
|
+
}
|
|
365
393
|
function resolveClasses(baseClassName, props, config, systemPropMap, dynamicPropConfig) {
|
|
366
394
|
const classes = [baseClassName];
|
|
367
395
|
let dynStyle;
|
|
@@ -373,8 +401,7 @@ function resolveClasses(baseClassName, props, config, systemPropMap, dynamicProp
|
|
|
373
401
|
if (systemPropNames.length > 0) {
|
|
374
402
|
const { customPropMap, customDynamicConfig } = config;
|
|
375
403
|
for (const propName of systemPropNames) {
|
|
376
|
-
|
|
377
|
-
const propValue = props[propName];
|
|
404
|
+
const propValue = withoutAbsentBreakpoints(props[propName]);
|
|
378
405
|
if (propValue == null) continue;
|
|
379
406
|
const key = serializeValueKey(propValue);
|
|
380
407
|
const customOwned = customPropMap?.[propName] !== void 0 || customDynamicConfig?.[propName] !== void 0;
|
|
@@ -388,7 +415,7 @@ function resolveClasses(baseClassName, props, config, systemPropMap, dynamicProp
|
|
|
388
415
|
const dc = customOwned ? customDynamicConfig?.[propName] : dynamicPropConfig?.[propName];
|
|
389
416
|
if (dc) {
|
|
390
417
|
const staged = dynStyle ?? {};
|
|
391
|
-
const failure = dc.kind === "declarations" ? applyDeclarationProp(classes, staged, propValue, dc) : applyDynamicProp(classes, staged, propValue, dc, (value) => classMap?.[propName]?.[(typed ? typedValueKey : serializeValueKey)(value)]);
|
|
418
|
+
const failure = dc.kind === "declarations" ? applyDeclarationProp(classes, staged, propValue, dc) : applyDynamicProp(classes, staged, propValue, dc, (value) => classMap?.[propName]?.[(typed ? typedValueKey : serializeValueKey)(value)], (value) => warnIgnoredImportant(baseClassName, propName, value));
|
|
392
419
|
if (failure === null) {
|
|
393
420
|
dynStyle = staged;
|
|
394
421
|
recordWitness(baseClassName, propName, key, "dynamic");
|