@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.
Files changed (123) hide show
  1. package/dist/appearance/controller.d.ts +35 -0
  2. package/dist/appearance/controller.d.ts.map +1 -0
  3. package/dist/appearance/controller.js +69 -0
  4. package/dist/appearance/index.d.ts +2 -7
  5. package/dist/appearance/react.d.ts +10 -0
  6. package/dist/appearance/react.d.ts.map +1 -0
  7. package/dist/appearance/react.js +12 -0
  8. package/dist/appearance/svelte.d.ts +12 -0
  9. package/dist/appearance/svelte.d.ts.map +1 -0
  10. package/dist/appearance/svelte.js +14 -0
  11. package/dist/bootstrap/index.d.ts +24 -1
  12. package/dist/bootstrap/index.d.ts.map +1 -1
  13. package/dist/bootstrap/index.js +10 -2
  14. package/dist/class-resolver.d.ts +2 -6
  15. package/dist/class-resolver.js +1 -1
  16. package/dist/component-stJhG_A-.d.ts +659 -0
  17. package/dist/component-stJhG_A-.d.ts.map +1 -0
  18. package/dist/compose-BQi7TDtL.d.ts +15 -0
  19. package/dist/compose-BQi7TDtL.d.ts.map +1 -0
  20. package/dist/compose.d.ts +2 -12
  21. package/dist/composeWithContext.d.ts +9 -7
  22. package/dist/composeWithContext.d.ts.map +1 -1
  23. package/dist/createClassResolver-Do1nmvkf.d.ts +71 -0
  24. package/dist/createClassResolver-Do1nmvkf.d.ts.map +1 -0
  25. package/dist/{createClassResolver-DPLExqGy.js → createClassResolver-DtHjTYa7.js} +106 -79
  26. package/dist/createComposedFamily-BbA_d0QH.js +195 -0
  27. package/dist/createComposedFamily-BkrvSsfl.d.ts +40 -0
  28. package/dist/createComposedFamily-BkrvSsfl.d.ts.map +1 -0
  29. package/dist/groups/index.d.ts +702 -699
  30. package/dist/groups/index.d.ts.map +1 -1
  31. package/dist/index-BjJkQo64.d.ts +10 -0
  32. package/dist/index-BjJkQo64.d.ts.map +1 -0
  33. package/dist/index-C1AAiaiJ.d.ts +663 -0
  34. package/dist/index-C1AAiaiJ.d.ts.map +1 -0
  35. package/dist/index.d.ts +6 -26
  36. package/dist/index.js +141 -41
  37. package/dist/runtime-entry.d.ts +3 -5
  38. package/dist/runtime-entry.js +3 -3
  39. package/package.json +15 -3
  40. package/dist/Animus.d.ts +0 -81
  41. package/dist/Animus.d.ts.map +0 -1
  42. package/dist/AnimusExtended.d.ts +0 -82
  43. package/dist/AnimusExtended.d.ts.map +0 -1
  44. package/dist/SystemBuilder.d.ts +0 -305
  45. package/dist/SystemBuilder.d.ts.map +0 -1
  46. package/dist/appearance/index.d.ts.map +0 -1
  47. package/dist/asset.d.ts +0 -16
  48. package/dist/asset.d.ts.map +0 -1
  49. package/dist/bootstrap/createAppearanceBootstrap.d.ts +0 -14
  50. package/dist/bootstrap/createAppearanceBootstrap.d.ts.map +0 -1
  51. package/dist/class-resolver.d.ts.map +0 -1
  52. package/dist/compose.d.ts.map +0 -1
  53. package/dist/conditions.d.ts +0 -94
  54. package/dist/conditions.d.ts.map +0 -1
  55. package/dist/createComposedFamily-C6CLAsMx.js +0 -128
  56. package/dist/declarations.d.ts +0 -38
  57. package/dist/declarations.d.ts.map +0 -1
  58. package/dist/index.d.ts.map +0 -1
  59. package/dist/keyframes.d.ts +0 -24
  60. package/dist/keyframes.d.ts.map +0 -1
  61. package/dist/runtime/assert-root-slot.d.ts +0 -6
  62. package/dist/runtime/assert-root-slot.d.ts.map +0 -1
  63. package/dist/runtime/createClassResolver.d.ts +0 -11
  64. package/dist/runtime/createClassResolver.d.ts.map +0 -1
  65. package/dist/runtime/createComposedFamily.d.ts +0 -11
  66. package/dist/runtime/createComposedFamily.d.ts.map +0 -1
  67. package/dist/runtime/index.d.ts +0 -14
  68. package/dist/runtime/index.d.ts.map +0 -1
  69. package/dist/runtime/is-dev.d.ts +0 -6
  70. package/dist/runtime/is-dev.d.ts.map +0 -1
  71. package/dist/runtime/resolveClasses.d.ts +0 -83
  72. package/dist/runtime/resolveClasses.d.ts.map +0 -1
  73. package/dist/runtime/witness.d.ts +0 -10
  74. package/dist/runtime/witness.d.ts.map +0 -1
  75. package/dist/runtime-entry.d.ts.map +0 -1
  76. package/dist/scales/createScale.d.ts +0 -7
  77. package/dist/scales/createScale.d.ts.map +0 -1
  78. package/dist/selectors.d.ts +0 -27
  79. package/dist/selectors.d.ts.map +0 -1
  80. package/dist/theme/createTheme.d.ts +0 -170
  81. package/dist/theme/createTheme.d.ts.map +0 -1
  82. package/dist/theme/flattenScale.d.ts +0 -15
  83. package/dist/theme/flattenScale.d.ts.map +0 -1
  84. package/dist/theme/index.d.ts +0 -5
  85. package/dist/theme/index.d.ts.map +0 -1
  86. package/dist/theme/property-records.d.ts +0 -79
  87. package/dist/theme/property-records.d.ts.map +0 -1
  88. package/dist/theme/resolveReferences.d.ts +0 -27
  89. package/dist/theme/resolveReferences.d.ts.map +0 -1
  90. package/dist/theme/serializeTokens.d.ts +0 -5
  91. package/dist/theme/serializeTokens.d.ts.map +0 -1
  92. package/dist/theme/types.d.ts +0 -20
  93. package/dist/theme/types.d.ts.map +0 -1
  94. package/dist/theme/utils.d.ts +0 -11
  95. package/dist/theme/utils.d.ts.map +0 -1
  96. package/dist/transforms/border.d.ts +0 -3
  97. package/dist/transforms/border.d.ts.map +0 -1
  98. package/dist/transforms/createTransform.d.ts +0 -24
  99. package/dist/transforms/createTransform.d.ts.map +0 -1
  100. package/dist/transforms/grid.d.ts +0 -5
  101. package/dist/transforms/grid.d.ts.map +0 -1
  102. package/dist/transforms/index.d.ts +0 -5
  103. package/dist/transforms/index.d.ts.map +0 -1
  104. package/dist/transforms/size.d.ts +0 -5
  105. package/dist/transforms/size.d.ts.map +0 -1
  106. package/dist/types/component.d.ts +0 -100
  107. package/dist/types/component.d.ts.map +0 -1
  108. package/dist/types/config.d.ts +0 -149
  109. package/dist/types/config.d.ts.map +0 -1
  110. package/dist/types/properties.d.ts +0 -17
  111. package/dist/types/properties.d.ts.map +0 -1
  112. package/dist/types/props.d.ts +0 -19
  113. package/dist/types/props.d.ts.map +0 -1
  114. package/dist/types/scales.d.ts +0 -3
  115. package/dist/types/scales.d.ts.map +0 -1
  116. package/dist/types/shared.d.ts +0 -4
  117. package/dist/types/shared.d.ts.map +0 -1
  118. package/dist/types/theme.d.ts +0 -111
  119. package/dist/types/theme.d.ts.map +0 -1
  120. package/dist/types/utils.d.ts +0 -5
  121. package/dist/types/utils.d.ts.map +0 -1
  122. package/dist/utils/deepMerge.d.ts +0 -2
  123. package/dist/utils/deepMerge.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C1AAiaiJ.d.ts","names":[],"sources":["../src/Animus.ts","../src/asset.ts","../src/transforms/createTransform.ts","../src/SystemBuilder.ts","../src/scales/createScale.ts","../src/declarations.ts","../src/theme/property-records.ts","../src/theme/createTheme.ts","../src/theme/serializeTokens.ts","../src/theme/types.ts","../src/transforms/border.ts","../src/transforms/grid.ts","../src/transforms/size.ts"],"mappings":";;;;;;cAkCa,cACX,qBAAqB,eAAe,aACpC,sBAAsB,sBAAsB,kBAC5C,mBAAmB,SAAS,eAAe,YAAY,kBACvD,iBAAiB,eAAe,gBAChC,eAAe,WAAW,eAAe,YAAY,kBACrD,qBAAqB,sBACrB,oBAAoB,eAAe;EAEnC,cAAqB;EACrB,eAAsB;EACtB,YAAmB;EACnB,cAAqB;EACrB,UAAiB;EACjB,cAAqB;EACrB,QAAe;EACf,WAAW;EAEX,YACE,OAAO,cACP,QAAQ,eACR,MAAM,YACN,UAAU,UACV,QAAQ,QACR,cAAc,cACd,QAAQ,aACR,YAAW;YAcH,UAAM,eAAA,cAAA,eAAA,YAAA,UAAA,QAAA,cAAA;EAqBhB,UAAU,iBAAiB,IAAI,mBAAmB,WAAW,KAM1C,gBACf,IACA,cACA,eACA,YACA,UACA,QACA,cACA;EAMJ,YAAY,UAAU,oBAAoB,aAAa,IAMpC,uBACf,GACA,cACA,eACA,YACA,UACA,QACA,cACA;EAIJ,QAAQ;IAAe,yBAAyB;KAC9C,MA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,OAAO,mBAAmB,OAAO,8BAClC,gBAYE,WAAC,IAAA,gBAAA,OAAA,KAAA,+BAAA,EAAA,KAAA,OAAA,KAAA,kCAAA,EAAA,KAAA,EAAA,OAAA;EAkCN,YACE,YAAY,cAAc,GAAG,qBAC7B,YAAY,QAAQ,EAAE,SAAS,kCAC/B,KAAK,KAAK,UAAU,KAAE,aAAA,QAAA,KAAA,GAAA,OAAA,OAAA,KAAA,QAAA,YAAA,EAAA,MAAA,WAAA,SAAA;EAWxB,SAAS,WAAW,GAAG;;KAoRpB;EAAe,aAAa;;iBAEjB,eAAW,aAAA;;;KCv+Cf,cACV,UAAU,qBACV,4BAEC,WAAW,aAAa,UAAU,YAAY,QAAQ;KAG7C,YAAY,oBAAoB,yBAAyB,MACjE,IACA;;;KCTQ,WACV,aAAa,eACb,MACA,aAAa,sBAAsB,wBACjC,aAAa,MAAM,MAAM;KAEjB,MAAM,GAAG,QAClB,YAAY,IAAI,KAAK,gBAAgB,IAClC,gBAAgB,IACd,wBAAwB,EAAE,IAAI,EAAE,MAChC,EAAE,KACJ,gBAAgB,IACd,EAAE;KAIE,SAAS,KAAK,QACxB,QACK;KAGK,wBAAwB,GAAG,KACrC,SAAS,mBAAmB,IAAI,SAAS,mBAAmB,IAAI,OAAO,GAAG;KAEhE,OAAO,GAAG,QACnB,WAAW,UAAU,IAAI,gBAAgB,IACtC,EAAE,KACF,gBAAgB,IACd,EAAE;KAIE;EACV,YAAY,eAAe;EAC3B,SAAS;;;;;;KAOC,gBAAgB,UAAU,eAElC,SACA,eAAe,UACf,eAAe,SAAS,eAAe;;;;cC5C9B,iBAAA;;;;cCAA,UAAA;;cAaA,eAAA;;;;cCbA,uBAAoB;;cAWpB,MAAA"}
