@tenerife.music/ui 1.0.8 → 1.0.12

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 (366) hide show
  1. package/dist/{tokens/colors.d.ts → colors-DPNI96bB.d.cts} +21 -19
  2. package/dist/colors-DPNI96bB.d.ts +289 -0
  3. package/dist/index.cjs +15605 -2
  4. package/dist/index.d.cts +3726 -0
  5. package/dist/index.d.ts +3726 -39
  6. package/dist/index.mjs +12883 -5567
  7. package/dist/preset.cjs +1264 -2
  8. package/dist/preset.d.cts +21 -0
  9. package/dist/preset.d.ts +3 -1
  10. package/dist/preset.mjs +1165 -95
  11. package/dist/styles.cjs +2 -2
  12. package/dist/styles.css +87 -1
  13. package/dist/styles.d.cts +2 -0
  14. package/dist/styles.d.ts +2 -0
  15. package/dist/styles.mjs +1 -1
  16. package/dist/theme/index.cjs +2647 -2
  17. package/dist/theme/index.d.cts +528 -0
  18. package/dist/theme/index.d.ts +528 -8
  19. package/dist/theme/index.mjs +1610 -575
  20. package/dist/tokens/index.cjs +5678 -5
  21. package/dist/tokens/index.d.cts +5488 -0
  22. package/dist/tokens/index.d.ts +5488 -9
  23. package/dist/tokens/index.mjs +2076 -154
  24. package/package.json +3 -3
  25. package/dist/animation/index.d.ts +0 -8
  26. package/dist/animation/presets.d.ts +0 -301
  27. package/dist/animation/tas.d.ts +0 -24
  28. package/dist/animation/types.d.ts +0 -67
  29. package/dist/animation/useInView.d.ts +0 -36
  30. package/dist/animation/utils.d.ts +0 -6
  31. package/dist/brand-C5R2semX.js +0 -45
  32. package/dist/brand-DQb18Frh.cjs +0 -2
  33. package/dist/components/SectionBuilder.d.ts +0 -36
  34. package/dist/components/SectionBuilder.presets.d.ts +0 -228
  35. package/dist/components/SectionBuilder.types.d.ts +0 -326
  36. package/dist/components/admin/Dashboard.d.ts +0 -8
  37. package/dist/components/admin/UserManagement.d.ts +0 -8
  38. package/dist/components/auth/LoginForm.d.ts +0 -11
  39. package/dist/components/auth/ProfileCard.d.ts +0 -9
  40. package/dist/components/auth/RegisterForm.d.ts +0 -13
  41. package/dist/components/cards/ArtistCard/ArtistCard.d.ts +0 -22
  42. package/dist/components/cards/ArtistCard/ArtistCard.types.d.ts +0 -46
  43. package/dist/components/cards/ArtistCard/ArtistCard.variants.d.ts +0 -83
  44. package/dist/components/cards/ArtistCard/index.d.ts +0 -8
  45. package/dist/components/cards/CardBase/CardBase.d.ts +0 -45
  46. package/dist/components/cards/CardBase/CardBase.types.d.ts +0 -70
  47. package/dist/components/cards/CardBase/CardBase.variants.d.ts +0 -38
  48. package/dist/components/cards/CardBase/index.d.ts +0 -8
  49. package/dist/components/cards/CategoryCard/CategoryCard.d.ts +0 -18
  50. package/dist/components/cards/CategoryCard/CategoryCard.types.d.ts +0 -38
  51. package/dist/components/cards/CategoryCard/CategoryCard.variants.d.ts +0 -21
  52. package/dist/components/cards/CategoryCard/index.d.ts +0 -7
  53. package/dist/components/cards/EventCard/EventCard.d.ts +0 -19
  54. package/dist/components/cards/EventCard/EventCard.types.d.ts +0 -47
  55. package/dist/components/cards/EventCard/EventCard.variants.d.ts +0 -70
  56. package/dist/components/cards/EventCard/index.d.ts +0 -7
  57. package/dist/components/cards/PromoCard/PromoCard.d.ts +0 -20
  58. package/dist/components/cards/PromoCard/PromoCard.types.d.ts +0 -42
  59. package/dist/components/cards/PromoCard/PromoCard.variants.d.ts +0 -35
  60. package/dist/components/cards/PromoCard/index.d.ts +0 -7
  61. package/dist/components/cards/TicketCard/TicketCard.d.ts +0 -19
  62. package/dist/components/cards/TicketCard/TicketCard.types.d.ts +0 -55
  63. package/dist/components/cards/TicketCard/TicketCard.variants.d.ts +0 -71
  64. package/dist/components/cards/TicketCard/index.d.ts +0 -7
  65. package/dist/components/cards/VenueCard/VenueCard.d.ts +0 -21
  66. package/dist/components/cards/VenueCard/VenueCard.types.d.ts +0 -46
  67. package/dist/components/cards/VenueCard/VenueCard.variants.d.ts +0 -60
  68. package/dist/components/cards/VenueCard/index.d.ts +0 -8
  69. package/dist/components/cards/index.d.ts +0 -19
  70. package/dist/components/checkbox/Checkbox.d.ts +0 -22
  71. package/dist/components/checkbox/Checkbox.types.d.ts +0 -68
  72. package/dist/components/checkbox/checkbox-variants.d.ts +0 -13
  73. package/dist/components/checkbox/index.d.ts +0 -3
  74. package/dist/components/containers/Card.d.ts +0 -75
  75. package/dist/components/containers/Section.d.ts +0 -31
  76. package/dist/components/containers/Surface.d.ts +0 -28
  77. package/dist/components/containers/index.d.ts +0 -9
  78. package/dist/components/controls/LanguageSelector.d.ts +0 -17
  79. package/dist/components/data/List.d.ts +0 -12
  80. package/dist/components/data/Table.d.ts +0 -14
  81. package/dist/components/data/Timeline.d.ts +0 -13
  82. package/dist/components/data/data-list/DataList.d.ts +0 -29
  83. package/dist/components/data/data-list/DataList.types.d.ts +0 -43
  84. package/dist/components/data/data-list/DataListItem.d.ts +0 -20
  85. package/dist/components/data/data-list/DataListLabel.d.ts +0 -19
  86. package/dist/components/data/data-list/DataListValue.d.ts +0 -18
  87. package/dist/components/data/data-list/index.d.ts +0 -10
  88. package/dist/components/data/empty-state/EmptyState.d.ts +0 -31
  89. package/dist/components/data/empty-state/EmptyState.types.d.ts +0 -51
  90. package/dist/components/data/empty-state/EmptyStateAction.d.ts +0 -17
  91. package/dist/components/data/empty-state/EmptyStateDescription.d.ts +0 -17
  92. package/dist/components/data/empty-state/EmptyStateIcon.d.ts +0 -22
  93. package/dist/components/data/empty-state/EmptyStateTitle.d.ts +0 -17
  94. package/dist/components/data/empty-state/index.d.ts +0 -10
  95. package/dist/components/data/index.d.ts +0 -9
  96. package/dist/components/data/skeleton/Skeleton.d.ts +0 -24
  97. package/dist/components/data/skeleton/Skeleton.types.d.ts +0 -12
  98. package/dist/components/data/skeleton/index.d.ts +0 -6
  99. package/dist/components/data/table/Table.d.ts +0 -33
  100. package/dist/components/data/table/Table.types.d.ts +0 -264
  101. package/dist/components/data/table/TableBody.d.ts +0 -13
  102. package/dist/components/data/table/TableCell.d.ts +0 -13
  103. package/dist/components/data/table/TableEmpty.d.ts +0 -13
  104. package/dist/components/data/table/TableExpandableContent.d.ts +0 -14
  105. package/dist/components/data/table/TableHead.d.ts +0 -13
  106. package/dist/components/data/table/TableHeader.d.ts +0 -13
  107. package/dist/components/data/table/TableLoadingState.d.ts +0 -13
  108. package/dist/components/data/table/TableRow.d.ts +0 -13
  109. package/dist/components/data/table/TableSortIcon.d.ts +0 -14
  110. package/dist/components/data/table/index.d.ts +0 -17
  111. package/dist/components/drawer/Drawer.d.ts +0 -41
  112. package/dist/components/drawer/Drawer.types.d.ts +0 -75
  113. package/dist/components/drawer/drawer-variants.d.ts +0 -17
  114. package/dist/components/drawer/index.d.ts +0 -8
  115. package/dist/components/dropdown/Dropdown.d.ts +0 -38
  116. package/dist/components/dropdown/Dropdown.types.d.ts +0 -82
  117. package/dist/components/dropdown/dropdown-variants.d.ts +0 -33
  118. package/dist/components/feedback/ConsentBanner.d.ts +0 -8
  119. package/dist/components/feedback/Progress.d.ts +0 -8
  120. package/dist/components/feedback/Skeleton.d.ts +0 -6
  121. package/dist/components/filters/DateRangePicker.d.ts +0 -21
  122. package/dist/components/filters/FilterBar.d.ts +0 -55
  123. package/dist/components/filters/FilterSelect.d.ts +0 -23
  124. package/dist/components/filters/PriceRangeSlider.d.ts +0 -27
  125. package/dist/components/filters/SearchFilters.d.ts +0 -32
  126. package/dist/components/filters/SearchInput.d.ts +0 -16
  127. package/dist/components/filters/types.d.ts +0 -48
  128. package/dist/components/icon/Icon.d.ts +0 -32
  129. package/dist/components/icon/Icon.types.d.ts +0 -7
  130. package/dist/components/icon/index.d.ts +0 -4
  131. package/dist/components/icons/TrendingIcon.d.ts +0 -6
  132. package/dist/components/image/Image.d.ts +0 -48
  133. package/dist/components/input/Input.d.ts +0 -20
  134. package/dist/components/input/Input.types.d.ts +0 -38
  135. package/dist/components/input/index.d.ts +0 -3
  136. package/dist/components/input/input-variants.d.ts +0 -14
  137. package/dist/components/input/legacy/input.d.ts +0 -11
  138. package/dist/components/layout/Box.d.ts +0 -111
  139. package/dist/components/layout/Column.d.ts +0 -6
  140. package/dist/components/layout/Container.d.ts +0 -31
  141. package/dist/components/layout/Flex.d.ts +0 -50
  142. package/dist/components/layout/Footer.d.ts +0 -9
  143. package/dist/components/layout/Grid.d.ts +0 -60
  144. package/dist/components/layout/ModeHero.d.ts +0 -10
  145. package/dist/components/layout/Navbar.d.ts +0 -9
  146. package/dist/components/layout/Row.d.ts +0 -28
  147. package/dist/components/layout/Section.d.ts +0 -10
  148. package/dist/components/layout/Stack.d.ts +0 -38
  149. package/dist/components/layout/Surface.d.ts +0 -21
  150. package/dist/components/layout/index.d.ts +0 -22
  151. package/dist/components/layout/layout.types.d.ts +0 -107
  152. package/dist/components/menus/DropdownMenu.d.ts +0 -27
  153. package/dist/components/menus/NavigationMenu.d.ts +0 -12
  154. package/dist/components/menus/Tabs.d.ts +0 -7
  155. package/dist/components/menus/context-menu/ContextMenuContent.d.ts +0 -22
  156. package/dist/components/menus/context-menu/ContextMenuGroup.d.ts +0 -14
  157. package/dist/components/menus/context-menu/ContextMenuItem.d.ts +0 -14
  158. package/dist/components/menus/context-menu/ContextMenuLabel.d.ts +0 -14
  159. package/dist/components/menus/context-menu/ContextMenuRoot.d.ts +0 -47
  160. package/dist/components/menus/context-menu/ContextMenuSeparator.d.ts +0 -14
  161. package/dist/components/menus/context-menu/ContextMenuTrigger.d.ts +0 -16
  162. package/dist/components/menus/context-menu/index.d.ts +0 -12
  163. package/dist/components/menus/dropdown/DropdownMenuCheckItem.d.ts +0 -18
  164. package/dist/components/menus/dropdown/DropdownMenuContent.d.ts +0 -15
  165. package/dist/components/menus/dropdown/DropdownMenuGroup.d.ts +0 -12
  166. package/dist/components/menus/dropdown/DropdownMenuItem.d.ts +0 -30
  167. package/dist/components/menus/dropdown/DropdownMenuLabel.d.ts +0 -17
  168. package/dist/components/menus/dropdown/DropdownMenuRadioGroup.d.ts +0 -24
  169. package/dist/components/menus/dropdown/DropdownMenuRadioItem.d.ts +0 -18
  170. package/dist/components/menus/dropdown/DropdownMenuRoot.d.ts +0 -33
  171. package/dist/components/menus/dropdown/DropdownMenuSeparator.d.ts +0 -13
  172. package/dist/components/menus/dropdown/DropdownMenuSub.d.ts +0 -10
  173. package/dist/components/menus/dropdown/DropdownMenuSubContent.d.ts +0 -13
  174. package/dist/components/menus/dropdown/DropdownMenuSubTrigger.d.ts +0 -13
  175. package/dist/components/menus/dropdown/DropdownMenuTrigger.d.ts +0 -14
  176. package/dist/components/menus/dropdown/index.d.ts +0 -18
  177. package/dist/components/menus/hover-card/HoverCardContent.d.ts +0 -14
  178. package/dist/components/menus/hover-card/HoverCardRoot.d.ts +0 -20
  179. package/dist/components/menus/hover-card/HoverCardTrigger.d.ts +0 -13
  180. package/dist/components/menus/hover-card/index.d.ts +0 -8
  181. package/dist/components/menus/index.d.ts +0 -9
  182. package/dist/components/menus/popover/PopoverArrow.d.ts +0 -17
  183. package/dist/components/menus/popover/PopoverContent.d.ts +0 -24
  184. package/dist/components/menus/popover/PopoverRoot.d.ts +0 -43
  185. package/dist/components/menus/popover/PopoverTrigger.d.ts +0 -17
  186. package/dist/components/menus/popover/index.d.ts +0 -9
  187. package/dist/components/modal/Modal.d.ts +0 -70
  188. package/dist/components/modal/modal-variants.d.ts +0 -26
  189. package/dist/components/modals/ConfirmDialog.d.ts +0 -27
  190. package/dist/components/modals/CustomDialog.d.ts +0 -10
  191. package/dist/components/modals/Modal.d.ts +0 -19
  192. package/dist/components/modals/ModalProvider.d.ts +0 -16
  193. package/dist/components/modals/SimpleModal.d.ts +0 -11
  194. package/dist/components/navigation/Breadcrumbs.d.ts +0 -12
  195. package/dist/components/navigation/Pagination.d.ts +0 -10
  196. package/dist/components/navigation/breadcrumbs/Breadcrumbs.d.ts +0 -52
  197. package/dist/components/navigation/breadcrumbs/index.d.ts +0 -5
  198. package/dist/components/navigation/index.d.ts +0 -10
  199. package/dist/components/navigation/pagination/Pagination.d.ts +0 -60
  200. package/dist/components/navigation/pagination/index.d.ts +0 -5
  201. package/dist/components/navigation/segmented-control/SegmentedControl.d.ts +0 -43
  202. package/dist/components/navigation/segmented-control/index.d.ts +0 -5
  203. package/dist/components/navigation/stepper/Stepper.d.ts +0 -129
  204. package/dist/components/navigation/stepper/index.d.ts +0 -5
  205. package/dist/components/navigation/tabs/Tabs.d.ts +0 -73
  206. package/dist/components/navigation/tabs/index.d.ts +0 -5
  207. package/dist/components/notifications/NotificationCenter.DismissAll.d.ts +0 -21
  208. package/dist/components/notifications/NotificationCenter.GroupHeader.d.ts +0 -23
  209. package/dist/components/notifications/NotificationCenter.Item.d.ts +0 -24
  210. package/dist/components/notifications/NotificationCenter.List.d.ts +0 -22
  211. package/dist/components/notifications/NotificationCenter.Panel.d.ts +0 -32
  212. package/dist/components/notifications/NotificationCenter.Provider.d.ts +0 -31
  213. package/dist/components/notifications/NotificationCenter.Trigger.d.ts +0 -15
  214. package/dist/components/notifications/NotificationCenter.d.ts +0 -27
  215. package/dist/components/notifications/NotificationCenter.types.d.ts +0 -89
  216. package/dist/components/notifications/index.d.ts +0 -23
  217. package/dist/components/notifications/useNotificationCenter.d.ts +0 -47
  218. package/dist/components/overlays/Backdrop.d.ts +0 -24
  219. package/dist/components/overlays/Dialog.d.ts +0 -66
  220. package/dist/components/overlays/Modal.d.ts +0 -60
  221. package/dist/components/overlays/OverlayPortal.d.ts +0 -22
  222. package/dist/components/overlays/Popover.d.ts +0 -30
  223. package/dist/components/overlays/Portal.d.ts +0 -29
  224. package/dist/components/overlays/Toast.d.ts +0 -36
  225. package/dist/components/overlays/ToastProvider.d.ts +0 -58
  226. package/dist/components/overlays/ToastViewport.d.ts +0 -27
  227. package/dist/components/overlays/Tooltip.d.ts +0 -28
  228. package/dist/components/overlays/index.d.ts +0 -13
  229. package/dist/components/overlays/utils/FocusLock.d.ts +0 -30
  230. package/dist/components/overlays/utils/ScrollLock.d.ts +0 -11
  231. package/dist/components/overlays/utils/positioning.d.ts +0 -68
  232. package/dist/components/primitives/Badge.d.ts +0 -9
  233. package/dist/components/primitives/Button.d.ts +0 -1
  234. package/dist/components/primitives/Card.d.ts +0 -1
  235. package/dist/components/primitives/Divider.d.ts +0 -7
  236. package/dist/components/primitives/Input.d.ts +0 -4
  237. package/dist/components/primitives/Label.d.ts +0 -1
  238. package/dist/components/primitives/Link.d.ts +0 -13
  239. package/dist/components/primitives/ThemeSwitch.d.ts +0 -9
  240. package/dist/components/radio/Radio.d.ts +0 -23
  241. package/dist/components/radio/Radio.types.d.ts +0 -63
  242. package/dist/components/radio/RadioGroup.d.ts +0 -20
  243. package/dist/components/radio/RadioGroup.types.d.ts +0 -61
  244. package/dist/components/radio/index.d.ts +0 -5
  245. package/dist/components/radio/radio-variants.d.ts +0 -13
  246. package/dist/components/search/SearchBar.d.ts +0 -10
  247. package/dist/components/sections/ArticlesSection.d.ts +0 -25
  248. package/dist/components/sections/CTASection.d.ts +0 -37
  249. package/dist/components/sections/FeatureSection.d.ts +0 -33
  250. package/dist/components/sections/HeroSection.d.ts +0 -27
  251. package/dist/components/sections/TrendingSection.d.ts +0 -28
  252. package/dist/components/select/Select.d.ts +0 -38
  253. package/dist/components/select/Select.types.d.ts +0 -107
  254. package/dist/components/select/index.d.ts +0 -5
  255. package/dist/components/select/legacy/select.d.ts +0 -11
  256. package/dist/components/select/select-variants.d.ts +0 -32
  257. package/dist/components/skeletons/EventCardSkeleton.d.ts +0 -6
  258. package/dist/components/skeletons/VenueCardSkeleton.d.ts +0 -6
  259. package/dist/components/switch/Switch.d.ts +0 -24
  260. package/dist/components/switch/Switch.types.d.ts +0 -53
  261. package/dist/components/switch/index.d.ts +0 -3
  262. package/dist/components/switch/switch-variants.d.ts +0 -34
  263. package/dist/components/textarea/Textarea.d.ts +0 -21
  264. package/dist/components/textarea/Textarea.types.d.ts +0 -40
  265. package/dist/components/textarea/index.d.ts +0 -3
  266. package/dist/components/textarea/legacy/textarea.d.ts +0 -11
  267. package/dist/components/textarea/textarea-variants.d.ts +0 -14
  268. package/dist/components/toasts/Toast.d.ts +0 -12
  269. package/dist/components/toasts/ToastProvider.d.ts +0 -26
  270. package/dist/components/ui/alert.d.ts +0 -9
  271. package/dist/components/ui/body.d.ts +0 -12
  272. package/dist/components/ui/button.d.ts +0 -13
  273. package/dist/components/ui/caption.d.ts +0 -11
  274. package/dist/components/ui/card.d.ts +0 -8
  275. package/dist/components/ui/code.d.ts +0 -11
  276. package/dist/components/ui/dialog.d.ts +0 -19
  277. package/dist/components/ui/display.d.ts +0 -12
  278. package/dist/components/ui/field.d.ts +0 -45
  279. package/dist/components/ui/heading.d.ts +0 -12
  280. package/dist/components/ui/label.d.ts +0 -12
  281. package/dist/components/ui/lead.d.ts +0 -11
  282. package/dist/components/ui/text.d.ts +0 -18
  283. package/dist/components/ui/toast.d.ts +0 -15
  284. package/dist/components/ui/toaster.d.ts +0 -1
  285. package/dist/components/ui/tooltip.d.ts +0 -7
  286. package/dist/dark-Cvoy1uFT.js +0 -30
  287. package/dist/dark-OOhiqt1q.cjs +0 -2
  288. package/dist/default-BKgH1D9-.js +0 -8
  289. package/dist/default-Ddg7Haf2.cjs +0 -2
  290. package/dist/hooks/use-toast.d.ts +0 -44
  291. package/dist/hooks/useDebounce.d.ts +0 -19
  292. package/dist/hooks/useModal.d.ts +0 -19
  293. package/dist/hooks/useToast.d.ts +0 -26
  294. package/dist/icons/IconArrowRight.d.ts +0 -6
  295. package/dist/icons/IconCalendar.d.ts +0 -6
  296. package/dist/icons/IconCheck.d.ts +0 -6
  297. package/dist/icons/IconChevronDown.d.ts +0 -6
  298. package/dist/icons/IconChevronRight.d.ts +0 -6
  299. package/dist/icons/IconClose.d.ts +0 -6
  300. package/dist/icons/IconError.d.ts +0 -6
  301. package/dist/icons/IconInfo.d.ts +0 -6
  302. package/dist/icons/IconLocation.d.ts +0 -6
  303. package/dist/icons/IconMenu.d.ts +0 -6
  304. package/dist/icons/IconSearch.d.ts +0 -6
  305. package/dist/icons/IconSuccess.d.ts +0 -6
  306. package/dist/icons/IconWarning.d.ts +0 -6
  307. package/dist/icons/icon.types.d.ts +0 -25
  308. package/dist/icons/index.d.ts +0 -34
  309. package/dist/lib/a11y.d.ts +0 -15
  310. package/dist/lib/responsive-props.d.ts +0 -63
  311. package/dist/lib/utils.d.ts +0 -8
  312. package/dist/motion-CzQhSEqk.js +0 -738
  313. package/dist/motion-DJx1TbXJ.cjs +0 -2
  314. package/dist/theme/ThemeProvider.d.ts +0 -55
  315. package/dist/theme/applyMode.d.ts +0 -42
  316. package/dist/theme/colors.d.ts +0 -6
  317. package/dist/theme/loader.d.ts +0 -63
  318. package/dist/theme/motion/gestures.d.ts +0 -76
  319. package/dist/theme/motion/useReducedMotion.d.ts +0 -11
  320. package/dist/theme/motion.d.ts +0 -127
  321. package/dist/theme/registry.d.ts +0 -70
  322. package/dist/theme/schema.d.ts +0 -124
  323. package/dist/theme/spacing.d.ts +0 -34
  324. package/dist/theme/typography.d.ts +0 -45
  325. package/dist/themes/brand.d.ts +0 -6
  326. package/dist/themes/brand_engine.d.ts +0 -108
  327. package/dist/themes/dark.d.ts +0 -6
  328. package/dist/themes/default.d.ts +0 -6
  329. package/dist/themes/index.d.ts +0 -24
  330. package/dist/themes/minimal.d.ts +0 -6
  331. package/dist/themes/neon.d.ts +0 -6
  332. package/dist/themes/types.d.ts +0 -278
  333. package/dist/tokens/components/alert.d.ts +0 -74
  334. package/dist/tokens/components/button.d.ts +0 -130
  335. package/dist/tokens/components/card.d.ts +0 -91
  336. package/dist/tokens/components/checkbox.d.ts +0 -161
  337. package/dist/tokens/components/data.d.ts +0 -227
  338. package/dist/tokens/components/domain.d.ts +0 -379
  339. package/dist/tokens/components/dropdown.d.ts +0 -146
  340. package/dist/tokens/components/icon.d.ts +0 -57
  341. package/dist/tokens/components/index.d.ts +0 -31
  342. package/dist/tokens/components/input.d.ts +0 -284
  343. package/dist/tokens/components/menu.d.ts +0 -114
  344. package/dist/tokens/components/motion.d.ts +0 -103
  345. package/dist/tokens/components/navigation.d.ts +0 -181
  346. package/dist/tokens/components/notifications.d.ts +0 -159
  347. package/dist/tokens/components/overlay.d.ts +0 -227
  348. package/dist/tokens/components/popover.d.ts +0 -84
  349. package/dist/tokens/components/radio.d.ts +0 -149
  350. package/dist/tokens/components/section.d.ts +0 -41
  351. package/dist/tokens/components/surface.d.ts +0 -94
  352. package/dist/tokens/components/switch.d.ts +0 -208
  353. package/dist/tokens/components/text.d.ts +0 -68
  354. package/dist/tokens/components/toast.d.ts +0 -146
  355. package/dist/tokens/components/tooltip.d.ts +0 -52
  356. package/dist/tokens/css-variables.d.ts +0 -251
  357. package/dist/tokens/motion/v2.d.ts +0 -342
  358. package/dist/tokens/motion.d.ts +0 -485
  359. package/dist/tokens/opacity.d.ts +0 -22
  360. package/dist/tokens/radius.d.ts +0 -161
  361. package/dist/tokens/shadows.d.ts +0 -230
  362. package/dist/tokens/spacing.d.ts +0 -238
  363. package/dist/tokens/theme.d.ts +0 -119
  364. package/dist/tokens/typography.d.ts +0 -460
  365. package/dist/typography-C-Nb4y0o.cjs +0 -2
  366. package/dist/typography-DHym9KAP.js +0 -1196
