@aeris-ui/core 22.0.0-alpha.7 → 22.0.0-alpha.9

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 (263) hide show
  1. package/README.md +2 -2
  2. package/fesm2022/aeris-ui-core-accordion.mjs +646 -255
  3. package/fesm2022/aeris-ui-core-accordion.mjs.map +1 -1
  4. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs +284 -103
  5. package/fesm2022/aeris-ui-core-animate-on-scroll.mjs.map +1 -1
  6. package/fesm2022/aeris-ui-core-auto-complete.mjs +1171 -428
  7. package/fesm2022/aeris-ui-core-auto-complete.mjs.map +1 -1
  8. package/fesm2022/aeris-ui-core-auto-focus.mjs +111 -61
  9. package/fesm2022/aeris-ui-core-auto-focus.mjs.map +1 -1
  10. package/fesm2022/aeris-ui-core-avatar.mjs +383 -101
  11. package/fesm2022/aeris-ui-core-avatar.mjs.map +1 -1
  12. package/fesm2022/aeris-ui-core-badge.mjs +562 -115
  13. package/fesm2022/aeris-ui-core-badge.mjs.map +1 -1
  14. package/fesm2022/aeris-ui-core-block-ui.mjs +205 -101
  15. package/fesm2022/aeris-ui-core-block-ui.mjs.map +1 -1
  16. package/fesm2022/aeris-ui-core-breadcrumb.mjs +547 -177
  17. package/fesm2022/aeris-ui-core-breadcrumb.mjs.map +1 -1
  18. package/fesm2022/aeris-ui-core-button-group.mjs +153 -38
  19. package/fesm2022/aeris-ui-core-button-group.mjs.map +1 -1
  20. package/fesm2022/aeris-ui-core-button.mjs +730 -110
  21. package/fesm2022/aeris-ui-core-button.mjs.map +1 -1
  22. package/fesm2022/aeris-ui-core-card.mjs +371 -101
  23. package/fesm2022/aeris-ui-core-card.mjs.map +1 -1
  24. package/fesm2022/aeris-ui-core-carousel.mjs +690 -353
  25. package/fesm2022/aeris-ui-core-carousel.mjs.map +1 -1
  26. package/fesm2022/aeris-ui-core-cascade-select.mjs +915 -423
  27. package/fesm2022/aeris-ui-core-cascade-select.mjs.map +1 -1
  28. package/fesm2022/aeris-ui-core-chart.mjs +455 -258
  29. package/fesm2022/aeris-ui-core-chart.mjs.map +1 -1
  30. package/fesm2022/aeris-ui-core-checkbox.mjs +432 -135
  31. package/fesm2022/aeris-ui-core-checkbox.mjs.map +1 -1
  32. package/fesm2022/aeris-ui-core-chip.mjs +430 -117
  33. package/fesm2022/aeris-ui-core-chip.mjs.map +1 -1
  34. package/fesm2022/aeris-ui-core-class-names.mjs +87 -65
  35. package/fesm2022/aeris-ui-core-class-names.mjs.map +1 -1
  36. package/fesm2022/aeris-ui-core-color-picker.mjs +1313 -683
  37. package/fesm2022/aeris-ui-core-color-picker.mjs.map +1 -1
  38. package/fesm2022/aeris-ui-core-compare.mjs +819 -310
  39. package/fesm2022/aeris-ui-core-compare.mjs.map +1 -1
  40. package/fesm2022/aeris-ui-core-confirm-dialog.mjs +1392 -551
  41. package/fesm2022/aeris-ui-core-confirm-dialog.mjs.map +1 -1
  42. package/fesm2022/aeris-ui-core-confirm-popup.mjs +1447 -744
  43. package/fesm2022/aeris-ui-core-confirm-popup.mjs.map +1 -1
  44. package/fesm2022/aeris-ui-core-context-menu.mjs +900 -450
  45. package/fesm2022/aeris-ui-core-context-menu.mjs.map +1 -1
  46. package/fesm2022/aeris-ui-core-date-picker.mjs +1656 -863
  47. package/fesm2022/aeris-ui-core-date-picker.mjs.map +1 -1
  48. package/fesm2022/aeris-ui-core-dialog.mjs +1066 -355
  49. package/fesm2022/aeris-ui-core-dialog.mjs.map +1 -1
  50. package/fesm2022/aeris-ui-core-divider.mjs +204 -43
  51. package/fesm2022/aeris-ui-core-divider.mjs.map +1 -1
  52. package/fesm2022/aeris-ui-core-drawer.mjs +1002 -326
  53. package/fesm2022/aeris-ui-core-drawer.mjs.map +1 -1
  54. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs +402 -249
  55. package/fesm2022/aeris-ui-core-dynamic-dialog.mjs.map +1 -1
  56. package/fesm2022/aeris-ui-core-editor.mjs +934 -572
  57. package/fesm2022/aeris-ui-core-editor.mjs.map +1 -1
  58. package/fesm2022/aeris-ui-core-file-upload.mjs +1339 -514
  59. package/fesm2022/aeris-ui-core-file-upload.mjs.map +1 -1
  60. package/fesm2022/aeris-ui-core-filter-service.mjs +258 -301
  61. package/fesm2022/aeris-ui-core-filter-service.mjs.map +1 -1
  62. package/fesm2022/aeris-ui-core-fluid.mjs +68 -21
  63. package/fesm2022/aeris-ui-core-fluid.mjs.map +1 -1
  64. package/fesm2022/aeris-ui-core-focus-trap.mjs +206 -182
  65. package/fesm2022/aeris-ui-core-focus-trap.mjs.map +1 -1
  66. package/fesm2022/aeris-ui-core-form-field.mjs +672 -170
  67. package/fesm2022/aeris-ui-core-form-field.mjs.map +1 -1
  68. package/fesm2022/aeris-ui-core-galleria.mjs +1987 -797
  69. package/fesm2022/aeris-ui-core-galleria.mjs.map +1 -1
  70. package/fesm2022/aeris-ui-core-glass.mjs +110 -33
  71. package/fesm2022/aeris-ui-core-glass.mjs.map +1 -1
  72. package/fesm2022/aeris-ui-core-icon-field.mjs +426 -103
  73. package/fesm2022/aeris-ui-core-icon-field.mjs.map +1 -1
  74. package/fesm2022/aeris-ui-core-inplace.mjs +452 -130
  75. package/fesm2022/aeris-ui-core-inplace.mjs.map +1 -1
  76. package/fesm2022/aeris-ui-core-input-group.mjs +413 -112
  77. package/fesm2022/aeris-ui-core-input-group.mjs.map +1 -1
  78. package/fesm2022/aeris-ui-core-input-mask.mjs +650 -248
  79. package/fesm2022/aeris-ui-core-input-mask.mjs.map +1 -1
  80. package/fesm2022/aeris-ui-core-input-number.mjs +902 -334
  81. package/fesm2022/aeris-ui-core-input-number.mjs.map +1 -1
  82. package/fesm2022/aeris-ui-core-input-otp.mjs +667 -253
  83. package/fesm2022/aeris-ui-core-input-otp.mjs.map +1 -1
  84. package/fesm2022/aeris-ui-core-input-text.mjs +618 -152
  85. package/fesm2022/aeris-ui-core-input-text.mjs.map +1 -1
  86. package/fesm2022/aeris-ui-core-key-filter.mjs +263 -201
  87. package/fesm2022/aeris-ui-core-key-filter.mjs.map +1 -1
  88. package/fesm2022/aeris-ui-core-mega-menu.mjs +601 -388
  89. package/fesm2022/aeris-ui-core-mega-menu.mjs.map +1 -1
  90. package/fesm2022/aeris-ui-core-menu.mjs +1032 -495
  91. package/fesm2022/aeris-ui-core-menu.mjs.map +1 -1
  92. package/fesm2022/aeris-ui-core-menubar.mjs +960 -491
  93. package/fesm2022/aeris-ui-core-menubar.mjs.map +1 -1
  94. package/fesm2022/aeris-ui-core-message.mjs +477 -145
  95. package/fesm2022/aeris-ui-core-message.mjs.map +1 -1
  96. package/fesm2022/aeris-ui-core-meter-group.mjs +587 -196
  97. package/fesm2022/aeris-ui-core-meter-group.mjs.map +1 -1
  98. package/fesm2022/aeris-ui-core-multi-select.mjs +1550 -552
  99. package/fesm2022/aeris-ui-core-multi-select.mjs.map +1 -1
  100. package/fesm2022/aeris-ui-core-order-list.mjs +518 -202
  101. package/fesm2022/aeris-ui-core-order-list.mjs.map +1 -1
  102. package/fesm2022/aeris-ui-core-organization-chart.mjs +455 -177
  103. package/fesm2022/aeris-ui-core-organization-chart.mjs.map +1 -1
  104. package/fesm2022/aeris-ui-core-paginator.mjs +329 -127
  105. package/fesm2022/aeris-ui-core-paginator.mjs.map +1 -1
  106. package/fesm2022/aeris-ui-core-panel.mjs +596 -196
  107. package/fesm2022/aeris-ui-core-panel.mjs.map +1 -1
  108. package/fesm2022/aeris-ui-core-password.mjs +894 -247
  109. package/fesm2022/aeris-ui-core-password.mjs.map +1 -1
  110. package/fesm2022/aeris-ui-core-pick-list.mjs +1280 -659
  111. package/fesm2022/aeris-ui-core-pick-list.mjs.map +1 -1
  112. package/fesm2022/aeris-ui-core-popover.mjs +892 -386
  113. package/fesm2022/aeris-ui-core-popover.mjs.map +1 -1
  114. package/fesm2022/aeris-ui-core-progress-bar.mjs +549 -176
  115. package/fesm2022/aeris-ui-core-progress-bar.mjs.map +1 -1
  116. package/fesm2022/aeris-ui-core-progress-spinner.mjs +410 -133
  117. package/fesm2022/aeris-ui-core-progress-spinner.mjs.map +1 -1
  118. package/fesm2022/aeris-ui-core-radio-button.mjs +386 -119
  119. package/fesm2022/aeris-ui-core-radio-button.mjs.map +1 -1
  120. package/fesm2022/aeris-ui-core-rating.mjs +502 -225
  121. package/fesm2022/aeris-ui-core-rating.mjs.map +1 -1
  122. package/fesm2022/aeris-ui-core-scroll-panel.mjs +457 -154
  123. package/fesm2022/aeris-ui-core-scroll-panel.mjs.map +1 -1
  124. package/fesm2022/aeris-ui-core-scroll-top.mjs +204 -63
  125. package/fesm2022/aeris-ui-core-scroll-top.mjs.map +1 -1
  126. package/fesm2022/aeris-ui-core-select.mjs +1794 -643
  127. package/fesm2022/aeris-ui-core-select.mjs.map +1 -1
  128. package/fesm2022/aeris-ui-core-skeleton.mjs +149 -45
  129. package/fesm2022/aeris-ui-core-skeleton.mjs.map +1 -1
  130. package/fesm2022/aeris-ui-core-slider.mjs +868 -404
  131. package/fesm2022/aeris-ui-core-slider.mjs.map +1 -1
  132. package/fesm2022/aeris-ui-core-speed-dial.mjs +800 -329
  133. package/fesm2022/aeris-ui-core-speed-dial.mjs.map +1 -1
  134. package/fesm2022/aeris-ui-core-split-button.mjs +918 -257
  135. package/fesm2022/aeris-ui-core-split-button.mjs.map +1 -1
  136. package/fesm2022/aeris-ui-core-splitter.mjs +812 -352
  137. package/fesm2022/aeris-ui-core-splitter.mjs.map +1 -1
  138. package/fesm2022/aeris-ui-core-stepper.mjs +697 -254
  139. package/fesm2022/aeris-ui-core-stepper.mjs.map +1 -1
  140. package/fesm2022/aeris-ui-core-style-class.mjs +587 -342
  141. package/fesm2022/aeris-ui-core-style-class.mjs.map +1 -1
  142. package/fesm2022/aeris-ui-core-table.mjs +1984 -865
  143. package/fesm2022/aeris-ui-core-table.mjs.map +1 -1
  144. package/fesm2022/aeris-ui-core-tabs.mjs +686 -324
  145. package/fesm2022/aeris-ui-core-tabs.mjs.map +1 -1
  146. package/fesm2022/aeris-ui-core-textarea.mjs +846 -212
  147. package/fesm2022/aeris-ui-core-textarea.mjs.map +1 -1
  148. package/fesm2022/aeris-ui-core-theme-builder.mjs +1258 -1413
  149. package/fesm2022/aeris-ui-core-theme-builder.mjs.map +1 -1
  150. package/fesm2022/aeris-ui-core-theming.mjs +132 -147
  151. package/fesm2022/aeris-ui-core-theming.mjs.map +1 -1
  152. package/fesm2022/aeris-ui-core-tiered-menu.mjs +885 -465
  153. package/fesm2022/aeris-ui-core-tiered-menu.mjs.map +1 -1
  154. package/fesm2022/aeris-ui-core-timeline.mjs +407 -131
  155. package/fesm2022/aeris-ui-core-timeline.mjs.map +1 -1
  156. package/fesm2022/aeris-ui-core-toast.mjs +855 -615
  157. package/fesm2022/aeris-ui-core-toast.mjs.map +1 -1
  158. package/fesm2022/aeris-ui-core-toggle-switch.mjs +390 -127
  159. package/fesm2022/aeris-ui-core-toggle-switch.mjs.map +1 -1
  160. package/fesm2022/aeris-ui-core-toolbar.mjs +458 -121
  161. package/fesm2022/aeris-ui-core-toolbar.mjs.map +1 -1
  162. package/fesm2022/aeris-ui-core-tooltip.mjs +623 -345
  163. package/fesm2022/aeris-ui-core-tooltip.mjs.map +1 -1
  164. package/fesm2022/aeris-ui-core-tree-select.mjs +1356 -601
  165. package/fesm2022/aeris-ui-core-tree-select.mjs.map +1 -1
  166. package/fesm2022/aeris-ui-core-tree-table.mjs +2001 -942
  167. package/fesm2022/aeris-ui-core-tree-table.mjs.map +1 -1
  168. package/fesm2022/aeris-ui-core-tree.mjs +1103 -658
  169. package/fesm2022/aeris-ui-core-tree.mjs.map +1 -1
  170. package/fesm2022/aeris-ui-core.mjs +861 -842
  171. package/fesm2022/aeris-ui-core.mjs.map +1 -1
  172. package/package.json +1 -1
  173. package/schematics/runtime/theme-builder/aeris-theme.js +28 -16
  174. package/schematics/runtime/theme-builder/aeris-theme.js.map +1 -1
  175. package/styles/_fallback-colors.scss +3 -3
  176. package/styles/_tokens.scss +5 -5
  177. package/styles/aeris.css +12 -16
  178. package/styles/controls.css +1 -1
  179. package/types/aeris-ui-core-accordion.d.ts +166 -93
  180. package/types/aeris-ui-core-animate-on-scroll.d.ts +71 -31
  181. package/types/aeris-ui-core-auto-complete.d.ts +326 -149
  182. package/types/aeris-ui-core-auto-focus.d.ts +24 -16
  183. package/types/aeris-ui-core-avatar.d.ts +112 -42
  184. package/types/aeris-ui-core-badge.d.ts +160 -47
  185. package/types/aeris-ui-core-block-ui.d.ts +47 -27
  186. package/types/aeris-ui-core-breadcrumb.d.ts +162 -92
  187. package/types/aeris-ui-core-button-group.d.ts +37 -16
  188. package/types/aeris-ui-core-button.d.ts +226 -64
  189. package/types/aeris-ui-core-card.d.ts +74 -37
  190. package/types/aeris-ui-core-carousel.d.ts +197 -117
  191. package/types/aeris-ui-core-cascade-select.d.ts +252 -131
  192. package/types/aeris-ui-core-chart.d.ts +134 -84
  193. package/types/aeris-ui-core-checkbox.d.ts +139 -55
  194. package/types/aeris-ui-core-chip.d.ts +116 -51
  195. package/types/aeris-ui-core-class-names.d.ts +22 -20
  196. package/types/aeris-ui-core-color-picker.d.ts +347 -150
  197. package/types/aeris-ui-core-compare.d.ts +224 -101
  198. package/types/aeris-ui-core-confirm-dialog.d.ts +441 -249
  199. package/types/aeris-ui-core-confirm-popup.d.ts +440 -268
  200. package/types/aeris-ui-core-context-menu.d.ts +262 -150
  201. package/types/aeris-ui-core-date-picker.d.ts +488 -226
  202. package/types/aeris-ui-core-dialog.d.ts +288 -121
  203. package/types/aeris-ui-core-divider.d.ts +58 -20
  204. package/types/aeris-ui-core-drawer.d.ts +273 -116
  205. package/types/aeris-ui-core-dynamic-dialog.d.ts +157 -140
  206. package/types/aeris-ui-core-editor.d.ts +243 -124
  207. package/types/aeris-ui-core-file-upload.d.ts +366 -197
  208. package/types/aeris-ui-core-filter-service.d.ts +48 -52
  209. package/types/aeris-ui-core-fluid.d.ts +12 -9
  210. package/types/aeris-ui-core-focus-trap.d.ts +39 -31
  211. package/types/aeris-ui-core-form-field.d.ts +158 -62
  212. package/types/aeris-ui-core-galleria.d.ts +589 -256
  213. package/types/aeris-ui-core-glass.d.ts +24 -11
  214. package/types/aeris-ui-core-icon-field.d.ts +94 -34
  215. package/types/aeris-ui-core-inplace.d.ts +123 -62
  216. package/types/aeris-ui-core-input-group.d.ts +84 -35
  217. package/types/aeris-ui-core-input-mask.d.ts +194 -71
  218. package/types/aeris-ui-core-input-number.d.ts +272 -90
  219. package/types/aeris-ui-core-input-otp.d.ts +190 -82
  220. package/types/aeris-ui-core-input-text.d.ts +185 -62
  221. package/types/aeris-ui-core-key-filter.d.ts +53 -39
  222. package/types/aeris-ui-core-mega-menu.d.ts +174 -123
  223. package/types/aeris-ui-core-menu.d.ts +275 -172
  224. package/types/aeris-ui-core-menubar.d.ts +272 -160
  225. package/types/aeris-ui-core-message.d.ts +132 -61
  226. package/types/aeris-ui-core-meter-group.d.ts +162 -90
  227. package/types/aeris-ui-core-multi-select.d.ts +435 -187
  228. package/types/aeris-ui-core-order-list.d.ts +143 -66
  229. package/types/aeris-ui-core-organization-chart.d.ts +132 -77
  230. package/types/aeris-ui-core-paginator.d.ts +92 -46
  231. package/types/aeris-ui-core-panel.d.ts +149 -78
  232. package/types/aeris-ui-core-password.d.ts +257 -108
  233. package/types/aeris-ui-core-pick-list.d.ts +373 -179
  234. package/types/aeris-ui-core-popover.d.ts +218 -107
  235. package/types/aeris-ui-core-progress-bar.d.ts +156 -73
  236. package/types/aeris-ui-core-progress-spinner.d.ts +110 -48
  237. package/types/aeris-ui-core-radio-button.d.ts +124 -51
  238. package/types/aeris-ui-core-rating.d.ts +149 -76
  239. package/types/aeris-ui-core-scroll-panel.d.ts +142 -64
  240. package/types/aeris-ui-core-scroll-top.d.ts +64 -29
  241. package/types/aeris-ui-core-select.d.ts +474 -226
  242. package/types/aeris-ui-core-skeleton.d.ts +39 -17
  243. package/types/aeris-ui-core-slider.d.ts +270 -116
  244. package/types/aeris-ui-core-speed-dial.d.ts +240 -112
  245. package/types/aeris-ui-core-split-button.d.ts +265 -115
  246. package/types/aeris-ui-core-splitter.d.ts +224 -106
  247. package/types/aeris-ui-core-stepper.d.ts +183 -91
  248. package/types/aeris-ui-core-style-class.d.ts +141 -71
  249. package/types/aeris-ui-core-table.d.ts +595 -308
  250. package/types/aeris-ui-core-tabs.d.ts +163 -90
  251. package/types/aeris-ui-core-textarea.d.ts +261 -81
  252. package/types/aeris-ui-core-theme-builder.d.ts +466 -451
  253. package/types/aeris-ui-core-theming.d.ts +42 -49
  254. package/types/aeris-ui-core-tiered-menu.d.ts +249 -147
  255. package/types/aeris-ui-core-timeline.d.ts +108 -71
  256. package/types/aeris-ui-core-toast.d.ts +219 -155
  257. package/types/aeris-ui-core-toggle-switch.d.ts +125 -52
  258. package/types/aeris-ui-core-toolbar.d.ts +98 -41
  259. package/types/aeris-ui-core-tooltip.d.ts +157 -92
  260. package/types/aeris-ui-core-tree-select.d.ts +359 -179
  261. package/types/aeris-ui-core-tree-table.d.ts +565 -290
  262. package/types/aeris-ui-core-tree.d.ts +269 -165
  263. package/types/aeris-ui-core.d.ts +161 -125