package/dist/index.d.ts CHANGED
@@ -1,26 +1,6 @@
1
- export { Animus, AnimusWithAll } from './Animus';
2
- export { AnimusExtended, AnimusExtendedWithAll } from './AnimusExtended';
3
- export { compose } from './compose';
4
- export type { KeyframeFrameMap, KeyframeRef, Keyframes } from './keyframes';
5
- export { asset, ASSET_PLACEHOLDER_PREFIX, type AssetRef } from './asset.js';
6
- export { createComponent } from './runtime';
7
- export { type ClassResolver, type ClassResolverAttributes, createClassResolver, } from './runtime/createClassResolver';
8
- export { createComposedFamily } from './runtime/createComposedFamily';
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
- export { createSystem, SystemBuilder } from './SystemBuilder';
11
- export { createScale, numericOrStringScale, numericScale, stringScale, } from './scales/createScale';
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';
13
- export { BUILT_IN_SELECTORS, type SelectorAlias, type SelectorAliasMap, type Selectors, } from './selectors';
14
- export type { Assign, AssignValueIfUnmergable, ColorModeConfig, FindPath, KeyAsVariable, LiteralPaths, Mergable, Merge, MergeTheme, Path, PathToLiteral, PathValue, PrivateThemeKeys, SanitizeKey, } from './theme';
15
- export { createTheme, type Flatten, ThemeBuilder, type ThemeBuilderStage, } from './theme';
16
- export { borderShorthand } from './transforms/border';
17
- export { areTransformsEqual, createTransform, type NamedTransform, type TransformFn, } from './transforms/createTransform';
18
- export { gridItem, gridItemRatio } from './transforms/grid';
19
- export { percentageOrAbsolute, size } from './transforms/size';
20
- export type { AnimusComponent, AnimusWrappedComponent, AnyBrandedComponent, ComposedFamily, SharedConfig, VariantPropsOf, } from './types/component';
21
- export type { AbstractParser, BuiltInConditionAlias, BuiltInSelectorAlias, CompoundEntry, CSSPropMap, CSSProps, CustomPropConfig, DeclarationKey, DeclarationProp, Parser, ParserProps, Prop, PropertyValues, Scale, ScaleValue, SelectorAliasProps, SystemProp, SystemProps, ThemedCSSPropMap, ThemedCSSProps, ThemedScale, ThemedScaleValue, VariantConfig, } from './types/config';
22
- export type { AbstractProps, MediaQueryMap, ResponsiveProp, ThemeProps, } from './types/props';
23
- export type { ArrayScale, MapScale } from './types/scales';
24
- export type { CSSObject } from './types/shared';
25
- export type { AbstractTheme, BaseTheme, BrowserColorSchemeConfig, ColorModeOptions, ColorTokenRef, ContextualVarRegistration, CSSColorValue, EmittedScales, EmittedTokenPaths, ScaleTokenRef, SerializedTheme, SystemPreferenceConfig, Theme, ThemeManifest, ThemeStructuralKey, TokenScales, } from './types/theme';
26
- //# sourceMappingURL=index.d.ts.map
1
+ import { n as ClassResolverAttributes, r as createClassResolver, t as ClassResolver } from "./createClassResolver-Do1nmvkf.js";
2
+ import { $ as SerializedTheme, A as SystemProps, At as ReservedByConditionRegistry, B as ResponsiveProp, C as ParserProps, Ct as ConditionAliasMap, D as ScaleValue, Dt as NarrowedAliases, E as Scale, Et as ConditionsOf, F as VariantConfig, G as CSSColorValue, H as AbstractTheme, I as ArrayScale, J as ContextualVarRegistration, K as ColorModeOptions, L as MapScale, M as ThemedCSSProps, Mt as SelectorsOf, N as ThemedScale, Nt as UnknownAtRule, O as SelectorAliasProps, Ot as RawAtRuleKey, P as ThemedScaleValue, Pt as UnknownConditionAlias, Q as ScaleTokenRef, R as AbstractProps, S as Parser, St as ConditionAlias, T as PropertyValues, Tt as Conditions, U as BaseTheme, V as ThemeProps, W as BrowserColorSchemeConfig, X as EmittedTokenPaths, Y as EmittedScales, _ as CSSProps, _t as KeyframeFrameMap, b as DeclarationKey, bt as AtRuleValue, c as VariantPropsOf, ct as FindPath, dt as PathToLiteral, et as SystemPreferenceConfig, ft as PathValue, g as CSSPropMap, gt as Selectors, h as BuiltInSelectorAlias, ht as SelectorAliasMap, i as AnyBrandedComponent, it as ThemeStructuralKey, j as ThemedCSSPropMap, jt as ReservedBySelectorRegistry, k as SystemProp, kt as RegistryBrand, l as AnimusExtended, lt as LiteralPaths, m as BuiltInConditionAlias, mt as SelectorAlias, n as AnimusComponent, o as ComposedFamily, ot as TokenScales, p as AbstractParser, pt as BUILT_IN_SELECTORS, q as ColorTokenRef, r as AnimusWrappedComponent, rt as ThemeManifest, s as SharedConfig, st as CSSObject, t as AnimusClassProps, tt as Theme, u as AnimusExtendedWithAll, ut as Path, v as CompoundEntry, vt as KeyframeRef, w as Prop, wt as ConditionKind, x as DeclarationProp, xt as BUILT_IN_CONDITIONS, y as CustomPropConfig, yt as Keyframes, z as MediaQueryMap } from "./component-stJhG_A-.js";
3
+ import { t as compose } from "./compose-BQi7TDtL.js";
4
+ import { $ as AssetRef, A as LibraryBundle, B as VocabularyCollisionEntry, C as CreateKeyframesFactory, D as GlobalStyleMap, E as GlobalStyleBlock, F as SerializedConfig, G as VocabularyOf, H as VocabularyKeyframesEntry, I as SystemBuilder, J as NamedTransform, K as VocabularyRecord, L as SystemBuilderStage, M as RegisterableKeyframes, N as RegistrySnapshot, O as GlobalStylesFactory, P as SealedSystemInstance, Q as ASSET_PLACEHOLDER_PREFIX, R as SystemBundle, S as stringScale, T as FontFaceSrc, U as VocabularyLegacyVerbEntry, V as VocabularyGlobalStyleEntry, W as VocabularyNameCollision, X as areTransformsEqual, Y as TransformFn, Z as createTransform, _ as ThemeBuilderStage, a as borderShorthand, b as numericOrStringScale, c as ColorModeConfig, d as MergeTheme, et as asset, f as PrivateThemeKeys, g as ThemeBuilder, h as Flatten, i as gridItemRatio, j as RegisterableGlobalStyles, k as KeyframesFrameData, l as Mergable, m as SanitizeKey, n as size, nt as AnimusWithAll, o as Assign, p as KeyAsVariable, q as createSystem, r as gridItem, s as AssignValueIfUnmergable, t as percentageOrAbsolute, tt as Animus, u as Merge, v as createTheme, w as FontFace, x as numericScale, y as createScale, z as SystemInstance } from "./index-C1AAiaiJ.js";
5
+ import { n as createComponent, r as renderAsChild, t as createComposedFamily } from "./createComposedFamily-BkrvSsfl.js";
6
+ export { ASSET_PLACEHOLDER_PREFIX, type AbstractParser, type AbstractProps, type AbstractTheme, Animus, type AnimusClassProps, type AnimusComponent, AnimusExtended, AnimusExtendedWithAll, AnimusWithAll, type AnimusWrappedComponent, type AnyBrandedComponent, type ArrayScale, type AssetRef, type Assign, type AssignValueIfUnmergable, type AtRuleValue, BUILT_IN_CONDITIONS, BUILT_IN_SELECTORS, type BaseTheme, type BrowserColorSchemeConfig, type BuiltInConditionAlias, type BuiltInSelectorAlias, type CSSColorValue, type CSSObject, type CSSPropMap, type CSSProps, type ClassResolver, type ClassResolverAttributes, type ColorModeConfig, type ColorModeOptions, type ColorTokenRef, type ComposedFamily, type CompoundEntry, type ConditionAlias, type ConditionAliasMap, type ConditionKind, type Conditions, type ConditionsOf, type ContextualVarRegistration, type CreateKeyframesFactory, type CustomPropConfig, type DeclarationKey, type DeclarationProp, type EmittedScales, type EmittedTokenPaths, type FindPath, type Flatten, type FontFace, type FontFaceSrc, type GlobalStyleBlock, type GlobalStyleMap, type GlobalStylesFactory, type KeyAsVariable, type KeyframeFrameMap, type KeyframeRef, type Keyframes, type KeyframesFrameData, type LibraryBundle, type LiteralPaths, type MapScale, type MediaQueryMap, type Mergable, type Merge, type MergeTheme, type NamedTransform, type NarrowedAliases, type Parser, type ParserProps, type Path, type PathToLiteral, type PathValue, type PrivateThemeKeys, type Prop, type PropertyValues, type RawAtRuleKey, type RegisterableGlobalStyles, type RegisterableKeyframes, type RegistryBrand, type RegistrySnapshot, type ReservedByConditionRegistry, type ReservedBySelectorRegistry, type ResponsiveProp, type SanitizeKey, type Scale, type ScaleTokenRef, type ScaleValue, type SealedSystemInstance, type SelectorAlias, type SelectorAliasMap, type SelectorAliasProps, type Selectors, type SelectorsOf, type SerializedConfig, type SerializedTheme, type SharedConfig, SystemBuilder, type SystemBuilderStage, type SystemBundle, type SystemInstance, type SystemPreferenceConfig, type SystemProp, type SystemProps, type Theme, ThemeBuilder, type ThemeBuilderStage, type ThemeManifest, type ThemeProps, type ThemeStructuralKey, type ThemedCSSPropMap, type ThemedCSSProps, type ThemedScale, type ThemedScaleValue, type TokenScales, type TransformFn, type UnknownAtRule, type UnknownConditionAlias, type VariantConfig, type VariantPropsOf, type VocabularyCollisionEntry, type VocabularyGlobalStyleEntry, type VocabularyKeyframesEntry, type VocabularyLegacyVerbEntry, type VocabularyNameCollision, type VocabularyOf, type VocabularyRecord, areTransformsEqual, asset, borderShorthand, compose, createClassResolver, createComponent, createComposedFamily, createScale, createSystem, createTheme, createTransform, gridItem, gridItemRatio, numericOrStringScale, numericScale, percentageOrAbsolute, renderAsChild, size, stringScale };
package/dist/index.js CHANGED
@@ -1,8 +1,22 @@
1
- import { t as createClassResolver } from "./createClassResolver-DPLExqGy.js";
2
- import { n as createComponent, t as createComposedFamily } from "./createComposedFamily-C6CLAsMx.js";
1
+ import { t as createClassResolver } from "./createClassResolver-DtHjTYa7.js";
2
+ import { n as createComponent, r as renderAsChild, t as createComposedFamily } from "./createComposedFamily-BbA_d0QH.js";
3
3
  import { compose } from "./compose.js";