@@ -1,2 +1,2647 @@
1
- "use client";
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../motion-DJx1TbXJ.cjs"),ge=require("react/jsx-runtime"),p=require("react"),fe={id:"minimal",name:"Minimal",description:"Clean, minimal brand theme with muted colors, light typography, and compact spacing",namespace:"minimal",version:"1.0.0",author:"Tenerife UI",themes:[{id:"minimal-day",name:"Minimal Day",description:"Light minimal theme with grayscale colors and subtle accents",mode:"day",overrides:{name:"minimal-day",description:"Light minimal theme for day mode",primaryColors:{400:"0 0% 60%",500:"0 0% 50%",600:"0 0% 40%",700:"0 0% 30%"},accentColors:{400:"210 20% 70%",500:"210 20% 60%",600:"210 20% 50%",700:"210 20% 40%"},secondaryColors:{400:"0 0% 70%",500:"0 0% 65%",600:"0 0% 55%",700:"0 0% 45%"},baseColorsDay:{primary:"0 0% 50%",primaryForeground:"0 0% 100%",secondary:"0 0% 96%",secondaryForeground:"0 0% 20%",accent:"210 20% 60%",accentForeground:"0 0% 100%"},semanticColorsDay:{success:"140 30% 45%",info:"210 30% 50%",warning:"40 30% 50%",error:"0 40% 55%"},typography:{fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontSize:{xs:["clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",{lineHeight:"1rem",letterSpacing:"0.05em"}],sm:["clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],base:["clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],lg:["clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}]}},spacing:{semanticSpacing:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem"}},shadows:{elevationShadows:{xs:"0 1px 1px 0 rgb(0 0 0 / 0.03)",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05), 0 1px 1px -1px rgb(0 0 0 / 0.05)",md:"0 2px 4px -1px rgb(0 0 0 / 0.05), 0 1px 2px -2px rgb(0 0 0 / 0.05)",lg:"0 4px 8px -2px rgb(0 0 0 / 0.05), 0 2px 4px -3px rgb(0 0 0 / 0.05)",xl:"0 8px 12px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)"},glowEffects:{"glow-primary":"0 0 8px 0 hsl(0 0% 50% / 0.2)","glow-primary-subtle":"0 0 4px 0 hsl(0 0% 50% / 0.15)","glow-primary-medium":"0 0 8px 0 hsl(0 0% 50% / 0.25)","glow-primary-strong":"0 0 12px 0 hsl(0 0% 50% / 0.3)"}},radius:{borderRadius:{xs:"0.0625rem",sm:"0.125rem",md:"0.1875rem",lg:"0.25rem",xl:"0.375rem","2xl":"0.5rem"},componentRadius:{button:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},card:{sm:"0.1875rem",md:"0.25rem",lg:"0.375rem",xl:"0.5rem"},input:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},badge:{sm:"0.0625rem",md:"0.125rem",lg:"0.1875rem"}}}}},{id:"minimal-night",name:"Minimal Night",description:"Dark minimal theme with muted grayscale colors",mode:"night",overrides:{name:"minimal-night",description:"Dark minimal theme for night mode",primaryColors:{400:"0 0% 65%",500:"0 0% 55%",600:"0 0% 45%",700:"0 0% 35%"},accentColors:{400:"210 20% 75%",500:"210 20% 65%",600:"210 20% 55%",700:"210 20% 45%"},secondaryColors:{400:"0 0% 75%",500:"0 0% 70%",600:"0 0% 60%",700:"0 0% 50%"},baseColorsNight:{background:"240 10% 8%",foreground:"0 0% 95%",card:"240 10% 10%",cardForeground:"0 0% 95%"},surfaceColorsNight:{base:"240 10% 8%",elevated1:"240 10% 10%",elevated2:"240 10% 12%",elevated3:"240 10% 14%"},semanticColorsNight:{success:"140 30% 50%",info:"210 30% 55%",warning:"40 30% 55%",error:"0 40% 60%"},typography:{fontWeight:{normal:"400",medium:"500",semibold:"600",bold:"700"},fontSize:{xs:["clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",{lineHeight:"1rem",letterSpacing:"0.05em"}],sm:["clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],base:["clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],lg:["clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}]}},spacing:{semanticSpacing:{xs:"0.125rem",sm:"0.25rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem"}},shadows:{elevationShadows:{xs:"0 1px 2px 0 rgb(0 0 0 / 0.15)",sm:"0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2)",md:"0 2px 5px -1px rgb(0 0 0 / 0.2), 0 1px 3px -2px rgb(0 0 0 / 0.2)",lg:"0 4px 10px -2px rgb(0 0 0 / 0.2), 0 2px 5px -3px rgb(0 0 0 / 0.2)",xl:"0 8px 15px -3px rgb(0 0 0 / 0.2), 0 4px 8px -4px rgb(0 0 0 / 0.2)"},glowEffects:{"glow-primary":"0 0 8px 0 hsl(0 0% 55% / 0.25)","glow-primary-subtle":"0 0 4px 0 hsl(0 0% 55% / 0.2)","glow-primary-medium":"0 0 8px 0 hsl(0 0% 55% / 0.3)","glow-primary-strong":"0 0 12px 0 hsl(0 0% 55% / 0.35)"}},radius:{borderRadius:{xs:"0.0625rem",sm:"0.125rem",md:"0.1875rem",lg:"0.25rem",xl:"0.375rem","2xl":"0.5rem"},componentRadius:{button:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},card:{sm:"0.1875rem",md:"0.25rem",lg:"0.375rem",xl:"0.5rem"},input:{sm:"0.125rem",md:"0.1875rem",lg:"0.25rem"},badge:{sm:"0.0625rem",md:"0.125rem",lg:"0.1875rem"}}}}}]},he={id:"neon",name:"Neon",description:"Vibrant brand theme with high-saturation neon colors, bold typography, and enhanced visual effects",namespace:"neon",version:"1.0.0",author:"Tenerife UI",themes:[{id:"neon-day",name:"Neon Day",description:"Bright neon theme for day mode with vibrant cyan, magenta, and yellow accents",mode:"day",overrides:{name:"neon-day",description:"Bright neon theme for day mode",primaryColors:{400:"180 100% 50%",500:"180 100% 45%",600:"180 95% 40%",700:"180 90% 35%"},accentColors:{400:"320 100% 60%",500:"320 100% 55%",600:"320 95% 50%",700:"320 90% 45%"},secondaryColors:{400:"60 100% 60%",500:"60 100% 55%",600:"60 95% 50%",700:"60 90% 45%"},baseColorsDay:{primary:"180 100% 45%",primaryForeground:"0 0% 100%",accent:"320 100% 55%",accentForeground:"0 0% 100%"},semanticColorsDay:{success:"145 80% 45%",info:"180 100% 45%",warning:"60 100% 55%",error:"0 100% 60%"},typography:{fontWeight:{normal:"500",medium:"600",semibold:"700",bold:"800"},fontSize:{xs:["clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],sm:["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],base:["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],lg:["clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",{lineHeight:"2rem",letterSpacing:"-0.05em"}]}},spacing:{semanticSpacing:{xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"3rem","2xl":"4rem"}},shadows:{elevationShadows:{xs:"0 2px 4px 0 rgb(0 0 0 / 0.1)",sm:"0 2px 6px 0 rgb(0 0 0 / 0.15), 0 2px 4px -1px rgb(0 0 0 / 0.15)",md:"0 6px 10px -1px rgb(0 0 0 / 0.15), 0 4px 6px -2px rgb(0 0 0 / 0.15)",lg:"0 12px 20px -3px rgb(0 0 0 / 0.15), 0 6px 10px -4px rgb(0 0 0 / 0.15)",xl:"0 24px 32px -5px rgb(0 0 0 / 0.15), 0 10px 14px -6px rgb(0 0 0 / 0.15)"},glowEffects:{"glow-primary":"0 0 30px 0 hsl(180 100% 45% / 0.7), 0 0 60px 0 hsl(180 100% 45% / 0.4)","glow-primary-subtle":"0 0 12px 0 hsl(180 100% 45% / 0.5)","glow-primary-medium":"0 0 24px 0 hsl(180 100% 45% / 0.7)","glow-primary-strong":"0 0 36px 0 hsl(180 100% 45% / 0.8)","glow-accent":"0 0 30px 0 hsl(320 100% 55% / 0.7), 0 0 60px 0 hsl(320 100% 55% / 0.4)","glow-accent-subtle":"0 0 12px 0 hsl(320 100% 55% / 0.5)","glow-accent-medium":"0 0 24px 0 hsl(320 100% 55% / 0.7)","glow-accent-strong":"0 0 36px 0 hsl(320 100% 55% / 0.8)"}},radius:{borderRadius:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem","3xl":"2rem"},componentRadius:{button:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},card:{sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},input:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},badge:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem"}}}}},{id:"neon-night",name:"Neon Night",description:"Dark neon theme for night mode with glowing neon accents on dark backgrounds",mode:"night",overrides:{name:"neon-night",description:"Dark neon theme for night mode",primaryColors:{400:"180 100% 55%",500:"180 100% 50%",600:"180 95% 45%",700:"180 90% 40%"},accentColors:{400:"320 100% 65%",500:"320 100% 60%",600:"320 95% 55%",700:"320 90% 50%"},secondaryColors:{400:"60 100% 65%",500:"60 100% 60%",600:"60 95% 55%",700:"60 90% 50%"},baseColorsNight:{background:"240 10% 5%",foreground:"0 0% 98%",card:"240 10% 6%",cardForeground:"0 0% 98%"},surfaceColorsNight:{base:"240 10% 5%",elevated1:"240 10% 7%",elevated2:"240 10% 9%",elevated3:"240 10% 11%"},semanticColorsNight:{success:"145 75% 50%",info:"180 100% 50%",warning:"60 100% 60%",error:"0 100% 65%"},typography:{fontWeight:{normal:"500",medium:"600",semibold:"700",bold:"800"},fontSize:{xs:["clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",{lineHeight:"1.25rem",letterSpacing:"0.025em"}],sm:["clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",{lineHeight:"1.5rem",letterSpacing:"0em"}],base:["clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],lg:["clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",{lineHeight:"1.75rem",letterSpacing:"-0.025em"}],xl:["clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",{lineHeight:"2rem",letterSpacing:"-0.05em"}]}},spacing:{semanticSpacing:{xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"3rem","2xl":"4rem"}},shadows:{elevationShadows:{xs:"0 2px 4px 0 rgb(0 0 0 / 0.2)",sm:"0 2px 6px 0 rgb(0 0 0 / 0.25), 0 2px 4px -1px rgb(0 0 0 / 0.25)",md:"0 6px 10px -1px rgb(0 0 0 / 0.25), 0 4px 6px -2px rgb(0 0 0 / 0.25)",lg:"0 12px 20px -3px rgb(0 0 0 / 0.25), 0 6px 10px -4px rgb(0 0 0 / 0.25)",xl:"0 24px 32px -5px rgb(0 0 0 / 0.25), 0 10px 14px -6px rgb(0 0 0 / 0.25)"},glowEffects:{"glow-primary":"0 0 40px 0 hsl(180 100% 50% / 0.8), 0 0 80px 0 hsl(180 100% 50% / 0.5)","glow-primary-subtle":"0 0 16px 0 hsl(180 100% 50% / 0.6)","glow-primary-medium":"0 0 32px 0 hsl(180 100% 50% / 0.8)","glow-primary-strong":"0 0 48px 0 hsl(180 100% 50% / 0.9)","glow-accent":"0 0 40px 0 hsl(320 100% 60% / 0.8), 0 0 80px 0 hsl(320 100% 60% / 0.5)","glow-accent-subtle":"0 0 16px 0 hsl(320 100% 60% / 0.6)","glow-accent-medium":"0 0 32px 0 hsl(320 100% 60% / 0.8)","glow-accent-strong":"0 0 48px 0 hsl(320 100% 60% / 0.9)"}},radius:{borderRadius:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem",xl:"1rem","2xl":"1.5rem","3xl":"2rem"},componentRadius:{button:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},card:{sm:"0.75rem",md:"1rem",lg:"1.25rem",xl:"1.5rem"},input:{sm:"0.5rem",md:"0.75rem",lg:"1rem"},badge:{sm:"0.375rem",md:"0.5rem",lg:"0.75rem"}}}}}]},S=new Map;let N=null,q=null;const R=new Map;function re(r){const e=[],s=[];if(!r||typeof r!="object")return{valid:!1,errors:["Brand must be an object"],warnings:[]};const t=r,n=["id","name","namespace"];for(const o of n)(!(o in t)||!t[o])&&e.push(`Missing required field: ${o}`);if(t.id&&typeof t.id=="string"&&(/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(t.id)||e.push(`Invalid brand ID format: "${t.id}". Must be kebab-case (e.g., "neon-brand")`)),t.namespace&&typeof t.namespace=="string"&&(/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(t.namespace)||e.push(`Invalid namespace format: "${t.namespace}". Must be kebab-case (e.g., "neon")`)),t.themes)if(!Array.isArray(t.themes))e.push("Brand themes must be an array");else{const o=t.themes;o.length===0&&s.push("Brand has no themes defined"),o.forEach((m,i)=>{if(!m||typeof m!="object"){e.push(`Theme at index ${i} must be an object`);return}const a=m;(!a.id||typeof a.id!="string")&&e.push(`Theme at index ${i} is missing required field: id`),(!a.name||typeof a.name!="string")&&e.push(`Theme at index ${i} is missing required field: name`),(!a.mode||!["day","night"].includes(a.mode))&&e.push(`Theme at index ${i} must have mode set to "day" or "night"`),(!a.overrides||typeof a.overrides!="object")&&e.push(`Theme at index ${i} is missing required field: overrides`)})}else e.push("Brand must have at least one theme");if(t.version&&typeof t.version=="string"&&(/^\d+\.\d+\.\d+$/.test(t.version)||s.push(`Invalid version format: "${t.version}". Should be semver (e.g., "1.0.0")`)),t.themes&&Array.isArray(t.themes)){const o=t.themes.map(i=>i==null?void 0:i.id),m=new Set(o);o.length!==m.size&&e.push("Brand contains duplicate theme IDs")}return{valid:e.length===0,errors:e,warnings:s}}function K(r,e){const s=re(r);if(!s.valid)throw new Error(`Invalid brand "${r.id}": ${s.errors.join(", ")}`);s.warnings.length>0&&console.warn(`Brand "${r.id}" validation warnings:`,s.warnings.join(", "));const t=S.get(r.id);if(t&&t.brand.namespace===r.namespace)return;if(S.has(r.id))throw new Error(`Brand "${r.id}" is already registered`);const n=Array.from(S.values()).find(o=>o.brand.namespace===r.namespace);if(n)throw new Error(`Brand namespace "${r.namespace}" is already used by brand "${n.brand.id}"`);S.set(r.id,{brand:r,enabled:(e==null?void 0:e.enabled)!==!1,loader:e==null?void 0:e.loader})}async function te(r){if(R.has(r))return R.get(r);const e=S.get(r);if(!e)throw new Error(`Brand "${r}" not found in registry`);if(e.enabled===!1)throw new Error(`Brand "${r}" is disabled`);if(e.loader)try{const t=(await e.loader()).default,n=re(t);if(!n.valid)throw new Error(`Invalid loaded brand "${r}": ${n.errors.join(", ")}`);return R.set(r,t),t}catch(s){throw new Error(`Failed to load brand "${r}": ${s instanceof Error?s.message:String(s)}`)}return R.set(r,e.brand),e.brand}function oe(){return N}function O(r){N=r,q=(r==null?void 0:r.namespace)||null}function be(){N=null,q=null}function xe(r,e){return r.themes.find(s=>s.mode===e)}function ne(r,e){if(typeof document>"u")return;const s=xe(r,e);if(!s){console.warn(`Brand "${r.id}" has no theme for mode "${e}"`);return}const t=document.documentElement,{namespace:n}=r,{overrides:o}=s;o.primaryColors&&Object.entries(o.primaryColors).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-primary-${i}`,a)}),o.accentColors&&Object.entries(o.accentColors).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-accent-${i}`,a)}),o.secondaryColors&&Object.entries(o.secondaryColors).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-secondary-${i}`,a)});const m=e==="day"?o.baseColorsDay:o.baseColorsNight;if(m&&Object.entries(m).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-${i}`,a)}),o.typography&&(o.typography.fontFamily&&Object.entries(o.typography.fontFamily).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-font-${i}`,Array.isArray(a)?a.join(", "):a)}),o.typography.fontSize&&Object.entries(o.typography.fontSize).forEach(([i,a])=>{const c=typeof a=="string"?a:a[0];t.style.setProperty(`--brand-${n}-font-size-${i}`,c)}),o.typography.fontWeight&&Object.entries(o.typography.fontWeight).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-font-weight-${i}`,a)}),o.typography.lineHeight&&Object.entries(o.typography.lineHeight).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-line-height-${i}`,a)}),o.typography.letterSpacing&&Object.entries(o.typography.letterSpacing).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-letter-spacing-${i}`,a)})),o.spacing&&(o.spacing.semanticSpacing&&Object.entries(o.spacing.semanticSpacing).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-spacing-${i}`,a)}),o.spacing.layoutSpacing)){const i=o.spacing.layoutSpacing;i.section&&Object.entries(i.section).forEach(([a,c])=>{typeof c=="string"&&t.style.setProperty(`--brand-${n}-layout-section-${a}`,c)}),i.container&&Object.entries(i.container).forEach(([a,c])=>{typeof c=="string"&&t.style.setProperty(`--brand-${n}-layout-container-${a}`,c)}),i.grid&&Object.entries(i.grid).forEach(([a,c])=>{typeof c=="string"&&t.style.setProperty(`--brand-${n}-layout-grid-${a}`,c)}),i.stack&&Object.entries(i.stack).forEach(([a,c])=>{typeof c=="string"&&t.style.setProperty(`--brand-${n}-layout-stack-${a}`,c)}),i.component&&Object.entries(i.component).forEach(([a,c])=>{typeof c=="string"&&t.style.setProperty(`--brand-${n}-layout-component-${a}`,c)})}if(o.shadows&&(o.shadows.elevationShadows&&Object.entries(o.shadows.elevationShadows).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-shadow-${i}`,a)}),o.shadows.primaryColoredShadows&&Object.entries(o.shadows.primaryColoredShadows).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-shadow-primary-${i}`,a)}),o.shadows.accentColoredShadows&&Object.entries(o.shadows.accentColoredShadows).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-shadow-accent-${i}`,a)}),o.shadows.glowEffects&&Object.entries(o.shadows.glowEffects).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-glow-${i}`,a)}),o.shadows.focusRings&&Object.entries(o.shadows.focusRings).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-focus-ring-${i}`,a)})),o.radius&&(o.radius.borderRadius&&Object.entries(o.radius.borderRadius).forEach(([i,a])=>{t.style.setProperty(`--brand-${n}-radius-${i}`,a)}),o.radius.componentRadius)){const{componentRadius:i}=o.radius;i.button&&Object.entries(i.button).forEach(([a,c])=>{t.style.setProperty(`--brand-${n}-radius-button-${a}`,c)}),i.card&&Object.entries(i.card).forEach(([a,c])=>{t.style.setProperty(`--brand-${n}-radius-card-${a}`,c)}),i.input&&Object.entries(i.input).forEach(([a,c])=>{t.style.setProperty(`--brand-${n}-radius-input-${a}`,c)})}O(r),t.setAttribute("data-brand",r.id),t.setAttribute("data-brand-namespace",n)}function se(r){if(typeof document>"u")return;const e=document.documentElement,{style:s}=e,t=[];for(let n=0;n<s.length;n++){const o=s.item(n);o&&o.startsWith(`--brand-${r}-`)&&t.push(o)}t.forEach(n=>{s.removeProperty(n)}),e.removeAttribute("data-brand"),e.removeAttribute("data-brand-namespace"),q===r&&be()}const we={default:()=>Promise.resolve().then(()=>require("../default-Ddg7Haf2.cjs")).then(r=>r.defaultTheme),dark:()=>Promise.resolve().then(()=>require("../dark-OOhiqt1q.cjs")).then(r=>r.darkTheme),brand:()=>Promise.resolve().then(()=>require("../brand-DQb18Frh.cjs")).then(r=>r.brandTheme)};async function ve(r){const e=we[r];if(!e)throw new Error(`Theme "${r}" not found`);return await e()}const ae="data-mode",L="data-theme-name",ie="data-theme",ee="dark";function le(r="day",e="tm_mode",s=!0){if(typeof window>"u")return r;const t=document.documentElement,n=t.getAttribute(ae);if(n==="day"||n==="night")return n;const o=t.getAttribute(ie);if(o==="day"||o==="night")return o;try{const m=localStorage.getItem(e);if(m==="day"||m==="night")return m;const i=localStorage.getItem("theme");if(i==="dark")return"night";if(i==="light")return"day"}catch{}return s&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day":r}let B=null;async function ce(r){if(r==="default")return B=null,null;try{const e=await ve(r);return B=e,e}catch(e){return console.warn(`Failed to load theme "${r}":`,e),B=null,null}}function M(r,e){return e?{...r,...e}:r}function v(r,e){return e?{...r,...e}:r}function me(r){const e=B,s=M(f.primaryColors,e==null?void 0:e.primaryColors),t=M(f.accentColors,e==null?void 0:e.accentColors),n=M(f.secondaryColors,e==null?void 0:e.secondaryColors),o={day:v(f.baseColors.day,e==null?void 0:e.baseColorsDay),night:v(f.baseColors.night,e==null?void 0:e.baseColorsNight)},m={day:v(f.surfaceColors.day,e==null?void 0:e.surfaceColorsDay),night:v(f.surfaceColors.night,e==null?void 0:e.surfaceColorsNight)},i={day:v(f.semanticColors.day,e==null?void 0:e.semanticColorsDay),night:v(f.semanticColors.night,e==null?void 0:e.semanticColorsNight)},a={day:v(f.textColors.day,e==null?void 0:e.textColorsDay),night:v(f.textColors.night,e==null?void 0:e.textColorsNight)},c={day:f.chartColors.day,night:f.chartColors.night};return{primaryColors:s,accentColors:t,secondaryColors:n,baseColors:o,surfaceColors:m,semanticColors:i,textColors:a,chartColors:c}}function Pe(r){if(typeof document>"u")return;const e=document.documentElement,s=me(),{primaryColors:t,accentColors:n,secondaryColors:o,baseColors:m,surfaceColors:i,semanticColors:a,textColors:c,chartColors:x}=s,d=m[r];e.style.setProperty("--background",d.background),e.style.setProperty("--foreground",d.foreground),e.style.setProperty("--card",d.card),e.style.setProperty("--card-foreground",d.cardForeground),e.style.setProperty("--popover",d.popover),e.style.setProperty("--popover-foreground",d.popoverForeground),e.style.setProperty("--border",d.border),e.style.setProperty("--input",d.input),e.style.setProperty("--ring",d.ring);const b=i[r];e.style.setProperty("--surface-base",b.base),e.style.setProperty("--surface-elevated1",b.elevated1),e.style.setProperty("--surface-elevated2",b.elevated2),e.style.setProperty("--surface-elevated3",b.elevated3),e.style.setProperty("--surface-overlay",b.overlay),e.style.setProperty("--surface-glass",b.glass);const u=a[r];e.style.setProperty("--semantic-success",u.success),e.style.setProperty("--semantic-success-foreground",u.successForeground),e.style.setProperty("--semantic-error",u.error),e.style.setProperty("--semantic-error-foreground",u.errorForeground),e.style.setProperty("--semantic-warning",u.warning),e.style.setProperty("--semantic-warning-foreground",u.warningForeground),e.style.setProperty("--semantic-info",u.info),e.style.setProperty("--semantic-info-foreground",u.infoForeground);const w=c[r];e.style.setProperty("--text-primary",w.primary),e.style.setProperty("--text-secondary",w.secondary),e.style.setProperty("--text-tertiary",w.tertiary),e.style.setProperty("--text-muted",w.muted),e.style.setProperty("--text-inverse",w.inverse);const h=x[r];e.style.setProperty("--chart-1",h.chart1),e.style.setProperty("--chart-2",h.chart2),e.style.setProperty("--chart-3",h.chart3),e.style.setProperty("--chart-4",h.chart4),e.style.setProperty("--chart-5",h.chart5),e.style.setProperty("--primary-50",t[50]),e.style.setProperty("--primary-100",t[100]),e.style.setProperty("--primary-200",t[200]),e.style.setProperty("--primary-300",t[300]),e.style.setProperty("--primary-400",t[400]),e.style.setProperty("--primary-500",t[500]),e.style.setProperty("--primary-600",t[600]),e.style.setProperty("--primary-700",t[700]),e.style.setProperty("--primary-800",t[800]),e.style.setProperty("--primary-900",t[900]),e.style.setProperty("--primary-950",t[950]),e.style.setProperty("--accent-50",n[50]),e.style.setProperty("--accent-100",n[100]),e.style.setProperty("--accent-200",n[200]),e.style.setProperty("--accent-300",n[300]),e.style.setProperty("--accent-400",n[400]),e.style.setProperty("--accent-500",n[500]),e.style.setProperty("--accent-600",n[600]),e.style.setProperty("--accent-700",n[700]),e.style.setProperty("--accent-800",n[800]),e.style.setProperty("--accent-900",n[900]),e.style.setProperty("--accent-950",n[950]),e.style.setProperty("--secondary-50",o[50]),e.style.setProperty("--secondary-100",o[100]),e.style.setProperty("--secondary-200",o[200]),e.style.setProperty("--secondary-300",o[300]),e.style.setProperty("--secondary-400",o[400]),e.style.setProperty("--secondary-500",o[500]),e.style.setProperty("--secondary-600",o[600]),e.style.setProperty("--secondary-700",o[700]),e.style.setProperty("--secondary-800",o[800]),e.style.setProperty("--secondary-900",o[900]),e.style.setProperty("--secondary-950",o[950]),r==="day"?(e.style.setProperty("--tm-primary",o[500]),e.style.setProperty("--tm-primary-foreground","0 0% 100%"),e.style.setProperty("--tm-secondary","0 0% 95.7%"),e.style.setProperty("--tm-secondary-foreground","0 0% 6.7%"),e.style.setProperty("--tm-accent","0 0% 89.8%"),e.style.setProperty("--tm-accent-foreground","0 0% 6.7%")):(e.style.setProperty("--tm-primary",n[600]),e.style.setProperty("--tm-primary-foreground","0 0% 100%"),e.style.setProperty("--tm-secondary","240 10% 7%"),e.style.setProperty("--tm-secondary-foreground","0 0% 89.8%"),e.style.setProperty("--tm-accent","240 10% 10%"),e.style.setProperty("--tm-accent-foreground","0 0% 89.8%")),e.style.setProperty("--muted",d.card),e.style.setProperty("--muted-foreground",d.cardForeground),e.style.setProperty("--destructive",u.error),e.style.setProperty("--destructive-foreground",u.errorForeground),Object.entries(f.motionCSSVariables).forEach(([k,j])=>{e.style.setProperty(k,j)})}async function P(r,e="default",s=null){if(typeof document>"u")return;await ce(e);const t=oe();if(t&&(!s||t.id!==s)&&se(t.namespace),s)try{const c=await te(s);ne(c,r)}catch(c){console.warn(`Failed to apply brand "${s}":`,c)}const{documentElement:n,body:o}=document;n.setAttribute(ae,r),n.setAttribute(ie,r),n.setAttribute(L,e),r==="night"?n.classList.add(ee):n.classList.remove(ee),Pe(r);const m=me(),{background:i,foreground:a}=m.baseColors[r];o&&(o.dataset.mode=r,o.dataset.theme=e,s?o.dataset.brand=s:o.removeAttribute("data-brand"),o.style.backgroundColor=`hsl(${i})`,o.style.color=`hsl(${a})`)}async function Ce(r){if(typeof document<"u"){const e=document.documentElement,s=e.getAttribute(L)||"default",t=e.getAttribute("data-brand")||null;await P(r,s,t)}else await P(r,"default",null)}function F(r="default",e="tm_theme"){if(typeof window>"u")return r;const t=document.documentElement.getAttribute(L);if(t==="default"||t==="dark"||t==="brand")return t;try{const n=localStorage.getItem(e);if(n==="default"||n==="dark"||n==="brand")return n}catch{}return r}function I(r,e="tm_mode"){if(!(typeof window>"u"))try{localStorage.setItem(e,r),localStorage.setItem("theme",r==="night"?"dark":"light")}catch{}}function H(r,e="tm_theme"){if(!(typeof window>"u"))try{localStorage.setItem(e,r)}catch{}}function _(r=null,e="tm_brand"){if(typeof window>"u")return r;const t=document.documentElement.getAttribute("data-brand");if(t)return t;try{const n=localStorage.getItem(e);if(n)return n}catch{}return r}function z(r,e="tm_brand"){if(!(typeof window>"u"))try{r?localStorage.setItem(e,r):localStorage.removeItem(e)}catch{}}const E=new Map;function A(r){E.set(r.metadata.id,r)}function $e(r){var e;return(e=E.get(r))==null?void 0:e.metadata}function U(){return Array.from(E.values()).filter(r=>r.enabled!==!1).map(r=>r.metadata)}function Te(r){return U().filter(e=>e.category===r)}function $(r){return E.has(r)}async function de(r){const e=E.get(r);if(!e)throw new Error(`Theme "${r}" not found in registry`);if(e.enabled===!1)throw new Error(`Theme "${r}" is disabled`);try{return(await e.loader()).default}catch(s){throw new Error(`Failed to load theme "${r}": ${s instanceof Error?s.message:String(s)}`)}}function pe(){A({metadata:{id:"default",name:"Default",description:"Default Tenerife UI theme with standard color palette",category:"default",version:"1.0.0"},loader:async()=>({default:{...(await Promise.resolve().then(()=>require("../default-Ddg7Haf2.cjs"))).defaultTheme,id:"default",name:"Default"}}),enabled:!0}),A({metadata:{id:"dark",name:"Dark",description:"Enhanced dark theme with deeper surfaces and higher contrast",category:"default",version:"1.0.0"},loader:async()=>({default:{...(await Promise.resolve().then(()=>require("../dark-OOhiqt1q.cjs"))).darkTheme,id:"dark",name:"Dark"}}),enabled:!0}),A({metadata:{id:"brand",name:"Brand",description:"Brand-specific theme with custom color palette",category:"brand",version:"1.0.0"},loader:async()=>({default:{...(await Promise.resolve().then(()=>require("../brand-DQb18Frh.cjs"))).brandTheme,id:"brand",name:"Brand"}}),enabled:!0})}pe();const Ee=["id","name"];function W(r){const e=[],s=[];if(!r||typeof r!="object")return{valid:!1,errors:["Theme must be an object"],warnings:[]};const t=r;for(const o of Ee)(!(o in t)||!t[o])&&e.push(`Missing required field: ${o}`);if(t.id&&typeof t.id=="string"&&(/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(t.id)||e.push(`Invalid theme ID format: "${t.id}". Must be kebab-case (e.g., "ocean-blue")`)),t.name&&typeof t.name!="string"&&e.push("Theme name must be a string"),t.category){const o=["default","brand","seasonal","custom"];o.includes(t.category)||e.push(`Invalid category: "${t.category}". Must be one of: ${o.join(", ")}`)}const n=["primaryColors","accentColors","secondaryColors"];for(const o of n)if(t[o]){const m=t[o],i=["50","100","200","300","400","500","600","700","800","900","950"];for(const a of Object.keys(m))i.includes(a)||s.push(`Invalid color scale key in ${o}: ${a}. Valid keys: ${i.join(", ")}`),typeof m[a]!="string"&&e.push(`Color value in ${o}.${a} must be a string (HSL format)`)}return t.version&&typeof t.version=="string"&&(/^\d+\.\d+\.\d+$/.test(t.version)||s.push(`Invalid version format: "${t.version}". Should be semver (e.g., "1.0.0")`)),{valid:e.length===0,errors:e,warnings:s}}function Se(r){return W(r).valid}function ke(r,e){return{id:r,name:e,description:`Custom theme: ${e}`,category:"custom",version:"1.0.0"}}const je={fallbackThemeId:"default",validate:!0,throwOnError:!1};async function T(r,e={}){const s={...je,...e},t=[];if(!$(r)){if(s.throwOnError)throw new Error(`Theme "${r}" not found`);if(s.fallbackThemeId&&$(s.fallbackThemeId))return t.push(`Theme "${r}" not found, using fallback "${s.fallbackThemeId}"`),T(s.fallbackThemeId,{...s,throwOnError:!1});throw new Error(`Theme "${r}" not found and no fallback available`)}try{const n=await de(r);if(s.validate){const o=W(n);if(!o.valid){if(s.throwOnError)throw new Error(`Theme "${r}" validation failed: ${o.errors.join(", ")}`);if(s.fallbackThemeId&&$(s.fallbackThemeId))return t.push(`Theme "${r}" validation failed: ${o.errors.join(", ")}. Using fallback "${s.fallbackThemeId}"`),T(s.fallbackThemeId,{...s,throwOnError:!1});throw new Error(`Theme "${r}" validation failed: ${o.errors.join(", ")}`)}t.push(...o.warnings)}return{theme:n,usedFallback:!1,warnings:t}}catch(n){if(s.throwOnError)throw n;if(s.fallbackThemeId&&$(s.fallbackThemeId)&&s.fallbackThemeId!==r)return t.push(`Failed to load theme "${r}": ${n instanceof Error?n.message:String(n)}. Using fallback "${s.fallbackThemeId}"`),T(s.fallbackThemeId,{...s,throwOnError:!1});throw n}}async function Re(r){const e=r.map(s=>T(s,{validate:!1,throwOnError:!1}).catch(()=>{}));await Promise.all(e)}function Be(){return U().map(r=>r.id)}async function Ae(r){if(!$(r))return!1;try{return await T(r,{validate:!1,throwOnError:!0}),!0}catch{return!1}}const De={none:"0",xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem","2xl":"2.5rem","3xl":"3rem","4xl":"4rem","5xl":"5rem"},Me={none:"0px",sm:"0.125rem",base:"0.25rem",md:"0.375rem",lg:"0.5rem",xl:"0.75rem","2xl":"1rem","3xl":"1.5rem",full:"9999px"},Oe={none:"none",sm:"0 1px 2px 0 rgb(0 0 0 / 0.05)",base:"0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",md:"0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",lg:"0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",xl:"0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)","2xl":"0 25px 50px -12px rgb(0 0 0 / 0.25)",inner:"inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"},ue=p.createContext(void 0);function Fe(r){if(r!==void 0)return r;if(typeof window>"u")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}function Ie({children:r,defaultMode:e="day",defaultTheme:s="default",defaultBrand:t=null,storageKey:n="tm_mode",themeStorageKey:o="tm_theme",brandStorageKey:m="tm_brand",attribute:i="data-mode",enableSystem:a=!0,reduceMotion:c,enableAnimations:x=!0}){p.useEffect(()=>{try{K(he)}catch(l){console.warn("Failed to register neon brand:",l)}try{K(fe)}catch(l){console.warn("Failed to register minimal brand:",l)}},[]);const[d,b]=p.useState(()=>{if(typeof window>"u")return e;const y=document.documentElement.getAttribute(i);if(y==="day"||y==="night")return y;try{const g=localStorage.getItem(n);if(g==="day"||g==="night")return g}catch{}return a&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"night":"day":e}),[u,w]=p.useState(()=>typeof window>"u"?s:F(s,o)),[h,k]=p.useState(()=>typeof window>"u"?t:_(t,m)),[j,D]=p.useState(()=>Fe(c)),[V,Q]=p.useState(()=>x),C=p.useCallback(l=>{b(l),P(l,u,h),I(l,n)},[u,h,n]),G=p.useCallback(async l=>{w(l),await P(d,l,h),H(l,o)},[d,h,o]),J=p.useCallback(async l=>{const y=oe();if(y&&se(y.namespace),k(l),z(l,m),l)try{const g=await te(l);ne(g,d)}catch(g){console.error(`Failed to load brand "${l}":`,g),O(null)}else O(null);await P(d,u,l)},[d,u,m]),X=p.useCallback(()=>{C(d==="night"?"day":"night")},[d,C]),Y=p.useCallback(l=>{D(l);try{localStorage.setItem("tm_reduce_motion",l?"true":"false")}catch{}},[]),Z=p.useCallback(l=>{Q(l);try{localStorage.setItem("tm_enable_animations",l?"true":"false")}catch{}},[]);p.useEffect(()=>{if(c!==void 0)return;const l=window.matchMedia("(prefers-reduced-motion: reduce)"),y=g=>{D(g.matches)};return l.addEventListener("change",y),()=>l.removeEventListener("change",y)},[c]),p.useEffect(()=>{if(c===void 0)try{const l=localStorage.getItem("tm_reduce_motion");(l==="true"||l==="false")&&D(l==="true")}catch{}if(x===void 0)try{const l=localStorage.getItem("tm_enable_animations");(l==="true"||l==="false")&&Q(l==="true")}catch{}},[c,x]),p.useEffect(()=>{const l=le(e,n,a),y=F(s,o),g=_(t,m);b(l),w(y),k(g),P(l,y,g),I(l,n),H(y,o),z(g,m)},[e,s,t,n,o,m,a]),p.useEffect(()=>{if(!a)return;const l=window.matchMedia("(prefers-color-scheme: dark)"),y=g=>{try{localStorage.getItem(n)||C(g.matches?"night":"day")}catch{}};return l.addEventListener("change",y),()=>l.removeEventListener("change",y)},[a,n,C]),p.useEffect(()=>{P(d,u,h)},[d,u,h]);const ye=p.useMemo(()=>({mode:d,theme:u,brand:h,reduceMotion:c!==void 0?c:j,enableAnimations:x!==void 0?x:V,setMode:C,setTheme:G,setBrand:J,toggleMode:X,setReduceMotion:Y,setEnableAnimations:Z}),[d,u,h,j,V,c,x,C,G,J,X,Y,Z]);return ge.jsx(ue.Provider,{value:ye,children:r})}function He(){const r=p.useContext(ue);if(r===void 0)throw new Error("useTheme must be used within a ThemeProvider");return r}const _e={sans:["ui-sans-serif","system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","Helvetica Neue","Arial","Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"].join(", "),serif:["ui-serif","Georgia","Cambria","Times New Roman","Times","serif"].join(", "),mono:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","Liberation Mono","Courier New","monospace"].join(", ")},ze={xs:"0.75rem",sm:"0.875rem",base:"1rem",lg:"1.125rem",xl:"1.25rem","2xl":"1.5rem","3xl":"1.875rem","4xl":"2.25rem","5xl":"3rem","6xl":"3.75rem"},Ne={thin:"100",extralight:"200",light:"300",normal:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},qe={none:"1",tight:"1.25",snug:"1.375",normal:"1.5",relaxed:"1.625",loose:"2"},Le={tighter:"-0.05em",tight:"-0.025em",normal:"0em",wide:"0.025em",wider:"0.05em",widest:"0.1em"};exports.cssVariableColorTokens=f.cssVariableColorTokens;exports.tailwindThemeColors=f.tailwindThemeColors;exports.ThemeProvider=Ie;exports.applyDocumentMode=Ce;exports.applyDocumentTheme=P;exports.borderRadius=Me;exports.canLoadTheme=Ae;exports.createMinimalThemeSchema=ke;exports.fontFamilies=_e;exports.fontSizes=ze;exports.fontWeights=Ne;exports.getAllThemes=U;exports.getAvailableThemeIds=Be;exports.getInitialBrand=_;exports.getInitialMode=le;exports.getInitialTheme=F;exports.getThemeMetadata=$e;exports.getThemesByCategory=Te;exports.initializeDefaultThemes=pe;exports.isThemeSchema=Se;exports.letterSpacings=Le;exports.lineHeights=qe;exports.loadTheme=de;exports.loadThemeOverride=ce;exports.loadThemeSafe=T;exports.persistBrand=z;exports.persistMode=I;exports.persistTheme=H;exports.preloadThemes=Re;exports.registerTheme=A;exports.shadows=Oe;exports.spacing=De;exports.themeExists=$;exports.themeRegistry=E;exports.useTheme=He;exports.validateThemeSchema=W;
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+
6
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
7
+
8
+ var React__default = /*#__PURE__*/_interopDefault(React);
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropNames = Object.getOwnPropertyNames;
12
+ var __esm = (fn, res) => function __init() {
13
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
14
+ };
15
+ var __export = (target, all) => {
16
+ for (var name in all)
17
+ __defProp(target, name, { get: all[name], enumerable: true });
18
+ };
19
+
20
+ // src/themes/brand.ts
21
+ var brand_exports = {};
22
+ __export(brand_exports, {
23
+ brandTheme: () => brandTheme
24
+ });
25
+ var brandTheme;
26
+ var init_brand = __esm({
27
+ "src/themes/brand.ts"() {
28
+ brandTheme = {
29
+ name: "brand",
30
+ description: "Brand-specific theme with custom color palette",
31
+ // Override primary colors - warmer blue tones for brand
32
+ primaryColors: {
33
+ 500: "210 75% 45%",
34
+ // Brighter, warmer blue
35
+ 600: "210 70% 40%",
36
+ 700: "210 65% 35%"
37
+ },
38
+ // Override accent colors - vibrant purple-pink gradient
39
+ accentColors: {
40
+ 400: "285 75% 65%",
41
+ // Softer purple
42
+ 500: "285 80% 60%",
43
+ // Vibrant purple-pink
44
+ 600: "285 75% 55%"
45
+ },
46
+ // Override secondary colors - teal accent for brand
47
+ secondaryColors: {
48
+ 400: "170 85% 50%",
49
+ // Brighter teal
50
+ 500: "170 90% 45%",
51
+ // Vibrant teal (#00d9b8)
52
+ 600: "170 85% 40%"
53
+ },
54
+ // Override semantic colors for day mode - brand-aligned colors
55
+ semanticColorsDay: {
56
+ success: "145 75% 40%",
57
+ // Brand-aligned green
58
+ info: "210 75% 50%"
59
+ // Brand primary blue
60
+ },
61
+ // Override semantic colors for night mode
62
+ semanticColorsNight: {
63
+ success: "145 70% 48%",
64
+ // Brighter brand green
65
+ info: "210 75% 55%"
66
+ // Brighter brand blue
67
+ }
68
+ };
69
+ }
70
+ });
71
+
72
+ // src/themes/dark.ts
73
+ var dark_exports = {};
74
+ __export(dark_exports, {
75
+ darkTheme: () => darkTheme
76
+ });
77
+ var darkTheme;
78
+ var init_dark = __esm({
79
+ "src/themes/dark.ts"() {
80
+ darkTheme = {
81
+ name: "dark",
82
+ description: "Enhanced dark theme with deeper surfaces and higher contrast",
83
+ // Override surface colors for night mode - darker backgrounds
84
+ surfaceColorsNight: {
85
+ base: "240 10% 2%",
86
+ // Even darker base (#050508)
87
+ elevated1: "240 10% 3%",
88
+ // #08080a
89
+ elevated2: "240 10% 4%",
90
+ // #0a0a0c
91
+ elevated3: "240 10% 5%",
92
+ // #0c0c0e
93
+ overlay: "0 0% 0% / 0.85",
94
+ // Darker overlay for better contrast
95
+ glass: "240 10% 5% / 0.95"
96
+ // More opaque glass effect
97
+ },
98
+ // Override base colors for night mode - deeper backgrounds
99
+ baseColorsNight: {
100
+ background: "240 10% 2%",
101
+ // Match surface base
102
+ card: "240 10% 2%",
103
+ popover: "240 10% 3%"
104
+ }
105
+ };
106
+ }
107
+ });
108
+
109
+ // src/themes/default.ts
110
+ var default_exports = {};
111
+ __export(default_exports, {
112
+ defaultTheme: () => defaultTheme
113
+ });
114
+ var defaultTheme;
115
+ var init_default = __esm({
116
+ "src/themes/default.ts"() {
117
+ defaultTheme = {
118
+ name: "default",
119
+ description: "Default Tenerife UI theme with standard color palette"
120
+ };
121
+ }
122
+ });
123
+
124
+ // src/themes/minimal.ts
125
+ var minimalBrand = {
126
+ id: "minimal",
127
+ name: "Minimal",
128
+ description: "Clean, minimal brand theme with muted colors, light typography, and compact spacing",
129
+ namespace: "minimal",
130
+ version: "1.0.0",
131
+ author: "Tenerife UI",
132
+ themes: [
133
+ {
134
+ id: "minimal-day",
135
+ name: "Minimal Day",
136
+ description: "Light minimal theme with grayscale colors and subtle accents",
137
+ mode: "day",
138
+ overrides: {
139
+ name: "minimal-day",
140
+ description: "Light minimal theme for day mode",
141
+ // Muted, low-saturation color overrides
142
+ primaryColors: {
143
+ 400: "0 0% 60%",
144
+ // Muted gray
145
+ 500: "0 0% 50%",
146
+ // Neutral gray (#808080)
147
+ 600: "0 0% 40%",
148
+ 700: "0 0% 30%"
149
+ },
150
+ accentColors: {
151
+ 400: "210 20% 70%",
152
+ // Muted blue-gray
153
+ 500: "210 20% 60%",
154
+ // Subtle blue-gray
155
+ 600: "210 20% 50%",
156
+ 700: "210 20% 40%"
157
+ },
158
+ secondaryColors: {
159
+ 400: "0 0% 70%",
160
+ // Light gray
161
+ 500: "0 0% 65%",
162
+ // Neutral light gray
163
+ 600: "0 0% 55%",
164
+ 700: "0 0% 45%"
165
+ },
166
+ // Muted base colors for day mode
167
+ baseColorsDay: {
168
+ primary: "0 0% 50%",
169
+ // Neutral gray
170
+ primaryForeground: "0 0% 100%",
171
+ secondary: "0 0% 96%",
172
+ // Very light gray
173
+ secondaryForeground: "0 0% 20%",
174
+ accent: "210 20% 60%",
175
+ // Subtle blue-gray
176
+ accentForeground: "0 0% 100%"
177
+ },
178
+ // Subtle semantic colors
179
+ semanticColorsDay: {
180
+ success: "140 30% 45%",
181
+ // Muted green
182
+ info: "210 30% 50%",
183
+ // Muted blue
184
+ warning: "40 30% 50%",
185
+ // Muted orange
186
+ error: "0 40% 55%"
187
+ // Muted red
188
+ },
189
+ // Typography overrides - lighter and smaller
190
+ typography: {
191
+ fontWeight: {
192
+ normal: "400",
193
+ // Normal weight
194
+ medium: "500",
195
+ semibold: "600",
196
+ // Lighter than default
197
+ bold: "700"
198
+ // Standard bold
199
+ },
200
+ fontSize: {
201
+ xs: [
202
+ "clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",
203
+ { lineHeight: "1rem", letterSpacing: "0.05em" }
204
+ ],
205
+ // Smaller
206
+ sm: [
207
+ "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",
208
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
209
+ ],
210
+ // Smaller
211
+ base: [
212
+ "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",
213
+ { lineHeight: "1.5rem", letterSpacing: "0em" }
214
+ ],
215
+ // Smaller
216
+ lg: [
217
+ "clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",
218
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
219
+ ],
220
+ // Smaller
221
+ xl: [
222
+ "clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",
223
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
224
+ ]
225
+ // Smaller
226
+ }
227
+ },
228
+ // Spacing overrides - compact spacing for tight layout
229
+ spacing: {
230
+ semanticSpacing: {
231
+ xs: "0.125rem",
232
+ // 2px (was 4px)
233
+ sm: "0.25rem",
234
+ // 4px (was 8px)
235
+ md: "0.5rem",
236
+ // 8px (was 16px)
237
+ lg: "0.75rem",
238
+ // 12px (was 24px)
239
+ xl: "1rem",
240
+ // 16px (was 32px)
241
+ "2xl": "1.5rem"
242
+ // 24px (was 48px)
243
+ }
244
+ },
245
+ // Shadow overrides - subtle and minimal
246
+ shadows: {
247
+ elevationShadows: {
248
+ xs: "0 1px 1px 0 rgb(0 0 0 / 0.03)",
249
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05), 0 1px 1px -1px rgb(0 0 0 / 0.05)",
250
+ md: "0 2px 4px -1px rgb(0 0 0 / 0.05), 0 1px 2px -2px rgb(0 0 0 / 0.05)",
251
+ lg: "0 4px 8px -2px rgb(0 0 0 / 0.05), 0 2px 4px -3px rgb(0 0 0 / 0.05)",
252
+ xl: "0 8px 12px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05)"
253
+ },
254
+ glowEffects: {
255
+ "glow-primary": "0 0 8px 0 hsl(0 0% 50% / 0.2)",
256
+ "glow-primary-subtle": "0 0 4px 0 hsl(0 0% 50% / 0.15)",
257
+ "glow-primary-medium": "0 0 8px 0 hsl(0 0% 50% / 0.25)",
258
+ "glow-primary-strong": "0 0 12px 0 hsl(0 0% 50% / 0.3)"
259
+ }
260
+ },
261
+ // Radius overrides - smaller, sharper corners
262
+ radius: {
263
+ borderRadius: {
264
+ xs: "0.0625rem",
265
+ // 1px
266
+ sm: "0.125rem",
267
+ // 2px (was 4px)
268
+ md: "0.1875rem",
269
+ // 3px (was 6px)
270
+ lg: "0.25rem",
271
+ // 4px (was 8px)
272
+ xl: "0.375rem",
273
+ // 6px (was 12px)
274
+ "2xl": "0.5rem"
275
+ // 8px (was 16px)
276
+ },
277
+ componentRadius: {
278
+ button: {
279
+ sm: "0.125rem",
280
+ // 2px
281
+ md: "0.1875rem",
282
+ // 3px
283
+ lg: "0.25rem"
284
+ // 4px
285
+ },
286
+ card: {
287
+ sm: "0.1875rem",
288
+ // 3px
289
+ md: "0.25rem",
290
+ // 4px
291
+ lg: "0.375rem",
292
+ // 6px
293
+ xl: "0.5rem"
294
+ // 8px
295
+ },
296
+ input: {
297
+ sm: "0.125rem",
298
+ // 2px
299
+ md: "0.1875rem",
300
+ // 3px
301
+ lg: "0.25rem"
302
+ // 4px
303
+ },
304
+ badge: {
305
+ sm: "0.0625rem",
306
+ // 1px
307
+ md: "0.125rem",
308
+ // 2px
309
+ lg: "0.1875rem"
310
+ // 3px
311
+ }
312
+ }
313
+ }
314
+ }
315
+ },
316
+ {
317
+ id: "minimal-night",
318
+ name: "Minimal Night",
319
+ description: "Dark minimal theme with muted grayscale colors",
320
+ mode: "night",
321
+ overrides: {
322
+ name: "minimal-night",
323
+ description: "Dark minimal theme for night mode",
324
+ // Muted colors for night mode (slightly lighter than day for contrast)
325
+ primaryColors: {
326
+ 400: "0 0% 65%",
327
+ // Lighter gray for night
328
+ 500: "0 0% 55%",
329
+ // Neutral gray
330
+ 600: "0 0% 45%",
331
+ 700: "0 0% 35%"
332
+ },
333
+ accentColors: {
334
+ 400: "210 20% 75%",
335
+ // Lighter blue-gray
336
+ 500: "210 20% 65%",
337
+ // Subtle blue-gray
338
+ 600: "210 20% 55%",
339
+ 700: "210 20% 45%"
340
+ },
341
+ secondaryColors: {
342
+ 400: "0 0% 75%",
343
+ // Light gray
344
+ 500: "0 0% 70%",
345
+ // Neutral light gray
346
+ 600: "0 0% 60%",
347
+ 700: "0 0% 50%"
348
+ },
349
+ // Darker base colors for night mode
350
+ baseColorsNight: {
351
+ background: "240 10% 8%",
352
+ // Dark gray background
353
+ foreground: "0 0% 95%",
354
+ card: "240 10% 10%",
355
+ cardForeground: "0 0% 95%"
356
+ },
357
+ surfaceColorsNight: {
358
+ base: "240 10% 8%",
359
+ elevated1: "240 10% 10%",
360
+ elevated2: "240 10% 12%",
361
+ elevated3: "240 10% 14%"
362
+ },
363
+ // Subtle semantic colors for night
364
+ semanticColorsNight: {
365
+ success: "140 30% 50%",
366
+ // Muted green
367
+ info: "210 30% 55%",
368
+ // Muted blue
369
+ warning: "40 30% 55%",
370
+ // Muted orange
371
+ error: "0 40% 60%"
372
+ // Muted red
373
+ },
374
+ // Typography overrides - same as day
375
+ typography: {
376
+ fontWeight: {
377
+ normal: "400",
378
+ medium: "500",
379
+ semibold: "600",
380
+ bold: "700"
381
+ },
382
+ fontSize: {
383
+ xs: [
384
+ "clamp(0.6875rem, 0.65rem + 0.125vw, 0.75rem)",
385
+ { lineHeight: "1rem", letterSpacing: "0.05em" }
386
+ ],
387
+ sm: [
388
+ "clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem)",
389
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
390
+ ],
391
+ base: [
392
+ "clamp(0.9375rem, 0.875rem + 0.25vw, 1rem)",
393
+ { lineHeight: "1.5rem", letterSpacing: "0em" }
394
+ ],
395
+ lg: [
396
+ "clamp(1.0625rem, 0.95rem + 0.5vw, 1.125rem)",
397
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
398
+ ],
399
+ xl: [
400
+ "clamp(1.1875rem, 1rem + 0.75vw, 1.375rem)",
401
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
402
+ ]
403
+ }
404
+ },
405
+ // Spacing overrides - same as day
406
+ spacing: {
407
+ semanticSpacing: {
408
+ xs: "0.125rem",
409
+ sm: "0.25rem",
410
+ md: "0.5rem",
411
+ lg: "0.75rem",
412
+ xl: "1rem",
413
+ "2xl": "1.5rem"
414
+ }
415
+ },
416
+ // Shadow overrides - subtle for night
417
+ shadows: {
418
+ elevationShadows: {
419
+ xs: "0 1px 2px 0 rgb(0 0 0 / 0.15)",
420
+ sm: "0 1px 3px 0 rgb(0 0 0 / 0.2), 0 1px 2px -1px rgb(0 0 0 / 0.2)",
421
+ md: "0 2px 5px -1px rgb(0 0 0 / 0.2), 0 1px 3px -2px rgb(0 0 0 / 0.2)",
422
+ lg: "0 4px 10px -2px rgb(0 0 0 / 0.2), 0 2px 5px -3px rgb(0 0 0 / 0.2)",
423
+ xl: "0 8px 15px -3px rgb(0 0 0 / 0.2), 0 4px 8px -4px rgb(0 0 0 / 0.2)"
424
+ },
425
+ glowEffects: {
426
+ "glow-primary": "0 0 8px 0 hsl(0 0% 55% / 0.25)",
427
+ "glow-primary-subtle": "0 0 4px 0 hsl(0 0% 55% / 0.2)",
428
+ "glow-primary-medium": "0 0 8px 0 hsl(0 0% 55% / 0.3)",
429
+ "glow-primary-strong": "0 0 12px 0 hsl(0 0% 55% / 0.35)"
430
+ }
431
+ },
432
+ // Radius overrides - same as day
433
+ radius: {
434
+ borderRadius: {
435
+ xs: "0.0625rem",
436
+ sm: "0.125rem",
437
+ md: "0.1875rem",
438
+ lg: "0.25rem",
439
+ xl: "0.375rem",
440
+ "2xl": "0.5rem"
441
+ },
442
+ componentRadius: {
443
+ button: {
444
+ sm: "0.125rem",
445
+ md: "0.1875rem",
446
+ lg: "0.25rem"
447
+ },
448
+ card: {
449
+ sm: "0.1875rem",
450
+ md: "0.25rem",
451
+ lg: "0.375rem",
452
+ xl: "0.5rem"
453
+ },
454
+ input: {
455
+ sm: "0.125rem",
456
+ md: "0.1875rem",
457
+ lg: "0.25rem"
458
+ },
459
+ badge: {
460
+ sm: "0.0625rem",
461
+ md: "0.125rem",
462
+ lg: "0.1875rem"
463
+ }
464
+ }
465
+ }
466
+ }
467
+ }
468
+ ]
469
+ };
470
+
471
+ // src/themes/neon.ts
472
+ var neonBrand = {
473
+ id: "neon",
474
+ name: "Neon",
475
+ description: "Vibrant brand theme with high-saturation neon colors, bold typography, and enhanced visual effects",
476
+ namespace: "neon",
477
+ version: "1.0.0",
478
+ author: "Tenerife UI",
479
+ themes: [
480
+ {
481
+ id: "neon-day",
482
+ name: "Neon Day",
483
+ description: "Bright neon theme for day mode with vibrant cyan, magenta, and yellow accents",
484
+ mode: "day",
485
+ overrides: {
486
+ name: "neon-day",
487
+ description: "Bright neon theme for day mode",
488
+ // Vibrant neon color overrides
489
+ primaryColors: {
490
+ 400: "180 100% 50%",
491
+ // Bright cyan
492
+ 500: "180 100% 45%",
493
+ // Vibrant cyan (#00e6ff)
494
+ 600: "180 95% 40%",
495
+ 700: "180 90% 35%"
496
+ },
497
+ accentColors: {
498
+ 400: "320 100% 60%",
499
+ // Bright magenta
500
+ 500: "320 100% 55%",
501
+ // Vibrant magenta (#ff00cc)
502
+ 600: "320 95% 50%",
503
+ 700: "320 90% 45%"
504
+ },
505
+ secondaryColors: {
506
+ 400: "60 100% 60%",
507
+ // Bright yellow
508
+ 500: "60 100% 55%",
509
+ // Vibrant yellow (#ffff00)
510
+ 600: "60 95% 50%",
511
+ 700: "60 90% 45%"
512
+ },
513
+ // Enhanced base colors for day mode
514
+ baseColorsDay: {
515
+ primary: "180 100% 45%",
516
+ // Neon cyan
517
+ primaryForeground: "0 0% 100%",
518
+ accent: "320 100% 55%",
519
+ // Neon magenta
520
+ accentForeground: "0 0% 100%"
521
+ },
522
+ // Semantic colors with neon accents
523
+ semanticColorsDay: {
524
+ success: "145 80% 45%",
525
+ // Neon green
526
+ info: "180 100% 45%",
527
+ // Neon cyan
528
+ warning: "60 100% 55%",
529
+ // Neon yellow
530
+ error: "0 100% 60%"
531
+ // Bright red
532
+ },
533
+ // Typography overrides - bolder and larger
534
+ typography: {
535
+ fontWeight: {
536
+ normal: "500",
537
+ // Heavier than default (400)
538
+ medium: "600",
539
+ // Heavier
540
+ semibold: "700",
541
+ // Bold
542
+ bold: "800"
543
+ // Extra bold
544
+ },
545
+ fontSize: {
546
+ xs: [
547
+ "clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",
548
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
549
+ ],
550
+ // Larger than default
551
+ sm: [
552
+ "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
553
+ { lineHeight: "1.5rem", letterSpacing: "0em" }
554
+ ],
555
+ // Larger
556
+ base: [
557
+ "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",
558
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
559
+ ],
560
+ // Larger
561
+ lg: [
562
+ "clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",
563
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
564
+ ],
565
+ // Larger
566
+ xl: [
567
+ "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
568
+ { lineHeight: "2rem", letterSpacing: "-0.05em" }
569
+ ]
570
+ // Larger
571
+ }
572
+ },
573
+ // Spacing overrides - larger spacing for breathing room
574
+ spacing: {
575
+ semanticSpacing: {
576
+ xs: "0.5rem",
577
+ // 8px (was 4px)
578
+ sm: "1rem",
579
+ // 16px (was 8px)
580
+ md: "1.5rem",
581
+ // 24px (was 16px)
582
+ lg: "2rem",
583
+ // 32px (was 24px)
584
+ xl: "3rem",
585
+ // 48px (was 32px)
586
+ "2xl": "4rem"
587
+ // 64px (was 48px)
588
+ }
589
+ },
590
+ // Shadow overrides - stronger and more prominent
591
+ shadows: {
592
+ elevationShadows: {
593
+ xs: "0 2px 4px 0 rgb(0 0 0 / 0.1)",
594
+ sm: "0 2px 6px 0 rgb(0 0 0 / 0.15), 0 2px 4px -1px rgb(0 0 0 / 0.15)",
595
+ md: "0 6px 10px -1px rgb(0 0 0 / 0.15), 0 4px 6px -2px rgb(0 0 0 / 0.15)",
596
+ lg: "0 12px 20px -3px rgb(0 0 0 / 0.15), 0 6px 10px -4px rgb(0 0 0 / 0.15)",
597
+ xl: "0 24px 32px -5px rgb(0 0 0 / 0.15), 0 10px 14px -6px rgb(0 0 0 / 0.15)"
598
+ },
599
+ glowEffects: {
600
+ "glow-primary": "0 0 30px 0 hsl(180 100% 45% / 0.7), 0 0 60px 0 hsl(180 100% 45% / 0.4)",
601
+ "glow-primary-subtle": "0 0 12px 0 hsl(180 100% 45% / 0.5)",
602
+ "glow-primary-medium": "0 0 24px 0 hsl(180 100% 45% / 0.7)",
603
+ "glow-primary-strong": "0 0 36px 0 hsl(180 100% 45% / 0.8)",
604
+ "glow-accent": "0 0 30px 0 hsl(320 100% 55% / 0.7), 0 0 60px 0 hsl(320 100% 55% / 0.4)",
605
+ "glow-accent-subtle": "0 0 12px 0 hsl(320 100% 55% / 0.5)",
606
+ "glow-accent-medium": "0 0 24px 0 hsl(320 100% 55% / 0.7)",
607
+ "glow-accent-strong": "0 0 36px 0 hsl(320 100% 55% / 0.8)"
608
+ }
609
+ },
610
+ // Radius overrides - more rounded corners
611
+ radius: {
612
+ borderRadius: {
613
+ sm: "0.375rem",
614
+ // 6px (was 4px)
615
+ md: "0.5rem",
616
+ // 8px (was 6px)
617
+ lg: "0.75rem",
618
+ // 12px (was 8px)
619
+ xl: "1rem",
620
+ // 16px (was 12px)
621
+ "2xl": "1.5rem",
622
+ // 24px (was 16px)
623
+ "3xl": "2rem"
624
+ // 32px (was 24px)
625
+ },
626
+ componentRadius: {
627
+ button: {
628
+ sm: "0.5rem",
629
+ // 8px
630
+ md: "0.75rem",
631
+ // 12px
632
+ lg: "1rem"
633
+ // 16px
634
+ },
635
+ card: {
636
+ sm: "0.75rem",
637
+ // 12px
638
+ md: "1rem",
639
+ // 16px
640
+ lg: "1.25rem",
641
+ // 20px
642
+ xl: "1.5rem"
643
+ // 24px
644
+ },
645
+ input: {
646
+ sm: "0.5rem",
647
+ // 8px
648
+ md: "0.75rem",
649
+ // 12px
650
+ lg: "1rem"
651
+ // 16px
652
+ },
653
+ badge: {
654
+ sm: "0.375rem",
655
+ // 6px
656
+ md: "0.5rem",
657
+ // 8px
658
+ lg: "0.75rem"
659
+ // 12px
660
+ }
661
+ }
662
+ }
663
+ }
664
+ },
665
+ {
666
+ id: "neon-night",
667
+ name: "Neon Night",
668
+ description: "Dark neon theme for night mode with glowing neon accents on dark backgrounds",
669
+ mode: "night",
670
+ overrides: {
671
+ name: "neon-night",
672
+ description: "Dark neon theme for night mode",
673
+ // Vibrant neon color overrides (same as day but with different base)
674
+ primaryColors: {
675
+ 400: "180 100% 55%",
676
+ // Brighter cyan for night
677
+ 500: "180 100% 50%",
678
+ // Vibrant cyan
679
+ 600: "180 95% 45%",
680
+ 700: "180 90% 40%"
681
+ },
682
+ accentColors: {
683
+ 400: "320 100% 65%",
684
+ // Brighter magenta for night
685
+ 500: "320 100% 60%",
686
+ // Vibrant magenta
687
+ 600: "320 95% 55%",
688
+ 700: "320 90% 50%"
689
+ },
690
+ secondaryColors: {
691
+ 400: "60 100% 65%",
692
+ // Brighter yellow for night
693
+ 500: "60 100% 60%",
694
+ // Vibrant yellow
695
+ 600: "60 95% 55%",
696
+ 700: "60 90% 50%"
697
+ },
698
+ // Darker base colors for night mode
699
+ baseColorsNight: {
700
+ background: "240 10% 5%",
701
+ // Very dark background
702
+ foreground: "0 0% 98%",
703
+ card: "240 10% 6%",
704
+ cardForeground: "0 0% 98%"
705
+ },
706
+ surfaceColorsNight: {
707
+ base: "240 10% 5%",
708
+ // Very dark
709
+ elevated1: "240 10% 7%",
710
+ elevated2: "240 10% 9%",
711
+ elevated3: "240 10% 11%"
712
+ },
713
+ // Semantic colors with neon accents for night
714
+ semanticColorsNight: {
715
+ success: "145 75% 50%",
716
+ // Neon green
717
+ info: "180 100% 50%",
718
+ // Neon cyan
719
+ warning: "60 100% 60%",
720
+ // Neon yellow
721
+ error: "0 100% 65%"
722
+ // Bright red
723
+ },
724
+ // Typography overrides - same as day
725
+ typography: {
726
+ fontWeight: {
727
+ normal: "500",
728
+ medium: "600",
729
+ semibold: "700",
730
+ bold: "800"
731
+ },
732
+ fontSize: {
733
+ xs: [
734
+ "clamp(0.875rem, 0.8rem + 0.25vw, 1rem)",
735
+ { lineHeight: "1.25rem", letterSpacing: "0.025em" }
736
+ ],
737
+ sm: [
738
+ "clamp(1rem, 0.95rem + 0.25vw, 1.125rem)",
739
+ { lineHeight: "1.5rem", letterSpacing: "0em" }
740
+ ],
741
+ base: [
742
+ "clamp(1.125rem, 1rem + 0.5vw, 1.25rem)",
743
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
744
+ ],
745
+ lg: [
746
+ "clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem)",
747
+ { lineHeight: "1.75rem", letterSpacing: "-0.025em" }
748
+ ],
749
+ xl: [
750
+ "clamp(1.5rem, 1.25rem + 1.25vw, 2rem)",
751
+ { lineHeight: "2rem", letterSpacing: "-0.05em" }
752
+ ]
753
+ }
754
+ },
755
+ // Spacing overrides - same as day
756
+ spacing: {
757
+ semanticSpacing: {
758
+ xs: "0.5rem",
759
+ sm: "1rem",
760
+ md: "1.5rem",
761
+ lg: "2rem",
762
+ xl: "3rem",
763
+ "2xl": "4rem"
764
+ }
765
+ },
766
+ // Shadow overrides - even stronger glow for night
767
+ shadows: {
768
+ elevationShadows: {
769
+ xs: "0 2px 4px 0 rgb(0 0 0 / 0.2)",
770
+ sm: "0 2px 6px 0 rgb(0 0 0 / 0.25), 0 2px 4px -1px rgb(0 0 0 / 0.25)",
771
+ md: "0 6px 10px -1px rgb(0 0 0 / 0.25), 0 4px 6px -2px rgb(0 0 0 / 0.25)",
772
+ lg: "0 12px 20px -3px rgb(0 0 0 / 0.25), 0 6px 10px -4px rgb(0 0 0 / 0.25)",
773
+ xl: "0 24px 32px -5px rgb(0 0 0 / 0.25), 0 10px 14px -6px rgb(0 0 0 / 0.25)"
774
+ },
775
+ glowEffects: {
776
+ "glow-primary": "0 0 40px 0 hsl(180 100% 50% / 0.8), 0 0 80px 0 hsl(180 100% 50% / 0.5)",
777
+ "glow-primary-subtle": "0 0 16px 0 hsl(180 100% 50% / 0.6)",
778
+ "glow-primary-medium": "0 0 32px 0 hsl(180 100% 50% / 0.8)",
779
+ "glow-primary-strong": "0 0 48px 0 hsl(180 100% 50% / 0.9)",
780
+ "glow-accent": "0 0 40px 0 hsl(320 100% 60% / 0.8), 0 0 80px 0 hsl(320 100% 60% / 0.5)",
781
+ "glow-accent-subtle": "0 0 16px 0 hsl(320 100% 60% / 0.6)",
782
+ "glow-accent-medium": "0 0 32px 0 hsl(320 100% 60% / 0.8)",
783
+ "glow-accent-strong": "0 0 48px 0 hsl(320 100% 60% / 0.9)"
784
+ }
785
+ },
786
+ // Radius overrides - same as day
787
+ radius: {
788
+ borderRadius: {
789
+ sm: "0.375rem",
790
+ md: "0.5rem",
791
+ lg: "0.75rem",
792
+ xl: "1rem",
793
+ "2xl": "1.5rem",
794
+ "3xl": "2rem"
795
+ },
796
+ componentRadius: {
797
+ button: {
798
+ sm: "0.5rem",
799
+ md: "0.75rem",
800
+ lg: "1rem"
801
+ },
802
+ card: {
803
+ sm: "0.75rem",
804
+ md: "1rem",
805
+ lg: "1.25rem",
806
+ xl: "1.5rem"
807
+ },
808
+ input: {
809
+ sm: "0.5rem",
810
+ md: "0.75rem",
811
+ lg: "1rem"
812
+ },
813
+ badge: {
814
+ sm: "0.375rem",
815
+ md: "0.5rem",
816
+ lg: "0.75rem"
817
+ }
818
+ }
819
+ }
820
+ }
821
+ }
822
+ ]
823
+ };
824
+
825
+ // src/themes/brand_engine.ts
826
+ var brandRegistry = /* @__PURE__ */ new Map();
827
+ var activeBrand = null;
828
+ var activeNamespace = null;
829
+ var brandCache = /* @__PURE__ */ new Map();
830
+ function validateBrand(brand) {
831
+ const errors = [];
832
+ const warnings = [];
833
+ if (!brand || typeof brand !== "object") {
834
+ return {
835
+ valid: false,
836
+ errors: ["Brand must be an object"],
837
+ warnings: []
838
+ };
839
+ }
840
+ const brandObj = brand;
841
+ const requiredFields = ["id", "name", "namespace"];
842
+ for (const field of requiredFields) {
843
+ if (!(field in brandObj) || !brandObj[field]) {
844
+ errors.push(`Missing required field: ${field}`);
845
+ }
846
+ }
847
+ if (brandObj.id && typeof brandObj.id === "string") {
848
+ const idRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
849
+ if (!idRegex.test(brandObj.id)) {
850
+ errors.push(
851
+ `Invalid brand ID format: "${brandObj.id}". Must be kebab-case (e.g., "neon-brand")`
852
+ );
853
+ }
854
+ }
855
+ if (brandObj.namespace && typeof brandObj.namespace === "string") {
856
+ const namespaceRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
857
+ if (!namespaceRegex.test(brandObj.namespace)) {
858
+ errors.push(
859
+ `Invalid namespace format: "${brandObj.namespace}". Must be kebab-case (e.g., "neon")`
860
+ );
861
+ }
862
+ }
863
+ if (brandObj.themes) {
864
+ if (!Array.isArray(brandObj.themes)) {
865
+ errors.push("Brand themes must be an array");
866
+ } else {
867
+ const themes2 = brandObj.themes;
868
+ if (themes2.length === 0) {
869
+ warnings.push("Brand has no themes defined");
870
+ }
871
+ themes2.forEach((theme, index) => {
872
+ if (!theme || typeof theme !== "object") {
873
+ errors.push(`Theme at index ${index} must be an object`);
874
+ return;
875
+ }
876
+ const themeObj = theme;
877
+ if (!themeObj.id || typeof themeObj.id !== "string") {
878
+ errors.push(`Theme at index ${index} is missing required field: id`);
879
+ }
880
+ if (!themeObj.name || typeof themeObj.name !== "string") {
881
+ errors.push(`Theme at index ${index} is missing required field: name`);
882
+ }
883
+ if (!themeObj.mode || !["day", "night"].includes(themeObj.mode)) {
884
+ errors.push(`Theme at index ${index} must have mode set to "day" or "night"`);
885
+ }
886
+ if (!themeObj.overrides || typeof themeObj.overrides !== "object") {
887
+ errors.push(`Theme at index ${index} is missing required field: overrides`);
888
+ }
889
+ });
890
+ }
891
+ } else {
892
+ errors.push("Brand must have at least one theme");
893
+ }
894
+ if (brandObj.version && typeof brandObj.version === "string") {
895
+ const semverRegex = /^\d+\.\d+\.\d+$/;
896
+ if (!semverRegex.test(brandObj.version)) {
897
+ warnings.push(
898
+ `Invalid version format: "${brandObj.version}". Should be semver (e.g., "1.0.0")`
899
+ );
900
+ }
901
+ }
902
+ if (brandObj.themes && Array.isArray(brandObj.themes)) {
903
+ const themeIds = brandObj.themes.map(
904
+ (theme) => theme?.id
905
+ );
906
+ const uniqueIds = new Set(themeIds);
907
+ if (themeIds.length !== uniqueIds.size) {
908
+ errors.push("Brand contains duplicate theme IDs");
909
+ }
910
+ }
911
+ return {
912
+ valid: errors.length === 0,
913
+ errors,
914
+ warnings
915
+ };
916
+ }
917
+ function registerBrand(brand, options) {
918
+ const validation = validateBrand(brand);
919
+ if (!validation.valid) {
920
+ throw new Error(`Invalid brand "${brand.id}": ${validation.errors.join(", ")}`);
921
+ }
922
+ if (validation.warnings.length > 0) {
923
+ console.warn(`Brand "${brand.id}" validation warnings:`, validation.warnings.join(", "));
924
+ }
925
+ const existingEntry = brandRegistry.get(brand.id);
926
+ if (existingEntry && existingEntry.brand.namespace === brand.namespace) {
927
+ return;
928
+ }
929
+ if (brandRegistry.has(brand.id)) {
930
+ throw new Error(`Brand "${brand.id}" is already registered`);
931
+ }
932
+ const existingBrand = Array.from(brandRegistry.values()).find(
933
+ (entry) => entry.brand.namespace === brand.namespace
934
+ );
935
+ if (existingBrand) {
936
+ throw new Error(
937
+ `Brand namespace "${brand.namespace}" is already used by brand "${existingBrand.brand.id}"`
938
+ );
939
+ }
940
+ brandRegistry.set(brand.id, {
941
+ brand,
942
+ enabled: options?.enabled !== false,
943
+ loader: options?.loader
944
+ });
945
+ }
946
+ async function loadBrand(brandId) {
947
+ if (brandCache.has(brandId)) {
948
+ return brandCache.get(brandId);
949
+ }
950
+ const entry = brandRegistry.get(brandId);
951
+ if (!entry) {
952
+ throw new Error(`Brand "${brandId}" not found in registry`);
953
+ }
954
+ if (entry.enabled === false) {
955
+ throw new Error(`Brand "${brandId}" is disabled`);
956
+ }
957
+ if (entry.loader) {
958
+ try {
959
+ const module = await entry.loader();
960
+ const loadedBrand = module.default;
961
+ const validation = validateBrand(loadedBrand);
962
+ if (!validation.valid) {
963
+ throw new Error(`Invalid loaded brand "${brandId}": ${validation.errors.join(", ")}`);
964
+ }
965
+ brandCache.set(brandId, loadedBrand);
966
+ return loadedBrand;
967
+ } catch (error) {
968
+ throw new Error(
969
+ `Failed to load brand "${brandId}": ${error instanceof Error ? error.message : String(error)}`
970
+ );
971
+ }
972
+ }
973
+ brandCache.set(brandId, entry.brand);
974
+ return entry.brand;
975
+ }
976
+ function getActiveBrand() {
977
+ return activeBrand;
978
+ }
979
+ function setActiveBrand(brand) {
980
+ activeBrand = brand;
981
+ activeNamespace = brand?.namespace || null;
982
+ }
983
+ function clearActiveBrand() {
984
+ activeBrand = null;
985
+ activeNamespace = null;
986
+ }
987
+ function getBrandTheme(brand, mode) {
988
+ return brand.themes.find((theme) => theme.mode === mode);
989
+ }
990
+ function applyBrandOverrides(brand, mode) {
991
+ if (typeof document === "undefined") return;
992
+ const theme = getBrandTheme(brand, mode);
993
+ if (!theme) {
994
+ console.warn(`Brand "${brand.id}" has no theme for mode "${mode}"`);
995
+ return;
996
+ }
997
+ const root = document.documentElement;
998
+ const { namespace } = brand;
999
+ const { overrides } = theme;
1000
+ if (overrides.primaryColors) {
1001
+ Object.entries(overrides.primaryColors).forEach(([key, value]) => {
1002
+ root.style.setProperty(`--brand-${namespace}-primary-${key}`, value);
1003
+ });
1004
+ }
1005
+ if (overrides.accentColors) {
1006
+ Object.entries(overrides.accentColors).forEach(([key, value]) => {
1007
+ root.style.setProperty(`--brand-${namespace}-accent-${key}`, value);
1008
+ });
1009
+ }
1010
+ if (overrides.secondaryColors) {
1011
+ Object.entries(overrides.secondaryColors).forEach(([key, value]) => {
1012
+ root.style.setProperty(`--brand-${namespace}-secondary-${key}`, value);
1013
+ });
1014
+ }
1015
+ const modeColors = mode === "day" ? overrides.baseColorsDay : overrides.baseColorsNight;
1016
+ if (modeColors) {
1017
+ Object.entries(modeColors).forEach(([key, value]) => {
1018
+ root.style.setProperty(`--brand-${namespace}-${key}`, value);
1019
+ });
1020
+ }
1021
+ if (overrides.typography) {
1022
+ if (overrides.typography.fontFamily) {
1023
+ Object.entries(overrides.typography.fontFamily).forEach(([key, value]) => {
1024
+ root.style.setProperty(
1025
+ `--brand-${namespace}-font-${key}`,
1026
+ Array.isArray(value) ? value.join(", ") : value
1027
+ );
1028
+ });
1029
+ }
1030
+ if (overrides.typography.fontSize) {
1031
+ Object.entries(overrides.typography.fontSize).forEach(([key, value]) => {
1032
+ const fontSizeValue = typeof value === "string" ? value : value[0];
1033
+ root.style.setProperty(`--brand-${namespace}-font-size-${key}`, fontSizeValue);
1034
+ });
1035
+ }
1036
+ if (overrides.typography.fontWeight) {
1037
+ Object.entries(overrides.typography.fontWeight).forEach(([key, value]) => {
1038
+ root.style.setProperty(`--brand-${namespace}-font-weight-${key}`, value);
1039
+ });
1040
+ }
1041
+ if (overrides.typography.lineHeight) {
1042
+ Object.entries(overrides.typography.lineHeight).forEach(([key, value]) => {
1043
+ root.style.setProperty(`--brand-${namespace}-line-height-${key}`, value);
1044
+ });
1045
+ }
1046
+ if (overrides.typography.letterSpacing) {
1047
+ Object.entries(overrides.typography.letterSpacing).forEach(([key, value]) => {
1048
+ root.style.setProperty(`--brand-${namespace}-letter-spacing-${key}`, value);
1049
+ });
1050
+ }
1051
+ }
1052
+ if (overrides.spacing) {
1053
+ if (overrides.spacing.semanticSpacing) {
1054
+ Object.entries(overrides.spacing.semanticSpacing).forEach(([key, value]) => {
1055
+ root.style.setProperty(`--brand-${namespace}-spacing-${key}`, value);
1056
+ });
1057
+ }
1058
+ if (overrides.spacing.layoutSpacing) {
1059
+ const layout = overrides.spacing.layoutSpacing;
1060
+ if (layout.section) {
1061
+ Object.entries(layout.section).forEach(([key, value]) => {
1062
+ if (typeof value === "string") {
1063
+ root.style.setProperty(`--brand-${namespace}-layout-section-${key}`, value);
1064
+ }
1065
+ });
1066
+ }
1067
+ if (layout.container) {
1068
+ Object.entries(layout.container).forEach(([key, value]) => {
1069
+ if (typeof value === "string") {
1070
+ root.style.setProperty(`--brand-${namespace}-layout-container-${key}`, value);
1071
+ }
1072
+ });
1073
+ }
1074
+ if (layout.grid) {
1075
+ Object.entries(layout.grid).forEach(([key, value]) => {
1076
+ if (typeof value === "string") {
1077
+ root.style.setProperty(`--brand-${namespace}-layout-grid-${key}`, value);
1078
+ }
1079
+ });
1080
+ }
1081
+ if (layout.stack) {
1082
+ Object.entries(layout.stack).forEach(([key, value]) => {
1083
+ if (typeof value === "string") {
1084
+ root.style.setProperty(`--brand-${namespace}-layout-stack-${key}`, value);
1085
+ }
1086
+ });
1087
+ }
1088
+ if (layout.component) {
1089
+ Object.entries(layout.component).forEach(([key, value]) => {
1090
+ if (typeof value === "string") {
1091
+ root.style.setProperty(`--brand-${namespace}-layout-component-${key}`, value);
1092
+ }
1093
+ });
1094
+ }
1095
+ }
1096
+ }
1097
+ if (overrides.shadows) {
1098
+ if (overrides.shadows.elevationShadows) {
1099
+ Object.entries(overrides.shadows.elevationShadows).forEach(([key, value]) => {
1100
+ root.style.setProperty(`--brand-${namespace}-shadow-${key}`, value);
1101
+ });
1102
+ }
1103
+ if (overrides.shadows.primaryColoredShadows) {
1104
+ Object.entries(overrides.shadows.primaryColoredShadows).forEach(([key, value]) => {
1105
+ root.style.setProperty(`--brand-${namespace}-shadow-primary-${key}`, value);
1106
+ });
1107
+ }
1108
+ if (overrides.shadows.accentColoredShadows) {
1109
+ Object.entries(overrides.shadows.accentColoredShadows).forEach(([key, value]) => {
1110
+ root.style.setProperty(`--brand-${namespace}-shadow-accent-${key}`, value);
1111
+ });
1112
+ }
1113
+ if (overrides.shadows.glowEffects) {
1114
+ Object.entries(overrides.shadows.glowEffects).forEach(([key, value]) => {
1115
+ root.style.setProperty(`--brand-${namespace}-glow-${key}`, value);
1116
+ });
1117
+ }
1118
+ if (overrides.shadows.focusRings) {
1119
+ Object.entries(overrides.shadows.focusRings).forEach(([key, value]) => {
1120
+ root.style.setProperty(`--brand-${namespace}-focus-ring-${key}`, value);
1121
+ });
1122
+ }
1123
+ }
1124
+ if (overrides.radius) {
1125
+ if (overrides.radius.borderRadius) {
1126
+ Object.entries(overrides.radius.borderRadius).forEach(([key, value]) => {
1127
+ root.style.setProperty(`--brand-${namespace}-radius-${key}`, value);
1128
+ });
1129
+ }
1130
+ if (overrides.radius.componentRadius) {
1131
+ const { componentRadius } = overrides.radius;
1132
+ if (componentRadius.button) {
1133
+ Object.entries(componentRadius.button).forEach(([key, value]) => {
1134
+ root.style.setProperty(`--brand-${namespace}-radius-button-${key}`, value);
1135
+ });
1136
+ }
1137
+ if (componentRadius.card) {
1138
+ Object.entries(componentRadius.card).forEach(([key, value]) => {
1139
+ root.style.setProperty(`--brand-${namespace}-radius-card-${key}`, value);
1140
+ });
1141
+ }
1142
+ if (componentRadius.input) {
1143
+ Object.entries(componentRadius.input).forEach(([key, value]) => {
1144
+ root.style.setProperty(`--brand-${namespace}-radius-input-${key}`, value);
1145
+ });
1146
+ }
1147
+ }
1148
+ }
1149
+ setActiveBrand(brand);
1150
+ root.setAttribute("data-brand", brand.id);
1151
+ root.setAttribute("data-brand-namespace", namespace);
1152
+ }
1153
+ function removeBrandOverrides(namespace) {
1154
+ if (typeof document === "undefined") return;
1155
+ const root = document.documentElement;
1156
+ const { style } = root;
1157
+ const propsToRemove = [];
1158
+ for (let i = 0; i < style.length; i++) {
1159
+ const prop = style.item(i);
1160
+ if (prop && prop.startsWith(`--brand-${namespace}-`)) {
1161
+ propsToRemove.push(prop);
1162
+ }
1163
+ }
1164
+ propsToRemove.forEach((prop) => {
1165
+ style.removeProperty(prop);
1166
+ });
1167
+ root.removeAttribute("data-brand");
1168
+ root.removeAttribute("data-brand-namespace");
1169
+ if (activeNamespace === namespace) {
1170
+ clearActiveBrand();
1171
+ }
1172
+ }
1173
+
1174
+ // src/themes/index.ts
1175
+ var themes = {
1176
+ default: () => Promise.resolve().then(() => (init_default(), default_exports)).then((m) => m.defaultTheme),
1177
+ dark: () => Promise.resolve().then(() => (init_dark(), dark_exports)).then((m) => m.darkTheme),
1178
+ brand: () => Promise.resolve().then(() => (init_brand(), brand_exports)).then((m) => m.brandTheme)
1179
+ };
1180
+ async function getTheme(name) {
1181
+ const themeLoader = themes[name];
1182
+ if (!themeLoader) {
1183
+ throw new Error(`Theme "${name}" not found`);
1184
+ }
1185
+ return await themeLoader();
1186
+ }
1187
+
1188
+ // src/tokens/colors.ts
1189
+ var primaryColors = {
1190
+ 50: "210 40% 98%",
1191
+ // Lightest blue
1192
+ 100: "210 40% 96%",
1193
+ 200: "217 32.6% 17.5%",
1194
+ 300: "216 28% 26%",
1195
+ 400: "215 25% 27%",
1196
+ 500: "215 20% 35%",
1197
+ // Base primary
1198
+ 600: "215 16% 47%",
1199
+ 700: "216 12% 54%",
1200
+ 800: "217 10% 62%",
1201
+ 900: "222 47.4% 11.2%",
1202
+ 950: "222 84% 4.9%"
1203
+ // Darkest blue
1204
+ };
1205
+ var accentColors = {
1206
+ 50: "280 100% 98%",
1207
+ 100: "280 65% 96%",
1208
+ 200: "280 60% 85%",
1209
+ 300: "280 55% 75%",
1210
+ 400: "280 50% 65%",
1211
+ 500: "280 70% 67%",
1212
+ // Base accent (night mode primary)
1213
+ 600: "259 65% 58%",
1214
+ 700: "259 60% 50%",
1215
+ 800: "259 55% 45%",
1216
+ 900: "259 50% 40%",
1217
+ 950: "259 45% 30%"
1218
+ };
1219
+ var secondaryColors = {
1220
+ 50: "173 100% 98%",
1221
+ 100: "173 100% 95%",
1222
+ 200: "173 100% 85%",
1223
+ 300: "173 100% 70%",
1224
+ 400: "173 100% 55%",
1225
+ 500: "173 100% 37%",
1226
+ // Base secondary (Tenerife #00bfa6)
1227
+ 600: "173 100% 32%",
1228
+ 700: "173 95% 27%",
1229
+ 800: "173 90% 22%",
1230
+ 900: "173 85% 17%",
1231
+ 950: "173 80% 12%"
1232
+ };
1233
+ var surfaceColors = {
1234
+ day: {
1235
+ base: "0 0% 100%",
1236
+ // White background
1237
+ elevated1: "0 0% 98%",
1238
+ // Slightly elevated
1239
+ elevated2: "0 0% 96%",
1240
+ // More elevated
1241
+ elevated3: "0 0% 94%",
1242
+ // Most elevated
1243
+ overlay: "0 0% 0% / 0.5",
1244
+ // Overlay backdrop
1245
+ glass: "0 0% 100% / 0.8"
1246
+ // Glass effect
1247
+ },
1248
+ night: {
1249
+ base: "240 10% 3.9%",
1250
+ // Dark background (#0b0b10)
1251
+ elevated1: "240 10% 5.1%",
1252
+ // #0e1016
1253
+ elevated2: "240 10% 6.3%",
1254
+ // Slightly lighter
1255
+ elevated3: "240 10% 7.5%",
1256
+ // Even lighter
1257
+ overlay: "0 0% 0% / 0.7",
1258
+ // Darker overlay
1259
+ glass: "240 10% 10% / 0.9"
1260
+ // Dark glass effect
1261
+ }
1262
+ };
1263
+ var semanticColors = {
1264
+ day: {
1265
+ success: "142 70% 28%",
1266
+ // Darker green for better contrast
1267
+ successForeground: "0 0% 100%",
1268
+ error: "0 80% 40%",
1269
+ // Richer red for contrast
1270
+ errorForeground: "0 0% 100%",
1271
+ warning: "38 92% 50%",
1272
+ // Orange
1273
+ warningForeground: "0 0% 9%",
1274
+ info: "199 89% 48%",
1275
+ // Blue
1276
+ infoForeground: "0 0% 100%"
1277
+ },
1278
+ night: {
1279
+ success: "142 70% 45%",
1280
+ successForeground: "0 0% 100%",
1281
+ error: "0 62.8% 30.6%",
1282
+ // Darker red
1283
+ errorForeground: "0 0% 98%",
1284
+ warning: "38 92% 33%",
1285
+ // Darker orange for WCAG AA contrast with white text
1286
+ warningForeground: "0 0% 100%",
1287
+ // Light foreground for dark theme readability
1288
+ info: "199 89% 35%",
1289
+ // Darker blue for WCAG AA contrast with white text
1290
+ infoForeground: "0 0% 100%"
1291
+ // Light foreground for dark theme readability
1292
+ }
1293
+ };
1294
+ var chartColors = {
1295
+ day: {
1296
+ chart1: "12 76% 61%",
1297
+ // Orange-red
1298
+ chart2: "173 58% 39%",
1299
+ // Teal-cyan
1300
+ chart3: "197 37% 24%",
1301
+ // Dark blue
1302
+ chart4: "43 74% 66%",
1303
+ // Yellow
1304
+ chart5: "27 87% 67%"
1305
+ // Orange
1306
+ },
1307
+ night: {
1308
+ chart1: "220 70% 50%",
1309
+ // Blue
1310
+ chart2: "160 60% 45%",
1311
+ // Teal
1312
+ chart3: "30 80% 55%",
1313
+ // Orange
1314
+ chart4: "280 65% 60%",
1315
+ // Purple
1316
+ chart5: "340 75% 55%"
1317
+ // Pink
1318
+ }
1319
+ };
1320
+ var textColors = {
1321
+ day: {
1322
+ primary: "0 0% 9%",
1323
+ // Almost black
1324
+ secondary: "0 0% 45%",
1325
+ // Medium gray
1326
+ tertiary: "0 0% 65%",
1327
+ // Light gray
1328
+ muted: "0 0% 38%",
1329
+ // Muted gray with stronger contrast
1330
+ inverse: "0 0% 100%"
1331
+ // White (for dark backgrounds)
1332
+ },
1333
+ night: {
1334
+ primary: "0 0% 89.8%",
1335
+ // Light gray (#e5e7eb)
1336
+ secondary: "240 5% 64.9%",
1337
+ // Medium gray
1338
+ tertiary: "240 5% 50%",
1339
+ // Darker gray
1340
+ muted: "240 5% 64.9%",
1341
+ // Muted gray
1342
+ inverse: "0 0% 9%"
1343
+ // Almost black (for light backgrounds)
1344
+ }
1345
+ };
1346
+ var baseColors = {
1347
+ day: {
1348
+ background: "0 0% 100%",
1349
+ foreground: "0 0% 9%",
1350
+ card: "0 0% 100%",
1351
+ cardForeground: "0 0% 9%",
1352
+ popover: "0 0% 100%",
1353
+ popoverForeground: "0 0% 9%",
1354
+ border: "0 0% 89.8%",
1355
+ input: "0 0% 89.8%",
1356
+ ring: "0 0% 3.9%"
1357
+ },
1358
+ night: {
1359
+ background: "240 10% 3.9%",
1360
+ // #0b0b10
1361
+ foreground: "0 0% 89.8%",
1362
+ // #e5e7eb
1363
+ card: "240 10% 3.9%",
1364
+ cardForeground: "0 0% 89.8%",
1365
+ popover: "240 10% 5.1%",
1366
+ // #0e1016
1367
+ popoverForeground: "0 0% 89.8%",
1368
+ border: "240 3.7% 15.9%",
1369
+ input: "240 3.7% 15.9%",
1370
+ ring: "240 4.9% 83.9%"
1371
+ }
1372
+ };
1373
+ var cssVariableColorTokens = {
1374
+ day: {
1375
+ ...baseColors.day,
1376
+ primary: "hsl(var(--tm-primary))",
1377
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
1378
+ secondary: "hsl(var(--tm-secondary))",
1379
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1380
+ muted: "hsl(var(--muted))",
1381
+ mutedForeground: "hsl(var(--muted-foreground))",
1382
+ accent: "hsl(var(--tm-accent))",
1383
+ accentForeground: "hsl(var(--tm-accent-foreground))",
1384
+ destructive: `hsl(${semanticColors.day.error})`,
1385
+ destructiveForeground: semanticColors.day.errorForeground,
1386
+ chart1: `hsl(${chartColors.day.chart1})`,
1387
+ chart2: `hsl(${chartColors.day.chart2})`,
1388
+ chart3: `hsl(${chartColors.day.chart3})`,
1389
+ chart4: `hsl(${chartColors.day.chart4})`,
1390
+ chart5: `hsl(${chartColors.day.chart5})`
1391
+ },
1392
+ night: {
1393
+ ...baseColors.night,
1394
+ primary: "hsl(var(--tm-primary))",
1395
+ primaryForeground: "hsl(var(--tm-primary-foreground))",
1396
+ secondary: "hsl(var(--tm-secondary))",
1397
+ secondaryForeground: "hsl(var(--tm-secondary-foreground))",
1398
+ muted: "hsl(var(--muted))",
1399
+ mutedForeground: "hsl(var(--muted-foreground))",
1400
+ accent: "hsl(var(--tm-accent))",
1401
+ accentForeground: "hsl(var(--tm-accent-foreground))",
1402
+ destructive: `hsl(${semanticColors.night.error})`,
1403
+ destructiveForeground: semanticColors.night.errorForeground,
1404
+ chart1: `hsl(${chartColors.night.chart1})`,
1405
+ chart2: `hsl(${chartColors.night.chart2})`,
1406
+ chart3: `hsl(${chartColors.night.chart3})`,
1407
+ chart4: `hsl(${chartColors.night.chart4})`,
1408
+ chart5: `hsl(${chartColors.night.chart5})`
1409
+ }
1410
+ };
1411
+ ({
1412
+ // Primary scale
1413
+ "--primary-50": primaryColors[50],
1414
+ "--primary-100": primaryColors[100],
1415
+ "--primary-200": primaryColors[200],
1416
+ "--primary-300": primaryColors[300],
1417
+ "--primary-400": primaryColors[400],
1418
+ "--primary-500": primaryColors[500],
1419
+ "--primary-600": primaryColors[600],
1420
+ "--primary-700": primaryColors[700],
1421
+ "--primary-800": primaryColors[800],
1422
+ "--primary-900": primaryColors[900],
1423
+ "--primary-950": primaryColors[950],
1424
+ // Accent scale
1425
+ "--accent-50": accentColors[50],
1426
+ "--accent-100": accentColors[100],
1427
+ "--accent-200": accentColors[200],
1428
+ "--accent-300": accentColors[300],
1429
+ "--accent-400": accentColors[400],
1430
+ "--accent-500": accentColors[500],
1431
+ "--accent-600": accentColors[600],
1432
+ "--accent-700": accentColors[700],
1433
+ "--accent-800": accentColors[800],
1434
+ "--accent-900": accentColors[900],
1435
+ "--accent-950": accentColors[950],
1436
+ // Secondary scale
1437
+ "--secondary-50": secondaryColors[50],
1438
+ "--secondary-100": secondaryColors[100],
1439
+ "--secondary-200": secondaryColors[200],
1440
+ "--secondary-300": secondaryColors[300],
1441
+ "--secondary-400": secondaryColors[400],
1442
+ "--secondary-500": secondaryColors[500],
1443
+ "--secondary-600": secondaryColors[600],
1444
+ "--secondary-700": secondaryColors[700],
1445
+ "--secondary-800": secondaryColors[800],
1446
+ "--secondary-900": secondaryColors[900],
1447
+ "--secondary-950": secondaryColors[950]
1448
+ // Surface colors (mode-dependent, set dynamically by theme system)
1449
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1450
+ // Semantic colors (mode-dependent, set dynamically by theme system)
1451
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1452
+ // Text colors (mode-dependent, set dynamically by theme system)
1453
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1454
+ // Chart colors (mode-dependent, set dynamically by theme system)
1455
+ // Note: These are set via updateCSSVariablesFromTokens() in applyMode.ts
1456
+ });
1457
+ var tailwindThemeColors = {
1458
+ // Base colors
1459
+ background: "hsl(var(--background))",
1460
+ foreground: "hsl(var(--foreground))",
1461
+ // Card colors
1462
+ card: {
1463
+ DEFAULT: "hsl(var(--card))",
1464
+ foreground: "hsl(var(--card-foreground))"
1465
+ },
1466
+ // Popover colors
1467
+ popover: {
1468
+ DEFAULT: "hsl(var(--popover))",
1469
+ foreground: "hsl(var(--popover-foreground))"
1470
+ },
1471
+ // Primary colors (using CSS variables)
1472
+ primary: {
1473
+ DEFAULT: "hsl(var(--tm-primary))",
1474
+ foreground: "hsl(var(--tm-primary-foreground))",
1475
+ 50: `hsl(var(--primary-50))`,
1476
+ 100: `hsl(var(--primary-100))`,
1477
+ 200: `hsl(var(--primary-200))`,
1478
+ 300: `hsl(var(--primary-300))`,
1479
+ 400: `hsl(var(--primary-400))`,
1480
+ 500: `hsl(var(--primary-500))`,
1481
+ 600: `hsl(var(--primary-600))`,
1482
+ 700: `hsl(var(--primary-700))`,
1483
+ 800: `hsl(var(--primary-800))`,
1484
+ 900: `hsl(var(--primary-900))`,
1485
+ 950: `hsl(var(--primary-950))`
1486
+ },
1487
+ // Secondary colors
1488
+ secondary: {
1489
+ DEFAULT: "hsl(var(--tm-secondary))",
1490
+ foreground: "hsl(var(--tm-secondary-foreground))",
1491
+ 50: `hsl(var(--secondary-50))`,
1492
+ 100: `hsl(var(--secondary-100))`,
1493
+ 200: `hsl(var(--secondary-200))`,
1494
+ 300: `hsl(var(--secondary-300))`,
1495
+ 400: `hsl(var(--secondary-400))`,
1496
+ 500: `hsl(var(--secondary-500))`,
1497
+ 600: `hsl(var(--secondary-600))`,
1498
+ 700: `hsl(var(--secondary-700))`,
1499
+ 800: `hsl(var(--secondary-800))`,
1500
+ 900: `hsl(var(--secondary-900))`,
1501
+ 950: `hsl(var(--secondary-950))`
1502
+ },
1503
+ // Accent colors
1504
+ accent: {
1505
+ DEFAULT: "hsl(var(--tm-accent))",
1506
+ foreground: "hsl(var(--tm-accent-foreground))",
1507
+ 50: `hsl(var(--accent-50))`,
1508
+ 100: `hsl(var(--accent-100))`,
1509
+ 200: `hsl(var(--accent-200))`,
1510
+ 300: `hsl(var(--accent-300))`,
1511
+ 400: `hsl(var(--accent-400))`,
1512
+ 500: `hsl(var(--accent-500))`,
1513
+ 600: `hsl(var(--accent-600))`,
1514
+ 700: `hsl(var(--accent-700))`,
1515
+ 800: `hsl(var(--accent-800))`,
1516
+ 900: `hsl(var(--accent-900))`,
1517
+ 950: `hsl(var(--accent-950))`
1518
+ },
1519
+ // Muted colors
1520
+ muted: {
1521
+ DEFAULT: "hsl(var(--muted))",
1522
+ foreground: "hsl(var(--muted-foreground))"
1523
+ },
1524
+ // Destructive colors (semantic error)
1525
+ destructive: {
1526
+ DEFAULT: "hsl(var(--destructive))",
1527
+ foreground: "hsl(var(--destructive-foreground))"
1528
+ },
1529
+ // Semantic colors
1530
+ success: {
1531
+ DEFAULT: `hsl(var(--semantic-success))`,
1532
+ foreground: `hsl(var(--semantic-success-foreground))`
1533
+ },
1534
+ error: {
1535
+ DEFAULT: `hsl(var(--semantic-error))`,
1536
+ foreground: `hsl(var(--semantic-error-foreground))`
1537
+ },
1538
+ warning: {
1539
+ DEFAULT: `hsl(var(--semantic-warning))`,
1540
+ foreground: `hsl(var(--semantic-warning-foreground))`
1541
+ },
1542
+ info: {
1543
+ DEFAULT: `hsl(var(--semantic-info))`,
1544
+ foreground: `hsl(var(--semantic-info-foreground))`
1545
+ },
1546
+ // Surface colors
1547
+ surface: {
1548
+ base: `hsl(var(--surface-base))`,
1549
+ elevated1: `hsl(var(--surface-elevated1))`,
1550
+ elevated2: `hsl(var(--surface-elevated2))`,
1551
+ elevated3: `hsl(var(--surface-elevated3))`,
1552
+ overlay: `hsl(var(--surface-overlay))`,
1553
+ glass: `hsl(var(--surface-glass))`
1554
+ },
1555
+ // Text colors
1556
+ text: {
1557
+ primary: `hsl(var(--text-primary))`,
1558
+ secondary: `hsl(var(--text-secondary))`,
1559
+ tertiary: `hsl(var(--text-tertiary))`,
1560
+ muted: `hsl(var(--text-muted))`,
1561
+ destructive: `hsl(var(--destructive))`,
1562
+ accent: `hsl(var(--tm-accent))`,
1563
+ inverse: `hsl(var(--text-inverse))`
1564
+ },
1565
+ // Border and input
1566
+ border: "hsl(var(--border))",
1567
+ input: "hsl(var(--input))",
1568
+ ring: "hsl(var(--ring))",
1569
+ // Chart colors (using CSS variables)
1570
+ chart: {
1571
+ 1: `hsl(var(--chart-1))`,
1572
+ 2: `hsl(var(--chart-2))`,
1573
+ 3: `hsl(var(--chart-3))`,
1574
+ 4: `hsl(var(--chart-4))`,
1575
+ 5: `hsl(var(--chart-5))`
1576
+ }
1577
+ };
1578
+
1579
+ // src/tokens/motion.ts
1580
+ var durations = {
1581
+ instant: "0ms",
1582
+ fast: "150ms",
1583
+ // 1.5 × base (quick interactions)
1584
+ normal: "300ms",
1585
+ // 3 × base (default)
1586
+ slow: "500ms",
1587
+ // 5 × base (emphasized)
1588
+ slower: "700ms",
1589
+ // 7 × base (very emphasized)
1590
+ slowest: "1000ms",
1591
+ // 10 × base (maximum emphasis)
1592
+ // Additional granular durations
1593
+ "75": "75ms",
1594
+ // Ultra-fast
1595
+ "100": "100ms",
1596
+ // Base unit
1597
+ "200": "200ms",
1598
+ // Fast-normal
1599
+ "250": "250ms",
1600
+ // Between fast and normal
1601
+ "400": "400ms",
1602
+ // Between normal and slow
1603
+ "600": "600ms",
1604
+ // Between slow and slower
1605
+ "800": "800ms"
1606
+ // Between slower and slowest
1607
+ };
1608
+ var easings = {
1609
+ // Linear (no easing)
1610
+ linear: "linear",
1611
+ // Ease-in (accelerate) - cubic-bezier
1612
+ "ease-in": "cubic-bezier(0.4, 0, 1, 1)",
1613
+ // Ease-out (decelerate) - recommended for most UI - cubic-bezier
1614
+ "ease-out": "cubic-bezier(0, 0, 0.2, 1)",
1615
+ // Ease-in-out (accelerate and decelerate)
1616
+ "ease-in-out": "cubic-bezier(0.4, 0, 0.2, 1)",
1617
+ // Advanced easing functions
1618
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
1619
+ elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)",
1620
+ // Material Design easing
1621
+ "ease-out-cubic": "cubic-bezier(0.215, 0.61, 0.355, 1)",
1622
+ "ease-in-cubic": "cubic-bezier(0.55, 0.055, 0.675, 0.19)",
1623
+ "ease-in-out-cubic": "cubic-bezier(0.645, 0.045, 0.355, 1)"
1624
+ };
1625
+ var transitions = {
1626
+ // Fast transitions (quick interactions)
1627
+ fast: `${durations.fast} ${easings["ease-out"]}`,
1628
+ "fast-in": `${durations.fast} ${easings["ease-in"]}`,
1629
+ "fast-out": `${durations.fast} ${easings["ease-out"]}`,
1630
+ "fast-in-out": `${durations.fast} ${easings["ease-in-out"]}`,
1631
+ // Normal transitions (default)
1632
+ normal: `${durations.normal} ${easings["ease-in-out"]}`,
1633
+ "normal-in": `${durations.normal} ${easings["ease-in"]}`,
1634
+ "normal-out": `${durations.normal} ${easings["ease-out"]}`,
1635
+ "normal-in-out": `${durations.normal} ${easings["ease-in-out"]}`,
1636
+ // Slow transitions (emphasized)
1637
+ slow: `${durations.slow} ${easings["ease-in-out"]}`,
1638
+ "slow-in": `${durations.slow} ${easings["ease-in"]}`,
1639
+ "slow-out": `${durations.slow} ${easings["ease-out"]}`,
1640
+ "slow-in-out": `${durations.slow} ${easings["ease-in-out"]}`,
1641
+ // Special transitions
1642
+ bounce: `${durations.normal} ${easings.bounce}`,
1643
+ elastic: `${durations.slow} ${easings.elastic}`,
1644
+ // Default (normal)
1645
+ DEFAULT: `${durations.normal} ${easings["ease-in-out"]}`
1646
+ };
1647
+ var motionCSSVariables = {
1648
+ // Durations
1649
+ "--duration-instant": durations.instant,
1650
+ "--duration-fast": durations.fast,
1651
+ "--duration-normal": durations.normal,
1652
+ "--duration-slow": durations.slow,
1653
+ "--duration-slower": durations.slower,
1654
+ "--duration-slowest": durations.slowest,
1655
+ // Additional granular durations
1656
+ "--duration-75": durations["75"],
1657
+ "--duration-100": durations["100"],
1658
+ "--duration-200": durations["200"],
1659
+ "--duration-250": durations["250"],
1660
+ "--duration-400": durations["400"],
1661
+ "--duration-600": durations["600"],
1662
+ "--duration-800": durations["800"],
1663
+ // Easings
1664
+ "--ease-linear": easings.linear,
1665
+ "--ease-in": easings["ease-in"],
1666
+ "--ease-out": easings["ease-out"],
1667
+ "--ease-in-out": easings["ease-in-out"],
1668
+ "--ease-bounce": easings.bounce,
1669
+ "--ease-elastic": easings.elastic,
1670
+ "--ease-out-cubic": easings["ease-out-cubic"],
1671
+ "--ease-in-cubic": easings["ease-in-cubic"],
1672
+ "--ease-in-out-cubic": easings["ease-in-out-cubic"],
1673
+ // Transitions
1674
+ "--transition-fast": transitions.fast,
1675
+ "--transition-normal": transitions.normal,
1676
+ "--transition-slow": transitions.slow,
1677
+ "--transition-default": transitions.DEFAULT,
1678
+ "--transition-fast-in": transitions["fast-in"],
1679
+ "--transition-fast-out": transitions["fast-out"],
1680
+ "--transition-fast-in-out": transitions["fast-in-out"],
1681
+ "--transition-normal-in": transitions["normal-in"],
1682
+ "--transition-normal-out": transitions["normal-out"],
1683
+ "--transition-normal-in-out": transitions["normal-in-out"],
1684
+ "--transition-slow-in": transitions["slow-in"],
1685
+ "--transition-slow-out": transitions["slow-out"],
1686
+ "--transition-slow-in-out": transitions["slow-in-out"],
1687
+ "--transition-bounce": transitions.bounce,
1688
+ "--transition-elastic": transitions.elastic
1689
+ };
1690
+
1691
+ // src/theme/applyMode.ts
1692
+ var MODE_ATTRIBUTE = "data-mode";
1693
+ var THEME_ATTRIBUTE = "data-theme-name";
1694
+ var MODE_THEME_ATTRIBUTE = "data-theme";
1695
+ var DARK_CLASS = "dark";
1696
+ function getInitialMode(defaultMode = "day", storageKey = "tm_mode", enableSystem = true) {
1697
+ if (typeof window === "undefined") return defaultMode;
1698
+ const root = document.documentElement;
1699
+ const attr = root.getAttribute(MODE_ATTRIBUTE);
1700
+ if (attr === "day" || attr === "night") {
1701
+ return attr;
1702
+ }
1703
+ const themeAttr = root.getAttribute(MODE_THEME_ATTRIBUTE);
1704
+ if (themeAttr === "day" || themeAttr === "night") {
1705
+ return themeAttr;
1706
+ }
1707
+ try {
1708
+ const stored = localStorage.getItem(storageKey);
1709
+ if (stored === "day" || stored === "night") {
1710
+ return stored;
1711
+ }
1712
+ const legacy = localStorage.getItem("theme");
1713
+ if (legacy === "dark") return "night";
1714
+ if (legacy === "light") return "day";
1715
+ } catch {
1716
+ }
1717
+ if (enableSystem && typeof window !== "undefined") {
1718
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
1719
+ return prefersDark ? "night" : "day";
1720
+ }
1721
+ return defaultMode;
1722
+ }
1723
+ var currentThemeOverride = null;
1724
+ async function loadThemeOverride(themeName) {
1725
+ if (themeName === "default") {
1726
+ currentThemeOverride = null;
1727
+ return null;
1728
+ }
1729
+ try {
1730
+ const theme = await getTheme(themeName);
1731
+ currentThemeOverride = theme;
1732
+ return theme;
1733
+ } catch (error) {
1734
+ console.warn(`Failed to load theme "${themeName}":`, error);
1735
+ currentThemeOverride = null;
1736
+ return null;
1737
+ }
1738
+ }
1739
+ function mergeColorScale(base, override) {
1740
+ if (!override) return base;
1741
+ return { ...base, ...override };
1742
+ }
1743
+ function mergeObject(base, override) {
1744
+ if (!override) return base;
1745
+ return { ...base, ...override };
1746
+ }
1747
+ function getMergedTokens(_mode) {
1748
+ const override = currentThemeOverride;
1749
+ const primaryColors2 = mergeColorScale(primaryColors, override?.primaryColors);
1750
+ const accentColors2 = mergeColorScale(accentColors, override?.accentColors);
1751
+ const secondaryColors2 = mergeColorScale(secondaryColors, override?.secondaryColors);
1752
+ const baseColors2 = {
1753
+ day: mergeObject(baseColors.day, override?.baseColorsDay),
1754
+ night: mergeObject(baseColors.night, override?.baseColorsNight)
1755
+ };
1756
+ const surfaceColors2 = {
1757
+ day: mergeObject(surfaceColors.day, override?.surfaceColorsDay),
1758
+ night: mergeObject(surfaceColors.night, override?.surfaceColorsNight)
1759
+ };
1760
+ const semanticColors2 = {
1761
+ day: mergeObject(semanticColors.day, override?.semanticColorsDay),
1762
+ night: mergeObject(semanticColors.night, override?.semanticColorsNight)
1763
+ };
1764
+ const textColors2 = {
1765
+ day: mergeObject(textColors.day, override?.textColorsDay),
1766
+ night: mergeObject(textColors.night, override?.textColorsNight)
1767
+ };
1768
+ const chartColors2 = {
1769
+ day: chartColors.day,
1770
+ night: chartColors.night
1771
+ };
1772
+ return {
1773
+ primaryColors: primaryColors2,
1774
+ accentColors: accentColors2,
1775
+ secondaryColors: secondaryColors2,
1776
+ baseColors: baseColors2,
1777
+ surfaceColors: surfaceColors2,
1778
+ semanticColors: semanticColors2,
1779
+ textColors: textColors2,
1780
+ chartColors: chartColors2
1781
+ };
1782
+ }
1783
+ function updateCSSVariablesFromTokens(mode) {
1784
+ if (typeof document === "undefined") return;
1785
+ const root = document.documentElement;
1786
+ const tokens = getMergedTokens();
1787
+ const {
1788
+ primaryColors: primaryColors2,
1789
+ accentColors: accentColors2,
1790
+ secondaryColors: secondaryColors2,
1791
+ baseColors: baseColors2,
1792
+ surfaceColors: surfaceColors2,
1793
+ semanticColors: semanticColors2,
1794
+ textColors: textColors2,
1795
+ chartColors: chartColors2
1796
+ } = tokens;
1797
+ const base = baseColors2[mode];
1798
+ root.style.setProperty("--background", base.background);
1799
+ root.style.setProperty("--foreground", base.foreground);
1800
+ root.style.setProperty("--card", base.card);
1801
+ root.style.setProperty("--card-foreground", base.cardForeground);
1802
+ root.style.setProperty("--popover", base.popover);
1803
+ root.style.setProperty("--popover-foreground", base.popoverForeground);
1804
+ root.style.setProperty("--border", base.border);
1805
+ root.style.setProperty("--input", base.input);
1806
+ root.style.setProperty("--ring", base.ring);
1807
+ const surface = surfaceColors2[mode];
1808
+ root.style.setProperty("--surface-base", surface.base);
1809
+ root.style.setProperty("--surface-elevated1", surface.elevated1);
1810
+ root.style.setProperty("--surface-elevated2", surface.elevated2);
1811
+ root.style.setProperty("--surface-elevated3", surface.elevated3);
1812
+ root.style.setProperty("--surface-overlay", surface.overlay);
1813
+ root.style.setProperty("--surface-glass", surface.glass);
1814
+ const semantic = semanticColors2[mode];
1815
+ root.style.setProperty("--semantic-success", semantic.success);
1816
+ root.style.setProperty("--semantic-success-foreground", semantic.successForeground);
1817
+ root.style.setProperty("--semantic-error", semantic.error);
1818
+ root.style.setProperty("--semantic-error-foreground", semantic.errorForeground);
1819
+ root.style.setProperty("--semantic-warning", semantic.warning);
1820
+ root.style.setProperty("--semantic-warning-foreground", semantic.warningForeground);
1821
+ root.style.setProperty("--semantic-info", semantic.info);
1822
+ root.style.setProperty("--semantic-info-foreground", semantic.infoForeground);
1823
+ const text = textColors2[mode];
1824
+ root.style.setProperty("--text-primary", text.primary);
1825
+ root.style.setProperty("--text-secondary", text.secondary);
1826
+ root.style.setProperty("--text-tertiary", text.tertiary);
1827
+ root.style.setProperty("--text-muted", text.muted);
1828
+ root.style.setProperty("--text-inverse", text.inverse);
1829
+ const chart = chartColors2[mode];
1830
+ root.style.setProperty("--chart-1", chart.chart1);
1831
+ root.style.setProperty("--chart-2", chart.chart2);
1832
+ root.style.setProperty("--chart-3", chart.chart3);
1833
+ root.style.setProperty("--chart-4", chart.chart4);
1834
+ root.style.setProperty("--chart-5", chart.chart5);
1835
+ root.style.setProperty("--primary-50", primaryColors2[50]);
1836
+ root.style.setProperty("--primary-100", primaryColors2[100]);
1837
+ root.style.setProperty("--primary-200", primaryColors2[200]);
1838
+ root.style.setProperty("--primary-300", primaryColors2[300]);
1839
+ root.style.setProperty("--primary-400", primaryColors2[400]);
1840
+ root.style.setProperty("--primary-500", primaryColors2[500]);
1841
+ root.style.setProperty("--primary-600", primaryColors2[600]);
1842
+ root.style.setProperty("--primary-700", primaryColors2[700]);
1843
+ root.style.setProperty("--primary-800", primaryColors2[800]);
1844
+ root.style.setProperty("--primary-900", primaryColors2[900]);
1845
+ root.style.setProperty("--primary-950", primaryColors2[950]);
1846
+ root.style.setProperty("--accent-50", accentColors2[50]);
1847
+ root.style.setProperty("--accent-100", accentColors2[100]);
1848
+ root.style.setProperty("--accent-200", accentColors2[200]);
1849
+ root.style.setProperty("--accent-300", accentColors2[300]);
1850
+ root.style.setProperty("--accent-400", accentColors2[400]);
1851
+ root.style.setProperty("--accent-500", accentColors2[500]);
1852
+ root.style.setProperty("--accent-600", accentColors2[600]);
1853
+ root.style.setProperty("--accent-700", accentColors2[700]);
1854
+ root.style.setProperty("--accent-800", accentColors2[800]);
1855
+ root.style.setProperty("--accent-900", accentColors2[900]);
1856
+ root.style.setProperty("--accent-950", accentColors2[950]);
1857
+ root.style.setProperty("--secondary-50", secondaryColors2[50]);
1858
+ root.style.setProperty("--secondary-100", secondaryColors2[100]);
1859
+ root.style.setProperty("--secondary-200", secondaryColors2[200]);
1860
+ root.style.setProperty("--secondary-300", secondaryColors2[300]);
1861
+ root.style.setProperty("--secondary-400", secondaryColors2[400]);
1862
+ root.style.setProperty("--secondary-500", secondaryColors2[500]);
1863
+ root.style.setProperty("--secondary-600", secondaryColors2[600]);
1864
+ root.style.setProperty("--secondary-700", secondaryColors2[700]);
1865
+ root.style.setProperty("--secondary-800", secondaryColors2[800]);
1866
+ root.style.setProperty("--secondary-900", secondaryColors2[900]);
1867
+ root.style.setProperty("--secondary-950", secondaryColors2[950]);
1868
+ if (mode === "day") {
1869
+ root.style.setProperty("--tm-primary", secondaryColors2[500]);
1870
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1871
+ root.style.setProperty("--tm-secondary", "0 0% 95.7%");
1872
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 6.7%");
1873
+ root.style.setProperty("--tm-accent", "0 0% 89.8%");
1874
+ root.style.setProperty("--tm-accent-foreground", "0 0% 6.7%");
1875
+ } else {
1876
+ root.style.setProperty("--tm-primary", accentColors2[600]);
1877
+ root.style.setProperty("--tm-primary-foreground", "0 0% 100%");
1878
+ root.style.setProperty("--tm-secondary", "240 10% 7%");
1879
+ root.style.setProperty("--tm-secondary-foreground", "0 0% 89.8%");
1880
+ root.style.setProperty("--tm-accent", "240 10% 10%");
1881
+ root.style.setProperty("--tm-accent-foreground", "0 0% 89.8%");
1882
+ }
1883
+ root.style.setProperty("--muted", base.card);
1884
+ root.style.setProperty("--muted-foreground", base.cardForeground);
1885
+ root.style.setProperty("--destructive", semantic.error);
1886
+ root.style.setProperty("--destructive-foreground", semantic.errorForeground);
1887
+ Object.entries(motionCSSVariables).forEach(([key, value]) => {
1888
+ root.style.setProperty(key, value);
1889
+ });
1890
+ }
1891
+ async function applyDocumentTheme(mode, themeName = "default", brandId = null) {
1892
+ if (typeof document === "undefined") return;
1893
+ await loadThemeOverride(themeName);
1894
+ const currentBrand = getActiveBrand();
1895
+ if (currentBrand && (!brandId || currentBrand.id !== brandId)) {
1896
+ removeBrandOverrides(currentBrand.namespace);
1897
+ }
1898
+ if (brandId) {
1899
+ try {
1900
+ const brand = await loadBrand(brandId);
1901
+ applyBrandOverrides(brand, mode);
1902
+ } catch (error) {
1903
+ console.warn(`Failed to apply brand "${brandId}":`, error);
1904
+ }
1905
+ }
1906
+ const { documentElement: root, body } = document;
1907
+ root.setAttribute(MODE_ATTRIBUTE, mode);
1908
+ root.setAttribute(MODE_THEME_ATTRIBUTE, mode);
1909
+ root.setAttribute(THEME_ATTRIBUTE, themeName);
1910
+ if (mode === "night") {
1911
+ root.classList.add(DARK_CLASS);
1912
+ } else {
1913
+ root.classList.remove(DARK_CLASS);
1914
+ }
1915
+ updateCSSVariablesFromTokens(mode);
1916
+ const tokens = getMergedTokens();
1917
+ const { background, foreground } = tokens.baseColors[mode];
1918
+ if (body) {
1919
+ body.dataset.mode = mode;
1920
+ body.dataset.theme = themeName;
1921
+ if (brandId) {
1922
+ body.dataset.brand = brandId;
1923
+ } else {
1924
+ body.removeAttribute("data-brand");
1925
+ }
1926
+ body.style.backgroundColor = `hsl(${background})`;
1927
+ body.style.color = `hsl(${foreground})`;
1928
+ }
1929
+ }
1930
+ async function applyDocumentMode(mode) {
1931
+ if (typeof document !== "undefined") {
1932
+ const root = document.documentElement;
1933
+ const currentTheme = root.getAttribute(THEME_ATTRIBUTE) || "default";
1934
+ const currentBrand = root.getAttribute("data-brand") || null;
1935
+ await applyDocumentTheme(mode, currentTheme, currentBrand);
1936
+ } else {
1937
+ await applyDocumentTheme(mode, "default", null);
1938
+ }
1939
+ }
1940
+ function getInitialTheme(defaultTheme2 = "default", storageKey = "tm_theme") {
1941
+ if (typeof window === "undefined") return defaultTheme2;
1942
+ const root = document.documentElement;
1943
+ const attr = root.getAttribute(THEME_ATTRIBUTE);
1944
+ if (attr === "default" || attr === "dark" || attr === "brand") {
1945
+ return attr;
1946
+ }
1947
+ try {
1948
+ const stored = localStorage.getItem(storageKey);
1949
+ if (stored === "default" || stored === "dark" || stored === "brand") {
1950
+ return stored;
1951
+ }
1952
+ } catch {
1953
+ }
1954
+ return defaultTheme2;
1955
+ }
1956
+ function persistMode(mode, storageKey = "tm_mode") {
1957
+ if (typeof window === "undefined") return;
1958
+ try {
1959
+ localStorage.setItem(storageKey, mode);
1960
+ localStorage.setItem("theme", mode === "night" ? "dark" : "light");
1961
+ } catch {
1962
+ }
1963
+ }
1964
+ function persistTheme(theme, storageKey = "tm_theme") {
1965
+ if (typeof window === "undefined") return;
1966
+ try {
1967
+ localStorage.setItem(storageKey, theme);
1968
+ } catch {
1969
+ }
1970
+ }
1971
+ function getInitialBrand(defaultBrand = null, storageKey = "tm_brand") {
1972
+ if (typeof window === "undefined") return defaultBrand;
1973
+ const root = document.documentElement;
1974
+ const attr = root.getAttribute("data-brand");
1975
+ if (attr) {
1976
+ return attr;
1977
+ }
1978
+ try {
1979
+ const stored = localStorage.getItem(storageKey);
1980
+ if (stored) {
1981
+ return stored;
1982
+ }
1983
+ } catch {
1984
+ }
1985
+ return defaultBrand;
1986
+ }
1987
+ function persistBrand(brandId, storageKey = "tm_brand") {
1988
+ if (typeof window === "undefined") return;
1989
+ try {
1990
+ if (brandId) {
1991
+ localStorage.setItem(storageKey, brandId);
1992
+ } else {
1993
+ localStorage.removeItem(storageKey);
1994
+ }
1995
+ } catch {
1996
+ }
1997
+ }
1998
+
1999
+ // src/theme/registry.ts
2000
+ var themeRegistry = /* @__PURE__ */ new Map();
2001
+ function registerTheme(entry) {
2002
+ themeRegistry.set(entry.metadata.id, entry);
2003
+ }
2004
+ function getThemeMetadata(id) {
2005
+ return themeRegistry.get(id)?.metadata;
2006
+ }
2007
+ function getAllThemes() {
2008
+ return Array.from(themeRegistry.values()).filter((entry) => entry.enabled !== false).map((entry) => entry.metadata);
2009
+ }
2010
+ function getThemesByCategory(category) {
2011
+ return getAllThemes().filter((theme) => theme.category === category);
2012
+ }
2013
+ function themeExists(id) {
2014
+ return themeRegistry.has(id);
2015
+ }
2016
+ async function loadTheme(id) {
2017
+ const entry = themeRegistry.get(id);
2018
+ if (!entry) {
2019
+ throw new Error(`Theme "${id}" not found in registry`);
2020
+ }
2021
+ if (entry.enabled === false) {
2022
+ throw new Error(`Theme "${id}" is disabled`);
2023
+ }
2024
+ try {
2025
+ const module = await entry.loader();
2026
+ return module.default;
2027
+ } catch (error) {
2028
+ throw new Error(
2029
+ `Failed to load theme "${id}": ${error instanceof Error ? error.message : String(error)}`
2030
+ );
2031
+ }
2032
+ }
2033
+ function initializeDefaultThemes() {
2034
+ registerTheme({
2035
+ metadata: {
2036
+ id: "default",
2037
+ name: "Default",
2038
+ description: "Default Tenerife UI theme with standard color palette",
2039
+ category: "default",
2040
+ version: "1.0.0"
2041
+ },
2042
+ loader: async () => {
2043
+ const m = await Promise.resolve().then(() => (init_default(), default_exports));
2044
+ return { default: { ...m.defaultTheme, id: "default", name: "Default" } };
2045
+ },
2046
+ enabled: true
2047
+ });
2048
+ registerTheme({
2049
+ metadata: {
2050
+ id: "dark",
2051
+ name: "Dark",
2052
+ description: "Enhanced dark theme with deeper surfaces and higher contrast",
2053
+ category: "default",
2054
+ version: "1.0.0"
2055
+ },
2056
+ loader: async () => {
2057
+ const m = await Promise.resolve().then(() => (init_dark(), dark_exports));
2058
+ return { default: { ...m.darkTheme, id: "dark", name: "Dark" } };
2059
+ },
2060
+ enabled: true
2061
+ });
2062
+ registerTheme({
2063
+ metadata: {
2064
+ id: "brand",
2065
+ name: "Brand",
2066
+ description: "Brand-specific theme with custom color palette",
2067
+ category: "brand",
2068
+ version: "1.0.0"
2069
+ },
2070
+ loader: async () => {
2071
+ const m = await Promise.resolve().then(() => (init_brand(), brand_exports));
2072
+ return { default: { ...m.brandTheme, id: "brand", name: "Brand" } };
2073
+ },
2074
+ enabled: true
2075
+ });
2076
+ }
2077
+ initializeDefaultThemes();
2078
+
2079
+ // src/theme/schema.ts
2080
+ var REQUIRED_FIELDS = ["id", "name"];
2081
+ function validateThemeSchema(theme) {
2082
+ const errors = [];
2083
+ const warnings = [];
2084
+ if (!theme || typeof theme !== "object") {
2085
+ return {
2086
+ valid: false,
2087
+ errors: ["Theme must be an object"],
2088
+ warnings: []
2089
+ };
2090
+ }
2091
+ const themeObj = theme;
2092
+ for (const field of REQUIRED_FIELDS) {
2093
+ if (!(field in themeObj) || !themeObj[field]) {
2094
+ errors.push(`Missing required field: ${field}`);
2095
+ }
2096
+ }
2097
+ if (themeObj.id && typeof themeObj.id === "string") {
2098
+ const idRegex = /^[a-z0-9]+(?:-[a-z0-9]+)*$/;
2099
+ if (!idRegex.test(themeObj.id)) {
2100
+ errors.push(
2101
+ `Invalid theme ID format: "${themeObj.id}". Must be kebab-case (e.g., "ocean-blue")`
2102
+ );
2103
+ }
2104
+ }
2105
+ if (themeObj.name && typeof themeObj.name !== "string") {
2106
+ errors.push("Theme name must be a string");
2107
+ }
2108
+ if (themeObj.category) {
2109
+ const validCategories = ["default", "brand", "seasonal", "custom"];
2110
+ if (!validCategories.includes(themeObj.category)) {
2111
+ errors.push(
2112
+ `Invalid category: "${themeObj.category}". Must be one of: ${validCategories.join(", ")}`
2113
+ );
2114
+ }
2115
+ }
2116
+ const colorScaleFields = ["primaryColors", "accentColors", "secondaryColors"];
2117
+ for (const field of colorScaleFields) {
2118
+ if (themeObj[field]) {
2119
+ const scale = themeObj[field];
2120
+ const validKeys = [
2121
+ "50",
2122
+ "100",
2123
+ "200",
2124
+ "300",
2125
+ "400",
2126
+ "500",
2127
+ "600",
2128
+ "700",
2129
+ "800",
2130
+ "900",
2131
+ "950"
2132
+ ];
2133
+ for (const key of Object.keys(scale)) {
2134
+ if (!validKeys.includes(key)) {
2135
+ warnings.push(
2136
+ `Invalid color scale key in ${field}: ${key}. Valid keys: ${validKeys.join(", ")}`
2137
+ );
2138
+ }
2139
+ if (typeof scale[key] !== "string") {
2140
+ errors.push(`Color value in ${field}.${key} must be a string (HSL format)`);
2141
+ }
2142
+ }
2143
+ }
2144
+ }
2145
+ if (themeObj.version && typeof themeObj.version === "string") {
2146
+ const semverRegex = /^\d+\.\d+\.\d+$/;
2147
+ if (!semverRegex.test(themeObj.version)) {
2148
+ warnings.push(
2149
+ `Invalid version format: "${themeObj.version}". Should be semver (e.g., "1.0.0")`
2150
+ );
2151
+ }
2152
+ }
2153
+ return {
2154
+ valid: errors.length === 0,
2155
+ errors,
2156
+ warnings
2157
+ };
2158
+ }
2159
+ function isThemeSchema(obj) {
2160
+ const validation = validateThemeSchema(obj);
2161
+ return validation.valid;
2162
+ }
2163
+ function createMinimalThemeSchema(id, name) {
2164
+ return {
2165
+ id,
2166
+ name,
2167
+ description: `Custom theme: ${name}`,
2168
+ category: "custom",
2169
+ version: "1.0.0"
2170
+ };
2171
+ }
2172
+
2173
+ // src/theme/loader.ts
2174
+ var DEFAULT_OPTIONS = {
2175
+ fallbackThemeId: "default",
2176
+ validate: true,
2177
+ throwOnError: false
2178
+ };
2179
+ async function loadThemeSafe(themeId, options = {}) {
2180
+ const opts = { ...DEFAULT_OPTIONS, ...options };
2181
+ const warnings = [];
2182
+ if (!themeExists(themeId)) {
2183
+ if (opts.throwOnError) {
2184
+ throw new Error(`Theme "${themeId}" not found`);
2185
+ }
2186
+ if (opts.fallbackThemeId && themeExists(opts.fallbackThemeId)) {
2187
+ warnings.push(`Theme "${themeId}" not found, using fallback "${opts.fallbackThemeId}"`);
2188
+ return loadThemeSafe(opts.fallbackThemeId, { ...opts, throwOnError: false });
2189
+ }
2190
+ throw new Error(`Theme "${themeId}" not found and no fallback available`);
2191
+ }
2192
+ try {
2193
+ const theme = await loadTheme(themeId);
2194
+ if (opts.validate) {
2195
+ const validation = validateThemeSchema(theme);
2196
+ if (!validation.valid) {
2197
+ if (opts.throwOnError) {
2198
+ throw new Error(`Theme "${themeId}" validation failed: ${validation.errors.join(", ")}`);
2199
+ }
2200
+ if (opts.fallbackThemeId && themeExists(opts.fallbackThemeId)) {
2201
+ warnings.push(
2202
+ `Theme "${themeId}" validation failed: ${validation.errors.join(", ")}. Using fallback "${opts.fallbackThemeId}"`
2203
+ );
2204
+ return loadThemeSafe(opts.fallbackThemeId, { ...opts, throwOnError: false });
2205
+ }
2206
+ throw new Error(`Theme "${themeId}" validation failed: ${validation.errors.join(", ")}`);
2207
+ }
2208
+ warnings.push(...validation.warnings);
2209
+ }
2210
+ return {
2211
+ theme,
2212
+ usedFallback: false,
2213
+ warnings
2214
+ };
2215
+ } catch (error) {
2216
+ if (opts.throwOnError) {
2217
+ throw error;
2218
+ }
2219
+ if (opts.fallbackThemeId && themeExists(opts.fallbackThemeId) && opts.fallbackThemeId !== themeId) {
2220
+ warnings.push(
2221
+ `Failed to load theme "${themeId}": ${error instanceof Error ? error.message : String(error)}. Using fallback "${opts.fallbackThemeId}"`
2222
+ );
2223
+ return loadThemeSafe(opts.fallbackThemeId, { ...opts, throwOnError: false });
2224
+ }
2225
+ throw error;
2226
+ }
2227
+ }
2228
+ async function preloadThemes(themeIds) {
2229
+ const loadPromises = themeIds.map(
2230
+ (id) => loadThemeSafe(id, { validate: false, throwOnError: false }).catch(() => {
2231
+ })
2232
+ );
2233
+ await Promise.all(loadPromises);
2234
+ }
2235
+ function getAvailableThemeIds() {
2236
+ return getAllThemes().map((theme) => theme.id);
2237
+ }
2238
+ async function canLoadTheme(themeId) {
2239
+ if (!themeExists(themeId)) {
2240
+ return false;
2241
+ }
2242
+ try {
2243
+ await loadThemeSafe(themeId, { validate: false, throwOnError: true });
2244
+ return true;
2245
+ } catch {
2246
+ return false;
2247
+ }
2248
+ }
2249
+
2250
+ // src/theme/spacing.ts
2251
+ var spacing = {
2252
+ none: "0",
2253
+ xs: "0.25rem",
2254
+ // 4px
2255
+ sm: "0.5rem",
2256
+ // 8px
2257
+ md: "1rem",
2258
+ // 16px
2259
+ lg: "1.5rem",
2260
+ // 24px
2261
+ xl: "2rem",
2262
+ // 32px
2263
+ "2xl": "2.5rem",
2264
+ // 40px
2265
+ "3xl": "3rem",
2266
+ // 48px
2267
+ "4xl": "4rem",
2268
+ // 64px
2269
+ "5xl": "5rem"
2270
+ // 80px
2271
+ };
2272
+ var borderRadius = {
2273
+ none: "0px",
2274
+ sm: "0.125rem",
2275
+ // 2px
2276
+ base: "0.25rem",
2277
+ // 4px
2278
+ md: "0.375rem",
2279
+ // 6px
2280
+ lg: "0.5rem",
2281
+ // 8px
2282
+ xl: "0.75rem",
2283
+ // 12px
2284
+ "2xl": "1rem",
2285
+ // 16px
2286
+ "3xl": "1.5rem",
2287
+ // 24px
2288
+ full: "9999px"
2289
+ };
2290
+ var shadows = {
2291
+ none: "none",
2292
+ sm: "0 1px 2px 0 rgb(0 0 0 / 0.05)",
2293
+ base: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)",
2294
+ md: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
2295
+ lg: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
2296
+ xl: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
2297
+ "2xl": "0 25px 50px -12px rgb(0 0 0 / 0.25)",
2298
+ inner: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
2299
+ };
2300
+ var ThemeContext = React__default.default.createContext(void 0);
2301
+ function getInitialReduceMotion(override) {
2302
+ if (override !== void 0) return override;
2303
+ if (typeof window === "undefined") return false;
2304
+ try {
2305
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
2306
+ } catch {
2307
+ return false;
2308
+ }
2309
+ }
2310
+ function ThemeProvider({
2311
+ children,
2312
+ defaultMode = "day",
2313
+ defaultTheme: defaultTheme2 = "default",
2314
+ defaultBrand = null,
2315
+ storageKey = "tm_mode",
2316
+ themeStorageKey = "tm_theme",
2317
+ brandStorageKey = "tm_brand",
2318
+ attribute = "data-mode",
2319
+ enableSystem = true,
2320
+ reduceMotion: reduceMotionOverride,
2321
+ enableAnimations: enableAnimationsOverride = true
2322
+ }) {
2323
+ React__default.default.useEffect(() => {
2324
+ try {
2325
+ registerBrand(neonBrand);
2326
+ } catch (error) {
2327
+ console.warn("Failed to register neon brand:", error);
2328
+ }
2329
+ try {
2330
+ registerBrand(minimalBrand);
2331
+ } catch (error) {
2332
+ console.warn("Failed to register minimal brand:", error);
2333
+ }
2334
+ }, []);
2335
+ const [mode, setModeState] = React__default.default.useState(() => {
2336
+ if (typeof window === "undefined") return defaultMode;
2337
+ const root = document.documentElement;
2338
+ const existingMode = root.getAttribute(attribute);
2339
+ if (existingMode === "day" || existingMode === "night") {
2340
+ return existingMode;
2341
+ }
2342
+ try {
2343
+ const stored = localStorage.getItem(storageKey);
2344
+ if (stored === "day" || stored === "night") {
2345
+ return stored;
2346
+ }
2347
+ } catch {
2348
+ }
2349
+ if (enableSystem && typeof window !== "undefined") {
2350
+ const prefersDark = window.matchMedia("(prefers-color-scheme: dark)").matches;
2351
+ return prefersDark ? "night" : "day";
2352
+ }
2353
+ return defaultMode;
2354
+ });
2355
+ const [theme, setThemeState] = React__default.default.useState(() => {
2356
+ if (typeof window === "undefined") return defaultTheme2;
2357
+ return getInitialTheme(defaultTheme2, themeStorageKey);
2358
+ });
2359
+ const [brand, setBrandState] = React__default.default.useState(() => {
2360
+ if (typeof window === "undefined") return defaultBrand;
2361
+ return getInitialBrand(defaultBrand, brandStorageKey);
2362
+ });
2363
+ const [reduceMotion, setReduceMotionState] = React__default.default.useState(() => {
2364
+ return getInitialReduceMotion(reduceMotionOverride);
2365
+ });
2366
+ const [enableAnimations, setEnableAnimationsState] = React__default.default.useState(() => {
2367
+ return enableAnimationsOverride;
2368
+ });
2369
+ const setMode = React__default.default.useCallback(
2370
+ (newMode) => {
2371
+ setModeState(newMode);
2372
+ applyDocumentTheme(newMode, theme, brand);
2373
+ persistMode(newMode, storageKey);
2374
+ },
2375
+ [theme, brand, storageKey]
2376
+ );
2377
+ const setTheme = React__default.default.useCallback(
2378
+ async (newTheme) => {
2379
+ setThemeState(newTheme);
2380
+ await applyDocumentTheme(mode, newTheme, brand);
2381
+ persistTheme(newTheme, themeStorageKey);
2382
+ },
2383
+ [mode, brand, themeStorageKey]
2384
+ );
2385
+ const setBrand = React__default.default.useCallback(
2386
+ async (brandId) => {
2387
+ const currentBrand = getActiveBrand();
2388
+ if (currentBrand) {
2389
+ removeBrandOverrides(currentBrand.namespace);
2390
+ }
2391
+ setBrandState(brandId);
2392
+ persistBrand(brandId, brandStorageKey);
2393
+ if (brandId) {
2394
+ try {
2395
+ const loadedBrand = await loadBrand(brandId);
2396
+ applyBrandOverrides(loadedBrand, mode);
2397
+ } catch (error) {
2398
+ console.error(`Failed to load brand "${brandId}":`, error);
2399
+ setActiveBrand(null);
2400
+ }
2401
+ } else {
2402
+ setActiveBrand(null);
2403
+ }
2404
+ await applyDocumentTheme(mode, theme, brandId);
2405
+ },
2406
+ [mode, theme, brandStorageKey]
2407
+ );
2408
+ const toggleMode = React__default.default.useCallback(() => {
2409
+ setMode(mode === "night" ? "day" : "night");
2410
+ }, [mode, setMode]);
2411
+ const setReduceMotion = React__default.default.useCallback((reduce) => {
2412
+ setReduceMotionState(reduce);
2413
+ try {
2414
+ localStorage.setItem("tm_reduce_motion", reduce ? "true" : "false");
2415
+ } catch {
2416
+ }
2417
+ }, []);
2418
+ const setEnableAnimations = React__default.default.useCallback((enable) => {
2419
+ setEnableAnimationsState(enable);
2420
+ try {
2421
+ localStorage.setItem("tm_enable_animations", enable ? "true" : "false");
2422
+ } catch {
2423
+ }
2424
+ }, []);
2425
+ React__default.default.useEffect(() => {
2426
+ if (reduceMotionOverride !== void 0) return;
2427
+ const mediaQuery = window.matchMedia("(prefers-reduced-motion: reduce)");
2428
+ const handleChange = (e) => {
2429
+ setReduceMotionState(e.matches);
2430
+ };
2431
+ mediaQuery.addEventListener("change", handleChange);
2432
+ return () => mediaQuery.removeEventListener("change", handleChange);
2433
+ }, [reduceMotionOverride]);
2434
+ React__default.default.useEffect(() => {
2435
+ if (reduceMotionOverride === void 0) {
2436
+ try {
2437
+ const storedReduceMotion = localStorage.getItem("tm_reduce_motion");
2438
+ if (storedReduceMotion === "true" || storedReduceMotion === "false") {
2439
+ setReduceMotionState(storedReduceMotion === "true");
2440
+ }
2441
+ } catch {
2442
+ }
2443
+ }
2444
+ if (enableAnimationsOverride === void 0) {
2445
+ try {
2446
+ const storedEnableAnimations = localStorage.getItem("tm_enable_animations");
2447
+ if (storedEnableAnimations === "true" || storedEnableAnimations === "false") {
2448
+ setEnableAnimationsState(storedEnableAnimations === "true");
2449
+ }
2450
+ } catch {
2451
+ }
2452
+ }
2453
+ }, [reduceMotionOverride, enableAnimationsOverride]);
2454
+ React__default.default.useEffect(() => {
2455
+ const initialMode = getInitialMode(defaultMode, storageKey, enableSystem);
2456
+ const initialTheme = getInitialTheme(defaultTheme2, themeStorageKey);
2457
+ const initialBrand = getInitialBrand(defaultBrand, brandStorageKey);
2458
+ setModeState(initialMode);
2459
+ setThemeState(initialTheme);
2460
+ setBrandState(initialBrand);
2461
+ applyDocumentTheme(initialMode, initialTheme, initialBrand);
2462
+ persistMode(initialMode, storageKey);
2463
+ persistTheme(initialTheme, themeStorageKey);
2464
+ persistBrand(initialBrand, brandStorageKey);
2465
+ }, [
2466
+ defaultMode,
2467
+ defaultTheme2,
2468
+ defaultBrand,
2469
+ storageKey,
2470
+ themeStorageKey,
2471
+ brandStorageKey,
2472
+ enableSystem
2473
+ ]);
2474
+ React__default.default.useEffect(() => {
2475
+ if (!enableSystem) return;
2476
+ const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
2477
+ const handleChange = (e) => {
2478
+ try {
2479
+ const stored = localStorage.getItem(storageKey);
2480
+ if (!stored) {
2481
+ setMode(e.matches ? "night" : "day");
2482
+ }
2483
+ } catch {
2484
+ }
2485
+ };
2486
+ mediaQuery.addEventListener("change", handleChange);
2487
+ return () => mediaQuery.removeEventListener("change", handleChange);
2488
+ }, [enableSystem, storageKey, setMode]);
2489
+ React__default.default.useEffect(() => {
2490
+ applyDocumentTheme(mode, theme, brand);
2491
+ }, [mode, theme, brand]);
2492
+ const value = React__default.default.useMemo(
2493
+ () => ({
2494
+ mode,
2495
+ theme,
2496
+ brand,
2497
+ reduceMotion: reduceMotionOverride !== void 0 ? reduceMotionOverride : reduceMotion,
2498
+ enableAnimations: enableAnimationsOverride !== void 0 ? enableAnimationsOverride : enableAnimations,
2499
+ setMode,
2500
+ setTheme,
2501
+ setBrand,
2502
+ toggleMode,
2503
+ setReduceMotion,
2504
+ setEnableAnimations
2505
+ }),
2506
+ [
2507
+ mode,
2508
+ theme,
2509
+ brand,
2510
+ reduceMotion,
2511
+ enableAnimations,
2512
+ reduceMotionOverride,
2513
+ enableAnimationsOverride,
2514
+ setMode,
2515
+ setTheme,
2516
+ setBrand,
2517
+ toggleMode,
2518
+ setReduceMotion,
2519
+ setEnableAnimations
2520
+ ]
2521
+ );
2522
+ return /* @__PURE__ */ jsxRuntime.jsx(ThemeContext.Provider, { value, children });
2523
+ }
2524
+ function useTheme() {
2525
+ const context = React__default.default.useContext(ThemeContext);
2526
+ if (context === void 0) {
2527
+ throw new Error("useTheme must be used within a ThemeProvider");
2528
+ }
2529
+ return context;
2530
+ }
2531
+
2532
+ // src/theme/typography.ts
2533
+ var fontFamilies = {
2534
+ sans: [
2535
+ "ui-sans-serif",
2536
+ "system-ui",
2537
+ "-apple-system",
2538
+ "Segoe UI",
2539
+ "Roboto",
2540
+ "Ubuntu",
2541
+ "Cantarell",
2542
+ "Noto Sans",
2543
+ "Helvetica Neue",
2544
+ "Arial",
2545
+ "Apple Color Emoji",
2546
+ "Segoe UI Emoji",
2547
+ "Segoe UI Symbol",
2548
+ "Noto Color Emoji"
2549
+ ].join(", "),
2550
+ serif: ["ui-serif", "Georgia", "Cambria", "Times New Roman", "Times", "serif"].join(", "),
2551
+ mono: [
2552
+ "ui-monospace",
2553
+ "SFMono-Regular",
2554
+ "Menlo",
2555
+ "Monaco",
2556
+ "Consolas",
2557
+ "Liberation Mono",
2558
+ "Courier New",
2559
+ "monospace"
2560
+ ].join(", ")
2561
+ };
2562
+ var fontSizes = {
2563
+ xs: "0.75rem",
2564
+ // 12px
2565
+ sm: "0.875rem",
2566
+ // 14px
2567
+ base: "1rem",
2568
+ // 16px
2569
+ lg: "1.125rem",
2570
+ // 18px
2571
+ xl: "1.25rem",
2572
+ // 20px
2573
+ "2xl": "1.5rem",
2574
+ // 24px
2575
+ "3xl": "1.875rem",
2576
+ // 30px
2577
+ "4xl": "2.25rem",
2578
+ // 36px
2579
+ "5xl": "3rem",
2580
+ // 48px
2581
+ "6xl": "3.75rem"
2582
+ // 60px
2583
+ };
2584
+ var fontWeights = {
2585
+ thin: "100",
2586
+ extralight: "200",
2587
+ light: "300",
2588
+ normal: "400",
2589
+ medium: "500",
2590
+ semibold: "600",
2591
+ bold: "700",
2592
+ extrabold: "800",
2593
+ black: "900"
2594
+ };
2595
+ var lineHeights = {
2596
+ none: "1",
2597
+ tight: "1.25",
2598
+ snug: "1.375",
2599
+ normal: "1.5",
2600
+ relaxed: "1.625",
2601
+ loose: "2"
2602
+ };
2603
+ var letterSpacings = {
2604
+ tighter: "-0.05em",
2605
+ tight: "-0.025em",
2606
+ normal: "0em",
2607
+ wide: "0.025em",
2608
+ wider: "0.05em",
2609
+ widest: "0.1em"
2610
+ };
2611
+
2612
+ exports.ThemeProvider = ThemeProvider;
2613
+ exports.applyDocumentMode = applyDocumentMode;
2614
+ exports.applyDocumentTheme = applyDocumentTheme;
2615
+ exports.borderRadius = borderRadius;
2616
+ exports.canLoadTheme = canLoadTheme;
2617
+ exports.createMinimalThemeSchema = createMinimalThemeSchema;
2618
+ exports.cssVariableColorTokens = cssVariableColorTokens;
2619
+ exports.fontFamilies = fontFamilies;
2620
+ exports.fontSizes = fontSizes;
2621
+ exports.fontWeights = fontWeights;
2622
+ exports.getAllThemes = getAllThemes;
2623
+ exports.getAvailableThemeIds = getAvailableThemeIds;
2624
+ exports.getInitialBrand = getInitialBrand;
2625
+ exports.getInitialMode = getInitialMode;
2626
+ exports.getInitialTheme = getInitialTheme;
2627
+ exports.getThemeMetadata = getThemeMetadata;
2628
+ exports.getThemesByCategory = getThemesByCategory;
2629
+ exports.initializeDefaultThemes = initializeDefaultThemes;
2630
+ exports.isThemeSchema = isThemeSchema;
2631
+ exports.letterSpacings = letterSpacings;
2632
+ exports.lineHeights = lineHeights;
2633
+ exports.loadTheme = loadTheme;
2634
+ exports.loadThemeOverride = loadThemeOverride;
2635
+ exports.loadThemeSafe = loadThemeSafe;
2636
+ exports.persistBrand = persistBrand;
2637
+ exports.persistMode = persistMode;
2638
+ exports.persistTheme = persistTheme;
2639
+ exports.preloadThemes = preloadThemes;
2640
+ exports.registerTheme = registerTheme;
2641
+ exports.shadows = shadows;
2642
+ exports.spacing = spacing;
2643
+ exports.tailwindThemeColors = tailwindThemeColors;
2644
+ exports.themeExists = themeExists;
2645
+ exports.themeRegistry = themeRegistry;
2646
+ exports.useTheme = useTheme;
2647
+ exports.validateThemeSchema = validateThemeSchema;