@@ -1,1583 +1,1428 @@
1
1
  const AERIS_MONOCHROME_LIGHT_PRIMARY_TONE = {
2
- base: '#111111',
3
- boundary: '#111111',
4
- hover: '#242424',
5
- active: '#050505',
6
- onBase: '#ffffff',
7
- onHover: '#ffffff',
8
- onActive: '#ffffff',
9
- text: '#111111',
10
- soft: '#f1f1f1',
11
- onSoft: '#111111',
2
+ base: "#111111",
3
+ boundary: "#111111",
4
+ hover: "#242424",
5
+ active: "#050505",
6
+ onBase: "#ffffff",
7
+ onHover: "#ffffff",
8
+ onActive: "#ffffff",
9
+ text: "#111111",
10
+ soft: "#f1f1f1",
11
+ onSoft: "#111111"
12
12
  };
13
13
  const AERIS_MONOCHROME_DARK_PRIMARY_TONE = {
14
- base: '#f5f5f5',
15
- boundary: '#f5f5f5',
16
- hover: '#ffffff',
17
- active: '#e7e7e7',
18
- onBase: '#090909',
19
- onHover: '#090909',
20
- onActive: '#090909',
21
- text: '#f5f5f5',
22
- soft: '#1b1b1b',
23
- onSoft: '#ffffff',
14
+ base: "#f5f5f5",
15
+ boundary: "#f5f5f5",
16
+ hover: "#ffffff",
17
+ active: "#e7e7e7",
18
+ onBase: "#090909",
19
+ onHover: "#090909",
20
+ onActive: "#090909",
21
+ text: "#f5f5f5",
22
+ soft: "#1b1b1b",
23
+ onSoft: "#ffffff"
24
24
  };
25
25
  const AERIS_MONOCHROME_LIGHT_SECONDARY_TONE = {
26
- base: '#565656',
27
- boundary: '#565656',
28
- hover: '#464646',
29
- active: '#363636',
30
- onBase: '#ffffff',
31
- onHover: '#ffffff',
32
- onActive: '#ffffff',
33
- text: '#454545',
34
- soft: '#ededed',
35
- onSoft: '#242424',
26
+ base: "#565656",
27
+ boundary: "#565656",
28
+ hover: "#464646",
29
+ active: "#363636",
30
+ onBase: "#ffffff",
31
+ onHover: "#ffffff",
32
+ onActive: "#ffffff",
33
+ text: "#454545",
34
+ soft: "#ededed",
35
+ onSoft: "#242424"
36
36
  };
37
37
  const AERIS_MONOCHROME_DARK_SECONDARY_TONE = {
38
- base: '#b8b8b8',
39
- boundary: '#b8b8b8',
40
- hover: '#c8c8c8',
41
- active: '#a8a8a8',
42
- onBase: '#090909',
43
- onHover: '#090909',
44
- onActive: '#090909',
45
- text: '#d0d0d0',
46
- soft: '#262626',
47
- onSoft: '#f5f5f5',
38
+ base: "#b8b8b8",
39
+ boundary: "#b8b8b8",
40
+ hover: "#c8c8c8",
41
+ active: "#a8a8a8",
42
+ onBase: "#090909",
43
+ onHover: "#090909",
44
+ onActive: "#090909",
45
+ text: "#d0d0d0",
46
+ soft: "#262626",
47
+ onSoft: "#f5f5f5"
48
48
  };
49
49
  const AERIS_MONOCHROME_LIGHT_CONTRAST_TONE = {
50
- base: '#ffffff',
51
- boundary: '#111111',
52
- hover: '#f1f1f1',
53
- active: '#e3e3e3',
54
- onBase: '#111111',
55
- onHover: '#111111',
56
- onActive: '#111111',
57
- text: '#111111',
58
- soft: '#f1f1f1',
59
- onSoft: '#111111',
50
+ base: "#ffffff",
51
+ boundary: "#111111",
52
+ hover: "#f1f1f1",
53
+ active: "#e3e3e3",
54
+ onBase: "#111111",
55
+ onHover: "#111111",
56
+ onActive: "#111111",
57
+ text: "#111111",
58
+ soft: "#f1f1f1",
59
+ onSoft: "#111111"
60
60
  };
61
61
  const AERIS_MONOCHROME_DARK_CONTRAST_TONE = {
62
- base: '#090909',
63
- boundary: '#f5f5f5',
64
- hover: '#181818',
65
- active: '#242424',
66
- onBase: '#ffffff',
67
- onHover: '#ffffff',
68
- onActive: '#ffffff',
69
- text: '#f5f5f5',
70
- soft: '#1b1b1b',
71
- onSoft: '#ffffff',
62
+ base: "#090909",
63
+ boundary: "#f5f5f5",
64
+ hover: "#181818",
65
+ active: "#242424",
66
+ onBase: "#ffffff",
67
+ onHover: "#ffffff",
68
+ onActive: "#ffffff",
69
+ text: "#f5f5f5",
70
+ soft: "#1b1b1b",
71
+ onSoft: "#ffffff"
72
72
  };
73
73
  const AERIS_MONOCHROME_LIGHT_STATUS_TONES = {
74
- success: {
75
- base: '#2f6b46',
76
- hover: '#285c3c',
77
- active: '#214f34',
78
- onBase: '#ffffff',
79
- onHover: '#ffffff',
80
- onActive: '#ffffff',
81
- text: '#24573a',
82
- soft: '#edf5ef',
83
- onSoft: '#214f34',
84
- },
85
- info: {
86
- base: '#2f6178',
87
- hover: '#285368',
88
- active: '#214758',
89
- onBase: '#ffffff',
90
- onHover: '#ffffff',
91
- onActive: '#ffffff',
92
- text: '#264f62',
93
- soft: '#edf4f7',
94
- onSoft: '#214758',
95
- },
96
- warning: {
97
- base: '#c38600',
98
- hover: '#bd8200',
99
- active: '#b87d00',
100
- onBase: '#211600',
101
- onHover: '#211600',
102
- onActive: '#211600',
103
- text: '#8a6100',
104
- soft: '#fff5d6',
105
- onSoft: '#704e00',
106
- },
107
- danger: {
108
- base: '#c81e2a',
109
- hover: '#b51b26',
110
- active: '#a21822',
111
- onBase: '#ffffff',
112
- onHover: '#ffffff',
113
- onActive: '#ffffff',
114
- text: '#a31722',
115
- soft: '#fff0f1',
116
- onSoft: '#81131a',
117
- },
74
+ success: {
75
+ base: "#2f6b46",
76
+ hover: "#285c3c",
77
+ active: "#214f34",
78
+ onBase: "#ffffff",
79
+ onHover: "#ffffff",
80
+ onActive: "#ffffff",
81
+ text: "#24573a",
82
+ soft: "#edf5ef",
83
+ onSoft: "#214f34"
84
+ },
85
+ info: {
86
+ base: "#2f6178",
87
+ hover: "#285368",
88
+ active: "#214758",
89
+ onBase: "#ffffff",
90
+ onHover: "#ffffff",
91
+ onActive: "#ffffff",
92
+ text: "#264f62",
93
+ soft: "#edf4f7",
94
+ onSoft: "#214758"
95
+ },
96
+ warning: {
97
+ base: "#c38600",
98
+ hover: "#bd8200",
99
+ active: "#b87d00",
100
+ onBase: "#211600",
101
+ onHover: "#211600",
102
+ onActive: "#211600",
103
+ text: "#8a6100",
104
+ soft: "#fff5d6",
105
+ onSoft: "#704e00"
106
+ },
107
+ danger: {
108
+ base: "#c81e2a",
109
+ hover: "#b51b26",
110
+ active: "#a21822",
111
+ onBase: "#ffffff",
112
+ onHover: "#ffffff",
113
+ onActive: "#ffffff",
114
+ text: "#a31722",
115
+ soft: "#fff0f1",
116
+ onSoft: "#81131a"
117
+ }
118
118
  };
119
119
  const AERIS_MONOCHROME_DARK_STATUS_TONES = {
120
- success: {
121
- base: '#9fd3ae',
122
- hover: '#b5dfc0',
123
- active: '#8bc69c',
124
- onBase: '#0b1a10',
125
- onHover: '#0b1a10',
126
- onActive: '#0b1a10',
127
- text: '#9fd3ae',
128
- soft: '#17271d',
129
- onSoft: '#b5dfc0',
130
- },
131
- info: {
132
- base: '#9ecbe0',
133
- hover: '#b4d8e8',
134
- active: '#88bdd6',
135
- onBase: '#091923',
136
- onHover: '#091923',
137
- onActive: '#091923',
138
- text: '#9ecbe0',
139
- soft: '#17242a',
140
- onSoft: '#b4d8e8',
141
- },
142
- warning: {
143
- base: '#facc15',
144
- hover: '#ffdb4d',
145
- active: '#e7b900',
146
- onBase: '#211600',
147
- onHover: '#211600',
148
- onActive: '#211600',
149
- text: '#facc15',
150
- soft: '#2c2508',
151
- onSoft: '#ffdb4d',
152
- },
153
- danger: {
154
- base: '#ff5c68',
155
- hover: '#ff7b84',
156
- active: '#e84955',
157
- onBase: '#260609',
158
- onHover: '#260609',
159
- onActive: '#260609',
160
- text: '#ff5c68',
161
- soft: '#301416',
162
- onSoft: '#ff8f97',
163
- },
120
+ success: {
121
+ base: "#9fd3ae",
122
+ hover: "#b5dfc0",
123
+ active: "#8bc69c",
124
+ onBase: "#0b1a10",
125
+ onHover: "#0b1a10",
126
+ onActive: "#0b1a10",
127
+ text: "#9fd3ae",
128
+ soft: "#17271d",
129
+ onSoft: "#b5dfc0"
130
+ },
131
+ info: {
132
+ base: "#9ecbe0",
133
+ hover: "#b4d8e8",
134
+ active: "#88bdd6",
135
+ onBase: "#091923",
136
+ onHover: "#091923",
137
+ onActive: "#091923",
138
+ text: "#9ecbe0",
139
+ soft: "#17242a",
140
+ onSoft: "#b4d8e8"
141
+ },
142
+ warning: {
143
+ base: "#facc15",
144
+ hover: "#ffdb4d",
145
+ active: "#e7b900",
146
+ onBase: "#211600",
147
+ onHover: "#211600",
148
+ onActive: "#211600",
149
+ text: "#facc15",
150
+ soft: "#2c2508",
151
+ onSoft: "#ffdb4d"
152
+ },
153
+ danger: {
154
+ base: "#ff5c68",
155
+ hover: "#ff7b84",
156
+ active: "#e84955",
157
+ onBase: "#260609",
158
+ onHover: "#260609",
159
+ onActive: "#260609",
160
+ text: "#ff5c68",
161
+ soft: "#301416",
162
+ onSoft: "#ff8f97"
163
+ }
164
+ };
165
+ const AERIS_COLORED_DARK_SCHEME = {
166
+ page: "#0c0c0c",
167
+ surface: "#121212",
168
+ surface2: "#191919",
169
+ surface3: "#232323",
170
+ interactiveHover: "#292929",
171
+ border: "#292929",
172
+ borderStrong: "#757575"
164
173
  };
165
- /** Accessible Aeris starter themes that can be passed directly to provideAeris(). */
166
174
  const AERIS_THEME_PRESETS = {
167
- earth: {
168
- palette: {
169
- surface: '#f6f3e8',
170
- primary: '#5f6f36',
171
- secondary: '#b75e26',
172
- accent: '#d79a32',
173
- contrast: '#28351a',
174
- },
175
- },
176
- coastal: {
177
- palette: {
178
- surface: '#eef3f5',
179
- primary: '#33789b',
180
- secondary: '#347b73',
181
- accent: '#d46f58',
182
- contrast: '#163e54',
183
- },
184
- },
185
- orchid: {
186
- palette: {
187
- surface: '#f3eef5',
188
- primary: '#7654ad',
189
- secondary: '#a94f79',
190
- accent: '#d59a36',
191
- contrast: '#3a2949',
192
- },
193
- },
194
- monochrome: {
195
- palette: {
196
- surface: '#f4f4f4',
197
- primary: '#111111',
198
- secondary: '#1f1f1f',
199
- accent: '#f8f8f8',
200
- contrast: '#050505',
201
- },
202
- light: {
203
- accent: '#111111',
204
- page: '#f7f7f7',
205
- surface: '#ffffff',
206
- surface2: '#f3f3f3',
207
- surface3: '#e8e8e8',
208
- interactiveHover: '#e8e8e8',
209
- text: '#111111',
210
- text2: '#242424',
211
- text3: '#454545',
212
- border: '#efefef',
213
- borderStrong: '#111111',
214
- focus: '#111111',
215
- shadowXs: '0 1px 2px rgb(0 0 0 / 10%)',
216
- shadowSm: '0 2px 5px rgb(0 0 0 / 14%)',
217
- tones: {
218
- primary: AERIS_MONOCHROME_LIGHT_PRIMARY_TONE,
219
- secondary: AERIS_MONOCHROME_LIGHT_SECONDARY_TONE,
220
- ...AERIS_MONOCHROME_LIGHT_STATUS_TONES,
221
- contrast: AERIS_MONOCHROME_LIGHT_CONTRAST_TONE,
222
- },
223
- },
224
- dark: {
225
- accent: '#f5f5f5',
226
- page: '#070707',
227
- surface: '#0c0c0c',
228
- surface2: '#151515',
229
- surface3: '#202020',
230
- interactiveHover: '#292929',
231
- text: '#f8f8f8',
232
- text2: '#ededed',
233
- text3: '#d0d0d0',
234
- border: '#242424',
235
- borderStrong: '#ffffff',
236
- focus: '#ffffff',
237
- shadowXs: '0 1px 2px rgb(0 0 0 / 48%)',
238
- shadowSm: '0 2px 6px rgb(0 0 0 / 62%)',
239
- tones: {
240
- primary: AERIS_MONOCHROME_DARK_PRIMARY_TONE,
241
- secondary: AERIS_MONOCHROME_DARK_SECONDARY_TONE,
242
- ...AERIS_MONOCHROME_DARK_STATUS_TONES,
243
- contrast: AERIS_MONOCHROME_DARK_CONTRAST_TONE,
244
- },
245
- },
246
- },
175
+ earth: {
176
+ palette: {
177
+ surface: "#f1f4f2",
178
+ primary: "#2c694b",
179
+ secondary: "#52685b",
180
+ accent: "#a88245",
181
+ contrast: "#343b37"
182
+ },
183
+ dark: AERIS_COLORED_DARK_SCHEME
184
+ },
185
+ coastal: {
186
+ palette: {
187
+ surface: "#f1f4f8",
188
+ primary: "#2d63a8",
189
+ secondary: "#546b89",
190
+ accent: "#368678",
191
+ contrast: "#39404a"
192
+ },
193
+ dark: AERIS_COLORED_DARK_SCHEME
194
+ },
195
+ orchid: {
196
+ palette: {
197
+ surface: "#f5f2f8",
198
+ primary: "#7551a8",
199
+ secondary: "#6f607f",
200
+ accent: "#a46b82",
201
+ contrast: "#453b4e"
202
+ },
203
+ dark: AERIS_COLORED_DARK_SCHEME
204
+ },
205
+ monochrome: {
206
+ palette: {
207
+ surface: "#f4f4f4",
208
+ primary: "#111111",
209
+ secondary: "#1f1f1f",
210
+ accent: "#f8f8f8",
211
+ contrast: "#050505"
212
+ },
213
+ light: {
214
+ accent: "#111111",
215
+ page: "#f7f7f7",
216
+ surface: "#ffffff",
217
+ surface2: "#f3f3f3",
218
+ surface3: "#e8e8e8",
219
+ interactiveHover: "#e8e8e8",
220
+ text: "#111111",
221
+ text2: "#242424",
222
+ text3: "#454545",
223
+ border: "#efefef",
224
+ borderStrong: "#111111",
225
+ focus: "#111111",
226
+ shadowXs: "0 1px 2px rgb(0 0 0 / 10%)",
227
+ shadowSm: "0 2px 5px rgb(0 0 0 / 14%)",
228
+ tones: {
229
+ primary: AERIS_MONOCHROME_LIGHT_PRIMARY_TONE,
230
+ secondary: AERIS_MONOCHROME_LIGHT_SECONDARY_TONE,
231
+ ...AERIS_MONOCHROME_LIGHT_STATUS_TONES,
232
+ contrast: AERIS_MONOCHROME_LIGHT_CONTRAST_TONE
233
+ }
234
+ },
235
+ dark: {
236
+ accent: "#f5f5f5",
237
+ page: "#070707",
238
+ surface: "#0c0c0c",
239
+ surface2: "#151515",
240
+ surface3: "#202020",
241
+ interactiveHover: "#292929",
242
+ text: "#f8f8f8",
243
+ text2: "#ededed",
244
+ text3: "#d0d0d0",
245
+ border: "#242424",
246
+ borderStrong: "#ffffff",
247
+ focus: "#ffffff",
248
+ shadowXs: "0 1px 2px rgb(0 0 0 / 48%)",
249
+ shadowSm: "0 2px 6px rgb(0 0 0 / 62%)",
250
+ tones: {
251
+ primary: AERIS_MONOCHROME_DARK_PRIMARY_TONE,
252
+ secondary: AERIS_MONOCHROME_DARK_SECONDARY_TONE,
253
+ ...AERIS_MONOCHROME_DARK_STATUS_TONES,
254
+ contrast: AERIS_MONOCHROME_DARK_CONTRAST_TONE
255
+ }
256
+ }
257
+ }
247
258
  };
