@oxyhq/bloom 0.27.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/lib/commonjs/animated-check/AnimatedCheck.js +162 -0
  2. package/lib/commonjs/animated-check/AnimatedCheck.js.map +1 -0
  3. package/lib/commonjs/animated-check/index.js +13 -0
  4. package/lib/commonjs/animated-check/index.js.map +1 -0
  5. package/lib/commonjs/dialog/placement.js +9 -7
  6. package/lib/commonjs/dialog/placement.js.map +1 -1
  7. package/lib/commonjs/fill/index.js.map +1 -1
  8. package/lib/commonjs/hooks/index.js +20 -0
  9. package/lib/commonjs/hooks/index.js.map +1 -1
  10. package/lib/commonjs/hooks/useGutters.js +106 -0
  11. package/lib/commonjs/hooks/useGutters.js.map +1 -0
  12. package/lib/commonjs/hooks/useHaptics.js +69 -0
  13. package/lib/commonjs/hooks/useHaptics.js.map +1 -0
  14. package/lib/commonjs/hooks/useInteractionState.js +8 -2
  15. package/lib/commonjs/hooks/useInteractionState.js.map +1 -1
  16. package/lib/commonjs/index.js +155 -63
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/index.web.js +155 -63
  19. package/lib/commonjs/index.web.js.map +1 -1
  20. package/lib/commonjs/media-inset-border/MediaInsetBorder.js +50 -0
  21. package/lib/commonjs/media-inset-border/MediaInsetBorder.js.map +1 -0
  22. package/lib/commonjs/media-inset-border/index.js +13 -0
  23. package/lib/commonjs/media-inset-border/index.js.map +1 -0
  24. package/lib/commonjs/motion/ScreenTransition.js +46 -0
  25. package/lib/commonjs/motion/ScreenTransition.js.map +1 -0
  26. package/lib/commonjs/motion/index.js +32 -0
  27. package/lib/commonjs/motion/index.js.map +1 -0
  28. package/lib/commonjs/motion/motion.js +93 -0
  29. package/lib/commonjs/motion/motion.js.map +1 -0
  30. package/lib/commonjs/pressable-scale/PressableScale.js +78 -0
  31. package/lib/commonjs/pressable-scale/PressableScale.js.map +1 -0
  32. package/lib/commonjs/pressable-scale/index.js +13 -0
  33. package/lib/commonjs/pressable-scale/index.js.map +1 -0
  34. package/lib/commonjs/pressable-with-hover/PressableWithHover.js +36 -0
  35. package/lib/commonjs/pressable-with-hover/PressableWithHover.js.map +1 -0
  36. package/lib/commonjs/pressable-with-hover/index.js +13 -0
  37. package/lib/commonjs/pressable-with-hover/index.js.map +1 -0
  38. package/lib/commonjs/styles/breakpoints.js +24 -0
  39. package/lib/commonjs/styles/breakpoints.js.map +1 -0
  40. package/lib/commonjs/styles/index.js +7 -0
  41. package/lib/commonjs/styles/index.js.map +1 -1
  42. package/lib/commonjs/subtle-hover/SubtleHover.js +74 -0
  43. package/lib/commonjs/subtle-hover/SubtleHover.js.map +1 -0
  44. package/lib/commonjs/subtle-hover/index.js +13 -0
  45. package/lib/commonjs/subtle-hover/index.js.map +1 -0
  46. package/lib/commonjs/theme/build-theme.js +2 -0
  47. package/lib/commonjs/theme/build-theme.js.map +1 -1
  48. package/lib/commonjs/theme/gradients.js +39 -0
  49. package/lib/commonjs/theme/gradients.js.map +1 -0
  50. package/lib/commonjs/theme/index.js +7 -0
  51. package/lib/commonjs/theme/index.js.map +1 -1
  52. package/lib/module/animated-check/AnimatedCheck.js +157 -0
  53. package/lib/module/animated-check/AnimatedCheck.js.map +1 -0
  54. package/lib/module/animated-check/index.js +4 -0
  55. package/lib/module/animated-check/index.js.map +1 -0
  56. package/lib/module/dialog/placement.js +9 -7
  57. package/lib/module/dialog/placement.js.map +1 -1
  58. package/lib/module/fill/index.js.map +1 -1
  59. package/lib/module/hooks/index.js +2 -0
  60. package/lib/module/hooks/index.js.map +1 -1
  61. package/lib/module/hooks/useGutters.js +103 -0
  62. package/lib/module/hooks/useGutters.js.map +1 -0
  63. package/lib/module/hooks/useHaptics.js +65 -0
  64. package/lib/module/hooks/useHaptics.js.map +1 -0
  65. package/lib/module/hooks/useInteractionState.js +10 -3
  66. package/lib/module/hooks/useInteractionState.js.map +1 -1
  67. package/lib/module/index.js +10 -1
  68. package/lib/module/index.js.map +1 -1
  69. package/lib/module/index.web.js +10 -1
  70. package/lib/module/index.web.js.map +1 -1
  71. package/lib/module/media-inset-border/MediaInsetBorder.js +47 -0
  72. package/lib/module/media-inset-border/MediaInsetBorder.js.map +1 -0
  73. package/lib/module/media-inset-border/index.js +4 -0
  74. package/lib/module/media-inset-border/index.js.map +1 -0
  75. package/lib/module/motion/ScreenTransition.js +40 -0
  76. package/lib/module/motion/ScreenTransition.js.map +1 -0
  77. package/lib/module/motion/index.js +5 -0
  78. package/lib/module/motion/index.js.map +1 -0
  79. package/lib/module/motion/motion.js +87 -0
  80. package/lib/module/motion/motion.js.map +1 -0
  81. package/lib/module/pressable-scale/PressableScale.js +75 -0
  82. package/lib/module/pressable-scale/PressableScale.js.map +1 -0
  83. package/lib/module/pressable-scale/index.js +4 -0
  84. package/lib/module/pressable-scale/index.js.map +1 -0
  85. package/lib/module/pressable-with-hover/PressableWithHover.js +31 -0
  86. package/lib/module/pressable-with-hover/PressableWithHover.js.map +1 -0
  87. package/lib/module/pressable-with-hover/index.js +4 -0
  88. package/lib/module/pressable-with-hover/index.js.map +1 -0
  89. package/lib/module/styles/breakpoints.js +20 -0
  90. package/lib/module/styles/breakpoints.js.map +1 -0
  91. package/lib/module/styles/index.js +1 -0
  92. package/lib/module/styles/index.js.map +1 -1
  93. package/lib/module/subtle-hover/SubtleHover.js +71 -0
  94. package/lib/module/subtle-hover/SubtleHover.js.map +1 -0
  95. package/lib/module/subtle-hover/index.js +4 -0
  96. package/lib/module/subtle-hover/index.js.map +1 -0
  97. package/lib/module/theme/build-theme.js +2 -0
  98. package/lib/module/theme/build-theme.js.map +1 -1
  99. package/lib/module/theme/gradients.js +35 -0
  100. package/lib/module/theme/gradients.js.map +1 -0
  101. package/lib/module/theme/index.js +1 -0
  102. package/lib/module/theme/index.js.map +1 -1
  103. package/lib/typescript/commonjs/animated-check/AnimatedCheck.d.ts +18 -0
  104. package/lib/typescript/commonjs/animated-check/AnimatedCheck.d.ts.map +1 -0
  105. package/lib/typescript/commonjs/animated-check/index.d.ts +3 -0
  106. package/lib/typescript/commonjs/animated-check/index.d.ts.map +1 -0
  107. package/lib/typescript/commonjs/dialog/placement.d.ts +8 -7
  108. package/lib/typescript/commonjs/dialog/placement.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/fill/index.d.ts +2 -2
  110. package/lib/typescript/commonjs/fill/index.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/hooks/index.d.ts +4 -0
  112. package/lib/typescript/commonjs/hooks/index.d.ts.map +1 -1
  113. package/lib/typescript/commonjs/hooks/useGutters.d.ts +32 -0
  114. package/lib/typescript/commonjs/hooks/useGutters.d.ts.map +1 -0
  115. package/lib/typescript/commonjs/hooks/useHaptics.d.ts +28 -0
  116. package/lib/typescript/commonjs/hooks/useHaptics.d.ts.map +1 -0
  117. package/lib/typescript/commonjs/hooks/useInteractionState.d.ts +6 -0
  118. package/lib/typescript/commonjs/hooks/useInteractionState.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/index.d.ts +16 -0
  120. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/index.web.d.ts +16 -0
  122. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/media-inset-border/MediaInsetBorder.d.ts +26 -0
  124. package/lib/typescript/commonjs/media-inset-border/MediaInsetBorder.d.ts.map +1 -0
  125. package/lib/typescript/commonjs/media-inset-border/index.d.ts +3 -0
  126. package/lib/typescript/commonjs/media-inset-border/index.d.ts.map +1 -0
  127. package/lib/typescript/commonjs/motion/ScreenTransition.d.ts +33 -0
  128. package/lib/typescript/commonjs/motion/ScreenTransition.d.ts.map +1 -0
  129. package/lib/typescript/commonjs/motion/index.d.ts +4 -0
  130. package/lib/typescript/commonjs/motion/index.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/motion/motion.d.ts +24 -0
  132. package/lib/typescript/commonjs/motion/motion.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/pressable-scale/PressableScale.d.ts +21 -0
  134. package/lib/typescript/commonjs/pressable-scale/PressableScale.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/pressable-scale/index.d.ts +3 -0
  136. package/lib/typescript/commonjs/pressable-scale/index.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/pressable-with-hover/PressableWithHover.d.ts +18 -0
  138. package/lib/typescript/commonjs/pressable-with-hover/PressableWithHover.d.ts.map +1 -0
  139. package/lib/typescript/commonjs/pressable-with-hover/index.d.ts +3 -0
  140. package/lib/typescript/commonjs/pressable-with-hover/index.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/styles/breakpoints.d.ts +18 -0
  142. package/lib/typescript/commonjs/styles/breakpoints.d.ts.map +1 -0
  143. package/lib/typescript/commonjs/styles/index.d.ts +2 -0
  144. package/lib/typescript/commonjs/styles/index.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts +37 -0
  146. package/lib/typescript/commonjs/subtle-hover/SubtleHover.d.ts.map +1 -0
  147. package/lib/typescript/commonjs/subtle-hover/index.d.ts +3 -0
  148. package/lib/typescript/commonjs/subtle-hover/index.d.ts.map +1 -0
  149. package/lib/typescript/commonjs/theme/build-theme.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/theme/gradients.d.ts +12 -0
  151. package/lib/typescript/commonjs/theme/gradients.d.ts.map +1 -0
  152. package/lib/typescript/commonjs/theme/index.d.ts +2 -1
  153. package/lib/typescript/commonjs/theme/index.d.ts.map +1 -1
  154. package/lib/typescript/commonjs/theme/types.d.ts +11 -0
  155. package/lib/typescript/commonjs/theme/types.d.ts.map +1 -1
  156. package/lib/typescript/module/animated-check/AnimatedCheck.d.ts +18 -0
  157. package/lib/typescript/module/animated-check/AnimatedCheck.d.ts.map +1 -0
  158. package/lib/typescript/module/animated-check/index.d.ts +3 -0
  159. package/lib/typescript/module/animated-check/index.d.ts.map +1 -0
  160. package/lib/typescript/module/dialog/placement.d.ts +8 -7
  161. package/lib/typescript/module/dialog/placement.d.ts.map +1 -1
  162. package/lib/typescript/module/fill/index.d.ts +2 -2
  163. package/lib/typescript/module/fill/index.d.ts.map +1 -1
  164. package/lib/typescript/module/hooks/index.d.ts +4 -0
  165. package/lib/typescript/module/hooks/index.d.ts.map +1 -1
  166. package/lib/typescript/module/hooks/useGutters.d.ts +32 -0
  167. package/lib/typescript/module/hooks/useGutters.d.ts.map +1 -0
  168. package/lib/typescript/module/hooks/useHaptics.d.ts +28 -0
  169. package/lib/typescript/module/hooks/useHaptics.d.ts.map +1 -0
  170. package/lib/typescript/module/hooks/useInteractionState.d.ts +6 -0
  171. package/lib/typescript/module/hooks/useInteractionState.d.ts.map +1 -1
  172. package/lib/typescript/module/index.d.ts +16 -0
  173. package/lib/typescript/module/index.d.ts.map +1 -1
  174. package/lib/typescript/module/index.web.d.ts +16 -0
  175. package/lib/typescript/module/index.web.d.ts.map +1 -1
  176. package/lib/typescript/module/media-inset-border/MediaInsetBorder.d.ts +26 -0
  177. package/lib/typescript/module/media-inset-border/MediaInsetBorder.d.ts.map +1 -0
  178. package/lib/typescript/module/media-inset-border/index.d.ts +3 -0
  179. package/lib/typescript/module/media-inset-border/index.d.ts.map +1 -0
  180. package/lib/typescript/module/motion/ScreenTransition.d.ts +33 -0
  181. package/lib/typescript/module/motion/ScreenTransition.d.ts.map +1 -0
  182. package/lib/typescript/module/motion/index.d.ts +4 -0
  183. package/lib/typescript/module/motion/index.d.ts.map +1 -0
  184. package/lib/typescript/module/motion/motion.d.ts +24 -0
  185. package/lib/typescript/module/motion/motion.d.ts.map +1 -0
  186. package/lib/typescript/module/pressable-scale/PressableScale.d.ts +21 -0
  187. package/lib/typescript/module/pressable-scale/PressableScale.d.ts.map +1 -0
  188. package/lib/typescript/module/pressable-scale/index.d.ts +3 -0
  189. package/lib/typescript/module/pressable-scale/index.d.ts.map +1 -0
  190. package/lib/typescript/module/pressable-with-hover/PressableWithHover.d.ts +18 -0
  191. package/lib/typescript/module/pressable-with-hover/PressableWithHover.d.ts.map +1 -0
  192. package/lib/typescript/module/pressable-with-hover/index.d.ts +3 -0
  193. package/lib/typescript/module/pressable-with-hover/index.d.ts.map +1 -0
  194. package/lib/typescript/module/styles/breakpoints.d.ts +18 -0
  195. package/lib/typescript/module/styles/breakpoints.d.ts.map +1 -0
  196. package/lib/typescript/module/styles/index.d.ts +2 -0
  197. package/lib/typescript/module/styles/index.d.ts.map +1 -1
  198. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts +37 -0
  199. package/lib/typescript/module/subtle-hover/SubtleHover.d.ts.map +1 -0
  200. package/lib/typescript/module/subtle-hover/index.d.ts +3 -0
  201. package/lib/typescript/module/subtle-hover/index.d.ts.map +1 -0
  202. package/lib/typescript/module/theme/build-theme.d.ts.map +1 -1
  203. package/lib/typescript/module/theme/gradients.d.ts +12 -0
  204. package/lib/typescript/module/theme/gradients.d.ts.map +1 -0
  205. package/lib/typescript/module/theme/index.d.ts +2 -1
  206. package/lib/typescript/module/theme/index.d.ts.map +1 -1
  207. package/lib/typescript/module/theme/types.d.ts +11 -0
  208. package/lib/typescript/module/theme/types.d.ts.map +1 -1
  209. package/package.json +72 -1
  210. package/src/__tests__/AnimatedCheck.test.tsx +31 -0
  211. package/src/__tests__/MediaInsetBorder.test.tsx +36 -0
  212. package/src/__tests__/Motion.test.tsx +58 -0
  213. package/src/__tests__/PressableScale.test.tsx +38 -0
  214. package/src/__tests__/PressableWithHover.test.tsx +48 -0
  215. package/src/__tests__/SubtleHover.test.tsx +50 -0
  216. package/src/__tests__/theme-gradients.test.ts +31 -0
  217. package/src/__tests__/theme.test.ts +3 -0
  218. package/src/__tests__/useGutters.test.ts +58 -0
  219. package/src/__tests__/useHaptics.test.tsx +58 -0
  220. package/src/__tests__/useInteractionState.test.ts +27 -0
  221. package/src/animated-check/AnimatedCheck.stories.tsx +60 -0
  222. package/src/animated-check/AnimatedCheck.tsx +173 -0
  223. package/src/animated-check/index.ts +2 -0
  224. package/src/dialog/placement.ts +10 -7
  225. package/src/fill/index.tsx +2 -2
  226. package/src/hooks/index.ts +4 -0
  227. package/src/hooks/useGutters.ts +99 -0
  228. package/src/hooks/useHaptics.tsx +69 -0
  229. package/src/hooks/useInteractionState.ts +8 -2
  230. package/src/index.ts +20 -0
  231. package/src/index.web.ts +20 -0
  232. package/src/media-inset-border/MediaInsetBorder.stories.tsx +60 -0
  233. package/src/media-inset-border/MediaInsetBorder.tsx +72 -0
  234. package/src/media-inset-border/index.ts +2 -0
  235. package/src/motion/Motion.stories.tsx +99 -0
  236. package/src/motion/ScreenTransition.tsx +71 -0
  237. package/src/motion/index.ts +3 -0
  238. package/src/motion/motion.ts +75 -0
  239. package/src/pressable-scale/PressableScale.stories.tsx +92 -0
  240. package/src/pressable-scale/PressableScale.tsx +93 -0
  241. package/src/pressable-scale/index.ts +2 -0
  242. package/src/pressable-with-hover/PressableWithHover.stories.tsx +43 -0
  243. package/src/pressable-with-hover/PressableWithHover.tsx +43 -0
  244. package/src/pressable-with-hover/index.ts +2 -0
  245. package/src/styles/breakpoints.ts +18 -0
  246. package/src/styles/index.ts +2 -0
  247. package/src/subtle-hover/SubtleHover.stories.tsx +85 -0
  248. package/src/subtle-hover/SubtleHover.tsx +98 -0
  249. package/src/subtle-hover/index.ts +2 -0
  250. package/src/theme/build-theme.ts +2 -0
  251. package/src/theme/gradients.ts +61 -0
  252. package/src/theme/index.ts +2 -1
  253. package/src/theme/types.ts +13 -0
