@animus-ui/system 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -51
- package/dist/Animus.d.ts +1 -1
- package/dist/Animus.d.ts.map +1 -1
- package/dist/AnimusExtended.d.ts +1 -1
- package/dist/AnimusExtended.d.ts.map +1 -1
- package/dist/SystemBuilder.d.ts +184 -155
- package/dist/SystemBuilder.d.ts.map +1 -1
- package/dist/appearance/index.d.ts +0 -68
- package/dist/appearance/index.d.ts.map +1 -1
- package/dist/appearance/index.js +0 -91
- package/dist/assert-root-slot-C3Lp9MNJ.js +10 -0
- package/dist/asset.d.ts +4 -13
- package/dist/asset.d.ts.map +1 -1
- package/dist/bootstrap/createAppearanceBootstrap.d.ts +0 -57
- package/dist/bootstrap/createAppearanceBootstrap.d.ts.map +1 -1
- package/dist/bootstrap/index.d.ts.map +1 -1
- package/dist/bootstrap/index.js +4 -58
- package/dist/class-resolver.d.ts +2 -4
- package/dist/class-resolver.d.ts.map +1 -1
- package/dist/class-resolver.js +1 -1
- package/dist/compose.d.ts +2 -16
- package/dist/compose.d.ts.map +1 -1
- package/dist/compose.js +3 -17
- package/dist/composeWithContext.d.ts +4 -15
- package/dist/composeWithContext.d.ts.map +1 -1
- package/dist/composeWithContext.js +5 -16
- package/dist/conditions.d.ts +24 -141
- package/dist/conditions.d.ts.map +1 -1
- package/dist/{createClassResolver-BWyEQ5KZ.js → createClassResolver-EpwTL9Sa.js} +12 -113
- package/dist/{createComposedFamily-k5tTujGI.js → createComposedFamily-C4NovMcd.js} +11 -49
- package/dist/groups/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +318 -409
- package/dist/keyframes.d.ts +2 -23
- package/dist/keyframes.d.ts.map +1 -1
- package/dist/runtime/assert-root-slot.d.ts +2 -13
- package/dist/runtime/assert-root-slot.d.ts.map +1 -1
- package/dist/runtime/createClassResolver.d.ts +0 -8
- package/dist/runtime/createClassResolver.d.ts.map +1 -1
- package/dist/runtime/createComposedFamily.d.ts +2 -7
- package/dist/runtime/createComposedFamily.d.ts.map +1 -1
- package/dist/runtime/index.d.ts +0 -16
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/is-dev.d.ts +2 -42
- package/dist/runtime/is-dev.d.ts.map +1 -1
- package/dist/runtime/resolveClasses.d.ts +8 -33
- package/dist/runtime/resolveClasses.d.ts.map +1 -1
- package/dist/runtime/witness.d.ts +0 -8
- package/dist/runtime/witness.d.ts.map +1 -1
- package/dist/runtime-entry.d.ts +1 -6
- package/dist/runtime-entry.d.ts.map +1 -1
- package/dist/runtime-entry.js +2 -2
- package/dist/selectors.d.ts +6 -45
- package/dist/selectors.d.ts.map +1 -1
- package/dist/{size-CcVEGaen.js → size-C6jqxiQy.js} +7 -34
- package/dist/theme/createTheme.d.ts +26 -95
- package/dist/theme/createTheme.d.ts.map +1 -1
- package/dist/theme/flattenScale.d.ts +4 -10
- package/dist/theme/flattenScale.d.ts.map +1 -1
- package/dist/theme/resolveReferences.d.ts +7 -35
- package/dist/theme/resolveReferences.d.ts.map +1 -1
- package/dist/theme/serializeTokens.d.ts +0 -3
- package/dist/theme/serializeTokens.d.ts.map +1 -1
- package/dist/theme/types.d.ts +4 -26
- package/dist/theme/types.d.ts.map +1 -1
- package/dist/theme/utils.d.ts +1 -18
- package/dist/theme/utils.d.ts.map +1 -1
- package/dist/transforms/border.d.ts +1 -4
- package/dist/transforms/border.d.ts.map +1 -1
- package/dist/transforms/createTransform.d.ts +6 -31
- package/dist/transforms/createTransform.d.ts.map +1 -1
- package/dist/transforms/grid.d.ts +2 -12
- package/dist/transforms/grid.d.ts.map +1 -1
- package/dist/transforms/size.d.ts +2 -8
- package/dist/transforms/size.d.ts.map +1 -1
- package/dist/types/component.d.ts +9 -105
- package/dist/types/component.d.ts.map +1 -1
- package/dist/types/config.d.ts +12 -141
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/theme.d.ts +8 -165
- package/dist/types/theme.d.ts.map +1 -1
- package/dist/utils/deepMerge.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/assert-root-slot-B73sDJ1Q.js +0 -21
package/dist/types/theme.d.ts
CHANGED
|
@@ -6,183 +6,59 @@ export interface AbstractTheme extends BaseTheme {
|
|
|
6
6
|
breakpoints: Record<string, number>;
|
|
7
7
|
readonly [key: string]: any;
|
|
8
8
|
}
|
|
9
|
-
/**
|
|
10
|
-
* Filter non-scale keys from T so only user-defined scales appear.
|
|
11
|
-
* Builder/runtime metadata and color-mode options are structural — not token
|
|
12
|
-
* scales.
|
|
13
|
-
*/
|
|
14
9
|
export type ThemeStructuralKey = 'breakpoints' | 'modes' | 'mode' | 'systemPreference' | 'browserColorScheme' | 'modeBases' | '__emitted' | 'manifest' | 'serialize' | 'varRef';
|
|
15
10
|
export type TokenScales<T> = Omit<T, ThemeStructuralKey>;
|
|
16
11
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
* ```ts
|
|
21
|
-
* declare module '@animus-ui/system' {
|
|
22
|
-
* export interface Theme extends ShowcaseTheme {}
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* When augmented, CSS object values like `fontSize` become constrained to
|
|
27
|
-
* the theme's scale keys (e.g. `11 | 12 | 13 | 14 | 16 | ...`).
|
|
28
|
-
* When NOT augmented, values fall back to standard CSS property types.
|
|
29
|
-
*
|
|
30
|
-
* BaseTheme uses an open index signature so that module augmentation can
|
|
31
|
-
* provide a concrete breakpoints type (e.g. `{ sm: number; lg: number }`)
|
|
32
|
-
* without conflicting with a fixed Breakpoints interface.
|
|
12
|
+
* Consumers augment this interface to constrain CSS values to their theme's
|
|
13
|
+
* scale keys; unaugmented, values fall back to standard CSS property types.
|
|
33
14
|
*/
|
|
34
15
|
export interface Theme extends BaseTheme {
|
|
35
16
|
}
|
|
36
|
-
/**
|
|
37
|
-
* CSS <color> value type constraint for addColors().
|
|
38
|
-
* Template literal arms provide autocomplete for common formats.
|
|
39
|
-
* (string & {}) escape hatch allows future CSS color functions without blocking.
|
|
40
|
-
*/
|
|
41
17
|
export type CSSColorValue = `#${string}` | `rgb(${string})` | `rgba(${string})` | `hsl(${string})` | `hsla(${string})` | `oklch(${string})` | `oklab(${string})` | `lch(${string})` | `lab(${string})` | `color-mix(${string})` | `color(${string})` | 'transparent' | 'currentColor' | (string & {});
|
|
42
18
|
/**
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* Fallback: 'colors' hardcoded as always-emitted (for augmented Theme interfaces without phantom).
|
|
19
|
+
* Scale names emitted as CSS variables. The `colors` fallback covers augmented
|
|
20
|
+
* `Theme` interfaces, which carry no `__emitted` tuple.
|
|
46
21
|
*/
|
|
47
22
|
export type EmittedScales<T> = T extends {
|
|
48
23
|
__emitted: [infer E extends string];
|
|
49
24
|
} ? E & keyof TokenScales<T> : 'colors' extends keyof TokenScales<T> ? 'colors' : never;
|
|
50
|
-
/**
|
|
51
|
-
* All valid token ref paths for emitted scales in a theme.
|
|
52
|
-
* Uses LiteralPaths to enumerate `scale.key` paths from emitted scale entries.
|
|
53
|
-
*
|
|
54
|
-
* ```ts
|
|
55
|
-
* type Refs = EmittedTokenPaths<typeof tokens>;
|
|
56
|
-
* // → 'colors.primary' | 'colors.bg' | 'sizes.navHeight' | ...
|
|
57
|
-
* ```
|
|
58
|
-
*/
|
|
59
25
|
export type EmittedTokenPaths<T> = keyof LiteralPaths<Pick<TokenScales<T>, EmittedScales<T>>, '.'>;
|
|
60
|
-
/**
|
|
61
|
-
* Token ref pattern type for referencing emitted scales.
|
|
62
|
-
* Constrains the scale name portion of `{scale.key}` to only emitted scales.
|
|
63
|
-
*/
|
|
64
26
|
export type ScaleTokenRef<E extends string> = `${string}{${E}.${string}}${string}`;
|
|
65
|
-
/**
|
|
66
|
-
* Token ref union for color-scale values, computed from the augmented Theme.
|
|
67
|
-
* Accepts `{colors.key}` and `{colors.key/alpha}` patterns.
|
|
68
|
-
*
|
|
69
|
-
* ```ts
|
|
70
|
-
* const ref: ColorTokenRef = '{colors.primary/50}'; // ✓
|
|
71
|
-
* ```
|
|
72
|
-
*/
|
|
73
27
|
export type ColorTokenRef = Theme extends {
|
|
74
28
|
colors: infer C;
|
|
75
29
|
} ? C extends Record<string, unknown> ? `{colors.${Extract<keyof C, string>}}` | `{colors.${Extract<keyof C, string>}/${number}}` : never : never;
|
|
76
|
-
/**
|
|
77
|
-
* Optional `@property` registration metadata for a contextual var.
|
|
78
|
-
* A 1:1 mirror of the CSS `@property` descriptors — `initialValue` (never bare
|
|
79
|
-
* `initial`, which collides with the CSS-wide keyword). Supplied alongside the
|
|
80
|
-
* contextual var declaration; purely additive — it does NOT alter the phantom
|
|
81
|
-
* typing of the declared var names or the runtime theme object.
|
|
82
|
-
*/
|
|
83
30
|
export interface ContextualVarRegistration {
|
|
84
|
-
/** CSS `syntax` descriptor, e.g. `'<color>'` or `'*'`. Emitted quoted. */
|
|
85
31
|
syntax: string;
|
|
86
|
-
/** CSS `inherits` descriptor. */
|
|
87
32
|
inherits: boolean;
|
|
88
|
-
/** CSS `initial-value` descriptor. Omitted from output when absent. */
|
|
89
33
|
initialValue?: string;
|
|
90
34
|
}
|
|
91
|
-
/**
|
|
92
|
-
* OS `prefers-color-scheme` → declared mode name mapping.
|
|
93
|
-
* Presence of this config on a theme enables guarded system-fallback emission
|
|
94
|
-
* (`@media (prefers-color-scheme: …) { :root:not([data-color-mode]) { … } }`).
|
|
95
|
-
* Both values MUST name declared modes; the reserved name `system` is rejected
|
|
96
|
-
* (system is modeled as the ABSENCE of `data-color-mode`).
|
|
97
|
-
*/
|
|
98
35
|
export interface SystemPreferenceConfig {
|
|
99
|
-
/** Mode applied when the OS reports a light preference. */
|
|
100
36
|
light: string;
|
|
101
|
-
/** Mode applied when the OS reports a dark preference. */
|
|
102
37
|
dark: string;
|
|
103
38
|
}
|
|
104
|
-
/**
|
|
105
|
-
* Declared mode name → CSS `color-scheme` classification. When supplied it MUST
|
|
106
|
-
* be total across declared modes and agree with {@link SystemPreferenceConfig}.
|
|
107
|
-
*/
|
|
108
39
|
export type BrowserColorSchemeConfig = Record<string, 'light' | 'dark' | 'normal'>;
|
|
109
40
|
/**
|
|
110
|
-
*
|
|
111
|
-
*
|
|
112
|
-
* Typed LOCALLY from the mode config's own keys (D1) — the mode-name union is
|
|
113
|
-
* deliberately NOT threaded through the builder-chain generics, so this adds no
|
|
114
|
-
* depth to the type-state machine (TS2589 discipline).
|
|
41
|
+
* Options for `addColorModes`, typed from this call's mode config alone —
|
|
42
|
+
* threading the mode union through the builder generics risks TS2589.
|
|
115
43
|
*/
|
|
116
44
|
export interface ColorModeOptions<Config> {
|
|
117
|
-
/** OS preference → declared mode name. Enables guarded system emission. */
|
|
118
45
|
systemPreference?: {
|
|
119
46
|
light: keyof Config & string;
|
|
120
47
|
dark: keyof Config & string;
|
|
121
48
|
};
|
|
122
|
-
/**
|
|
123
|
-
* Declared mode name → CSS `color-scheme`. Totality is enforced at build
|
|
124
|
-
* time, with one carve-out: the two modes named by `systemPreference` are
|
|
125
|
-
* FORCED to `light`/`dark` by the conflict rule anyway, so they default to
|
|
126
|
-
* those values and may be omitted — `browserColorScheme: {}` is the whole
|
|
127
|
-
* opt-in for a two-mode theme. Every mode NOT named by the mapping must be
|
|
128
|
-
* classified explicitly (a build error otherwise); an explicit value on a
|
|
129
|
-
* mapped mode is honored and still conflict-checked.
|
|
130
|
-
*
|
|
131
|
-
* Typed `Partial` for exactly that reason — compile-time totality would
|
|
132
|
-
* re-demand the forced entries. Runtime validation covers JS callers,
|
|
133
|
-
* casts, and `from()` composition, which all reach `build()` without this
|
|
134
|
-
* type applying.
|
|
135
|
-
*/
|
|
136
49
|
browserColorScheme?: Partial<Record<keyof Config & string, 'light' | 'dark' | 'normal'>>;
|
|
137
|
-
/**
|
|
138
|
-
* NEW mode → the declared mode its uncovered INHERITED aliases resolve
|
|
139
|
-
* through (D6, first-class-extension). A consumer-declared mode over an
|
|
140
|
-
* extended theme that leaves inherited aliases uncovered must name a base
|
|
141
|
-
* here — the build fails otherwise, listing the uncovered set; with a
|
|
142
|
-
* base, uncovered aliases resolve through the declared chain and the
|
|
143
|
-
* build reports ONE aggregated inherited-alias count per mode.
|
|
144
|
-
*
|
|
145
|
-
* The base value is a plain `string` (not `keyof Config`) on purpose: the
|
|
146
|
-
* base is typically a mode declared by the EXTENDED source, which this
|
|
147
|
-
* call's local config type cannot see. Runtime validation covers both
|
|
148
|
-
* sides against the merged mode set.
|
|
149
|
-
*/
|
|
150
50
|
basedOn?: Partial<Record<keyof Config & string, string>>;
|
|
151
51
|
}
|
|
152
|
-
/** Pipeline-ready JSON strings returned by `.serialize()` on a built theme. */
|
|
153
52
|
export interface SerializedTheme {
|
|
154
|
-
/** Flattened token map as JSON: { "space.8": "0.5rem", "breakpoints.sm": "768" } */
|
|
155
53
|
scalesJson: string;
|
|
156
|
-
/** Token path → CSS variable name as JSON: { "colors.primary": "--colors-primary" } */
|
|
157
54
|
variableMapJson: string;
|
|
158
|
-
/** Pre-built CSS string with :root and [data-color-mode] blocks */
|
|
159
55
|
variableCss: string;
|
|
160
|
-
/** Contextual vars registry as JSON: { "colors": ["background-current"] } */
|
|
161
56
|
contextualVarsJson: string;
|
|
162
57
|
}
|
|
163
|
-
/**
|
|
164
|
-
* One authored `{scale.key}` reference occurrence inside a token value
|
|
165
|
-
* (manifest v2, D6). Captured BEFORE `resolveReferences` rewrites the value —
|
|
166
|
-
* the authored graph is unrecoverable from resolved CSS (D8).
|
|
167
|
-
*/
|
|
168
58
|
export interface TokenReference {
|
|
169
|
-
/** The referenced dot-path exactly as authored, e.g. 'colors.blue.500'. */
|
|
170
59
|
path: string;
|
|
171
|
-
/**
|
|
172
|
-
* The authored opacity-modifier text when written `{path/NN}` (e.g. '50').
|
|
173
|
-
* Kept as the authored string — parsing to a number is an emission-time
|
|
174
|
-
* concern, not a capture-time one.
|
|
175
|
-
*/
|
|
176
60
|
opacity?: string;
|
|
177
61
|
}
|
|
178
|
-
/**
|
|
179
|
-
* The AUTHORED form of one token value (manifest v2, D6):
|
|
180
|
-
* - `literal` — the value contains no `{scale.key}` refs.
|
|
181
|
-
* - `reference` — the value embeds one or more refs; `value` preserves the
|
|
182
|
-
* authored string byte-exactly and `references` lists each ref target in
|
|
183
|
-
* authored order.
|
|
184
|
-
* Flat shapes only (D11) — no recursive or conditional re-derivation.
|
|
185
|
-
*/
|
|
186
62
|
export type TokenDefinition = {
|
|
187
63
|
kind: 'literal';
|
|
188
64
|
value: string;
|
|
@@ -191,64 +67,31 @@ export type TokenDefinition = {
|
|
|
191
67
|
value: string;
|
|
192
68
|
references: TokenReference[];
|
|
193
69
|
};
|
|
194
|
-
/**
|
|
195
|
-
* Pre-resolution mode alias definitions (manifest v2, D6): mode name → alias
|
|
196
|
-
* dot-path → the AUTHORED color dot-path (the `colorRef` string, e.g.
|
|
197
|
-
* 'gray.300' — never its resolved raw value).
|
|
198
|
-
*/
|
|
199
70
|
export type ModeAliasDefinition = Record<string, Record<string, string>>;
|
|
200
|
-
/**
|
|
201
|
-
* One CSS fragment recorded by `build()` (manifest v2, D6) — the EXACT string
|
|
202
|
-
* it composed. In this manifest version the fragments RECORD the composed
|
|
203
|
-
* strings; `variableCss` is still composed independently (the
|
|
204
|
-
* fragment→variableCss projection becomes load-bearing with the CSS wire
|
|
205
|
-
* plan).
|
|
206
|
-
*/
|
|
207
71
|
export interface ThemeCssFragment {
|
|
208
|
-
/** Stable fragment identifier (currently mirrors `kind`). */
|
|
209
72
|
id: string;
|
|
210
|
-
/** Semantic section: `@property` registrations vs the base variable CSS. */
|
|
211
73
|
kind: 'registrations' | 'base';
|
|
212
|
-
/** The exact composed CSS string — byte-identical to what build() joined. */
|
|
213
74
|
cssText: string;
|
|
214
75
|
}
|
|
215
|
-
/** Structured manifest emitted by ThemeBuilder.build() for plugin consumption. */
|
|
216
76
|
export interface ThemeManifest {
|
|
217
|
-
/** Flat token key → raw value (e.g. 'space.8' → '0.5rem', 'colors.ember' → '#FF2800') */
|
|
218
77
|
tokenMap: Record<string, string>;
|
|
219
|
-
/** Flat token key → CSS variable name without var() wrapper (e.g. 'colors.ember' → '--color-ember') */
|
|
220
78
|
variableMap: Record<string, string>;
|
|
221
79
|
/**
|
|
222
|
-
* Mode name → flat key →
|
|
223
|
-
*
|
|
224
|
-
* through the reference resolver (a reference-valued color contributes its
|
|
225
|
-
* resolved value, never a raw `{…}` string), and both mode keys and inner
|
|
226
|
-
* keys are in sorted order (G3).
|
|
80
|
+
* Mode name → flat key → resolved value; a reference contributes its resolved
|
|
81
|
+
* value, never a raw `{…}` string. Mode keys and inner keys are sorted.
|
|
227
82
|
*/
|
|
228
83
|
modes: Record<string, Record<string, string>>;
|
|
229
|
-
/** Pre-built CSS string with :root and [data-color-mode] blocks */
|
|
230
84
|
variableCss: string;
|
|
231
|
-
/** Contextual vars registry: scale_name → [var_name] for --current-{name} side-effects */
|
|
232
85
|
contextualVars?: Record<string, string[]>;
|
|
233
|
-
/** OS preference → mode mapping, when the theme opted into system emission */
|
|
234
86
|
systemPreference?: SystemPreferenceConfig;
|
|
235
|
-
/** Mode → CSS `color-scheme` classification, when the theme opted in */
|
|
236
87
|
browserColorScheme?: BrowserColorSchemeConfig;
|
|
237
|
-
/** Version discriminant. ABSENT ⇒ v1 manifest (variant creation rejects). */
|
|
238
88
|
manifestVersion?: 2;
|
|
239
|
-
/** Authored literal-vs-reference structure per flattened token path. */
|
|
240
89
|
tokenDefinitions?: Record<string, TokenDefinition>;
|
|
241
|
-
/** Exact scale names configured for CSS-variable emission, including empty scales. */
|
|
242
90
|
emittedScales?: string[];
|
|
243
|
-
/** Mode name → alias dot-path → AUTHORED color dot-path (pre-resolution). */
|
|
244
91
|
modeAliasDefinitions?: ModeAliasDefinition;
|
|
245
|
-
/** `@property` registrations by contextual var name, in declaration order. */
|
|
246
92
|
registrations?: Record<string, ContextualVarRegistration>;
|
|
247
|
-
/** Version of the emitter that composed this manifest's CSS. */
|
|
248
93
|
emitterVersion?: number;
|
|
249
|
-
/** sha256 hex over sorted-key canonical JSON of the authored inputs. */
|
|
250
94
|
contractHash?: string;
|
|
251
|
-
/** The exact CSS strings build() composed, in emission order. */
|
|
252
95
|
cssFragments?: ThemeCssFragment[];
|
|
253
96
|
}
|
|
254
97
|
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/types/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,SAAS;CAAG;AAE7B,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAC7B;AAED
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/types/theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,YAAY,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,WAAW,SAAS;CAAG;AAE7B,MAAM,WAAW,aAAc,SAAQ,SAAS;IAC9C,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CAC7B;AAED,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb,OAAO,GACP,MAAM,GACN,kBAAkB,GAClB,oBAAoB,GACpB,WAAW,GACX,WAAW,GACX,UAAU,GACV,WAAW,GACX,QAAQ,CAAC;AAEb,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,IAAI,C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Merge.d.ts","sourceRoot":"","sources":["../../src/utils/deepMerge.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS,CACvB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC7B,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAU7B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@animus-ui/system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "Animus design system builder — tokens, prop groups, global styles",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -76,11 +76,11 @@
|
|
|
76
76
|
"compile": "tsc --noEmit"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@animus-ui/properties": "0.1.
|
|
80
|
-
"csstype": "^3.
|
|
79
|
+
"@animus-ui/properties": "0.1.13",
|
|
80
|
+
"csstype": "^3.2.3"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
|
-
"react": "^
|
|
83
|
+
"react": "^19.2.8"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"react": "^18.0.0 || ^19.0.0"
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//#region src/runtime/assert-root-slot.ts
|
|
2
|
-
/**
|
|
3
|
-
* The Root-slot precondition shared by every composition entry point — the two
|
|
4
|
-
* source forms (`compose`, `composeWithContext`) and the two extracted forms
|
|
5
|
-
* the transform emitter writes in their place (`createComposedFamily`,
|
|
6
|
-
* `createComposedFamilyWithContext`).
|
|
7
|
-
*
|
|
8
|
-
* A family without a Root slot has no cascade source: the composed variant
|
|
9
|
-
* rules emitted for its children inherit nothing, and the context transport
|
|
10
|
-
* renders them against the empty default — the silent-drop failure mode this
|
|
11
|
-
* runtime guards against. Source form and extracted form must agree on the
|
|
12
|
-
* contract, so the check and its message live here once.
|
|
13
|
-
*
|
|
14
|
-
* React-free by design: the extracted forms import it from the same module the
|
|
15
|
-
* source forms do, with no cycle through the component runtime.
|
|
16
|
-
*/
|
|
17
|
-
function assertRootSlot(slots, fnName) {
|
|
18
|
-
if (!Object.prototype.propertyIsEnumerable.call(slots, "Root")) throw new Error(`${fnName}(): No "Root" slot found. The root slot key must be exactly "Root" (PascalCase).`);
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { assertRootSlot as t };
|