248
259
  const AERIS_DENSITY_PRESETS = {
249
- compact: {
250
- controlHeight: '2.125rem',
251
- controlPaddingX: '0.625rem',
252
- itemHeight: '2rem',
253
- itemPaddingY: '0.375rem',
254
- itemPaddingX: '0.625rem',
255
- gap: '0.375rem',
256
- iconSize: '0.9375rem',
257
- },
258
- medium: {
259
- controlHeight: '2.625rem',
260
- controlPaddingX: '0.75rem',
261
- itemHeight: '2.5rem',
262
- itemPaddingY: '0.5rem',
263
- itemPaddingX: '0.75rem',
264
- gap: '0.5rem',
265
- iconSize: '1rem',
266
- },
267
- comfortable: {
268
- controlHeight: '3.125rem',
269
- controlPaddingX: '0.875rem',
270
- itemHeight: '2.875rem',
271
- itemPaddingY: '0.625rem',
272
- itemPaddingX: '0.875rem',
273
- gap: '0.625rem',
274
- iconSize: '1.0625rem',
275
- },
260
+ compact: {
261
+ controlHeight: "2.125rem",
262
+ controlPaddingX: "0.625rem",
263
+ itemHeight: "2rem",
264
+ itemPaddingY: "0.375rem",
265
+ itemPaddingX: "0.625rem",
266
+ gap: "0.375rem",
267
+ iconSize: "0.9375rem"
268
+ },
269
+ medium: {
270
+ controlHeight: "2.625rem",
271
+ controlPaddingX: "0.75rem",
272
+ itemHeight: "2.5rem",
273
+ itemPaddingY: "0.5rem",
274
+ itemPaddingX: "0.75rem",
275
+ gap: "0.5rem",
276
+ iconSize: "1rem"
277
+ },
278
+ comfortable: {
279
+ controlHeight: "3.125rem",
280
+ controlPaddingX: "0.875rem",
281
+ itemHeight: "2.875rem",
282
+ itemPaddingY: "0.625rem",
283
+ itemPaddingX: "0.875rem",
284
+ gap: "0.625rem",
285
+ iconSize: "1.0625rem"
286
+ }
276
287
  };
277
288
  const AERIS_RADIUS_PRESETS = {
278
- soft: {
279
- sm: '0.25rem',
280
- md: '0.375rem',
281
- lg: '0.5rem',
282
- xl: '0.75rem',
283
- control: '0.25rem',
284
- pill: '999px',
285
- },
286
- rounded: {
287
- sm: '0.4375rem',
288
- md: '0.5625rem',
289
- lg: '0.75rem',
290
- xl: '1rem',
291
- control: '0.4375rem',
292
- pill: '999px',
293
- },
294
- pill: {
295
- sm: '0.75rem',
296
- md: '1rem',
297
- lg: '1.25rem',
298
- xl: '1.5rem',
299
- control: '999px',
300
- pill: '999px',
301
- },
289
+ soft: {
290
+ sm: "0.25rem",
291
+ md: "0.375rem",
292
+ lg: "0.5rem",
293
+ xl: "0.75rem",
294
+ control: "0.25rem",
295
+ pill: "999px"
296
+ },
297
+ rounded: {
298
+ sm: "0.4375rem",
299
+ md: "0.5625rem",
300
+ lg: "0.75rem",
301
+ xl: "1rem",
302
+ control: "0.4375rem",
303
+ pill: "999px"
304
+ },
305
+ pill: {
306
+ sm: "0.75rem",
307
+ md: "1rem",
308
+ lg: "1.25rem",
309
+ xl: "1.5rem",
310
+ control: "999px",
311
+ pill: "999px"
312
+ }
302
313
  };
303
314
  const AERIS_DEFAULT_THEME = {
304
- palette: {
305
- ...AERIS_THEME_PRESETS.earth.palette,
306
- mist: AERIS_THEME_PRESETS.earth.palette.surface,
307
- sage: AERIS_THEME_PRESETS.earth.palette.primary,
308
- cloud: AERIS_THEME_PRESETS.earth.palette.secondary,
309
- sand: AERIS_THEME_PRESETS.earth.palette.accent,
310
- umber: AERIS_THEME_PRESETS.earth.palette.contrast,
311
- },
312
- light: {},
313
- dark: {},
314
- radius: 'rounded',
315
- radii: AERIS_RADIUS_PRESETS,
316
- density: 'medium',
317
- densities: AERIS_DENSITY_PRESETS,
315
+ palette: {
316
+ ...AERIS_THEME_PRESETS.earth.palette,
317
+ mist: AERIS_THEME_PRESETS.earth.palette.surface,
318
+ sage: AERIS_THEME_PRESETS.earth.palette.primary,
319
+ cloud: AERIS_THEME_PRESETS.earth.palette.secondary,
320
+ sand: AERIS_THEME_PRESETS.earth.palette.accent,
321
+ umber: AERIS_THEME_PRESETS.earth.palette.contrast
322
+ },
323
+ light: {},
324
+ dark: AERIS_COLORED_DARK_SCHEME,
325
+ radius: "rounded",
326
+ radii: AERIS_RADIUS_PRESETS,
327
+ density: "medium",
328
+ densities: AERIS_DENSITY_PRESETS
318
329
  };
319
-
320
- const ACHROMATIC_CHROMA = 0.01;
330
+ const ACHROMATIC_CHROMA = .01;
321
331
  const GAMUT_SEARCH_STEPS = 24;
322
- const SRGB_GAMUT_TOLERANCE = 0.000_000_1;
323
332
  function parseAerisColor(value) {
324
- const color = value.trim().toLowerCase();
325
- if (color === 'black')
326
- return { red: 0, green: 0, blue: 0 };
327
- if (color === 'white')
328
- return { red: 255, green: 255, blue: 255 };
329
- if (color.startsWith('#'))
330
- return parseHex(color);
331
- if (color.startsWith('rgb(') || color.startsWith('rgba('))
332
- return parseRgb(color);
333
- if (color.startsWith('hsl(') || color.startsWith('hsla('))
334
- return parseHsl(color);
335
- return null;
333
+ const color = value.trim().toLowerCase();
334
+ if (color === "black") return {
335
+ red: 0,
336
+ green: 0,
337
+ blue: 0
338
+ };
339
+ if (color === "white") return {
340
+ red: 255,
341
+ green: 255,
342
+ blue: 255
343
+ };
344
+ if (color.startsWith("#")) return parseHex(color);
345
+ if (color.startsWith("rgb(") || color.startsWith("rgba(")) return parseRgb(color);
346
+ if (color.startsWith("hsl(") || color.startsWith("hsla(")) return parseHsl(color);
347
+ return null;
336
348
  }
337
349
  function mixAerisColor(from, to, amount) {
338
- const weight = clampUnit(amount);
339
- const start = parseAerisColor(from);
340
- const end = parseAerisColor(to);
341
- if (!start || !end) {
342
- const startWeight = formatPercentage((1 - weight) * 100);
343
- return `color-mix(in oklch, ${from} ${startWeight}%, ${to})`;
344
- }
345
- return formatAerisHex(mixAerisRgb(start, end, weight));
350
+ const weight = clampUnit(amount);
351
+ const start = parseAerisColor(from);
352
+ const end = parseAerisColor(to);
353
+ if (!start || !end) return `color-mix(in oklch, ${from} ${formatPercentage((1 - weight) * 100)}%, ${to})`;
354
+ return formatAerisHex(mixAerisRgb(start, end, weight));
346
355
  }
347
356
  function aerisContrastRatio(first, second) {
348
- const firstColor = parseAerisColor(first);
349
- const secondColor = parseAerisColor(second);
350
- if (!firstColor || !secondColor)
351
- return null;
352
- return aerisRgbContrastRatio(firstColor, secondColor);
357
+ const firstColor = parseAerisColor(first);
358
+ const secondColor = parseAerisColor(second);
359
+ if (!firstColor || !secondColor) return null;
360
+ return aerisRgbContrastRatio(firstColor, secondColor);
353
361
  }
354
362
  function aerisRgbContrastRatio(first, second) {
355
- const firstLuminance = relativeLuminance(first);
356
- const secondLuminance = relativeLuminance(second);
357
- const lighter = Math.max(firstLuminance, secondLuminance);
358
- const darker = Math.min(firstLuminance, secondLuminance);
359
- return (lighter + 0.05) / (darker + 0.05);
363
+ const firstLuminance = relativeLuminance(first);
364
+ const secondLuminance = relativeLuminance(second);
365
+ const lighter = Math.max(firstLuminance, secondLuminance);
366
+ const darker = Math.min(firstLuminance, secondLuminance);
367
+ return (lighter + .05) / (darker + .05);
360
368
  }
361
369
  function mixAerisRgb(from, to, amount) {
362
- const weight = clampUnit(amount);
363
- if (weight === 0)
364
- return { ...from };
365
- if (weight === 1)
366
- return { ...to };
367
- const start = oklabToOklch(rgbToOklab(from));
368
- const end = oklabToOklch(rgbToOklab(to));
369
- const mixed = {
370
- lightness: interpolate(start.lightness, end.lightness, weight),
371
- chroma: interpolate(start.chroma, end.chroma, weight),
372
- hue: interpolateHue(start.hue, end.hue, weight),
373
- };
374
- return oklchToGamutMappedRgb(mixed);
370
+ const weight = clampUnit(amount);
371
+ if (weight === 0) return { ...from };
372
+ if (weight === 1) return { ...to };
373
+ const start = oklabToOklch(rgbToOklab(from));
374
+ const end = oklabToOklch(rgbToOklab(to));
375
+ return oklchToGamutMappedRgb({
376
+ lightness: interpolate(start.lightness, end.lightness, weight),
377
+ chroma: interpolate(start.chroma, end.chroma, weight),
378
+ hue: interpolateHue(start.hue, end.hue, weight)
379
+ });
375
380
  }
376
381
  function formatAerisHex(color) {
377
- const channel = (value) => Math.round(clampChannel(value)).toString(16).padStart(2, '0');
378
- return `#${channel(color.red)}${channel(color.green)}${channel(color.blue)}`;
382
+ const channel = (value) => Math.round(clampChannel(value)).toString(16).padStart(2, "0");
383
+ return `#${channel(color.red)}${channel(color.green)}${channel(color.blue)}`;
379
384
  }
380
385
  function relativeLuminance(color) {
381
- const linear = (value) => {
382
- const channel = value / 255;
383
- return channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;
384
- };
385
- return 0.2126 * linear(color.red) + 0.7152 * linear(color.green) + 0.0722 * linear(color.blue);
386
+ const linear = (value) => {
387
+ const channel = value / 255;
388
+ return channel <= .04045 ? channel / 12.92 : ((channel + .055) / 1.055) ** 2.4;
389
+ };
390
+ return .2126 * linear(color.red) + .7152 * linear(color.green) + .0722 * linear(color.blue);
386
391
  }
387
392
  function rgbToOklab(color) {
388
- const red = srgbToLinear(clampChannel(color.red) / 255);
389
- const green = srgbToLinear(clampChannel(color.green) / 255);
390
- const blue = srgbToLinear(clampChannel(color.blue) / 255);
391
- const l = 0.4122214708 * red + 0.5363325363 * green + 0.0514459929 * blue;
392
- const m = 0.2119034982 * red + 0.6806995451 * green + 0.1073969566 * blue;
393
- const s = 0.0883024619 * red + 0.2817188376 * green + 0.6299787005 * blue;
394
- const lRoot = Math.cbrt(l);
395
- const mRoot = Math.cbrt(m);
396
- const sRoot = Math.cbrt(s);
397
- return {
398
- lightness: 0.2104542553 * lRoot + 0.793617785 * mRoot - 0.0040720468 * sRoot,
399
- a: 1.9779984951 * lRoot - 2.428592205 * mRoot + 0.4505937099 * sRoot,
400
- b: 0.0259040371 * lRoot + 0.7827717662 * mRoot - 0.808675766 * sRoot,
401
- };
393
+ const red = srgbToLinear(clampChannel(color.red) / 255);
394
+ const green = srgbToLinear(clampChannel(color.green) / 255);
395
+ const blue = srgbToLinear(clampChannel(color.blue) / 255);
396
+ const l = .4122214708 * red + .5363325363 * green + .0514459929 * blue;
397
+ const m = .2119034982 * red + .6806995451 * green + .1073969566 * blue;
398
+ const s = .0883024619 * red + .2817188376 * green + .6299787005 * blue;
399
+ const lRoot = Math.cbrt(l);
400
+ const mRoot = Math.cbrt(m);
401
+ const sRoot = Math.cbrt(s);
402
+ return {
403
+ lightness: .2104542553 * lRoot + .793617785 * mRoot - .0040720468 * sRoot,
404
+ a: 1.9779984951 * lRoot - 2.428592205 * mRoot + .4505937099 * sRoot,
405
+ b: .0259040371 * lRoot + .7827717662 * mRoot - .808675766 * sRoot
406
+ };
402
407
  }
403
408
  function oklabToOklch(color) {
404
- const chroma = Math.hypot(color.a, color.b);
405
- const achromatic = chroma < ACHROMATIC_CHROMA;
406
- return {
407
- lightness: color.lightness,
408
- chroma: achromatic ? 0 : chroma,
409
- hue: achromatic ? null : normalizeHue((Math.atan2(color.b, color.a) * 180) / Math.PI),
410
- };
409
+ const chroma = Math.hypot(color.a, color.b);
410
+ const achromatic = chroma < ACHROMATIC_CHROMA;
411
+ return {
412
+ lightness: color.lightness,
413
+ chroma: achromatic ? 0 : chroma,
414
+ hue: achromatic ? null : normalizeHue(Math.atan2(color.b, color.a) * 180 / Math.PI)
415
+ };
411
416
  }
412
417
  function oklchToGamutMappedRgb(color) {
413
- const direct = oklchToSrgb(color);
414
- if (isInSrgbGamut(direct))
415
- return toRgbChannels(direct);
416
- let minimumChroma = 0;
417
- let maximumChroma = color.chroma;
418
- let mapped = oklchToSrgb({ ...color, chroma: minimumChroma });
419
- for (let step = 0; step < GAMUT_SEARCH_STEPS; step += 1) {
420
- const chroma = (minimumChroma + maximumChroma) / 2;
421
- const candidate = oklchToSrgb({ ...color, chroma });
422
- if (isInSrgbGamut(candidate)) {
423
- minimumChroma = chroma;
424
- mapped = candidate;
425
- }
426
- else {
427
- maximumChroma = chroma;
428
- }
429
- }
430
- return toRgbChannels(mapped);
418
+ const direct = oklchToSrgb(color);
419
+ if (isInSrgbGamut(direct)) return toRgbChannels(direct);
420
+ let minimumChroma = 0;
421
+ let maximumChroma = color.chroma;
422
+ let mapped = oklchToSrgb({
423
+ ...color,
424
+ chroma: minimumChroma
425
+ });
426
+ for (let step = 0; step < GAMUT_SEARCH_STEPS; step += 1) {
427
+ const chroma = (minimumChroma + maximumChroma) / 2;
428
+ const candidate = oklchToSrgb({
429
+ ...color,
430
+ chroma
431
+ });
432
+ if (isInSrgbGamut(candidate)) {
433
+ minimumChroma = chroma;
434
+ mapped = candidate;
435
+ } else maximumChroma = chroma;
436
+ }
437
+ return toRgbChannels(mapped);
431
438
  }
432
439
  function oklchToSrgb(color) {
433
- const hueRadians = ((color.hue ?? 0) * Math.PI) / 180;
434
- const a = color.chroma * Math.cos(hueRadians);
435
- const b = color.chroma * Math.sin(hueRadians);
436
- const lRoot = color.lightness + 0.3963377774 * a + 0.2158037573 * b;
437
- const mRoot = color.lightness - 0.1055613458 * a - 0.0638541728 * b;
438
- const sRoot = color.lightness - 0.0894841775 * a - 1.291485548 * b;
439
- const l = lRoot ** 3;
440
- const m = mRoot ** 3;
441
- const s = sRoot ** 3;
442
- return [
443
- linearToSrgb(4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s),
444
- linearToSrgb(-1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s),
445
- linearToSrgb(-0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s),
446
- ];
440
+ const hueRadians = (color.hue ?? 0) * Math.PI / 180;
441
+ const a = color.chroma * Math.cos(hueRadians);
442
+ const b = color.chroma * Math.sin(hueRadians);
443
+ const lRoot = color.lightness + .3963377774 * a + .2158037573 * b;
444
+ const mRoot = color.lightness - .1055613458 * a - .0638541728 * b;
445
+ const sRoot = color.lightness - .0894841775 * a - 1.291485548 * b;
446
+ const l = lRoot ** 3;
447
+ const m = mRoot ** 3;
448
+ const s = sRoot ** 3;
449
+ return [
450
+ linearToSrgb(4.0767416621 * l - 3.3077115913 * m + .2309699292 * s),
451
+ linearToSrgb(-1.2684380046 * l + 2.6097574011 * m - .3413193965 * s),
452
+ linearToSrgb(-.0041960863 * l - .7034186147 * m + 1.707614701 * s)
453
+ ];
447
454
  }
448
455
  function interpolateHue(from, to, amount) {
449
- if (from === null)
450
- return to;
451
- if (to === null)
452
- return from;
453
- const difference = ((to - from + 540) % 360) - 180;
454
- return normalizeHue(from + difference * amount);
456
+ if (from === null) return to;
457
+ if (to === null) return from;
458
+ return normalizeHue(from + ((to - from + 540) % 360 - 180) * amount);
455
459
  }
456
460
  function srgbToLinear(channel) {
457
- return channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4;
461
+ return channel <= .04045 ? channel / 12.92 : ((channel + .055) / 1.055) ** 2.4;
458
462
  }
