@windmorph/react 0.0.0-stage → 0.1.1

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 (761) hide show
  1. package/LICENSE +21 -0
  2. package/NOTICE +23 -0
  3. package/README.md +149 -2
  4. package/dist/cli.d.ts +1 -0
  5. package/dist/cli.js +112 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/components/app-bar/AppBarItems.js +23 -0
  8. package/dist/components/app-bar/AppBarItems.js.map +1 -0
  9. package/dist/components/app-bar/TopAppBar.d.ts +89 -0
  10. package/dist/components/app-bar/TopAppBar.js +103 -0
  11. package/dist/components/app-bar/TopAppBar.js.map +1 -0
  12. package/dist/components/app-bar/app-bar-styles.d.ts +280 -0
  13. package/dist/components/app-bar/app-bar-styles.js +142 -0
  14. package/dist/components/app-bar/app-bar-styles.js.map +1 -0
  15. package/dist/components/app-bar/app-bar-tokens.d.ts +7 -0
  16. package/dist/components/app-bar/app-bar-tokens.js +64 -0
  17. package/dist/components/app-bar/app-bar-tokens.js.map +1 -0
  18. package/dist/components/app-bar/use-app-bar-scroll.d.ts +6 -0
  19. package/dist/components/app-bar/use-app-bar-scroll.js +139 -0
  20. package/dist/components/app-bar/use-app-bar-scroll.js.map +1 -0
  21. package/dist/components/autocomplete/Autocomplete.d.ts +142 -0
  22. package/dist/components/autocomplete/Autocomplete.js +284 -0
  23. package/dist/components/autocomplete/Autocomplete.js.map +1 -0
  24. package/dist/components/badge/Badge.d.ts +71 -0
  25. package/dist/components/badge/Badge.js +72 -0
  26. package/dist/components/badge/Badge.js.map +1 -0
  27. package/dist/components/badge/badge-styles.d.ts +100 -0
  28. package/dist/components/badge/badge-styles.js +43 -0
  29. package/dist/components/badge/badge-styles.js.map +1 -0
  30. package/dist/components/badge/badge-tokens.d.ts +7 -0
  31. package/dist/components/badge/badge-tokens.js +40 -0
  32. package/dist/components/badge/badge-tokens.js.map +1 -0
  33. package/dist/components/button/Button.d.ts +91 -0
  34. package/dist/components/button/Button.js +96 -0
  35. package/dist/components/button/Button.js.map +1 -0
  36. package/dist/components/button/ButtonContext.d.ts +30 -0
  37. package/dist/components/button/ButtonContext.js +18 -0
  38. package/dist/components/button/ButtonContext.js.map +1 -0
  39. package/dist/components/button/DensityZeroButtons.js +25 -0
  40. package/dist/components/button/DensityZeroButtons.js.map +1 -0
  41. package/dist/components/button/button-pending.d.ts +10 -0
  42. package/dist/components/button/button-pending.js +166 -0
  43. package/dist/components/button/button-pending.js.map +1 -0
  44. package/dist/components/button/button-styles.d.ts +216 -0
  45. package/dist/components/button/button-styles.js +199 -0
  46. package/dist/components/button/button-styles.js.map +1 -0
  47. package/dist/components/button/button-tokens.d.ts +10 -0
  48. package/dist/components/button/button-tokens.js +257 -0
  49. package/dist/components/button/button-tokens.js.map +1 -0
  50. package/dist/components/button/connected-shapes.js +152 -0
  51. package/dist/components/button/connected-shapes.js.map +1 -0
  52. package/dist/components/card/Card.d.ts +60 -0
  53. package/dist/components/card/Card.js +69 -0
  54. package/dist/components/card/Card.js.map +1 -0
  55. package/dist/components/card/card-styles.d.ts +42 -0
  56. package/dist/components/card/card-styles.js +64 -0
  57. package/dist/components/card/card-styles.js.map +1 -0
  58. package/dist/components/card/card-tokens.d.ts +7 -0
  59. package/dist/components/card/card-tokens.js +84 -0
  60. package/dist/components/card/card-tokens.js.map +1 -0
  61. package/dist/components/carousel/Carousel.d.ts +124 -0
  62. package/dist/components/carousel/Carousel.js +387 -0
  63. package/dist/components/carousel/Carousel.js.map +1 -0
  64. package/dist/components/carousel/carousel-keylines.js +486 -0
  65. package/dist/components/carousel/carousel-keylines.js.map +1 -0
  66. package/dist/components/carousel/carousel-press-area.js +35 -0
  67. package/dist/components/carousel/carousel-press-area.js.map +1 -0
  68. package/dist/components/carousel/carousel-styles.d.ts +188 -0
  69. package/dist/components/carousel/carousel-styles.js +116 -0
  70. package/dist/components/carousel/carousel-styles.js.map +1 -0
  71. package/dist/components/carousel/carousel-tokens.d.ts +7 -0
  72. package/dist/components/carousel/carousel-tokens.js +18 -0
  73. package/dist/components/carousel/carousel-tokens.js.map +1 -0
  74. package/dist/components/checkbox/Checkbox.d.ts +78 -0
  75. package/dist/components/checkbox/Checkbox.js +77 -0
  76. package/dist/components/checkbox/Checkbox.js.map +1 -0
  77. package/dist/components/checkbox/checkbox-box.js +34 -0
  78. package/dist/components/checkbox/checkbox-box.js.map +1 -0
  79. package/dist/components/checkbox/checkbox-styles.d.ts +100 -0
  80. package/dist/components/checkbox/checkbox-styles.js +54 -0
  81. package/dist/components/checkbox/checkbox-styles.js.map +1 -0
  82. package/dist/components/checkbox/checkbox-tokens.d.ts +7 -0
  83. package/dist/components/checkbox/checkbox-tokens.js +41 -0
  84. package/dist/components/checkbox/checkbox-tokens.js.map +1 -0
  85. package/dist/components/chip/Chip.d.ts +171 -0
  86. package/dist/components/chip/Chip.js +348 -0
  87. package/dist/components/chip/Chip.js.map +1 -0
  88. package/dist/components/chip/ChipSet.d.ts +70 -0
  89. package/dist/components/chip/ChipSet.js +198 -0
  90. package/dist/components/chip/ChipSet.js.map +1 -0
  91. package/dist/components/chip/chip-styles.d.ts +263 -0
  92. package/dist/components/chip/chip-styles.js +360 -0
  93. package/dist/components/chip/chip-styles.js.map +1 -0
  94. package/dist/components/chip/chip-tokens.d.ts +13 -0
  95. package/dist/components/chip/chip-tokens.js +185 -0
  96. package/dist/components/chip/chip-tokens.js.map +1 -0
  97. package/dist/components/date-picker/CalendarGrid.js +94 -0
  98. package/dist/components/date-picker/CalendarGrid.js.map +1 -0
  99. package/dist/components/date-picker/CompactDateDialog.js +63 -0
  100. package/dist/components/date-picker/CompactDateDialog.js.map +1 -0
  101. package/dist/components/date-picker/DateField.d.ts +161 -0
  102. package/dist/components/date-picker/DateField.js +393 -0
  103. package/dist/components/date-picker/DateField.js.map +1 -0
  104. package/dist/components/date-picker/DateInput.d.ts +20 -0
  105. package/dist/components/date-picker/DateInput.js +99 -0
  106. package/dist/components/date-picker/DateInput.js.map +1 -0
  107. package/dist/components/date-picker/DatePicker.d.ts +165 -0
  108. package/dist/components/date-picker/DatePicker.js +492 -0
  109. package/dist/components/date-picker/DatePicker.js.map +1 -0
  110. package/dist/components/date-picker/PickerDialog.d.ts +121 -0
  111. package/dist/components/date-picker/PickerDialog.js +161 -0
  112. package/dist/components/date-picker/PickerDialog.js.map +1 -0
  113. package/dist/components/date-picker/calendar-parts.js +141 -0
  114. package/dist/components/date-picker/calendar-parts.js.map +1 -0
  115. package/dist/components/date-picker/date-format.js +72 -0
  116. package/dist/components/date-picker/date-format.js.map +1 -0
  117. package/dist/components/date-picker/date-picker-styles.d.ts +247 -0
  118. package/dist/components/date-picker/date-picker-styles.js +163 -0
  119. package/dist/components/date-picker/date-picker-styles.js.map +1 -0
  120. package/dist/components/date-picker/date-picker-tokens.d.ts +7 -0
  121. package/dist/components/date-picker/date-picker-tokens.js +104 -0
  122. package/dist/components/date-picker/date-picker-tokens.js.map +1 -0
  123. package/dist/components/date-picker/picker-dialog-context.js +8 -0
  124. package/dist/components/date-picker/picker-dialog-context.js.map +1 -0
  125. package/dist/components/date-picker/picker-dialog-styles.d.ts +95 -0
  126. package/dist/components/date-picker/picker-dialog-styles.js +57 -0
  127. package/dist/components/date-picker/picker-dialog-styles.js.map +1 -0
  128. package/dist/components/date-picker/picker-icons.js +24 -0
  129. package/dist/components/date-picker/picker-icons.js.map +1 -0
  130. package/dist/components/date-picker/use-media-query.js +21 -0
  131. package/dist/components/date-picker/use-media-query.js.map +1 -0
  132. package/dist/components/date-picker/use-size-transform.js +62 -0
  133. package/dist/components/date-picker/use-size-transform.js.map +1 -0
  134. package/dist/components/date-picker/use-view-exit.js +68 -0
  135. package/dist/components/date-picker/use-view-exit.js.map +1 -0
  136. package/dist/components/dialog/Dialog.d.ts +267 -0
  137. package/dist/components/dialog/Dialog.js +521 -0
  138. package/dist/components/dialog/Dialog.js.map +1 -0
  139. package/dist/components/dialog/dialog-styles.d.ts +335 -0
  140. package/dist/components/dialog/dialog-styles.js +377 -0
  141. package/dist/components/dialog/dialog-styles.js.map +1 -0
  142. package/dist/components/dialog/dialog-tokens.d.ts +7 -0
  143. package/dist/components/dialog/dialog-tokens.js +57 -0
  144. package/dist/components/dialog/dialog-tokens.js.map +1 -0
  145. package/dist/components/divider/Divider.d.ts +59 -0
  146. package/dist/components/divider/Divider.js +53 -0
  147. package/dist/components/divider/Divider.js.map +1 -0
  148. package/dist/components/divider/divider-styles.d.ts +90 -0
  149. package/dist/components/divider/divider-styles.js +66 -0
  150. package/dist/components/divider/divider-styles.js.map +1 -0
  151. package/dist/components/divider/divider-tokens.d.ts +7 -0
  152. package/dist/components/divider/divider-tokens.js +16 -0
  153. package/dist/components/divider/divider-tokens.js.map +1 -0
  154. package/dist/components/fab/Fab.d.ts +130 -0
  155. package/dist/components/fab/Fab.js +137 -0
  156. package/dist/components/fab/Fab.js.map +1 -0
  157. package/dist/components/fab/FabTooltip.js +36 -0
  158. package/dist/components/fab/FabTooltip.js.map +1 -0
  159. package/dist/components/fab/fab-styles.d.ts +286 -0
  160. package/dist/components/fab/fab-styles.js +131 -0
  161. package/dist/components/fab/fab-styles.js.map +1 -0
  162. package/dist/components/fab/fab-tokens.d.ts +12 -0
  163. package/dist/components/fab/fab-tokens.js +105 -0
  164. package/dist/components/fab/fab-tokens.js.map +1 -0
  165. package/dist/components/fab-menu/FabMenu.d.ts +156 -0
  166. package/dist/components/fab-menu/FabMenu.js +291 -0
  167. package/dist/components/fab-menu/FabMenu.js.map +1 -0
  168. package/dist/components/fab-menu/fab-menu-stagger.js +51 -0
  169. package/dist/components/fab-menu/fab-menu-stagger.js.map +1 -0
  170. package/dist/components/fab-menu/fab-menu-styles.d.ts +166 -0
  171. package/dist/components/fab-menu/fab-menu-styles.js +107 -0
  172. package/dist/components/fab-menu/fab-menu-styles.js.map +1 -0
  173. package/dist/components/fab-menu/fab-menu-tokens.d.ts +7 -0
  174. package/dist/components/fab-menu/fab-menu-tokens.js +120 -0
  175. package/dist/components/fab-menu/fab-menu-tokens.js.map +1 -0
  176. package/dist/components/icon-button/IconButton.d.ts +125 -0
  177. package/dist/components/icon-button/IconButton.js +112 -0
  178. package/dist/components/icon-button/IconButton.js.map +1 -0
  179. package/dist/components/icon-button/icon-button-styles.d.ts +217 -0
  180. package/dist/components/icon-button/icon-button-styles.js +244 -0
  181. package/dist/components/icon-button/icon-button-styles.js.map +1 -0
  182. package/dist/components/icon-button/icon-button-tokens.d.ts +11 -0
  183. package/dist/components/icon-button/icon-button-tokens.js +215 -0
  184. package/dist/components/icon-button/icon-button-tokens.js.map +1 -0
  185. package/dist/components/list/List.d.ts +265 -0
  186. package/dist/components/list/List.js +1386 -0
  187. package/dist/components/list/List.js.map +1 -0
  188. package/dist/components/list/ListMedia.d.ts +88 -0
  189. package/dist/components/list/ListMedia.js +132 -0
  190. package/dist/components/list/ListMedia.js.map +1 -0
  191. package/dist/components/list/list-styles.d.ts +375 -0
  192. package/dist/components/list/list-styles.js +220 -0
  193. package/dist/components/list/list-styles.js.map +1 -0
  194. package/dist/components/list/list-tokens.d.ts +7 -0
  195. package/dist/components/list/list-tokens.js +92 -0
  196. package/dist/components/list/list-tokens.js.map +1 -0
  197. package/dist/components/loading-indicator/LoadingIndicator.d.ts +65 -0
  198. package/dist/components/loading-indicator/LoadingIndicator.js +92 -0
  199. package/dist/components/loading-indicator/LoadingIndicator.js.map +1 -0
  200. package/dist/components/loading-indicator/lazy-loading-indicator.js +25 -0
  201. package/dist/components/loading-indicator/lazy-loading-indicator.js.map +1 -0
  202. package/dist/components/loading-indicator/loading-indicator-frames.js +149 -0
  203. package/dist/components/loading-indicator/loading-indicator-frames.js.map +1 -0
  204. package/dist/components/loading-indicator/loading-indicator-styles.d.ts +36 -0
  205. package/dist/components/loading-indicator/loading-indicator-styles.js +22 -0
  206. package/dist/components/loading-indicator/loading-indicator-styles.js.map +1 -0
  207. package/dist/components/loading-indicator/loading-indicator-tokens.d.ts +7 -0
  208. package/dist/components/loading-indicator/loading-indicator-tokens.js +44 -0
  209. package/dist/components/loading-indicator/loading-indicator-tokens.js.map +1 -0
  210. package/dist/components/menu/Menu.d.ts +215 -0
  211. package/dist/components/menu/Menu.js +715 -0
  212. package/dist/components/menu/Menu.js.map +1 -0
  213. package/dist/components/menu/menu-styles.d.ts +354 -0
  214. package/dist/components/menu/menu-styles.js +219 -0
  215. package/dist/components/menu/menu-styles.js.map +1 -0
  216. package/dist/components/menu/menu-tokens.d.ts +7 -0
  217. package/dist/components/menu/menu-tokens.js +93 -0
  218. package/dist/components/menu/menu-tokens.js.map +1 -0
  219. package/dist/components/menu/menu-trigger.d.ts +51 -0
  220. package/dist/components/menu/menu-trigger.js +100 -0
  221. package/dist/components/menu/menu-trigger.js.map +1 -0
  222. package/dist/components/menu/use-reveal-entering.js +42 -0
  223. package/dist/components/menu/use-reveal-entering.js.map +1 -0
  224. package/dist/components/navigation/NavItem.d.ts +54 -0
  225. package/dist/components/navigation/NavItem.js +182 -0
  226. package/dist/components/navigation/NavItem.js.map +1 -0
  227. package/dist/components/navigation/NavigationBar.d.ts +64 -0
  228. package/dist/components/navigation/NavigationBar.js +121 -0
  229. package/dist/components/navigation/NavigationBar.js.map +1 -0
  230. package/dist/components/navigation/NavigationRail.d.ts +91 -0
  231. package/dist/components/navigation/NavigationRail.js +285 -0
  232. package/dist/components/navigation/NavigationRail.js.map +1 -0
  233. package/dist/components/navigation/nav-item-styles.d.ts +190 -0
  234. package/dist/components/navigation/nav-item-styles.js +123 -0
  235. package/dist/components/navigation/nav-item-styles.js.map +1 -0
  236. package/dist/components/navigation/navigation-styles.d.ts +239 -0
  237. package/dist/components/navigation/navigation-styles.js +134 -0
  238. package/dist/components/navigation/navigation-styles.js.map +1 -0
  239. package/dist/components/navigation/navigation-tokens.d.ts +9 -0
  240. package/dist/components/navigation/navigation-tokens.js +114 -0
  241. package/dist/components/navigation/navigation-tokens.js.map +1 -0
  242. package/dist/components/navigation/use-hide-on-scroll.js +115 -0
  243. package/dist/components/navigation/use-hide-on-scroll.js.map +1 -0
  244. package/dist/components/navigation/use-item-arrow-keys.js +37 -0
  245. package/dist/components/navigation/use-item-arrow-keys.js.map +1 -0
  246. package/dist/components/navigation/use-rail-item-morph.js +61 -0
  247. package/dist/components/navigation/use-rail-item-morph.js.map +1 -0
  248. package/dist/components/progress/ProgressIndicator.d.ts +95 -0
  249. package/dist/components/progress/ProgressIndicator.js +426 -0
  250. package/dist/components/progress/ProgressIndicator.js.map +1 -0
  251. package/dist/components/progress/progress-geometry.js +285 -0
  252. package/dist/components/progress/progress-geometry.js.map +1 -0
  253. package/dist/components/progress/progress-styles.d.ts +81 -0
  254. package/dist/components/progress/progress-styles.js +43 -0
  255. package/dist/components/progress/progress-styles.js.map +1 -0
  256. package/dist/components/progress/progress-tokens.d.ts +7 -0
  257. package/dist/components/progress/progress-tokens.js +39 -0
  258. package/dist/components/progress/progress-tokens.js.map +1 -0
  259. package/dist/components/pull-to-refresh/PullToRefresh.d.ts +94 -0
  260. package/dist/components/pull-to-refresh/PullToRefresh.js +395 -0
  261. package/dist/components/pull-to-refresh/PullToRefresh.js.map +1 -0
  262. package/dist/components/pull-to-refresh/pull-to-refresh-math.js +37 -0
  263. package/dist/components/pull-to-refresh/pull-to-refresh-math.js.map +1 -0
  264. package/dist/components/pull-to-refresh/pull-to-refresh-styles.d.ts +53 -0
  265. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js +14 -0
  266. package/dist/components/pull-to-refresh/pull-to-refresh-styles.js.map +1 -0
  267. package/dist/components/radio/RadioGroup.d.ts +121 -0
  268. package/dist/components/radio/RadioGroup.js +163 -0
  269. package/dist/components/radio/RadioGroup.js.map +1 -0
  270. package/dist/components/radio/radio-ring.js +21 -0
  271. package/dist/components/radio/radio-ring.js.map +1 -0
  272. package/dist/components/radio/radio-styles.d.ts +155 -0
  273. package/dist/components/radio/radio-styles.js +60 -0
  274. package/dist/components/radio/radio-styles.js.map +1 -0
  275. package/dist/components/radio/radio-tokens.d.ts +7 -0
  276. package/dist/components/radio/radio-tokens.js +31 -0
  277. package/dist/components/radio/radio-tokens.js.map +1 -0
  278. package/dist/components/search/SearchAppBar.d.ts +45 -0
  279. package/dist/components/search/SearchAppBar.js +61 -0
  280. package/dist/components/search/SearchAppBar.js.map +1 -0
  281. package/dist/components/search/SearchBar.d.ts +147 -0
  282. package/dist/components/search/SearchBar.js +412 -0
  283. package/dist/components/search/SearchBar.js.map +1 -0
  284. package/dist/components/search/search-styles.d.ts +243 -0
  285. package/dist/components/search/search-styles.js +143 -0
  286. package/dist/components/search/search-styles.js.map +1 -0
  287. package/dist/components/search/search-tokens.d.ts +9 -0
  288. package/dist/components/search/search-tokens.js +70 -0
  289. package/dist/components/search/search-tokens.js.map +1 -0
  290. package/dist/components/select/Select.d.ts +187 -0
  291. package/dist/components/select/Select.js +319 -0
  292. package/dist/components/select/Select.js.map +1 -0
  293. package/dist/components/select/field-shell.d.ts +29 -0
  294. package/dist/components/select/field-shell.js +135 -0
  295. package/dist/components/select/field-shell.js.map +1 -0
  296. package/dist/components/select/option-list.d.ts +81 -0
  297. package/dist/components/select/option-list.js +291 -0
  298. package/dist/components/select/option-list.js.map +1 -0
  299. package/dist/components/select/search-list.js +135 -0
  300. package/dist/components/select/search-list.js.map +1 -0
  301. package/dist/components/select/selection-cap.js +30 -0
  302. package/dist/components/select/selection-cap.js.map +1 -0
  303. package/dist/components/sheet/BottomSheet.d.ts +154 -0
  304. package/dist/components/sheet/BottomSheet.js +442 -0
  305. package/dist/components/sheet/BottomSheet.js.map +1 -0
  306. package/dist/components/sheet/SheetTrigger.d.ts +25 -0
  307. package/dist/components/sheet/SheetTrigger.js +46 -0
  308. package/dist/components/sheet/SheetTrigger.js.map +1 -0
  309. package/dist/components/sheet/SideSheet.d.ts +139 -0
  310. package/dist/components/sheet/SideSheet.js +289 -0
  311. package/dist/components/sheet/SideSheet.js.map +1 -0
  312. package/dist/components/sheet/bottom-sheet-gesture.js +30 -0
  313. package/dist/components/sheet/bottom-sheet-gesture.js.map +1 -0
  314. package/dist/components/sheet/lazy-bottom-sheet.js +33 -0
  315. package/dist/components/sheet/lazy-bottom-sheet.js.map +1 -0
  316. package/dist/components/sheet/sheet-gesture.js +48 -0
  317. package/dist/components/sheet/sheet-gesture.js.map +1 -0
  318. package/dist/components/sheet/sheet-icons.js +31 -0
  319. package/dist/components/sheet/sheet-icons.js.map +1 -0
  320. package/dist/components/sheet/sheet-settle.js +58 -0
  321. package/dist/components/sheet/sheet-settle.js.map +1 -0
  322. package/dist/components/sheet/sheet-styles.d.ts +312 -0
  323. package/dist/components/sheet/sheet-styles.js +229 -0
  324. package/dist/components/sheet/sheet-styles.js.map +1 -0
  325. package/dist/components/sheet/sheet-tokens.d.ts +12 -0
  326. package/dist/components/sheet/sheet-tokens.js +115 -0
  327. package/dist/components/sheet/sheet-tokens.js.map +1 -0
  328. package/dist/components/sheet/side-swipe-gesture.js +22 -0
  329. package/dist/components/sheet/side-swipe-gesture.js.map +1 -0
  330. package/dist/components/sheet/use-peek-inert.js +32 -0
  331. package/dist/components/sheet/use-peek-inert.js.map +1 -0
  332. package/dist/components/sheet/use-side-swipe.js +174 -0
  333. package/dist/components/sheet/use-side-swipe.js.map +1 -0
  334. package/dist/components/slider/Slider.d.ts +129 -0
  335. package/dist/components/slider/Slider.js +295 -0
  336. package/dist/components/slider/Slider.js.map +1 -0
  337. package/dist/components/slider/slider-geometry.js +138 -0
  338. package/dist/components/slider/slider-geometry.js.map +1 -0
  339. package/dist/components/slider/slider-styles.d.ts +133 -0
  340. package/dist/components/slider/slider-styles.js +97 -0
  341. package/dist/components/slider/slider-styles.js.map +1 -0
  342. package/dist/components/slider/slider-tokens.d.ts +7 -0
  343. package/dist/components/slider/slider-tokens.js +66 -0
  344. package/dist/components/slider/slider-tokens.js.map +1 -0
  345. package/dist/components/slider/use-touch-track.js +138 -0
  346. package/dist/components/slider/use-touch-track.js.map +1 -0
  347. package/dist/components/snackbar/Snackbar.d.ts +96 -0
  348. package/dist/components/snackbar/Snackbar.js +253 -0
  349. package/dist/components/snackbar/Snackbar.js.map +1 -0
  350. package/dist/components/snackbar/snackbar-state.d.ts +58 -0
  351. package/dist/components/snackbar/snackbar-state.js +73 -0
  352. package/dist/components/snackbar/snackbar-state.js.map +1 -0
  353. package/dist/components/snackbar/snackbar-styles.d.ts +109 -0
  354. package/dist/components/snackbar/snackbar-styles.js +67 -0
  355. package/dist/components/snackbar/snackbar-styles.js.map +1 -0
  356. package/dist/components/snackbar/snackbar-tokens.d.ts +7 -0
  357. package/dist/components/snackbar/snackbar-tokens.js +54 -0
  358. package/dist/components/snackbar/snackbar-tokens.js.map +1 -0
  359. package/dist/components/split-button/SplitButton.d.ts +109 -0
  360. package/dist/components/split-button/SplitButton.js +195 -0
  361. package/dist/components/split-button/SplitButton.js.map +1 -0
  362. package/dist/components/split-button/split-button-styles.d.ts +214 -0
  363. package/dist/components/split-button/split-button-styles.js +164 -0
  364. package/dist/components/split-button/split-button-styles.js.map +1 -0
  365. package/dist/components/split-button/split-button-tokens.d.ts +7 -0
  366. package/dist/components/split-button/split-button-tokens.js +36 -0
  367. package/dist/components/split-button/split-button-tokens.js.map +1 -0
  368. package/dist/components/switch/Switch.d.ts +82 -0
  369. package/dist/components/switch/Switch.js +165 -0
  370. package/dist/components/switch/Switch.js.map +1 -0
  371. package/dist/components/switch/switch-styles.d.ts +96 -0
  372. package/dist/components/switch/switch-styles.js +68 -0
  373. package/dist/components/switch/switch-styles.js.map +1 -0
  374. package/dist/components/switch/switch-thumb.js +41 -0
  375. package/dist/components/switch/switch-thumb.js.map +1 -0
  376. package/dist/components/switch/switch-tokens.d.ts +7 -0
  377. package/dist/components/switch/switch-tokens.js +78 -0
  378. package/dist/components/switch/switch-tokens.js.map +1 -0
  379. package/dist/components/tabs/Tabs.d.ts +120 -0
  380. package/dist/components/tabs/Tabs.js +346 -0
  381. package/dist/components/tabs/Tabs.js.map +1 -0
  382. package/dist/components/tabs/tabs-styles.d.ts +198 -0
  383. package/dist/components/tabs/tabs-styles.js +99 -0
  384. package/dist/components/tabs/tabs-styles.js.map +1 -0
  385. package/dist/components/tabs/tabs-tokens.d.ts +7 -0
  386. package/dist/components/tabs/tabs-tokens.js +121 -0
  387. package/dist/components/tabs/tabs-tokens.js.map +1 -0
  388. package/dist/components/text-field/TextField.d.ts +175 -0
  389. package/dist/components/text-field/TextField.js +250 -0
  390. package/dist/components/text-field/TextField.js.map +1 -0
  391. package/dist/components/text-field/text-field-styles.d.ts +252 -0
  392. package/dist/components/text-field/text-field-styles.js +209 -0
  393. package/dist/components/text-field/text-field-styles.js.map +1 -0
  394. package/dist/components/text-field/text-field-tokens.d.ts +7 -0
  395. package/dist/components/text-field/text-field-tokens.js +177 -0
  396. package/dist/components/text-field/text-field-tokens.js.map +1 -0
  397. package/dist/components/time-picker/TimePicker.d.ts +142 -0
  398. package/dist/components/time-picker/TimePicker.js +700 -0
  399. package/dist/components/time-picker/TimePicker.js.map +1 -0
  400. package/dist/components/time-picker/time-picker-styles.d.ts +175 -0
  401. package/dist/components/time-picker/time-picker-styles.js +112 -0
  402. package/dist/components/time-picker/time-picker-styles.js.map +1 -0
  403. package/dist/components/time-picker/time-picker-tokens.d.ts +7 -0
  404. package/dist/components/time-picker/time-picker-tokens.js +86 -0
  405. package/dist/components/time-picker/time-picker-tokens.js.map +1 -0
  406. package/dist/components/toolbar/Toolbar.d.ts +209 -0
  407. package/dist/components/toolbar/Toolbar.js +282 -0
  408. package/dist/components/toolbar/Toolbar.js.map +1 -0
  409. package/dist/components/toolbar/toolbar-styles.d.ts +403 -0
  410. package/dist/components/toolbar/toolbar-styles.js +253 -0
  411. package/dist/components/toolbar/toolbar-styles.js.map +1 -0
  412. package/dist/components/toolbar/toolbar-tokens.d.ts +27 -0
  413. package/dist/components/toolbar/toolbar-tokens.js +117 -0
  414. package/dist/components/toolbar/toolbar-tokens.js.map +1 -0
  415. package/dist/components/toolbar/use-toolbar-scroll-expansion.d.ts +56 -0
  416. package/dist/components/toolbar/use-toolbar-scroll-expansion.js +86 -0
  417. package/dist/components/toolbar/use-toolbar-scroll-expansion.js.map +1 -0
  418. package/dist/components/tooltip/Tooltip.d.ts +131 -0
  419. package/dist/components/tooltip/Tooltip.js +388 -0
  420. package/dist/components/tooltip/Tooltip.js.map +1 -0
  421. package/dist/components/tooltip/lazy-tooltip.js +35 -0
  422. package/dist/components/tooltip/lazy-tooltip.js.map +1 -0
  423. package/dist/components/tooltip/tooltip-placement.d.ts +16 -0
  424. package/dist/components/tooltip/tooltip-placement.js +14 -0
  425. package/dist/components/tooltip/tooltip-placement.js.map +1 -0
  426. package/dist/components/tooltip/tooltip-styles.d.ts +142 -0
  427. package/dist/components/tooltip/tooltip-styles.js +81 -0
  428. package/dist/components/tooltip/tooltip-styles.js.map +1 -0
  429. package/dist/components/tooltip/tooltip-tokens.d.ts +9 -0
  430. package/dist/components/tooltip/tooltip-tokens.js +72 -0
  431. package/dist/components/tooltip/tooltip-tokens.js.map +1 -0
  432. package/dist/components/tooltip/tooltip-trigger.d.ts +42 -0
  433. package/dist/components/tooltip/tooltip-trigger.js +115 -0
  434. package/dist/components/tooltip/tooltip-trigger.js.map +1 -0
  435. package/dist/composites/button-group/ButtonGroup.d.ts +116 -0
  436. package/dist/composites/button-group/ButtonGroup.js +270 -0
  437. package/dist/composites/button-group/ButtonGroup.js.map +1 -0
  438. package/dist/composites/button-group/button-group-styles.d.ts +73 -0
  439. package/dist/composites/button-group/button-group-styles.js +87 -0
  440. package/dist/composites/button-group/button-group-styles.js.map +1 -0
  441. package/dist/composites/button-group/lazy-overflow-menu.js +43 -0
  442. package/dist/composites/button-group/lazy-overflow-menu.js.map +1 -0
  443. package/dist/composites/button-group/overflow-menu-list.js +26 -0
  444. package/dist/composites/button-group/overflow-menu-list.js.map +1 -0
  445. package/dist/composites/button-group/use-overflow.js +75 -0
  446. package/dist/composites/button-group/use-overflow.js.map +1 -0
  447. package/dist/composites/button-group/use-press-expansion.js +155 -0
  448. package/dist/composites/button-group/use-press-expansion.js.map +1 -0
  449. package/dist/index.d.ts +142 -0
  450. package/dist/index.js +136 -0
  451. package/dist/motion/get-m3-spring.d.ts +6 -0
  452. package/dist/motion/get-m3-spring.js +10 -0
  453. package/dist/motion/get-m3-spring.js.map +1 -0
  454. package/dist/motion/reduced-motion.js +19 -0
  455. package/dist/motion/reduced-motion.js.map +1 -0
  456. package/dist/motion/use-m3-spring.d.ts +13 -0
  457. package/dist/motion/use-m3-spring.js +22 -0
  458. package/dist/motion/use-m3-spring.js.map +1 -0
  459. package/dist/next/NextRouterProvider.d.ts +13 -0
  460. package/dist/next/NextRouterProvider.js +26 -0
  461. package/dist/next/NextRouterProvider.js.map +1 -0
  462. package/dist/next/get-theme-from-cookies.d.ts +32 -0
  463. package/dist/next/get-theme-from-cookies.js +27 -0
  464. package/dist/next/get-theme-from-cookies.js.map +1 -0
  465. package/dist/next/navigation-guard.d.ts +30 -0
  466. package/dist/next/navigation-guard.js +68 -0
  467. package/dist/next/navigation-guard.js.map +1 -0
  468. package/dist/next.d.ts +5 -0
  469. package/dist/next.js +5 -0
  470. package/dist/primitives/ButtonBase.d.ts +115 -0
  471. package/dist/primitives/ButtonBase.js +231 -0
  472. package/dist/primitives/ButtonBase.js.map +1 -0
  473. package/dist/primitives/DomDirectionLocale.d.ts +18 -0
  474. package/dist/primitives/DomDirectionLocale.js +28 -0
  475. package/dist/primitives/DomDirectionLocale.js.map +1 -0
  476. package/dist/primitives/Field.d.ts +50 -0
  477. package/dist/primitives/Field.js +74 -0
  478. package/dist/primitives/Field.js.map +1 -0
  479. package/dist/primitives/IconFaces.js +23 -0
  480. package/dist/primitives/IconFaces.js.map +1 -0
  481. package/dist/primitives/Overlay.d.ts +39 -0
  482. package/dist/primitives/Overlay.js +86 -0
  483. package/dist/primitives/Overlay.js.map +1 -0
  484. package/dist/primitives/SelectionControl.d.ts +55 -0
  485. package/dist/primitives/SelectionControl.js +58 -0
  486. package/dist/primitives/SelectionControl.js.map +1 -0
  487. package/dist/primitives/Surface.d.ts +123 -0
  488. package/dist/primitives/Surface.js +68 -0
  489. package/dist/primitives/Surface.js.map +1 -0
  490. package/dist/primitives/ToolbarContext.js +12 -0
  491. package/dist/primitives/ToolbarContext.js.map +1 -0
  492. package/dist/primitives/TouchTarget.d.ts +14 -0
  493. package/dist/primitives/TouchTarget.js +20 -0
  494. package/dist/primitives/TouchTarget.js.map +1 -0
  495. package/dist/primitives/TriggerContext.d.ts +34 -0
  496. package/dist/primitives/TriggerContext.js +24 -0
  497. package/dist/primitives/TriggerContext.js.map +1 -0
  498. package/dist/primitives/hidden-input-focus.js +27 -0
  499. package/dist/primitives/hidden-input-focus.js.map +1 -0
  500. package/dist/primitives/icon-faces-styles.d.ts +9 -0
  501. package/dist/primitives/icon-faces-styles.js +45 -0
  502. package/dist/primitives/icon-faces-styles.js.map +1 -0
  503. package/dist/primitives/locale-with-direction.d.ts +9 -0
  504. package/dist/primitives/locale-with-direction.js +17 -0
  505. package/dist/primitives/locale-with-direction.js.map +1 -0
  506. package/dist/primitives/morph-path.d.ts +25 -0
  507. package/dist/primitives/morph-path.js +38 -0
  508. package/dist/primitives/morph-path.js.map +1 -0
  509. package/dist/primitives/selection-control-styles.d.ts +54 -0
  510. package/dist/primitives/selection-control-styles.js +44 -0
  511. package/dist/primitives/selection-control-styles.js.map +1 -0
  512. package/dist/primitives/use-m3-interaction.d.ts +51 -0
  513. package/dist/primitives/use-m3-interaction.js +149 -0
  514. package/dist/primitives/use-m3-interaction.js.map +1 -0
  515. package/dist/primitives/use-m3-morph.d.ts +18 -0
  516. package/dist/primitives/use-m3-morph.js +36 -0
  517. package/dist/primitives/use-m3-morph.js.map +1 -0
  518. package/dist/primitives/use-presence.d.ts +19 -0
  519. package/dist/primitives/use-presence.js +37 -0
  520. package/dist/primitives/use-presence.js.map +1 -0
  521. package/dist/primitives.d.ts +36 -0
  522. package/dist/primitives.js +34 -0
  523. package/dist/shapes/corner-rounding.d.ts +13 -0
  524. package/dist/shapes/corner-rounding.js +18 -0
  525. package/dist/shapes/corner-rounding.js.map +1 -0
  526. package/dist/shapes/cubic.d.ts +52 -0
  527. package/dist/shapes/cubic.js +189 -0
  528. package/dist/shapes/cubic.js.map +1 -0
  529. package/dist/shapes/feature-mapping.js +80 -0
  530. package/dist/shapes/feature-mapping.js.map +1 -0
  531. package/dist/shapes/features.d.ts +23 -0
  532. package/dist/shapes/features.js +82 -0
  533. package/dist/shapes/features.js.map +1 -0
  534. package/dist/shapes/float-mapping.js +65 -0
  535. package/dist/shapes/float-mapping.js.map +1 -0
  536. package/dist/shapes/generated/material-shape-path-record.d.ts +11 -0
  537. package/dist/shapes/generated/material-shape-path-record.js +48 -0
  538. package/dist/shapes/generated/material-shape-path-record.js.map +1 -0
  539. package/dist/shapes/generated/material-shape-paths.d.ts +78 -0
  540. package/dist/shapes/generated/material-shape-paths.js +218 -0
  541. package/dist/shapes/generated/material-shape-paths.js.map +1 -0
  542. package/dist/shapes/mask.d.ts +14 -0
  543. package/dist/shapes/mask.js +24 -0
  544. package/dist/shapes/mask.js.map +1 -0
  545. package/dist/shapes/material-shapes.d.ts +11 -0
  546. package/dist/shapes/material-shapes.js +250 -0
  547. package/dist/shapes/material-shapes.js.map +1 -0
  548. package/dist/shapes/morph.d.ts +25 -0
  549. package/dist/shapes/morph.js +97 -0
  550. package/dist/shapes/morph.js.map +1 -0
  551. package/dist/shapes/path.d.ts +33 -0
  552. package/dist/shapes/path.js +47 -0
  553. package/dist/shapes/path.js.map +1 -0
  554. package/dist/shapes/point.d.ts +28 -0
  555. package/dist/shapes/point.js +103 -0
  556. package/dist/shapes/point.js.map +1 -0
  557. package/dist/shapes/polygon-measure.js +140 -0
  558. package/dist/shapes/polygon-measure.js.map +1 -0
  559. package/dist/shapes/rounded-polygon.d.ts +44 -0
  560. package/dist/shapes/rounded-polygon.js +278 -0
  561. package/dist/shapes/rounded-polygon.js.map +1 -0
  562. package/dist/shapes/shape-path.d.ts +15 -0
  563. package/dist/shapes/shapes.d.ts +53 -0
  564. package/dist/shapes/shapes.js +171 -0
  565. package/dist/shapes/shapes.js.map +1 -0
  566. package/dist/styles/generated/components.css +710 -0
  567. package/dist/styles/generated/theme.css +247 -0
  568. package/dist/styles/generated/themes.css +3361 -0
  569. package/dist/styles/generated/tokens.css +284 -0
  570. package/dist/styles/styles.css +15 -0
  571. package/dist/styles/utilities.css +283 -0
  572. package/dist/styles.compiled.css +2 -0
  573. package/dist/theme/ThemeProvider.d.ts +72 -0
  574. package/dist/theme/ThemeProvider.js +144 -0
  575. package/dist/theme/ThemeProvider.js.map +1 -0
  576. package/dist/theme/ThemeScope.d.ts +32 -0
  577. package/dist/theme/ThemeScope.js +67 -0
  578. package/dist/theme/ThemeScope.js.map +1 -0
  579. package/dist/theme/ThemeScript.d.ts +26 -0
  580. package/dist/theme/ThemeScript.js +44 -0
  581. package/dist/theme/ThemeScript.js.map +1 -0
  582. package/dist/theme/context.d.ts +32 -0
  583. package/dist/theme/context.js +47 -0
  584. package/dist/theme/context.js.map +1 -0
  585. package/dist/theme/create-theme.d.ts +60 -0
  586. package/dist/theme/create-theme.js +47 -0
  587. package/dist/theme/create-theme.js.map +1 -0
  588. package/dist/theme/css.js +54 -0
  589. package/dist/theme/css.js.map +1 -0
  590. package/dist/theme/parse-palettes.js +40 -0
  591. package/dist/theme/parse-palettes.js.map +1 -0
  592. package/dist/theme/scheme.d.ts +6 -0
  593. package/dist/theme/scheme.js +118 -0
  594. package/dist/theme/scheme.js.map +1 -0
  595. package/dist/theme/state.d.ts +38 -0
  596. package/dist/theme/state.js +93 -0
  597. package/dist/theme/state.js.map +1 -0
  598. package/dist/theme/storage.js +21 -0
  599. package/dist/theme/storage.js.map +1 -0
  600. package/dist/tokens/breakpoints.d.ts +15 -0
  601. package/dist/tokens/breakpoints.js +16 -0
  602. package/dist/tokens/breakpoints.js.map +1 -0
  603. package/dist/tokens/color.d.ts +104 -0
  604. package/dist/tokens/color.js +147 -0
  605. package/dist/tokens/color.js.map +1 -0
  606. package/dist/tokens/component.d.ts +110 -0
  607. package/dist/tokens/component.js +67 -0
  608. package/dist/tokens/component.js.map +1 -0
  609. package/dist/tokens/density.d.ts +20 -0
  610. package/dist/tokens/density.js +27 -0
  611. package/dist/tokens/density.js.map +1 -0
  612. package/dist/tokens/elevation.d.ts +44 -0
  613. package/dist/tokens/elevation.js +45 -0
  614. package/dist/tokens/elevation.js.map +1 -0
  615. package/dist/tokens/motion.d.ts +79 -0
  616. package/dist/tokens/motion.js +126 -0
  617. package/dist/tokens/motion.js.map +1 -0
  618. package/dist/tokens/shape.d.ts +22 -0
  619. package/dist/tokens/shape.js +22 -0
  620. package/dist/tokens/shape.js.map +1 -0
  621. package/dist/tokens/spring-velocity.d.ts +19 -0
  622. package/dist/tokens/spring-velocity.js +44 -0
  623. package/dist/tokens/spring-velocity.js.map +1 -0
  624. package/dist/tokens/state.d.ts +18 -0
  625. package/dist/tokens/state.js +19 -0
  626. package/dist/tokens/state.js.map +1 -0
  627. package/dist/tokens/typography.d.ts +64 -0
  628. package/dist/tokens/typography.js +60 -0
  629. package/dist/tokens/typography.js.map +1 -0
  630. package/dist/tokens/z-index.d.ts +17 -0
  631. package/dist/tokens/z-index.js +18 -0
  632. package/dist/tokens/z-index.js.map +1 -0
  633. package/dist/utils/announce.js +51 -0
  634. package/dist/utils/announce.js.map +1 -0
  635. package/dist/utils/assert-collection-children.js +26 -0
  636. package/dist/utils/assert-collection-children.js.map +1 -0
  637. package/dist/utils/closed-by.d.ts +9 -0
  638. package/dist/utils/closed-by.js +12 -0
  639. package/dist/utils/closed-by.js.map +1 -0
  640. package/dist/utils/cn.d.ts +31 -0
  641. package/dist/utils/cn.js +37 -0
  642. package/dist/utils/cn.js.map +1 -0
  643. package/dist/utils/composite-keys.js +32 -0
  644. package/dist/utils/composite-keys.js.map +1 -0
  645. package/dist/utils/focus-visible.js +14 -0
  646. package/dist/utils/focus-visible.js.map +1 -0
  647. package/dist/utils/focus.js +51 -0
  648. package/dist/utils/focus.js.map +1 -0
  649. package/dist/utils/focusable-disabled.js +12 -0
  650. package/dist/utils/focusable-disabled.js.map +1 -0
  651. package/dist/utils/keep-pressed-in-place.d.ts +60 -0
  652. package/dist/utils/keep-pressed-in-place.js +127 -0
  653. package/dist/utils/keep-pressed-in-place.js.map +1 -0
  654. package/dist/utils/load-on-demand.js +111 -0
  655. package/dist/utils/load-on-demand.js.map +1 -0
  656. package/dist/utils/merge-data-tokens.d.ts +9 -0
  657. package/dist/utils/merge-data-tokens.js +15 -0
  658. package/dist/utils/merge-data-tokens.js.map +1 -0
  659. package/dist/utils/natural-size.js +53 -0
  660. package/dist/utils/natural-size.js.map +1 -0
  661. package/dist/utils/nearest-reveal.js +28 -0
  662. package/dist/utils/nearest-reveal.js.map +1 -0
  663. package/dist/utils/placement.js +14 -0
  664. package/dist/utils/placement.js.map +1 -0
  665. package/dist/utils/radio-group-keys.js +74 -0
  666. package/dist/utils/radio-group-keys.js.map +1 -0
  667. package/dist/utils/rendered-description.js +17 -0
  668. package/dist/utils/rendered-description.js.map +1 -0
  669. package/dist/utils/root-props.d.ts +103 -0
  670. package/dist/utils/root-props.js +51 -0
  671. package/dist/utils/root-props.js.map +1 -0
  672. package/dist/utils/search.d.ts +11 -0
  673. package/dist/utils/search.js +18 -0
  674. package/dist/utils/search.js.map +1 -0
  675. package/dist/utils/shortcut.js +20 -0
  676. package/dist/utils/shortcut.js.map +1 -0
  677. package/dist/utils/split-data-attributes.d.ts +12 -0
  678. package/dist/utils/split-data-attributes.js +20 -0
  679. package/dist/utils/split-data-attributes.js.map +1 -0
  680. package/dist/utils/toolbar-keys.js +28 -0
  681. package/dist/utils/toolbar-keys.js.map +1 -0
  682. package/dist/utils/tv.d.ts +7 -0
  683. package/dist/utils/tv.js +9 -0
  684. package/dist/utils/tv.js.map +1 -0
  685. package/dist/utils/typeahead.js +64 -0
  686. package/dist/utils/typeahead.js.map +1 -0
  687. package/dist/utils/warn-once.js +30 -0
  688. package/dist/utils/warn-once.js.map +1 -0
  689. package/dist/vendor/material-color-utilities/blend/blend.js +88 -0
  690. package/dist/vendor/material-color-utilities/blend/blend.js.map +1 -0
  691. package/dist/vendor/material-color-utilities/contrast/contrast.js +131 -0
  692. package/dist/vendor/material-color-utilities/contrast/contrast.js.map +1 -0
  693. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js +58 -0
  694. package/dist/vendor/material-color-utilities/dislike/dislike_analyzer.js.map +1 -0
  695. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js +620 -0
  696. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2021.js.map +1 -0
  697. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js +786 -0
  698. package/dist/vendor/material-color-utilities/dynamiccolor/color_spec_2025.js.map +1 -0
  699. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js +59 -0
  700. package/dist/vendor/material-color-utilities/dynamiccolor/contrast_curve.js.map +1 -0
  701. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js +420 -0
  702. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_color.js.map +1 -0
  703. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js +701 -0
  704. package/dist/vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js.map +1 -0
  705. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js +374 -0
  706. package/dist/vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js.map +1 -0
  707. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js +65 -0
  708. package/dist/vendor/material-color-utilities/dynamiccolor/tone_delta_pair.js.map +1 -0
  709. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js +38 -0
  710. package/dist/vendor/material-color-utilities/dynamiccolor/variant.js.map +1 -0
  711. package/dist/vendor/material-color-utilities/hct/cam16.js +309 -0
  712. package/dist/vendor/material-color-utilities/hct/cam16.js.map +1 -0
  713. package/dist/vendor/material-color-utilities/hct/hct.js +148 -0
  714. package/dist/vendor/material-color-utilities/hct/hct.js.map +1 -0
  715. package/dist/vendor/material-color-utilities/hct/hct_solver.js +660 -0
  716. package/dist/vendor/material-color-utilities/hct/hct_solver.js.map +1 -0
  717. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js +117 -0
  718. package/dist/vendor/material-color-utilities/hct/viewing_conditions.js.map +1 -0
  719. package/dist/vendor/material-color-utilities/index.js +51 -0
  720. package/dist/vendor/material-color-utilities/index.js.map +1 -0
  721. package/dist/vendor/material-color-utilities/palettes/core_palette.js +22 -0
  722. package/dist/vendor/material-color-utilities/palettes/core_palette.js.map +1 -0
  723. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js +134 -0
  724. package/dist/vendor/material-color-utilities/palettes/tonal_palette.js.map +1 -0
  725. package/dist/vendor/material-color-utilities/scheme/scheme.js +21 -0
  726. package/dist/vendor/material-color-utilities/scheme/scheme.js.map +1 -0
  727. package/dist/vendor/material-color-utilities/scheme/scheme_android.js +21 -0
  728. package/dist/vendor/material-color-utilities/scheme/scheme_android.js.map +1 -0
  729. package/dist/vendor/material-color-utilities/scheme/scheme_content.js +22 -0
  730. package/dist/vendor/material-color-utilities/scheme/scheme_content.js.map +1 -0
  731. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js +38 -0
  732. package/dist/vendor/material-color-utilities/scheme/scheme_expressive.js.map +1 -0
  733. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js +22 -0
  734. package/dist/vendor/material-color-utilities/scheme/scheme_fidelity.js.map +1 -0
  735. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js +22 -0
  736. package/dist/vendor/material-color-utilities/scheme/scheme_fruit_salad.js.map +1 -0
  737. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js +22 -0
  738. package/dist/vendor/material-color-utilities/scheme/scheme_monochrome.js.map +1 -0
  739. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js +36 -0
  740. package/dist/vendor/material-color-utilities/scheme/scheme_neutral.js.map +1 -0
  741. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js +22 -0
  742. package/dist/vendor/material-color-utilities/scheme/scheme_rainbow.js.map +1 -0
  743. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js +41 -0
  744. package/dist/vendor/material-color-utilities/scheme/scheme_tonal_spot.js.map +1 -0
  745. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js +39 -0
  746. package/dist/vendor/material-color-utilities/scheme/scheme_vibrant.js.map +1 -0
  747. package/dist/vendor/material-color-utilities/score/score.js +115 -0
  748. package/dist/vendor/material-color-utilities/score/score.js.map +1 -0
  749. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js +227 -0
  750. package/dist/vendor/material-color-utilities/temperature/temperature_cache.js.map +1 -0
  751. package/dist/vendor/material-color-utilities/utils/color_utils.js +246 -0
  752. package/dist/vendor/material-color-utilities/utils/color_utils.js.map +1 -0
  753. package/dist/vendor/material-color-utilities/utils/image_utils.js +21 -0
  754. package/dist/vendor/material-color-utilities/utils/image_utils.js.map +1 -0
  755. package/dist/vendor/material-color-utilities/utils/math_utils.js +119 -0
  756. package/dist/vendor/material-color-utilities/utils/math_utils.js.map +1 -0
  757. package/dist/vendor/material-color-utilities/utils/string_utils.js +74 -0
  758. package/dist/vendor/material-color-utilities/utils/string_utils.js.map +1 -0
  759. package/dist/vendor/material-color-utilities/utils/theme_utils.js +24 -0
  760. package/dist/vendor/material-color-utilities/utils/theme_utils.js.map +1 -0
  761. package/package.json +114 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-theme.js","names":[],"sources":["../../src/theme/create-theme.ts"],"sourcesContent":["import {\n CONTRAST_LEVEL_NAMES,\n type ContrastLevel,\n type CustomColorName,\n type SchemeVariant,\n type ThemePalettes,\n} from '../tokens/color';\nimport { assertThemeName, generateThemeCss } from './css';\n\nexport interface CreateThemeOptions {\n /** Theme name used in `data-theme`. Lowercase kebab-case, e.g. `\"acme\"`. */\n name: string;\n /** Seed colour as hex, e.g. `\"#0B57D0\"`. */\n seed: string;\n /** Colour scheme variant. Defaults to `\"tonal-spot\"`. */\n variant?: SchemeVariant;\n /**\n * Takes some of the scheme's palettes from elsewhere: another variant of the same seed, or\n * a hex colour. `{ neutral: 'tonal-spot', neutralVariant: 'tonal-spot' }` gives vivid\n * accents on calm surfaces; `{ tertiary: '#00A07A' }` sets a brand's own tertiary colour.\n */\n palettes?: ThemePalettes;\n /**\n * The success and warning colours (docs/plans/custom-colors.md); each defaults to a green\n * and an amber. Only hue and chroma matter: the tones follow M3's error roles.\n */\n customColors?: Partial<Record<CustomColorName, `#${string}`>>;\n /** Turns the custom colours' hues toward the seed, as Material Theme Builder does. @default true */\n harmonize?: boolean;\n /** Contrast level(s) to generate. Defaults to all three. */\n contrast?: ContrastLevel | readonly ContrastLevel[];\n}\n\n/** A generated colour theme, ready to pass to `ThemeProvider`'s `themes` prop. */\nexport interface ThemeDefinition {\n name: string;\n seed: string;\n variant: SchemeVariant;\n palettes: ThemePalettes;\n customColors: Partial<Record<CustomColorName, `#${string}`>>;\n harmonize: boolean;\n contrast: readonly ContrastLevel[];\n /** Light, dark and system-mode CSS for each contrast level. */\n css: string;\n}\n\n/**\n * Generates a custom colour theme from a seed colour with the M3 2025 colour spec.\n * Works at runtime and on the server; for static sites prefer the CLI, which writes\n * the same CSS to a file.\n *\n * @example\n * const acme = createTheme({ name: 'acme', seed: '#0B57D0' });\n * <ThemeProvider themes={['baseline', acme]} defaultTheme=\"acme\">…</ThemeProvider>\n *\n * // Vivid accents on calm, nearly neutral surfaces.\n * createTheme({\n * name: 'blue',\n * seed: '#1877F2',\n * variant: 'vibrant',\n * palettes: { neutral: 'tonal-spot', neutralVariant: 'tonal-spot' },\n * });\n *\n * // A brand's own status colours, at their exact hues.\n * createTheme({ name: 'shop', seed: '#0B57D0', customColors: { success: '#0B8043' }, harmonize: false });\n */\nexport function createTheme({\n name,\n seed,\n variant = 'tonal-spot',\n palettes = {},\n customColors = {},\n harmonize = true,\n contrast = CONTRAST_LEVEL_NAMES,\n}: CreateThemeOptions): ThemeDefinition {\n assertThemeName(name);\n const contrastLevels: readonly ContrastLevel[] =\n typeof contrast === 'string' ? [contrast] : contrast;\n return {\n name,\n seed,\n variant,\n palettes,\n customColors,\n harmonize,\n contrast: contrastLevels,\n css: generateThemeCss(\n name,\n { seed, variant, palettes, customColors, harmonize },\n { contrastLevels },\n ),\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAkEA,SAAgB,YAAY,EAC1B,MACA,MACA,UAAU,cACV,WAAW,CAAC,GACZ,eAAe,CAAC,GAChB,YAAY,MACZ,WAAW,wBAC2B;CACtC,gBAAgB,IAAI;CACpB,MAAM,iBACJ,OAAO,aAAa,WAAW,CAAC,QAAQ,IAAI;CAC9C,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,KAAK,iBACH,MACA;GAAE;GAAM;GAAS;GAAU;GAAc;EAAU,GACnD,EAAE,eAAe,CACnB;CACF;AACF"}
@@ -0,0 +1,54 @@
1
+ import { CONTRAST_LEVEL_NAMES } from "../tokens/color.js";
2
+ import { generateSchemeColors } from "./scheme.js";
3
+ //#region src/theme/css.ts
4
+ const THEME_NAME = /^[a-z][a-z0-9-]*$/;
5
+ function assertThemeName(name) {
6
+ if (!THEME_NAME.test(name)) throw new Error(`[@windmorph/react] Theme names must be lowercase kebab-case (e.g. "acme-blue"), received "${name}".`);
7
+ }
8
+ /**
9
+ * Selectors for one theme × contrast × mode block.
10
+ * A missing `data-contrast` behaves like `standard`; a missing `data-mode` like `light`;
11
+ * the default theme also applies to a root without `data-theme`.
12
+ *
13
+ * Each selector is wrapped in `:where()`, so it has zero specificity and any plain consumer
14
+ * rule (`:root { --md-sys-color-primary: … }`, `[data-theme='ocean'] { … }`) wins. Among the
15
+ * theme's own rules, source order decides: an element matches one theme and one contrast
16
+ * level, and {@link generateThemeCss} writes light before dark and system, so the mode rule
17
+ * that also matches comes later and wins.
18
+ */
19
+ function selectors(name, contrast, mode, isDefault) {
20
+ const themeParts = [`[data-theme="${name}"]`];
21
+ if (isDefault) themeParts.push(":root:not([data-theme])");
22
+ const contrastParts = [`[data-contrast="${contrast}"]`];
23
+ if (contrast === "standard") contrastParts.push(":not([data-contrast])");
24
+ const modePart = mode === "light" ? "" : `[data-mode="${mode}"]`;
25
+ return themeParts.flatMap((theme) => contrastParts.map((c) => `:where(${theme}${c}${modePart})`)).join(",\n");
26
+ }
27
+ function declarations(seed, mode, contrast) {
28
+ const colors = generateSchemeColors(seed, mode === "dark", contrast);
29
+ const lines = Object.entries(colors).map(([role, hex]) => ` --md-sys-color-${role}: ${hex};`);
30
+ lines.unshift(` color-scheme: ${mode};`);
31
+ return lines.join("\n");
32
+ }
33
+ /**
34
+ * CSS for one colour theme: light, dark and system mode for each contrast level,
35
+ * keyed on the `data-theme`, `data-mode` and `data-contrast` attributes. Every selector has
36
+ * zero specificity (`:where()`), so the order of the blocks matters: for each contrast level
37
+ * the light block comes first, then dark, then system inside its media query.
38
+ */
39
+ function generateThemeCss(name, seed, { contrastLevels = CONTRAST_LEVEL_NAMES, isDefault = false } = {}) {
40
+ assertThemeName(name);
41
+ const blocks = [];
42
+ for (const contrast of contrastLevels) {
43
+ const light = declarations(seed, "light", contrast);
44
+ const dark = declarations(seed, "dark", contrast);
45
+ blocks.push(`${selectors(name, contrast, "light", isDefault)} {\n${light}\n}`);
46
+ blocks.push(`${selectors(name, contrast, "dark", isDefault)} {\n${dark}\n}`);
47
+ blocks.push(`@media (prefers-color-scheme: dark) {\n${selectors(name, contrast, "system", isDefault)} {\n${dark}\n}\n}`);
48
+ }
49
+ return blocks.join("\n\n");
50
+ }
51
+ //#endregion
52
+ export { assertThemeName, generateThemeCss };
53
+
54
+ //# sourceMappingURL=css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.js","names":[],"sources":["../../src/theme/css.ts"],"sourcesContent":["import {\n CONTRAST_LEVEL_NAMES,\n type ContrastLevel,\n type ResolvedColorMode,\n type ThemeSeed,\n} from '../tokens/color';\nimport { generateSchemeColors } from './scheme';\n\nconst THEME_NAME = /^[a-z][a-z0-9-]*$/;\n\nexport function assertThemeName(name: string): void {\n if (!THEME_NAME.test(name)) {\n throw new Error(\n `[@windmorph/react] Theme names must be lowercase kebab-case (e.g. \"acme-blue\"), received \"${name}\".`,\n );\n }\n}\n\nexport interface ThemeCssOptions {\n /** Contrast levels to emit. Defaults to all three. */\n contrastLevels?: readonly ContrastLevel[];\n /** Also apply this theme where no `data-theme` attribute is set. */\n isDefault?: boolean;\n}\n\n/**\n * Selectors for one theme × contrast × mode block.\n * A missing `data-contrast` behaves like `standard`; a missing `data-mode` like `light`;\n * the default theme also applies to a root without `data-theme`.\n *\n * Each selector is wrapped in `:where()`, so it has zero specificity and any plain consumer\n * rule (`:root { --md-sys-color-primary: … }`, `[data-theme='ocean'] { … }`) wins. Among the\n * theme's own rules, source order decides: an element matches one theme and one contrast\n * level, and {@link generateThemeCss} writes light before dark and system, so the mode rule\n * that also matches comes later and wins.\n */\nfunction selectors(\n name: string,\n contrast: ContrastLevel,\n mode: ResolvedColorMode | 'system',\n isDefault: boolean,\n): string {\n const themeParts = [`[data-theme=\"${name}\"]`];\n if (isDefault) themeParts.push(':root:not([data-theme])');\n const contrastParts = [`[data-contrast=\"${contrast}\"]`];\n if (contrast === 'standard') contrastParts.push(':not([data-contrast])');\n const modePart = mode === 'light' ? '' : `[data-mode=\"${mode}\"]`;\n\n return themeParts\n .flatMap((theme) => contrastParts.map((c) => `:where(${theme}${c}${modePart})`))\n .join(',\\n');\n}\n\nfunction declarations(seed: ThemeSeed, mode: ResolvedColorMode, contrast: ContrastLevel): string {\n const colors = generateSchemeColors(seed, mode === 'dark', contrast);\n const lines = Object.entries(colors).map(([role, hex]) => ` --md-sys-color-${role}: ${hex};`);\n lines.unshift(` color-scheme: ${mode};`);\n return lines.join('\\n');\n}\n\n/**\n * CSS for one colour theme: light, dark and system mode for each contrast level,\n * keyed on the `data-theme`, `data-mode` and `data-contrast` attributes. Every selector has\n * zero specificity (`:where()`), so the order of the blocks matters: for each contrast level\n * the light block comes first, then dark, then system inside its media query.\n */\nexport function generateThemeCss(\n name: string,\n seed: ThemeSeed,\n { contrastLevels = CONTRAST_LEVEL_NAMES, isDefault = false }: ThemeCssOptions = {},\n): string {\n assertThemeName(name);\n const blocks: string[] = [];\n for (const contrast of contrastLevels) {\n const light = declarations(seed, 'light', contrast);\n const dark = declarations(seed, 'dark', contrast);\n blocks.push(`${selectors(name, contrast, 'light', isDefault)} {\\n${light}\\n}`);\n blocks.push(`${selectors(name, contrast, 'dark', isDefault)} {\\n${dark}\\n}`);\n blocks.push(\n `@media (prefers-color-scheme: dark) {\\n${selectors(name, contrast, 'system', isDefault)} {\\n${dark}\\n}\\n}`,\n );\n }\n return blocks.join('\\n\\n');\n}\n"],"mappings":";;;AAQA,MAAM,aAAa;AAEnB,SAAgB,gBAAgB,MAAoB;CAClD,IAAI,CAAC,WAAW,KAAK,IAAI,GACvB,MAAM,IAAI,MACR,6FAA6F,KAAK,GACpG;AAEJ;;;;;;;;;;;;AAoBA,SAAS,UACP,MACA,UACA,MACA,WACQ;CACR,MAAM,aAAa,CAAC,gBAAgB,KAAK,GAAG;CAC5C,IAAI,WAAW,WAAW,KAAK,yBAAyB;CACxD,MAAM,gBAAgB,CAAC,mBAAmB,SAAS,GAAG;CACtD,IAAI,aAAa,YAAY,cAAc,KAAK,uBAAuB;CACvE,MAAM,WAAW,SAAS,UAAU,KAAK,eAAe,KAAK;CAE7D,OAAO,WACJ,SAAS,UAAU,cAAc,KAAK,MAAM,UAAU,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC,CAC/E,KAAK,KAAK;AACf;AAEA,SAAS,aAAa,MAAiB,MAAyB,UAAiC;CAC/F,MAAM,SAAS,qBAAqB,MAAM,SAAS,QAAQ,QAAQ;CACnE,MAAM,QAAQ,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,CAAC,MAAM,SAAS,oBAAoB,KAAK,IAAI,IAAI,EAAE;CAC7F,MAAM,QAAQ,mBAAmB,KAAK,EAAE;CACxC,OAAO,MAAM,KAAK,IAAI;AACxB;;;;;;;AAQA,SAAgB,iBACd,MACA,MACA,EAAE,iBAAiB,sBAAsB,YAAY,UAA2B,CAAC,GACzE;CACR,gBAAgB,IAAI;CACpB,MAAM,SAAmB,CAAC;CAC1B,KAAK,MAAM,YAAY,gBAAgB;EACrC,MAAM,QAAQ,aAAa,MAAM,SAAS,QAAQ;EAClD,MAAM,OAAO,aAAa,MAAM,QAAQ,QAAQ;EAChD,OAAO,KAAK,GAAG,UAAU,MAAM,UAAU,SAAS,SAAS,EAAE,MAAM,MAAM,IAAI;EAC7E,OAAO,KAAK,GAAG,UAAU,MAAM,UAAU,QAAQ,SAAS,EAAE,MAAM,KAAK,IAAI;EAC3E,OAAO,KACL,0CAA0C,UAAU,MAAM,UAAU,UAAU,SAAS,EAAE,MAAM,KAAK,OACtG;CACF;CACA,OAAO,OAAO,KAAK,MAAM;AAC3B"}
@@ -0,0 +1,40 @@
1
+ import { CUSTOM_COLORS, PALETTE_NAMES } from "../tokens/color.js";
2
+ //#region src/theme/parse-palettes.ts
3
+ /** `neutralVariant` → `neutral-variant`, the spelling the CLI shows. */
4
+ function toKebabCase(name) {
5
+ return name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
6
+ }
7
+ /**
8
+ * Reads `<name>=<source>` entries (the CLI's `--palette` values) into `ThemePalettes`.
9
+ * Names may be kebab- or camel-case. Sources are checked later by `createTheme`.
10
+ */
11
+ function parsePalettes(entries) {
12
+ const palettes = {};
13
+ for (const entry of entries) {
14
+ const separator = entry.indexOf("=");
15
+ const rawName = separator === -1 ? entry : entry.slice(0, separator);
16
+ const source = separator === -1 ? "" : entry.slice(separator + 1).trim();
17
+ const name = PALETTE_NAMES.find((candidate) => candidate === rawName.trim() || toKebabCase(candidate) === rawName.trim());
18
+ if (!name || source === "") throw new Error(`--palette expects <name>=<source> with a name from ${PALETTE_NAMES.map(toKebabCase).join(", ")}, received "${entry}".`);
19
+ palettes[name] = source;
20
+ }
21
+ return palettes;
22
+ }
23
+ /**
24
+ * Reads `<name>=<hex>` entries (the CLI's `--custom` values) into custom colours, for
25
+ * `success` and `warning`. Colours are checked later by `createTheme`.
26
+ */
27
+ function parseCustomColors(entries) {
28
+ const colors = {};
29
+ for (const entry of entries) {
30
+ const [rawName = "", color = ""] = entry.split("=").map((part) => part.trim());
31
+ const name = CUSTOM_COLORS.find((candidate) => candidate === rawName);
32
+ if (!name || !color.startsWith("#")) throw new Error(`--custom expects <name>=<hex> with a name from ${CUSTOM_COLORS.join(", ")}, received "${entry}".`);
33
+ colors[name] = color;
34
+ }
35
+ return colors;
36
+ }
37
+ //#endregion
38
+ export { parseCustomColors, parsePalettes, toKebabCase };
39
+
40
+ //# sourceMappingURL=parse-palettes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parse-palettes.js","names":[],"sources":["../../src/theme/parse-palettes.ts"],"sourcesContent":["import {\n CUSTOM_COLORS,\n PALETTE_NAMES,\n type CustomColorName,\n type PaletteSource,\n type ThemePalettes,\n} from '../tokens/color';\n\n/** `neutralVariant` → `neutral-variant`, the spelling the CLI shows. */\nexport function toKebabCase(name: string): string {\n return name.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);\n}\n\n/**\n * Reads `<name>=<source>` entries (the CLI's `--palette` values) into `ThemePalettes`.\n * Names may be kebab- or camel-case. Sources are checked later by `createTheme`.\n */\nexport function parsePalettes(entries: readonly string[]): ThemePalettes {\n const palettes: ThemePalettes = {};\n for (const entry of entries) {\n const separator = entry.indexOf('=');\n const rawName = separator === -1 ? entry : entry.slice(0, separator);\n const source = separator === -1 ? '' : entry.slice(separator + 1).trim();\n const name = PALETTE_NAMES.find(\n (candidate) => candidate === rawName.trim() || toKebabCase(candidate) === rawName.trim(),\n );\n if (!name || source === '') {\n throw new Error(\n `--palette expects <name>=<source> with a name from ${PALETTE_NAMES.map(toKebabCase).join(', ')}, received \"${entry}\".`,\n );\n }\n palettes[name] = source as PaletteSource;\n }\n return palettes;\n}\n\n/**\n * Reads `<name>=<hex>` entries (the CLI's `--custom` values) into custom colours, for\n * `success` and `warning`. Colours are checked later by `createTheme`.\n */\nexport function parseCustomColors(\n entries: readonly string[],\n): Partial<Record<CustomColorName, `#${string}`>> {\n const colors: Partial<Record<CustomColorName, `#${string}`>> = {};\n for (const entry of entries) {\n const [rawName = '', color = ''] = entry.split('=').map((part) => part.trim());\n const name = CUSTOM_COLORS.find((candidate) => candidate === rawName);\n if (!name || !color.startsWith('#')) {\n throw new Error(\n `--custom expects <name>=<hex> with a name from ${CUSTOM_COLORS.join(', ')}, received \"${entry}\".`,\n );\n }\n colors[name] = color as `#${string}`;\n }\n return colors;\n}\n"],"mappings":";;;AASA,SAAgB,YAAY,MAAsB;CAChD,OAAO,KAAK,QAAQ,WAAW,WAAW,IAAI,OAAO,YAAY,GAAG;AACtE;;;;;AAMA,SAAgB,cAAc,SAA2C;CACvE,MAAM,WAA0B,CAAC;CACjC,KAAK,MAAM,SAAS,SAAS;EAC3B,MAAM,YAAY,MAAM,QAAQ,GAAG;EACnC,MAAM,UAAU,cAAc,KAAK,QAAQ,MAAM,MAAM,GAAG,SAAS;EACnE,MAAM,SAAS,cAAc,KAAK,KAAK,MAAM,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK;EACvE,MAAM,OAAO,cAAc,MACxB,cAAc,cAAc,QAAQ,KAAK,KAAK,YAAY,SAAS,MAAM,QAAQ,KAAK,CACzF;EACA,IAAI,CAAC,QAAQ,WAAW,IACtB,MAAM,IAAI,MACR,sDAAsD,cAAc,IAAI,WAAW,CAAC,CAAC,KAAK,IAAI,EAAE,cAAc,MAAM,GACtH;EAEF,SAAS,QAAQ;CACnB;CACA,OAAO;AACT;;;;;AAMA,SAAgB,kBACd,SACgD;CAChD,MAAM,SAAyD,CAAC;CAChE,KAAK,MAAM,SAAS,SAAS;EAC3B,MAAM,CAAC,UAAU,IAAI,QAAQ,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS,KAAK,KAAK,CAAC;EAC7E,MAAM,OAAO,cAAc,MAAM,cAAc,cAAc,OAAO;EACpE,IAAI,CAAC,QAAQ,CAAC,MAAM,WAAW,GAAG,GAChC,MAAM,IAAI,MACR,kDAAkD,cAAc,KAAK,IAAI,EAAE,cAAc,MAAM,GACjG;EAEF,OAAO,QAAQ;CACjB;CACA,OAAO;AACT"}
@@ -0,0 +1,6 @@
1
+ import { ColorRole, ContrastLevel, ThemeSeed } from "../tokens/color.js";
2
+ //#region src/theme/scheme.d.ts
3
+ /** Resolves every colour role to a hex value using the 2025 colour spec. */
4
+ export declare function generateSchemeColors(seed: ThemeSeed, isDark: boolean, contrast: ContrastLevel): Record<ColorRole, string>;
5
+ //#endregion
6
+ //# sourceMappingURL=scheme.d.ts.map
@@ -0,0 +1,118 @@
1
+ import { COLOR_ROLES, CONTRAST_LEVELS, CUSTOM_COLORS, CUSTOM_COLOR_ROLES, DEFAULT_CUSTOM_COLORS, PALETTE_NAMES, SCHEME_VARIANTS } from "../tokens/color.js";
2
+ import { Hct } from "../vendor/material-color-utilities/hct/hct.js";
3
+ import { Blend } from "../vendor/material-color-utilities/blend/blend.js";
4
+ import { TonalPalette } from "../vendor/material-color-utilities/palettes/tonal_palette.js";
5
+ import { MaterialDynamicColors } from "../vendor/material-color-utilities/dynamiccolor/material_dynamic_colors.js";
6
+ import { DynamicScheme } from "../vendor/material-color-utilities/dynamiccolor/dynamic_scheme.js";
7
+ import { SchemeExpressive } from "../vendor/material-color-utilities/scheme/scheme_expressive.js";
8
+ import { SchemeNeutral } from "../vendor/material-color-utilities/scheme/scheme_neutral.js";
9
+ import { SchemeTonalSpot } from "../vendor/material-color-utilities/scheme/scheme_tonal_spot.js";
10
+ import { SchemeVibrant } from "../vendor/material-color-utilities/scheme/scheme_vibrant.js";
11
+ import { argbFromHex, hexFromArgb } from "../vendor/material-color-utilities/utils/string_utils.js";
12
+ import "../vendor/material-color-utilities/index.js";
13
+ //#region src/theme/scheme.ts
14
+ const SCHEMES = {
15
+ "tonal-spot": SchemeTonalSpot,
16
+ neutral: SchemeNeutral,
17
+ vibrant: SchemeVibrant,
18
+ expressive: SchemeExpressive
19
+ };
20
+ const HEX_COLOR = /^#(?:[0-9a-f]{3}){1,2}$/i;
21
+ const toCamelCase = (role) => role.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
22
+ const dynamicColors = new MaterialDynamicColors();
23
+ function roleColor(role) {
24
+ const method = toCamelCase(role);
25
+ const factory = dynamicColors[method];
26
+ if (typeof factory !== "function") throw new Error(`[@windmorph/react] Unknown colour role "${role}".`);
27
+ const color = factory.call(dynamicColors);
28
+ if (!color) throw new Error(`[@windmorph/react] Colour role "${role}" is not defined by the 2025 spec.`);
29
+ return color;
30
+ }
31
+ function assertHexColor(value) {
32
+ if (!HEX_COLOR.test(value)) throw new Error(`[@windmorph/react] Expected a hex colour like "#6750A4", received "${value}".`);
33
+ }
34
+ const isSchemeVariant = (source) => SCHEME_VARIANTS.includes(source);
35
+ /** The `DynamicScheme` field that holds each palette. */
36
+ const PALETTE_FIELDS = {
37
+ primary: "primaryPalette",
38
+ secondary: "secondaryPalette",
39
+ tertiary: "tertiaryPalette",
40
+ error: "errorPalette",
41
+ neutral: "neutralPalette",
42
+ neutralVariant: "neutralVariantPalette"
43
+ };
44
+ function assertPalettes(palettes) {
45
+ for (const [name, source] of Object.entries(palettes)) {
46
+ if (!PALETTE_NAMES.includes(name)) throw new Error(`[@windmorph/react] Unknown palette "${name}". Use one of ${PALETTE_NAMES.join(", ")}.`);
47
+ if (typeof source !== "string" || !isSchemeVariant(source) && !HEX_COLOR.test(source)) throw new Error(`[@windmorph/react] The ${name} palette needs a scheme variant (${SCHEME_VARIANTS.join(", ")}) or a hex colour like "#00A07A", received "${String(source)}".`);
48
+ }
49
+ }
50
+ function variantScheme(seed, variant, isDark, contrast) {
51
+ return new SCHEMES[variant](seed, isDark, CONTRAST_LEVELS[contrast], "2025");
52
+ }
53
+ function createScheme({ seed, variant, palettes }, isDark, contrast) {
54
+ assertHexColor(seed);
55
+ const sourceColor = Hct.fromInt(argbFromHex(seed));
56
+ const scheme = variantScheme(sourceColor, variant, isDark, contrast);
57
+ const overrides = Object.entries(palettes ?? {});
58
+ if (overrides.length === 0) return scheme;
59
+ assertPalettes(palettes ?? {});
60
+ const paletteFrom = (name, source) => isSchemeVariant(source) ? variantScheme(sourceColor, source, isDark, contrast)[PALETTE_FIELDS[name]] : TonalPalette.fromInt(argbFromHex(source));
61
+ const chosen = Object.fromEntries(PALETTE_NAMES.map((name) => [PALETTE_FIELDS[name], scheme[PALETTE_FIELDS[name]]]));
62
+ for (const [name, source] of overrides) chosen[PALETTE_FIELDS[name]] = paletteFrom(name, source);
63
+ return new DynamicScheme({
64
+ sourceColorHct: sourceColor,
65
+ variant: scheme.variant,
66
+ isDark,
67
+ contrastLevel: CONTRAST_LEVELS[contrast],
68
+ specVersion: scheme.specVersion,
69
+ platform: scheme.platform,
70
+ ...chosen
71
+ });
72
+ }
73
+ /** The same scheme with another palette in the error slot. */
74
+ function withErrorPalette(scheme, palette) {
75
+ return new DynamicScheme({
76
+ sourceColorHct: scheme.sourceColorHct,
77
+ variant: scheme.variant,
78
+ isDark: scheme.isDark,
79
+ contrastLevel: scheme.contrastLevel,
80
+ specVersion: scheme.specVersion,
81
+ platform: scheme.platform,
82
+ primaryPalette: scheme.primaryPalette,
83
+ secondaryPalette: scheme.secondaryPalette,
84
+ tertiaryPalette: scheme.tertiaryPalette,
85
+ neutralPalette: scheme.neutralPalette,
86
+ neutralVariantPalette: scheme.neutralVariantPalette,
87
+ errorPalette: palette
88
+ });
89
+ }
90
+ /**
91
+ * A custom colour's four roles (docs/plans/custom-colors.md): its tonal palette, harmonised
92
+ * toward the seed unless turned off, takes the error roles' tone rules, so it has the
93
+ * contrast M3 guarantees for error in every mode and at every contrast level.
94
+ */
95
+ function customColorRoles(scheme, name, color, harmonize) {
96
+ assertHexColor(color);
97
+ const argb = argbFromHex(color);
98
+ const custom = withErrorPalette(scheme, TonalPalette.fromInt(harmonize ? Blend.harmonize(argb, scheme.sourceColorHct.toInt()) : argb));
99
+ const tone = (color) => hexFromArgb(color.getArgb(custom));
100
+ return {
101
+ [name]: tone(dynamicColors.error()),
102
+ [`on-${name}`]: tone(dynamicColors.onError()),
103
+ [`${name}-container`]: tone(dynamicColors.errorContainer()),
104
+ [`on-${name}-container`]: tone(dynamicColors.onErrorContainer())
105
+ };
106
+ }
107
+ const isCustomRole = (role) => CUSTOM_COLOR_ROLES.includes(role);
108
+ /** Resolves every colour role to a hex value using the 2025 colour spec. */
109
+ function generateSchemeColors(seed, isDark, contrast) {
110
+ const scheme = createScheme(seed, isDark, contrast);
111
+ const colors = Object.fromEntries(COLOR_ROLES.filter((role) => !isCustomRole(role)).map((role) => [role, hexFromArgb(roleColor(role).getArgb(scheme))]));
112
+ for (const name of CUSTOM_COLORS) Object.assign(colors, customColorRoles(scheme, name, seed.customColors?.[name] ?? DEFAULT_CUSTOM_COLORS[name], seed.harmonize ?? true));
113
+ return colors;
114
+ }
115
+ //#endregion
116
+ export { assertHexColor, generateSchemeColors };
117
+
118
+ //# sourceMappingURL=scheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheme.js","names":[],"sources":["../../src/theme/scheme.ts"],"sourcesContent":["import {\n Blend,\n DynamicScheme,\n Hct,\n MaterialDynamicColors,\n SchemeExpressive,\n SchemeNeutral,\n SchemeTonalSpot,\n SchemeVibrant,\n TonalPalette,\n argbFromHex,\n hexFromArgb,\n type DynamicColor,\n} from '@material/material-color-utilities';\nimport {\n COLOR_ROLES,\n CONTRAST_LEVELS,\n CUSTOM_COLORS,\n CUSTOM_COLOR_ROLES,\n DEFAULT_CUSTOM_COLORS,\n PALETTE_NAMES,\n SCHEME_VARIANTS,\n type ColorRole,\n type ContrastLevel,\n type CustomColorName,\n type PaletteName,\n type PaletteSource,\n type SchemeVariant,\n type ThemePalettes,\n type ThemeSeed,\n} from '../tokens/color';\n\nconst SCHEMES = {\n 'tonal-spot': SchemeTonalSpot,\n neutral: SchemeNeutral,\n vibrant: SchemeVibrant,\n expressive: SchemeExpressive,\n} satisfies Record<SchemeVariant, unknown>;\n\nconst HEX_COLOR = /^#(?:[0-9a-f]{3}){1,2}$/i;\n\nconst toCamelCase = (role: string) => role.replace(/-([a-z])/g, (_, c: string) => c.toUpperCase());\n\nconst dynamicColors = new MaterialDynamicColors();\n\nfunction roleColor(role: ColorRole): DynamicColor {\n const method = toCamelCase(role) as keyof MaterialDynamicColors;\n const factory = dynamicColors[method];\n if (typeof factory !== 'function') {\n throw new Error(`[@windmorph/react] Unknown colour role \"${role}\".`);\n }\n const color = (factory as () => DynamicColor | undefined).call(dynamicColors);\n if (!color)\n throw new Error(`[@windmorph/react] Colour role \"${role}\" is not defined by the 2025 spec.`);\n return color;\n}\n\nexport function assertHexColor(value: string): void {\n if (!HEX_COLOR.test(value)) {\n throw new Error(\n `[@windmorph/react] Expected a hex colour like \"#6750A4\", received \"${value}\".`,\n );\n }\n}\n\nconst isSchemeVariant = (source: string): source is SchemeVariant =>\n (SCHEME_VARIANTS as readonly string[]).includes(source);\n\n/** The `DynamicScheme` field that holds each palette. */\nconst PALETTE_FIELDS = {\n primary: 'primaryPalette',\n secondary: 'secondaryPalette',\n tertiary: 'tertiaryPalette',\n error: 'errorPalette',\n neutral: 'neutralPalette',\n neutralVariant: 'neutralVariantPalette',\n} as const satisfies Record<PaletteName, keyof DynamicScheme>;\n\nfunction assertPalettes(palettes: ThemePalettes): void {\n for (const [name, source] of Object.entries(palettes)) {\n if (!(PALETTE_NAMES as readonly string[]).includes(name)) {\n throw new Error(\n `[@windmorph/react] Unknown palette \"${name}\". Use one of ${PALETTE_NAMES.join(', ')}.`,\n );\n }\n if (typeof source !== 'string' || (!isSchemeVariant(source) && !HEX_COLOR.test(source))) {\n throw new Error(\n `[@windmorph/react] The ${name} palette needs a scheme variant (${SCHEME_VARIANTS.join(', ')}) or a hex colour like \"#00A07A\", received \"${String(source)}\".`,\n );\n }\n }\n}\n\nfunction variantScheme(\n seed: Hct,\n variant: SchemeVariant,\n isDark: boolean,\n contrast: ContrastLevel,\n): DynamicScheme {\n return new SCHEMES[variant](seed, isDark, CONTRAST_LEVELS[contrast], '2025');\n}\n\nfunction createScheme(\n { seed, variant, palettes }: Pick<ThemeSeed, 'seed' | 'variant' | 'palettes'>,\n isDark: boolean,\n contrast: ContrastLevel,\n): DynamicScheme {\n assertHexColor(seed);\n const sourceColor = Hct.fromInt(argbFromHex(seed));\n const scheme = variantScheme(sourceColor, variant, isDark, contrast);\n const overrides = Object.entries(palettes ?? {}) as [PaletteName, PaletteSource][];\n if (overrides.length === 0) return scheme;\n assertPalettes(palettes ?? {});\n\n // Every palette starts as the variant's own; each override replaces one. Roles still take\n // their tones from the theme's variant, so the spec's contrast rules hold.\n const paletteFrom = (name: PaletteName, source: PaletteSource): TonalPalette =>\n isSchemeVariant(source)\n ? variantScheme(sourceColor, source, isDark, contrast)[PALETTE_FIELDS[name]]\n : TonalPalette.fromInt(argbFromHex(source));\n const chosen = Object.fromEntries(\n PALETTE_NAMES.map((name) => [PALETTE_FIELDS[name], scheme[PALETTE_FIELDS[name]]]),\n ) as Record<(typeof PALETTE_FIELDS)[PaletteName], TonalPalette>;\n for (const [name, source] of overrides) chosen[PALETTE_FIELDS[name]] = paletteFrom(name, source);\n\n return new DynamicScheme({\n sourceColorHct: sourceColor,\n variant: scheme.variant,\n isDark,\n contrastLevel: CONTRAST_LEVELS[contrast],\n specVersion: scheme.specVersion,\n platform: scheme.platform,\n ...chosen,\n });\n}\n\n/** The same scheme with another palette in the error slot. */\nfunction withErrorPalette(scheme: DynamicScheme, palette: TonalPalette): DynamicScheme {\n return new DynamicScheme({\n sourceColorHct: scheme.sourceColorHct,\n variant: scheme.variant,\n isDark: scheme.isDark,\n contrastLevel: scheme.contrastLevel,\n specVersion: scheme.specVersion,\n platform: scheme.platform,\n primaryPalette: scheme.primaryPalette,\n secondaryPalette: scheme.secondaryPalette,\n tertiaryPalette: scheme.tertiaryPalette,\n neutralPalette: scheme.neutralPalette,\n neutralVariantPalette: scheme.neutralVariantPalette,\n errorPalette: palette,\n });\n}\n\n/**\n * A custom colour's four roles (docs/plans/custom-colors.md): its tonal palette, harmonised\n * toward the seed unless turned off, takes the error roles' tone rules, so it has the\n * contrast M3 guarantees for error in every mode and at every contrast level.\n */\nfunction customColorRoles(\n scheme: DynamicScheme,\n name: CustomColorName,\n color: string,\n harmonize: boolean,\n): Partial<Record<ColorRole, string>> {\n assertHexColor(color);\n const argb = argbFromHex(color);\n const palette = TonalPalette.fromInt(\n harmonize ? Blend.harmonize(argb, scheme.sourceColorHct.toInt()) : argb,\n );\n const custom = withErrorPalette(scheme, palette);\n const tone = (color: DynamicColor) => hexFromArgb(color.getArgb(custom));\n return {\n [name]: tone(dynamicColors.error()),\n [`on-${name}`]: tone(dynamicColors.onError()),\n [`${name}-container`]: tone(dynamicColors.errorContainer()),\n [`on-${name}-container`]: tone(dynamicColors.onErrorContainer()),\n };\n}\n\nconst isCustomRole = (role: ColorRole) =>\n (CUSTOM_COLOR_ROLES as readonly ColorRole[]).includes(role);\n\n/** Resolves every colour role to a hex value using the 2025 colour spec. */\nexport function generateSchemeColors(\n seed: ThemeSeed,\n isDark: boolean,\n contrast: ContrastLevel,\n): Record<ColorRole, string> {\n const scheme = createScheme(seed, isDark, contrast);\n const colors: Partial<Record<ColorRole, string>> = Object.fromEntries(\n COLOR_ROLES.filter((role) => !isCustomRole(role)).map((role) => [\n role,\n hexFromArgb(roleColor(role).getArgb(scheme)),\n ]),\n );\n for (const name of CUSTOM_COLORS) {\n Object.assign(\n colors,\n customColorRoles(\n scheme,\n name,\n seed.customColors?.[name] ?? DEFAULT_CUSTOM_COLORS[name],\n seed.harmonize ?? true,\n ),\n );\n }\n return colors as Record<ColorRole, string>;\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,MAAM,UAAU;CACd,cAAc;CACd,SAAS;CACT,SAAS;CACT,YAAY;AACd;AAEA,MAAM,YAAY;AAElB,MAAM,eAAe,SAAiB,KAAK,QAAQ,cAAc,GAAG,MAAc,EAAE,YAAY,CAAC;AAEjG,MAAM,gBAAgB,IAAI,sBAAsB;AAEhD,SAAS,UAAU,MAA+B;CAChD,MAAM,SAAS,YAAY,IAAI;CAC/B,MAAM,UAAU,cAAc;CAC9B,IAAI,OAAO,YAAY,YACrB,MAAM,IAAI,MAAM,2CAA2C,KAAK,GAAG;CAErE,MAAM,QAAS,QAA2C,KAAK,aAAa;CAC5E,IAAI,CAAC,OACH,MAAM,IAAI,MAAM,mCAAmC,KAAK,mCAAmC;CAC7F,OAAO;AACT;AAEA,SAAgB,eAAe,OAAqB;CAClD,IAAI,CAAC,UAAU,KAAK,KAAK,GACvB,MAAM,IAAI,MACR,sEAAsE,MAAM,GAC9E;AAEJ;AAEA,MAAM,mBAAmB,WACtB,gBAAsC,SAAS,MAAM;;AAGxD,MAAM,iBAAiB;CACrB,SAAS;CACT,WAAW;CACX,UAAU;CACV,OAAO;CACP,SAAS;CACT,gBAAgB;AAClB;AAEA,SAAS,eAAe,UAA+B;CACrD,KAAK,MAAM,CAAC,MAAM,WAAW,OAAO,QAAQ,QAAQ,GAAG;EACrD,IAAI,CAAE,cAAoC,SAAS,IAAI,GACrD,MAAM,IAAI,MACR,uCAAuC,KAAK,gBAAgB,cAAc,KAAK,IAAI,EAAE,EACvF;EAEF,IAAI,OAAO,WAAW,YAAa,CAAC,gBAAgB,MAAM,KAAK,CAAC,UAAU,KAAK,MAAM,GACnF,MAAM,IAAI,MACR,0BAA0B,KAAK,mCAAmC,gBAAgB,KAAK,IAAI,EAAE,8CAA8C,OAAO,MAAM,EAAE,GAC5J;CAEJ;AACF;AAEA,SAAS,cACP,MACA,SACA,QACA,UACe;CACf,OAAO,IAAI,QAAQ,SAAS,MAAM,QAAQ,gBAAgB,WAAW,MAAM;AAC7E;AAEA,SAAS,aACP,EAAE,MAAM,SAAS,YACjB,QACA,UACe;CACf,eAAe,IAAI;CACnB,MAAM,cAAc,IAAI,QAAQ,YAAY,IAAI,CAAC;CACjD,MAAM,SAAS,cAAc,aAAa,SAAS,QAAQ,QAAQ;CACnE,MAAM,YAAY,OAAO,QAAQ,YAAY,CAAC,CAAC;CAC/C,IAAI,UAAU,WAAW,GAAG,OAAO;CACnC,eAAe,YAAY,CAAC,CAAC;CAI7B,MAAM,eAAe,MAAmB,WACtC,gBAAgB,MAAM,IAClB,cAAc,aAAa,QAAQ,QAAQ,QAAQ,CAAC,CAAC,eAAe,SACpE,aAAa,QAAQ,YAAY,MAAM,CAAC;CAC9C,MAAM,SAAS,OAAO,YACpB,cAAc,KAAK,SAAS,CAAC,eAAe,OAAO,OAAO,eAAe,MAAM,CAAC,CAClF;CACA,KAAK,MAAM,CAAC,MAAM,WAAW,WAAW,OAAO,eAAe,SAAS,YAAY,MAAM,MAAM;CAE/F,OAAO,IAAI,cAAc;EACvB,gBAAgB;EAChB,SAAS,OAAO;EAChB;EACA,eAAe,gBAAgB;EAC/B,aAAa,OAAO;EACpB,UAAU,OAAO;EACjB,GAAG;CACL,CAAC;AACH;;AAGA,SAAS,iBAAiB,QAAuB,SAAsC;CACrF,OAAO,IAAI,cAAc;EACvB,gBAAgB,OAAO;EACvB,SAAS,OAAO;EAChB,QAAQ,OAAO;EACf,eAAe,OAAO;EACtB,aAAa,OAAO;EACpB,UAAU,OAAO;EACjB,gBAAgB,OAAO;EACvB,kBAAkB,OAAO;EACzB,iBAAiB,OAAO;EACxB,gBAAgB,OAAO;EACvB,uBAAuB,OAAO;EAC9B,cAAc;CAChB,CAAC;AACH;;;;;;AAOA,SAAS,iBACP,QACA,MACA,OACA,WACoC;CACpC,eAAe,KAAK;CACpB,MAAM,OAAO,YAAY,KAAK;CAI9B,MAAM,SAAS,iBAAiB,QAHhB,aAAa,QAC3B,YAAY,MAAM,UAAU,MAAM,OAAO,eAAe,MAAM,CAAC,IAAI,IAEvB,CAAC;CAC/C,MAAM,QAAQ,UAAwB,YAAY,MAAM,QAAQ,MAAM,CAAC;CACvE,OAAO;GACJ,OAAO,KAAK,cAAc,MAAM,CAAC;GACjC,MAAM,SAAS,KAAK,cAAc,QAAQ,CAAC;GAC3C,GAAG,KAAK,cAAc,KAAK,cAAc,eAAe,CAAC;GACzD,MAAM,KAAK,cAAc,KAAK,cAAc,iBAAiB,CAAC;CACjE;AACF;AAEA,MAAM,gBAAgB,SACnB,mBAA4C,SAAS,IAAI;;AAG5D,SAAgB,qBACd,MACA,QACA,UAC2B;CAC3B,MAAM,SAAS,aAAa,MAAM,QAAQ,QAAQ;CAClD,MAAM,SAA6C,OAAO,YACxD,YAAY,QAAQ,SAAS,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC,KAAK,SAAS,CAC9D,MACA,YAAY,UAAU,IAAI,CAAC,CAAC,QAAQ,MAAM,CAAC,CAC7C,CAAC,CACH;CACA,KAAK,MAAM,QAAQ,eACjB,OAAO,OACL,QACA,iBACE,QACA,MACA,KAAK,eAAe,SAAS,sBAAsB,OACnD,KAAK,aAAa,IACpB,CACF;CAEF,OAAO;AACT"}
@@ -0,0 +1,38 @@
1
+ import { ColorMode, ContrastLevel } from "../tokens/color.js";
2
+ import { Density } from "../tokens/density.js";
3
+ import { MotionScheme } from "../tokens/motion.js";
4
+ //#region src/theme/state.d.ts
5
+ /** The theme dimensions, mirrored as `data-*` attributes. */
6
+ export interface ThemeState {
7
+ /** The colour theme's name: a built-in (`baseline`, `ocean` …) or one made with `createTheme`. */
8
+ theme: string;
9
+ /** `light`, `dark` or `system` (follows `prefers-color-scheme`). */
10
+ mode: ColorMode;
11
+ /** `standard`, `medium` or `high`. */
12
+ contrast: ContrastLevel;
13
+ /** `expressive` (springs that overshoot) or `standard` (no visible overshoot). */
14
+ motion: MotionScheme;
15
+ /** Web density, `0` (default) to `-3` (densest); see `Density`. */
16
+ density: Density;
17
+ }
18
+ export declare const DEFAULT_THEME_STATE: ThemeState;
19
+ /** Where the selected theme is remembered between visits. */
20
+ export type ThemeStorage = 'cookie' | 'local-storage' | 'none';
21
+ export declare const DEFAULT_STORAGE_KEY = "windmorph-theme";
22
+ /** Serialises a theme state for a cookie or localStorage value. */
23
+ export declare function serializeThemeState(state: ThemeState): string;
24
+ /**
25
+ * Parses a stored theme state. Unknown or invalid values are dropped, so the
26
+ * result only contains fields that can be trusted.
27
+ */
28
+ export declare function parseThemeState(raw: string | null | undefined, themes?: readonly string[]): Partial<ThemeState>;
29
+ /** The `data-*` attributes for a theme state, for `<html>` or any themed element. */
30
+ export declare function themeAttributes(state: ThemeState): {
31
+ readonly 'data-theme': string;
32
+ readonly 'data-mode': "light" | "dark" | "system";
33
+ readonly 'data-contrast': "standard" | "medium" | "high";
34
+ readonly 'data-motion': "standard" | "expressive";
35
+ readonly 'data-density': "0" | "-1" | "-2" | "-3";
36
+ };
37
+ //#endregion
38
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1,93 @@
1
+ import { COLOR_MODES, CONTRAST_LEVEL_NAMES, DEFAULT_THEME } from "../tokens/color.js";
2
+ import { isDensity } from "../tokens/density.js";
3
+ import { DEFAULT_MOTION_SCHEME, MOTION_SCHEMES } from "../tokens/motion.js";
4
+ //#region src/theme/state.ts
5
+ const DEFAULT_THEME_STATE = {
6
+ theme: DEFAULT_THEME,
7
+ mode: "system",
8
+ contrast: "standard",
9
+ motion: DEFAULT_MOTION_SCHEME,
10
+ density: 0
11
+ };
12
+ const DEFAULT_STORAGE_KEY = "windmorph-theme";
13
+ const THEME_NAME = /^[a-z][a-z0-9-]*$/;
14
+ const includes = (list, value) => typeof value === "string" && list.includes(value);
15
+ /** Serialises a theme state for a cookie or localStorage value. */
16
+ function serializeThemeState(state) {
17
+ return encodeURIComponent(new URLSearchParams({
18
+ theme: state.theme,
19
+ mode: state.mode,
20
+ contrast: state.contrast,
21
+ motion: state.motion,
22
+ density: String(state.density)
23
+ }).toString());
24
+ }
25
+ /**
26
+ * Parses a stored theme state. Unknown or invalid values are dropped, so the
27
+ * result only contains fields that can be trusted.
28
+ */
29
+ function parseThemeState(raw, themes) {
30
+ if (!raw) return {};
31
+ let params;
32
+ try {
33
+ params = new URLSearchParams(decodeURIComponent(raw));
34
+ } catch {
35
+ return {};
36
+ }
37
+ const result = {};
38
+ const theme = params.get("theme");
39
+ if (theme && THEME_NAME.test(theme) && (!themes || themes.includes(theme))) result.theme = theme;
40
+ const mode = params.get("mode");
41
+ if (includes(COLOR_MODES, mode)) result.mode = mode;
42
+ const contrast = params.get("contrast");
43
+ if (includes(CONTRAST_LEVEL_NAMES, contrast)) result.contrast = contrast;
44
+ const motion = params.get("motion");
45
+ if (includes(MOTION_SCHEMES, motion)) result.motion = motion;
46
+ const density = params.get("density");
47
+ if (density !== null && isDensity(density)) result.density = Number(density);
48
+ return result;
49
+ }
50
+ /** The `data-*` attributes for a theme state, for `<html>` or any themed element. */
51
+ function themeAttributes(state) {
52
+ return {
53
+ "data-theme": state.theme,
54
+ "data-mode": state.mode,
55
+ "data-contrast": state.contrast,
56
+ "data-motion": state.motion,
57
+ "data-density": `${state.density}`
58
+ };
59
+ }
60
+ /**
61
+ * The `data-*` attributes an element needs to carry `state` inside an ancestor that already
62
+ * carries `inherited` (2026-10-24): only the dimensions that differ, so the theme's rules don't
63
+ * declare the same values again there and an app's own values for the system tokens (an
64
+ * `:root` rule) still reach it. The colour dimensions go together, since one rule reads the
65
+ * theme, mode and contrast of the same element. With no known `inherited` (a portal into an
66
+ * app's own container, a provider that leaves `<html>` alone), every attribute. `restyled`
67
+ * (an element with an app's own class or CSS variables, which may set a colour role) keeps the
68
+ * colour dimensions too, so the values the theme derives from the roles on `[data-theme]` (the
69
+ * elevation shadows, component tokens an app declares there) resolve again with its own.
70
+ */
71
+ function themeAttributesOver(state, inherited, restyled = false) {
72
+ const all = themeAttributes(state);
73
+ if (!inherited) return all;
74
+ return {
75
+ ...(restyled || state.theme !== inherited.theme || state.mode !== inherited.mode || state.contrast !== inherited.contrast) && {
76
+ "data-theme": all["data-theme"],
77
+ "data-mode": all["data-mode"],
78
+ "data-contrast": all["data-contrast"]
79
+ },
80
+ ...state.motion !== inherited.motion && { "data-motion": all["data-motion"] },
81
+ ...state.density !== inherited.density && { "data-density": all["data-density"] }
82
+ };
83
+ }
84
+ function readCookie(cookieString, name) {
85
+ for (const part of cookieString.split(";")) {
86
+ const [key, ...value] = part.trim().split("=");
87
+ if (key === name) return value.join("=");
88
+ }
89
+ }
90
+ //#endregion
91
+ export { DEFAULT_STORAGE_KEY, DEFAULT_THEME_STATE, parseThemeState, readCookie, serializeThemeState, themeAttributes, themeAttributesOver };
92
+
93
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","names":[],"sources":["../../src/theme/state.ts"],"sourcesContent":["import {\n COLOR_MODES,\n CONTRAST_LEVEL_NAMES,\n DEFAULT_THEME,\n type ColorMode,\n type ContrastLevel,\n} from '../tokens/color';\nimport { DEFAULT_DENSITY, isDensity, type Density } from '../tokens/density';\nimport { DEFAULT_MOTION_SCHEME, MOTION_SCHEMES, type MotionScheme } from '../tokens/motion';\n\n/** The theme dimensions, mirrored as `data-*` attributes. */\nexport interface ThemeState {\n /** The colour theme's name: a built-in (`baseline`, `ocean` …) or one made with `createTheme`. */\n theme: string;\n /** `light`, `dark` or `system` (follows `prefers-color-scheme`). */\n mode: ColorMode;\n /** `standard`, `medium` or `high`. */\n contrast: ContrastLevel;\n /** `expressive` (springs that overshoot) or `standard` (no visible overshoot). */\n motion: MotionScheme;\n /** Web density, `0` (default) to `-3` (densest); see `Density`. */\n density: Density;\n}\n\nexport const DEFAULT_THEME_STATE: ThemeState = {\n theme: DEFAULT_THEME,\n mode: 'system',\n contrast: 'standard',\n motion: DEFAULT_MOTION_SCHEME,\n density: DEFAULT_DENSITY,\n};\n\n/** Where the selected theme is remembered between visits. */\nexport type ThemeStorage = 'cookie' | 'local-storage' | 'none';\n\nexport const DEFAULT_STORAGE_KEY = 'windmorph-theme';\n\nconst THEME_NAME = /^[a-z][a-z0-9-]*$/;\n\nconst includes = <T extends string>(list: readonly T[], value: unknown): value is T =>\n typeof value === 'string' && (list as readonly string[]).includes(value);\n\n/** Serialises a theme state for a cookie or localStorage value. */\nexport function serializeThemeState(state: ThemeState): string {\n return encodeURIComponent(\n new URLSearchParams({\n theme: state.theme,\n mode: state.mode,\n contrast: state.contrast,\n motion: state.motion,\n density: String(state.density),\n }).toString(),\n );\n}\n\n/**\n * Parses a stored theme state. Unknown or invalid values are dropped, so the\n * result only contains fields that can be trusted.\n */\nexport function parseThemeState(\n raw: string | null | undefined,\n themes?: readonly string[],\n): Partial<ThemeState> {\n if (!raw) return {};\n let params: URLSearchParams;\n try {\n params = new URLSearchParams(decodeURIComponent(raw));\n } catch {\n return {};\n }\n const result: Partial<ThemeState> = {};\n const theme = params.get('theme');\n if (theme && THEME_NAME.test(theme) && (!themes || themes.includes(theme))) result.theme = theme;\n const mode = params.get('mode');\n if (includes(COLOR_MODES, mode)) result.mode = mode;\n const contrast = params.get('contrast');\n if (includes(CONTRAST_LEVEL_NAMES, contrast)) result.contrast = contrast;\n const motion = params.get('motion');\n if (includes(MOTION_SCHEMES, motion)) result.motion = motion;\n const density = params.get('density');\n if (density !== null && isDensity(density)) result.density = Number(density) as Density;\n return result;\n}\n\n/** The `data-*` attributes for a theme state, for `<html>` or any themed element. */\nexport function themeAttributes(state: ThemeState) {\n return {\n 'data-theme': state.theme,\n 'data-mode': state.mode,\n 'data-contrast': state.contrast,\n 'data-motion': state.motion,\n 'data-density': `${state.density}`,\n } as const;\n}\n\n/**\n * The `data-*` attributes an element needs to carry `state` inside an ancestor that already\n * carries `inherited` (2026-10-24): only the dimensions that differ, so the theme's rules don't\n * declare the same values again there and an app's own values for the system tokens (an\n * `:root` rule) still reach it. The colour dimensions go together, since one rule reads the\n * theme, mode and contrast of the same element. With no known `inherited` (a portal into an\n * app's own container, a provider that leaves `<html>` alone), every attribute. `restyled`\n * (an element with an app's own class or CSS variables, which may set a colour role) keeps the\n * colour dimensions too, so the values the theme derives from the roles on `[data-theme]` (the\n * elevation shadows, component tokens an app declares there) resolve again with its own.\n */\nexport function themeAttributesOver(\n state: ThemeState,\n inherited: ThemeState | null,\n restyled = false,\n): Partial<ReturnType<typeof themeAttributes>> {\n const all = themeAttributes(state);\n if (!inherited) return all;\n const colors =\n restyled ||\n state.theme !== inherited.theme ||\n state.mode !== inherited.mode ||\n state.contrast !== inherited.contrast;\n return {\n ...(colors && {\n 'data-theme': all['data-theme'],\n 'data-mode': all['data-mode'],\n 'data-contrast': all['data-contrast'],\n }),\n ...(state.motion !== inherited.motion && { 'data-motion': all['data-motion'] }),\n ...(state.density !== inherited.density && { 'data-density': all['data-density'] }),\n };\n}\n\nexport function readCookie(cookieString: string, name: string): string | undefined {\n for (const part of cookieString.split(';')) {\n const [key, ...value] = part.trim().split('=');\n if (key === name) return value.join('=');\n }\n return undefined;\n}\n"],"mappings":";;;;AAwBA,MAAa,sBAAkC;CAC7C,OAAO;CACP,MAAM;CACN,UAAU;CACV,QAAQ;CACR,SAAA;AACF;AAKA,MAAa,sBAAsB;AAEnC,MAAM,aAAa;AAEnB,MAAM,YAA8B,MAAoB,UACtD,OAAO,UAAU,YAAa,KAA2B,SAAS,KAAK;;AAGzE,SAAgB,oBAAoB,OAA2B;CAC7D,OAAO,mBACL,IAAI,gBAAgB;EAClB,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,UAAU,MAAM;EAChB,QAAQ,MAAM;EACd,SAAS,OAAO,MAAM,OAAO;CAC/B,CAAC,CAAC,CAAC,SAAS,CACd;AACF;;;;;AAMA,SAAgB,gBACd,KACA,QACqB;CACrB,IAAI,CAAC,KAAK,OAAO,CAAC;CAClB,IAAI;CACJ,IAAI;EACF,SAAS,IAAI,gBAAgB,mBAAmB,GAAG,CAAC;CACtD,QAAQ;EACN,OAAO,CAAC;CACV;CACA,MAAM,SAA8B,CAAC;CACrC,MAAM,QAAQ,OAAO,IAAI,OAAO;CAChC,IAAI,SAAS,WAAW,KAAK,KAAK,MAAM,CAAC,UAAU,OAAO,SAAS,KAAK,IAAI,OAAO,QAAQ;CAC3F,MAAM,OAAO,OAAO,IAAI,MAAM;CAC9B,IAAI,SAAS,aAAa,IAAI,GAAG,OAAO,OAAO;CAC/C,MAAM,WAAW,OAAO,IAAI,UAAU;CACtC,IAAI,SAAS,sBAAsB,QAAQ,GAAG,OAAO,WAAW;CAChE,MAAM,SAAS,OAAO,IAAI,QAAQ;CAClC,IAAI,SAAS,gBAAgB,MAAM,GAAG,OAAO,SAAS;CACtD,MAAM,UAAU,OAAO,IAAI,SAAS;CACpC,IAAI,YAAY,QAAQ,UAAU,OAAO,GAAG,OAAO,UAAU,OAAO,OAAO;CAC3E,OAAO;AACT;;AAGA,SAAgB,gBAAgB,OAAmB;CACjD,OAAO;EACL,cAAc,MAAM;EACpB,aAAa,MAAM;EACnB,iBAAiB,MAAM;EACvB,eAAe,MAAM;EACrB,gBAAgB,GAAG,MAAM;CAC3B;AACF;;;;;;;;;;;;AAaA,SAAgB,oBACd,OACA,WACA,WAAW,OACkC;CAC7C,MAAM,MAAM,gBAAgB,KAAK;CACjC,IAAI,CAAC,WAAW,OAAO;CAMvB,OAAO;EACL,IALA,YACA,MAAM,UAAU,UAAU,SAC1B,MAAM,SAAS,UAAU,QACzB,MAAM,aAAa,UAAU,aAEf;GACZ,cAAc,IAAI;GAClB,aAAa,IAAI;GACjB,iBAAiB,IAAI;EACvB;EACA,GAAI,MAAM,WAAW,UAAU,UAAU,EAAE,eAAe,IAAI,eAAe;EAC7E,GAAI,MAAM,YAAY,UAAU,WAAW,EAAE,gBAAgB,IAAI,gBAAgB;CACnF;AACF;AAEA,SAAgB,WAAW,cAAsB,MAAkC;CACjF,KAAK,MAAM,QAAQ,aAAa,MAAM,GAAG,GAAG;EAC1C,MAAM,CAAC,KAAK,GAAG,SAAS,KAAK,KAAK,CAAC,CAAC,MAAM,GAAG;EAC7C,IAAI,QAAQ,MAAM,OAAO,MAAM,KAAK,GAAG;CACzC;AAEF"}
@@ -0,0 +1,21 @@
1
+ import { readCookie, serializeThemeState } from "./state.js";
2
+ //#region src/theme/storage.ts
3
+ const ONE_YEAR = 31536e3;
4
+ function readStoredTheme(storage, key) {
5
+ try {
6
+ if (storage === "cookie") return readCookie(document.cookie, key) ?? null;
7
+ if (storage === "local-storage") return window.localStorage.getItem(key);
8
+ } catch {}
9
+ return null;
10
+ }
11
+ function writeStoredTheme(storage, key, state) {
12
+ const value = serializeThemeState(state);
13
+ try {
14
+ if (storage === "cookie") document.cookie = `${key}=${value}; path=/; max-age=${ONE_YEAR}; samesite=lax`;
15
+ else if (storage === "local-storage") window.localStorage.setItem(key, value);
16
+ } catch {}
17
+ }
18
+ //#endregion
19
+ export { readStoredTheme, writeStoredTheme };
20
+
21
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","names":[],"sources":["../../src/theme/storage.ts"],"sourcesContent":["import { readCookie, serializeThemeState, type ThemeState, type ThemeStorage } from './state';\n\nconst ONE_YEAR = 60 * 60 * 24 * 365;\n\nexport function readStoredTheme(storage: ThemeStorage, key: string): string | null {\n try {\n if (storage === 'cookie') return readCookie(document.cookie, key) ?? null;\n if (storage === 'local-storage') return window.localStorage.getItem(key);\n } catch {\n // Storage can be blocked (private mode, sandboxed iframes); fall back to defaults.\n }\n return null;\n}\n\nexport function writeStoredTheme(storage: ThemeStorage, key: string, state: ThemeState): void {\n const value = serializeThemeState(state);\n try {\n if (storage === 'cookie') {\n document.cookie = `${key}=${value}; path=/; max-age=${ONE_YEAR}; samesite=lax`;\n } else if (storage === 'local-storage') {\n window.localStorage.setItem(key, value);\n }\n } catch {\n // Persisting is best-effort.\n }\n}\n"],"mappings":";;AAEA,MAAM,WAAW;AAEjB,SAAgB,gBAAgB,SAAuB,KAA4B;CACjF,IAAI;EACF,IAAI,YAAY,UAAU,OAAO,WAAW,SAAS,QAAQ,GAAG,KAAK;EACrE,IAAI,YAAY,iBAAiB,OAAO,OAAO,aAAa,QAAQ,GAAG;CACzE,QAAQ,CAER;CACA,OAAO;AACT;AAEA,SAAgB,iBAAiB,SAAuB,KAAa,OAAyB;CAC5F,MAAM,QAAQ,oBAAoB,KAAK;CACvC,IAAI;EACF,IAAI,YAAY,UACd,SAAS,SAAS,GAAG,IAAI,GAAG,MAAM,oBAAoB,SAAS;OAC1D,IAAI,YAAY,iBACrB,OAAO,aAAa,QAAQ,KAAK,KAAK;CAE1C,QAAQ,CAER;AACF"}
@@ -0,0 +1,15 @@
1
+ //#region src/tokens/breakpoints.d.ts
2
+ /**
3
+ * M3 window size classes as Tailwind breakpoints (min-widths).
4
+ * Compact (< 600px) is the mobile-first default and has no prefix.
5
+ */
6
+ export declare const BREAKPOINTS: {
7
+ readonly medium: "600px";
8
+ readonly expanded: "840px";
9
+ readonly large: "1200px";
10
+ readonly xlarge: "1600px";
11
+ };
12
+ export type BreakpointName = keyof typeof BREAKPOINTS;
13
+ export declare const BREAKPOINT_NAMES: BreakpointName[];
14
+ //#endregion
15
+ //# sourceMappingURL=breakpoints.d.ts.map
@@ -0,0 +1,16 @@
1
+ //#region src/tokens/breakpoints.ts
2
+ /**
3
+ * M3 window size classes as Tailwind breakpoints (min-widths).
4
+ * Compact (< 600px) is the mobile-first default and has no prefix.
5
+ */
6
+ const BREAKPOINTS = {
7
+ medium: "600px",
8
+ expanded: "840px",
9
+ large: "1200px",
10
+ xlarge: "1600px"
11
+ };
12
+ const BREAKPOINT_NAMES = Object.keys(BREAKPOINTS);
13
+ //#endregion
14
+ export { BREAKPOINTS, BREAKPOINT_NAMES };
15
+
16
+ //# sourceMappingURL=breakpoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoints.js","names":[],"sources":["../../src/tokens/breakpoints.ts"],"sourcesContent":["/**\n * M3 window size classes as Tailwind breakpoints (min-widths).\n * Compact (< 600px) is the mobile-first default and has no prefix.\n */\nexport const BREAKPOINTS = {\n medium: '600px',\n expanded: '840px',\n large: '1200px',\n xlarge: '1600px',\n} as const;\n\nexport type BreakpointName = keyof typeof BREAKPOINTS;\nexport const BREAKPOINT_NAMES = Object.keys(BREAKPOINTS) as BreakpointName[];\n"],"mappings":";;;;;AAIA,MAAa,cAAc;CACzB,QAAQ;CACR,UAAU;CACV,OAAO;CACP,QAAQ;AACV;AAGA,MAAa,mBAAmB,OAAO,KAAK,WAAW"}
@@ -0,0 +1,104 @@
1
+ //#region src/tokens/color.d.ts
2
+ /**
3
+ * M3 colour roles, built-in themes and contrast levels.
4
+ *
5
+ * Role names are the kebab-case form of the `MaterialDynamicColors` methods in
6
+ * `@material/material-color-utilities`, plus the custom-colour roles (`success`,
7
+ * `warning`; see {@link CUSTOM_COLOR_ROLES}). They become `--md-sys-color-<role>` CSS
8
+ * variables and `bg-<role>` / `text-<role>` / … Tailwind utilities.
9
+ */
10
+ export declare const COLOR_ROLES: readonly ["primary", "on-primary", "primary-container", "on-primary-container", "inverse-primary", "primary-fixed", "primary-fixed-dim", "on-primary-fixed", "on-primary-fixed-variant", "secondary", "on-secondary", "secondary-container", "on-secondary-container", "secondary-fixed", "secondary-fixed-dim", "on-secondary-fixed", "on-secondary-fixed-variant", "tertiary", "on-tertiary", "tertiary-container", "on-tertiary-container", "tertiary-fixed", "tertiary-fixed-dim", "on-tertiary-fixed", "on-tertiary-fixed-variant", "error", "on-error", "error-container", "on-error-container", "background", "on-background", "surface", "surface-dim", "surface-bright", "surface-container-lowest", "surface-container-low", "surface-container", "surface-container-high", "surface-container-highest", "on-surface", "surface-variant", "on-surface-variant", "inverse-surface", "inverse-on-surface", "outline", "outline-variant", "shadow", "scrim", "surface-tint", "success", "on-success", "success-container", "on-success-container", "warning", "on-warning", "warning-container", "on-warning-container"];
11
+ /** An M3 colour role, such as `primary` or `on-surface-variant` (`--md-sys-color-<role>`). */
12
+ export type ColorRole = (typeof COLOR_ROLES)[number];
13
+ /**
14
+ * Colours M3 has no key colour for, generated the way Material Theme Builder makes "custom
15
+ * colours": each gets colour, on-colour, container and on-container roles, with the error
16
+ * roles' tone rules (so the same contrast as error), harmonised toward the theme's seed.
17
+ */
18
+ export declare const CUSTOM_COLORS: readonly ["success", "warning"];
19
+ export type CustomColorName = (typeof CUSTOM_COLORS)[number];
20
+ /** The four roles of each custom colour. */
21
+ export declare const CUSTOM_COLOR_ROLES: ("primary" | "on-primary" | "primary-container" | "on-primary-container" | "inverse-primary" | "primary-fixed" | "primary-fixed-dim" | "on-primary-fixed" | "on-primary-fixed-variant" | "secondary" | "on-secondary" | "secondary-container" | "on-secondary-container" | "secondary-fixed" | "secondary-fixed-dim" | "on-secondary-fixed" | "on-secondary-fixed-variant" | "tertiary" | "on-tertiary" | "tertiary-container" | "on-tertiary-container" | "tertiary-fixed" | "tertiary-fixed-dim" | "on-tertiary-fixed" | "on-tertiary-fixed-variant" | "error" | "on-error" | "error-container" | "on-error-container" | "background" | "on-background" | "surface" | "surface-dim" | "surface-bright" | "surface-container-lowest" | "surface-container-low" | "surface-container" | "surface-container-high" | "surface-container-highest" | "on-surface" | "surface-variant" | "on-surface-variant" | "inverse-surface" | "inverse-on-surface" | "outline" | "outline-variant" | "shadow" | "scrim" | "surface-tint" | "success" | "on-success" | "success-container" | "on-success-container" | "warning" | "on-warning" | "warning-container" | "on-warning-container")[];
22
+ /** The default custom colours; only their hue and chroma matter, not their lightness. */
23
+ export declare const DEFAULT_CUSTOM_COLORS: Readonly<Record<CustomColorName, `#${string}`>>;
24
+ /** Scheme variants supported by the 2025 colour spec. */
25
+ export declare const SCHEME_VARIANTS: readonly ["tonal-spot", "neutral", "vibrant", "expressive"];
26
+ export type SchemeVariant = (typeof SCHEME_VARIANTS)[number];
27
+ /**
28
+ * The six tonal palettes an M3 scheme is built from: the "core colours" of Material Theme
29
+ * Builder. Every colour role takes its tone from one of them.
30
+ */
31
+ export declare const PALETTE_NAMES: readonly ["primary", "secondary", "tertiary", "error", "neutral", "neutralVariant"];
32
+ export type PaletteName = (typeof PALETTE_NAMES)[number];
33
+ /**
34
+ * Where a palette comes from: a scheme variant (that palette from that variant of the same
35
+ * seed) or a hex colour (a palette built from its hue and chroma, as Material Theme Builder
36
+ * does for a core colour).
37
+ */
38
+ export type PaletteSource = SchemeVariant | `#${string}`;
39
+ /** Per-palette sources; any palette left out comes from the theme's own `variant`. */
40
+ export type ThemePalettes = Partial<Record<PaletteName, PaletteSource>>;
41
+ export interface ThemeSeed {
42
+ seed: string;
43
+ variant: SchemeVariant;
44
+ /**
45
+ * Takes some palettes from elsewhere, e.g. `{ neutral: 'tonal-spot', neutralVariant:
46
+ * 'tonal-spot' }` for vivid accents on calm surfaces, or `{ tertiary: '#00A07A' }` for a
47
+ * brand's own tertiary colour. Roles still take their tones from the M3 spec, so contrast
48
+ * is unchanged.
49
+ */
50
+ palettes?: ThemePalettes;
51
+ /** The success and warning colours; each defaults to {@link DEFAULT_CUSTOM_COLORS}. */
52
+ customColors?: Partial<Record<CustomColorName, `#${string}`>>;
53
+ /**
54
+ * Turns each custom colour's hue up to 15° toward the seed, as Material Theme Builder
55
+ * does, so it belongs to the theme. `false` keeps a brand's exact status colours.
56
+ * @default true
57
+ */
58
+ harmonize?: boolean;
59
+ }
60
+ /** The six built-in themes: each one's seed colour and scheme variant. */
61
+ export declare const BUILT_IN_THEMES: {
62
+ readonly baseline: {
63
+ readonly seed: "#6750A4";
64
+ readonly variant: "tonal-spot";
65
+ };
66
+ readonly ocean: {
67
+ readonly seed: "#0061A4";
68
+ readonly variant: "tonal-spot";
69
+ };
70
+ readonly forest: {
71
+ readonly seed: "#386A20";
72
+ readonly variant: "tonal-spot";
73
+ };
74
+ readonly sunset: {
75
+ readonly seed: "#A04100";
76
+ readonly variant: "tonal-spot";
77
+ };
78
+ readonly rose: {
79
+ readonly seed: "#9C4146";
80
+ readonly variant: "tonal-spot";
81
+ };
82
+ readonly slate: {
83
+ readonly seed: "#545F71";
84
+ readonly variant: "neutral";
85
+ };
86
+ };
87
+ export type BuiltInThemeName = keyof typeof BUILT_IN_THEMES;
88
+ /** The built-in themes' names, in order: `baseline`, `ocean`, `forest`, `sunset`, `rose`, `slate`. */
89
+ export declare const BUILT_IN_THEME_NAMES: BuiltInThemeName[];
90
+ export declare const DEFAULT_THEME: BuiltInThemeName;
91
+ export declare const COLOR_MODES: readonly ["light", "dark", "system"];
92
+ export type ColorMode = (typeof COLOR_MODES)[number];
93
+ export type ResolvedColorMode = Exclude<ColorMode, 'system'>;
94
+ /** Contrast levels and the `contrastLevel` passed to the colour library. */
95
+ export declare const CONTRAST_LEVELS: {
96
+ readonly standard: 0;
97
+ readonly medium: 0.5;
98
+ readonly high: 1;
99
+ };
100
+ export type ContrastLevel = keyof typeof CONTRAST_LEVELS;
101
+ /** The contrast levels' names: `standard`, `medium` and `high`. */
102
+ export declare const CONTRAST_LEVEL_NAMES: ContrastLevel[];
103
+ //#endregion
104
+ //# sourceMappingURL=color.d.ts.map