@elastic/distillate 0.0.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/LICENSE.txt +93 -0
  2. package/NOTICE.txt +30 -0
  3. package/README.md +142 -0
  4. package/THIRD_PARTY_LICENSES.md +768 -0
  5. package/dist/cjs/collector.js +491 -0
  6. package/dist/cjs/collector.js.map +1 -0
  7. package/dist/cjs/css_scan.js +186 -0
  8. package/dist/cjs/css_scan.js.map +1 -0
  9. package/dist/cjs/dom_sink.js +40 -0
  10. package/dist/cjs/dom_sink.js.map +1 -0
  11. package/dist/cjs/emotion.js +189 -0
  12. package/dist/cjs/emotion.js.map +1 -0
  13. package/dist/cjs/engine.js +95 -0
  14. package/dist/cjs/engine.js.map +1 -0
  15. package/dist/cjs/environment.js +9 -0
  16. package/dist/cjs/environment.js.map +1 -0
  17. package/dist/cjs/hash.js +86 -0
  18. package/dist/cjs/hash.js.map +1 -0
  19. package/dist/cjs/idents.js +23 -0
  20. package/dist/cjs/idents.js.map +1 -0
  21. package/dist/cjs/index.js +44 -0
  22. package/dist/cjs/index.js.map +1 -0
  23. package/dist/cjs/instance.js +34 -0
  24. package/dist/cjs/instance.js.map +1 -0
  25. package/dist/cjs/local_vars.js +100 -0
  26. package/dist/cjs/local_vars.js.map +1 -0
  27. package/dist/cjs/minify.js +77 -0
  28. package/dist/cjs/minify.js.map +1 -0
  29. package/dist/cjs/names.js +77 -0
  30. package/dist/cjs/names.js.map +1 -0
  31. package/dist/cjs/nesting.js +406 -0
  32. package/dist/cjs/nesting.js.map +1 -0
  33. package/dist/cjs/package.json +3 -0
  34. package/dist/cjs/runtime.js +257 -0
  35. package/dist/cjs/runtime.js.map +1 -0
  36. package/dist/cjs/sink.js +9 -0
  37. package/dist/cjs/sink.js.map +1 -0
  38. package/dist/cjs/styles/authoring.js +169 -0
  39. package/dist/cjs/styles/authoring.js.map +1 -0
  40. package/dist/cjs/styles/declarations.js +139 -0
  41. package/dist/cjs/styles/declarations.js.map +1 -0
  42. package/dist/cjs/styles/index.js +32 -0
  43. package/dist/cjs/styles/index.js.map +1 -0
  44. package/dist/cjs/styles/module.js +233 -0
  45. package/dist/cjs/styles/module.js.map +1 -0
  46. package/dist/cjs/styles/registry.js +187 -0
  47. package/dist/cjs/styles/registry.js.map +1 -0
  48. package/dist/cjs/styles/types.js +9 -0
  49. package/dist/cjs/styles/types.js.map +1 -0
  50. package/dist/cjs/testing.js +37 -0
  51. package/dist/cjs/testing.js.map +1 -0
  52. package/dist/cjs/theme.js +249 -0
  53. package/dist/cjs/theme.js.map +1 -0
  54. package/dist/cjs/tokens/contextual_var.js +39 -0
  55. package/dist/cjs/tokens/contextual_var.js.map +1 -0
  56. package/dist/cjs/tokens/index.js +24 -0
  57. package/dist/cjs/tokens/index.js.map +1 -0
  58. package/dist/cjs/tokens/kind.js +14 -0
  59. package/dist/cjs/tokens/kind.js.map +1 -0
  60. package/dist/cjs/tokens/light_dark.js +42 -0
  61. package/dist/cjs/tokens/light_dark.js.map +1 -0
  62. package/dist/cjs/tokens/scale_token.js +28 -0
  63. package/dist/cjs/tokens/scale_token.js.map +1 -0
  64. package/dist/cjs/tokens/theme_token.js +28 -0
  65. package/dist/cjs/tokens/theme_token.js.map +1 -0
  66. package/dist/cjs/var_invariant.js +115 -0
  67. package/dist/cjs/var_invariant.js.map +1 -0
  68. package/dist/collector.d.ts +101 -0
  69. package/dist/collector.d.ts.map +1 -0
  70. package/dist/collector.js +487 -0
  71. package/dist/collector.js.map +1 -0
  72. package/dist/css_scan.d.ts +57 -0
  73. package/dist/css_scan.d.ts.map +1 -0
  74. package/dist/css_scan.js +180 -0
  75. package/dist/css_scan.js.map +1 -0
  76. package/dist/dom_sink.d.ts +23 -0
  77. package/dist/dom_sink.d.ts.map +1 -0
  78. package/dist/dom_sink.js +36 -0
  79. package/dist/dom_sink.js.map +1 -0
  80. package/dist/emotion.d.ts +44 -0
  81. package/dist/emotion.d.ts.map +1 -0
  82. package/dist/emotion.js +184 -0
  83. package/dist/emotion.js.map +1 -0
  84. package/dist/engine.d.ts +66 -0
  85. package/dist/engine.d.ts.map +1 -0
  86. package/dist/engine.js +91 -0
  87. package/dist/engine.js.map +1 -0
  88. package/dist/environment.d.ts +43 -0
  89. package/dist/environment.d.ts.map +1 -0
  90. package/dist/environment.js +8 -0
  91. package/dist/environment.js.map +1 -0
  92. package/dist/hash.d.ts +2 -0
  93. package/dist/hash.d.ts.map +1 -0
  94. package/dist/hash.js +82 -0
  95. package/dist/hash.js.map +1 -0
  96. package/dist/idents.d.ts +9 -0
  97. package/dist/idents.d.ts.map +1 -0
  98. package/dist/idents.js +19 -0
  99. package/dist/idents.js.map +1 -0
  100. package/dist/index.d.ts +11 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +15 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/instance.d.ts +16 -0
  105. package/dist/instance.d.ts.map +1 -0
  106. package/dist/instance.js +30 -0
  107. package/dist/instance.js.map +1 -0
  108. package/dist/local_vars.d.ts +75 -0
  109. package/dist/local_vars.d.ts.map +1 -0
  110. package/dist/local_vars.js +92 -0
  111. package/dist/local_vars.js.map +1 -0
  112. package/dist/minify.d.ts +11 -0
  113. package/dist/minify.d.ts.map +1 -0
  114. package/dist/minify.js +73 -0
  115. package/dist/minify.js.map +1 -0
  116. package/dist/names.d.ts +39 -0
  117. package/dist/names.d.ts.map +1 -0
  118. package/dist/names.js +70 -0
  119. package/dist/names.js.map +1 -0
  120. package/dist/nesting.d.ts +59 -0
  121. package/dist/nesting.d.ts.map +1 -0
  122. package/dist/nesting.js +400 -0
  123. package/dist/nesting.js.map +1 -0
  124. package/dist/runtime.d.ts +36 -0
  125. package/dist/runtime.d.ts.map +1 -0
  126. package/dist/runtime.js +252 -0
  127. package/dist/runtime.js.map +1 -0
  128. package/dist/sink.d.ts +16 -0
  129. package/dist/sink.d.ts.map +1 -0
  130. package/dist/sink.js +8 -0
  131. package/dist/sink.js.map +1 -0
  132. package/dist/styles/authoring.d.ts +59 -0
  133. package/dist/styles/authoring.d.ts.map +1 -0
  134. package/dist/styles/authoring.js +155 -0
  135. package/dist/styles/authoring.js.map +1 -0
  136. package/dist/styles/declarations.d.ts +10 -0
  137. package/dist/styles/declarations.d.ts.map +1 -0
  138. package/dist/styles/declarations.js +132 -0
  139. package/dist/styles/declarations.js.map +1 -0
  140. package/dist/styles/index.d.ts +7 -0
  141. package/dist/styles/index.d.ts.map +1 -0
  142. package/dist/styles/index.js +12 -0
  143. package/dist/styles/index.js.map +1 -0
  144. package/dist/styles/module.d.ts +5 -0
  145. package/dist/styles/module.d.ts.map +1 -0
  146. package/dist/styles/module.js +229 -0
  147. package/dist/styles/module.js.map +1 -0
  148. package/dist/styles/registry.d.ts +48 -0
  149. package/dist/styles/registry.d.ts.map +1 -0
  150. package/dist/styles/registry.js +182 -0
  151. package/dist/styles/registry.js.map +1 -0
  152. package/dist/styles/types.d.ts +211 -0
  153. package/dist/styles/types.d.ts.map +1 -0
  154. package/dist/styles/types.js +8 -0
  155. package/dist/styles/types.js.map +1 -0
  156. package/dist/testing.d.ts +10 -0
  157. package/dist/testing.d.ts.map +1 -0
  158. package/dist/testing.js +31 -0
  159. package/dist/testing.js.map +1 -0
  160. package/dist/theme.d.ts +85 -0
  161. package/dist/theme.d.ts.map +1 -0
  162. package/dist/theme.js +240 -0
  163. package/dist/theme.js.map +1 -0
  164. package/dist/tokens/contextual_var.d.ts +35 -0
  165. package/dist/tokens/contextual_var.d.ts.map +1 -0
  166. package/dist/tokens/contextual_var.js +33 -0
  167. package/dist/tokens/contextual_var.js.map +1 -0
  168. package/dist/tokens/index.d.ts +5 -0
  169. package/dist/tokens/index.d.ts.map +1 -0
  170. package/dist/tokens/index.js +11 -0
  171. package/dist/tokens/index.js.map +1 -0
  172. package/dist/tokens/kind.d.ts +2 -0
  173. package/dist/tokens/kind.d.ts.map +1 -0
  174. package/dist/tokens/kind.js +10 -0
  175. package/dist/tokens/kind.js.map +1 -0
  176. package/dist/tokens/light_dark.d.ts +20 -0
  177. package/dist/tokens/light_dark.d.ts.map +1 -0
  178. package/dist/tokens/light_dark.js +37 -0
  179. package/dist/tokens/light_dark.js.map +1 -0
  180. package/dist/tokens/scale_token.d.ts +20 -0
  181. package/dist/tokens/scale_token.d.ts.map +1 -0
  182. package/dist/tokens/scale_token.js +23 -0
  183. package/dist/tokens/scale_token.js.map +1 -0
  184. package/dist/tokens/theme_token.d.ts +20 -0
  185. package/dist/tokens/theme_token.d.ts.map +1 -0
  186. package/dist/tokens/theme_token.js +23 -0
  187. package/dist/tokens/theme_token.js.map +1 -0
  188. package/dist/var_invariant.d.ts +25 -0
  189. package/dist/var_invariant.d.ts.map +1 -0
  190. package/dist/var_invariant.js +108 -0
  191. package/dist/var_invariant.js.map +1 -0
  192. package/docs/concepts/authoring.md +115 -0
  193. package/docs/concepts/collection.md +66 -0
  194. package/docs/concepts/distillery.md +47 -0
  195. package/docs/concepts/index.md +18 -0
  196. package/docs/concepts/naming-and-output.md +123 -0
  197. package/docs/concepts/ordering.md +61 -0
  198. package/docs/concepts/single-copy.md +103 -0
  199. package/docs/concepts/tokens.md +99 -0
  200. package/docs/docset.yml +53 -0
  201. package/docs/examples/01-stylesheet.ts +20 -0
  202. package/docs/examples/02-artifact.ts +26 -0
  203. package/docs/examples/03-variants.ts +40 -0
  204. package/docs/examples/04-emotion.ts +33 -0
  205. package/docs/examples/05-var-invariant.ts +31 -0
  206. package/docs/examples/06-payload.ts +85 -0
  207. package/docs/examples/fixture.ts +22 -0
  208. package/docs/getting-started/index.md +14 -0
  209. package/docs/getting-started/installation.md +30 -0
  210. package/docs/getting-started/quick-start.md +61 -0
  211. package/docs/getting-started/your-first-stylesheet.md +57 -0
  212. package/docs/guides/compact-artifacts.md +87 -0
  213. package/docs/guides/emotion-migration.md +60 -0
  214. package/docs/guides/index.md +17 -0
  215. package/docs/guides/name-collisions.md +37 -0
  216. package/docs/guides/non-css-surfaces.md +73 -0
  217. package/docs/guides/react-renderer.md +202 -0
  218. package/docs/guides/theming.md +107 -0
  219. package/docs/guides/var-invariant.md +24 -0
  220. package/docs/guides/vs-emotion.md +61 -0
  221. package/docs/index.md +73 -0
  222. package/docs/logo.svg +7 -0
  223. package/docs/playground/index.html +12 -0
  224. package/docs/playground/package.json +23 -0
  225. package/docs/playground/src/app/app.tsx +109 -0
  226. package/docs/playground/src/app/css_panel.tsx +119 -0
  227. package/docs/playground/src/app/editor_panel.tsx +87 -0
  228. package/docs/playground/src/app/index.ts +8 -0
  229. package/docs/playground/src/app/monaco_css_editor.tsx +84 -0
  230. package/docs/playground/src/app/monaco_source_editor.tsx +132 -0
  231. package/docs/playground/src/app/preview_panel.tsx +99 -0
  232. package/docs/playground/src/app/tokens_panel.tsx +117 -0
  233. package/docs/playground/src/app/types.ts +10 -0
  234. package/docs/playground/src/examples/snippets.test.ts +28 -0
  235. package/docs/playground/src/examples/snippets.ts +418 -0
  236. package/docs/playground/src/lib/compile.test.ts +157 -0
  237. package/docs/playground/src/lib/compile.ts +242 -0
  238. package/docs/playground/src/lib/demo_environment.test.ts +123 -0
  239. package/docs/playground/src/lib/demo_environment.ts +140 -0
  240. package/docs/playground/src/lib/editor_lib.test.ts +39 -0
  241. package/docs/playground/src/lib/editor_lib.ts +142 -0
  242. package/docs/playground/src/lib/format_css.test.ts +41 -0
  243. package/docs/playground/src/lib/format_css.ts +71 -0
  244. package/docs/playground/src/main.tsx +25 -0
  245. package/docs/playground/src/setup/chrome.test.ts +47 -0
  246. package/docs/playground/src/setup/chrome.ts +365 -0
  247. package/docs/playground/src/setup/monaco_env.ts +64 -0
  248. package/docs/playground/tsconfig.json +22 -0
  249. package/docs/playground/vite.config.ts +37 -0
  250. package/docs/playground/vitest.config.ts +35 -0
  251. package/docs/playground.md +28 -0
  252. package/docs/reference/api/emotion.md +290 -0
  253. package/docs/reference/api/index-1.md +2387 -0
  254. package/docs/reference/api/index.md +9 -0
  255. package/docs/reference/api/testing.md +92 -0
  256. package/docs/reference/api.md +12 -0
  257. package/docs/reference/entry-points.md +139 -0
  258. package/docs/reference/environment.md +60 -0
  259. package/docs/reference/index.md +11 -0
  260. package/docs/reference/okf-map.md +93 -0
  261. package/package.json +127 -4
  262. package/src/collector.ts +612 -0
  263. package/src/css_scan.ts +263 -0
  264. package/src/dom_sink.ts +64 -0
  265. package/src/emotion.ts +308 -0
  266. package/src/engine.ts +241 -0
  267. package/src/environment.ts +56 -0
  268. package/src/hash.ts +111 -0
  269. package/src/idents.ts +21 -0
  270. package/src/index.ts +106 -0
  271. package/src/instance.ts +49 -0
  272. package/src/local_vars.ts +220 -0
  273. package/src/minify.ts +87 -0
  274. package/src/names.ts +129 -0
  275. package/src/nesting.ts +596 -0
  276. package/src/runtime.ts +428 -0
  277. package/src/sink.ts +25 -0
  278. package/src/styles/authoring.ts +244 -0
  279. package/src/styles/declarations.ts +172 -0
  280. package/src/styles/index.ts +58 -0
  281. package/src/styles/module.ts +396 -0
  282. package/src/styles/registry.ts +261 -0
  283. package/src/styles/types.ts +283 -0
  284. package/src/testing.ts +48 -0
  285. package/src/theme.ts +454 -0
  286. package/src/tokens/contextual_var.ts +72 -0
  287. package/src/tokens/index.ts +17 -0
  288. package/src/tokens/kind.ts +13 -0
  289. package/src/tokens/light_dark.ts +58 -0
  290. package/src/tokens/scale_token.ts +41 -0
  291. package/src/tokens/theme_token.ts +42 -0
  292. package/src/var_invariant.ts +147 -0