459
463
  function linearToSrgb(channel) {
460
- return channel <= 0.0031308 ? channel * 12.92 : 1.055 * channel ** (1 / 2.4) - 0.055;
464
+ return channel <= .0031308 ? channel * 12.92 : 1.055 * channel ** (1 / 2.4) - .055;
461
465
  }
462
466
  function isInSrgbGamut(color) {
463
- return color.every((channel) => channel >= -SRGB_GAMUT_TOLERANCE && channel <= 1 + SRGB_GAMUT_TOLERANCE);
467
+ return color.every((channel) => channel >= -1e-7 && channel <= 1.0000001);
464
468
  }
465
469
  function toRgbChannels(color) {
466
- return {
467
- red: clampUnit(color[0]) * 255,
468
- green: clampUnit(color[1]) * 255,
469
- blue: clampUnit(color[2]) * 255,
470
- };
470
+ return {
471
+ red: clampUnit(color[0]) * 255,
472
+ green: clampUnit(color[1]) * 255,
473
+ blue: clampUnit(color[2]) * 255
474
+ };
471
475
  }
472
476
  function interpolate(from, to, amount) {
473
- return from + (to - from) * amount;
477
+ return from + (to - from) * amount;
474
478
  }
475
479
  function normalizeHue(hue) {
476
- return ((hue % 360) + 360) % 360;
480
+ return (hue % 360 + 360) % 360;
477
481
  }
478
482
  function formatPercentage(value) {
479
- return Number(value.toFixed(4)).toString();
483
+ return Number(value.toFixed(4)).toString();
480
484
  }
481
485
  function parseHex(value) {
482
- const hex = value.slice(1);
483
- if (!/^[\da-f]{3}([\da-f]{3})?$/i.test(hex))
484
- return null;
485
- const normalized = hex.length === 3 ? [...hex].map((character) => character.repeat(2)).join('') : hex;
486
- return {
487
- red: Number.parseInt(normalized.slice(0, 2), 16),
488
- green: Number.parseInt(normalized.slice(2, 4), 16),
489
- blue: Number.parseInt(normalized.slice(4, 6), 16),
490
- };
486
+ const hex = value.slice(1);
487
+ if (!/^[\da-f]{3}([\da-f]{3})?$/i.test(hex)) return null;
488
+ const normalized = hex.length === 3 ? [...hex].map((character) => character.repeat(2)).join("") : hex;
489
+ return {
490
+ red: Number.parseInt(normalized.slice(0, 2), 16),
491
+ green: Number.parseInt(normalized.slice(2, 4), 16),
492
+ blue: Number.parseInt(normalized.slice(4, 6), 16)
493
+ };
491
494
  }
492
495
  function parseRgb(value) {
493
- const functionalValue = splitFunctionalColor(value);
494
- if (!functionalValue)
495
- return null;
496
- const body = functionalValue.channels;
497
- if (!body)
498
- return null;
499
- const channels = body.replaceAll(',', ' ').split(/\s+/).filter(Boolean);
500
- if (channels.length !== 3)
501
- return null;
502
- const parsed = channels.map((channel) => {
503
- const numeric = Number.parseFloat(channel);
504
- if (!Number.isFinite(numeric))
505
- return Number.NaN;
506
- return channel.endsWith('%') ? numeric * 2.55 : numeric;
507
- });
508
- if (parsed.some((channel) => !Number.isFinite(channel)))
509
- return null;
510
- return {
511
- red: clampChannel(parsed[0]),
512
- green: clampChannel(parsed[1]),
513
- blue: clampChannel(parsed[2]),
514
- };
496
+ const functionalValue = splitFunctionalColor(value);
497
+ if (!functionalValue) return null;
498
+ const body = functionalValue.channels;
499
+ if (!body) return null;
500
+ const channels = body.replaceAll(",", " ").split(/\s+/).filter(Boolean);
501
+ if (channels.length !== 3) return null;
502
+ const parsed = channels.map((channel) => {
503
+ const numeric = Number.parseFloat(channel);
504
+ if (!Number.isFinite(numeric)) return NaN;
505
+ return channel.endsWith("%") ? numeric * 2.55 : numeric;
506
+ });
507
+ if (parsed.some((channel) => !Number.isFinite(channel))) return null;
508
+ return {
509
+ red: clampChannel(parsed[0]),
510
+ green: clampChannel(parsed[1]),
511
+ blue: clampChannel(parsed[2])
512
+ };
515
513
  }
516
514
  function parseHsl(value) {
517
- const functionalValue = splitFunctionalColor(value);
518
- if (!functionalValue)
519
- return null;
520
- const body = functionalValue.channels;
521
- if (!body)
522
- return null;
523
- const channels = body.replaceAll(',', ' ').split(/\s+/).filter(Boolean);
524
- if (channels.length !== 3 || !channels[1]?.endsWith('%') || !channels[2]?.endsWith('%')) {
525
- return null;
526
- }
527
- const hue = Number.parseFloat(channels[0]);
528
- const saturation = Number.parseFloat(channels[1]) / 100;
529
- const lightness = Number.parseFloat(channels[2]) / 100;
530
- if (![hue, saturation, lightness].every(Number.isFinite))
531
- return null;
532
- const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
533
- const section = (((hue % 360) + 360) % 360) / 60;
534
- const secondary = chroma * (1 - Math.abs((section % 2) - 1));
535
- const [red, green, blue] = section < 1
536
- ? [chroma, secondary, 0]
537
- : section < 2
538
- ? [secondary, chroma, 0]
539
- : section < 3
540
- ? [0, chroma, secondary]
541
- : section < 4
542
- ? [0, secondary, chroma]
543
- : section < 5
544
- ? [secondary, 0, chroma]
545
- : [chroma, 0, secondary];
546
- const match = lightness - chroma / 2;
547
- return {
548
- red: clampChannel((red + match) * 255),
549
- green: clampChannel((green + match) * 255),
550
- blue: clampChannel((blue + match) * 255),
551
- };
515
+ const functionalValue = splitFunctionalColor(value);
516
+ if (!functionalValue) return null;
517
+ const body = functionalValue.channels;
518
+ if (!body) return null;
519
+ const channels = body.replaceAll(",", " ").split(/\s+/).filter(Boolean);
520
+ if (channels.length !== 3 || !channels[1]?.endsWith("%") || !channels[2]?.endsWith("%")) return null;
521
+ const hue = Number.parseFloat(channels[0]);
522
+ const saturation = Number.parseFloat(channels[1]) / 100;
523
+ const lightness = Number.parseFloat(channels[2]) / 100;
524
+ if (![
525
+ hue,
526
+ saturation,
527
+ lightness
528
+ ].every(Number.isFinite)) return null;
529
+ const chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
530
+ const section = (hue % 360 + 360) % 360 / 60;
531
+ const secondary = chroma * (1 - Math.abs(section % 2 - 1));
532
+ const [red, green, blue] = section < 1 ? [
533
+ chroma,
534
+ secondary,
535
+ 0
536
+ ] : section < 2 ? [
537
+ secondary,
538
+ chroma,
539
+ 0
540
+ ] : section < 3 ? [
541
+ 0,
542
+ chroma,
543
+ secondary
544
+ ] : section < 4 ? [
545
+ 0,
546
+ secondary,
547
+ chroma
548
+ ] : section < 5 ? [
549
+ secondary,
550
+ 0,
551
+ chroma
552
+ ] : [
553
+ chroma,
554
+ 0,
555
+ secondary
556
+ ];
557
+ const match = lightness - chroma / 2;
558
+ return {
559
+ red: clampChannel((red + match) * 255),
560
+ green: clampChannel((green + match) * 255),
561
+ blue: clampChannel((blue + match) * 255)
562
+ };
552
563
  }
553
564
  function splitFunctionalColor(value) {
554
- const body = value.slice(value.indexOf('(') + 1, -1);
555
- const [channels, alpha, ...remainder] = body.split('/').map((part) => part.trim());
556
- if (!channels || remainder.length > 0)
557
- return null;
558
- if (alpha !== undefined && !isOpaqueAlpha(alpha))
559
- return null;
560
- return { channels };
565
+ const [channels, alpha, ...remainder] = value.slice(value.indexOf("(") + 1, -1).split("/").map((part) => part.trim());
566
+ if (!channels || remainder.length > 0) return null;
567
+ if (alpha !== void 0 && !isOpaqueAlpha(alpha)) return null;
568
+ return { channels };
561
569
  }
562
570
  function isOpaqueAlpha(value) {
563
- const numeric = Number.parseFloat(value);
564
- if (!Number.isFinite(numeric))
565
- return false;
566
- return value.endsWith('%') ? numeric === 100 : numeric === 1;
571
+ const numeric = Number.parseFloat(value);
572
+ if (!Number.isFinite(numeric)) return false;
573
+ return value.endsWith("%") ? numeric === 100 : numeric === 1;
567
574
  }
568
575
  function clampChannel(value) {
569
- return Math.min(255, Math.max(0, value));
576
+ return Math.min(255, Math.max(0, value));
570
577
  }
571
578
  function clampUnit(value) {
572
- return Math.min(1, Math.max(0, value));
579
+ return Math.min(1, Math.max(0, value));
573
580
  }
574
-
575
- /**
576
- * Version of the deterministic algorithm used to derive Aeris color tokens.
577
- *
578
- * A change to an existing derived color for the same complete theme input must
579
- * increment this value. Build-time configurations can pin the version to make
580
- * an intentional regeneration step explicit during upgrades.
581
- */
582
581
  const AERIS_COLOR_DERIVATION_VERSION = 1;
583
-
584
- const LIGHT_TEXT = '#222222';
585
- const LIGHT_TEXT_SECONDARY = '#555555';
586
- const LIGHT_TEXT_TERTIARY = '#707070';
587
- const DARK_TEXT = '#f4f4f4';
588
- const DARK_TEXT_SECONDARY = '#c5c5c5';
589
- const DARK_TEXT_TERTIARY = '#9d9d9d';
590
- /** Resolves palette-aware surfaces and borders while keeping ordinary text achromatic. */
582
+ const LIGHT_TEXT = "#222222";
583
+ const LIGHT_TEXT_SECONDARY = "#555555";
584
+ const LIGHT_TEXT_TERTIARY = "#707070";
585
+ const DARK_TEXT = "#f4f4f4";
586
+ const DARK_TEXT_SECONDARY = "#c5c5c5";
587
+ const DARK_TEXT_TERTIARY = "#9d9d9d";
591
588
  function resolveAerisFoundation(theme, mode) {
592
- const scheme = theme[mode];
593
- const surfaceSeed = theme.palette.surface;
594
- const borderSeed = theme.palette.secondary;
595
- if (mode === 'light') {
596
- const surface2 = scheme.surface2 ?? mixAerisColor('#f7f6f2', surfaceSeed, 0.24);
597
- const surface = scheme.surface ?? '#ffffff';
598
- const border = scheme.border ??
599
- mixAerisColor(surface, mixAerisColor('#5f625d', borderSeed, 0.42), 0.12);
600
- return {
601
- page: scheme.page ?? mixAerisColor('#faf9f7', surfaceSeed, 0.18),
602
- surface,
603
- surface2,
604
- surface3: scheme.surface3 ?? mixAerisColor('#f1f0eb', surfaceSeed, 0.42),
605
- interactiveHover: scheme.interactiveHover ?? mixAerisColor(surface2, theme.palette.primary, 0.1),
606
- text: scheme.text ?? LIGHT_TEXT,
607
- text2: scheme.text2 ?? LIGHT_TEXT_SECONDARY,
608
- text3: scheme.text3 ?? LIGHT_TEXT_TERTIARY,
609
- border,
610
- borderStrong: scheme.borderStrong ?? mixAerisColor('#444842', borderSeed, 0.3),
611
- focus: scheme.focus ?? mixAerisColor('#1d2119', theme.palette.primary, 0.5),
612
- };
613
- }
614
- const surface2 = scheme.surface2 ?? mixAerisColor('#171b22', surfaceSeed, 0.008);
615
- const surface = scheme.surface ?? mixAerisColor('#101318', surfaceSeed, 0.006);
616
- const border = scheme.border ??
617
- mixAerisColor(surface, mixAerisColor('#70746d', borderSeed, 0.35), 0.16);
618
- return {
619
- page: scheme.page ?? mixAerisColor('#090b0f', surfaceSeed, 0.004),
620
- surface,
621
- surface2,
622
- surface3: scheme.surface3 ?? mixAerisColor('#202632', surfaceSeed, 0.01),
623
- interactiveHover: scheme.interactiveHover ?? mixAerisColor(surface2, theme.palette.primary, 0.12),
624
- text: scheme.text ?? DARK_TEXT,
625
- text2: scheme.text2 ?? DARK_TEXT_SECONDARY,
626
- text3: scheme.text3 ?? DARK_TEXT_TERTIARY,
627
- border,
628
- borderStrong: scheme.borderStrong ?? mixAerisColor('#8d9289', borderSeed, 0.3),
629
- focus: scheme.focus ?? mixAerisColor('#ffffff', theme.palette.primary, 0.56),
630
- };
589
+ const scheme = theme[mode];
590
+ const surfaceSeed = theme.palette.surface;
591
+ const borderSeed = theme.palette.secondary;
592
+ if (mode === "light") {
593
+ const surface2 = scheme.surface2 ?? mixAerisColor("#f7f6f2", surfaceSeed, .24);
594
+ const surface = scheme.surface ?? "#ffffff";
595
+ const border = scheme.border ?? mixAerisColor(surface, mixAerisColor("#5f625d", borderSeed, .42), .12);
596
+ return {
597
+ page: scheme.page ?? mixAerisColor("#faf9f7", surfaceSeed, .18),
598
+ surface,
599
+ surface2,
600
+ surface3: scheme.surface3 ?? mixAerisColor("#f1f0eb", surfaceSeed, .42),
601
+ interactiveHover: scheme.interactiveHover ?? mixAerisColor(surface2, theme.palette.primary, .1),
602
+ text: scheme.text ?? LIGHT_TEXT,
603
+ text2: scheme.text2 ?? LIGHT_TEXT_SECONDARY,
604
+ text3: scheme.text3 ?? LIGHT_TEXT_TERTIARY,
605
+ border,
606
+ borderStrong: scheme.borderStrong ?? mixAerisColor("#444842", borderSeed, .3),
607
+ focus: scheme.focus ?? mixAerisColor("#1d2119", theme.palette.primary, .5)
608
+ };
609
+ }
610
+ const surface2 = scheme.surface2 ?? mixAerisColor("#171b22", surfaceSeed, .008);
611
+ const surface = scheme.surface ?? mixAerisColor("#101318", surfaceSeed, .006);
612
+ const border = scheme.border ?? mixAerisColor(surface, mixAerisColor("#70746d", borderSeed, .35), .16);
613
+ return {
614
+ page: scheme.page ?? mixAerisColor("#090b0f", surfaceSeed, .004),
615
+ surface,
616
+ surface2,
617
+ surface3: scheme.surface3 ?? mixAerisColor("#202632", surfaceSeed, .01),
618
+ interactiveHover: scheme.interactiveHover ?? mixAerisColor(surface2, theme.palette.primary, .12),
619
+ text: scheme.text ?? DARK_TEXT,
620
+ text2: scheme.text2 ?? DARK_TEXT_SECONDARY,
621
+ text3: scheme.text3 ?? DARK_TEXT_TERTIARY,
622
+ border,
623
+ borderStrong: scheme.borderStrong ?? mixAerisColor("#8d9289", borderSeed, .3),
624
+ focus: scheme.focus ?? mixAerisColor("#ffffff", theme.palette.primary, .56)
625
+ };
631
626
  }
632
-
633
627
  const AERIS_SEMANTIC_TONE_NAMES = [
634
- 'primary',
635
- 'secondary',
636
- 'success',
637
- 'info',
638
- 'warning',
639
- 'danger',
640
- 'contrast',
628
+ "primary",
629
+ "secondary",
630
+ "success",
631
+ "info",
632
+ "warning",
633
+ "danger",
634
+ "contrast"
641
635
  ];
642
636
  const LIGHT_BASES = {
643
- success: '#52744d',
644
- info: '#4f7180',
645
- warning: '#c38600',
646
- danger: '#c81e2a',
637
+ success: "#52744d",
638
+ info: "#4f7180",
639
+ warning: "#c38600",
640
+ danger: "#c81e2a"
647
641
  };
648
642
  const DARK_BASES = {
649
- success: '#91b78a',
650
- info: '#91b7c8',
651
- warning: '#facc15',
652
- danger: '#ff5c68',
643
+ success: "#91b78a",
644
+ info: "#91b7c8",
645
+ warning: "#facc15",
646
+ danger: "#ff5c68"
653
647
  };
654
- const DARK_FOREGROUND = '#111411';
655
- const LIGHT_FOREGROUND = '#ffffff';
648
+ const DARK_FOREGROUND = "#111411";
649
+ const LIGHT_FOREGROUND = "#ffffff";
656
650
  const REQUIRED_TEXT_CONTRAST = 4.5;
657
- const LIGHT_HOVER_MIX = 0.04;
658
- const LIGHT_ACTIVE_MIX = 0.05;
659
- const DARK_HOVER_MIX = 0.2;
660
- const DARK_ACTIVE_MIX = 0.28;
651
+ const LIGHT_HOVER_MIX = .04;
652
+ const LIGHT_ACTIVE_MIX = .05;
653
+ const DARK_HOVER_MIX = .2;
654
+ const DARK_ACTIVE_MIX = .28;
661
655
  function resolveAerisSemanticTones(theme, mode) {
662
- const scheme = theme[mode];
663
- const surface = resolveSurface(theme, scheme, mode);
664
- const result = {};
665
- for (const name of AERIS_SEMANTIC_TONE_NAMES) {
666
- const overrides = scheme.tones?.[name] ?? {};
667
- const base = overrides.base ?? defaultBase(theme, mode, name);
668
- const boundary = overrides.boundary ?? base;
669
- const onBase = overrides.onBase ?? contrastingForeground(base);
670
- const hover = overrides.hover ?? deriveState(base, mode, stateMix(mode, 'hover'), onBase);
671
- const active = overrides.active ?? deriveState(base, mode, stateMix(mode, 'active'), onBase);
672
- const soft = overrides.soft ?? mixAerisColor(surface, base, mode === 'dark' ? 0.2 : 0.14);
673
- const text = overrides.text ?? ensureTextContrast(base, surface, mode);
674
- const onHover = overrides.onHover ?? contrastingForeground(hover, onBase);
675
- const onActive = overrides.onActive ?? contrastingForeground(active, onHover);
676
- const onSoft = overrides.onSoft ?? ensureTextContrast(text, soft, mode);
677
- result[name] = {
678
- base,
679
- boundary,
680
- hover,
681
- active,
682
- onBase,
683
- onHover,
684
- onActive,
685
- text,
686
- soft,
687
- onSoft,
688
- };
689
- }
690
- return result;
656
+ const scheme = theme[mode];
657
+ const surface = resolveSurface(theme, scheme, mode);
658
+ const result = {};
659
+ for (const name of AERIS_SEMANTIC_TONE_NAMES) {
660
+ const overrides = scheme.tones?.[name] ?? {};
661
+ const base = overrides.base ?? defaultBase(theme, mode, name);
662
+ const boundary = overrides.boundary ?? base;
663
+ const onBase = overrides.onBase ?? contrastingForeground(base);
664
+ const hover = overrides.hover ?? deriveState(base, mode, stateMix(mode, "hover"), onBase);
665
+ const active = overrides.active ?? deriveState(base, mode, stateMix(mode, "active"), onBase);
666
+ const soft = overrides.soft ?? mixAerisColor(surface, base, mode === "dark" ? .2 : .14);
667
+ const text = overrides.text ?? ensureTextContrast(base, surface, mode);
668
+ const onHover = overrides.onHover ?? contrastingForeground(hover, onBase);
669
+ result[name] = {
670
+ base,
671
+ boundary,
672
+ hover,
673
+ active,
674
+ onBase,
675
+ onHover,
676
+ onActive: overrides.onActive ?? contrastingForeground(active, onHover),
677
+ text,
678
+ soft,
679
+ onSoft: overrides.onSoft ?? ensureTextContrast(text, soft, mode)
680
+ };
681
+ }
682
+ return result;
691
683
  }