@@ -0,0 +1,98 @@
1
+ import React from 'react';
2
+ import { Platform, StyleSheet, View, type StyleProp, type ViewStyle } from 'react-native';
3
+
4
+ import { useTheme } from '../theme';
5
+
6
+ /**
7
+ * True on touch-capable web browsers (coarse pointer). The CSS `group-hover`
8
+ * wash only makes sense with a hovering pointer, so it is suppressed on touch
9
+ * web to match native (which has no hover at all).
10
+ */
11
+ const IS_WEB_TOUCH_DEVICE =
12
+ Platform.OS === 'web' &&
13
+ typeof window !== 'undefined' &&
14
+ typeof window.matchMedia === 'function' &&
15
+ window.matchMedia('(pointer: coarse)').matches;
16
+
17
+ export interface SubtleHoverProps {
18
+ /**
19
+ * JS-driven visibility for a coordinated highlight — e.g. every post of one
20
+ * thread lighting up together. When omitted, the wash instead follows CSS
21
+ * `group-hover` on web with ZERO React state: the parent element must carry
22
+ * `className="group"`.
23
+ */
24
+ active?: boolean;
25
+ /** Extra style merged last — e.g. `borderRadius` to match the parent. */
26
+ style?: StyleProp<ViewStyle>;
27
+ /**
28
+ * Render on native too (default `false`). Hover is a web pointer affordance,
29
+ * so the CSS `group-hover` mode is web-only; native only shows the wash in the
30
+ * JS `active` mode, and only when this is set.
31
+ */
32
+ native?: boolean;
33
+ }
34
+
35
+ /**
36
+ * An absolutely-positioned, non-interactive contrast wash. Two modes:
37
+ *
38
+ * - **CSS `group-hover`** (`active` omitted): the wash fades in on hover purely
39
+ * through NativeWind classes — no React state. The parent must carry
40
+ * `className="group"`. Web-only (native and touch-web have no hover).
41
+ * - **JS `active`**: the wash opacity follows the boolean, so several elements
42
+ * can light up together (e.g. every post of a thread). Web always; native
43
+ * only when `native` is set.
44
+ *
45
+ * The wash color comes from the theme's `contrast50` token so it tracks the
46
+ * active preset and light/dark mode. The web cross-fade is a NativeWind
47
+ * `transition-opacity` class — no manual `willChange` / web-style casts.
48
+ */
49
+ export function SubtleHover({ active, style, native = false }: SubtleHoverProps) {
50
+ const theme = useTheme();
51
+ const isWeb = Platform.OS === 'web';
52
+
53
+ // Full literal class strings (never concatenated fragments) so NativeWind's
54
+ // compiler statically extracts every variant.
55
+ if (active === undefined) {
56
+ // CSS group-hover: a web pointer affordance. Native has no hover, and
57
+ // neither does touch web — render nothing there.
58
+ if (!isWeb || IS_WEB_TOUCH_DEVICE) return null;
59
+ return (
60
+ <View
61
+ {...({
62
+ className:
63
+ 'opacity-0 group-hover:opacity-50 dark:group-hover:opacity-40 transition-opacity duration-150',
64
+ } as Record<string, string>)}
65
+ style={[styles.overlay, { backgroundColor: theme.colors.contrast50 }, style]}
66
+ />
67
+ );
68
+ }
69
+
70
+ // JS-driven coordinated mode: web always; native only when opted in.
71
+ if (!isWeb && !native) return null;
72
+ return (
73
+ <View
74
+ {...({ className: 'transition-opacity duration-150' } as Record<string, string>)}
75
+ style={[
76
+ styles.overlay,
77
+ {
78
+ backgroundColor: theme.colors.contrast50,
79
+ opacity: active ? (theme.isDark ? 0.4 : 0.5) : 0,
80
+ },
81
+ style,
82
+ ]}
83
+ />
84
+ );
85
+ }
86
+
87
+ SubtleHover.displayName = 'SubtleHover';
88
+
89
+ const styles = StyleSheet.create({
90
+ overlay: {
91
+ position: 'absolute',
92
+ top: 0,
93
+ left: 0,
94
+ right: 0,
95
+ bottom: 0,
96
+ pointerEvents: 'none',
97
+ },
98
+ });
@@ -0,0 +1,2 @@
1
+ export { SubtleHover } from './SubtleHover';
2
+ export type { SubtleHoverProps } from './SubtleHover';
@@ -2,6 +2,7 @@ import { Platform } from 'react-native';
2
2
  import { APP_COLOR_PRESETS, type AppColorName } from './color-presets';