@@ -0,0 +1,2387 @@
1
+ # index
2
+
3
+ ## Classes
4
+
5
+ ### StyleRegistry [#styleregistry]
6
+
7
+ Defined in: [styles/registry.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L22)
8
+
9
+ Registered style modules for one distillery. Throws on duplicate module names or colliding readable class/var names.
10
+
11
+ #### Constructors
12
+
13
+ ##### Constructor
14
+
15
+ ```ts
16
+ new StyleRegistry(
17
+ prefix,
18
+ reservedVarOwners?,
19
+ sharedVarPaths?
20
+ ): StyleRegistry;
21
+ ```
22
+
23
+ Defined in: [styles/registry.ts:26](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L26)
24
+
25
+ ###### Parameters
26
+
27
+ | Parameter | Type |
28
+ | ------ | ------ |
29
+ | `prefix` | `string` |
30
+ | `reservedVarOwners` | `ReadonlyMap`\<`string`, `string`\> |
31
+ | `sharedVarPaths` | `ReadonlySet`\<`string`\> |
32
+
33
+ ###### Returns
34
+
35
+ [`StyleRegistry`](#styleregistry)
36
+
37
+ #### Accessors
38
+
39
+ ##### classKeys [#classkeys]
40
+
41
+ ###### Get Signature
42
+
43
+ ```ts
44
+ get classKeys(): readonly string[];
45
+ ```
46
+
47
+ Defined in: [styles/registry.ts:98](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L98)
48
+
49
+ Handle keys across all modules. Compact-name domain for a full stylesheet.
50
+
51
+ ###### Returns
52
+
53
+ readonly `string`[]
54
+
55
+ ##### cssVarKeys [#cssvarkeys]
56
+
57
+ ###### Get Signature
58
+
59
+ ```ts
60
+ get cssVarKeys(): readonly string[];
61
+ ```
62
+
63
+ Defined in: [styles/registry.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L105)
64
+
65
+ Theme and contextual-var keys across all modules.
66
+
67
+ ###### Returns
68
+
69
+ readonly `string`[]
70
+
71
+ ##### modules [#modules]
72
+
73
+ ###### Get Signature
74
+
75
+ ```ts
76
+ get modules(): readonly StylesModule<StylesObject>[];
77
+ ```
78
+
79
+ Defined in: [styles/registry.ts:86](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L86)
80
+
81
+ Registered modules, sorted by name.
82
+
83
+ ###### Returns
84
+
85
+ readonly [`StylesModule`](#stylesmodule)\<[`StylesObject`](#stylesobject)\>[]
86
+
87
+ #### Methods
88
+
89
+ ##### freeze() [#freeze]
90
+
91
+ ```ts
92
+ freeze(options?): StyleRegistrySnapshot;
93
+ ```
94
+
95
+ Defined in: [styles/registry.ts:119](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L119)
96
+
97
+ Frozen class and CSS-var keys for a [StyleNameResolver](#stylenameresolver).
98
+
99
+ ###### Parameters
100
+
101
+ | Parameter | Type | Description |
102
+ | ------ | ------ | ------ |
103
+ | `options` | \{ `classKeys?`: `Iterable`\<`string`, `any`, `any`\>; `cssVarKeys?`: `Iterable`\<`string`, `any`, `any`\>; \} | Overrides the registry-wide key sets when compact-naming a subset. |
104
+ | `options.classKeys?` | `Iterable`\<`string`, `any`, `any`\> | Compact class-name domain override. |
105
+ | `options.cssVarKeys?` | `Iterable`\<`string`, `any`, `any`\> | Compact CSS-var domain override. |
106
+
107
+ ###### Returns
108
+
109
+ [`StyleRegistrySnapshot`](#styleregistrysnapshot)
110
+
111
+ ##### module() [#module]
112
+
113
+ ```ts
114
+ module(name):
115
+ | StylesModule<StylesObject>
116
+ | undefined;
117
+ ```
118
+
119
+ Defined in: [styles/registry.ts:93](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L93)
120
+
121
+ Looks up a module by the name passed to `createStyleModule`.
122
+
123
+ ###### Parameters
124
+
125
+ | Parameter | Type |
126
+ | ------ | ------ |
127
+ | `name` | `string` |
128
+
129
+ ###### Returns
130
+
131
+ \| [`StylesModule`](#stylesmodule)\<[`StylesObject`](#stylesobject)\>
132
+ \| `undefined`
133
+
134
+ ##### registerModule() [#registermodule]
135
+
136
+ ```ts
137
+ registerModule(module): void;
138
+ ```
139
+
140
+ Defined in: [styles/registry.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L37)
141
+
142
+ Adds `module` to this registry.
143
+
144
+ ###### Parameters
145
+
146
+ | Parameter | Type |
147
+ | ------ | ------ |
148
+ | `module` | [`StylesModule`](#stylesmodule) |
149
+
150
+ ###### Returns
151
+
152
+ `void`
153
+
154
+ ###### Throws
155
+
156
+ If another module already uses this name, or if a readable class or CSS-variable name collides (including `themeVars` and `sharedVars`).
157
+
158
+ ##### targetsHandle() [#targetshandle]
159
+
160
+ ```ts
161
+ targetsHandle(key): boolean;
162
+ ```
163
+
164
+ Defined in: [styles/registry.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/registry.ts#L61)
165
+
166
+ True when some rule, or some inner rule of an `@media` / `@container` block, reads `key` in its selector.
167
+
168
+ 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.
169
+
170
+ ###### Parameters
171
+
172
+ | Parameter | Type |
173
+ | ------ | ------ |
174
+ | `key` | `string` |
175
+
176
+ ###### Returns
177
+
178
+ `boolean`
179
+
180
+ ***
181
+
182
+ ### StylesCollector [#stylescollector]
183
+
184
+ Defined in: [collector.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L101)
185
+
186
+ Reachable entries for one render or one stylesheet.
187
+
188
+ #### Constructors
189
+
190
+ ##### Constructor
191
+
192
+ ```ts
193
+ new StylesCollector(__namedParameters): StylesCollector;
194
+ ```
195
+
196
+ Defined in: [collector.ts:120](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L120)
197
+
198
+ ###### Parameters
199
+
200
+ | Parameter | Type |
201
+ | ------ | ------ |
202
+ | `__namedParameters` | [`StylesCollectorOptions`](#stylescollectoroptions) |
203
+
204
+ ###### Returns
205
+
206
+ [`StylesCollector`](#stylescollector)
207
+
208
+ #### Properties
209
+
210
+ | Property | Modifier | Type | Description | Defined in |
211
+ | ------ | ------ | ------ | ------ | ------ |
212
+ | $$$names$$$ `names` | `readonly` | [`StyleNameMode`](#stylenamemode) | The naming mode (compact vs readable). | [collector.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L105) |
213
+ | $$$prefix$$$ `prefix` | `readonly` | `string` | Emitted class name prefix. | [collector.ts:109](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L109) |
214
+ | $$$registry$$$ `registry` | `readonly` | [`StyleRegistry`](#styleregistry) | Associated registry. | [collector.ts:107](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L107) |
215
+ | $$$target$$$ `target` | `readonly` | [`StyleTarget`](#styletarget) | The target collection mode. | [collector.ts:103](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L103) |
216
+
217
+ #### Accessors
218
+
219
+ ##### collectedEntries [#collectedentries]
220
+
221
+ ###### Get Signature
222
+
223
+ ```ts
224
+ get collectedEntries(): readonly StyleEntry[];
225
+ ```
226
+
227
+ Defined in: [collector.ts:351](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L351)
228
+
229
+ Collected style entries sorted for emission (base rules before all `@media`/`@container` blocks).
230
+
231
+ ###### Returns
232
+
233
+ readonly [`StyleEntry`](#styleentry)[]
234
+
235
+ ##### collectedThemeDeps [#collectedthemedeps]
236
+
237
+ ###### Get Signature
238
+
239
+ ```ts
240
+ get collectedThemeDeps(): ReadonlySet<string>;
241
+ ```
242
+
243
+ Defined in: [collector.ts:356](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L356)
244
+
245
+ Theme token paths that survive reachability; emitted in the theme scope block.
246
+
247
+ ###### Returns
248
+
249
+ `ReadonlySet`\<`string`\>
250
+
251
+ ##### collectedVarDeps [#collectedvardeps]
252
+
253
+ ###### Get Signature
254
+
255
+ ```ts
256
+ get collectedVarDeps(): ReadonlySet<`vars/${string}`>;
257
+ ```
258
+
259
+ Defined in: [collector.ts:361](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L361)
260
+
261
+ Contextual var paths that survive reachability; used by the runtime for compact-name substitution.
262
+
263
+ ###### Returns
264
+
265
+ `ReadonlySet`\<`` `vars/${string}` ``\>
266
+
267
+ #### Methods
268
+
269
+ ##### createResolver() [#createresolver]
270
+
271
+ ```ts
272
+ createResolver(): StyleNameResolver;
273
+ ```
274
+
275
+ Defined in: [collector.ts:333](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L333)
276
+
277
+ Creates a [StyleNameResolver](#stylenameresolver) scoped to this collector's current dep set.
278
+
279
+ ###### Returns
280
+
281
+ [`StyleNameResolver`](#stylenameresolver)
282
+
283
+ ##### reachableDefaults() [#reachabledefaults]
284
+
285
+ ```ts
286
+ reachableDefaults(handle, groupPath): ReadonlySet<string>;
287
+ ```
288
+
289
+ Defined in: [collector.ts:376](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L376)
290
+
291
+ Returns the variable keys within `groupPath` that are reachable from `handle` or from any collected rule targeting it.
292
+
293
+ ###### Parameters
294
+
295
+ | Parameter | Type | Description |
296
+ | ------ | ------ | ------ |
297
+ | `handle` | [`StyleHandle`](#stylehandle) | Handle whose declaration refs and dependent rules are consulted. |
298
+ | `groupPath` | `` `vars/${string}` `` | Group prefix path (e.g. `vars/chip/look`). |
299
+
300
+ ###### Returns
301
+
302
+ `ReadonlySet`\<`string`\>
303
+
304
+ ##### subscribe() [#subscribe]
305
+
306
+ ```ts
307
+ subscribe(listener): () => void;
308
+ ```
309
+
310
+ Defined in: [collector.ts:275](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L275)
311
+
312
+ Calls `listener` after a public mutation adds an entry, handle, theme var, or contextual var.
313
+
314
+ Fires at most once per outermost call; nested calls such as `use([a, b])` batch into it.
315
+
316
+ ###### Parameters
317
+
318
+ | Parameter | Type | Description |
319
+ | ------ | ------ | ------ |
320
+ | `listener` | () => `void` | Called with no arguments after the collection grows. |
321
+
322
+ ###### Returns
323
+
324
+ Unsubscribes `listener`.
325
+
326
+ () => `void`
327
+
328
+ ##### use() [#use]
329
+
330
+ ```ts
331
+ use(value): void;
332
+ ```
333
+
334
+ Defined in: [collector.ts:143](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L143)
335
+
336
+ Collects a module's non-variant entries, or one explicit entry.
337
+
338
+ Variant entries stay off this path; collect them via `useHandles`.
339
+
340
+ ###### Parameters
341
+
342
+ | Parameter | Type | Description |
343
+ | ------ | ------ | ------ |
344
+ | `value` | \| [`StyleEntry`](#styleentry) \| readonly [`StyleEntry`](#styleentry)[] \| [`StylesModule`](#stylesmodule)\<[`StylesObject`](#stylesobject)\> | Module (all non-variant entries), a single entry, or an array of entries. |
345
+
346
+ ###### Returns
347
+
348
+ `void`
349
+
350
+ ##### useAllEntries() [#useallentries]
351
+
352
+ ```ts
353
+ useAllEntries(module): void;
354
+ ```
355
+
356
+ Defined in: [collector.ts:196](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L196)
357
+
358
+ Collects every entry on `module`, including variants. Used by the stylesheet target.
359
+
360
+ ###### Parameters
361
+
362
+ | Parameter | Type | Description |
363
+ | ------ | ------ | ------ |
364
+ | `module` | [`StylesModule`](#stylesmodule) | Module whose entries should all be collected. |
365
+
366
+ ###### Returns
367
+
368
+ `void`
369
+
370
+ ##### useHandles() [#usehandles]
371
+
372
+ ```ts
373
+ useHandles(handles): readonly StyleHandle[];
374
+ ```
375
+
376
+ Defined in: [collector.ts:222](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L222)
377
+
378
+ Collects handles and auto-includes rules whose selector deps are all present.
379
+
380
+ Media blocks gain inner rules whose deps are met and keep rules already collected.
381
+
382
+ ###### Parameters
383
+
384
+ | Parameter | Type | Description |
385
+ | ------ | ------ | ------ |
386
+ | `handles` | readonly [`StyleHandle`](#stylehandle)[] | Handles resolved during this render pass (e.g. from `resolveClassName`). |
387
+
388
+ ###### Returns
389
+
390
+ readonly [`StyleHandle`](#stylehandle)[]
391
+
392
+ Handles that were retained. Empty untargeted handles are omitted in compact mode.
393
+
394
+ ##### useRulesWhenDepsMet() [#useruleswhendepsmet]
395
+
396
+ ```ts
397
+ useRulesWhenDepsMet(module): void;
398
+ ```
399
+
400
+ Defined in: [collector.ts:251](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L251)
401
+
402
+ Collects `auto` rules on `module` whose every selector dependency is already collected.
403
+
404
+ ###### Parameters
405
+
406
+ | Parameter | Type |
407
+ | ------ | ------ |
408
+ | `module` | [`StylesModule`](#stylesmodule) |
409
+
410
+ ###### Returns
411
+
412
+ `void`
413
+
414
+ ##### useThemeVar() [#usethemevar]
415
+
416
+ ```ts
417
+ useThemeVar(path): void;
418
+ ```
419
+
420
+ Defined in: [collector.ts:328](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L328)
421
+
422
+ Marks a theme token path as reachable so it appears in the emitted theme block, even if no collected declaration reads it.
423
+
424
+ ###### Parameters
425
+
426
+ | Parameter | Type |
427
+ | ------ | ------ |
428
+ | `path` | `string` |
429
+
430
+ ###### Returns
431
+
432
+ `void`
433
+
434
+ ## Interfaces
435
+
436
+ ### ContextualCssVar [#contextualcssvar]
437
+
438
+ Defined in: [tokens/contextual\_var.ts:25](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L25)
439
+
440
+ Represents a contextual CSS variable. Stringifies to `var(--...)`.
441
+
442
+ #### Properties
443
+
444
+ | Property | Modifier | Type | Description | Defined in |
445
+ | ------ | ------ | ------ | ------ | ------ |
446
+ | $$$__kind$$$ `__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) |
447
+ | $$$name$$$ `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) |
448
+ | $$$path$$$ `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) |
449
+ | $$$ref$$$ `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) |
450
+
451
+ #### Methods
452
+
453
+ ##### \[toPrimitive\]() [#toprimitive]
454
+
455
+ ```ts
456
+ toPrimitive: string;
457
+ ```
458
+
459
+ Defined in: [tokens/contextual\_var.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L37)
460
+
461
+ Template interpolation; same as [ContextualCssVar.toString](#tostring).
462
+
463
+ ###### Parameters
464
+
465
+ | Parameter | Type |
466
+ | ------ | ------ |
467
+ | `hint` | `string` |
468
+
469
+ ###### Returns
470
+
471
+ `string`
472
+
473
+ ##### toString() [#tostring]
474
+
475
+ ```ts
476
+ toString(): string;
477
+ ```
478
+
479
+ Defined in: [tokens/contextual\_var.ts:35](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L35)
480
+
481
+ Stringifies to [ContextualCssVar.ref](#ref).
482
+
483
+ ###### Returns
484
+
485
+ `string`
486
+
487
+ ***
488
+
489
+ ### ContextualCssVarName [#contextualcssvarname-1]
490
+
491
+ Defined in: [tokens/contextual\_var.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L11)
492
+
493
+ Represents a contextual CSS variable name. Stringifies to its custom property name.
494
+
495
+ #### Properties
496
+
497
+ | Property | Modifier | Type | Description | Defined in |
498
+ | ------ | ------ | ------ | ------ | ------ |
499
+ | $$$__kind-1$$$ `__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) |
500
+ | $$$name-1$$$ `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) |
501
+ | $$$path-1$$$ `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) |
502
+
503
+ #### Methods
504
+
505
+ ##### \[toPrimitive\]() [#toprimitive-1]
506
+
507
+ ```ts
508
+ toPrimitive: string;
509
+ ```
510
+
511
+ Defined in: [tokens/contextual\_var.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L21)
512
+
513
+ Template interpolation; same as [ContextualCssVarName.toString](#tostring-1).
514
+
515
+ ###### Parameters
516
+
517
+ | Parameter | Type |
518
+ | ------ | ------ |
519
+ | `hint` | `string` |
520
+
521
+ ###### Returns
522
+
523
+ `string`
524
+
525
+ ##### toString() [#tostring-1]
526
+
527
+ ```ts
528
+ toString(): string;
529
+ ```
530
+
531
+ Defined in: [tokens/contextual\_var.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L19)
532
+
533
+ Stringifies to [ContextualCssVarName.name](#name-1).
534
+
535
+ ###### Returns
536
+
537
+ `string`
538
+
539
+ ***
540
+
541
+ ### CreateDomSinkOptions [#createdomsinkoptions]
542
+
543
+ Defined in: [dom\_sink.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L21)
544
+
545
+ Host document and optional flush scheduler for a `<style>` sink.
546
+
547
+ #### Properties
548
+
549
+ | Property | Type | Description | Defined in |
550
+ | ------ | ------ | ------ | ------ |
551
+ | $$$document$$$ `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) |
552
+ | $$$parent$$$ `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) |
553
+ | $$$schedule$$$ `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) |
554
+
555
+ ***
556
+
557
+ ### CssToken [#csstoken]
558
+
559
+ Defined in: [tokens/theme\_token.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L11)
560
+
561
+ Represents a CSS theme token. Stringifies to `var(--...)`.
562
+
563
+ #### Properties
564
+
565
+ | Property | Modifier | Type | Description | Defined in |
566
+ | ------ | ------ | ------ | ------ | ------ |
567
+ | $$$__kind-2$$$ `__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) |
568
+ | $$$cssvar$$$ `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) |
569
+ | $$$path-2$$$ `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) |
570
+ | $$$ref-1$$$ `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) |
571
+
572
+ #### Methods
573
+
574
+ ##### \[toPrimitive\]() [#toprimitive-2]
575
+
576
+ ```ts
577
+ toPrimitive: string;
578
+ ```
579
+
580
+ Defined in: [tokens/theme\_token.ts:23](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L23)
581
+
582
+ Template interpolation; same as [CssToken.toString](#tostring-2).
583
+
584
+ ###### Parameters
585
+
586
+ | Parameter | Type |
587
+ | ------ | ------ |
588
+ | `hint` | `string` |
589
+
590
+ ###### Returns
591
+
592
+ `string`
593
+
594
+ ##### toString() [#tostring-2]
595
+
596
+ ```ts
597
+ toString(): string;
598
+ ```
599
+
600
+ Defined in: [tokens/theme\_token.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L21)
601
+
602
+ Stringifies to [CssToken.ref](#ref-1).
603
+
604
+ ###### Returns
605
+
606
+ `string`
607
+
608
+ ***
609
+
610
+ ### Declarations [#declarations]
611
+
612
+ Defined in: [styles/types.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L97)
613
+
614
+ Authored CSS plus the deps the collector uses for reachability.
615
+
616
+ #### Properties
617
+
618
+ | Property | Modifier | Type | Description | Defined in |
619
+ | ------ | ------ | ------ | ------ | ------ |
620
+ | $$$css$$$ `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) |
621
+ | $$$deps$$$ `deps` | `readonly` | [`StyleDeps`](#styledeps) | Reachability tracking dependencies. | [styles/types.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L101) |
622
+
623
+ ***
624
+
625
+ ### DefaultGroupDeps [#defaultgroupdeps]
626
+
627
+ Defined in: [styles/types.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L59)
628
+
629
+ One `t.vars(...)` group's default-emission metadata.
630
+
631
+ #### Properties
632
+
633
+ | Property | Modifier | Type | Description | Defined in |
634
+ | ------ | ------ | ------ | ------ | ------ |
635
+ | $$$grouppath$$$ `groupPath` | `readonly` | `` `vars/${string}` `` | Target variable namespace group. | [styles/types.ts:61](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L61) |
636
+ | $$$keys$$$ `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) |
637
+
638
+ ***
639
+
640
+ ### DefaultKeyDeps [#defaultkeydeps]
641
+
642
+ Defined in: [styles/types.ts:67](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L67)
643
+
644
+ One key inside a [DefaultGroupDeps](#defaultgroupdeps) group.
645
+
646
+ #### Properties
647
+
648
+ | Property | Modifier | Type | Description | Defined in |
649
+ | ------ | ------ | ------ | ------ | ------ |
650
+ | $$$key$$$ `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) |
651
+ | $$$path-3$$$ `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) |
652
+ | $$$valuedeps$$$ `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) |
653
+ | `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) |
654
+ | `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) |
655
+
656
+ ***
657
+
658
+ ### Distillery [#distillery]
659
+
660
+ Defined in: [engine.ts:69](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L69)
661
+
662
+ One component library's binding: environment, registry, and pre-bound operations. Destructure-safe (no `this`).
663
+
664
+ #### Type Parameters
665
+
666
+ | Type Parameter | Default type |
667
+ | ------ | ------ |
668
+ | `TTokens` | `unknown` |
669
+ | `TTheme` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |
670
+
671
+ #### Properties
672
+
673
+ | Property | Modifier | Type | Description | Defined in |
674
+ | ------ | ------ | ------ | ------ | ------ |
675
+ | $$$artifactcollector$$$ `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) |
676
+ | $$$createnameresolver$$$ `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) |
677
+ | $$$createstylemodule$$$ `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) |
678
+ | $$$dev$$$ `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) |
679
+ | $$$environment$$$ `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) |
680
+ | $$$livecollection$$$ `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) |
681
+ | $$$primitivestyles$$$ `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) |
682
+ | $$$registry-1$$$ `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) |
683
+ | $$$renderstyles$$$ `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) |
684
+ | $$$resolvevalues$$$ `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) |
685
+ | $$$stylesheetcollector$$$ `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) |
686
+ | $$$themevars$$$ `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) |
687
+ | $$$tokens$$$ `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) |
688
+
689
+ ***
690
+
691
+ ### DistilleryEnvironment [#distilleryenvironment-1]
692
+
693
+ Defined in: [environment.ts:43](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L43)
694
+
695
+ Resolved environment: derived `themeVars` / `tokens` plus the bind-time prefix and scope.
696
+
697
+ #### Type Parameters
698
+
699
+ | Type Parameter | Default type |
700
+ | ------ | ------ |
701
+ | `TTokens` | `unknown` |
702
+
703
+ #### Properties
704
+
705
+ | Property | Modifier | Type | Description | Defined in |
706
+ | ------ | ------ | ------ | ------ | ------ |
707
+ | $$$prefix-1$$$ `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) |
708
+ | $$$sharedvars$$$ `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) |
709
+ | $$$themescope$$$ `themeScope` | `readonly` | `string` | Selector wrapping emitted theme-var declarations. | [environment.ts:47](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L47) |
710
+ | $$$themevars-1$$$ `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) |
711
+ | $$$tokens-1$$$ `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) |
712
+ | $$$variations$$$ `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) |
713
+
714
+ ***
715
+
716
+ ### DistilleryOptions [#distilleryoptions]
717
+
718
+ Defined in: [environment.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L27)
719
+
720
+ Authoring input to `createDistillery`.
721
+
722
+ #### Type Parameters
723
+
724
+ | Type Parameter | Default type |
725
+ | ------ | ------ |
726
+ | `TTheme` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |
727
+
728
+ #### Properties
729
+
730
+ | Property | Modifier | Type | Description | Defined in |
731
+ | ------ | ------ | ------ | ------ | ------ |
732
+ | $$$dev-1$$$ `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) |
733
+ | $$$prefix-2$$$ `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) |
734
+ | $$$sharedvars-1$$$ `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) |
735
+ | $$$theme$$$ `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) |
736
+ | $$$themescope-1$$$ `themeScope` | `readonly` | `string` | Selector wrapping emitted theme-var declarations. | [environment.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L31) |
737
+ | $$$variations-1$$$ `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) |
738
+
739
+ ***
740
+
741
+ ### DocumentLike [#documentlike]
742
+
743
+ Defined in: [dom\_sink.ts:13](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L13)
744
+
745
+ Minimal interface for a DOM `Document` able to create and append style tags.
746
+
747
+ #### Properties
748
+
749
+ | Property | Modifier | Type | Description | Defined in |
750
+ | ------ | ------ | ------ | ------ | ------ |
751
+ | $$$head$$$ `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) |
752
+
753
+ #### Methods
754
+
755
+ ##### createElement() [#createelement]
756
+
757
+ ```ts
758
+ createElement(tagName): StyleElementLike;
759
+ ```
760
+
761
+ Defined in: [dom\_sink.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L15)
762
+
763
+ Creates a `<style>` element.
764
+
765
+ ###### Parameters
766
+
767
+ | Parameter | Type |
768
+ | ------ | ------ |
769
+ | `tagName` | `"style"` |
770
+
771
+ ###### Returns
772
+
773
+ [`StyleElementLike`](#styleelementlike)
774
+
775
+ ***
776
+
777
+ ### LiveCollection [#livecollection-1]
778
+
779
+ Defined in: [engine.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L59)
780
+
781
+ Readable collection filled by one live render.
782
+
783
+ Readable only: compact names depend on the complete collected set and need two passes.
784
+
785
+ #### Properties
786
+
787
+ | Property | Modifier | Type | Description | Defined in |
788
+ | ------ | ------ | ------ | ------ | ------ |
789
+ | $$$collector$$$ `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) |
790
+ | $$$css-1$$$ `css` | `readonly` | () => `string` | Renders the CSS collected so far. | [engine.ts:65](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L65) |
791
+ | $$$resolveclassname$$$ `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) |
792
+
793
+ ***
794
+
795
+ ### LiveCollectionOptions [#livecollectionoptions]
796
+
797
+ Defined in: [engine.ts:45](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L45)
798
+
799
+ Sink, render options, and warning sink for [Distillery.liveCollection](#livecollection).
800
+
801
+ #### Properties
802
+
803
+ | Property | Type | Description | Defined in |
804
+ | ------ | ------ | ------ | ------ |
805
+ | $$$render$$$ `render?` | [`RenderStylesOptions`](#renderstylesoptions) | Options forwarded to `renderStyles` by `css()`. | [engine.ts:49](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L49) |
806
+ | $$$sink$$$ `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) |
807
+ | $$$warn$$$ `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) |
808
+
809
+ ***
810
+
811
+ ### LocalVarDefaultMarker [#localvardefaultmarker]
812
+
813
+ Defined in: [local\_vars.ts:53](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L53)
814
+
815
+ Interpolation marker representing `${group}` defaults.
816
+
817
+ #### Properties
818
+
819
+ | Property | Modifier | Type | Description | Defined in |
820
+ | ------ | ------ | ------ | ------ | ------ |
821
+ | $$$__kind-3$$$ `__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) |
822
+ | $$$defaults$$$ `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) |
823
+ | $$$groupid$$$ `groupId` | `readonly` | `string` | Unique ID for the group. | [local\_vars.ts:57](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L57) |
824
+ | $$$grouppath-1$$$ `groupPath` | `readonly` | `` `vars/${string}` `` | Group prefix path. | [local\_vars.ts:59](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L59) |
825
+
826
+ ***
827
+
828
+ ### LocalVarOverrideMarker [#localvaroverridemarker]
829
+
830
+ Defined in: [local\_vars.ts:34](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L34)
831
+
832
+ Interpolation marker representing `.set(...)` overrides.
833
+
834
+ #### Properties
835
+
836
+ | Property | Modifier | Type | Description | Defined in |
837
+ | ------ | ------ | ------ | ------ | ------ |
838
+ | $$$__kind-4$$$ `__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) |
839
+ | $$$groupid-1$$$ `groupId` | `readonly` | `string` | Unique ID for the group. | [local\_vars.ts:38](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L38) |
840
+ | $$$overrides$$$ `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) |
841
+
842
+ ***
843
+
844
+ ### LocalVarRef [#localvarref]
845
+
846
+ Defined in: [local\_vars.ts:18](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L18)
847
+
848
+ Reference to a local CSS variable. Stringifies to `var(--...)`.
849
+
850
+ #### Properties
851
+
852
+ | Property | Modifier | Type | Description | Defined in |
853
+ | ------ | ------ | ------ | ------ | ------ |
854
+ | $$$__kind-5$$$ `__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) |
855
+ | $$$path-4$$$ `path` | `readonly` | `` `vars/${string}` `` | Canonical group/key path. | [local\_vars.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L22) |
856
+ | $$$propname$$$ `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) |
857
+ | $$$ref-2$$$ `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) |
858
+
859
+ #### Methods
860
+
861
+ ##### \[toPrimitive\]() [#toprimitive-3]
862
+
863
+ ```ts
864
+ toPrimitive: string;
865
+ ```
866
+
867
+ Defined in: [local\_vars.ts:30](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L30)
868
+
869
+ Template interpolation; same as [LocalVarRef.toString](#tostring-3).
870
+
871
+ ###### Parameters
872
+
873
+ | Parameter | Type |
874
+ | ------ | ------ |
875
+ | `hint` | `string` |
876
+
877
+ ###### Returns
878
+
879
+ `string`
880
+
881
+ ##### toString() [#tostring-3]
882
+
883
+ ```ts
884
+ toString(): string;
885
+ ```
886
+
887
+ Defined in: [local\_vars.ts:28](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L28)
888
+
889
+ Stringifies to [LocalVarRef.ref](#ref-2).
890
+
891
+ ###### Returns
892
+
893
+ `string`
894
+
895
+ ***
896
+
897
+ ### MediaThemeVariation [#mediathemevariation]
898
+
899
+ Defined in: [theme.ts:89](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L89)
900
+
901
+ Media-conditioned variation. `media` is intrinsic; it is not a selector.
902
+
903
+ #### Type Parameters
904
+
905
+ | Type Parameter | Default type |
906
+ | ------ | ------ |
907
+ | `T` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |
908
+
909
+ #### Properties
910
+
911
+ | Property | Modifier | Type | Description | Defined in |
912
+ | ------ | ------ | ------ | ------ | ------ |
913
+ | $$$media$$$ `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) |
914
+ | $$$variation$$$ `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) |
915
+
916
+ ***
917
+
918
+ ### PrimitiveStyleAuthoringApi [#primitivestyleauthoringapi]
919
+
920
+ Defined in: [styles/types.ts:278](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L278)
921
+
922
+ Narrow `t` for `primitiveStyles`: handles and tokens only.
923
+
924
+ #### Type Parameters
925
+
926
+ | Type Parameter | Default type |
927
+ | ------ | ------ |
928
+ | `TTokens` | `unknown` |
929
+
930
+ #### Properties
931
+
932
+ | Property | Type | Description | Defined in |
933
+ | ------ | ------ | ------ | ------ |
934
+ | $$$style$$$ `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) |
935
+ | $$$tokens-2$$$ `tokens` | `TTokens` | Environment token tree. | [styles/types.ts:282](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L282) |
936
+
937
+ ***
938
+
939
+ ### RenderStylesOptions [#renderstylesoptions]
940
+
941
+ Defined in: [runtime.ts:67](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L67)
942
+
943
+ Per-render variation selection, scheme flatten, alternate blocks, and value overrides.
944
+
945
+ #### Properties
946
+
947
+ | Property | Type | Description | Defined in |
948
+ | ------ | ------ | ------ | ------ |
949
+ | $$$alternates$$$ `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) |
950
+ | $$$flatten$$$ `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) |
951
+ | $$$scheme$$$ `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) |
952
+ | $$$themevalueoverrides$$$ `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) |
953
+
954
+ ***
955
+
956
+ ### ResolvedThemeVariation [#resolvedthemevariation]
957
+
958
+ Defined in: [theme.ts:101](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L101)
959
+
960
+ One named variation resolved against the base at construction.
961
+
962
+ #### Properties
963
+
964
+ | Property | Modifier | Type | Description | Defined in |
965
+ | ------ | ------ | ------ | ------ | ------ |
966
+ | $$$diffs$$$ `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) |
967
+ | $$$media-1$$$ `media?` | `readonly` | `string` | Intrinsic media query, when declared. | [theme.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L105) |
968
+ | $$$name-2$$$ `name` | `readonly` | `string` | Name passed in `variations`. | [theme.ts:103](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L103) |
969
+ | $$$themevars-2$$$ `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) |
970
+
971
+ ***
972
+
973
+ ### RuleOptions [#ruleoptions]
974
+
975
+ Defined in: [styles/types.ts:148](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L148)
976
+
977
+ Options for [rule](#rule).
978
+
979
+ #### Properties
980
+
981
+ | Property | Type | Description | Defined in |
982
+ | ------ | ------ | ------ | ------ |
983
+ | $$$auto$$$ `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) |
984
+
985
+ ***
986
+
987
+ ### ScaleToken [#scaletoken]
988
+
989
+ Defined in: [tokens/scale\_token.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L11)
990
+
991
+ Represents a CSS scale size token. Stringifies to its literal value.
992
+
993
+ #### Properties
994
+
995
+ | Property | Modifier | Type | Description | Defined in |
996
+ | ------ | ------ | ------ | ------ | ------ |
997
+ | $$$__kind-6$$$ `__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) |
998
+ | $$$cq$$$ `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) |
999
+ | $$$value$$$ `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) |
1000
+
1001
+ #### Methods
1002
+
1003
+ ##### \[toPrimitive\]() [#toprimitive-4]
1004
+
1005
+ ```ts
1006
+ toPrimitive: string;
1007
+ ```
1008
+
1009
+ Defined in: [tokens/scale\_token.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L21)
1010
+
1011
+ Template interpolation; same as [ScaleToken.toString](#tostring-4).
1012
+
1013
+ ###### Parameters
1014
+
1015
+ | Parameter | Type |
1016
+ | ------ | ------ |
1017
+ | `hint` | `string` |
1018
+
1019
+ ###### Returns
1020
+
1021
+ `string`
1022
+
1023
+ ##### toString() [#tostring-4]
1024
+
1025
+ ```ts
1026
+ toString(): string;
1027
+ ```
1028
+
1029
+ Defined in: [tokens/scale\_token.ts:19](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L19)
1030
+
1031
+ Stringifies to [ScaleToken.value](#value).
1032
+
1033
+ ###### Returns
1034
+
1035
+ `string`
1036
+
1037
+ ***
1038
+
1039
+ ### SchemePair [#schemepair]
1040
+
1041
+ Defined in: [tokens/light\_dark.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L11)
1042
+
1043
+ Scheme-varying color pair. Compiles to `light-dark(light, dark)`.
1044
+
1045
+ #### Properties
1046
+
1047
+ | Property | Modifier | Type | Description | Defined in |
1048
+ | ------ | ------ | ------ | ------ | ------ |
1049
+ | $$$__kind-7$$$ `__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) |
1050
+ | $$$dark$$$ `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) |
1051
+ | $$$light$$$ `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) |
1052
+
1053
+ ***
1054
+
1055
+ ### StyleAuthoringApi [#styleauthoringapi]
1056
+
1057
+ Defined in: [styles/types.ts:219](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L219)
1058
+
1059
+ Authoring API passed to `createStyleModule` factories.
1060
+
1061
+ #### Type Parameters
1062
+
1063
+ | Type Parameter | Default type |
1064
+ | ------ | ------ |
1065
+ | `TTokens` | `unknown` |
1066
+
1067
+ #### Properties
1068
+
1069
+ | Property | Type | Description | Defined in |
1070
+ | ------ | ------ | ------ | ------ |
1071
+ | $$$css-2$$$ `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) |
1072
+ | $$$decls$$$ `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) |
1073
+ | $$$tokens-3$$$ `tokens` | `TTokens` | Environment token tree. | [styles/types.ts:236](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L236) |
1074
+ | $$$vars$$$ `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) |
1075
+
1076
+ ***
1077
+
1078
+ ### StyleDeps [#styledeps]
1079
+
1080
+ Defined in: [styles/types.ts:47](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L47)
1081
+
1082
+ Reachability sets captured while authoring a declaration block.
1083
+
1084
+ #### Properties
1085
+
1086
+ | Property | Modifier | Type | Description | Defined in |
1087
+ | ------ | ------ | ------ | ------ | ------ |
1088
+ | $$$defaults-1$$$ `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) |
1089
+ | $$$refs$$$ `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) |
1090
+ | $$$theme-1$$$ `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) |
1091
+ | $$$vars-1$$$ `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) |
1092
+
1093
+ ***
1094
+
1095
+ ### StyleElementLike [#styleelementlike]
1096
+
1097
+ Defined in: [sink.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L15)
1098
+
1099
+ Minimal interface for a DOM `<style>` element.
1100
+
1101
+ #### Properties
1102
+
1103
+ | Property | Type | Description | Defined in |
1104
+ | ------ | ------ | ------ | ------ |
1105
+ | $$$textcontent$$$ `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) |
1106
+
1107
+ ***
1108
+
1109
+ ### StyleHandle [#stylehandle]
1110
+
1111
+ Defined in: [styles/types.ts:105](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L105)
1112
+
1113
+ A named class: readable name, declarations, and collection identity.
1114
+
1115
+ #### Extended by
1116
+
1117
+ - [`EmotionCss`](emotion.md#emotioncss-1)
1118
+
1119
+ #### Properties
1120
+
1121
+ | Property | Modifier | Type | Description | Defined in |
1122
+ | ------ | ------ | ------ | ------ | ------ |
1123
+ | $$$declarations-1$$$ `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) |
1124
+ | $$$key-1$$$ `key` | `readonly` | `string` | Full path joined by dots. | [styles/types.ts:113](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L113) |
1125
+ | $$$kind$$$ `kind` | `readonly` | `"handle"` | Discriminant for [StyleEntry](#styleentry). | [styles/types.ts:107](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L107) |
1126
+ | $$$localname$$$ `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) |
1127
+ | $$$modulename$$$ `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) |
1128
+ | $$$readablename$$$ `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) |
1129
+ | $$$variant$$$ `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) |
1130
+
1131
+ #### Methods
1132
+
1133
+ ##### resolveClassName() [#resolveclassname-1]
1134
+
1135
+ ```ts
1136
+ resolveClassName(context): string;
1137
+ ```
1138
+
1139
+ Defined in: [styles/types.ts:121](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L121)
1140
+
1141
+ Produces the final class name via the provided resolver context.
1142
+
1143
+ ###### Parameters
1144
+
1145
+ | Parameter | Type | Description |
1146
+ | ------ | ------ | ------ |
1147
+ | `context` | \{ `resolveClassName`: (...`handles`) => `string`; \} | - |
1148
+ | `context.resolveClassName` | (...`handles`) => `string` | Joins one or more handles into a class-name string. |
1149
+
1150
+ ###### Returns
1151
+
1152
+ `string`
1153
+
1154
+ ***
1155
+
1156
+ ### StyleMedia [#stylemedia]
1157
+
1158
+ Defined in: [styles/types.ts:154](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L154)
1159
+
1160
+ `@media` or `@container` block wrapping inner [StyleRule](#stylerule)s.
1161
+
1162
+ #### Properties
1163
+
1164
+ | Property | Modifier | Type | Description | Defined in |
1165
+ | ------ | ------ | ------ | ------ | ------ |
1166
+ | $$$atrule$$$ `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) |
1167
+ | $$$key-2$$$ `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) |
1168
+ | $$$kind-1$$$ `kind` | `readonly` | `"media"` | Discriminant for [StyleEntry](#styleentry). | [styles/types.ts:156](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L156) |
1169
+ | $$$modulename-1$$$ `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) |
1170
+ | $$$query$$$ `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) |
1171
+ | $$$rules$$$ `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) |
1172
+ | $$$variant-1$$$ `variant` | `readonly` | `boolean` | `true` when produced inside `variants(...)`. | [styles/types.ts:170](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L170) |
1173
+
1174
+ ***
1175
+
1176
+ ### StyleNameResolver [#stylenameresolver]
1177
+
1178
+ Defined in: [names.ts:14](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L14)
1179
+
1180
+ Context for resolving keys into final class or custom-property names.
1181
+
1182
+ #### Properties
1183
+
1184
+ | Property | Modifier | Type | Description | Defined in |
1185
+ | ------ | ------ | ------ | ------ | ------ |
1186
+ | $$$names-1$$$ `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) |
1187
+
1188
+ #### Methods
1189
+
1190
+ ##### className() [#classname]
1191
+
1192
+ ```ts
1193
+ className(key, readableName?): string;
1194
+ ```
1195
+
1196
+ Defined in: [names.ts:18](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L18)
1197
+
1198
+ Resolves a handle key into a CSS class name.
1199
+
1200
+ ###### Parameters
1201
+
1202
+ | Parameter | Type |
1203
+ | ------ | ------ |
1204
+ | `key` | `string` |
1205
+ | `readableName?` | `string` |
1206
+
1207
+ ###### Returns
1208
+
1209
+ `string`
1210
+
1211
+ ##### cssVar() [#cssvar-1]
1212
+
1213
+ ```ts
1214
+ cssVar(key): `--${string}`;
1215
+ ```
1216
+
1217
+ Defined in: [names.ts:20](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L20)
1218
+
1219
+ Resolves a variable key into a custom property name.
1220
+
1221
+ ###### Parameters
1222
+
1223
+ | Parameter | Type |
1224
+ | ------ | ------ |
1225
+ | `key` | `string` |
1226
+
1227
+ ###### Returns
1228
+
1229
+ `` `--${string}` ``
1230
+
1231
+ ##### cssVarRef() [#cssvarref]
1232
+
1233
+ ```ts
1234
+ cssVarRef(key): `var(--${string})`;
1235
+ ```
1236
+
1237
+ Defined in: [names.ts:22](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L22)
1238
+
1239
+ Resolves a variable key into a `var(...)` reference.
1240
+
1241
+ ###### Parameters
1242
+
1243
+ | Parameter | Type |
1244
+ | ------ | ------ |
1245
+ | `key` | `string` |
1246
+
1247
+ ###### Returns
1248
+
1249
+ `` `var(--${string})` ``
1250
+
1251
+ ***
1252
+
1253
+ ### StyleNameResolverOptions [#stylenameresolveroptions]
1254
+
1255
+ Defined in: [names.ts:26](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L26)
1256
+
1257
+ Inputs for [createStyleNameResolver](#createstylenameresolver).
1258
+
1259
+ #### Properties
1260
+
1261
+ | Property | Type | Description | Defined in |
1262
+ | ------ | ------ | ------ | ------ |
1263
+ | $$$classkeys-1$$$ `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) |
1264
+ | $$$cssvarkeys-1$$$ `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) |
1265
+ | $$$names-2$$$ `names` | [`StyleNameMode`](#stylenamemode) | Naming strategy (`compact` or `readable`). | [names.ts:28](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L28) |
1266
+ | $$$prefix-3$$$ `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) |
1267
+
1268
+ ***
1269
+
1270
+ ### StyleParentLike [#styleparentlike]
1271
+
1272
+ Defined in: [sink.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L21)
1273
+
1274
+ Node that receives a managed `<style>` element, e.g. `document.head` or a `ShadowRoot`.
1275
+
1276
+ #### Methods
1277
+
1278
+ ##### appendChild() [#appendchild]
1279
+
1280
+ ```ts
1281
+ appendChild(node): void;
1282
+ ```
1283
+
1284
+ Defined in: [sink.ts:24](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L24)
1285
+
1286
+ Appends the managed style element.
1287
+
1288
+ ###### Parameters
1289
+
1290
+ | Parameter | Type |
1291
+ | ------ | ------ |
1292
+ | `node` | [`StyleElementLike`](#styleelementlike) |
1293
+
1294
+ ###### Returns
1295
+
1296
+ `void`
1297
+
1298
+ ***
1299
+
1300
+ ### StyleRegistrySnapshot [#styleregistrysnapshot]
1301
+
1302
+ Defined in: [styles/types.ts:198](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L198)
1303
+
1304
+ Class and CSS-var key snapshot used to build a [StyleNameResolver](#stylenameresolver).
1305
+
1306
+ #### Properties
1307
+
1308
+ | Property | Modifier | Type | Description | Defined in |
1309
+ | ------ | ------ | ------ | ------ | ------ |
1310
+ | $$$classkeys-2$$$ `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) |
1311
+ | $$$cssvarkeys-2$$$ `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) |
1312
+
1313
+ ***
1314
+
1315
+ ### StyleRule [#stylerule]
1316
+
1317
+ Defined in: [styles/types.ts:128](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L128)
1318
+
1319
+ A selector plus declarations, optionally auto-collected from handle deps.
1320
+
1321
+ #### Properties
1322
+
1323
+ | Property | Modifier | Type | Description | Defined in |
1324
+ | ------ | ------ | ------ | ------ | ------ |
1325
+ | $$$auto-1$$$ `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) |
1326
+ | $$$declarations-2$$$ `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) |
1327
+ | $$$dependson$$$ `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) |
1328
+ | $$$key-3$$$ `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) |
1329
+ | $$$kind-2$$$ `kind` | `readonly` | `"rule"` | Discriminant for [StyleEntry](#styleentry). | [styles/types.ts:130](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L130) |
1330
+ | $$$modulename-2$$$ `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) |
1331
+ | $$$selector$$$ `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) |
1332
+ | $$$variant-2$$$ `variant` | `readonly` | `boolean` | `true` when produced inside `variants(...)`. | [styles/types.ts:140](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L140) |
1333
+
1334
+ ***
1335
+
1336
+ ### StylesCollectorOptions [#stylescollectoroptions]
1337
+
1338
+ Defined in: [collector.ts:85](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L85)
1339
+
1340
+ Target, naming mode, registry, and prefix for one [StylesCollector](#stylescollector).
1341
+
1342
+ #### Properties
1343
+
1344
+ | Property | Type | Description | Defined in |
1345
+ | ------ | ------ | ------ | ------ |
1346
+ | $$$dev-2$$$ `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) |
1347
+ | $$$names-3$$$ `names` | [`StyleNameMode`](#stylenamemode) | Desired name mode (`compact` or `readable`). | [collector.ts:89](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L89) |
1348
+ | $$$prefix-4$$$ `prefix` | `string` | Brand prefix forwarded to the name resolver. | [collector.ts:93](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L93) |
1349
+ | $$$registry-2$$$ `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) |
1350
+ | $$$target-1$$$ `target` | [`StyleTarget`](#styletarget) | Target context (e.g. `artifact` or `stylesheet`). | [collector.ts:87](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/collector.ts#L87) |
1351
+ | $$$warn-1$$$ `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) |
1352
+
1353
+ ***
1354
+
1355
+ ### StyleSink [#stylesink]
1356
+
1357
+ Defined in: [sink.ts:9](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L9)
1358
+
1359
+ Receives stylesheet invalidation from a live collection or Emotion compat modules.
1360
+
1361
+ #### Methods
1362
+
1363
+ ##### invalidate() [#invalidate]
1364
+
1365
+ ```ts
1366
+ invalidate(render): void;
1367
+ ```
1368
+
1369
+ Defined in: [sink.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/sink.ts#L11)
1370
+
1371
+ Marks the sink dirty. `render` produces the current stylesheet when it flushes.
1372
+
1373
+ ###### Parameters
1374
+
1375
+ | Parameter | Type |
1376
+ | ------ | ------ |
1377
+ | `render` | () => `string` |
1378
+
1379
+ ###### Returns
1380
+
1381
+ `void`
1382
+
1383
+ ***
1384
+
1385
+ ### StylesModule [#stylesmodule]
1386
+
1387
+ Defined in: [styles/types.ts:180](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L180)
1388
+
1389
+ Named handle tree plus flat entries after `createStyleModule`.
1390
+
1391
+ #### Type Parameters
1392
+
1393
+ | Type Parameter | Default type |
1394
+ | ------ | ------ |
1395
+ | `TStyles` | [`StylesObject`](#stylesobject) |
1396
+
1397
+ #### Properties
1398
+
1399
+ | Property | Modifier | Type | Description | Defined in |
1400
+ | ------ | ------ | ------ | ------ | ------ |
1401
+ | $$$entries$$$ `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) |
1402
+ | $$$handlelist$$$ `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) |
1403
+ | $$$handles$$$ `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) |
1404
+ | $$$name-3$$$ `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) |
1405
+ | $$$themedeps$$$ `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) |
1406
+ | $$$vardeps$$$ `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) |
1407
+
1408
+ ***
1409
+
1410
+ ### ThemeAlternate [#themealternate]
1411
+
1412
+ Defined in: [runtime.ts:83](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L83)
1413
+
1414
+ One runtime-switched variation. `selector` is required unless the variation declares `media`.
1415
+
1416
+ #### Properties
1417
+
1418
+ | Property | Modifier | Type | Description | Defined in |
1419
+ | ------ | ------ | ------ | ------ | ------ |
1420
+ | $$$selector-1$$$ `selector?` | `readonly` | `string` | Consuming page selector, composed with `themeScope`. | [runtime.ts:87](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L87) |
1421
+ | $$$variation-1$$$ `variation` | `readonly` | `string` | Name passed in `DistilleryOptions.variations`. | [runtime.ts:85](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L85) |
1422
+
1423
+ ***
1424
+
1425
+ ### ThemeVarDefinition [#themevardefinition]
1426
+
1427
+ Defined in: [environment.ts:15](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L15)
1428
+
1429
+ One theme CSS variable. Differing `light`/`dark` fold into `light-dark(...)`.
1430
+
1431
+ #### Properties
1432
+
1433
+ | Property | Modifier | Type | Description | Defined in |
1434
+ | ------ | ------ | ------ | ------ | ------ |
1435
+ | $$$cssvar-2$$$ `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) |
1436
+ | $$$dark-1$$$ `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) |
1437
+ | $$$light-1$$$ `light` | `readonly` | `string` | Value for light color scheme. | [environment.ts:21](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/environment.ts#L21) |
1438
+ | $$$path-5$$$ `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) |
1439
+
1440
+ ## Type Aliases
1441
+
1442
+ ### ContextualVarPath [#contextualvarpath]
1443
+
1444
+ ```ts
1445
+ type ContextualVarPath = `vars/${string}`;
1446
+ ```
1447
+
1448
+ Defined in: [styles/types.ts:32](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L32)
1449
+
1450
+ Canonical `vars/<group>/<key>` path for a contextual or module-local CSS variable.
1451
+
1452
+ ***
1453
+
1454
+ ### CssValue [#cssvalue]
1455
+
1456
+ ```ts
1457
+ type CssValue =
1458
+ | string
1459
+ | number
1460
+ | CssToken
1461
+ | ContextualCssVar
1462
+ | ContextualCssVarName
1463
+ | ScaleToken
1464
+ | LocalVarRef;
1465
+ ```
1466
+
1467
+ Defined in: [styles/types.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L37)
1468
+
1469
+ Values accepted by `t.vars(...)` defaults and `.set(...)`.
1470
+
1471
+ ***
1472
+
1473
+ ### CssVarPath [#cssvarpath]
1474
+
1475
+ ```ts
1476
+ type CssVarPath = string;
1477
+ ```
1478
+
1479
+ Defined in: [styles/types.ts:34](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L34)
1480
+
1481
+ Theme-token path or any other CSS-var key the resolver knows.
1482
+
1483
+ ***
1484
+
1485
+ ### DeclarationSegment [#declarationsegment]
1486
+
1487
+ ```ts
1488
+ type DeclarationSegment = string | LocalVarMarker;
1489
+ ```
1490
+
1491
+ Defined in: [styles/types.ts:94](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L94)
1492
+
1493
+ Literal CSS text or a local-var interpolation marker.
1494
+
1495
+ ***
1496
+
1497
+ ### DeepPartialTheme [#deeppartialtheme]
1498
+
1499
+ ```ts
1500
+ 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;
1501
+ ```
1502
+
1503
+ Defined in: [theme.ts:80](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L80)
1504
+
1505
+ Partial variation of a [ThemeTree](#themetree). Leaves may change kind between `string` and [SchemePair](#schemepair).
1506
+
1507
+ #### Type Parameters
1508
+
1509
+ | Type Parameter |
1510
+ | ------ |
1511
+ | `T` |
1512
+
1513
+ ***
1514
+
1515
+ ### LocalVarGroup [#localvargroup]
1516
+
1517
+ ```ts
1518
+ type LocalVarGroup<TKey> = { readonly [P in TKey]: LocalVarRef } & object;
1519
+ ```
1520
+
1521
+ Defined in: [local\_vars.ts:79](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L79)
1522
+
1523
+ Value returned by `t.vars(...)`. Interpolate `${group}`, `${group.key}`, or `${group.set({...})}`.
1524
+
1525
+ #### Type Declaration
1526
+
1527
+ ##### set()
1528
+
1529
+ ```ts
1530
+ set(overrides): LocalVarOverrideMarker;
1531
+ ```
1532
+
1533
+ Builds a marker that writes the given keys at the interpolation site.
1534
+
1535
+ ###### Parameters
1536
+
1537
+ | Parameter | Type |
1538
+ | ------ | ------ |
1539
+ | `overrides` | `Partial`\<`Record`\<`TKey`, [`CssValue`](#cssvalue)\>\> |
1540
+
1541
+ ###### Returns
1542
+
1543
+ [`LocalVarOverrideMarker`](#localvaroverridemarker)
1544
+
1545
+ #### Type Parameters
1546
+
1547
+ | Type Parameter |
1548
+ | ------ |
1549
+ | `TKey` *extends* `string` |
1550
+
1551
+ ***
1552
+
1553
+ ### LocalVarMarker [#localvarmarker]
1554
+
1555
+ ```ts
1556
+ type LocalVarMarker =
1557
+ | LocalVarOverrideMarker
1558
+ | LocalVarDefaultMarker;
1559
+ ```
1560
+
1561
+ Defined in: [local\_vars.ts:74](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/local_vars.ts#L74)
1562
+
1563
+ Interpolation marker: `${group}` defaults or `${group.set(...)}` overrides.
1564
+
1565
+ ***
1566
+
1567
+ ### PathsOf [#pathsof]
1568
+
1569
+ ```ts
1570
+ 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;
1571
+ ```
1572
+
1573
+ Defined in: [theme.ts:55](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L55)
1574
+
1575
+ Slash-delimited theme-var paths (excludes [ScaleToken](#scaletoken) leaves).
1576
+
1577
+ #### Type Parameters
1578
+
1579
+ | Type Parameter | Default type |
1580
+ | ------ | ------ |
1581
+ | `T` | - |
1582
+ | `Prefix` *extends* `string` | `""` |
1583
+
1584
+ ***
1585
+
1586
+ ### ResolvedStyles [#resolvedstyles]
1587
+
1588
+ ```ts
1589
+ 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;
1590
+ ```
1591
+
1592
+ Defined in: [styles/types.ts:206](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L206)
1593
+
1594
+ Resolves nested pending handles, rules, and medias into their runtime types.
1595
+
1596
+ #### Type Parameters
1597
+
1598
+ | Type Parameter |
1599
+ | ------ |
1600
+ | `TValue` |
1601
+
1602
+ ***
1603
+
1604
+ ### SchemeValueTree [#schemevaluetree]
1605
+
1606
+ ```ts
1607
+ type SchemeValueTree = object;
1608
+ ```
1609
+
1610
+ Defined in: [theme.ts:32](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L32)
1611
+
1612
+ Per-scheme value tree accepted by [zipSchemes](#zipschemes).
1613
+
1614
+ #### Index Signature
1615
+
1616
+ ```ts
1617
+ [key: string]:
1618
+ | string
1619
+ | ScaleToken
1620
+ | SchemeValueTree
1621
+ ```
1622
+
1623
+ ***
1624
+
1625
+ ### StyleEntry [#styleentry]
1626
+
1627
+ ```ts
1628
+ type StyleEntry =
1629
+ | StyleHandle
1630
+ | StyleRule
1631
+ | StyleMedia;
1632
+ ```
1633
+
1634
+ Defined in: [styles/types.ts:174](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L174)
1635
+
1636
+ One registered handle, selector rule, or at-rule block.
1637
+
1638
+ ***
1639
+
1640
+ ### StyleNameMode [#stylenamemode]
1641
+
1642
+ ```ts
1643
+ type StyleNameMode = "compact" | "readable";
1644
+ ```
1645
+
1646
+ Defined in: [names.ts:9](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L9)
1647
+
1648
+ Naming scheme: `compact` assigns sequential identifiers by sorted key index, `readable` emits descriptive ones.
1649
+
1650
+ ***
1651
+
1652
+ ### StyleSelectorResolver [#styleselectorresolver]
1653
+
1654
+ ```ts
1655
+ type StyleSelectorResolver = (handle) => string & Record<string, string>;
1656
+ ```
1657
+
1658
+ Defined in: [styles/types.ts:176](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L176)
1659
+
1660
+ Selector factory: call with a handle, or read sibling local names as `.class` strings.
1661
+
1662
+ ***
1663
+
1664
+ ### StylesObject [#stylesobject]
1665
+
1666
+ ```ts
1667
+ type StylesObject = Record<string, unknown>;
1668
+ ```
1669
+
1670
+ Defined in: [styles/types.ts:196](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/types.ts#L196)
1671
+
1672
+ Authored module tree before [ResolvedStyles](#resolvedstyles) substitution.
1673
+
1674
+ ***
1675
+
1676
+ ### StyleTarget [#styletarget]
1677
+
1678
+ ```ts
1679
+ type StyleTarget = "artifact" | "stylesheet";
1680
+ ```
1681
+
1682
+ Defined in: [names.ts:11](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L11)
1683
+
1684
+ Destination format for the CSS collection.
1685
+
1686
+ ***
1687
+
1688
+ ### ThemeTree [#themetree]
1689
+
1690
+ ```ts
1691
+ type ThemeTree = object;
1692
+ ```
1693
+
1694
+ Defined in: [theme.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L27)
1695
+
1696
+ Nested authoring tree. Keys must match `/^[A-Za-z_][A-Za-z0-9_]*$/`.
1697
+
1698
+ #### Index Signature
1699
+
1700
+ ```ts
1701
+ [key: string]: ThemeLeaf | ThemeTree
1702
+ ```
1703
+
1704
+ ***
1705
+
1706
+ ### ThemeVariation [#themevariation]
1707
+
1708
+ ```ts
1709
+ type ThemeVariation<T> =
1710
+ | DeepPartialTheme<T>
1711
+ | MediaThemeVariation<T>;
1712
+ ```
1713
+
1714
+ Defined in: [theme.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L97)
1715
+
1716
+ Named variation: a partial of the base, or a media-conditioned partial.
1717
+
1718
+ #### Type Parameters
1719
+
1720
+ | Type Parameter | Default type |
1721
+ | ------ | ------ |
1722
+ | `T` *extends* [`ThemeTree`](#themetree) | [`ThemeTree`](#themetree) |
1723
+
1724
+ ***
1725
+
1726
+ ### TokensOf [#tokensof]
1727
+
1728
+ ```ts
1729
+ type TokensOf<T> = T extends ScaleToken ? ScaleToken : T extends SchemePair | string ? CssToken : T extends object ? { readonly [K in keyof T]: TokensOf<T[K]> } : never;
1730
+ ```
1731
+
1732
+ Defined in: [theme.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L37)
1733
+
1734
+ Token tree derived from an authoring [ThemeTree](#themetree).
1735
+
1736
+ #### Type Parameters
1737
+
1738
+ | Type Parameter |
1739
+ | ------ |
1740
+ | `T` |
1741
+
1742
+ ***
1743
+
1744
+ ### ValuesOf [#valuesof]
1745
+
1746
+ ```ts
1747
+ type ValuesOf<T> = T extends ScaleToken ? string : T extends SchemePair | string ? string : T extends object ? { readonly [K in keyof T]: ValuesOf<T[K]> } : never;
1748
+ ```
1749
+
1750
+ Defined in: [theme.ts:46](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L46)
1751
+
1752
+ Literal-value tree for one scheme. [ScaleToken](#scaletoken) leaves use `.value`.
1753
+
1754
+ #### Type Parameters
1755
+
1756
+ | Type Parameter |
1757
+ | ------ |
1758
+ | `T` |
1759
+
1760
+ ***
1761
+
1762
+ ### Zipped [#zipped]
1763
+
1764
+ ```ts
1765
+ type Zipped<T> = T extends ScaleToken ? ScaleToken : T extends string ? string | SchemePair : T extends object ? { readonly [K in keyof T]: Zipped<T[K]> } : never;
1766
+ ```
1767
+
1768
+ Defined in: [theme.ts:71](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L71)
1769
+
1770
+ [zipSchemes](#zipschemes) output: equal strings collapse; differing strings become [SchemePair](#schemepair).
1771
+
1772
+ #### Type Parameters
1773
+
1774
+ | Type Parameter |
1775
+ | ------ |
1776
+ | `T` |
1777
+
1778
+ ## Variables
1779
+
1780
+ ### cq [#cq-1]
1781
+
1782
+ ```ts
1783
+ const cq: (value, cq) => ScaleToken = scaleToken;
1784
+ ```
1785
+
1786
+ Defined in: [tokens/scale\_token.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L37)
1787
+
1788
+ Alias of [scaleToken](#scaletoken-1) for theme-tree authoring.
1789
+
1790
+ Literal size token. Stringifies to `value`; `cq` is the container-relative variant.
1791
+
1792
+ #### Parameters
1793
+
1794
+ | Parameter | Type |
1795
+ | ------ | ------ |
1796
+ | `value` | `string` |
1797
+ | `cq` | `string` |
1798
+
1799
+ #### Returns
1800
+
1801
+ [`ScaleToken`](#scaletoken)
1802
+
1803
+ ## Functions
1804
+
1805
+ ### combineClassNames() [#combineclassnames]
1806
+
1807
+ ```ts
1808
+ function combineClassNames(context, ...handles): string;
1809
+ ```
1810
+
1811
+ Defined in: [styles/authoring.ts:203](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L203)
1812
+
1813
+ Resolves handles through the collector's class-name resolver.
1814
+
1815
+ #### Parameters
1816
+
1817
+ | Parameter | Type | Description |
1818
+ | ------ | ------ | ------ |
1819
+ | `context` | \{ `resolveClassName`: (...`handles`) => `string`; \} | Object exposing `resolveClassName` (e.g. a React render context). |
1820
+ | `context.resolveClassName` | (...`handles`) => `string` | - |
1821
+ | ...`handles` | readonly [`StyleHandle`](#stylehandle)[] | One or more handles to resolve and join. |
1822
+
1823
+ #### Returns
1824
+
1825
+ `string`
1826
+
1827
+ ***
1828
+
1829
+ ### container() [#container]
1830
+
1831
+ ```ts
1832
+ function container(query, rules): StyleMedia;
1833
+ ```
1834
+
1835
+ Defined in: [styles/authoring.ts:140](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L140)
1836
+
1837
+ `@container` block. `kind` stays `'media'` so emission rank matches [media](#media-2).
1838
+
1839
+ #### Parameters
1840
+
1841
+ | Parameter | Type | Description |
1842
+ | ------ | ------ | ------ |
1843
+ | `query` | `string` | Container query string (e.g. `(min-width: 400px)`). |
1844
+ | `rules` | readonly [`StyleRule`](#stylerule)[] | Inner rules scoped to this block. |
1845
+
1846
+ #### Returns
1847
+
1848
+ [`StyleMedia`](#stylemedia)
1849
+
1850
+ ***
1851
+
1852
+ ### contextualVar() [#contextualvar]
1853
+
1854
+ ```ts
1855
+ function contextualVar(path, prop): ContextualCssVar;
1856
+ ```
1857
+
1858
+ Defined in: [tokens/contextual\_var.ts:41](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L41)
1859
+
1860
+ Shared contextual var. Stringifies to `var(<prop>)`; `.name` is the ident.
1861
+
1862
+ #### Parameters
1863
+
1864
+ | Parameter | Type |
1865
+ | ------ | ------ |
1866
+ | `path` | `` `vars/${string}` `` |
1867
+ | `prop` | `` `--${string}` `` |
1868
+
1869
+ #### Returns
1870
+
1871
+ [`ContextualCssVar`](#contextualcssvar)
1872
+
1873
+ ***
1874
+
1875
+ ### createDistillery() [#createdistillery]
1876
+
1877
+ ```ts
1878
+ function createDistillery<TTheme>(options): Distillery<TokensOf<TTheme>, TTheme>;
1879
+ ```
1880
+
1881
+ Defined in: [engine.ts:128](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/engine.ts#L128)
1882
+
1883
+ Binds the engine to one library's prefix and theme tree.
1884
+
1885
+ #### Type Parameters
1886
+
1887
+ | Type Parameter |
1888
+ | ------ |
1889
+ | `TTheme` *extends* [`ThemeTree`](#themetree) |
1890
+
1891
+ #### Parameters
1892
+
1893
+ | Parameter | Type | Description |
1894
+ | ------ | ------ | ------ |
1895
+ | `options` | [`DistilleryOptions`](#distilleryoptions)\<`TTheme`\> | Brand prefix, theme scope, and authoring theme tree. |
1896
+
1897
+ #### Returns
1898
+
1899
+ [`Distillery`](#distillery)\<[`TokensOf`](#tokensof)\<`TTheme`\>, `TTheme`\>
1900
+
1901
+ #### Throws
1902
+
1903
+ 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.
1904
+
1905
+ ***
1906
+
1907
+ ### createDomSink() [#createdomsink]
1908
+
1909
+ ```ts
1910
+ function createDomSink(__namedParameters): StyleSink;
1911
+ ```
1912
+
1913
+ Defined in: [dom\_sink.ts:33](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/dom_sink.ts#L33)
1914
+
1915
+ One managed `<style>` element, rewritten on each flush.
1916
+
1917
+ #### Parameters
1918
+
1919
+ | Parameter | Type |
1920
+ | ------ | ------ |
1921
+ | `__namedParameters` | [`CreateDomSinkOptions`](#createdomsinkoptions) |
1922
+
1923
+ #### Returns
1924
+
1925
+ [`StyleSink`](#stylesink)
1926
+
1927
+ ***
1928
+
1929
+ ### createStyleNameResolver() [#createstylenameresolver]
1930
+
1931
+ ```ts
1932
+ function createStyleNameResolver(__namedParameters): StyleNameResolver;
1933
+ ```
1934
+
1935
+ Defined in: [names.ts:102](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L102)
1936
+
1937
+ Maps semantic keys to readable (`<prefix>-<key>`) or compact (`a`, `b`, …) names.
1938
+
1939
+ #### Parameters
1940
+
1941
+ | Parameter | Type |
1942
+ | ------ | ------ |
1943
+ | `__namedParameters` | [`StyleNameResolverOptions`](#stylenameresolveroptions) |
1944
+
1945
+ #### Returns
1946
+
1947
+ [`StyleNameResolver`](#stylenameresolver)
1948
+
1949
+ ***
1950
+
1951
+ ### css() [#css-3]
1952
+
1953
+ ```ts
1954
+ function css(strings, ...values): PendingStyleHandle;
1955
+ ```
1956
+
1957
+ Defined in: [styles/authoring.ts:37](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L37)
1958
+
1959
+ Handle template. Nested `&` / `@media` flatten into sibling rules.
1960
+
1961
+ #### Parameters
1962
+
1963
+ | Parameter | Type |
1964
+ | ------ | ------ |
1965
+ | `strings` | `TemplateStringsArray` |
1966
+ | ...`values` | readonly `unknown`[] |
1967
+
1968
+ #### Returns
1969
+
1970
+ `PendingStyleHandle`
1971
+
1972
+ ***
1973
+
1974
+ ### cssVarName() [#cssvarname]
1975
+
1976
+ ```ts
1977
+ function cssVarName(prefix, path): `--${string}`;
1978
+ ```
1979
+
1980
+ Defined in: [names.ts:86](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/names.ts#L86)
1981
+
1982
+ Readable custom-property name: `--${prefix}-${path}` with `/` joined on `-` and a leading `vars/` stripped.
1983
+
1984
+ #### Parameters
1985
+
1986
+ | Parameter | Type | Description |
1987
+ | ------ | ------ | ------ |
1988
+ | `prefix` | `string` | Brand prefix (e.g. `'eui'`). |
1989
+ | `path` | `string` | Theme or contextual-var path (e.g. `'colors/ink'`, `'vars/chip/look/bg'`). |
1990
+
1991
+ #### Returns
1992
+
1993
+ `` `--${string}` ``
1994
+
1995
+ ***
1996
+
1997
+ ### decls() [#decls-1]
1998
+
1999
+ ```ts
2000
+ function decls(strings, ...values): Declarations;
2001
+ ```
2002
+
2003
+ Defined in: [styles/authoring.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L31)
2004
+
2005
+ Declaration-block template. Interpolations stringify; local-var markers stay until render.
2006
+
2007
+ #### Parameters
2008
+
2009
+ | Parameter | Type |
2010
+ | ------ | ------ |
2011
+ | `strings` | `TemplateStringsArray` |
2012
+ | ...`values` | readonly `unknown`[] |
2013
+
2014
+ #### Returns
2015
+
2016
+ [`Declarations`](#declarations)
2017
+
2018
+ ***
2019
+
2020
+ ### isContextualCssVar() [#iscontextualcssvar]
2021
+
2022
+ ```ts
2023
+ function isContextualCssVar(value): value is ContextualCssVar;
2024
+ ```
2025
+
2026
+ Defined in: [tokens/contextual\_var.ts:66](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L66)
2027
+
2028
+ `true` when `value` is a [ContextualCssVar](#contextualcssvar).
2029
+
2030
+ #### Parameters
2031
+
2032
+ | Parameter | Type | Description |
2033
+ | ------ | ------ | ------ |
2034
+ | `value` | `unknown` | Value to test. |
2035
+
2036
+ #### Returns
2037
+
2038
+ `value is ContextualCssVar`
2039
+
2040
+ ***
2041
+
2042
+ ### isContextualCssVarName() [#iscontextualcssvarname]
2043
+
2044
+ ```ts
2045
+ function isContextualCssVarName(value): value is ContextualCssVarName;
2046
+ ```
2047
+
2048
+ Defined in: [tokens/contextual\_var.ts:70](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/contextual_var.ts#L70)
2049
+
2050
+ `true` when `value` is a [ContextualCssVarName](#contextualcssvarname-1).
2051
+
2052
+ #### Parameters
2053
+
2054
+ | Parameter | Type | Description |
2055
+ | ------ | ------ | ------ |
2056
+ | `value` | `unknown` | Value to test. |
2057
+
2058
+ #### Returns
2059
+
2060
+ `value is ContextualCssVarName`
2061
+
2062
+ ***
2063
+
2064
+ ### isCssToken() [#iscsstoken]
2065
+
2066
+ ```ts
2067
+ function isCssToken(value): value is CssToken;
2068
+ ```
2069
+
2070
+ Defined in: [tokens/theme\_token.ts:41](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L41)
2071
+
2072
+ `true` when `value` is a [CssToken](#csstoken).
2073
+
2074
+ #### Parameters
2075
+
2076
+ | Parameter | Type | Description |
2077
+ | ------ | ------ | ------ |
2078
+ | `value` | `unknown` | Value to test. |
2079
+
2080
+ #### Returns
2081
+
2082
+ `value is CssToken`
2083
+
2084
+ ***
2085
+
2086
+ ### isScaleToken() [#isscaletoken]
2087
+
2088
+ ```ts
2089
+ function isScaleToken(value): value is ScaleToken;
2090
+ ```
2091
+
2092
+ Defined in: [tokens/scale\_token.ts:40](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L40)
2093
+
2094
+ `true` when `value` is a [ScaleToken](#scaletoken).
2095
+
2096
+ #### Parameters
2097
+
2098
+ | Parameter | Type | Description |
2099
+ | ------ | ------ | ------ |
2100
+ | `value` | `unknown` | Value to test. |
2101
+
2102
+ #### Returns
2103
+
2104
+ `value is ScaleToken`
2105
+
2106
+ ***
2107
+
2108
+ ### lightDark() [#lightdark]
2109
+
2110
+ ```ts
2111
+ function lightDark(light, dark): SchemePair;
2112
+ ```
2113
+
2114
+ Defined in: [tokens/light\_dark.ts:31](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/light_dark.ts#L31)
2115
+
2116
+ Scheme-varying color pair. Both sides must be CSS `<color>` values.
2117
+
2118
+ #### Parameters
2119
+
2120
+ | Parameter | Type | Description |
2121
+ | ------ | ------ | ------ |
2122
+ | `light` | `string` | Light color-scheme value. |
2123
+ | `dark` | `string` | Dark color-scheme value. |
2124
+
2125
+ #### Returns
2126
+
2127
+ [`SchemePair`](#schemepair)
2128
+
2129
+ #### Throws
2130
+
2131
+ If either value is not a CSS `<color>`.
2132
+
2133
+ ***
2134
+
2135
+ ### mapDomain() [#mapdomain]
2136
+
2137
+ ```ts
2138
+ function mapDomain<TKey, TValue>(domain, factory): Record<TKey, TValue>;
2139
+ ```
2140
+
2141
+ Defined in: [styles/authoring.ts:171](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L171)
2142
+
2143
+ Builds a record keyed by `domain`. No CSS-collection side effect.
2144
+
2145
+ #### Type Parameters
2146
+
2147
+ | Type Parameter |
2148
+ | ------ |
2149
+ | `TKey` *extends* `string` |
2150
+ | `TValue` |
2151
+
2152
+ #### Parameters
2153
+
2154
+ | Parameter | Type | Description |
2155
+ | ------ | ------ | ------ |
2156
+ | `domain` | readonly `TKey`[] | All valid keys (e.g. `['primary', 'secondary']`). |
2157
+ | `factory` | (`value`) => `TValue` | Called once per key. |
2158
+
2159
+ #### Returns
2160
+
2161
+ `Record`\<`TKey`, `TValue`\>
2162
+
2163
+ ***
2164
+
2165
+ ### media() [#media-2]
2166
+
2167
+ ```ts
2168
+ function media(query, rules): StyleMedia;
2169
+ ```
2170
+
2171
+ Defined in: [styles/authoring.ts:121](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L121)
2172
+
2173
+ `@media` block wrapping rules.
2174
+
2175
+ #### Parameters
2176
+
2177
+ | Parameter | Type | Description |
2178
+ | ------ | ------ | ------ |
2179
+ | `query` | `string` | Media query string (e.g. `(min-width: 600px)`). |
2180
+ | `rules` | readonly [`StyleRule`](#stylerule)[] | Inner rules scoped to this block. |
2181
+
2182
+ #### Returns
2183
+
2184
+ [`StyleMedia`](#stylemedia)
2185
+
2186
+ ***
2187
+
2188
+ ### renderStyles() [#renderstyles-1]
2189
+
2190
+ ```ts
2191
+ function renderStyles(
2192
+ environment,
2193
+ collector,
2194
+ resolver?,
2195
+ options?
2196
+ ): string;
2197
+ ```
2198
+
2199
+ Defined in: [runtime.ts:39](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/runtime.ts#L39)
2200
+
2201
+ Emits collected CSS: theme block, then entries, minified.
2202
+
2203
+ #### Parameters
2204
+
2205
+ | Parameter | Type | Description |
2206
+ | ------ | ------ | ------ |
2207
+ | `environment` | [`DistilleryEnvironment`](#distilleryenvironment-1)\<`unknown`\> | Theme vars, prefix, and scope for this render. |
2208
+ | `collector` | [`StylesCollector`](#stylescollector) | Reachable entries and deps. |
2209
+ | `resolver` | [`StyleNameResolver`](#stylenameresolver) | Defaults to `collector.createResolver()`. |
2210
+ | `options` | [`RenderStylesOptions`](#renderstylesoptions) | - |
2211
+
2212
+ #### Returns
2213
+
2214
+ `string`
2215
+
2216
+ ***
2217
+
2218
+ ### resolveThemeValues() [#resolvethemevalues]
2219
+
2220
+ ```ts
2221
+ function resolveThemeValues<T>(
2222
+ theme,
2223
+ themeVars,
2224
+ scheme,
2225
+ variation?
2226
+ ): ValuesOf<T>;
2227
+ ```
2228
+
2229
+ Defined in: [theme.ts:142](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L142)
2230
+
2231
+ Nested literal values for one scheme. Walks `theme` so [ScaleToken](#scaletoken) leaves resolve to `.value`.
2232
+
2233
+ #### Type Parameters
2234
+
2235
+ | Type Parameter |
2236
+ | ------ |
2237
+ | `T` *extends* [`ThemeTree`](#themetree) |
2238
+
2239
+ #### Parameters
2240
+
2241
+ | Parameter | Type | Description |
2242
+ | ------ | ------ | ------ |
2243
+ | `theme` | `T` | Authoring tree that produced `themeVars`. |
2244
+ | `themeVars` | `Readonly`\<`Record`\<`string`, [`ThemeVarDefinition`](#themevardefinition)\>\> | Base registry from [Distillery.themeVars](#themevars). |
2245
+ | `scheme` | `"light"` \| `"dark"` | Which side of each [ThemeVarDefinition](#themevardefinition) to read. |
2246
+ | `variation?` | [`ResolvedThemeVariation`](#resolvedthemevariation) | When set, overridden paths come from `variation.diffs`; everything else stays on `themeVars`. |
2247
+
2248
+ #### Returns
2249
+
2250
+ [`ValuesOf`](#valuesof)\<`T`\>
2251
+
2252
+ ***
2253
+
2254
+ ### rule() [#rule]
2255
+
2256
+ ```ts
2257
+ function rule(
2258
+ selector,
2259
+ declarations,
2260
+ options?
2261
+ ): StyleRule;
2262
+ ```
2263
+
2264
+ Defined in: [styles/authoring.ts:97](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L97)
2265
+
2266
+ Selector plus declarations. `dependsOn` is filled when the module is constructed.
2267
+
2268
+ #### Parameters
2269
+
2270
+ | Parameter | Type | Description |
2271
+ | ------ | ------ | ------ |
2272
+ | `selector` | (`h`) => `string` | Factory receiving a [StyleSelectorResolver](#styleselectorresolver); uses `&` and handle aliases. |
2273
+ | `declarations` | [`Declarations`](#declarations) | CSS properties for this rule. |
2274
+ | `options` | [`RuleOptions`](#ruleoptions) | `auto` controls whether the rule self-collects when its handle dependencies are met. |
2275
+
2276
+ #### Returns
2277
+
2278
+ [`StyleRule`](#stylerule)
2279
+
2280
+ ***
2281
+
2282
+ ### scaleToken() [#scaletoken-1]
2283
+
2284
+ ```ts
2285
+ function scaleToken(value, cq): ScaleToken;
2286
+ ```
2287
+
2288
+ Defined in: [tokens/scale\_token.ts:25](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/scale_token.ts#L25)
2289
+
2290
+ Literal size token. Stringifies to `value`; `cq` is the container-relative variant.
2291
+
2292
+ #### Parameters
2293
+
2294
+ | Parameter | Type |
2295
+ | ------ | ------ |
2296
+ | `value` | `string` |
2297
+ | `cq` | `string` |
2298
+
2299
+ #### Returns
2300
+
2301
+ [`ScaleToken`](#scaletoken)
2302
+
2303
+ ***
2304
+
2305
+ ### themeToken() [#themetoken]
2306
+
2307
+ ```ts
2308
+ function themeToken(path, cssVar): CssToken;
2309
+ ```
2310
+
2311
+ Defined in: [tokens/theme\_token.ts:27](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/tokens/theme_token.ts#L27)
2312
+
2313
+ Theme token that stringifies to `var(<cssVar>)`.
2314
+
2315
+ #### Parameters
2316
+
2317
+ | Parameter | Type |
2318
+ | ------ | ------ |
2319
+ | `path` | `string` |
2320
+ | `cssVar` | `` `--${string}` `` |
2321
+
2322
+ #### Returns
2323
+
2324
+ [`CssToken`](#csstoken)
2325
+
2326
+ ***
2327
+
2328
+ ### variants() [#variants]
2329
+
2330
+ ```ts
2331
+ function variants<TKey, TValue>(domain, factory): Record<TKey, TValue>;
2332
+ ```
2333
+
2334
+ Defined in: [styles/authoring.ts:186](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/styles/authoring.ts#L186)
2335
+
2336
+ Builds a record of styles keyed by `domain`. Each value is marked `variant` so [StylesCollector.use](#use) skips it.
2337
+
2338
+ #### Type Parameters
2339
+
2340
+ | Type Parameter |
2341
+ | ------ |
2342
+ | `TKey` *extends* `string` |
2343
+ | `TValue` |
2344
+
2345
+ #### Parameters
2346
+
2347
+ | Parameter | Type | Description |
2348
+ | ------ | ------ | ------ |
2349
+ | `domain` | readonly `TKey`[] | All valid variant keys (e.g. `['primary', 'secondary']`). |
2350
+ | `factory` | (`value`) => `TValue` | Called once per key; returns the handle or nested style object for that variant. |
2351
+
2352
+ #### Returns
2353
+
2354
+ `Record`\<`TKey`, `TValue`\>
2355
+
2356
+ ***
2357
+
2358
+ ### zipSchemes() [#zipschemes]
2359
+
2360
+ ```ts
2361
+ function zipSchemes<T>(light, dark): Zipped<T>;
2362
+ ```
2363
+
2364
+ Defined in: [theme.ts:119](https://github.com/elastic/distillate/blob/d1dccb0eb5372d5984331c21603220340752a304/src/theme.ts#L119)
2365
+
2366
+ Folds two per-scheme trees into one authoring tree. Equal string leaves stay bare; differing strings become [lightDark](#lightdark). [ScaleToken](#scaletoken) leaves must agree.
2367
+
2368
+ #### Type Parameters
2369
+
2370
+ | Type Parameter |
2371
+ | ------ |
2372
+ | `T` *extends* [`SchemeValueTree`](#schemevaluetree) |
2373
+
2374
+ #### Parameters
2375
+
2376
+ | Parameter | Type | Description |
2377
+ | ------ | ------ | ------ |
2378
+ | `light` | `T` | Light-scheme value tree. |
2379
+ | `dark` | `T` | Dark-scheme value tree. |
2380
+
2381
+ #### Returns
2382
+
2383
+ [`Zipped`](#zipped)\<`T`\>
2384
+
2385
+ #### Throws
2386
+
2387
+ If shapes, leaf kinds, or scale values disagree, or if a differing string pair is not a CSS `<color>`.