4
4
  import { a as borderShorthand, c as numericScale, d as createTransform, f as linkAuthoredCallable, i as gridItemRatio, l as stringScale, n as size, o as createScale, r as gridItem, s as numericOrStringScale, t as percentageOrAbsolute, u as areTransformsEqual } from "./size-ZhCTPtA-.js";
5
- import { registeredInitialValue } from "@animus-ui/properties";
5
+ //#region src/utils/admittedPropNames.ts
6
+ /**
7
+ * The props a component's runtime filter keeps off the element, as the
8
+ * extractor lists them: the props of each group it admitted, each prop it
9
+ * admitted by name, and its custom props. A prop of a group it never admitted,
10
+ * such as `size` on an input without the layout group, reaches the element.
11
+ */
12
+ function admittedPropNames(propRegistry, groupRegistry, activeGroups, custom) {
13
+ const names = /* @__PURE__ */ new Set();
14
+ for (const key of Object.keys(activeGroups)) if (Object.hasOwn(groupRegistry, key)) for (const prop of groupRegistry[key]) names.add(String(prop));
15
+ else if (Object.hasOwn(propRegistry, key)) names.add(key);
16
+ for (const key of Object.keys(custom)) names.add(key);
17
+ return [...names];
18
+ }
19
+ //#endregion
6
20
  //#region src/utils/deepMerge.ts
