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