692
684
  function defaultBase(theme, mode, name) {
693
- const fixed = (mode === 'dark' ? DARK_BASES : LIGHT_BASES)[name];
694
- if (fixed)
695
- return fixed;
696
- const seed = name === 'primary'
697
- ? theme.palette.primary
698
- : name === 'secondary'
699
- ? theme.palette.secondary
700
- : theme.palette.contrast;
701
- if (mode === 'light')
702
- return seed;
703
- return mixAerisColor(seed, LIGHT_FOREGROUND, name === 'contrast' ? 0.29 : 0.22);
685
+ const fixed = (mode === "dark" ? DARK_BASES : LIGHT_BASES)[name];
686
+ if (fixed) return fixed;
687
+ const seed = name === "primary" ? theme.palette.primary : name === "secondary" ? theme.palette.secondary : theme.palette.contrast;
688
+ if (mode === "light") return seed;
689
+ return mixAerisColor(seed, LIGHT_FOREGROUND, name === "contrast" ? .29 : .22);
704
690
  }
705
691
  function resolveSurface(theme, scheme, mode) {
706
- if (scheme.surface)
707
- return scheme.surface;
708
- return mode === 'light'
709
- ? LIGHT_FOREGROUND
710
- : mixAerisColor('#1f221c', theme.palette.surface, 0.02);
692
+ if (scheme.surface) return scheme.surface;
693
+ return mode === "light" ? LIGHT_FOREGROUND : mixAerisColor("#1f221c", theme.palette.surface, .02);
711
694
  }
712
695
  function deriveState(base, mode, amount, foreground) {
713
- const state = mixAerisColor(base, mode === 'light' ? DARK_FOREGROUND : LIGHT_FOREGROUND, amount);
714
- const stateColor = parseAerisColor(state);
715
- const foregroundColor = parseAerisColor(foreground);
716
- if (mode === 'dark' ||
717
- !stateColor ||
718
- !foregroundColor ||
719
- aerisRgbContrastRatio(stateColor, foregroundColor) >= REQUIRED_TEXT_CONTRAST) {
720
- return state;
721
- }
722
- const dark = parseAerisColor(DARK_FOREGROUND);
723
- const light = parseAerisColor(LIGHT_FOREGROUND);
724
- const target = aerisRgbContrastRatio(foregroundColor, light) >
725
- aerisRgbContrastRatio(foregroundColor, dark)
726
- ? LIGHT_FOREGROUND
727
- : DARK_FOREGROUND;
728
- for (let mix = amount; mix <= 1; mix += 0.01) {
729
- const candidate = mixAerisColor(base, target, mix);
730
- const candidateColor = parseAerisColor(candidate);
731
- if (candidateColor &&
732
- aerisRgbContrastRatio(candidateColor, foregroundColor) >= REQUIRED_TEXT_CONTRAST) {
733
- return candidate;
734
- }
735
- }
736
- return target;
696
+ const state = mixAerisColor(base, mode === "light" ? DARK_FOREGROUND : LIGHT_FOREGROUND, amount);
697
+ const stateColor = parseAerisColor(state);
698
+ const foregroundColor = parseAerisColor(foreground);
699
+ if (mode === "dark" || !stateColor || !foregroundColor || aerisRgbContrastRatio(stateColor, foregroundColor) >= REQUIRED_TEXT_CONTRAST) return state;
700
+ const dark = parseAerisColor(DARK_FOREGROUND);
701
+ const target = aerisRgbContrastRatio(foregroundColor, parseAerisColor(LIGHT_FOREGROUND)) > aerisRgbContrastRatio(foregroundColor, dark) ? LIGHT_FOREGROUND : DARK_FOREGROUND;
702
+ for (let mix = amount; mix <= 1; mix += .01) {
703
+ const candidate = mixAerisColor(base, target, mix);
704
+ const candidateColor = parseAerisColor(candidate);
705
+ if (candidateColor && aerisRgbContrastRatio(candidateColor, foregroundColor) >= REQUIRED_TEXT_CONTRAST) return candidate;
706
+ }
707
+ return target;
737
708
  }
738
709
  function stateMix(mode, state) {
739
- if (mode === 'light')
740
- return state === 'hover' ? LIGHT_HOVER_MIX : LIGHT_ACTIVE_MIX;
741
- return state === 'hover' ? DARK_HOVER_MIX : DARK_ACTIVE_MIX;
710
+ if (mode === "light") return state === "hover" ? LIGHT_HOVER_MIX : LIGHT_ACTIVE_MIX;
711
+ return state === "hover" ? DARK_HOVER_MIX : DARK_ACTIVE_MIX;
742
712
  }
743
713
  function contrastingForeground(color, fallback = DARK_FOREGROUND) {
744
- const background = parseAerisColor(color);
745
- if (!background)
746
- return fallback;
747
- const fallbackColor = parseAerisColor(fallback);
748
- if (fallbackColor && aerisRgbContrastRatio(background, fallbackColor) >= REQUIRED_TEXT_CONTRAST) {
749
- return fallback;
750
- }
751
- const darkContrast = aerisRgbContrastRatio(background, parseAerisColor(DARK_FOREGROUND));
752
- const lightContrast = aerisRgbContrastRatio(background, parseAerisColor(LIGHT_FOREGROUND));
753
- return lightContrast > darkContrast ? LIGHT_FOREGROUND : DARK_FOREGROUND;
714
+ const background = parseAerisColor(color);
715
+ if (!background) return fallback;
716
+ const fallbackColor = parseAerisColor(fallback);
717
+ if (fallbackColor && aerisRgbContrastRatio(background, fallbackColor) >= REQUIRED_TEXT_CONTRAST) return fallback;
718
+ const darkContrast = aerisRgbContrastRatio(background, parseAerisColor(DARK_FOREGROUND));
719
+ return aerisRgbContrastRatio(background, parseAerisColor(LIGHT_FOREGROUND)) > darkContrast ? LIGHT_FOREGROUND : DARK_FOREGROUND;
754
720
  }
755
721
  function ensureTextContrast(color, background, mode) {
756
- const foreground = parseAerisColor(color);
757
- const surface = parseAerisColor(background);
758
- if (!foreground || !surface)
759
- return color;
760
- if (aerisRgbContrastRatio(foreground, surface) >= REQUIRED_TEXT_CONTRAST)
761
- return color;
762
- const target = parseAerisColor(mode === 'light' ? DARK_FOREGROUND : LIGHT_FOREGROUND);
763
- for (let amount = 0.05; amount <= 1; amount += 0.05) {
764
- const candidate = mixAerisRgb(foreground, target, amount);
765
- if (aerisRgbContrastRatio(candidate, surface) >= REQUIRED_TEXT_CONTRAST) {
766
- return formatAerisHex(candidate);
767
- }
768
- }
769
- return formatAerisHex(target);
722
+ const foreground = parseAerisColor(color);
723
+ const surface = parseAerisColor(background);
724
+ if (!foreground || !surface) return color;
725
+ if (aerisRgbContrastRatio(foreground, surface) >= REQUIRED_TEXT_CONTRAST) return color;
726
+ const target = parseAerisColor(mode === "light" ? DARK_FOREGROUND : LIGHT_FOREGROUND);
727
+ for (let amount = .05; amount <= 1; amount += .05) {
728
+ const candidate = mixAerisRgb(foreground, target, amount);
729
+ if (aerisRgbContrastRatio(candidate, surface) >= REQUIRED_TEXT_CONTRAST) return formatAerisHex(candidate);
730
+ }
731
+ return formatAerisHex(target);
770
732
  }
771
-
772
733
  const TONE_NAMES = [
773
- 'primary',
774
- 'secondary',
775
- 'success',
776
- 'info',
777
- 'warning',
778
- 'danger',
779
- 'contrast',
734
+ "primary",
735
+ "secondary",
736
+ "success",
737
+ "info",
738
+ "warning",
739
+ "danger",
740
+ "contrast"
780
741
  ];
781
742
  function auditAerisThemeContrast(theme, mode) {
782
- const scheme = resolveSchemeColors(theme, mode);
783
- const tones = resolveAerisSemanticTones(theme, mode);
784
- const checks = [
785
- createCheck({
786
- id: 'text-page',
787
- label: 'Primary text on page',
788
- description: 'Default body content against the application page.',
789
- category: 'text',
790
- kind: 'text',
791
- foreground: scheme.text,
792
- background: scheme.page,
793
- requiredRatio: 4.5,
794
- guidance: 'Increase the difference between the text and page colors.',
795
- }),
796
- createCheck({
797
- id: 'text-surface',
798
- label: 'Primary text on surface',
799
- description: 'Default content inside cards, panels, and overlays.',
800
- category: 'text',
801
- kind: 'text',
802
- foreground: scheme.text,
803
- background: scheme.surface,
804
- requiredRatio: 4.5,
805
- guidance: 'Increase the difference between the text and surface colors.',
806
- }),
807
- createCheck({
808
- id: 'text-secondary-surface',
809
- label: 'Secondary text on surface',
810
- description: 'Supporting descriptions and metadata on a primary surface.',
811
- category: 'text',
812
- kind: 'text',
813
- foreground: scheme.text2,
814
- background: scheme.surface,
815
- requiredRatio: 4.5,
816
- guidance: 'Strengthen the secondary text color without reducing hierarchy.',
817
- }),
818
- createCheck({
819
- id: 'text-tertiary-surface',
820
- label: 'Tertiary text on surface',
821
- description: 'Low-emphasis visible text on a primary surface.',
822
- category: 'text',
823
- kind: 'text',
824
- foreground: scheme.text3,
825
- background: scheme.surface,
826
- requiredRatio: 4.5,
827
- guidance: 'Darken or lighten the tertiary text until it remains readable.',
828
- }),
829
- createCheck({
830
- id: 'text-secondary-raised',
831
- label: 'Secondary text on raised surface',
832
- description: 'Supporting content against the secondary surface layer.',
833
- category: 'text',
834
- kind: 'text',
835
- foreground: scheme.text2,
836
- background: scheme.surface2,
837
- requiredRatio: 4.5,
838
- guidance: 'Increase secondary text contrast against the raised surface.',
839
- }),
840
- createCheck({
841
- id: 'text-interactive-hover',
842
- label: 'Primary text on neutral hover',
843
- description: 'Default item content against the shared neutral interactive hover surface.',
844
- category: 'interaction',
845
- kind: 'text',
846
- foreground: scheme.text,
847
- background: scheme.interactiveHover,
848
- requiredRatio: 4.5,
849
- guidance: 'Adjust interactiveHover until default content remains readable.',
850
- }),
851
- ...TONE_NAMES.flatMap((name) => interactionChecks(name, tones[name], scheme.surface)),
852
- createCheck({
853
- id: 'focus-surface',
854
- label: 'Focus indicator on surface',
855
- description: 'Focus token against cards, controls, and overlay surfaces.',
856
- category: 'focus',
857
- kind: 'non-text',
858
- foreground: scheme.focus,
859
- background: scheme.surface,
860
- requiredRatio: 3,
861
- guidance: 'Strengthen the focus color against the primary surface.',
862
- }),
863
- createCheck({
864
- id: 'focus-page',
865
- label: 'Focus indicator on page',
866
- description: 'Focus token against the application page background.',
867
- category: 'focus',
868
- kind: 'non-text',
869
- foreground: scheme.focus,
870
- background: scheme.page,
871
- requiredRatio: 3,
872
- guidance: 'Strengthen the focus color against the page background.',
873
- }),
874
- createCheck({
875
- id: 'border-strong-surface',
876
- label: 'Emphasized boundary on surface',
877
- description: 'Optional strong boundary against a primary surface.',
878
- category: 'boundary',
879
- kind: 'non-text',
880
- foreground: scheme.borderStrong,
881
- background: scheme.surface,
882
- requiredRatio: 3,
883
- guidance: 'Increase the emphasized boundary contrast against the primary surface.',
884
- }),
885
- createCheck({
886
- id: 'border-strong-raised',
887
- label: 'Emphasized boundary on raised surface',
888
- description: 'Optional strong boundary used on the secondary surface layer.',
889
- category: 'boundary',
890
- kind: 'non-text',
891
- foreground: scheme.borderStrong,
892
- background: scheme.surface2,
893
- requiredRatio: 3,
894
- guidance: 'Increase the emphasized boundary contrast against the raised surface.',
895
- }),
896
- ...TONE_NAMES.map((name) => createCheck({
897
- id: `${name}-boundary`,
898
- label: `${titleCase(name)} control boundary`,
899
- description: `Solid ${name} controls against a primary surface.`,
900
- category: 'boundary',
901
- kind: 'non-text',
902
- foreground: tones[name].boundary,
903
- background: scheme.surface,
904
- requiredRatio: 3,
905
- guidance: `Adjust tones.${name}.boundary so solid controls remain identifiable.`,
906
- })),
907
- ];
908
- const passed = checks.filter((check) => check.status === 'pass').length;
909
- const failed = checks.filter((check) => check.status === 'fail').length;
910
- const unresolved = checks.filter((check) => check.status === 'unresolved').length;
911
- const resolvedTotal = passed + failed;
912
- return {
913
- mode,
914
- checks,
915
- passed,
916
- failed,
917
- unresolved,
918
- total: checks.length,
919
- score: resolvedTotal > 0 ? Math.round((passed / resolvedTotal) * 100) : 0,
920
- status: failed > 0 ? 'fail' : unresolved > 0 ? 'unresolved' : 'pass',
921
- };
743
+ const scheme = resolveSchemeColors(theme, mode);
744
+ const tones = resolveAerisSemanticTones(theme, mode);
745
+ const checks = [
746
+ createCheck({
747
+ id: "text-page",
748
+ label: "Primary text on page",
749
+ description: "Default body content against the application page.",
750
+ category: "text",
751
+ kind: "text",
752
+ foreground: scheme.text,
753
+ background: scheme.page,
754
+ requiredRatio: 4.5,
755
+ guidance: "Increase the difference between the text and page colors."
756
+ }),
757
+ createCheck({
758
+ id: "text-surface",
759
+ label: "Primary text on surface",
760
+ description: "Default content inside cards, panels, and overlays.",
761
+ category: "text",
762
+ kind: "text",
763
+ foreground: scheme.text,
764
+ background: scheme.surface,
765
+ requiredRatio: 4.5,
766
+ guidance: "Increase the difference between the text and surface colors."
767
+ }),
768
+ createCheck({
769
+ id: "text-secondary-surface",
770
+ label: "Secondary text on surface",
771
+ description: "Supporting descriptions and metadata on a primary surface.",
772
+ category: "text",
773
+ kind: "text",
774
+ foreground: scheme.text2,
775
+ background: scheme.surface,
776
+ requiredRatio: 4.5,
777
+ guidance: "Strengthen the secondary text color without reducing hierarchy."
778
+ }),
779
+ createCheck({
780
+ id: "text-tertiary-surface",
781
+ label: "Tertiary text on surface",
782
+ description: "Low-emphasis visible text on a primary surface.",
783
+ category: "text",
784
+ kind: "text",
785
+ foreground: scheme.text3,
786
+ background: scheme.surface,
787
+ requiredRatio: 4.5,
788
+ guidance: "Darken or lighten the tertiary text until it remains readable."
789
+ }),
790
+ createCheck({
791
+ id: "text-secondary-raised",
792
+ label: "Secondary text on raised surface",
793
+ description: "Supporting content against the secondary surface layer.",
794
+ category: "text",
795
+ kind: "text",
796
+ foreground: scheme.text2,
797
+ background: scheme.surface2,
798
+ requiredRatio: 4.5,
799
+ guidance: "Increase secondary text contrast against the raised surface."
800
+ }),
801
+ createCheck({
802
+ id: "text-interactive-hover",
803
+ label: "Primary text on neutral hover",
804
+ description: "Default item content against the shared neutral interactive hover surface.",
805
+ category: "interaction",
806
+ kind: "text",
807
+ foreground: scheme.text,
808
+ background: scheme.interactiveHover,
809
+ requiredRatio: 4.5,
810
+ guidance: "Adjust interactiveHover until default content remains readable."
811
+ }),
812
+ ...TONE_NAMES.flatMap((name) => interactionChecks(name, tones[name], scheme.surface)),
813
+ createCheck({
814
+ id: "focus-surface",
815
+ label: "Focus indicator on surface",
816
+ description: "Focus token against cards, controls, and overlay surfaces.",
817
+ category: "focus",
818
+ kind: "non-text",
819
+ foreground: scheme.focus,
820
+ background: scheme.surface,
821
+ requiredRatio: 3,
822
+ guidance: "Strengthen the focus color against the primary surface."
823
+ }),
824
+ createCheck({
825
+ id: "focus-page",
826
+ label: "Focus indicator on page",
827
+ description: "Focus token against the application page background.",
828
+ category: "focus",
829
+ kind: "non-text",
830
+ foreground: scheme.focus,
831
+ background: scheme.page,
832
+ requiredRatio: 3,
833
+ guidance: "Strengthen the focus color against the page background."
834
+ }),
835
+ createCheck({
836
+ id: "border-strong-surface",
837
+ label: "Emphasized boundary on surface",
838
+ description: "Optional strong boundary against a primary surface.",
839
+ category: "boundary",
840
+ kind: "non-text",
841
+ foreground: scheme.borderStrong,
842
+ background: scheme.surface,
843
+ requiredRatio: 3,
844
+ guidance: "Increase the emphasized boundary contrast against the primary surface."
845
+ }),
846
+ createCheck({
847
+ id: "border-strong-raised",
848
+ label: "Emphasized boundary on raised surface",
849
+ description: "Optional strong boundary used on the secondary surface layer.",
850
+ category: "boundary",
851
+ kind: "non-text",
852
+ foreground: scheme.borderStrong,
853
+ background: scheme.surface2,
854
+ requiredRatio: 3,
855
+ guidance: "Increase the emphasized boundary contrast against the raised surface."
856
+ }),
857
+ ...TONE_NAMES.map((name) => createCheck({
858
+ id: `${name}-boundary`,
859
+ label: `${titleCase(name)} control boundary`,
860
+ description: `Solid ${name} controls against a primary surface.`,
861
+ category: "boundary",
862
+ kind: "non-text",
863
+ foreground: tones[name].boundary,
864
+ background: scheme.surface,
865
+ requiredRatio: 3,
866
+ guidance: `Adjust tones.${name}.boundary so solid controls remain identifiable.`
867
+ }))
868
+ ];
869
+ const passed = checks.filter((check) => check.status === "pass").length;
870
+ const failed = checks.filter((check) => check.status === "fail").length;
871
+ const unresolved = checks.filter((check) => check.status === "unresolved").length;
872
+ const resolvedTotal = passed + failed;
873
+ return {
874
+ mode,
875
+ checks,
876
+ passed,
877
+ failed,
878
+ unresolved,
879
+ total: checks.length,
880
+ score: resolvedTotal > 0 ? Math.round(passed / resolvedTotal * 100) : 0,
881
+ status: failed > 0 ? "fail" : unresolved > 0 ? "unresolved" : "pass"
882
+ };
922
883
  }