7
21
  const isMergeable = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
8
22
  function deepMerge(target, source) {
@@ -12,6 +26,24 @@ function deepMerge(target, source) {
12
26
  return result;
13
27
  }
14
28
  //#endregion
29
+ //#region src/utils/stylingNameCollisions.ts
30
+ /**
31
+ * A variant or state named after an admitted system prop would be driven by
32
+ * the same value as that prop, so the builder rejects the pair. Extracted
33
+ * chains never run the builder, so extraction needs a check of its own.
34
+ */
35
+ function assertDisjointStylingNames(variants, states, groupRegistry, propRegistry, activeGroups) {
36
+ const admittedBy = /* @__PURE__ */ new Map();
37
+ for (const key of Object.keys(activeGroups)) if (Object.hasOwn(groupRegistry, key)) for (const prop of groupRegistry[key]) admittedBy.set(String(prop), `group "${key}"`);
38
+ else if (Object.hasOwn(propRegistry, key)) admittedBy.set(key, `.system({ ${key}: true })`);
39
+ const declared = [["Variant prop", Object.entries(variants).map(([key, config]) => config.prop || key)], ["State", states]];
40
+ for (const [kind, names] of declared) for (const name of names) {
41
+ const source = admittedBy.get(name);
42
+ if (source === void 0) continue;
43
+ throw new Error(`${kind} "${name}" collides with the system prop "${name}" admitted by ${source}. A variant or state and an admitted system prop need different names.`);
44
+ }
45
+ }
46
+ //#endregion
15
47
  //#region src/AnimusExtended.ts
16
48
  var AnimusExtendedWithAll = class {
17
49
  propRegistry = {};
@@ -52,6 +84,7 @@ var AnimusExtendedWithAll = class {
52
84
  return createClassResolver("", config);
53
85
  }
54
86
  _buildComponentConfig() {
87
+ assertDisjointStylingNames(this.variants, Object.keys(this.statesConfig), this.groupRegistry, this.propRegistry, this.activeGroups);
55
88
  const variantConfig = {};
56
89
  for (const [key, vc] of Object.entries(this.variants)) {
57
90
  const prop = vc.prop || key;
@@ -61,11 +94,10 @@ var AnimusExtendedWithAll = class {
61
94
  };
62
95
  }
63
96
  const states = Object.keys(this.statesConfig);
64
- const allPropNames = [...Object.keys(this.propRegistry), ...Object.keys(this.custom)];
65
97
  return {
66
98
  variants: Object.keys(variantConfig).length > 0 ? variantConfig : void 0,
67
99
  states: states.length > 0 ? states : void 0,
68
- systemPropNames: allPropNames
100
+ systemPropNames: admittedPropNames(this.propRegistry, this.groupRegistry, this.activeGroups, this.custom)
69
101
  };
70
102
  }
71
103
  };
@@ -157,6 +189,7 @@ var AnimusWithAll = class {
157
189
  return createClassResolver("", config);
158
190
  }
159
191
  _buildComponentConfig() {
192
+ assertDisjointStylingNames(this.variants, Object.keys(this.statesConfig), this.groupRegistry, this.propRegistry, this.activeGroups);
160
193
  const variantConfig = {};
161
194
  for (const [key, vc] of Object.entries(this.variants)) {
162
195
  const prop = vc.prop || key;
@@ -166,11 +199,10 @@ var AnimusWithAll = class {
166
199
  };
167
200
  }
168
201
  const states = Object.keys(this.statesConfig);
169
- const allPropNames = [...Object.keys(this.propRegistry), ...Object.keys(this.custom)];
170
202
  return {
171
203
  variants: Object.keys(variantConfig).length > 0 ? variantConfig : void 0,
172
204
  states: states.length > 0 ? states : void 0,
173
- systemPropNames: allPropNames
205
+ systemPropNames: admittedPropNames(this.propRegistry, this.groupRegistry, this.activeGroups, this.custom)
174
206
  };
175
207
  }
176
208
  };
