﻿---
title: index
description: Defined in: styles/registry.ts:22 Registered style modules for one distillery. Throws on duplicate module names or colliding readable class/var names...
url: https://docs-v3-preview.elastic.dev/distillate/reference/api/index-1
---

# index
## Classes


### StyleRegistry

Defined in: [styles/registry.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L22)
Registered style modules for one distillery. Throws on duplicate module names or colliding readable class/var names.

#### Constructors


##### Constructor

```ts
new StyleRegistry(
   prefix, 
   reservedVarOwners?, 
   sharedVarPaths?
): StyleRegistry;
```

Defined in: [styles/registry.ts:26](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L26)

###### Parameters


| Parameter           | Type                              |
|---------------------|-----------------------------------|
| `prefix`            | `string`                          |
| `reservedVarOwners` | `ReadonlyMap`<`string`, `string`> |
| `sharedVarPaths`    | `ReadonlySet`<`string`>           |


###### Returns

[`StyleRegistry`](#styleregistry)

#### Accessors


##### classKeys


###### Get Signature

```ts
get classKeys(): readonly string[];
```

Defined in: [styles/registry.ts:98](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L98)
Handle keys across all modules. Compact-name domain for a full stylesheet.

###### Returns

readonly `string`[]

##### cssVarKeys


###### Get Signature

```ts
get cssVarKeys(): readonly string[];
```

Defined in: [styles/registry.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L105)
Theme and contextual-var keys across all modules.

###### Returns

readonly `string`[]

##### modules


###### Get Signature

```ts
get modules(): readonly StylesModule<StylesObject>[];
```

Defined in: [styles/registry.ts:86](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L86)
Registered modules, sorted by name.

###### Returns

readonly [`StylesModule`](#stylesmodule)<[`StylesObject`](#stylesobject)>[]

#### Methods


##### freeze()

```ts
freeze(options?): StyleRegistrySnapshot;
```

Defined in: [styles/registry.ts:119](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L119)
Frozen class and CSS-var keys for a [StyleNameResolver](#stylenameresolver).

###### Parameters


| Parameter             | Type                                                                                                     | Description                                                        |
|-----------------------|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|
| `options`             | { `classKeys?`: `Iterable`<`string`, `any`, `any`>; `cssVarKeys?`: `Iterable`<`string`, `any`, `any`>; } | Overrides the registry-wide key sets when compact-naming a subset. |
| `options.classKeys?`  | `Iterable`<`string`, `any`, `any`>                                                                       | Compact class-name domain override.                                |
| `options.cssVarKeys?` | `Iterable`<`string`, `any`, `any`>                                                                       | Compact CSS-var domain override.                                   |


###### Returns

[`StyleRegistrySnapshot`](#styleregistrysnapshot)

##### module()

```ts
module(name): 
  | StylesModule<StylesObject>
  | undefined;
```

Defined in: [styles/registry.ts:93](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L93)
Looks up a module by the name passed to `createStyleModule`.

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `name`    | `string` |


###### Returns

| [`StylesModule`](#stylesmodule)<[`StylesObject`](#stylesobject)>
| `undefined`

##### registerModule()

```ts
registerModule(module): void;
```

Defined in: [styles/registry.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L37)
Adds `module` to this registry.

###### Parameters


| Parameter | Type                            |
|-----------|---------------------------------|
| `module`  | [`StylesModule`](#stylesmodule) |


###### Returns

`void`

###### Throws

If another module already uses this name, or if a readable class or CSS-variable name collides (including `themeVars` and `sharedVars`).

##### targetsHandle()

```ts
targetsHandle(key): boolean;
```

Defined in: [styles/registry.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L61)
True when some rule, or some inner rule of an `@media` / `@container` block, reads `key` in its selector.
A nested `&` rule records its owning handle through `recordRuleDeps`, so a handle with an empty self block but real nested rules is targeted. A rule-less nested block targets nothing.

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `key`     | `string` |


###### Returns

`boolean`
---


### StylesCollector

Defined in: [collector.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L101)
Reachable entries for one render or one stylesheet.

#### Constructors


##### Constructor

```ts
new StylesCollector(__namedParameters): StylesCollector;
```

Defined in: [collector.ts:120](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L120)

###### Parameters


| Parameter           | Type                                                |
|---------------------|-----------------------------------------------------|
| `__namedParameters` | [`StylesCollectorOptions`](#stylescollectoroptions) |


###### Returns

[`StylesCollector`](#stylescollector)

#### Properties


| Property   | Modifier   | Type                              | Description                            | Defined in                                                                                                                    |
|------------|------------|-----------------------------------|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `names`    | `readonly` | [`StyleNameMode`](#stylenamemode) | The naming mode (compact vs readable). | [collector.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L105) |
| `prefix`   | `readonly` | `string`                          | Emitted class name prefix.             | [collector.ts:109](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L109) |
| `registry` | `readonly` | [`StyleRegistry`](#styleregistry) | Associated registry.                   | [collector.ts:107](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L107) |
| `target`   | `readonly` | [`StyleTarget`](#styletarget)     | The target collection mode.            | [collector.ts:103](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L103) |


#### Accessors


##### collectedEntries


###### Get Signature

```ts
get collectedEntries(): readonly StyleEntry[];
```

Defined in: [collector.ts:351](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L351)
Collected style entries sorted for emission (base rules before all `@media`/`@container` blocks).

###### Returns

readonly [`StyleEntry`](#styleentry)[]

##### collectedThemeDeps


###### Get Signature

```ts
get collectedThemeDeps(): ReadonlySet<string>;
```

Defined in: [collector.ts:356](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L356)
Theme token paths that survive reachability; emitted in the theme scope block.

###### Returns

`ReadonlySet`<`string`>

##### collectedVarDeps


###### Get Signature

```ts
get collectedVarDeps(): ReadonlySet<`vars/${string}`>;
```

Defined in: [collector.ts:361](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L361)
Contextual var paths that survive reachability; used by the runtime for compact-name substitution.

###### Returns

`ReadonlySet`<``vars/${string}``>

#### Methods


##### createResolver()

```ts
createResolver(): StyleNameResolver;
```

Defined in: [collector.ts:333](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L333)
Creates a [StyleNameResolver](#stylenameresolver) scoped to this collector's current dep set.

###### Returns

[`StyleNameResolver`](#stylenameresolver)

##### reachableDefaults()

```ts
reachableDefaults(handle, groupPath): ReadonlySet<string>;
```

Defined in: [collector.ts:376](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L376)
Returns the variable keys within `groupPath` that are reachable from `handle` or from any collected rule targeting it.

###### Parameters


| Parameter   | Type                          | Description                                                      |
|-------------|-------------------------------|------------------------------------------------------------------|
| `handle`    | [`StyleHandle`](#stylehandle) | Handle whose declaration refs and dependent rules are consulted. |
| `groupPath` | ``vars/${string}``            | Group prefix path (e.g. `vars/chip/look`).                       |


###### Returns

`ReadonlySet`<`string`>

##### subscribe()

```ts
subscribe(listener): () => void;
```

Defined in: [collector.ts:275](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L275)
Calls `listener` after a public mutation adds an entry, handle, theme var, or contextual var.
Fires at most once per outermost call; nested calls such as `use([a, b])` batch into it.

###### Parameters


| Parameter  | Type         | Description                                          |
|------------|--------------|------------------------------------------------------|
| `listener` | () => `void` | Called with no arguments after the collection grows. |


###### Returns

Unsubscribes `listener`.
() => `void`

##### use()

```ts
use(value): void;
```

Defined in: [collector.ts:143](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L143)
Collects a module's non-variant entries, or one explicit entry.
Variant entries stay off this path; collect them via `useHandles`.

###### Parameters


| Parameter | Type                                                                                                                                      | Description                                                               |
|-----------|-------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------|
| `value`   | | [`StyleEntry`](#styleentry) | readonly [`StyleEntry`](#styleentry)[] | [`StylesModule`](#stylesmodule)<[`StylesObject`](#stylesobject)> | Module (all non-variant entries), a single entry, or an array of entries. |


###### Returns

`void`

##### useAllEntries()

```ts
useAllEntries(module): void;
```

Defined in: [collector.ts:196](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L196)
Collects every entry on `module`, including variants. Used by the stylesheet target.

###### Parameters


| Parameter | Type                            | Description                                   |
|-----------|---------------------------------|-----------------------------------------------|
| `module`  | [`StylesModule`](#stylesmodule) | Module whose entries should all be collected. |


###### Returns

`void`

##### useHandles()

```ts
useHandles(handles): readonly StyleHandle[];
```

Defined in: [collector.ts:222](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L222)
Collects handles and auto-includes rules whose selector deps are all present.
Media blocks gain inner rules whose deps are met and keep rules already collected.

###### Parameters


| Parameter | Type                                     | Description                                                              |
|-----------|------------------------------------------|--------------------------------------------------------------------------|
| `handles` | readonly [`StyleHandle`](#stylehandle)[] | Handles resolved during this render pass (e.g. from `resolveClassName`). |


###### Returns

readonly [`StyleHandle`](#stylehandle)[]
Handles that were retained. Empty untargeted handles are omitted in compact mode.

##### useRulesWhenDepsMet()

```ts
useRulesWhenDepsMet(module): void;
```

Defined in: [collector.ts:251](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L251)
Collects `auto` rules on `module` whose every selector dependency is already collected.

###### Parameters


| Parameter | Type                            |
|-----------|---------------------------------|
| `module`  | [`StylesModule`](#stylesmodule) |


###### Returns

`void`

##### useThemeVar()

```ts
useThemeVar(path): void;
```

Defined in: [collector.ts:328](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L328)
Marks a theme token path as reachable so it appears in the emitted theme block, even if no collected declaration reads it.

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `path`    | `string` |


###### Returns

`void`

## Interfaces


### ContextualCssVar

Defined in: [tokens/contextual_var.ts:25](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L25)
Represents a contextual CSS variable. Stringifies to `var(--...)`.

#### Properties


| Property | Modifier   | Type                                              | Description                                          | Defined in                                                                                                                                          |
|----------|------------|---------------------------------------------------|------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `__kind` | `readonly` | `"contextual-var"`                                | Brand for [isContextualCssVar](#iscontextualcssvar). | [tokens/contextual_var.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L27) |
| `name`   | `readonly` | [`ContextualCssVarName`](#contextualcssvarname-1) | Wrapper yielding just the custom property name.      | [tokens/contextual_var.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L31) |
| `path`   | `readonly` | ``vars/${string}``                                | Group/key path for this variable.                    | [tokens/contextual_var.ts:29](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L29) |
| `ref`    | `readonly` | ``var(--${string})``                              | Usable CSS `var(...)` reference string.              | [tokens/contextual_var.ts:33](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L33) |


#### Methods


##### [toPrimitive]()

```ts
toPrimitive: string;
```

Defined in: [tokens/contextual_var.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L37)
Template interpolation; same as [ContextualCssVar.toString](#tostring).

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `hint`    | `string` |


###### Returns

`string`

##### toString()

```ts
toString(): string;
```

Defined in: [tokens/contextual_var.ts:35](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L35)
Stringifies to [ContextualCssVar.ref](#ref).

###### Returns

`string`
---


### ContextualCssVarName

Defined in: [tokens/contextual_var.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L11)
Represents a contextual CSS variable name. Stringifies to its custom property name.

#### Properties


| Property | Modifier   | Type                    | Description                                                  | Defined in                                                                                                                                          |
|----------|------------|-------------------------|--------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `__kind` | `readonly` | `"contextual-var-name"` | Brand for [isContextualCssVarName](#iscontextualcssvarname). | [tokens/contextual_var.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L13) |
| `name`   | `readonly` | ``--${string}``         | Actual emitted CSS custom property name.                     | [tokens/contextual_var.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L17) |
| `path`   | `readonly` | ``vars/${string}``      | Group/key path for this variable.                            | [tokens/contextual_var.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L15) |


#### Methods


##### [toPrimitive]()

```ts
toPrimitive: string;
```

Defined in: [tokens/contextual_var.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L21)
Template interpolation; same as [ContextualCssVarName.toString](#tostring-1).

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `hint`    | `string` |


###### Returns

`string`

##### toString()

```ts
toString(): string;
```

Defined in: [tokens/contextual_var.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L19)
Stringifies to [ContextualCssVarName.name](#name-1).

###### Returns

`string`
---


### CreateDomSinkOptions

Defined in: [dom_sink.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L21)
Host document and optional flush scheduler for a `<style>` sink.

#### Properties


| Property    | Type                                  | Description                                                                             | Defined in                                                                                                                |
|-------------|---------------------------------------|-----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| `document`  | [`DocumentLike`](#documentlike)       | Document that creates the style element.                                                | [dom_sink.ts:23](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L23) |
| `parent?`   | [`StyleParentLike`](#styleparentlike) | Node that receives the style element, e.g. a `ShadowRoot`. Defaults to `document.head`. | [dom_sink.ts:25](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L25) |
| `schedule?` | (`flush`) => `void`                   | Defers the flush. Defaults to `queueMicrotask`.                                         | [dom_sink.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L27) |

---


### CssToken

Defined in: [tokens/theme_token.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L11)
Represents a CSS theme token. Stringifies to `var(--...)`.

#### Properties


| Property | Modifier   | Type                 | Description                                           | Defined in                                                                                                                                    |
|----------|------------|----------------------|-------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `__kind` | `readonly` | `"theme-token"`      | Brand for [isCssToken](#iscsstoken).                  | [tokens/theme_token.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L13) |
| `cssVar` | `readonly` | ``--${string}``      | Actual emitted CSS custom property name.              | [tokens/theme_token.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L17) |
| `path`   | `readonly` | `string`             | Path string mapping to this token in the environment. | [tokens/theme_token.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L15) |
| `ref`    | `readonly` | ``var(--${string})`` | Usable CSS `var(...)` reference string.               | [tokens/theme_token.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L19) |


#### Methods


##### [toPrimitive]()

```ts
toPrimitive: string;
```

Defined in: [tokens/theme_token.ts:23](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L23)
Template interpolation; same as [CssToken.toString](#tostring-2).

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `hint`    | `string` |


###### Returns

`string`

##### toString()

```ts
toString(): string;
```

Defined in: [tokens/theme_token.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L21)
Stringifies to [CssToken.ref](#ref-1).

###### Returns

`string`
---


### Declarations

Defined in: [styles/types.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L97)
Authored CSS plus the deps the collector uses for reachability.

#### Properties


| Property | Modifier   | Type                                                   | Description                                         | Defined in                                                                                                                          |
|----------|------------|--------------------------------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `css`    | `readonly` | readonly [`DeclarationSegment`](#declarationsegment)[] | Interleaved literal CSS and local variable markers. | [styles/types.ts:99](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L99)   |
| `deps`   | `readonly` | [`StyleDeps`](#styledeps)                              | Reachability tracking dependencies.                 | [styles/types.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L101) |

---


### DefaultGroupDeps

Defined in: [styles/types.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L59)
One `t.vars(...)` group's default-emission metadata.

#### Properties


| Property    | Modifier   | Type                                           | Description                            | Defined in                                                                                                                        |
|-------------|------------|------------------------------------------------|----------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| `groupPath` | `readonly` | ``vars/${string}``                             | Target variable namespace group.       | [styles/types.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L61) |
| `keys`      | `readonly` | readonly [`DefaultKeyDeps`](#defaultkeydeps)[] | Defaults registered within this group. | [styles/types.ts:63](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L63) |

---


### DefaultKeyDeps

Defined in: [styles/types.ts:67](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L67)
One key inside a [DefaultGroupDeps](#defaultgroupdeps) group.

#### Properties


| Property          | Modifier   | Type                              | Description                                                                    | Defined in                                                                                                                        |
|-------------------|------------|-----------------------------------|--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| `key`             | `readonly` | `string`                          | The specific variable key within the group.                                    | [styles/types.ts:69](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L69) |
| `path`            | `readonly` | ``vars/${string}``                | Full CSS variable path (e.g. `vars/group/key`).                                | [styles/types.ts:71](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L71) |
| `valueDeps`       | `readonly` | `object`                          | Theme/var paths referenced by the default value. Kept if the key is reachable. | [styles/types.ts:73](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L73) |
| `valueDeps.theme` | `readonly` | `ReadonlySet`<`string`>           | Theme-token paths the default value interpolates.                              | [styles/types.ts:75](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L75) |
| `valueDeps.vars`  | `readonly` | `ReadonlySet`<``vars/${string}``> | Contextual-var paths the default value interpolates.                           | [styles/types.ts:77](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L77) |

---


### Distillery

Defined in: [engine.ts:69](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L69)
One component library's binding: environment, registry, and pre-bound operations. Destructure-safe (no `this`).

#### Type Parameters


| Type Parameter                               | Default type              |
|----------------------------------------------|---------------------------|
| `TTokens`                                    | `unknown`                 |
| `TTheme` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |


#### Properties


| Property              | Modifier   | Type                                                                                                              | Description                                                                                                                                     | Defined in                                                                                                              |
|-----------------------|------------|-------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| `artifactCollector`   | `readonly` | (`names`, `options?`) => [`StylesCollector`](#stylescollector)                                                    | Collector for one render. Class-name resolution collects as a side effect. No-op warnings require `dev: true`; pass `{ warn }` to capture them. | [engine.ts:99](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L99)   |
| `createNameResolver`  | `readonly` | (`options`) => [`StyleNameResolver`](#stylenameresolver)                                                          | Creates a standalone name resolver using this distillery's prefix.                                                                              | [engine.ts:117](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L117) |
| `createStyleModule`   | `readonly` | <`TStyles`>(`name`, `factory`) => [`StylesModule`](#stylesmodule)<[`ResolvedStyles`](#resolvedstyles)<`TStyles`>> | Named handle tree plus tokens.                                                                                                                  | [engine.ts:89](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L89)   |
| `dev`                 | `readonly` | `boolean`                                                                                                         | When `true`, collectors warn about no-op handles.                                                                                               | [engine.ts:87](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L87)   |
| `environment`         | `readonly` | [`DistilleryEnvironment`](#distilleryenvironment-1)<`TTokens`>                                                    | Resolved environment (tokens, prefix, derived theme vars).                                                                                      | [engine.ts:74](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L74)   |
| `liveCollection`      | `readonly` | (`options?`) => [`LiveCollection`](#livecollection-1)                                                             | Readable collection for one live render; keeps `sink` current as handles resolve.                                                               | [engine.ts:109](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L109) |
| `primitiveStyles`     | `readonly` | <`TStyles`>(`name`, `factory`) => [`StylesModule`](#stylesmodule)<[`ResolvedStyles`](#resolvedstyles)<`TStyles`>> | Named handles plus tokens only.                                                                                                                 | [engine.ts:94](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L94)   |
| `registry`            | `readonly` | [`StyleRegistry`](#styleregistry)                                                                                 | The module registry accumulating collected handles and rules.                                                                                   | [engine.ts:85](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L85)   |
| `renderStyles`        | `readonly` | (`collector`, `resolver?`, `options?`) => `string`                                                                | Emits collected CSS for this environment.                                                                                                       | [engine.ts:111](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L111) |
| `resolveValues`       | `readonly` | (`scheme`, `variation?`) => [`ValuesOf`](#valuesof)<`TTheme`>                                                     | Nested literal values for one scheme. Optional `variation` is a name from `variations`.                                                         | [engine.ts:80](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L80)   |
| `stylesheetCollector` | `readonly` | (`names?`, `options?`) => [`StylesCollector`](#stylescollector)                                                   | Collector preloaded with every registered module. No-op warnings require `dev: true`; pass `{ warn }` to capture them.                          | [engine.ts:104](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L104) |
| `themeVars`           | `readonly` | `Readonly`<`Record`<`string`, [`ThemeVarDefinition`](#themevardefinition)>>                                       | Derived theme-var registry, same object as `environment.themeVars`.                                                                             | [engine.ts:78](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L78)   |
| `tokens`              | `readonly` | `TTokens`                                                                                                         | Derived token tree, same object as `environment.tokens`.                                                                                        | [engine.ts:76](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L76)   |

---


### DistilleryEnvironment

Defined in: [environment.ts:43](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L43)
Resolved environment: derived `themeVars` / `tokens` plus the bind-time prefix and scope.

#### Type Parameters


| Type Parameter | Default type |
|----------------|--------------|
| `TTokens`      | `unknown`    |


#### Properties


| Property      | Modifier   | Type                                                                                | Description                                                                                       | Defined in                                                                                                                      |
|---------------|------------|-------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `prefix`      | `readonly` | `string`                                                                            | Brand identifier used in readable class and CSS-variable names. Must be a CSS identifier segment. | [environment.ts:45](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L45) |
| `sharedVars?` | `readonly` | `ReadonlySet`<``vars/${string}``>                                                   | Cross-module contextual-var paths. Module-local `vars(...)` groups are not listed here.           | [environment.ts:51](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L51) |
| `themeScope`  | `readonly` | `string`                                                                            | Selector wrapping emitted theme-var declarations.                                                 | [environment.ts:47](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L47) |
| `themeVars`   | `readonly` | `Readonly`<`Record`<`string`, [`ThemeVarDefinition`](#themevardefinition)>>         | Theme token path → definition. Emission sorts paths.                                              | [environment.ts:49](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L49) |
| `tokens`      | `readonly` | `TTokens`                                                                           | Typed token tree, surfaced as `tokens` on the authoring API.                                      | [environment.ts:53](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L53) |
| `variations?` | `readonly` | `Readonly`<`Record`<`string`, [`ResolvedThemeVariation`](#resolvedthemevariation)>> | Named variations resolved against `themeVars`. Absent when no `variations` were declared.         | [environment.ts:55](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L55) |

---


### DistilleryOptions

Defined in: [environment.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L27)
Authoring input to `createDistillery`.

#### Type Parameters


| Type Parameter                               | Default type              |
|----------------------------------------------|---------------------------|
| `TTheme` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |


#### Properties


| Property      | Modifier   | Type                                                                          | Description                                                                                                                   | Defined in                                                                                                                      |
|---------------|------------|-------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `dev?`        | `readonly` | `boolean`                                                                     | When `true`, collectors warn about no-op handles. Default `false`. Does not affect the single-copy guard.                     | [environment.ts:39](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L39) |
| `prefix`      | `readonly` | `string`                                                                      | Brand identifier used in readable class and CSS-variable names. Must be a CSS identifier segment.                             | [environment.ts:29](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L29) |
| `sharedVars?` | `readonly` | readonly ``vars/${string}``[]                                                 | Cross-module contextual-var paths. Names are `cssVarName(prefix, path)`. Module-local `vars(...)` groups are not listed here. | [environment.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L37) |
| `theme`       | `readonly` | `TTheme`                                                                      | Nested value tree. Strings and `lightDark` leaves become theme vars; `ScaleToken` leaves inline.                              | [environment.ts:33](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L33) |
| `themeScope`  | `readonly` | `string`                                                                      | Selector wrapping emitted theme-var declarations.                                                                             | [environment.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L31) |
| `variations?` | `readonly` | `Readonly`<`Record`<`string`, [`ThemeVariation`](#themevariation)<`TTheme`>>> | Named partial variations of `theme`. Declaring a variation does not emit it; name it at `renderStyles`.                       | [environment.ts:35](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L35) |

---


### DocumentLike

Defined in: [dom_sink.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L13)
Minimal interface for a DOM `Document` able to create and append style tags.

#### Properties


| Property | Modifier   | Type                                  | Description                                   | Defined in                                                                                                                |
|----------|------------|---------------------------------------|-----------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|
| `head`   | `readonly` | [`StyleParentLike`](#styleparentlike) | Default parent for the created style element. | [dom_sink.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L17) |


#### Methods


##### createElement()

```ts
createElement(tagName): StyleElementLike;
```

Defined in: [dom_sink.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L15)
Creates a `<style>` element.

###### Parameters


| Parameter | Type      |
|-----------|-----------|
| `tagName` | `"style"` |


###### Returns

[`StyleElementLike`](#styleelementlike)
---


### LiveCollection

Defined in: [engine.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L59)
Readable collection filled by one live render.
Readable only: compact names depend on the complete collected set and need two passes.

#### Properties


| Property           | Modifier   | Type                                  | Description                                                                                                                | Defined in                                                                                                            |
|--------------------|------------|---------------------------------------|----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `collector`        | `readonly` | [`StylesCollector`](#stylescollector) | Underlying readable artifact collector. Mutations here (e.g. `use(globalModule)`, `useThemeVar`) also invalidate the sink. | [engine.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L61) |
| `css`              | `readonly` | () => `string`                        | Renders the CSS collected so far.                                                                                          | [engine.ts:65](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L65) |
| `resolveClassName` | `readonly` | (...`handles`) => `string`            | Collects `handles` and returns their readable class names, space-separated.                                                | [engine.ts:63](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L63) |

---


### LiveCollectionOptions

Defined in: [engine.ts:45](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L45)
Sink, render options, and warning sink for [Distillery.liveCollection](#livecollection).

#### Properties


| Property  | Type                                          | Description                                                                            | Defined in                                                                                                            |
|-----------|-----------------------------------------------|----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `render?` | [`RenderStylesOptions`](#renderstylesoptions) | Options forwarded to `renderStyles` by `css()`.                                        | [engine.ts:49](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L49) |
| `sink?`   | [`StyleSink`](#stylesink)                     | Invalidated whenever the collection grows. Nothing is written before the first handle. | [engine.ts:47](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L47) |
| `warn?`   | (`message`) => `void`                         | Warning sink for no-op handles. Used only when the distillery has `dev: true`.         | [engine.ts:51](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L51) |

---


### LocalVarDefaultMarker

Defined in: [local_vars.ts:53](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L53)
Interpolation marker representing `${group}` defaults.

#### Properties


| Property    | Modifier   | Type                         | Description                                       | Defined in                                                                                                                    |
|-------------|------------|------------------------------|---------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `__kind`    | `readonly` | `"local-var-default-marker"` | Brand distinguishing a `${group}` default marker. | [local_vars.ts:55](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L55) |
| `defaults`  | `readonly` | readonly `object`[]          | Ordered list of variable defaults.                | [local_vars.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L61) |
| `groupId`   | `readonly` | `string`                     | Unique ID for the group.                          | [local_vars.ts:57](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L57) |
| `groupPath` | `readonly` | ``vars/${string}``           | Group prefix path.                                | [local_vars.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L59) |

---


### LocalVarOverrideMarker

Defined in: [local_vars.ts:34](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L34)
Interpolation marker representing `.set(...)` overrides.

#### Properties


| Property    | Modifier   | Type                          | Description                                         | Defined in                                                                                                                    |
|-------------|------------|-------------------------------|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `__kind`    | `readonly` | `"local-var-override-marker"` | Brand distinguishing a `.set(...)` override marker. | [local_vars.ts:36](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L36) |
| `groupId`   | `readonly` | `string`                      | Unique ID for the group.                            | [local_vars.ts:38](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L38) |
| `overrides` | `readonly` | readonly `object`[]           | Ordered list of variable overrides.                 | [local_vars.ts:40](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L40) |

---


### LocalVarRef

Defined in: [local_vars.ts:18](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L18)
Reference to a local CSS variable. Stringifies to `var(--...)`.

#### Properties


| Property   | Modifier   | Type                 | Description                                                     | Defined in                                                                                                                    |
|------------|------------|----------------------|-----------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
| `__kind`   | `readonly` | `"local-var-ref"`    | Brand distinguishing a local-var ref from other interpolations. | [local_vars.ts:20](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L20) |
| `path`     | `readonly` | ``vars/${string}``   | Canonical group/key path.                                       | [local_vars.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L22) |
| `propName` | `readonly` | ``--${string}``      | Actual emitted CSS custom property name.                        | [local_vars.ts:24](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L24) |
| `ref`      | `readonly` | ``var(--${string})`` | Usable CSS `var(...)` reference string.                         | [local_vars.ts:26](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L26) |


#### Methods


##### [toPrimitive]()

```ts
toPrimitive: string;
```

Defined in: [local_vars.ts:30](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L30)
Template interpolation; same as [LocalVarRef.toString](#tostring-3).

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `hint`    | `string` |


###### Returns

`string`

##### toString()

```ts
toString(): string;
```

Defined in: [local_vars.ts:28](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L28)
Stringifies to [LocalVarRef.ref](#ref-2).

###### Returns

`string`
---


### MediaThemeVariation

Defined in: [theme.ts:89](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L89)
Media-conditioned variation. `media` is intrinsic; it is not a selector.

#### Type Parameters


| Type Parameter                          | Default type              |
|-----------------------------------------|---------------------------|
| `T` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |


#### Properties


| Property    | Modifier   | Type                                         | Description                                          | Defined in                                                                                                          |
|-------------|------------|----------------------------------------------|------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| `media`     | `readonly` | `string`                                     | Media query wrapping this variation's emitted diffs. | [theme.ts:91](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L91) |
| `variation` | `readonly` | [`DeepPartialTheme`](#deeppartialtheme)<`T`> | Partial variation of the base theme.                 | [theme.ts:93](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L93) |

---


### PrimitiveStyleAuthoringApi

Defined in: [styles/types.ts:278](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L278)
Narrow `t` for `primitiveStyles`: handles and tokens only.

#### Type Parameters


| Type Parameter | Default type |
|----------------|--------------|
| `TTokens`      | `unknown`    |


#### Properties


| Property | Type                                             | Description                                                       | Defined in                                                                                                                          |
|----------|--------------------------------------------------|-------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `style`  | (`strings`, ...`values`) => `PendingStyleHandle` | Creates named style handles using the same template tag as `css`. | [styles/types.ts:280](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L280) |
| `tokens` | `TTokens`                                        | Environment token tree.                                           | [styles/types.ts:282](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L282) |

---


### RenderStylesOptions

Defined in: [runtime.ts:67](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L67)
Per-render variation selection, scheme flatten, alternate blocks, and value overrides.

#### Properties


| Property               | Type                                           | Description                                                                                                                                                                        | Defined in                                                                                                              |
|------------------------|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| `alternates?`          | readonly [`ThemeAlternate`](#themealternate)[] | Extra blocks for runtime switching. Each entry emits only the variation's diff.                                                                                                    | [runtime.ts:77](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L77) |
| `flatten?`             | `string`                                       | Flatten this declared variation into `themeScope`. Default is the base. A media variation does not replace the primary block; it wraps its diffs in `@media`.                      | [runtime.ts:69](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L69) |
| `scheme?`              | `"light"` | `"dark"`                           | Emit one scheme's literal instead of `light-dark(...)`. For a target with no color scheme to resolve the function against — an image or PDF backend, email HTML, an older browser. | [runtime.ts:75](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L75) |
| `themeValueOverrides?` | `Partial`<`Record`<`string`, `string`>>        | Override a theme token's emitted value.                                                                                                                                            | [runtime.ts:79](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L79) |

---


### ResolvedThemeVariation

Defined in: [theme.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L101)
One named variation resolved against the base at construction.

#### Properties


| Property    | Modifier   | Type                                                                        | Description                                         | Defined in                                                                                                            |
|-------------|------------|-----------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------|
| `diffs`     | `readonly` | `Readonly`<`Record`<`string`, [`ThemeVarDefinition`](#themevardefinition)>> | Paths whose serialized value differs from the base. | [theme.ts:109](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L109) |
| `media?`    | `readonly` | `string`                                                                    | Intrinsic media query, when declared.               | [theme.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L105) |
| `name`      | `readonly` | `string`                                                                    | Name passed in `variations`.                        | [theme.ts:103](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L103) |
| `themeVars` | `readonly` | `Readonly`<`Record`<`string`, [`ThemeVarDefinition`](#themevardefinition)>> | Base theme vars with this variation applied.        | [theme.ts:107](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L107) |

---


### RuleOptions

Defined in: [styles/types.ts:148](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L148)
Options for [rule](#rule).

#### Properties


| Property | Type      | Description                                                                      | Defined in                                                                                                                          |
|----------|-----------|----------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `auto?`  | `boolean` | When `false`, the collector must `use` this rule explicitly. Defaults to `true`. | [styles/types.ts:150](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L150) |

---


### ScaleToken

Defined in: [tokens/scale_token.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L11)
Represents a CSS scale size token. Stringifies to its literal value.

#### Properties


| Property | Modifier   | Type            | Description                                   | Defined in                                                                                                                                    |
|----------|------------|-----------------|-----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
| `__kind` | `readonly` | `"scale-token"` | Brand for [isScaleToken](#isscaletoken).      | [tokens/scale_token.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L13) |
| `cq`     | `readonly` | `string`        | Container-query-relative variant of `value`.  | [tokens/scale_token.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L17) |
| `value`  | `readonly` | `string`        | Literal CSS value, inlined into declarations. | [tokens/scale_token.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L15) |


#### Methods


##### [toPrimitive]()

```ts
toPrimitive: string;
```

Defined in: [tokens/scale_token.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L21)
Template interpolation; same as [ScaleToken.toString](#tostring-4).

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `hint`    | `string` |


###### Returns

`string`

##### toString()

```ts
toString(): string;
```

Defined in: [tokens/scale_token.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L19)
Stringifies to [ScaleToken.value](#value).

###### Returns

`string`
---


### SchemePair

Defined in: [tokens/light_dark.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L11)
Scheme-varying color pair. Compiles to `light-dark(light, dark)`.

#### Properties


| Property | Modifier   | Type            | Description                                        | Defined in                                                                                                                                  |
|----------|------------|-----------------|----------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------|
| `__kind` | `readonly` | `"scheme-pair"` | Brand for isSchemePair.                            | [tokens/light_dark.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L13) |
| `dark`   | `readonly` | `string`        | Dark color-scheme value. Must be a CSS `<color>`.  | [tokens/light_dark.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L17) |
| `light`  | `readonly` | `string`        | Light color-scheme value. Must be a CSS `<color>`. | [tokens/light_dark.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L15) |

---


### StyleAuthoringApi

Defined in: [styles/types.ts:219](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L219)
Authoring API passed to `createStyleModule` factories.

#### Type Parameters


| Type Parameter | Default type |
|----------------|--------------|
| `TTokens`      | `unknown`    |


#### Properties


| Property | Type                                                                       | Description                                                                                        | Defined in                                                                                                                          |
|----------|----------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `css`    | (`strings`, ...`values`) => `PendingStyleHandle`                           | Creates a handle template where nested `&` and `@media` flatten into sibling rules.                | [styles/types.ts:221](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L221) |
| `decls`  | (`strings`, ...`values`) => [`Declarations`](#declarations)                | Creates a declaration block template for direct CSS properties.                                    | [styles/types.ts:226](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L226) |
| `tokens` | `TTokens`                                                                  | Environment token tree.                                                                            | [styles/types.ts:236](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L236) |
| `vars`   | <`TKey`>(`group`, `defaults`) => [`LocalVarGroup`](#localvargroup)<`TKey`> | Module-local CSS variable group. Interpolate `${group}`, `${group.key}`, or `${group.set({...})}`. | [styles/types.ts:231](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L231) |

---


### StyleDeps

Defined in: [styles/types.ts:47](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L47)
Reachability sets captured while authoring a declaration block.

#### Properties


| Property   | Modifier   | Type                                               | Description                                                                        | Defined in                                                                                                                        |
|------------|------------|----------------------------------------------------|------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------|
| `defaults` | `readonly` | readonly [`DefaultGroupDeps`](#defaultgroupdeps)[] | `t.vars(...)` default-emission sites, resolved after collection.                   | [styles/types.ts:55](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L55) |
| `refs`     | `readonly` | `ReadonlySet`<``vars/${string}``>                  | Read-side `var(...)` paths. Drives default-emission reachability.                  | [styles/types.ts:53](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L53) |
| `theme`    | `readonly` | `ReadonlySet`<`string`>                            | Theme-token paths interpolated into this block.                                    | [styles/types.ts:49](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L49) |
| `vars`     | `readonly` | `ReadonlySet`<``vars/${string}``>                  | Unconditional writes and reads. Default-marker keys land here only when reachable. | [styles/types.ts:51](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L51) |

---


### StyleElementLike

Defined in: [sink.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L15)
Minimal interface for a DOM `<style>` element.

#### Properties


| Property      | Type              | Description                                                | Defined in                                                                                                        |
|---------------|-------------------|------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| `textContent` | `string` | `null` | Current stylesheet text, or `null` before the first flush. | [sink.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L17) |

---


### StyleHandle

Defined in: [styles/types.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L105)
A named class: readable name, declarations, and collection identity.

#### Extended by

- [`EmotionCss`](/distillate/reference/api/emotion#emotioncss-1)


#### Properties


| Property       | Modifier   | Type                            | Description                                                                          | Defined in                                                                                                                          |
|----------------|------------|---------------------------------|--------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `declarations` | `readonly` | [`Declarations`](#declarations) | CSS properties for this handle.                                                      | [styles/types.ts:117](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L117) |
| `key`          | `readonly` | `string`                        | Full path joined by dots.                                                            | [styles/types.ts:113](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L113) |
| `kind`         | `readonly` | `"handle"`                      | Discriminant for [StyleEntry](#styleentry).                                          | [styles/types.ts:107](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L107) |
| `localName`    | `readonly` | `string`                        | Leaf key if at root, or composed path for nested handles.                            | [styles/types.ts:111](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L111) |
| `moduleName`   | `readonly` | `string`                        | The registered module name this handle belongs to.                                   | [styles/types.ts:109](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L109) |
| `readableName` | `readonly` | `string`                        | Predictable name used for output CSS classes.                                        | [styles/types.ts:115](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L115) |
| `variant`      | `readonly` | `boolean`                       | `true` when produced inside `variants(...)`. Skipped by [StylesCollector.use](#use). | [styles/types.ts:119](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L119) |


#### Methods


##### resolveClassName()

```ts
resolveClassName(context): string;
```

Defined in: [styles/types.ts:121](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L121)
Produces the final class name via the provided resolver context.

###### Parameters


| Parameter                  | Type                                                | Description                                         |
|----------------------------|-----------------------------------------------------|-----------------------------------------------------|
| `context`                  | { `resolveClassName`: (...`handles`) => `string`; } | -                                                   |
| `context.resolveClassName` | (...`handles`) => `string`                          | Joins one or more handles into a class-name string. |


###### Returns

`string`
---


### StyleMedia

Defined in: [styles/types.ts:154](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L154)
`@media` or `@container` block wrapping inner [StyleRule](#stylerule)s.

#### Properties


| Property     | Modifier   | Type                                 | Description                                                                                                                      | Defined in                                                                                                                          |
|--------------|------------|--------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `atRule?`    | `readonly` | `"media"` | `"container"`            | At-rule this entry emits. `kind` stays `'media'` so collector rank and deps apply uniformly; see finding `media-block-ordering`. | [styles/types.ts:160](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L160) |
| `key`        | `readonly` | `string`                             | Stable identity for deduplication across multiple renders.                                                                       | [styles/types.ts:162](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L162) |
| `kind`       | `readonly` | `"media"`                            | Discriminant for [StyleEntry](#styleentry).                                                                                      | [styles/types.ts:156](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L156) |
| `moduleName` | `readonly` | `string`                             | The registered module name this media block belongs to.                                                                          | [styles/types.ts:164](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L164) |
| `query`      | `readonly` | `string`                             | The conditional query (e.g. `(min-width: 600px)`).                                                                               | [styles/types.ts:166](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L166) |
| `rules`      | `readonly` | readonly [`StyleRule`](#stylerule)[] | Inner rules collected inside this block.                                                                                         | [styles/types.ts:168](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L168) |
| `variant`    | `readonly` | `boolean`                            | `true` when produced inside `variants(...)`.                                                                                     | [styles/types.ts:170](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L170) |

---


### StyleNameResolver

Defined in: [names.ts:14](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L14)
Context for resolving keys into final class or custom-property names.

#### Properties


| Property | Modifier   | Type                              | Description                            | Defined in                                                                                                          |
|----------|------------|-----------------------------------|----------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| `names`  | `readonly` | [`StyleNameMode`](#stylenamemode) | The naming mode used by this resolver. | [names.ts:16](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L16) |


#### Methods


##### className()

```ts
className(key, readableName?): string;
```

Defined in: [names.ts:18](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L18)
Resolves a handle key into a CSS class name.

###### Parameters


| Parameter       | Type     |
|-----------------|----------|
| `key`           | `string` |
| `readableName?` | `string` |


###### Returns

`string`

##### cssVar()

```ts
cssVar(key): `--${string}`;
```

Defined in: [names.ts:20](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L20)
Resolves a variable key into a custom property name.

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `key`     | `string` |


###### Returns

``--${string}``

##### cssVarRef()

```ts
cssVarRef(key): `var(--${string})`;
```

Defined in: [names.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L22)
Resolves a variable key into a `var(...)` reference.

###### Parameters


| Parameter | Type     |
|-----------|----------|
| `key`     | `string` |


###### Returns

``var(--${string})``
---


### StyleNameResolverOptions

Defined in: [names.ts:26](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L26)
Inputs for [createStyleNameResolver](#createstylenameresolver).

#### Properties


| Property      | Type                               | Description                                                                            | Defined in                                                                                                          |
|---------------|------------------------------------|----------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|
| `classKeys?`  | `Iterable`<`string`, `any`, `any`> | Keys defining the compact class-name domain.                                           | [names.ts:32](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L32) |
| `cssVarKeys?` | `Iterable`<`string`, `any`, `any`> | Keys defining the compact custom-property domain.                                      | [names.ts:34](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L34) |
| `names`       | [`StyleNameMode`](#stylenamemode)  | Naming strategy (`compact` or `readable`).                                             | [names.ts:28](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L28) |
| `prefix`      | `string`                           | Brand prefix for readable names (`<prefix>-<key>` / `--<prefix>-<key>`), e.g. `'aui'`. | [names.ts:30](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L30) |

---


### StyleParentLike

Defined in: [sink.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L21)
Node that receives a managed `<style>` element, e.g. `document.head` or a `ShadowRoot`.

#### Methods


##### appendChild()

```ts
appendChild(node): void;
```

Defined in: [sink.ts:24](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L24)
Appends the managed style element.

###### Parameters


| Parameter | Type                                    |
|-----------|-----------------------------------------|
| `node`    | [`StyleElementLike`](#styleelementlike) |


###### Returns

`void`
---


### StyleRegistrySnapshot

Defined in: [styles/types.ts:198](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L198)
Class and CSS-var key snapshot used to build a [StyleNameResolver](#stylenameresolver).

#### Properties


| Property     | Modifier   | Type                | Description                                             | Defined in                                                                                                                          |
|--------------|------------|---------------------|---------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `classKeys`  | `readonly` | readonly `string`[] | Collected readable class names from registered modules. | [styles/types.ts:200](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L200) |
| `cssVarKeys` | `readonly` | readonly `string`[] | Collected custom property (CSS variable) keys.          | [styles/types.ts:202](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L202) |

---


### StyleRule

Defined in: [styles/types.ts:128](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L128)
A selector plus declarations, optionally auto-collected from handle deps.

#### Properties


| Property       | Modifier   | Type                            | Description                                                             | Defined in                                                                                                                          |
|----------------|------------|---------------------------------|-------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `auto`         | `readonly` | `boolean`                       | When `false`, skip auto-collection; the caller must `use` the rule.     | [styles/types.ts:144](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L144) |
| `declarations` | `readonly` | [`Declarations`](#declarations) | CSS properties for this rule.                                           | [styles/types.ts:138](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L138) |
| `dependsOn`    | `readonly` | `ReadonlySet`<`string`>         | Handle keys this selector reads. Empty until `assignEntries` fills it.  | [styles/types.ts:142](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L142) |
| `key`          | `readonly` | `string`                        | Unique key for this rule within the module.                             | [styles/types.ts:134](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L134) |
| `kind`         | `readonly` | `"rule"`                        | Discriminant for [StyleEntry](#styleentry).                             | [styles/types.ts:130](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L130) |
| `moduleName`   | `readonly` | `string`                        | The registered module name this rule belongs to.                        | [styles/types.ts:132](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L132) |
| `selector`     | `readonly` | (`h`) => `string`               | Selector string factory receiving a resolver for `&` and other handles. | [styles/types.ts:136](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L136) |
| `variant`      | `readonly` | `boolean`                       | `true` when produced inside `variants(...)`.                            | [styles/types.ts:140](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L140) |

---


### StylesCollectorOptions

Defined in: [collector.ts:85](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L85)
Target, naming mode, registry, and prefix for one [StylesCollector](#stylescollector).

#### Properties


| Property   | Type                              | Description                                                                                         | Defined in                                                                                                                  |
|------------|-----------------------------------|-----------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
| `dev?`     | `boolean`                         | When `true`, emit no-op-handle warnings through `warn`. Inherited from `createDistillery({ dev })`. | [collector.ts:95](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L95) |
| `names`    | [`StyleNameMode`](#stylenamemode) | Desired name mode (`compact` or `readable`).                                                        | [collector.ts:89](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L89) |
| `prefix`   | `string`                          | Brand prefix forwarded to the name resolver.                                                        | [collector.ts:93](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L93) |
| `registry` | [`StyleRegistry`](#styleregistry) | Registry modules were authored against; used for auto-collection and compact-name snapshots.        | [collector.ts:91](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L91) |
| `target`   | [`StyleTarget`](#styletarget)     | Target context (e.g. `artifact` or `stylesheet`).                                                   | [collector.ts:87](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L87) |
| `warn?`    | (`message`) => `void`             | Warning sink for no-op handles. Used only when `dev` is `true`. Defaults to `console.warn`.         | [collector.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L97) |

---


### StyleSink

Defined in: [sink.ts:9](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L9)
Receives stylesheet invalidation from a live collection or Emotion compat modules.

#### Methods


##### invalidate()

```ts
invalidate(render): void;
```

Defined in: [sink.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L11)
Marks the sink dirty. `render` produces the current stylesheet when it flushes.

###### Parameters


| Parameter | Type           |
|-----------|----------------|
| `render`  | () => `string` |


###### Returns

`void`
---


### StylesModule

Defined in: [styles/types.ts:180](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L180)
Named handle tree plus flat entries after `createStyleModule`.

#### Type Parameters


| Type Parameter | Default type                    |
|----------------|---------------------------------|
| `TStyles`      | [`StylesObject`](#stylesobject) |


#### Properties


| Property     | Modifier   | Type                                     | Description                                                                | Defined in                                                                                                                          |
|--------------|------------|------------------------------------------|----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|
| `entries`    | `readonly` | readonly [`StyleEntry`](#styleentry)[]   | Flat list of style entries (handles, rules, media) defined in this module. | [styles/types.ts:186](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L186) |
| `handleList` | `readonly` | readonly [`StyleHandle`](#stylehandle)[] | Flat list of just the style handles defined in this module.                | [styles/types.ts:188](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L188) |
| `handles`    | `readonly` | `TStyles`                                | Authored tree of handles, rules, and media; variants nest as records.      | [styles/types.ts:184](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L184) |
| `name`       | `readonly` | `string`                                 | The unique registered name of the module.                                  | [styles/types.ts:182](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L182) |
| `themeDeps`  | `readonly` | `ReadonlySet`<`string`>                  | Aggregated theme dependencies across all entries.                          | [styles/types.ts:190](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L190) |
| `varDeps`    | `readonly` | `ReadonlySet`<``vars/${string}``>        | Aggregated variable dependencies across all entries.                       | [styles/types.ts:192](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L192) |

---


### ThemeAlternate

Defined in: [runtime.ts:83](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L83)
One runtime-switched variation. `selector` is required unless the variation declares `media`.

#### Properties


| Property    | Modifier   | Type     | Description                                          | Defined in                                                                                                              |
|-------------|------------|----------|------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|
| `selector?` | `readonly` | `string` | Consuming page selector, composed with `themeScope`. | [runtime.ts:87](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L87) |
| `variation` | `readonly` | `string` | Name passed in `DistilleryOptions.variations`.       | [runtime.ts:85](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L85) |

---


### ThemeVarDefinition

Defined in: [environment.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L15)
One theme CSS variable. Differing `light`/`dark` fold into `light-dark(...)`.

#### Properties


| Property | Modifier   | Type            | Description                                                                | Defined in                                                                                                                      |
|----------|------------|-----------------|----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------|
| `cssVar` | `readonly` | ``--${string}`` | Emitted CSS custom property name. Equal to `cssVarName(prefix, path)`.     | [environment.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L19) |
| `dark`   | `readonly` | `string`        | Value for dark color scheme. Equal to `light` for scheme-invariant tokens. | [environment.ts:23](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L23) |
| `light`  | `readonly` | `string`        | Value for light color scheme.                                              | [environment.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L21) |
| `path`   | `readonly` | `string`        | Theme-tree path this definition was derived from.                          | [environment.ts:17](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L17) |


## Type Aliases


### ContextualVarPath

```ts
type ContextualVarPath = `vars/${string}`;
```

Defined in: [styles/types.ts:32](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L32)
Canonical `vars/<group>/<key>` path for a contextual or module-local CSS variable.
---


### CssValue

```ts
type CssValue = 
  | string
  | number
  | CssToken
  | ContextualCssVar
  | ContextualCssVarName
  | ScaleToken
  | LocalVarRef;
```

Defined in: [styles/types.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L37)
Values accepted by `t.vars(...)` defaults and `.set(...)`.
---


### CssVarPath

```ts
type CssVarPath = string;
```

Defined in: [styles/types.ts:34](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L34)
Theme-token path or any other CSS-var key the resolver knows.
---


### DeclarationSegment

```ts
type DeclarationSegment = string | LocalVarMarker;
```

Defined in: [styles/types.ts:94](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L94)
Literal CSS text or a local-var interpolation marker.
---


### DeepPartialTheme

```ts
type DeepPartialTheme<T> = T extends ScaleToken ? ScaleToken : T extends SchemePair | string ? string | SchemePair : T extends object ? { readonly [K in keyof T]?: DeepPartialTheme<T[K]> } : never;
```

Defined in: [theme.ts:80](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L80)
Partial variation of a [ThemeTree](#themetree). Leaves may change kind between `string` and [SchemePair](#schemepair).

#### Type Parameters


| Type Parameter |
|----------------|
| `T`            |

---


### LocalVarGroup

```ts
type LocalVarGroup<TKey> = { readonly [P in TKey]: LocalVarRef } & object;
```

Defined in: [local_vars.ts:79](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L79)
Value returned by `t.vars(...)`. Interpolate `${group}`, `${group.key}`, or `${group.set({...})}`.

#### Type Declaration


##### set()

```ts
set(overrides): LocalVarOverrideMarker;
```

Builds a marker that writes the given keys at the interpolation site.

###### Parameters


| Parameter   | Type                                                 |
|-------------|------------------------------------------------------|
| `overrides` | `Partial`<`Record`<`TKey`, [`CssValue`](#cssvalue)>> |


###### Returns

[`LocalVarOverrideMarker`](#localvaroverridemarker)

#### Type Parameters


| Type Parameter            |
|---------------------------|
| `TKey` *extends* `string` |

---


### LocalVarMarker

```ts
type LocalVarMarker = 
  | LocalVarOverrideMarker
  | LocalVarDefaultMarker;
```

Defined in: [local_vars.ts:74](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L74)
Interpolation marker: `${group}` defaults or `${group.set(...)}` overrides.
---


### PathsOf

```ts
type PathsOf<T, Prefix> = T extends ScaleToken ? never : T extends SchemePair | string ? Prefix extends "" ? never : Prefix : T extends object ? { [K in keyof T & string]: PathsOf<T[K], Prefix extends "" ? K : `${Prefix}/${K}`> }[keyof T & string] : never;
```

Defined in: [theme.ts:55](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L55)
Slash-delimited theme-var paths (excludes [ScaleToken](#scaletoken) leaves).

#### Type Parameters


| Type Parameter              | Default type |
|-----------------------------|--------------|
| `T`                         | -            |
| `Prefix` *extends* `string` | `""`         |

---


### ResolvedStyles

```ts
type ResolvedStyles<TValue> = TValue extends PendingStyleHandle ? StyleHandle : TValue extends StyleRule ? StyleRule : TValue extends StyleMedia ? StyleMedia : TValue extends readonly infer TItem[] ? readonly ResolvedStyles<TItem>[] : TValue extends Record<string, unknown> ? { [TKey in keyof TValue]: ResolvedStyles<TValue[TKey]> } : TValue;
```

Defined in: [styles/types.ts:206](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L206)
Resolves nested pending handles, rules, and medias into their runtime types.

#### Type Parameters


| Type Parameter |
|----------------|
| `TValue`       |

---


### SchemeValueTree

```ts
type SchemeValueTree = object;
```

Defined in: [theme.ts:32](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L32)
Per-scheme value tree accepted by [zipSchemes](#zipschemes).

#### Index Signature

```ts
[key: string]: 
  | string
  | ScaleToken
  | SchemeValueTree
```

---


### StyleEntry

```ts
type StyleEntry = 
  | StyleHandle
  | StyleRule
  | StyleMedia;
```

Defined in: [styles/types.ts:174](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L174)
One registered handle, selector rule, or at-rule block.
---


### StyleNameMode

```ts
type StyleNameMode = "compact" | "readable";
```

Defined in: [names.ts:9](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L9)
Naming scheme: `compact` assigns sequential identifiers by sorted key index, `readable` emits descriptive ones.
---


### StyleSelectorResolver

```ts
type StyleSelectorResolver = (handle) => string & Record<string, string>;
```

Defined in: [styles/types.ts:176](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L176)
Selector factory: call with a handle, or read sibling local names as `.class` strings.
---


### StylesObject

```ts
type StylesObject = Record<string, unknown>;
```

Defined in: [styles/types.ts:196](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L196)
Authored module tree before [ResolvedStyles](#resolvedstyles) substitution.
---


### StyleTarget

```ts
type StyleTarget = "artifact" | "stylesheet";
```

Defined in: [names.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L11)
Destination format for the CSS collection.
---


### ThemeTree

```ts
type ThemeTree = object;
```

Defined in: [theme.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L27)
Nested authoring tree. Keys must match `/^[A-Za-z_][A-Za-z0-9_]*$/`.

#### Index Signature

```ts
[key: string]: ThemeLeaf | ThemeTree
```

---


### ThemeVariation

```ts
type ThemeVariation<T> = 
  | DeepPartialTheme<T>
| MediaThemeVariation<T>;
```

Defined in: [theme.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L97)
Named variation: a partial of the base, or a media-conditioned partial.

#### Type Parameters


| Type Parameter                          | Default type              |
|-----------------------------------------|---------------------------|
| `T` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |

---


### TokensOf

```ts
type TokensOf<T> = T extends ScaleToken ? ScaleToken : T extends SchemePair | string ? CssToken : T extends object ? { readonly [K in keyof T]: TokensOf<T[K]> } : never;
```

Defined in: [theme.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L37)
Token tree derived from an authoring [ThemeTree](#themetree).

#### Type Parameters


| Type Parameter |
|----------------|
| `T`            |

---


### ValuesOf

```ts
type ValuesOf<T> = T extends ScaleToken ? string : T extends SchemePair | string ? string : T extends object ? { readonly [K in keyof T]: ValuesOf<T[K]> } : never;
```

Defined in: [theme.ts:46](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L46)
Literal-value tree for one scheme. [ScaleToken](#scaletoken) leaves use `.value`.

#### Type Parameters


| Type Parameter |
|----------------|
| `T`            |

---


### Zipped

```ts
type Zipped<T> = T extends ScaleToken ? ScaleToken : T extends string ? string | SchemePair : T extends object ? { readonly [K in keyof T]: Zipped<T[K]> } : never;
```

Defined in: [theme.ts:71](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L71)
[zipSchemes](#zipschemes) output: equal strings collapse; differing strings become [SchemePair](#schemepair).

#### Type Parameters


| Type Parameter |
|----------------|
| `T`            |


## Variables


### cq

```ts
const cq: (value, cq) => ScaleToken = scaleToken;
```

Defined in: [tokens/scale_token.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L37)
Alias of [scaleToken](#scaletoken-1) for theme-tree authoring.
Literal size token. Stringifies to `value`; `cq` is the container-relative variant.

#### Parameters


| Parameter | Type     |
|-----------|----------|
| `value`   | `string` |
| `cq`      | `string` |


#### Returns

[`ScaleToken`](#scaletoken)

## Functions


### combineClassNames()

```ts
function combineClassNames(context, ...handles): string;
```

Defined in: [styles/authoring.ts:203](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L203)
Resolves handles through the collector's class-name resolver.

#### Parameters


| Parameter                  | Type                                                | Description                                                       |
|----------------------------|-----------------------------------------------------|-------------------------------------------------------------------|
| `context`                  | { `resolveClassName`: (...`handles`) => `string`; } | Object exposing `resolveClassName` (e.g. a React render context). |
| `context.resolveClassName` | (...`handles`) => `string`                          | -                                                                 |
| ...`handles`               | readonly [`StyleHandle`](#stylehandle)[]            | One or more handles to resolve and join.                          |


#### Returns

`string`
---


### container()

```ts
function container(query, rules): StyleMedia;
```

Defined in: [styles/authoring.ts:140](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L140)
`@container` block. `kind` stays `'media'` so emission rank matches [media](#media-2).

#### Parameters


| Parameter | Type                                 | Description                                         |
|-----------|--------------------------------------|-----------------------------------------------------|
| `query`   | `string`                             | Container query string (e.g. `(min-width: 400px)`). |
| `rules`   | readonly [`StyleRule`](#stylerule)[] | Inner rules scoped to this block.                   |


#### Returns

[`StyleMedia`](#stylemedia)
---


### contextualVar()

```ts
function contextualVar(path, prop): ContextualCssVar;
```

Defined in: [tokens/contextual_var.ts:41](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L41)
Shared contextual var. Stringifies to `var(<prop>)`; `.name` is the ident.

#### Parameters


| Parameter | Type               |
|-----------|--------------------|
| `path`    | ``vars/${string}`` |
| `prop`    | ``--${string}``    |


#### Returns

[`ContextualCssVar`](#contextualcssvar)
---


### createDistillery()

```ts
function createDistillery<TTheme>(options): Distillery<TokensOf<TTheme>, TTheme>;
```

Defined in: [engine.ts:128](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L128)
Binds the engine to one library's prefix and theme tree.

#### Type Parameters


| Type Parameter                               |
|----------------------------------------------|
| `TTheme` *extends* [`ThemeTree`](#themetree) |


#### Parameters


| Parameter | Type                                                | Description                                          |
|-----------|-----------------------------------------------------|------------------------------------------------------|
| `options` | [`DistilleryOptions`](#distilleryoptions)<`TTheme`> | Brand prefix, theme scope, and authoring theme tree. |


#### Returns

[`Distillery`](#distillery)<[`TokensOf`](#tokensof)<`TTheme`>, `TTheme`>

#### Throws

If `prefix` is not a CSS identifier segment, if a theme key contains a hyphen, if a `lightDark` value is not a CSS `<color>`, if a named variation disagrees with the base, or if `themeVars` / `sharedVars` claim the same readable custom-property name.
---


### createDomSink()

```ts
function createDomSink(__namedParameters): StyleSink;
```

Defined in: [dom_sink.ts:33](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L33)
One managed `<style>` element, rewritten on each flush.

#### Parameters


| Parameter           | Type                                            |
|---------------------|-------------------------------------------------|
| `__namedParameters` | [`CreateDomSinkOptions`](#createdomsinkoptions) |


#### Returns

[`StyleSink`](#stylesink)
---


### createStyleNameResolver()

```ts
function createStyleNameResolver(__namedParameters): StyleNameResolver;
```

Defined in: [names.ts:102](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L102)
Maps semantic keys to readable (`<prefix>-<key>`) or compact (`a`, `b`, …) names.

#### Parameters


| Parameter           | Type                                                    |
|---------------------|---------------------------------------------------------|
| `__namedParameters` | [`StyleNameResolverOptions`](#stylenameresolveroptions) |


#### Returns

[`StyleNameResolver`](#stylenameresolver)
---


### css()

```ts
function css(strings, ...values): PendingStyleHandle;
```

Defined in: [styles/authoring.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L37)
Handle template. Nested `&` / `@media` flatten into sibling rules.

#### Parameters


| Parameter   | Type                   |
|-------------|------------------------|
| `strings`   | `TemplateStringsArray` |
| ...`values` | readonly `unknown`[]   |


#### Returns

`PendingStyleHandle`
---


### cssVarName()

```ts
function cssVarName(prefix, path): `--${string}`;
```

Defined in: [names.ts:86](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L86)
Readable custom-property name: `--${prefix}-${path}` with `/` joined on `-` and a leading `vars/` stripped.

#### Parameters


| Parameter | Type     | Description                                                                |
|-----------|----------|----------------------------------------------------------------------------|
| `prefix`  | `string` | Brand prefix (e.g. `'eui'`).                                               |
| `path`    | `string` | Theme or contextual-var path (e.g. `'colors/ink'`, `'vars/chip/look/bg'`). |


#### Returns

``--${string}``
---


### decls()

```ts
function decls(strings, ...values): Declarations;
```

Defined in: [styles/authoring.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L31)
Declaration-block template. Interpolations stringify; local-var markers stay until render.

#### Parameters


| Parameter   | Type                   |
|-------------|------------------------|
| `strings`   | `TemplateStringsArray` |
| ...`values` | readonly `unknown`[]   |


#### Returns

[`Declarations`](#declarations)
---


### isContextualCssVar()

```ts
function isContextualCssVar(value): value is ContextualCssVar;
```

Defined in: [tokens/contextual_var.ts:66](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L66)
`true` when `value` is a [ContextualCssVar](#contextualcssvar).

#### Parameters


| Parameter | Type      | Description    |
|-----------|-----------|----------------|
| `value`   | `unknown` | Value to test. |


#### Returns

`value is ContextualCssVar`
---


### isContextualCssVarName()

```ts
function isContextualCssVarName(value): value is ContextualCssVarName;
```

Defined in: [tokens/contextual_var.ts:70](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L70)
`true` when `value` is a [ContextualCssVarName](#contextualcssvarname-1).

#### Parameters


| Parameter | Type      | Description    |
|-----------|-----------|----------------|
| `value`   | `unknown` | Value to test. |


#### Returns

`value is ContextualCssVarName`
---


### isCssToken()

```ts
function isCssToken(value): value is CssToken;
```

Defined in: [tokens/theme_token.ts:41](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L41)
`true` when `value` is a [CssToken](#csstoken).

#### Parameters


| Parameter | Type      | Description    |
|-----------|-----------|----------------|
| `value`   | `unknown` | Value to test. |


#### Returns

`value is CssToken`
---


### isScaleToken()

```ts
function isScaleToken(value): value is ScaleToken;
```

Defined in: [tokens/scale_token.ts:40](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L40)
`true` when `value` is a [ScaleToken](#scaletoken).

#### Parameters


| Parameter | Type      | Description    |
|-----------|-----------|----------------|
| `value`   | `unknown` | Value to test. |


#### Returns

`value is ScaleToken`
---


### lightDark()

```ts
function lightDark(light, dark): SchemePair;
```

Defined in: [tokens/light_dark.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L31)
Scheme-varying color pair. Both sides must be CSS `<color>` values.

#### Parameters


| Parameter | Type     | Description               |
|-----------|----------|---------------------------|
| `light`   | `string` | Light color-scheme value. |
| `dark`    | `string` | Dark color-scheme value.  |


#### Returns

[`SchemePair`](#schemepair)

#### Throws

If either value is not a CSS `<color>`.
---


### mapDomain()

```ts
function mapDomain<TKey, TValue>(domain, factory): Record<TKey, TValue>;
```

Defined in: [styles/authoring.ts:171](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L171)
Builds a record keyed by `domain`. No CSS-collection side effect.

#### Type Parameters


| Type Parameter            |
|---------------------------|
| `TKey` *extends* `string` |
| `TValue`                  |


#### Parameters


| Parameter | Type                  | Description                                       |
|-----------|-----------------------|---------------------------------------------------|
| `domain`  | readonly `TKey`[]     | All valid keys (e.g. `['primary', 'secondary']`). |
| `factory` | (`value`) => `TValue` | Called once per key.                              |


#### Returns

`Record`<`TKey`, `TValue`>
---


### media()

```ts
function media(query, rules): StyleMedia;
```

Defined in: [styles/authoring.ts:121](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L121)
`@media` block wrapping rules.

#### Parameters


| Parameter | Type                                 | Description                                     |
|-----------|--------------------------------------|-------------------------------------------------|
| `query`   | `string`                             | Media query string (e.g. `(min-width: 600px)`). |
| `rules`   | readonly [`StyleRule`](#stylerule)[] | Inner rules scoped to this block.               |


#### Returns

[`StyleMedia`](#stylemedia)
---


### renderStyles()

```ts
function renderStyles(
   environment, 
   collector, 
   resolver?, 
   options?
): string;
```

Defined in: [runtime.ts:39](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L39)
Emits collected CSS: theme block, then entries, minified.

#### Parameters


| Parameter     | Type                                                           | Description                                    |
|---------------|----------------------------------------------------------------|------------------------------------------------|
| `environment` | [`DistilleryEnvironment`](#distilleryenvironment-1)<`unknown`> | Theme vars, prefix, and scope for this render. |
| `collector`   | [`StylesCollector`](#stylescollector)                          | Reachable entries and deps.                    |
| `resolver`    | [`StyleNameResolver`](#stylenameresolver)                      | Defaults to `collector.createResolver()`.      |
| `options`     | [`RenderStylesOptions`](#renderstylesoptions)                  | -                                              |


#### Returns

`string`
---


### resolveThemeValues()

```ts
function resolveThemeValues<T>(
   theme, 
   themeVars, 
   scheme, 
   variation?
): ValuesOf<T>;
```

Defined in: [theme.ts:142](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L142)
Nested literal values for one scheme. Walks `theme` so [ScaleToken](#scaletoken) leaves resolve to `.value`.

#### Type Parameters


| Type Parameter                          |
|-----------------------------------------|
| `T` *extends* [`ThemeTree`](#themetree) |


#### Parameters


| Parameter    | Type                                                                        | Description                                                                                   |
|--------------|-----------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------|
| `theme`      | `T`                                                                         | Authoring tree that produced `themeVars`.                                                     |
| `themeVars`  | `Readonly`<`Record`<`string`, [`ThemeVarDefinition`](#themevardefinition)>> | Base registry from [Distillery.themeVars](#themevars).                                        |
| `scheme`     | `"light"` | `"dark"`                                                        | Which side of each [ThemeVarDefinition](#themevardefinition) to read.                         |
| `variation?` | [`ResolvedThemeVariation`](#resolvedthemevariation)                         | When set, overridden paths come from `variation.diffs`; everything else stays on `themeVars`. |


#### Returns

[`ValuesOf`](#valuesof)<`T`>
---


### rule()

```ts
function rule(
   selector, 
   declarations, 
   options?
): StyleRule;
```

Defined in: [styles/authoring.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L97)
Selector plus declarations. `dependsOn` is filled when the module is constructed.

#### Parameters


| Parameter      | Type                            | Description                                                                                       |
|----------------|---------------------------------|---------------------------------------------------------------------------------------------------|
| `selector`     | (`h`) => `string`               | Factory receiving a [StyleSelectorResolver](#styleselectorresolver); uses `&` and handle aliases. |
| `declarations` | [`Declarations`](#declarations) | CSS properties for this rule.                                                                     |
| `options`      | [`RuleOptions`](#ruleoptions)   | `auto` controls whether the rule self-collects when its handle dependencies are met.              |


#### Returns

[`StyleRule`](#stylerule)
---


### scaleToken()

```ts
function scaleToken(value, cq): ScaleToken;
```

Defined in: [tokens/scale_token.ts:25](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L25)
Literal size token. Stringifies to `value`; `cq` is the container-relative variant.

#### Parameters


| Parameter | Type     |
|-----------|----------|
| `value`   | `string` |
| `cq`      | `string` |


#### Returns

[`ScaleToken`](#scaletoken)
---


### themeToken()

```ts
function themeToken(path, cssVar): CssToken;
```

Defined in: [tokens/theme_token.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L27)
Theme token that stringifies to `var(<cssVar>)`.

#### Parameters


| Parameter | Type            |
|-----------|-----------------|
| `path`    | `string`        |
| `cssVar`  | ``--${string}`` |


#### Returns

[`CssToken`](#csstoken)
---


### variants()

```ts
function variants<TKey, TValue>(domain, factory): Record<TKey, TValue>;
```

Defined in: [styles/authoring.ts:186](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L186)
Builds a record of styles keyed by `domain`. Each value is marked `variant` so [StylesCollector.use](#use) skips it.

#### Type Parameters


| Type Parameter            |
|---------------------------|
| `TKey` *extends* `string` |
| `TValue`                  |


#### Parameters


| Parameter | Type                  | Description                                                                      |
|-----------|-----------------------|----------------------------------------------------------------------------------|
| `domain`  | readonly `TKey`[]     | All valid variant keys (e.g. `['primary', 'secondary']`).                        |
| `factory` | (`value`) => `TValue` | Called once per key; returns the handle or nested style object for that variant. |


#### Returns

`Record`<`TKey`, `TValue`>
---


### zipSchemes()

```ts
function zipSchemes<T>(light, dark): Zipped<T>;
```

Defined in: [theme.ts:119](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L119)
Folds two per-scheme trees into one authoring tree. Equal string leaves stay bare; differing strings become [lightDark](#lightdark). [ScaleToken](#scaletoken) leaves must agree.

#### Type Parameters


| Type Parameter                                      |
|-----------------------------------------------------|
| `T` *extends* [`SchemeValueTree`](#schemevaluetree) |


#### Parameters


| Parameter | Type | Description              |
|-----------|------|--------------------------|
| `light`   | `T`  | Light-scheme value tree. |
| `dark`    | `T`  | Dark-scheme value tree.  |


#### Returns

[`Zipped`](#zipped)<`T`>

#### Throws

If shapes, leaf kinds, or scale values disagree, or if a differing string pair is not a CSS `<color>`.