923
884
  function interactionChecks(name, tone, surface) {
924
- const label = titleCase(name);
925
- return [
926
- createCheck({
927
- id: `${name}-base-content`,
928
- label: `${label} solid content`,
929
- description: 'Text and icons on the default solid background.',
930
- category: 'interaction',
931
- kind: 'text',
932
- foreground: tone.onBase,
933
- background: tone.base,
934
- requiredRatio: 4.5,
935
- guidance: `Set tones.${name}.onBase to a more contrasting foreground.`,
936
- }),
937
- createCheck({
938
- id: `${name}-hover-content`,
939
- label: `${label} hover content`,
940
- description: 'Text and icons on the hover background.',
941
- category: 'interaction',
942
- kind: 'text',
943
- foreground: tone.onHover,
944
- background: tone.hover,
945
- requiredRatio: 4.5,
946
- guidance: `Adjust tones.${name}.hover or tones.${name}.onHover.`,
947
- }),
948
- createCheck({
949
- id: `${name}-active-content`,
950
- label: `${label} pressed content`,
951
- description: 'Text and icons on the pressed background.',
952
- category: 'interaction',
953
- kind: 'text',
954
- foreground: tone.onActive,
955
- background: tone.active,
956
- requiredRatio: 4.5,
957
- guidance: `Adjust tones.${name}.active or tones.${name}.onActive.`,
958
- }),
959
- createCheck({
960
- id: `${name}-text-surface`,
961
- label: `${label} text treatment`,
962
- description: 'Outline, text, and link content on a primary surface.',
963
- category: 'interaction',
964
- kind: 'text',
965
- foreground: tone.text,
966
- background: surface,
967
- requiredRatio: 4.5,
968
- guidance: `Set tones.${name}.text to a readable surface foreground.`,
969
- }),
970
- createCheck({
971
- id: `${name}-soft-content`,
972
- label: `${label} soft content`,
973
- description: 'Text and icons on the low-emphasis semantic background.',
974
- category: 'interaction',
975
- kind: 'text',
976
- foreground: tone.onSoft,
977
- background: tone.soft,
978
- requiredRatio: 4.5,
979
- guidance: `Adjust tones.${name}.soft or tones.${name}.onSoft.`,
980
- }),
981
- ];
885
+ const label = titleCase(name);
886
+ return [
887
+ createCheck({
888
+ id: `${name}-base-content`,
889
+ label: `${label} solid content`,
890
+ description: "Text and icons on the default solid background.",
891
+ category: "interaction",
892
+ kind: "text",
893
+ foreground: tone.onBase,
894
+ background: tone.base,
895
+ requiredRatio: 4.5,
896
+ guidance: `Set tones.${name}.onBase to a more contrasting foreground.`
897
+ }),
898
+ createCheck({
899
+ id: `${name}-hover-content`,
900
+ label: `${label} hover content`,
901
+ description: "Text and icons on the hover background.",
902
+ category: "interaction",
903
+ kind: "text",
904
+ foreground: tone.onHover,
905
+ background: tone.hover,
906
+ requiredRatio: 4.5,
907
+ guidance: `Adjust tones.${name}.hover or tones.${name}.onHover.`
908
+ }),
909
+ createCheck({
910
+ id: `${name}-active-content`,
911
+ label: `${label} pressed content`,
912
+ description: "Text and icons on the pressed background.",
913
+ category: "interaction",
914
+ kind: "text",
915
+ foreground: tone.onActive,
916
+ background: tone.active,
917
+ requiredRatio: 4.5,
918
+ guidance: `Adjust tones.${name}.active or tones.${name}.onActive.`
919
+ }),
920
+ createCheck({
921
+ id: `${name}-text-surface`,
922
+ label: `${label} text treatment`,
923
+ description: "Outline, text, and link content on a primary surface.",
924
+ category: "interaction",
925
+ kind: "text",
926
+ foreground: tone.text,
927
+ background: surface,
928
+ requiredRatio: 4.5,
929
+ guidance: `Set tones.${name}.text to a readable surface foreground.`
930
+ }),
931
+ createCheck({
932
+ id: `${name}-soft-content`,
933
+ label: `${label} soft content`,
934
+ description: "Text and icons on the low-emphasis semantic background.",
935
+ category: "interaction",
936
+ kind: "text",
937
+ foreground: tone.onSoft,
938
+ background: tone.soft,
939
+ requiredRatio: 4.5,
940
+ guidance: `Adjust tones.${name}.soft or tones.${name}.onSoft.`
941
+ })
942
+ ];
982
943
  }
983
944
  function createCheck(definition) {
984
- const ratio = aerisContrastRatio(definition.foreground, definition.background);
985
- const status = ratio === null ? 'unresolved' : ratio >= definition.requiredRatio ? 'pass' : 'fail';
986
- return {
987
- ...definition,
988
- criterion: definition.kind === 'text' ? '1.4.3' : '1.4.11',
989
- ratio,
990
- status,
991
- };
945
+ const ratio = aerisContrastRatio(definition.foreground, definition.background);
946
+ const status = ratio === null ? "unresolved" : ratio >= definition.requiredRatio ? "pass" : "fail";
947
+ return {
948
+ ...definition,
949
+ criterion: definition.kind === "text" ? "1.4.3" : "1.4.11",
950
+ ratio,
951
+ status
952
+ };
992
953
  }
993
954
  function resolveSchemeColors(theme, mode) {
994
- return resolveAerisFoundation(theme, mode);
955
+ return resolveAerisFoundation(theme, mode);
995
956
  }
996
957
  function titleCase(value) {
997
- return value.charAt(0).toUpperCase() + value.slice(1);
958
+ return value.charAt(0).toUpperCase() + value.slice(1);
998
959
  }
999
-
1000
- /** Resolves an optional theme override against the complete Aeris defaults. */
1001
960
  function resolveAerisTheme(theme) {
1002
- return {
1003
- ...AERIS_DEFAULT_THEME,
1004
- ...theme,
1005
- palette: {
1006
- ...AERIS_DEFAULT_THEME.palette,
1007
- ...normalizeAerisPalette(theme?.palette),
1008
- },
1009
- light: {
1010
- ...AERIS_DEFAULT_THEME.light,
1011
- ...theme?.light,
1012
- tones: mergeAerisSemanticTones(AERIS_DEFAULT_THEME.light.tones, theme?.light?.tones),
1013
- },
1014
- dark: {
1015
- ...AERIS_DEFAULT_THEME.dark,
1016
- ...theme?.dark,
1017
- tones: mergeAerisSemanticTones(AERIS_DEFAULT_THEME.dark.tones, theme?.dark?.tones),
1018
- },
1019
- densities: {
1020
- ...AERIS_DEFAULT_THEME.densities,
1021
- ...theme?.densities,
1022
- },
1023
- radii: {
1024
- ...AERIS_DEFAULT_THEME.radii,
1025
- ...theme?.radii,
1026
- },
1027
- };
961
+ return {
962
+ ...AERIS_DEFAULT_THEME,
963
+ ...theme,
964
+ palette: {
965
+ ...AERIS_DEFAULT_THEME.palette,
966
+ ...normalizeAerisPalette(theme?.palette)
967
+ },
968
+ light: {
969
+ ...AERIS_DEFAULT_THEME.light,
970
+ ...theme?.light,
971
+ tones: mergeAerisSemanticTones(AERIS_DEFAULT_THEME.light.tones, theme?.light?.tones)
972
+ },
973
+ dark: {
974
+ ...AERIS_DEFAULT_THEME.dark,
975
+ ...theme?.dark,
976
+ tones: mergeAerisSemanticTones(AERIS_DEFAULT_THEME.dark.tones, theme?.dark?.tones)
977
+ },
978
+ densities: {
979
+ ...AERIS_DEFAULT_THEME.densities,
980
+ ...theme?.densities
981
+ },
982
+ radii: {
983
+ ...AERIS_DEFAULT_THEME.radii,
984
+ ...theme?.radii
985
+ }
986
+ };
1028
987
  }
1029
- /** Deeply merges a runtime update into an already resolved Aeris theme. */
1030
988
  function mergeAerisTheme(theme, update) {
1031
- return {
1032
- ...theme,
1033
- ...update,
1034
- palette: {
1035
- ...theme.palette,
1036
- ...normalizeAerisPalette(update.palette),
1037
- },
1038
- light: {
1039
- ...theme.light,
1040
- ...update.light,
1041
- tones: mergeAerisSemanticTones(theme.light.tones, update.light?.tones),
1042
- },
1043
- dark: {
1044
- ...theme.dark,
1045
- ...update.dark,
1046
- tones: mergeAerisSemanticTones(theme.dark.tones, update.dark?.tones),
1047
- },
1048
- densities: {
1049
- ...theme.densities,
1050
- ...update.densities,
1051
- },
1052
- radii: {
1053
- ...theme.radii,
1054
- ...update.radii,
1055
- },
1056
- };
989
+ return {
990
+ ...theme,
991
+ ...update,
992
+ palette: {
993
+ ...theme.palette,
994
+ ...normalizeAerisPalette(update.palette)
995
+ },
996
+ light: {
997
+ ...theme.light,
998
+ ...update.light,
999
+ tones: mergeAerisSemanticTones(theme.light.tones, update.light?.tones)
1000
+ },
1001
+ dark: {
1002
+ ...theme.dark,
1003
+ ...update.dark,
1004
+ tones: mergeAerisSemanticTones(theme.dark.tones, update.dark?.tones)
1005
+ },
1006
+ densities: {
1007
+ ...theme.densities,
1008
+ ...update.densities
1009
+ },
1010
+ radii: {
1011
+ ...theme.radii,
1012
+ ...update.radii
1013
+ }
1014
+ };
1057
1015
  }
1058
1016
  function resolveAerisDensity(theme) {
1059
- return theme.densities[theme.density] ?? AERIS_DEFAULT_THEME.densities['medium'];
1017
+ return theme.densities[theme.density] ?? AERIS_DEFAULT_THEME.densities["medium"];
1060
1018
  }
1061
1019
  function resolveAerisRadius(theme) {
1062
- return theme.radii[theme.radius] ?? AERIS_DEFAULT_THEME.radii['rounded'];
1020
+ return theme.radii[theme.radius] ?? AERIS_DEFAULT_THEME.radii["rounded"];
1063
1021
  }
1064
1022
  function mergeAerisSemanticTones(current, updates) {
1065
- if (!current && !updates)
1066
- return undefined;
1067
- return Object.fromEntries(AERIS_SEMANTIC_TONE_NAMES.map((name) => [
1068
- name,
1069
- {
1070
- ...current?.[name],
1071
- ...updates?.[name],
1072
- },
1073
- ]));
1023
+ if (!current && !updates) return void 0;
1024
+ return Object.fromEntries(AERIS_SEMANTIC_TONE_NAMES.map((name) => [name, {
1025
+ ...current?.[name],
1026
+ ...updates?.[name]
1027
+ }]));
1074
1028
  }
1075
1029
  function normalizeAerisPalette(palette) {
1076
- if (!palette)
1077
- return {};
1078
- const surface = palette.surface ?? palette.mist;
1079
- const primary = palette.primary ?? palette.sage;
1080
- const secondary = palette.secondary ?? palette.cloud;
1081
- const accent = palette.accent ?? palette.sand;
1082
- const contrast = palette.contrast ?? palette.umber;
1083
- return {
1084
- ...palette,
1085
- ...(surface ? { surface, mist: surface } : {}),
1086
- ...(primary ? { primary, sage: primary } : {}),
1087
- ...(secondary ? { secondary, cloud: secondary } : {}),
1088
- ...(accent ? { accent, sand: accent } : {}),
1089
- ...(contrast ? { contrast, umber: contrast } : {}),
1090
- };
1030
+ if (!palette) return {};
1031
+ const surface = palette.surface ?? palette.mist;
1032
+ const primary = palette.primary ?? palette.sage;
1033
+ const secondary = palette.secondary ?? palette.cloud;
1034
+ const accent = palette.accent ?? palette.sand;
1035
+ const contrast = palette.contrast ?? palette.umber;
1036
+ return {
1037
+ ...palette,
1038
+ ...surface ? {
1039
+ surface,
1040
+ mist: surface
1041
+ } : {},
1042
+ ...primary ? {
1043
+ primary,
1044
+ sage: primary
1045
+ } : {},
1046
+ ...secondary ? {
1047
+ secondary,
1048
+ cloud: secondary
1049
+ } : {},
1050
+ ...accent ? {
1051
+ accent,
1052
+ sand: accent
1053
+ } : {},
1054
+ ...contrast ? {
1055
+ contrast,
1056
+ umber: contrast
1057
+ } : {}
1058
+ };
1091
1059
  }
1092
-
1093
1060
  const FOUNDATION_TOKENS = [
1094
- ['page', '--aeris-page'],
1095
- ['surface', '--aeris-surface'],
1096
- ['surface2', '--aeris-surface-2'],
1097
- ['surface3', '--aeris-surface-3'],
1098
- ['interactiveHover', '--aeris-interactive-hover'],
1099
- ['text', '--aeris-text'],
1100
- ['text2', '--aeris-text-2'],
1101
- ['text3', '--aeris-text-3'],
1102
- ['border', '--aeris-border'],
1103
- ['borderStrong', '--aeris-border-strong'],
1104
- ['focus', '--aeris-focus'],
1061
+ ["page", "--aeris-page"],
1062
+ ["surface", "--aeris-surface"],
1063
+ ["surface2", "--aeris-surface-2"],
1064
+ ["surface3", "--aeris-surface-3"],
1065
+ ["interactiveHover", "--aeris-interactive-hover"],
1066
+ ["text", "--aeris-text"],
1067
+ ["text2", "--aeris-text-2"],
1068
+ ["text3", "--aeris-text-3"],
1069
+ ["border", "--aeris-border"],
1070
+ ["borderStrong", "--aeris-border-strong"],
1071
+ ["focus", "--aeris-focus"]
1105
1072
  ];
1106
1073
  const DENSITY_TOKENS = [
1107
- ['controlHeight', '--aeris-control-height'],
1108
- ['controlPaddingX', '--aeris-control-padding-x'],
1109
- ['itemHeight', '--aeris-item-height'],
1110
- ['itemPaddingY', '--aeris-item-padding-y'],
1111
- ['itemPaddingX', '--aeris-item-padding-x'],
1112
- ['gap', '--aeris-density-gap'],
1113
- ['iconSize', '--aeris-icon-size'],
1074
+ ["controlHeight", "--aeris-control-height"],
1075
+ ["controlPaddingX", "--aeris-control-padding-x"],
1076
+ ["itemHeight", "--aeris-item-height"],
1077
+ ["itemPaddingY", "--aeris-item-padding-y"],
1078
+ ["itemPaddingX", "--aeris-item-padding-x"],
1079
+ ["gap", "--aeris-density-gap"],
1080
+ ["iconSize", "--aeris-icon-size"]
1114
1081
  ];
1115
1082
  const RADIUS_TOKENS = [
1116
- ['sm', '--aeris-radius-sm'],
1117
- ['md', '--aeris-radius-md'],
1118
- ['lg', '--aeris-radius-lg'],
1119
- ['xl', '--aeris-radius-xl'],
1120
- ['control', '--aeris-radius-control'],
1121
- ['pill', '--aeris-radius-pill'],
1083
+ ["sm", "--aeris-radius-sm"],
1084
+ ["md", "--aeris-radius-md"],
1085
+ ["lg", "--aeris-radius-lg"],
1086
+ ["xl", "--aeris-radius-xl"],
1087
+ ["control", "--aeris-radius-control"],
1088
+ ["pill", "--aeris-radius-pill"]
1122
1089
  ];