@@ -828,9 +860,10 @@ var SystemBuilder = class SystemBuilder {
828
860
  const sourceIndex = this.#extendCount + 1;
829
861
  const incomingOrigin = `extended source #${sourceIndex}`;
830
862
  const provenance = new Map(this.#extendProvenance);
863
+ const groupsByName = this.#groupRegistry;
831
864
  const nextProps = { ...this.#propRegistry };
832
865
  for (const [name, incoming] of Object.entries(snapshot.props)) {
833
- if (name in this.#groupRegistry) throw new Error(`extend: prop "${name}" (${incomingOrigin}) collides with an existing group name (${this.#originOf(`group:${name}`)}). Group names and prop names must be disjoint.`);
866
+ if (name in groupsByName && !groupsByName[name].includes(name)) throw new Error(`extend: prop "${name}" (${incomingOrigin}) collides with an existing group name (${this.#originOf(`group:${name}`)}). Group names and prop names must be disjoint.`);
834
867
  const existing = nextProps[name];
835
868
  if (!existing) {
836
869
  nextProps[name] = incoming;
@@ -841,7 +874,7 @@ var SystemBuilder = class SystemBuilder {
841
874
  for (const [name, incoming] of Object.entries(snapshot.groups)) {
842
875
  const existing = nextGroups[name];
843
876
  if (!existing) {
844
- if (name in nextProps) throw new Error(`extend: group name "${name}" (${incomingOrigin}) collides with an existing prop name (${this.#originOf(`prop:${name}`)}). Group names and prop names must be disjoint.`);
877
+ if (name in nextProps && !incoming.includes(name)) throw new Error(`extend: group name "${name}" (${incomingOrigin}) collides with an existing prop name (${this.#originOf(`prop:${name}`)}). Group names and prop names must be disjoint.`);
845
878
  nextGroups[name] = [...incoming];
846
879
  provenance.set(`group:${name}`, sourceIndex);
847
880
  } else if (!orderedMembersEqual(existing, incoming)) throw new Error(`extend: group "${name}" already registered with different membership. Existing (${this.#originOf(`group:${name}`)}): [${existing.join(", ")}]. Incoming (${incomingOrigin}): [${incoming.join(", ")}].`);
@@ -909,7 +942,8 @@ var SystemBuilder = class SystemBuilder {
909
942
  kind: "globalStyles",
910
943
  name: entry.name,
911
944
  styles: entry.styles,
912
- ...entry.fontFaces ? { fontFaces: entry.fontFaces } : {}
945
+ ...entry.fontFaces ? { fontFaces: entry.fontFaces } : {},
946
+ ...entry.unlayered ? { unlayered: true } : {}
913
947
  }))];
914
948
  if (inheritedEntries.length > 0) {
915
949
  const merged = mergeVocabularyEntries(this.#vocabularyRegistry, this.#vocabularyCollisions, inheritedEntries, incomingOrigin);
@@ -994,7 +1028,8 @@ var SystemBuilder = class SystemBuilder {
994
1028
  const createGlobalStyles = ((styles, options) => ({
995
1029
  __brand: "GlobalStyleBlock",
996
1030
  styles,
997
- ...options?.fontFaces?.length ? { fontFaces: [...options.fontFaces] } : {}
1031
+ ...options?.fontFaces?.length ? { fontFaces: [...options.fontFaces] } : {},
1032
+ ...options?.unlayered ? { unlayered: true } : {}
998
1033
  }));
999
1034
  const createKeyframes = ((frames) => keyframes(frames));
1000
1035
  const makeBundle = (entries, collisions, localCallCount) => {
@@ -1028,7 +1063,8 @@ var SystemBuilder = class SystemBuilder {
1028
1063
  kind: "globalStyles",
1029
1064
  name,
1030
1065
  styles,
1031
- ...blockValue.fontFaces?.length ? { fontFaces: Object.freeze(blockValue.fontFaces.map((face) => Object.freeze({ ...face }))) } : {}
1066
+ ...blockValue.fontFaces?.length ? { fontFaces: Object.freeze(blockValue.fontFaces.map((face) => Object.freeze({ ...face }))) } : {},
1067
+ ...blockValue.unlayered ? { unlayered: true } : {}
1032
1068
  });
1033
1069
  }
1034
1070
  return registerEntries("registerGlobalStyles", incoming);
@@ -1045,7 +1081,8 @@ var SystemBuilder = class SystemBuilder {
1045
1081
  globalStyles: Object.freeze(entries.filter((entry) => entry.kind === "globalStyles").map((entry) => Object.freeze({
1046
1082
  name: entry.name,
1047
1083
  styles: entry.styles,
1048
- ...entry.fontFaces ? { fontFaces: entry.fontFaces } : {}
1084
+ ...entry.fontFaces ? { fontFaces: entry.fontFaces } : {},
1085
+ ...entry.unlayered ? { unlayered: true } : {}
1049
1086
  }))),
1050
1087
  collisions: Object.freeze(collisions.map((entry) => Object.freeze({ ...entry }))),
1051
1088
  legacyVerbs: Object.freeze(legacyVerbWitnessRecord.map((entry) => ({
@@ -1240,15 +1277,14 @@ function replaceScaleNames(store, scale, names, source) {
1240
1277
  }
1241
1278
  /** The fields a contextual-variable registration sets, read literally: an
1242
1279
  * untyped registration without a syntax keeps emitting `syntax: "undefined"`,
1243
- * which extraction reports as an invalid registration. An all-absolute math
1244
- * initial value is recorded as its computed value (`calc(1px / 1px)` → `1`),
1245
- * so both spellings are one registration, and CSS tooling reads the rule. */
1280
+ * which extraction reports as an invalid registration. The initial value is
1281
+ * kept as written; extraction writes an all-absolute math one as its
1282
+ * computed value, so the value parser stays out of client bundles. */
1246
1283
  function legacyFields(registration) {
1247
- const syntax = `${registration.syntax}`;
1248
1284
  return {
1249
- syntax,
1285
+ syntax: `${registration.syntax}`,
1250
1286
  inherits: registration.inherits ?? THEME_INHERITS,
1251
- initialValue: registration.initialValue === void 0 ? void 0 : registeredInitialValue(syntax, registration.initialValue)
1287
+ initialValue: registration.initialValue
1252
1288
  };
1253
1289
  }
1254
1290
  function legacyRegistration(store, name) {
@@ -1297,6 +1333,16 @@ function namesByScale(store) {
1297
1333
  for (const [scale, names] of store.scaleNames) result[scale] = [...names];
1298
1334
  return result;
1299
1335
  }
1336
+ /**
1337
+ * Each declared contextual variable as the token path a theme value writes,
1338
+ * `{scale.name}`, and the `var()` it resolves to: `--${name}`, the property
1339
+ * the Rust resolver maps the same path to.
1340
+ */
1341
+ function contextualReferences(store) {
1342
+ const result = {};
1343
+ for (const [scale, names] of store.scaleNames) for (const name of names) result[`${scale}.${name}`] = `var(--${name})`;
1344
+ return result;
1345
+ }
1300
1346
  /** The manifest's `registrations`: authored objects, in registration order. */
1301
1347
  function legacyRegistrations(store) {
1302
1348
  const result = {};
@@ -1363,9 +1409,11 @@ function parseReferences(value) {
1363
1409
  }
1364
1410
  return references;
1365
1411
  }
1412
+ /** An opacity modifier: a percentage from 0 to 100, decimals allowed. */
1413
+ const OPACITY_RE = /^\d+(?:\.\d+)?$/;
1366
1414
  function applyOpacity(base, opacity) {
1367
1415
  if (opacity === void 0) return base;
1368
- const alpha = Number.parseInt(opacity, 10);
1416
+ const alpha = OPACITY_RE.test(opacity) && Number(opacity) <= 100 ? Number(opacity) : Number.parseInt(opacity, 10);
1369
1417
  if (Number.isNaN(alpha)) return base;
1370
1418
  if (alpha === 0) return "transparent";
1371
1419
  if (alpha !== 100) return `color-mix(in srgb, ${base} ${alpha}%, transparent)`;
@@ -1373,14 +1421,15 @@ function applyOpacity(base, opacity) {
1373
1421
  }
1374
1422
  /**
1375
1423
  * Substitutes `{path}` references in one value from a resolved token map,
1376
- * whose emitted paths already read `var(--…)`. An unknown path warns and
1377
- * keeps its literal, as a token's own reference does.
1424
+ * whose emitted paths already read `var(--…)`, or else a declared contextual
1425
+ * variable. An unknown path warns and keeps its literal, as a token's own
1426
+ * reference does.
1378
1427
  */
1379
- function resolveValueReferences(value, tokenMap) {
1428
+ function resolveValueReferences(value, tokenMap, contextual) {
1380
1429
  if (!value.includes("{")) return value;
1381
1430
  return value.replace(TOKEN_REF_RE$1, (match) => {
1382
1431
  const [reference] = parseReferences(match);
1383
- const target = tokenMap[reference.path];
1432
+ const target = tokenMap[reference.path] ?? contextual[reference.path];
1384
1433
  if (target === void 0) {
1385
1434
  console.warn(`[animus] Token ref {${reference.text}} — path '${reference.path}' not found in token map`);
1386
1435
  return match;
@@ -1389,10 +1438,11 @@ function resolveValueReferences(value, tokenMap) {
1389
1438
  });
1390
1439
  }
1391
1440
  /**
1392
- * An unresolvable reference warns and keeps its literal: a kit theme may
1393
- * reference tokens its consumer supplies later.
1441
+ * A path that names no token but a declared contextual variable resolves to
1442
+ * that variable. Any other unresolvable reference warns and keeps its
1443
+ * literal: a kit theme may reference tokens its consumer supplies later.
1394
1444
  */
1395
- function resolveReferences(tokenMap, variableMap, variables) {
1445
+ function resolveReferences(tokenMap, variableMap, variables, contextual) {
1396
1446
  const paths = Object.keys(tokenMap).sort();
1397
1447
  const known = new Set(paths);
1398
1448
  const rawValueOf = (path) => {
@@ -1414,6 +1464,8 @@ function resolveReferences(tokenMap, variableMap, variables) {
1414
1464
  const warnedMissing = /* @__PURE__ */ new Set();
1415
1465
  const substitute = (reference, match) => {
1416
1466
  if (!known.has(reference.path)) {
1467
+ const variable = contextual[reference.path];
1468
+ if (variable !== void 0) return applyOpacity(variable, reference.opacity);
1417
1469
  if (!warnedMissing.has(reference.path)) {
1418
1470
  warnedMissing.add(reference.path);
1419
1471
  console.warn(`[animus] Token ref {${reference.text}} — path '${reference.path}' not found in token map`);
@@ -1519,13 +1571,22 @@ const COLOR_FUNCTION_PREFIXES = [
1519
1571
  "color(",
1520
1572
  "color-mix("
1521
1573
  ];
1574
+ /**
1575
+ * A hex or functional colour. Named colours and keywords are not literals:
1576
+ * in a colour mode they stay palette lookups, so a palette key never reads as
1577
+ * a CSS name.
1578
+ */
1579
+ function isLiteralColor(value) {
1580
+ const v = value.trim();
1581
+ if (/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(v)) return true;
1582
+ return COLOR_FUNCTION_PREFIXES.some((prefix) => v.startsWith(prefix) && v.endsWith(")"));
1583
+ }
1522
1584
  function isValidCSSColor(value) {
1523
1585
  if (typeof value !== "string") return false;
1524
1586
  const v = value.trim();
1525
1587
  if (v === "") return false;
1526
1588
  if (v === "transparent" || v === "currentColor" || v === "currentcolor") return true;
1527
- if (v.startsWith("#") && /^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(v)) return true;
1528
- for (const prefix of COLOR_FUNCTION_PREFIXES) if (v.startsWith(prefix) && v.endsWith(")")) return true;
1589
+ if (isLiteralColor(v)) return true;
1529
1590
  if (/^[a-zA-Z]+$/.test(v)) return true;
1530
1591
  return false;
1531
1592
  }
@@ -1534,10 +1595,10 @@ function validateModeAliases(modeName, aliases, nestedColors, flatColorKeys, pre
1534
1595
  const aliasPath = prefix ? `${prefix}.${key}` : key;
1535
1596
  if (key === "_") {
1536
1597
  if (typeof value === "string") {
1537
- if (walkDotPath(nestedColors, value) === void 0) throw new Error(`addColorModes: mode '${modeName}' references unknown color '${value}' for alias '${prefix || key}'. Available colors: ${flatColorKeys.slice(0, 10).join(", ")}${flatColorKeys.length > 10 ? ", ..." : ""}`);
1598
+ if (!isLiteralColor(value) && walkDotPath(nestedColors, value) === void 0) throw new Error(`addColorModes: mode '${modeName}' references unknown color '${value}' for alias '${prefix || key}'. Available colors: ${flatColorKeys.slice(0, 10).join(", ")}${flatColorKeys.length > 10 ? ", ..." : ""}`);
1538
1599
  } else if (isObject(value)) validateModeAliases(modeName, value, nestedColors, flatColorKeys, prefix);
1539
1600
  } else if (typeof value === "string") {
1540
- if (walkDotPath(nestedColors, value) === void 0) throw new Error(`addColorModes: mode '${modeName}' references unknown color '${value}' for alias '${aliasPath}'. Available colors: ${flatColorKeys.slice(0, 10).join(", ")}${flatColorKeys.length > 10 ? ", ..." : ""}`);
1601
+ if (!isLiteralColor(value) && walkDotPath(nestedColors, value) === void 0) throw new Error(`addColorModes: mode '${modeName}' references unknown color '${value}' for alias '${aliasPath}'. Available colors: ${flatColorKeys.slice(0, 10).join(", ")}${flatColorKeys.length > 10 ? ", ..." : ""}`);
1541
1602
  } else if (isObject(value)) validateModeAliases(modeName, value, nestedColors, flatColorKeys, aliasPath);
1542
1603
  }
1543
1604
  }
@@ -1963,10 +2024,11 @@ var ThemeBuilder = class ThemeBuilder {
1963
2024
  for (const fill of coverageFills) console.info(`[animus] Mode '${fill.mode}': ${fill.count} alias(es) inherit from '${fill.base}'`);
1964
2025
  const { tokenMap: flatTokenMap, variableMap, variables: flatVariables, tokenDefinitions } = flattenTheme(theme, emittedScales, effectiveModes);
1965
2026
  assertNoDroppedReferences(tokenDefinitions, flatTokenMap, this._state.droppedTokenPaths, this._state.extendProvenance);
1966
- const { tokenMap, variables } = resolveReferences(flatTokenMap, variableMap, flatVariables);
2027
+ const contextual = contextualReferences(this._state.properties);
2028
+ const { tokenMap, variables } = resolveReferences(flatTokenMap, variableMap, flatVariables, contextual);
1967
2029
  const declarationScales = this._state.declarationScales;
1968
- const resolvedDeclarationScales = resolveDeclarationScales(declarationScales, theme, tokenMap);
1969
- const { modeVariables, modeTokens } = resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap);
2030
+ const resolvedDeclarationScales = resolveDeclarationScales(declarationScales, theme, tokenMap, contextual);
2031
+ const { modeVariables, modeTokens } = resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap, contextual);
1970
2032
  const bpVariables = {};
1971
2033
  if (theme.breakpoints && isObject(theme.breakpoints)) {
1972
2034
  const breakpointEntries = Object.entries(theme.breakpoints).map(([key, value]) => [`--breakpoint-${key}`, `${value}px`]).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0);
@@ -1976,7 +2038,7 @@ var ThemeBuilder = class ThemeBuilder {
1976
2038
  const propertyCss = registrationCss(this._state.properties);
1977
2039
  const { emittableVariables, emittableModeVariables, omitted } = omitUnresolvedDeclarations(variables, modeVariables);
1978
2040
  if (omitted.length > 0) console.warn(`[animus] Omitted ${omitted.length} CSS declaration(s) whose token references never resolved: ${omitted.join(", ")}`);
1979
- const baseVariableCss = buildVariableCss(emittableVariables, bpVariables, emittableModeVariables, {
2041
+ const baseVariableCss = buildVariableCss(emittableVariables, bpVariables, emittableModeVariables, modeDependentDeclarations(tokenDefinitions, effectiveModes, variableMap, emittableVariables), {
1980
2042
  initialMode: typeof theme.mode === "string" ? theme.mode : void 0,
1981
2043
  systemPreference,
1982
2044
  browserColorScheme
@@ -2082,9 +2144,10 @@ function createTheme() {
2082
2144
  }
2083
2145
  /**
2084
2146
  * The effective declaration scales in serialized order, token references
2085
- * resolved against the final token map; `undefined` when there are none.
2147
+ * resolved against the final token map and the declared contextual
2148
+ * variables; `undefined` when there are none.
2086
2149
  */
2087
- function resolveDeclarationScales(declarationScales, theme, tokenMap) {
2150
+ function resolveDeclarationScales(declarationScales, theme, tokenMap, contextual) {
2088
2151
  const names = Object.keys(declarationScales).sort();
2089
2152
  if (names.length === 0) return void 0;
2090
2153
  const serialized = {};
@@ -2095,7 +2158,7 @@ function resolveDeclarationScales(declarationScales, theme, tokenMap) {
2095
2158
  const resolved = {};
2096
2159
  for (const key of Object.keys(values).sort()) {
2097
2160
  const record = values[key];
2098
- resolved[key] = sortRecordByKey(Object.fromEntries(Object.entries(record).map(([member, value]) => [member, typeof value === "string" ? resolveValueReferences(value, tokenMap) : value])));
2161
+ resolved[key] = sortRecordByKey(Object.fromEntries(Object.entries(record).map(([member, value]) => [member, typeof value === "string" ? resolveValueReferences(value, tokenMap, contextual) : value])));
2099
2162
  }
2100
2163
  const [firstKey] = Object.keys(resolved);
2101
2164
  serialized[name] = {
@@ -2146,6 +2209,7 @@ function flattenTheme(theme, emittedScales, effectiveModes) {
2146
2209
  } else {
2147
2210
  const literal = tokenMap[`colors.${colorRef}`];
2148
2211
  if (literal !== void 0) variables[varName] = literal;
2212
+ else if (isLiteralColor(colorRef)) variables[varName] = colorRef;
2149
2213
  }
2150
2214
  tokenMap[`colors.${aliasDotKey}`] = `var(${varName})`;
2151
2215
  variableMap[`colors.${aliasDotKey}`] = varName;
@@ -2232,7 +2296,7 @@ function resolveModeCoverage(authoredModeAliases, modeBases, inheritedModes, inh
2232
2296
  * Per-mode declarations carry the RESOLVED value of their target color, never
2233
2297
  * the raw flattened string. Modes and lines sort, hiding authoring order.
2234
2298
  */
2235
- function resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap) {
2299
+ function resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap, contextual) {
2236
2300
  const modeVariables = {};
2237
2301
  const modeTokens = {};
2238
2302
  const resolvedColorValue = (colorRef) => {
@@ -2242,6 +2306,7 @@ function resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap)
2242
2306
  const declared = variables[varName];
2243
2307
  if (declared !== void 0) return declared;
2244
2308
  } else if (tokenMap[path] !== void 0) return tokenMap[path];
2309
+ if (isLiteralColor(colorRef)) return resolveValueReferences(colorRef, tokenMap, contextual);
2245
2310
  return String(colorRef);
2246
2311
  };
2247
2312
  for (const modeName of Object.keys(effectiveModes).sort()) {
@@ -2263,6 +2328,38 @@ function resolveModeValueMaps(effectiveModes, variableMap, variables, tokenMap)
2263
2328
  };
2264
2329
  }
2265
2330
  /**
2331
+ * Root declarations of the tokens whose value reads a colour a mode redefines,
2332
+ * directly or through other tokens, by the authored reference graph. A custom
2333
+ * property computes where it is declared, so a token declared only at `:root`
2334
+ * carries the root's colours into a nested mode scope; every mode scope
2335
+ * re-declares these. `resolveReferences` has already rejected any cycle in
2336
+ * the graph.
2337
+ */
2338
+ function modeDependentDeclarations(tokenDefinitions, effectiveModes, variableMap, rootVariables) {
2339
+ const modeAliases = /* @__PURE__ */ new Set();
2340
+ for (const aliases of Object.values(effectiveModes)) for (const alias of Object.keys(aliases)) modeAliases.add(`colors.${alias}`);
2341
+ const dependent = new Set(modeAliases);
2342
+ let grew = modeAliases.size > 0;
2343
+ while (grew) {
2344
+ grew = false;
2345
+ for (const [path, definition] of Object.entries(tokenDefinitions)) {
2346
+ if (dependent.has(path) || definition.kind !== "reference") continue;
2347
+ if (definition.references.some((ref) => dependent.has(ref.path))) {
2348
+ dependent.add(path);
2349
+ grew = true;
2350
+ }
2351
+ }
2352
+ }
2353
+ const declarations = {};
2354
+ for (const path of dependent) {
2355
+ if (modeAliases.has(path)) continue;
2356
+ const varName = variableMap[path];
2357
+ const value = varName === void 0 ? void 0 : rootVariables[varName];
2358
+ if (value !== void 0) declarations[varName] = value;
2359
+ }
2360
+ return sortRecordByKey(declarations);
2361
+ }
2362
+ /**
2266
2363
  * A reference to a target dropped by `addScale({ replace: true })` fails the
2267
2364
  * build. Targets never defined anywhere stay warn-and-literal.
2268
2365
  */
@@ -2551,7 +2648,7 @@ function sha256HexFallback(input) {
2551
2648
  function computeContractHash(input) {
2552
2649
  return sha256Hex(JSON.stringify(canonicalize(input)));
2553
2650
  }
2554
- function buildVariableCss(rootVariables, breakpointVariables, modeVariables, systemEmission = {}) {
2651
+ function buildVariableCss(rootVariables, breakpointVariables, modeVariables, modeDependents, systemEmission = {}) {
2555
2652
  const { initialMode, systemPreference, browserColorScheme } = systemEmission;
2556
2653
  const parts = [];
2557
2654
  const rootLines = [];
@@ -2579,7 +2676,10 @@ function buildVariableCss(rootVariables, breakpointVariables, modeVariables, sys
2579
2676
  if (modeScheme) modeLines.push(` color-scheme: ${modeScheme};`);
2580
2677
  if (modeLines.length > 0) parts.push(`[data-color-mode="${modeName}"] {\n${modeLines.join("\n")}\n}`);
2581
2678
  }
2679
+ const dependentLines = [];
2680
+ for (const [varName, value] of Object.entries(modeDependents)) dependentLines.push(` ${varName}: ${value};`);
2681
+ if (dependentLines.length > 0) parts.push(`[data-color-mode] {\n${dependentLines.join("\n")}\n}`);
2582
2682
  return parts.join("\n\n");
2583
2683
  }
2584
2684
  //#endregion
2585
- export { ASSET_PLACEHOLDER_PREFIX, Animus, AnimusExtended, AnimusExtendedWithAll, AnimusWithAll, BUILT_IN_CONDITIONS, BUILT_IN_SELECTORS, SystemBuilder, ThemeBuilder, areTransformsEqual, asset, borderShorthand, compose, createClassResolver, createComponent, createComposedFamily, createScale, createSystem, createTheme, createTransform, gridItem, gridItemRatio, numericOrStringScale, numericScale, percentageOrAbsolute, size, stringScale };
2685
+ export { ASSET_PLACEHOLDER_PREFIX, Animus, AnimusExtended, AnimusExtendedWithAll, AnimusWithAll, BUILT_IN_CONDITIONS, BUILT_IN_SELECTORS, SystemBuilder, ThemeBuilder, areTransformsEqual, asset, borderShorthand, compose, createClassResolver, createComponent, createComposedFamily, createScale, createSystem, createTheme, createTransform, gridItem, gridItemRatio, numericOrStringScale, numericScale, percentageOrAbsolute, renderAsChild, size, stringScale };
@@ -1,5 +1,3 @@
1
- /** Hook-free entry: extracted components import it from server components. */
2
- export { createComponent } from './runtime';
3
- export { type ClassResolver, type ClassResolverAttributes, createClassResolver, } from './runtime/createClassResolver';
4
- export { createComposedFamily } from './runtime/createComposedFamily';
5
- //# sourceMappingURL=runtime-entry.d.ts.map
1
+ import { n as ClassResolverAttributes, r as createClassResolver, t as ClassResolver } from "./createClassResolver-Do1nmvkf.js";
2
+ import { n as createComponent, r as renderAsChild, t as createComposedFamily } from "./createComposedFamily-BkrvSsfl.js";
3
+ export { type ClassResolver, type ClassResolverAttributes, createClassResolver, createComponent, createComposedFamily, renderAsChild };
@@ -1,3 +1,3 @@
1
- import { t as createClassResolver } from "./createClassResolver-DPLExqGy.js";
2
- import { n as createComponent, t as createComposedFamily } from "./createComposedFamily-C6CLAsMx.js";
3
- export { createClassResolver, createComponent, createComposedFamily };
1
+ import { t as createClassResolver } from "./createClassResolver-DtHjTYa7.js";
2
+ import { n as createComponent, r as renderAsChild, t as createComposedFamily } from "./createComposedFamily-BbA_d0QH.js";
3
+ export { createClassResolver, createComponent, createComposedFamily, renderAsChild };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@animus-ui/system",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "Animus design system builder — tokens, prop groups, global styles",
5
5
  "keywords": [
6
6
  "css",
@@ -48,6 +48,18 @@
48
48
  "types": "./dist/appearance/index.d.ts",
49
49
  "import": "./dist/appearance/index.js"
50
50
  },
51
+ "./appearance/controller": {
52
+ "types": "./dist/appearance/controller.d.ts",
53
+ "import": "./dist/appearance/controller.js"
54
+ },
55
+ "./appearance/react": {
56
+ "types": "./dist/appearance/react.d.ts",
57
+ "import": "./dist/appearance/react.js"
58
+ },
59
+ "./appearance/svelte": {
60
+ "types": "./dist/appearance/svelte.d.ts",
61
+ "import": "./dist/appearance/svelte.js"
62
+ },
51
63
  "./compose": {
52
64
  "types": "./dist/compose.d.ts",
53
65
  "import": "./dist/compose.js"
@@ -72,11 +84,11 @@
72
84
  },
73
85
  "scripts": {
74
86
  "build": "bun run build:ts",
75
- "build:ts": "tsdown && tsc -p tsconfig.build.json",
87
+ "build:ts": "tsdown",
76
88
  "compile": "tsc --noEmit"
77
89
  },
78
90
  "dependencies": {
79
- "@animus-ui/properties": "0.1.20",
91
+ "@animus-ui/properties": "0.1.22",
80
92
  "csstype": "^3.2.3"
81
93
  },
82
94
  "devDependencies": {
package/dist/Animus.d.ts DELETED
@@ -1,81 +0,0 @@
1
- import type { ComponentType, JSX } from 'react';
2
- import { AnimusExtended } from './AnimusExtended';
3
- import { type ClassResolver } from './runtime/createClassResolver';
4
- import { AbstractParser, CompoundEntry, CSSPropMap, CSSProps, CustomPropConfig, DeclarationProp, SystemProp, SystemProps, ThemedCSSPropMap, ThemedCSSProps, VariantConfig } from './types/config';
5
- import { AbstractProps } from './types/props';
6
- import type { AnimusComponent, AnimusWrappedComponent } from './types/component';
7
- export declare class AnimusWithAll<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<AbstractParser>>, ActiveGroups extends Record<string, true>, CustomProps extends Record<string, SystemProp>> {
8
- propRegistry: PropRegistry;
9
- groupRegistry: GroupRegistry;
10
- baseStyles: BaseStyles;
11
- statesConfig: States;
12
- variants: Variants;
13
- activeGroups: ActiveGroups;
14
- custom: CustomProps;
15
- compounds: CompoundEntry[];
16
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, custom: CustomProps, compounds?: CompoundEntry[]);
17
- protected extend(): AnimusExtended<PropRegistry, GroupRegistry, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
18
- asElement<El extends keyof JSX.IntrinsicElements>(component: El): AnimusComponent<El, PropRegistry, GroupRegistry, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
19
- asComponent<C extends ComponentType<any>>(AsComponent: C): AnimusWrappedComponent<C, PropRegistry, GroupRegistry, BaseStyles, Variants, States, ActiveGroups, CustomProps>;
20
- asClass(): ClassResolver;
21
- _buildComponentConfig(): {
22
- variants: Record<string, {
23
- options: string[];
24
- default?: string;
25
- }> | undefined;
26
- states: string[] | undefined;
27
- systemPropNames: string[];
28
- };
29
- }
30
- declare class AnimusWithSystem<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<AbstractParser>>, ActiveGroups extends Record<string, true>> extends AnimusWithAll<PropRegistry, GroupRegistry, BaseStyles, Variants, States, ActiveGroups, {}> {
31
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles, variants: Variants, states: States, activeGroups: ActiveGroups, compounds?: CompoundEntry[]);
32
- props<NewCustomProps extends Record<string, CustomPropConfig | DeclarationProp>>(config: NewCustomProps): AnimusWithAll<PropRegistry, GroupRegistry, BaseStyles, Variants, States, ActiveGroups, NewCustomProps>;
33
- }
34
- declare class AnimusWithStates<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>, Variants extends Record<string, VariantConfig>, States extends CSSPropMap<AbstractProps, SystemProps<AbstractParser>>> extends AnimusWithSystem<PropRegistry, GroupRegistry, BaseStyles, Variants, States, {}> {
35
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles, variants: Variants, states: States, compounds?: CompoundEntry[]);
36
- system<PickedKeys extends keyof GroupRegistry | Extract<keyof PropRegistry, string>>(config: Record<PickedKeys, true>): AnimusWithSystem<PropRegistry, GroupRegistry, BaseStyles, Variants, States, Record<PickedKeys, true>>;
37
- }
38
- declare class AnimusWithCompounds<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>, Variants extends Record<string, VariantConfig>> extends AnimusWithStates<PropRegistry, GroupRegistry, BaseStyles, Variants, {}> {
39
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles, variants: Variants, compounds?: CompoundEntry[]);
40
- compound<Props extends AbstractProps>(condition: {
41
- [K in keyof Variants]?: keyof Variants[K]['variants'] | ReadonlyArray<keyof Variants[K]['variants']>;
42
- }, styles: ThemedCSSProps<Props, PropRegistry>): AnimusWithCompounds<PropRegistry, GroupRegistry, BaseStyles, Variants>;
43
- states<Props extends AbstractProps>(config: ThemedCSSPropMap<Props, PropRegistry>): AnimusWithStates<PropRegistry, GroupRegistry, BaseStyles, Variants, ThemedCSSPropMap<Props, PropRegistry>>;
44
- }
45
- declare class AnimusWithVariants<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>, Variants extends Record<string, VariantConfig>> extends AnimusWithCompounds<PropRegistry, GroupRegistry, BaseStyles, Variants> {
46
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles, variants: Variants, compounds?: CompoundEntry[]);
47
- compound<Props extends AbstractProps>(condition: {
48
- [K in keyof Variants]?: keyof Variants[K]['variants'] | ReadonlyArray<keyof Variants[K]['variants']>;
49
- }, styles: ThemedCSSProps<Props, PropRegistry>): AnimusWithCompounds<PropRegistry, GroupRegistry, BaseStyles, Variants>;
50
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
51
- prop?: PropKey;
52
- defaultVariant?: Extract<keyof Props, string>;
53
- base?: ThemedCSSProps<Base, PropRegistry>;
54
- variants: ThemedCSSPropMap<Props, PropRegistry>;
55
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseStyles, Variants & Record<PropKey, {
56
- prop?: PropKey;
57
- defaultVariant?: Extract<keyof Props, string>;
58
- base?: ThemedCSSProps<Base, PropRegistry>;
59
- variants: ThemedCSSPropMap<Props, PropRegistry>;
60
- }>>;
61
- }
62
- declare class AnimusWithBase<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>, BaseStyles extends CSSProps<AbstractProps, SystemProps<AbstractParser>>> extends AnimusWithVariants<PropRegistry, GroupRegistry, BaseStyles, {}> {
63
- constructor(props: PropRegistry, groups: GroupRegistry, base: BaseStyles);
64
- variant<Keys extends keyof Props, Base extends AbstractProps, Props extends Record<Keys, AbstractProps>, PropKey extends Readonly<string> = 'variant'>(options: {
65
- prop?: PropKey;
66
- defaultVariant?: Extract<keyof Props, string>;
67
- base?: ThemedCSSProps<Base, PropRegistry>;
68
- variants: ThemedCSSPropMap<Props, PropRegistry>;
69
- }): AnimusWithVariants<PropRegistry, GroupRegistry, BaseStyles, Record<PropKey, {
70
- prop?: PropKey;
71
- defaultVariant?: Extract<keyof Props, string>;
72
- base?: ThemedCSSProps<Base, PropRegistry>;
73
- variants: ThemedCSSPropMap<Props, PropRegistry>;
74
- }>>;
75
- }
76
- export declare class Animus<PropRegistry extends Record<string, SystemProp>, GroupRegistry extends Record<string, (keyof PropRegistry)[]>> extends AnimusWithBase<PropRegistry, GroupRegistry, {}> {
77
- constructor(props: PropRegistry, groups: GroupRegistry);
78
- styles<Props extends AbstractProps>(config: ThemedCSSProps<Props, PropRegistry>): AnimusWithBase<PropRegistry, GroupRegistry, ThemedCSSProps<Props, PropRegistry>>;
79
- }
80
- export {};
81
- //# sourceMappingURL=Animus.d.ts.map