3
3
  import { getAdaptiveColors } from './adaptive-colors';
4
4
  import { getResolvedTokens, hslToSrgb } from './token-registry';
5
+ import { THEME_GRADIENTS } from './gradients';
5
6
  import type { Theme, ThemeColors } from './types';
6
7
 
7
8
  /**
@@ -119,6 +120,7 @@ export function buildTheme(
119
120
  return {
120
121
  mode: resolved,
121
122
  colors,
123
+ gradients: THEME_GRADIENTS,
122
124
  isDark: resolved === 'dark',
123
125
  isLight: resolved === 'light',
124
126
  };
@@ -0,0 +1,61 @@
1
+ import type { ThemeGradients } from './types';
2
+
3
+ /**
4
+ * Brand-neutral named linear-gradient palettes shared across the design system —
5
+ * decorative avatar rings, hero surfaces, empty-state art, and similar accents.
6
+ *
7
+ * Each entry lists ordered `[offset, color]` stops where `offset` is a `0–1`
8
+ * position along the gradient axis. These are intentionally theme-agnostic (the
9
+ * same values are exposed in light and dark mode) and not tied to any single
10
+ * app's brand, so components can reference them by a stable, descriptive name.
11
+ */
12
+ export const THEME_GRADIENTS: ThemeGradients = {
13
+ sky: {
14
+ values: [
15
+ [0, '#0A7AFF'],
16
+ [1, '#59B9FF'],
17
+ ],
18
+ },
19
+ midnight: {
20
+ values: [
21
+ [0, '#022C5E'],
22
+ [1, '#4079BC'],
23
+ ],
24
+ },
25
+ sunrise: {
26
+ values: [
27
+ [0, '#4E90AE'],
28
+ [0.4, '#AEA3AB'],
29
+ [0.8, '#E6A98F'],
30
+ [1, '#F3A84C'],
31
+ ],
32
+ },
33
+ sunset: {
34
+ values: [
35
+ [0, '#6772AF'],
36
+ [0.6, '#B88BB6'],
37
+ [1, '#FFA6AC'],
38
+ ],
39
+ },
40
+ summer: {
41
+ values: [
42
+ [0, '#FF6A56'],
43
+ [0.3, '#FF9156'],
44
+ [1, '#FFDD87'],
45
+ ],
46
+ },
47
+ nordic: {
48
+ values: [
49
+ [0, '#083367'],
50
+ [1, '#9EE8C1'],
51
+ ],
52
+ },
53
+ bonfire: {
54
+ values: [
55
+ [0, '#203E4E'],
56
+ [0.4, '#755B62'],
57
+ [0.8, '#CD7765'],
58
+ [1, '#EF956E'],
59
+ ],
60
+ },
61
+ };
@@ -6,10 +6,11 @@ export type {
6
6
  export { BloomColorScope, useColorScopeStyle } from './color-scope';
7
7
  export type { BloomColorScopeProps } from './color-scope';
8
8
  export { buildTheme, STATUS_COLORS } from './build-theme';
9
+ export { THEME_GRADIENTS } from './gradients';
9
10
  export { useTheme, useThemeColor, useBloomTheme } from './use-theme';
10
11
  export { useNavigationTheme } from './use-navigation-theme';
11
12
  export type { NavigationTheme, NavigationThemeFont } from './use-navigation-theme';
12
- export type { Theme, ThemeColors, ThemeMode } from './types';
13
+ export type { Theme, ThemeColors, ThemeMode, ThemeGradient, ThemeGradients } from './types';
13
14
  export type { AppColorName, AppColorPreset, PresetTokens } from './color-presets';
14
15
  export {
15
16
  APP_COLOR_NAMES,
@@ -44,9 +44,22 @@ export interface ThemeColors {
44
44
  overlay: string;
45
45
  }
46
46
 
47
+ /**
48
+ * A single named gradient: an ordered list of `[offset, color]` stops where
49
+ * `offset` runs 0–1 along the gradient axis and `color` is any RN/CSS color.
50
+ */
51
+ export interface ThemeGradient {
52
+ values: Array<[number, string]>;
53
+ }
54
+
55
+ /** Map of named gradients exposed on the theme (`theme.gradients`). */
56
+ export type ThemeGradients = Record<string, ThemeGradient>;
57
+
47
58
  export interface Theme {
48
59
  mode: 'light' | 'dark';
49
60
  colors: ThemeColors;
61
+ /** Brand-neutral named linear-gradient palettes. Theme-agnostic (same in light/dark). */
62
+ gradients: ThemeGradients;
50
63
  isDark: boolean;
51
64
  isLight: boolean;
52
65
  }