1123
- /** Resolves the ordered CSS custom properties used by runtime and generated Aeris themes. */
1124
1090
  function resolveAerisThemeTokens(theme, mode) {
1125
- const tokens = {};
1126
- for (const [name, value] of Object.entries(theme.palette)) {
1127
- tokens[`--aeris-palette-${name}`] = value;
1128
- }
1129
- const foundation = resolveAerisFoundation(theme, mode);
1130
- for (const [property, token] of FOUNDATION_TOKENS) {
1131
- tokens[token] = foundation[property];
1132
- }
1133
- tokens['--aeris-accent'] = theme[mode].accent ?? theme.palette.accent;
1134
- if (theme[mode].shadowXs)
1135
- tokens['--aeris-shadow-xs'] = theme[mode].shadowXs;
1136
- if (theme[mode].shadowSm)
1137
- tokens['--aeris-shadow-sm'] = theme[mode].shadowSm;
1138
- const tones = resolveAerisSemanticTones(theme, mode);
1139
- for (const name of AERIS_SEMANTIC_TONE_NAMES) {
1140
- const tone = tones[name];
1141
- tokens[`--aeris-${name}`] = tone.base;
1142
- tokens[`--aeris-${name}-boundary`] = tone.boundary;
1143
- tokens[`--aeris-${name}-hover`] = tone.hover;
1144
- tokens[`--aeris-${name}-active`] = tone.active;
1145
- tokens[`--aeris-on-${name}`] = tone.onBase;
1146
- tokens[`--aeris-on-${name}-hover`] = tone.onHover;
1147
- tokens[`--aeris-on-${name}-active`] = tone.onActive;
1148
- tokens[`--aeris-${name}-text`] = tone.text;
1149
- tokens[`--aeris-${name}-soft`] = tone.soft;
1150
- tokens[`--aeris-on-${name}-soft`] = tone.onSoft;
1151
- tokens[`--aeris-${name}-contrast`] = tone.onBase;
1152
- }
1153
- tokens['--aeris-primary-contrast'] = tones.primary.onBase;
1154
- const density = resolveAerisDensity(theme);
1155
- for (const [property, token] of DENSITY_TOKENS) {
1156
- const value = density[property];
1157
- if (value)
1158
- tokens[token] = value;
1159
- }
1160
- const radius = resolveAerisRadius(theme);
1161
- for (const [property, token] of RADIUS_TOKENS) {
1162
- const value = radius[property];
1163
- if (value)
1164
- tokens[token] = value;
1165
- }
1166
- return tokens;
1091
+ const tokens = {};
1092
+ for (const [name, value] of Object.entries(theme.palette)) tokens[`--aeris-palette-${name}`] = value;
1093
+ const foundation = resolveAerisFoundation(theme, mode);
1094
+ for (const [property, token] of FOUNDATION_TOKENS) tokens[token] = foundation[property];
1095
+ tokens["--aeris-accent"] = theme[mode].accent ?? theme.palette.accent;
1096
+ if (theme[mode].shadowXs) tokens["--aeris-shadow-xs"] = theme[mode].shadowXs;
1097
+ if (theme[mode].shadowSm) tokens["--aeris-shadow-sm"] = theme[mode].shadowSm;
1098
+ const tones = resolveAerisSemanticTones(theme, mode);
1099
+ for (const name of AERIS_SEMANTIC_TONE_NAMES) {
1100
+ const tone = tones[name];
1101
+ tokens[`--aeris-${name}`] = tone.base;
1102
+ tokens[`--aeris-${name}-boundary`] = tone.boundary;
1103
+ tokens[`--aeris-${name}-hover`] = tone.hover;
1104
+ tokens[`--aeris-${name}-active`] = tone.active;
1105
+ tokens[`--aeris-on-${name}`] = tone.onBase;
1106
+ tokens[`--aeris-on-${name}-hover`] = tone.onHover;
1107
+ tokens[`--aeris-on-${name}-active`] = tone.onActive;
1108
+ tokens[`--aeris-${name}-text`] = tone.text;
1109
+ tokens[`--aeris-${name}-soft`] = tone.soft;
1110
+ tokens[`--aeris-on-${name}-soft`] = tone.onSoft;
1111
+ tokens[`--aeris-${name}-contrast`] = tone.onBase;
1112
+ }
1113
+ tokens["--aeris-primary-contrast"] = tones.primary.onBase;
1114
+ const density = resolveAerisDensity(theme);
1115
+ for (const [property, token] of DENSITY_TOKENS) {
1116
+ const value = density[property];
1117
+ if (value) tokens[token] = value;
1118
+ }
1119
+ const radius = resolveAerisRadius(theme);
1120
+ for (const [property, token] of RADIUS_TOKENS) {
1121
+ const value = radius[property];
1122
+ if (value) tokens[token] = value;
1123
+ }
1124
+ return tokens;
1167
1125
  }
1168
-
1169
- class AerisThemeGenerationError extends Error {
1170
- issues;
1171
- constructor(issues) {
1172
- super(`Aeris theme generation failed with ${issues.length} issue${issues.length === 1 ? '' : 's'}.`);
1173
- this.name = 'AerisThemeGenerationError';
1174
- this.issues = issues;
1175
- }
1176
- }
1177
- const DEFAULT_SELECTOR = ':root';
1178
- const GENERATED_BANNER = `/*! Generated by Aeris UI; color derivation v${AERIS_COLOR_DERIVATION_VERSION}. Edit the theme source, not this file. */`;
1179
- /** Resolves, validates, and serializes a complete Aeris theme into deterministic CSS. */
1126
+ var AerisThemeGenerationError = class extends Error {
1127
+ issues;
1128
+ constructor(issues) {
1129
+ super(`Aeris theme generation failed with ${issues.length} issue${issues.length === 1 ? "" : "s"}.`);
1130
+ this.name = "AerisThemeGenerationError";
1131
+ this.issues = issues;
1132
+ }
1133
+ };
1134
+ const DEFAULT_SELECTOR = ":root";
1135
+ const GENERATED_BANNER = `/*! Generated by Aeris UI; color derivation v1. Edit the theme source, not this file. */`;
1180
1136
  function compileAerisTheme(themeOverride = {}, options = {}) {
1181
- const selector = options.selector?.trim() || DEFAULT_SELECTOR;
1182
- const generation = resolveGenerationOptions(options);
1183
- const theme = resolveAerisTheme(themeOverride);
1184
- const lightTokens = resolveAerisThemeTokens(theme, 'light');
1185
- const darkTokens = resolveAerisThemeTokens(theme, 'dark');
1186
- const contrast = {
1187
- light: auditAerisThemeContrast(theme, 'light'),
1188
- dark: auditAerisThemeContrast(theme, 'dark'),
1189
- };
1190
- const issues = [
1191
- ...validateGeneration(selector, theme, lightTokens, darkTokens, contrast, generation),
1192
- ];
1193
- if (options.expectedDerivationVersion !== undefined &&
1194
- options.expectedDerivationVersion !== AERIS_COLOR_DERIVATION_VERSION) {
1195
- issues.unshift({
1196
- code: 'derivation-version-mismatch',
1197
- message: `This configuration expects color derivation v${options.expectedDerivationVersion}, but the installed Aeris package provides v${AERIS_COLOR_DERIVATION_VERSION}. Review the theme changes, then update the configured derivation version before regenerating CSS.`,
1198
- });
1199
- }
1200
- if (issues.length)
1201
- throw new AerisThemeGenerationError(issues);
1202
- return {
1203
- derivationVersion: AERIS_COLOR_DERIVATION_VERSION,
1204
- css: serializeThemeCss(lightTokens, darkTokens, selector, options, generation),
1205
- theme,
1206
- lightTokens,
1207
- darkTokens,
1208
- contrast,
1209
- };
1137
+ const selector = options.selector?.trim() || DEFAULT_SELECTOR;
1138
+ const generation = resolveGenerationOptions(options);
1139
+ const theme = resolveAerisTheme(themeOverride);
1140
+ const lightTokens = resolveAerisThemeTokens(theme, "light");
1141
+ const darkTokens = resolveAerisThemeTokens(theme, "dark");
1142
+ const contrast = {
1143
+ light: auditAerisThemeContrast(theme, "light"),
1144
+ dark: auditAerisThemeContrast(theme, "dark")
1145
+ };
1146
+ const issues = [...validateGeneration(selector, theme, lightTokens, darkTokens, contrast, generation)];
1147
+ if (options.expectedDerivationVersion !== void 0 && options.expectedDerivationVersion !== 1) issues.unshift({
1148
+ code: "derivation-version-mismatch",
1149
+ message: `This configuration expects color derivation v${options.expectedDerivationVersion}, but the installed Aeris package provides v1. Review the theme changes, then update the configured derivation version before regenerating CSS.`
1150
+ });
1151
+ if (issues.length) throw new AerisThemeGenerationError(issues);
1152
+ return {
1153
+ derivationVersion: 1,
1154
+ css: serializeThemeCss(lightTokens, darkTokens, selector, options, generation),
1155
+ theme,
1156
+ lightTokens,
1157
+ darkTokens,
1158
+ contrast
1159
+ };
1210
1160
  }
1211
- /** Convenience API for callers that only need the generated stylesheet. */
1212
1161
  function generateAerisThemeCss(themeOverride = {}, options = {}) {
1213
- return compileAerisTheme(themeOverride, options).css;
1162
+ return compileAerisTheme(themeOverride, options).css;
1214
1163
  }
1215
1164
  function validateGeneration(selector, theme, lightTokens, darkTokens, contrast, generation) {
1216
- const issues = [];
1217
- if (!isSafeSelector(selector)) {
1218
- issues.push({
1219
- code: 'invalid-selector',
1220
- message: 'selector must be one non-empty CSS selector without commas, braces, or semicolons.',
1221
- });
1222
- }
1223
- if (!generation.valid) {
1224
- issues.push({
1225
- code: 'invalid-default-mode',
1226
- message: generation.message,
1227
- });
1228
- }
1229
- if (!theme.densities[theme.density]) {
1230
- issues.push({
1231
- code: 'invalid-density',
1232
- message: `The density preset "${theme.density}" is not defined in theme.densities.`,
1233
- });
1234
- }
1235
- if (!theme.radii[theme.radius]) {
1236
- issues.push({
1237
- code: 'invalid-radius',
1238
- message: `The radius preset "${theme.radius}" is not defined in theme.radii.`,
1239
- });
1240
- }
1241
- const modes = generation.schemes === 'both'
1242
- ? [
1243
- ['light', lightTokens],
1244
- ['dark', darkTokens],
1245
- ]
1246
- : [
1247
- [generation.schemes, generation.schemes === 'light' ? lightTokens : darkTokens],
1248
- ];
1249
- for (const [mode, tokens] of modes) {
1250
- for (const [token, value] of Object.entries(tokens)) {
1251
- if (!isSafeCssValue$1(value)) {
1252
- issues.push({
1253
- code: 'invalid-css-value',
1254
- message: `${token} contains characters that cannot be emitted safely.`,
1255
- mode,
1256
- token,
1257
- });
1258
- }
1259
- }
1260
- if (generation.validateContrast) {
1261
- for (const check of contrast[mode].checks) {
1262
- if (check.status === 'fail') {
1263
- issues.push({
1264
- code: 'contrast-failed',
1265
- message: `${check.label} is ${check.ratio?.toFixed(2)}:1; ${check.requiredRatio}:1 is required.`,
1266
- mode,
1267
- });
1268
- }
1269
- else if (check.status === 'unresolved') {
1270
- issues.push({
1271
- code: 'contrast-unresolved',
1272
- message: `${check.label} could not be evaluated from static colors.`,
1273
- mode,
1274
- });
1275
- }
1276
- }
1277
- }
1278
- }
1279
- return issues;
1165
+ const issues = [];
1166
+ if (!isSafeSelector(selector)) issues.push({
1167
+ code: "invalid-selector",
1168
+ message: "selector must be one non-empty CSS selector without commas, braces, or semicolons."
1169
+ });
1170
+ if (!generation.valid) issues.push({
1171
+ code: "invalid-default-mode",
1172
+ message: generation.message
1173
+ });
1174
+ if (!theme.densities[theme.density]) issues.push({
1175
+ code: "invalid-density",
1176
+ message: `The density preset "${theme.density}" is not defined in theme.densities.`
1177
+ });
1178
+ if (!theme.radii[theme.radius]) issues.push({
1179
+ code: "invalid-radius",
1180
+ message: `The radius preset "${theme.radius}" is not defined in theme.radii.`
1181
+ });
1182
+ const modes = generation.schemes === "both" ? [["light", lightTokens], ["dark", darkTokens]] : [[generation.schemes, generation.schemes === "light" ? lightTokens : darkTokens]];
1183
+ for (const [mode, tokens] of modes) {
1184
+ for (const [token, value] of Object.entries(tokens)) if (!isSafeCssValue$1(value)) issues.push({
1185
+ code: "invalid-css-value",
1186
+ message: `${token} contains characters that cannot be emitted safely.`,
1187
+ mode,
1188
+ token
1189
+ });
1190
+ if (generation.validateContrast) {
1191
+ for (const check of contrast[mode].checks) if (check.status === "fail") issues.push({
1192
+ code: "contrast-failed",
1193
+ message: `${check.label} is ${check.ratio?.toFixed(2)}:1; ${check.requiredRatio}:1 is required.`,
1194
+ mode
1195
+ });
1196
+ else if (check.status === "unresolved") issues.push({
1197
+ code: "contrast-unresolved",
1198
+ message: `${check.label} could not be evaluated from static colors.`,
1199
+ mode
1200
+ });
1201
+ }
1202
+ }
1203
+ return issues;
1280
1204
  }
1281
1205
  function serializeThemeCss(lightTokens, darkTokens, selector, options, generation) {
1282
- if (generation.schemes !== 'both') {
1283
- const mode = generation.schemes;
1284
- const tokens = Object.entries(mode === 'light' ? lightTokens : darkTokens);
1285
- const rule = formatRule([selector], tokens, mode, options.minify ?? false);
1286
- return finalizeCss([rule], options);
1287
- }
1288
- const includeSystemMode = generation.includeSystemMode;
1289
- const common = [];
1290
- const light = [];
1291
- const dark = [];
1292
- for (const [token, lightValue] of Object.entries(lightTokens)) {
1293
- const darkValue = darkTokens[token];
1294
- if (darkValue === lightValue)
1295
- common.push([token, lightValue]);
1296
- else
1297
- light.push([token, lightValue]);
1298
- }
1299
- for (const [token, darkValue] of Object.entries(darkTokens)) {
1300
- if (!(token in lightTokens))
1301
- dark.push([token, darkValue]);
1302
- else if (lightTokens[token] !== darkValue) {
1303
- dark.push([token, darkValue]);
1304
- }
1305
- }
1306
- const lightSelectors = [`${selector}[data-aeris-theme='light']`];
1307
- const darkSelectors = [`${selector}[data-aeris-theme='dark']`];
1308
- if (generation.defaultMode === 'light' || generation.defaultMode === 'system') {
1309
- lightSelectors.unshift(selector);
1310
- }
1311
- else {
1312
- darkSelectors.unshift(selector);
1313
- }
1314
- if (includeSystemMode)
1315
- lightSelectors.push(`${selector}[data-aeris-theme='system']`);
1316
- const rules = [
1317
- formatRule([selector], common, undefined, options.minify ?? false),
1318
- formatRule(lightSelectors, light, 'light', options.minify ?? false),
1319
- formatRule(darkSelectors, dark, 'dark', options.minify ?? false),
1320
- ];
1321
- if (includeSystemMode) {
1322
- const systemSelectors = [`${selector}[data-aeris-theme='system']`];
1323
- if (generation.defaultMode === 'system') {
1324
- systemSelectors.unshift(`${selector}:not([data-aeris-theme])`);
1325
- }
1326
- const systemRule = formatRule(systemSelectors, dark, 'dark', options.minify ?? false);
1327
- rules.push(formatMediaRule(systemRule, options.minify ?? false));
1328
- }
1329
- return finalizeCss(rules, options);
1206
+ if (generation.schemes !== "both") {
1207
+ const mode = generation.schemes;
1208
+ const tokens = Object.entries(mode === "light" ? lightTokens : darkTokens);
1209
+ return finalizeCss([formatRule([selector], tokens, mode, options.minify ?? false)], options);
1210
+ }
1211
+ const includeSystemMode = generation.includeSystemMode;
1212
+ const common = [];
1213
+ const light = [];
1214
+ const dark = [];
1215
+ for (const [token, lightValue] of Object.entries(lightTokens)) if (darkTokens[token] === lightValue) common.push([token, lightValue]);
1216
+ else light.push([token, lightValue]);
1217
+ for (const [token, darkValue] of Object.entries(darkTokens)) if (!(token in lightTokens)) dark.push([token, darkValue]);
1218
+ else if (lightTokens[token] !== darkValue) dark.push([token, darkValue]);
1219
+ const lightSelectors = [`${selector}[data-aeris-theme='light']`];
1220
+ const darkSelectors = [`${selector}[data-aeris-theme='dark']`];
1221
+ if (generation.defaultMode === "light" || generation.defaultMode === "system") lightSelectors.unshift(selector);
1222
+ else darkSelectors.unshift(selector);
1223
+ if (includeSystemMode) lightSelectors.push(`${selector}[data-aeris-theme='system']`);
1224
+ const rules = [
1225
+ formatRule([selector], common, void 0, options.minify ?? false),
1226
+ formatRule(lightSelectors, light, "light", options.minify ?? false),
1227
+ formatRule(darkSelectors, dark, "dark", options.minify ?? false)
1228
+ ];
1229
+ if (includeSystemMode) {
1230
+ const systemSelectors = [`${selector}[data-aeris-theme='system']`];
1231
+ if (generation.defaultMode === "system") systemSelectors.unshift(`${selector}:not([data-aeris-theme])`);
1232
+ const systemRule = formatRule(systemSelectors, dark, "dark", options.minify ?? false);
1233
+ rules.push(formatMediaRule(systemRule, options.minify ?? false));
1234
+ }
1235
+ return finalizeCss(rules, options);
1330
1236
  }
1331
1237
  function finalizeCss(rules, options) {
1332
- const minify = options.minify ?? false;
1333
- const banner = options.banner ?? true;
1334
- const output = rules.filter(Boolean).join(minify ? '' : '\n\n');
1335
- if (minify || !banner)
1336
- return `${output}${minify ? '' : '\n'}`;
1337
- return `${GENERATED_BANNER}\n${output}\n`;
1238
+ const minify = options.minify ?? false;
1239
+ const banner = options.banner ?? true;
1240
+ const output = rules.filter(Boolean).join(minify ? "" : "\n\n");
1241
+ if (minify || !banner) return `${output}${minify ? "" : "\n"}`;
1242
+ return `${GENERATED_BANNER}\n${output}\n`;
1338
1243
  }
1339
1244
  function resolveGenerationOptions(options) {
1340
- const schemes = options.schemes ?? 'both';
1341
- const validSchemes = schemes === 'both' || schemes === 'light' || schemes === 'dark';
1342
- const includeSystemMode = schemes === 'both' && (options.includeSystemMode ?? true);
1343
- const validateContrast = options.validateContrast ?? true;
1344
- const defaultMode = options.defaultMode ??
1345
- (schemes === 'both' ? (includeSystemMode ? 'system' : 'light') : schemes);
1346
- const validDefaultMode = defaultMode === 'system' || defaultMode === 'light' || defaultMode === 'dark';
1347
- const valid = validSchemes &&
1348
- validDefaultMode &&
1349
- ((schemes === 'both' && (defaultMode !== 'system' || includeSystemMode)) ||
1350
- schemes === defaultMode);
1351
- return {
1352
- schemes,
1353
- defaultMode,
1354
- includeSystemMode,
1355
- validateContrast,
1356
- valid,
1357
- message: !validSchemes
1358
- ? 'schemes must be "both", "light", or "dark".'
1359
- : !validDefaultMode
1360
- ? 'defaultMode must be "system", "light", or "dark".'
1361
- : schemes === 'both'
1362
- ? 'defaultMode="system" requires system-mode generation to be enabled.'
1363
- : `defaultMode must be "${schemes}" when only the ${schemes} scheme is generated.`,
1364
- };
1245
+ const schemes = options.schemes ?? "both";
1246
+ const validSchemes = schemes === "both" || schemes === "light" || schemes === "dark";
1247
+ const includeSystemMode = schemes === "both" && (options.includeSystemMode ?? true);
1248
+ const validateContrast = options.validateContrast ?? true;
1249
+ const defaultMode = options.defaultMode ?? (schemes === "both" ? includeSystemMode ? "system" : "light" : schemes);
1250
+ const validDefaultMode = defaultMode === "system" || defaultMode === "light" || defaultMode === "dark";
1251
+ return {
1252
+ schemes,
1253
+ defaultMode,
1254
+ includeSystemMode,
1255
+ validateContrast,
1256
+ valid: validSchemes && validDefaultMode && (schemes === "both" && (defaultMode !== "system" || includeSystemMode) || schemes === defaultMode),
1257
+ message: !validSchemes ? "schemes must be \"both\", \"light\", or \"dark\"." : !validDefaultMode ? "defaultMode must be \"system\", \"light\", or \"dark\"." : schemes === "both" ? "defaultMode=\"system\" requires system-mode generation to be enabled." : `defaultMode must be "${schemes}" when only the ${schemes} scheme is generated.`
1258
+ };
1365
1259
  }
1366
1260
  function formatRule(selectors, tokens, colorScheme, minify) {
1367
- if (!tokens.length && !colorScheme)
1368
- return '';
1369
- if (minify) {
1370
- const declarations = [
1371
- ...(colorScheme ? [`color-scheme:${colorScheme}`] : []),
1372
- ...tokens.map(([token, value]) => `${token}:${value}`),
1373
- ];
1374
- return `${selectors.join(',')}{${declarations.join(';')}}`;
1375
- }
1376
- const declarations = [
1377
- ...(colorScheme ? [` color-scheme: ${colorScheme};`] : []),
1378
- ...tokens.map(([token, value]) => ` ${token}: ${value};`),
1379
- ];
1380
- return `${selectors.join(',\n')} {\n${declarations.join('\n')}\n}`;
1261
+ if (!tokens.length && !colorScheme) return "";
1262
+ if (minify) {
1263
+ const declarations = [...colorScheme ? [`color-scheme:${colorScheme}`] : [], ...tokens.map(([token, value]) => `${token}:${value}`)];
1264
+ return `${selectors.join(",")}{${declarations.join(";")}}`;
1265
+ }
1266
+ const declarations = [...colorScheme ? [` color-scheme: ${colorScheme};`] : [], ...tokens.map(([token, value]) => ` ${token}: ${value};`)];
1267
+ return `${selectors.join(",\n")} {\n${declarations.join("\n")}\n}`;
1381
1268
  }
1382
1269
  function formatMediaRule(rule, minify) {
1383
- if (minify)
1384
- return `@media(prefers-color-scheme:dark){${rule}}`;
1385
- return `@media (prefers-color-scheme: dark) {\n${rule
1386
- .split('\n')
1387
- .map((line) => ` ${line}`)
1388
- .join('\n')}\n}`;
1270
+ if (minify) return `@media(prefers-color-scheme:dark){${rule}}`;
1271
+ return `@media (prefers-color-scheme: dark) {\n${rule.split("\n").map((line) => ` ${line}`).join("\n")}\n}`;
1389
1272
  }
1390
1273
  function isSafeSelector(selector) {
1391
- return selector.length > 0 && !/[{},;\r\n]/.test(selector);
1274
+ return selector.length > 0 && !/[{},;\r\n]/.test(selector);
1392
1275
  }
1393
1276
  function isSafeCssValue$1(value) {
1394
- return value.length > 0 && !/[;{}\r\n]/.test(value);
1277
+ return value.length > 0 && !/[;{}\r\n]/.test(value);
1395
1278
  }
1396
-
1397
1279
  const SCHEME_COLOR_PROPERTIES = [
1398
- 'accent',
1399
- 'page',
1400
- 'surface',
1401
- 'surface2',
1402
- 'surface3',
1403
- 'interactiveHover',
1404
- 'text',
1405
- 'text2',
1406
- 'text3',
1407
- 'border',
1408
- 'borderStrong',
1409
- 'focus',
1280
+ "accent",
1281
+ "page",
1282
+ "surface",
1283
+ "surface2",
1284
+ "surface3",
1285
+ "interactiveHover",
1286
+ "text",
1287
+ "text2",
1288
+ "text3",
1289
+ "border",
1290
+ "borderStrong",
1291
+ "focus"
1410
1292
  ];
1411
1293
  const TONE_PROPERTIES = [
1412
- 'base',
1413
- 'boundary',
1414
- 'hover',
1415
- 'active',
1416
- 'onBase',
1417
- 'onHover',
1418
- 'onActive',
1419
- 'text',
1420
- 'soft',
1421
- 'onSoft',
1294
+ "base",
1295
+ "boundary",
1296
+ "hover",
1297
+ "active",
1298
+ "onBase",
1299
+ "onHover",
1300
+ "onActive",
1301
+ "text",
1302
+ "soft",
1303
+ "onSoft"
1422
1304
  ];
1423
- /**
1424
- * Validates a runtime or build-time theme without reading the DOM.
1425
- *
1426
- * Errors identify values Aeris cannot safely apply or accessibility checks
1427
- * known to fail. Warnings identify colors that require rendered/manual review.
1428
- */
1429
1305
  function validateAerisTheme(themeOverride = {}) {
1430
- const theme = resolveAerisTheme(themeOverride);
1431
- const issues = [];
1432
- validateThemeSelection(theme, issues);
1433
- const values = collectThemeCssValues(theme);
1434
- let canAuditColors = true;
1435
- for (const entry of values) {
1436
- if (isSafeCssValue(entry.value))
1437
- continue;
1438
- if (entry.affectsColorResolution)
1439
- canAuditColors = false;
1440
- issues.push({
1441
- code: 'invalid-css-value',
1442
- severity: 'error',
1443
- path: entry.path,
1444
- message: `${entry.path} must be a non-empty CSS value without braces, semicolons, or line breaks.`,
1445
- guidance: 'Replace it with a valid CSS color, length, radius, or shadow value.',
1446
- });
1447
- }
1448
- if (canAuditColors) {
1449
- for (const mode of ['light', 'dark']) {
1450
- const contrast = auditAerisThemeContrast(theme, mode);
1451
- for (const check of contrast.checks) {
1452
- if (check.status === 'pass')
1453
- continue;
1454
- const unresolved = check.status === 'unresolved';
1455
- issues.push({
1456
- code: unresolved ? 'contrast-unresolved' : 'contrast-failed',
1457
- severity: unresolved ? 'warning' : 'error',
1458
- mode,
1459
- path: `contrast.${mode}.${check.id}`,
1460
- ratio: check.ratio,
1461
- requiredRatio: check.requiredRatio,
1462
- message: unresolved
1463
- ? `${check.label} could not be evaluated from static colors.`
1464
- : `${check.label} is ${check.ratio?.toFixed(2)}:1; WCAG ${check.criterion} requires ${check.requiredRatio}:1.`,
1465
- guidance: unresolved
1466
- ? `${check.guidance} Static analysis supports opaque HEX, RGB, and HSL colors; verify CSS variables, named colors, and newer color functions in their rendered context.`
1467
- : check.guidance,
1468
- });
1469
- }
1470
- }
1471
- }
1472
- const errors = issues.filter(({ severity }) => severity === 'error');
1473
- const warnings = issues.filter(({ severity }) => severity === 'warning');
1474
- return {
1475
- status: errors.length ? 'error' : warnings.length ? 'warning' : 'valid',
1476
- valid: errors.length === 0,
1477
- issues,
1478
- errors,
1479
- warnings,
1480
- };
1306
+ const theme = resolveAerisTheme(themeOverride);
1307
+ const issues = [];
1308
+ validateThemeSelection(theme, issues);
1309
+ const values = collectThemeCssValues(theme);
1310
+ let canAuditColors = true;
1311
+ for (const entry of values) {
1312
+ if (isSafeCssValue(entry.value)) continue;
1313
+ if (entry.affectsColorResolution) canAuditColors = false;
1314
+ issues.push({
1315
+ code: "invalid-css-value",
1316
+ severity: "error",
1317
+ path: entry.path,
1318
+ message: `${entry.path} must be a non-empty CSS value without braces, semicolons, or line breaks.`,
1319
+ guidance: "Replace it with a valid CSS color, length, radius, or shadow value."
1320
+ });
1321
+ }
1322
+ if (canAuditColors) for (const mode of ["light", "dark"]) {
1323
+ const contrast = auditAerisThemeContrast(theme, mode);
1324
+ for (const check of contrast.checks) {
1325
+ if (check.status === "pass") continue;
1326
+ const unresolved = check.status === "unresolved";
1327
+ issues.push({
1328
+ code: unresolved ? "contrast-unresolved" : "contrast-failed",
1329
+ severity: unresolved ? "warning" : "error",
1330
+ mode,
1331
+ path: `contrast.${mode}.${check.id}`,
1332
+ ratio: check.ratio,
1333
+ requiredRatio: check.requiredRatio,
1334
+ message: unresolved ? `${check.label} could not be evaluated from static colors.` : `${check.label} is ${check.ratio?.toFixed(2)}:1; WCAG ${check.criterion} requires ${check.requiredRatio}:1.`,
1335
+ guidance: unresolved ? `${check.guidance} Static analysis supports opaque HEX, RGB, and HSL colors; verify CSS variables, named colors, and newer color functions in their rendered context.` : check.guidance
1336
+ });
1337
+ }
1338
+ }
1339
+ const errors = issues.filter(({ severity }) => severity === "error");
1340
+ const warnings = issues.filter(({ severity }) => severity === "warning");
1341
+ return {
1342
+ status: errors.length ? "error" : warnings.length ? "warning" : "valid",
1343
+ valid: errors.length === 0,
1344
+ issues,
1345
+ errors,
1346
+ warnings
1347
+ };
1481
1348
  }
1482
1349
  function validateThemeSelection(theme, issues) {
1483
- if (theme.direction !== undefined && theme.direction !== 'ltr' && theme.direction !== 'rtl') {
1484
- issues.push({
1485
- code: 'invalid-direction',
1486
- severity: 'error',
1487
- path: 'direction',
1488
- message: `direction must be "ltr" or "rtl"; received "${String(theme.direction)}".`,
1489
- guidance: 'Use ltr for left-to-right content or rtl for right-to-left content.',
1490
- });
1491
- }
1492
- if (!theme.densities[theme.density]) {
1493
- issues.push({
1494
- code: 'missing-density',
1495
- severity: 'error',
1496
- path: 'density',
1497
- message: `The selected density "${theme.density}" is not registered in theme.densities.`,
1498
- guidance: 'Select a built-in density or register a scale with the same name.',
1499
- });
1500
- }
1501
- if (!theme.radii[theme.radius]) {
1502
- issues.push({
1503
- code: 'missing-radius',
1504
- severity: 'error',
1505
- path: 'radius',
1506
- message: `The selected radius "${theme.radius}" is not registered in theme.radii.`,
1507
- guidance: 'Select a built-in corner style or register a radius scale with the same name.',
1508
- });
1509
- }
1350
+ if (theme.direction !== void 0 && theme.direction !== "ltr" && theme.direction !== "rtl") issues.push({
1351
+ code: "invalid-direction",
1352
+ severity: "error",
1353
+ path: "direction",
1354
+ message: `direction must be "ltr" or "rtl"; received "${String(theme.direction)}".`,
1355
+ guidance: "Use ltr for left-to-right content or rtl for right-to-left content."
1356
+ });
1357
+ if (!theme.densities[theme.density]) issues.push({
1358
+ code: "missing-density",
1359
+ severity: "error",
1360
+ path: "density",
1361
+ message: `The selected density "${theme.density}" is not registered in theme.densities.`,
1362
+ guidance: "Select a built-in density or register a scale with the same name."
1363
+ });
1364
+ if (!theme.radii[theme.radius]) issues.push({
1365
+ code: "missing-radius",
1366
+ severity: "error",
1367
+ path: "radius",
1368
+ message: `The selected radius "${theme.radius}" is not registered in theme.radii.`,
1369
+ guidance: "Select a built-in corner style or register a radius scale with the same name."
1370
+ });
1510
1371
  }
1511
1372
  function collectThemeCssValues(theme) {
1512
- const values = [
1513
- cssValue('palette.surface', theme.palette.surface, true),
1514
- cssValue('palette.primary', theme.palette.primary, true),
1515
- cssValue('palette.secondary', theme.palette.secondary, true),
1516
- cssValue('palette.accent', theme.palette.accent, true),
1517
- cssValue('palette.contrast', theme.palette.contrast, true),
1518
- ];
1519
- for (const mode of ['light', 'dark']) {
1520
- const scheme = theme[mode];
1521
- for (const property of SCHEME_COLOR_PROPERTIES) {
1522
- const value = scheme[property];
1523
- if (value !== undefined)
1524
- values.push(cssValue(`${mode}.${property}`, value, true));
1525
- }
1526
- if (scheme.shadowXs !== undefined) {
1527
- values.push(cssValue(`${mode}.shadowXs`, scheme.shadowXs, false));
1528
- }
1529
- if (scheme.shadowSm !== undefined) {
1530
- values.push(cssValue(`${mode}.shadowSm`, scheme.shadowSm, false));
1531
- }
1532
- for (const toneName of AERIS_SEMANTIC_TONE_NAMES) {
1533
- const tone = scheme.tones?.[toneName];
1534
- if (!tone)
1535
- continue;
1536
- for (const property of TONE_PROPERTIES) {
1537
- const value = tone[property];
1538
- if (value !== undefined) {
1539
- values.push(cssValue(`${mode}.tones.${toneName}.${property}`, value, true));
1540
- }
1541
- }
1542
- }
1543
- }
1544
- for (const [name, scale] of Object.entries(theme.densities)) {
1545
- if (!isRecord(scale)) {
1546
- values.push(cssValue(`densities.${name}`, scale, false));
1547
- continue;
1548
- }
1549
- for (const [property, value] of Object.entries(scale)) {
1550
- values.push(cssValue(`densities.${name}.${property}`, value, false));
1551
- }
1552
- }
1553
- for (const [name, scale] of Object.entries(theme.radii)) {
1554
- if (!isRecord(scale)) {
1555
- values.push(cssValue(`radii.${name}`, scale, false));
1556
- continue;
1557
- }
1558
- for (const [property, value] of Object.entries(scale)) {
1559
- values.push(cssValue(`radii.${name}.${property}`, value, false));
1560
- }
1561
- }
1562
- return values;
1373
+ const values = [
1374
+ cssValue("palette.surface", theme.palette.surface, true),
1375
+ cssValue("palette.primary", theme.palette.primary, true),
1376
+ cssValue("palette.secondary", theme.palette.secondary, true),
1377
+ cssValue("palette.accent", theme.palette.accent, true),
1378
+ cssValue("palette.contrast", theme.palette.contrast, true)
1379
+ ];
1380
+ for (const mode of ["light", "dark"]) {
1381
+ const scheme = theme[mode];
1382
+ for (const property of SCHEME_COLOR_PROPERTIES) {
1383
+ const value = scheme[property];
1384
+ if (value !== void 0) values.push(cssValue(`${mode}.${property}`, value, true));
1385
+ }
1386
+ if (scheme.shadowXs !== void 0) values.push(cssValue(`${mode}.shadowXs`, scheme.shadowXs, false));
1387
+ if (scheme.shadowSm !== void 0) values.push(cssValue(`${mode}.shadowSm`, scheme.shadowSm, false));
1388
+ for (const toneName of AERIS_SEMANTIC_TONE_NAMES) {
1389
+ const tone = scheme.tones?.[toneName];
1390
+ if (!tone) continue;
1391
+ for (const property of TONE_PROPERTIES) {
1392
+ const value = tone[property];
1393
+ if (value !== void 0) values.push(cssValue(`${mode}.tones.${toneName}.${property}`, value, true));
1394
+ }
1395
+ }
1396
+ }
1397
+ for (const [name, scale] of Object.entries(theme.densities)) {
1398
+ if (!isRecord(scale)) {
1399
+ values.push(cssValue(`densities.${name}`, scale, false));
1400
+ continue;
1401
+ }
1402
+ for (const [property, value] of Object.entries(scale)) values.push(cssValue(`densities.${name}.${property}`, value, false));
1403
+ }
1404
+ for (const [name, scale] of Object.entries(theme.radii)) {
1405
+ if (!isRecord(scale)) {
1406
+ values.push(cssValue(`radii.${name}`, scale, false));
1407
+ continue;
1408
+ }
1409
+ for (const [property, value] of Object.entries(scale)) values.push(cssValue(`radii.${name}.${property}`, value, false));
1410
+ }
1411
+ return values;
1563
1412
  }
1564
1413
  function cssValue(path, value, affectsColorResolution) {
1565
- return { path, value, affectsColorResolution };
1414
+ return {
1415
+ path,
1416
+ value,
1417
+ affectsColorResolution
1418
+ };
1566
1419
  }
1567
1420
  function isSafeCssValue(value) {
1568
- return typeof value === 'string' && value.trim().length > 0 && !/[;{}\r\n]/.test(value);
1421
+ return typeof value === "string" && value.trim().length > 0 && !/[;{}\r\n]/.test(value);
1569
1422
  }
1570
1423
  function isRecord(value) {
1571
- return typeof value === 'object' && value !== null && !Array.isArray(value);
1424
+ return typeof value === "object" && value !== null && !Array.isArray(value);
1572
1425
  }
1573
-
1574
- /**
1575
- * Framework-independent Aeris theme compiler APIs for Node.js build scripts and browser tooling.
1576
- */
1577
-
1578
- /**
1579
- * Generated bundle index. Do not edit.
1580
- */
1581
-
1582
1426
  export { AERIS_COLOR_DERIVATION_VERSION, AERIS_DEFAULT_THEME, AERIS_DENSITY_PRESETS, AERIS_RADIUS_PRESETS, AERIS_SEMANTIC_TONE_NAMES, AERIS_THEME_PRESETS, AerisThemeGenerationError, aerisContrastRatio, aerisRgbContrastRatio, auditAerisThemeContrast, compileAerisTheme, formatAerisHex, generateAerisThemeCss, mergeAerisTheme, mixAerisColor, mixAerisRgb, parseAerisColor, resolveAerisDensity, resolveAerisFoundation, resolveAerisRadius, resolveAerisSemanticTones, resolveAerisTheme, resolveAerisThemeTokens, validateAerisTheme };
1583
- //# sourceMappingURL=aeris-ui-core-theme-builder.mjs.map
1427
+
1428
+ //# sourceMappingURL=aeris-ui-core-theme-builder.mjs.map