@oxy.so/bloom 2.12.4 → 3.0.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 (285) hide show
  1. package/README.md +4 -4
  2. package/docs/button-group.mdx +46 -4
  3. package/docs/composition.mdx +159 -0
  4. package/docs/field.mdx +39 -1
  5. package/docs/glass.mdx +46 -0
  6. package/docs/layout.mdx +72 -4
  7. package/docs/migrating-to-3.0.mdx +169 -0
  8. package/docs/page-header.mdx +192 -36
  9. package/lib/commonjs/button/Button.js +2 -0
  10. package/lib/commonjs/button/Button.js.map +1 -1
  11. package/lib/commonjs/button-group/ButtonGroup.js +124 -19
  12. package/lib/commonjs/button-group/ButtonGroup.js.map +1 -1
  13. package/lib/commonjs/control-surface/ControlSurface.js +46 -0
  14. package/lib/commonjs/control-surface/ControlSurface.js.map +1 -0
  15. package/lib/commonjs/control-surface/context.js +84 -0
  16. package/lib/commonjs/control-surface/context.js.map +1 -0
  17. package/lib/commonjs/control-surface/index.js +26 -0
  18. package/lib/commonjs/control-surface/index.js.map +1 -0
  19. package/lib/commonjs/control-surface/types.js +6 -0
  20. package/lib/commonjs/control-surface/types.js.map +1 -0
  21. package/lib/commonjs/field/Field.js +71 -26
  22. package/lib/commonjs/field/Field.js.map +1 -1
  23. package/lib/commonjs/field/context.js +80 -0
  24. package/lib/commonjs/field/context.js.map +1 -0
  25. package/lib/commonjs/field/index.js +7 -0
  26. package/lib/commonjs/field/index.js.map +1 -1
  27. package/lib/commonjs/floating/TriggerSlot.js +32 -0
  28. package/lib/commonjs/floating/TriggerSlot.js.map +1 -1
  29. package/lib/commonjs/glass/GlassIsland.js +107 -0
  30. package/lib/commonjs/glass/GlassIsland.js.map +1 -0
  31. package/lib/commonjs/glass/GlassSurface.js +4 -1
  32. package/lib/commonjs/glass/GlassSurface.js.map +1 -1
  33. package/lib/commonjs/glass/index.js +7 -0
  34. package/lib/commonjs/glass/index.js.map +1 -1
  35. package/lib/commonjs/index.js +564 -517
  36. package/lib/commonjs/index.js.map +1 -1
  37. package/lib/commonjs/index.web.js +564 -517
  38. package/lib/commonjs/index.web.js.map +1 -1
  39. package/lib/commonjs/label/Label.js +4 -1
  40. package/lib/commonjs/label/Label.js.map +1 -1
  41. package/lib/commonjs/layout/bottom-edge.js +3 -42
  42. package/lib/commonjs/layout/bottom-edge.js.map +1 -1
  43. package/lib/commonjs/layout/edge-store.js +65 -0
  44. package/lib/commonjs/layout/edge-store.js.map +1 -0
  45. package/lib/commonjs/layout/index.js +32 -0
  46. package/lib/commonjs/layout/index.js.map +1 -1
  47. package/lib/commonjs/layout/scroll-offset.js +83 -0
  48. package/lib/commonjs/layout/scroll-offset.js.map +1 -0
  49. package/lib/commonjs/layout/top-edge.js +109 -0
  50. package/lib/commonjs/layout/top-edge.js.map +1 -0
  51. package/lib/commonjs/page-header/EdgeScrim.js +136 -0
  52. package/lib/commonjs/page-header/EdgeScrim.js.map +1 -0
  53. package/lib/commonjs/page-header/PageHeader.js +236 -61
  54. package/lib/commonjs/page-header/PageHeader.js.map +1 -1
  55. package/lib/commonjs/provider/BloomProvider.js +5 -2
  56. package/lib/commonjs/provider/BloomProvider.js.map +1 -1
  57. package/lib/commonjs/social-button/OxyMark.js +2 -2
  58. package/lib/commonjs/social-button/OxyMark.js.map +1 -1
  59. package/lib/commonjs/social-button/SocialButton.js +2 -2
  60. package/lib/commonjs/social-button/SocialButton.js.map +1 -1
  61. package/lib/commonjs/styles/svg-id.js +29 -0
  62. package/lib/commonjs/styles/svg-id.js.map +1 -0
  63. package/lib/commonjs/text-field/TextField.js +39 -6
  64. package/lib/commonjs/text-field/TextField.js.map +1 -1
  65. package/lib/commonjs/theme/glass-colors.js +81 -1
  66. package/lib/commonjs/theme/glass-colors.js.map +1 -1
  67. package/lib/module/button/Button.js +2 -0
  68. package/lib/module/button/Button.js.map +1 -1
  69. package/lib/module/button-group/ButtonGroup.js +124 -19
  70. package/lib/module/button-group/ButtonGroup.js.map +1 -1
  71. package/lib/module/control-surface/ControlSurface.js +41 -0
  72. package/lib/module/control-surface/ControlSurface.js.map +1 -0
  73. package/lib/module/control-surface/context.js +77 -0
  74. package/lib/module/control-surface/context.js.map +1 -0
  75. package/lib/module/control-surface/index.js +5 -0
  76. package/lib/module/control-surface/index.js.map +1 -0
  77. package/lib/module/control-surface/types.js +4 -0
  78. package/lib/module/control-surface/types.js.map +1 -0
  79. package/lib/module/field/Field.js +72 -27
  80. package/lib/module/field/Field.js.map +1 -1
  81. package/lib/module/field/context.js +74 -0
  82. package/lib/module/field/context.js.map +1 -0
  83. package/lib/module/field/index.js +1 -0
  84. package/lib/module/field/index.js.map +1 -1
  85. package/lib/module/floating/TriggerSlot.js +33 -1
  86. package/lib/module/floating/TriggerSlot.js.map +1 -1
  87. package/lib/module/glass/GlassIsland.js +102 -0
  88. package/lib/module/glass/GlassIsland.js.map +1 -0
  89. package/lib/module/glass/GlassSurface.js +5 -2
  90. package/lib/module/glass/GlassSurface.js.map +1 -1
  91. package/lib/module/glass/index.js +1 -0
  92. package/lib/module/glass/index.js.map +1 -1
  93. package/lib/module/index.js +2 -1
  94. package/lib/module/index.js.map +1 -1
  95. package/lib/module/index.web.js +2 -1
  96. package/lib/module/index.web.js.map +1 -1
  97. package/lib/module/label/Label.js +4 -1
  98. package/lib/module/label/Label.js.map +1 -1
  99. package/lib/module/layout/bottom-edge.js +2 -41
  100. package/lib/module/layout/bottom-edge.js.map +1 -1
  101. package/lib/module/layout/edge-store.js +58 -0
  102. package/lib/module/layout/edge-store.js.map +1 -0
  103. package/lib/module/layout/index.js +8 -3
  104. package/lib/module/layout/index.js.map +1 -1
  105. package/lib/module/layout/scroll-offset.js +77 -0
  106. package/lib/module/layout/scroll-offset.js.map +1 -0
  107. package/lib/module/layout/top-edge.js +102 -0
  108. package/lib/module/layout/top-edge.js.map +1 -0
  109. package/lib/module/page-header/EdgeScrim.js +132 -0
  110. package/lib/module/page-header/EdgeScrim.js.map +1 -0
  111. package/lib/module/page-header/PageHeader.js +233 -58
  112. package/lib/module/page-header/PageHeader.js.map +1 -1
  113. package/lib/module/provider/BloomProvider.js +5 -2
  114. package/lib/module/provider/BloomProvider.js.map +1 -1
  115. package/lib/module/social-button/OxyMark.js +1 -1
  116. package/lib/module/social-button/OxyMark.js.map +1 -1
  117. package/lib/module/social-button/SocialButton.js +1 -1
  118. package/lib/module/social-button/SocialButton.js.map +1 -1
  119. package/lib/module/styles/svg-id.js +26 -0
  120. package/lib/module/styles/svg-id.js.map +1 -0
  121. package/lib/module/text-field/TextField.js +39 -6
  122. package/lib/module/text-field/TextField.js.map +1 -1
  123. package/lib/module/theme/glass-colors.js +79 -0
  124. package/lib/module/theme/glass-colors.js.map +1 -1
  125. package/lib/typescript/commonjs/button/Button.d.ts.map +1 -1
  126. package/lib/typescript/commonjs/button-group/ButtonGroup.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/button-group/types.d.ts +61 -5
  128. package/lib/typescript/commonjs/button-group/types.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/control-surface/ControlSurface.d.ts +4 -0
  130. package/lib/typescript/commonjs/control-surface/ControlSurface.d.ts.map +1 -0
  131. package/lib/typescript/commonjs/control-surface/context.d.ts +21 -0
  132. package/lib/typescript/commonjs/control-surface/context.d.ts.map +1 -0
  133. package/lib/typescript/commonjs/control-surface/index.d.ts +4 -0
  134. package/lib/typescript/commonjs/control-surface/index.d.ts.map +1 -0
  135. package/lib/typescript/commonjs/control-surface/types.d.ts +37 -0
  136. package/lib/typescript/commonjs/control-surface/types.d.ts.map +1 -0
  137. package/lib/typescript/commonjs/field/Field.d.ts +1 -1
  138. package/lib/typescript/commonjs/field/Field.d.ts.map +1 -1
  139. package/lib/typescript/commonjs/field/context.d.ts +55 -0
  140. package/lib/typescript/commonjs/field/context.d.ts.map +1 -0
  141. package/lib/typescript/commonjs/field/index.d.ts +2 -0
  142. package/lib/typescript/commonjs/field/index.d.ts.map +1 -1
  143. package/lib/typescript/commonjs/field/types.d.ts +22 -3
  144. package/lib/typescript/commonjs/field/types.d.ts.map +1 -1
  145. package/lib/typescript/commonjs/floating/TriggerSlot.d.ts.map +1 -1
  146. package/lib/typescript/commonjs/glass/GlassIsland.d.ts +4 -0
  147. package/lib/typescript/commonjs/glass/GlassIsland.d.ts.map +1 -0
  148. package/lib/typescript/commonjs/glass/GlassSurface.d.ts.map +1 -1
  149. package/lib/typescript/commonjs/glass/index.d.ts +2 -1
  150. package/lib/typescript/commonjs/glass/index.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/glass/types.d.ts +43 -0
  152. package/lib/typescript/commonjs/glass/types.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/index.d.ts +2 -1
  154. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/index.web.d.ts +2 -1
  156. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  157. package/lib/typescript/commonjs/label/Label.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/label/types.d.ts +7 -1
  159. package/lib/typescript/commonjs/label/types.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/layout/bottom-edge.d.ts.map +1 -1
  161. package/lib/typescript/commonjs/layout/edge-store.d.ts +31 -0
  162. package/lib/typescript/commonjs/layout/edge-store.d.ts.map +1 -0
  163. package/lib/typescript/commonjs/layout/index.d.ts +8 -3
  164. package/lib/typescript/commonjs/layout/index.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/layout/scroll-offset.d.ts +16 -0
  166. package/lib/typescript/commonjs/layout/scroll-offset.d.ts.map +1 -0
  167. package/lib/typescript/commonjs/layout/top-edge.d.ts +77 -0
  168. package/lib/typescript/commonjs/layout/top-edge.d.ts.map +1 -0
  169. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +95 -0
  170. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -0
  171. package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
  172. package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
  173. package/lib/typescript/commonjs/page-header/index.d.ts +1 -1
  174. package/lib/typescript/commonjs/page-header/index.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/page-header/types.d.ts +97 -10
  176. package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/provider/BloomProvider.d.ts.map +1 -1
  178. package/lib/typescript/commonjs/styles/svg-id.d.ts +20 -0
  179. package/lib/typescript/commonjs/styles/svg-id.d.ts.map +1 -0
  180. package/lib/typescript/commonjs/text-field/TextField.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/theme/glass-colors.d.ts +67 -0
  182. package/lib/typescript/commonjs/theme/glass-colors.d.ts.map +1 -1
  183. package/lib/typescript/module/button/Button.d.ts.map +1 -1
  184. package/lib/typescript/module/button-group/ButtonGroup.d.ts.map +1 -1
  185. package/lib/typescript/module/button-group/types.d.ts +61 -5
  186. package/lib/typescript/module/button-group/types.d.ts.map +1 -1
  187. package/lib/typescript/module/control-surface/ControlSurface.d.ts +4 -0
  188. package/lib/typescript/module/control-surface/ControlSurface.d.ts.map +1 -0
  189. package/lib/typescript/module/control-surface/context.d.ts +21 -0
  190. package/lib/typescript/module/control-surface/context.d.ts.map +1 -0
  191. package/lib/typescript/module/control-surface/index.d.ts +4 -0
  192. package/lib/typescript/module/control-surface/index.d.ts.map +1 -0
  193. package/lib/typescript/module/control-surface/types.d.ts +37 -0
  194. package/lib/typescript/module/control-surface/types.d.ts.map +1 -0
  195. package/lib/typescript/module/field/Field.d.ts +1 -1
  196. package/lib/typescript/module/field/Field.d.ts.map +1 -1
  197. package/lib/typescript/module/field/context.d.ts +55 -0
  198. package/lib/typescript/module/field/context.d.ts.map +1 -0
  199. package/lib/typescript/module/field/index.d.ts +2 -0
  200. package/lib/typescript/module/field/index.d.ts.map +1 -1
  201. package/lib/typescript/module/field/types.d.ts +22 -3
  202. package/lib/typescript/module/field/types.d.ts.map +1 -1
  203. package/lib/typescript/module/floating/TriggerSlot.d.ts.map +1 -1
  204. package/lib/typescript/module/glass/GlassIsland.d.ts +4 -0
  205. package/lib/typescript/module/glass/GlassIsland.d.ts.map +1 -0
  206. package/lib/typescript/module/glass/GlassSurface.d.ts.map +1 -1
  207. package/lib/typescript/module/glass/index.d.ts +2 -1
  208. package/lib/typescript/module/glass/index.d.ts.map +1 -1
  209. package/lib/typescript/module/glass/types.d.ts +43 -0
  210. package/lib/typescript/module/glass/types.d.ts.map +1 -1
  211. package/lib/typescript/module/index.d.ts +2 -1
  212. package/lib/typescript/module/index.d.ts.map +1 -1
  213. package/lib/typescript/module/index.web.d.ts +2 -1
  214. package/lib/typescript/module/index.web.d.ts.map +1 -1
  215. package/lib/typescript/module/label/Label.d.ts.map +1 -1
  216. package/lib/typescript/module/label/types.d.ts +7 -1
  217. package/lib/typescript/module/label/types.d.ts.map +1 -1
  218. package/lib/typescript/module/layout/bottom-edge.d.ts.map +1 -1
  219. package/lib/typescript/module/layout/edge-store.d.ts +31 -0
  220. package/lib/typescript/module/layout/edge-store.d.ts.map +1 -0
  221. package/lib/typescript/module/layout/index.d.ts +8 -3
  222. package/lib/typescript/module/layout/index.d.ts.map +1 -1
  223. package/lib/typescript/module/layout/scroll-offset.d.ts +16 -0
  224. package/lib/typescript/module/layout/scroll-offset.d.ts.map +1 -0
  225. package/lib/typescript/module/layout/top-edge.d.ts +77 -0
  226. package/lib/typescript/module/layout/top-edge.d.ts.map +1 -0
  227. package/lib/typescript/module/page-header/EdgeScrim.d.ts +95 -0
  228. package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -0
  229. package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
  230. package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
  231. package/lib/typescript/module/page-header/index.d.ts +1 -1
  232. package/lib/typescript/module/page-header/index.d.ts.map +1 -1
  233. package/lib/typescript/module/page-header/types.d.ts +97 -10
  234. package/lib/typescript/module/page-header/types.d.ts.map +1 -1
  235. package/lib/typescript/module/provider/BloomProvider.d.ts.map +1 -1
  236. package/lib/typescript/module/styles/svg-id.d.ts +20 -0
  237. package/lib/typescript/module/styles/svg-id.d.ts.map +1 -0
  238. package/lib/typescript/module/text-field/TextField.d.ts.map +1 -1
  239. package/lib/typescript/module/theme/glass-colors.d.ts +67 -0
  240. package/lib/typescript/module/theme/glass-colors.d.ts.map +1 -1
  241. package/package.json +15 -1
  242. package/src/button/Button.tsx +10 -1
  243. package/src/button-group/ButtonGroup.tsx +146 -19
  244. package/src/button-group/types.ts +68 -5
  245. package/src/control-surface/ControlSurface.tsx +41 -0
  246. package/src/control-surface/context.ts +81 -0
  247. package/src/control-surface/index.ts +4 -0
  248. package/src/control-surface/types.ts +40 -0
  249. package/src/field/Field.tsx +84 -27
  250. package/src/field/context.ts +110 -0
  251. package/src/field/index.ts +3 -0
  252. package/src/field/types.ts +22 -3
  253. package/src/floating/TriggerSlot.tsx +35 -1
  254. package/src/glass/GlassIsland.tsx +109 -0
  255. package/src/glass/GlassSurface.tsx +26 -2
  256. package/src/glass/index.ts +3 -0
  257. package/src/glass/types.ts +45 -0
  258. package/src/index.ts +6 -0
  259. package/src/index.web.ts +6 -0
  260. package/src/label/Label.tsx +3 -1
  261. package/src/label/types.ts +7 -1
  262. package/src/layout/bottom-edge.tsx +3 -56
  263. package/src/layout/edge-store.ts +69 -0
  264. package/src/layout/index.ts +8 -3
  265. package/src/layout/scroll-offset.ts +76 -0
  266. package/src/layout/top-edge.tsx +109 -0
  267. package/src/page-header/EdgeScrim.tsx +118 -0
  268. package/src/page-header/PageHeader.tsx +253 -61
  269. package/src/page-header/index.ts +9 -1
  270. package/src/page-header/types.ts +103 -10
  271. package/src/provider/BloomProvider.tsx +12 -1
  272. package/src/social-button/OxyMark.tsx +1 -1
  273. package/src/social-button/SocialButton.tsx +1 -1
  274. package/src/styles/svg-id.ts +23 -0
  275. package/src/text-field/TextField.tsx +44 -5
  276. package/src/theme/glass-colors.ts +80 -0
  277. package/lib/commonjs/social-button/use-svg-id.js +0 -16
  278. package/lib/commonjs/social-button/use-svg-id.js.map +0 -1
  279. package/lib/module/social-button/use-svg-id.js +0 -13
  280. package/lib/module/social-button/use-svg-id.js.map +0 -1
  281. package/lib/typescript/commonjs/social-button/use-svg-id.d.ts +0 -7
  282. package/lib/typescript/commonjs/social-button/use-svg-id.d.ts.map +0 -1
  283. package/lib/typescript/module/social-button/use-svg-id.d.ts +0 -7
  284. package/lib/typescript/module/social-button/use-svg-id.d.ts.map +0 -1
  285. package/src/social-button/use-svg-id.ts +0 -10
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-edge.d.ts","sourceRoot":"","sources":["../../../../src/layout/top-edge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AAMf;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAG9D;yBAHe,eAAe;;;AAO/B;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,IAAI,MAAM,CAOxC;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CASpD"}
@@ -0,0 +1,95 @@
1
+ import React from 'react';
2
+ /**
3
+ * The floating header's EDGE EFFECT: the page colour at the top, fading to
4
+ * nothing below the islands.
5
+ *
6
+ * ── WHY IT IS A GRADIENT AND NOT A BLUR ─────────────────────────────────────
7
+ *
8
+ * It is the thing that lets a title sit on a photograph and still be read, and
9
+ * it has exactly one job: no horizontal line anywhere. A translucent rectangle
10
+ * — even a blurred one — ends at its own bottom edge, and that edge is a line
11
+ * across the screen whether or not it is drawn. Apple's scroll edge effect is
12
+ * described the same way: it protects legibility at the edge and must not read
13
+ * as a slab over the content.
14
+ *
15
+ * It is NOT a blur of varying intensity, and saying so matters because the two
16
+ * are easy to conflate and only one of them is here. `backdrop-filter` and
17
+ * `expo-blur` both take a single radius for the whole surface; a falloff would
18
+ * need the ten stacked layers `progressive-blur` uses, which is a real cost for
19
+ * a strip this size. This is an opacity ramp of one flat colour, and that is
20
+ * all it claims to be.
21
+ *
22
+ * ── THE STOPS ───────────────────────────────────────────────────────────────
23
+ *
24
+ * Four of them, shaped as an ease-out rather than a straight line. A LINEAR
25
+ * ramp of opacity is perceptually not linear: it holds too much colour through
26
+ * the middle and then falls off visibly in the last fifth, which puts a soft
27
+ * but findable band across the content. Weighting the fall earlier spends the
28
+ * gradient's height where the eye is looking — the region behind the title —
29
+ * and arrives at zero gently.
30
+ *
31
+ * `TAIL_RATIO` extends the ramp BELOW the header's own box. The header is as
32
+ * tall as its islands plus its padding; the fade needs room after that, or it
33
+ * finishes at the same place the layout does, which is the line again.
34
+ *
35
+ * ── `stopOpacity`, NOT AN `rgba()` STOP ─────────────────────────────────────
36
+ *
37
+ * `react-native-svg` parses `stopColor` for its RGB and DISCARDS the alpha
38
+ * channel, so an `rgba(…, 0.4)` stop renders at FULL strength on native and
39
+ * correctly on web. That is the exact defect documented on `GLASS_SHEEN` in
40
+ * `theme/glass-colors.ts`, where it painted an Android pane as an achromatic
41
+ * white-to-black wipe while every gate stayed green. The colour and the opacity
42
+ * travel here in separate props for the same reason.
43
+ *
44
+ * ── `width="100%"` IS NOT REDUNDANT ─────────────────────────────────────────
45
+ *
46
+ * An `<svg>` is a REPLACED element. With `width: auto` its used width is its
47
+ * INTRINSIC width, and an SVG with no intrinsic size falls back to CSS's
48
+ * default 300 x 150 — so `position: absolute; left: 0; right: 0` does NOT
49
+ * stretch it: `right` is over-constrained and dropped. Measured in Chrome
50
+ * before this prop existed: a 760px-wide header painted a 300 x 150 block of
51
+ * scrim with a hard vertical edge down the middle of the screen, over content
52
+ * that was otherwise untouched.
53
+ *
54
+ * Native is unaffected — react-native-svg lays its host view out with flexbox
55
+ * there — which is exactly why the omission survives review: it is correct on
56
+ * the platform most of this library is tested on. Gate:
57
+ * `src/__tests__/svg-absolute-fill-size.test.ts`.
58
+ *
59
+ * ── THE GRADIENT ID ─────────────────────────────────────────────────────────
60
+ *
61
+ * From `useSvgIdPrefix`, which is `useId` with React's punctuation stripped.
62
+ * Two headers on one page (a split view) must not resolve each other's
63
+ * `url(#…)`, and a module-scope counter — which is what `GlassSurface` uses,
64
+ * and which is right for a native-only surface — increments in a different
65
+ * order on the server than during hydration, so an SSR'd page would reference a
66
+ * gradient that is not there.
67
+ */
68
+ /** How far past the header's own height the fade continues, as a ratio of it. */
69
+ export declare const SCRIM_TAIL_RATIO = 0.55;
70
+ /**
71
+ * Offset down the ramp -> how much of the page colour survives there.
72
+ *
73
+ * Read as: solid behind the title, nine tenths gone by three quarters of the
74
+ * way down, nothing at the bottom.
75
+ */
76
+ export declare const SCRIM_STOPS: readonly [{
77
+ readonly offset: 0;
78
+ readonly opacity: 1;
79
+ }, {
80
+ readonly offset: 0.42;
81
+ readonly opacity: 0.86;
82
+ }, {
83
+ readonly offset: 0.72;
84
+ readonly opacity: 0.38;
85
+ }, {
86
+ readonly offset: 1;
87
+ readonly opacity: 0;
88
+ }];
89
+ export interface EdgeScrimProps {
90
+ /** The page colour the ramp starts from — opaque, alpha travels separately. */
91
+ color: string;
92
+ testID?: string;
93
+ }
94
+ export declare const EdgeScrim: React.NamedExoticComponent<EdgeScrimProps>;
95
+ //# sourceMappingURL=EdgeScrim.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EdgeScrim.d.ts","sourceRoot":"","sources":["../../../../src/page-header/EdgeScrim.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AAMpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiEG;AAEH,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;GAKG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;EAKd,CAAC;AAEX,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAuBD,eAAO,MAAM,SAAS,4CAA2B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { PageHeaderProps } from './types';
3
- declare function PageHeaderComponent({ title, subtitle, titleAlign, headingLevel, onBack, backLabel, leading, actions, border, transparent, scrollY: externalScrollY, scrollThreshold, sticky, safeArea, style, testID, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
3
+ declare function PageHeaderComponent({ title, subtitle, titleAlign, headingLevel, titleReveal, presentation, placement, onBack, backLabel, leading, actions, border, transparent, scrim, scrimColor, scrollY: externalScrollY, scrollThreshold, sticky, safeArea, style, testID, }: PageHeaderProps): import("react/jsx-runtime").JSX.Element;
4
4
  export declare const PageHeader: React.MemoExoticComponent<typeof PageHeaderComponent>;
5
5
  export {};
6
6
  //# sourceMappingURL=PageHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../src/page-header/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAwB9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiC/C,iBAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,UAAoB,EACpB,YAAgB,EAChB,MAAM,EACN,SAAkB,EAClB,OAAO,EACP,OAAO,EACP,MAAe,EACf,WAAmB,EACnB,OAAO,EAAE,eAAe,EACxB,eAAmC,EACnC,MAAa,EACb,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE,eAAe,2CAuLjB;AA4DD,eAAO,MAAM,UAAU,uDAA4B,CAAC"}
1
+ {"version":3,"file":"PageHeader.d.ts","sourceRoot":"","sources":["../../../../src/page-header/PageHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AA6B9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA8E/C,iBAAS,mBAAmB,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,UAAoB,EACpB,YAAgB,EAChB,WAAsB,EACtB,YAAyB,EACzB,SAAoB,EACpB,MAAM,EACN,SAAkB,EAClB,OAAO,EACP,OAAO,EACP,MAAe,EACf,WAAmB,EACnB,KAAc,EACd,UAAU,EACV,OAAO,EAAE,eAAe,EACxB,eAAmC,EACnC,MAAa,EACb,QAAQ,EACR,KAAK,EACL,MAAM,GACP,EAAE,eAAe,2CAqTjB;AAuED,eAAO,MAAM,UAAU,uDAA4B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export { PageHeader } from './PageHeader';
2
- export type { PageHeaderBorder, PageHeaderProps, PageHeaderTitleAlign } from './types';
2
+ export type { PageHeaderBorder, PageHeaderPlacement, PageHeaderPresentation, PageHeaderProps, PageHeaderScrim, PageHeaderTitleAlign, PageHeaderTitleReveal, } from './types';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/page-header/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
@@ -3,11 +3,64 @@ import type { StyleProp, ViewStyle } from 'react-native';
3
3
  import type { SharedValue } from 'react-native-reanimated';
4
4
  /** Where the title sits: after the back button, or centred on the bar. */
5
5
  export type PageHeaderTitleAlign = 'start' | 'center';
6
+ /**
7
+ * How the header presents itself.
8
+ *
9
+ * `floating` is the default: no bar at all. The back button sits in its own
10
+ * translucent capsule, related actions share one island, the title floats
11
+ * between them, and the whole thing ends in a soft vertical gradient instead of
12
+ * a horizontal edge. Content passes UNDER it.
13
+ *
14
+ * `bar` is Bloom's original flat header — an opaque full-width strip with a
15
+ * hairline separator and a scroll-linked shadow. It is still the right shape
16
+ * for a dense tool screen, a split-pane sidebar header or anywhere the chrome
17
+ * must not be mistaken for content; it is no longer the default.
18
+ */
19
+ export type PageHeaderPresentation = 'floating' | 'bar';
20
+ /**
21
+ * Who reserves the space the header occupies.
22
+ *
23
+ * `inline` (default): the header is a sibling ABOVE the content, in a column.
24
+ * It occupies layout, so nothing passes under it and nothing needs padding.
25
+ *
26
+ * `overlay`: the header is absolutely positioned over the content, which starts
27
+ * at the top of the container and scrolls under the islands. The header then
28
+ * CLAIMS its measured height on `layout/top-edge`, and the content reads it
29
+ * with `useTopEdgeInset()` so its first item is not born underneath. This is
30
+ * the placement the floating presentation was designed for; the two are
31
+ * separate props because a floating header above a fixed panel is also a real
32
+ * arrangement.
33
+ */
34
+ export type PageHeaderPlacement = 'inline' | 'overlay';
6
35
  /**
7
36
  * The bottom separator: `auto` fades it in once the page has scrolled past
8
37
  * `scrollThreshold`, `always` draws it at rest, `none` never draws it.
38
+ *
39
+ * `presentation="bar"` only. A floating header has no edge to separate.
9
40
  */
10
41
  export type PageHeaderBorder = 'auto' | 'always' | 'none';
42
+ /**
43
+ * The floating header's edge effect: a vertical gradient from the page colour
44
+ * to full transparency, behind the title and the islands.
45
+ *
46
+ * `auto` (default) fades it in over `[0, scrollThreshold]` of the scroll
47
+ * offset, so it appears exactly when content starts passing under it. `always`
48
+ * paints it at rest — for a header that is born over a photograph. `none`
49
+ * removes it, which leaves the islands to carry legibility on their own.
50
+ */
51
+ export type PageHeaderScrim = 'auto' | 'always' | 'none';
52
+ /**
53
+ * When the title is visible.
54
+ *
55
+ * `always` (default) is the ordinary screen header. `onScroll` holds the title
56
+ * back and fades it in with the scrim — the shape a header over a hero photo
57
+ * wants, where the photo already names the screen.
58
+ *
59
+ * It is a prop of its own rather than a side effect of the background, because
60
+ * the two are different questions and conflating them is how every header that
61
+ * turned transparent also lost its title.
62
+ */
63
+ export type PageHeaderTitleReveal = 'always' | 'onScroll';
11
64
  export interface PageHeaderProps {
12
65
  /** A string renders as the heading; a node renders as-is (and owns its own semantics). */
13
66
  title?: ReactNode;
@@ -17,6 +70,12 @@ export interface PageHeaderProps {
17
70
  titleAlign?: PageHeaderTitleAlign;
18
71
  /** The title's heading level. Default 1. */
19
72
  headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;
73
+ /** Default `always`. */
74
+ titleReveal?: PageHeaderTitleReveal;
75
+ /** Default `floating`. */
76
+ presentation?: PageHeaderPresentation;
77
+ /** Default `inline`. */
78
+ placement?: PageHeaderPlacement;
20
79
  /**
21
80
  * Renders the back button and is called when it is pressed. The header is
22
81
  * router-agnostic: pass `router.back`, or your app's safe-back helper.
@@ -26,24 +85,52 @@ export interface PageHeaderProps {
26
85
  backLabel?: string;
27
86
  /** Rendered after the back button, before the title (an avatar, a logo). */
28
87
  leading?: ReactNode;
29
- /** Rendered at the end of the bar, 10 apart — typically Bloom `Button`s. */
88
+ /**
89
+ * Rendered at the end of the bar. In the floating presentation this slot is
90
+ * wrapped in a `ControlSurface` with `material: 'glass'`, so a `ButtonGroup`
91
+ * inside it becomes one island with no prop written on it. Declare the
92
+ * grouping yourself — the header never infers it by reading children.
93
+ */
30
94
  actions?: ReactNode;
31
- /** Default `auto`. */
95
+ /** `presentation="bar"` only. Default `auto`. */
32
96
  border?: PageHeaderBorder;
33
97
  /**
34
- * The bar's background, shadow and title fade in with scroll instead of
35
- * showing at rest — for a header over media. The back button and actions
36
- * stay visible (their own fill reads over any image).
98
+ * `presentation="bar"` only: the bar's background and shadow fade in with
99
+ * scroll instead of showing at rest.
100
+ *
101
+ * It no longer hides the title — that is `titleReveal="onScroll"`, and the
102
+ * two are set independently. A `bar` header that wants the old combined
103
+ * behaviour asks for both.
37
104
  */
38
105
  transparent?: boolean;
106
+ /** `presentation="floating"` only. Default `auto`. */
107
+ scrim?: PageHeaderScrim;
108
+ /**
109
+ * The colour the edge effect fades FROM. Defaults to `theme.colors.background`
110
+ * — the page colour, which is what the content scrolling under the header is
111
+ * disappearing into.
112
+ *
113
+ * Pass it when the screen paints a background the theme does not know about:
114
+ * a tinted section, a brand panel, a dark surface inside a light app. The
115
+ * header cannot read the colour behind it, and a scrim in the theme's
116
+ * background over a page in some other colour is a wash of the wrong hue
117
+ * rather than a fade.
118
+ *
119
+ * It must be OPAQUE. The alpha is the ramp's, and a colour that brings its
120
+ * own would multiply with it — `rgba(0,0,0,0.5)` at the ramp's 0.86 paints
121
+ * 0.43 and reads as a weak, dirty veil rather than the colour you asked for.
122
+ */
123
+ scrimColor?: string;
39
124
  /**
40
- * The scroll offset driving `border="auto"`, `transparent` and the shadow.
41
- * Pass it from a Reanimated scroll handler on native or for any scroll
42
- * container. Omitted on web, the header follows `window.scrollY`; omitted on
43
- * native, the header stays at rest.
125
+ * The scroll offset driving the scrim, the separator and the shadow.
126
+ *
127
+ * Resolution order: this prop, then the nearest `ScrollOffsetProvider`
128
+ * (`@oxy.so/bloom/layout`) — which is how a header inside a Bloom scroll
129
+ * composition gets it with no wiring — then, on web only, `window.scrollY`.
130
+ * On native with none of the three, the header stays at rest.
44
131
  */
45
132
  scrollY?: SharedValue<number>;
46
- /** The offset (px) over which border, background and shadow fade in. Default 20. */
133
+ /** The offset (px) over which the scrim, separator and shadow fade in. Default 20. */
47
134
  scrollThreshold?: number;
48
135
  /** Web only: pin the bar to the top of its scroll container. Default true. */
49
136
  sticky?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/page-header/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,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,EAAE,MAAM,IAAI,CAAC;IACpB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IAEpB,iDAAiD;IACjD,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,sDAAsD;IACtD,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9B,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,8EAA8E;IAC9E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,gFAAgF;IAChF,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB"}
@@ -1 +1 @@
1
- {"version":3,"file":"BloomProvider.d.ts","sourceRoot":"","sources":["../../../../src/provider/BloomProvider.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,aAAa,EACb,OAAc,EACd,GAAG,UAAU,EACd,EAAE,kBAAkB,2CAoCpB;yBAzCe,aAAa"}
1
+ {"version":3,"file":"BloomProvider.d.ts","sourceRoot":"","sources":["../../../../src/provider/BloomProvider.tsx"],"names":[],"mappings":"AA4CA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,aAAa,EACb,OAAc,EACd,GAAG,UAAU,EACd,EAAE,kBAAkB,2CA8CpB;yBAnDe,aAAa"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * A DOM-safe id prefix, per component instance.
3
+ *
4
+ * Two SVGs of one shape on a page must not resolve each other's `url(#…)`, and
5
+ * React's `useId` carries characters an SVG id cannot (`:r0:`). Stripping them
6
+ * keeps the id UNIQUE — `useId` is unique per instance before the strip and the
7
+ * strip is injective over React's own alphabet — while staying a legal XML name.
8
+ *
9
+ * It is `useId` rather than a module-scope counter for one reason a counter
10
+ * cannot give: SSR. A counter increments in a different order on the server than
11
+ * during hydration, so the markup React sends and the markup it re-renders
12
+ * reference different gradients and one of them is not there. `useId` is the
13
+ * hook React added for exactly this and is stable across the two passes.
14
+ *
15
+ * Lives in `styles/` rather than beside its first caller because it now has
16
+ * three (`social-button`'s mark and button, `page-header`'s edge gradient) —
17
+ * the second real need is the bar for extracting it, and this cleared it.
18
+ */
19
+ export declare function useSvgIdPrefix(prefix: string): string;
20
+ //# sourceMappingURL=svg-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"svg-id.d.ts","sourceRoot":"","sources":["../../../../src/styles/svg-id.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAErD"}
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/text-field/TextField.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAQxB,MAAM,cAAc,CAAC;AAMtB,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAmBL,KAAK,aAAa,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACf,MAAM,SAAS,CAAC;AAkCjB;;;;;;;;GAQG;AACH,MAAM,W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IACjB,KAAK,EAAE,MAAM,CAAC;CACf,2CAqCA"}
1
+ {"version":3,"file":"TextField.d.ts","sourceRoot":"","sources":["../../../../src/text-field/TextField.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,kBAAkB,EAQxB,MAAM,cAAc,CAAC;AAOtB,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAmBL,KAAK,aAAa,EACnB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACf,MAAM,SAAS,CAAC;AAkCjB;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,aAAa,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;CACnB;AACD,eAAO,MAAM,qBAAqB,4DAAyD,CAAC;AAiD5F,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,SAAS,EAAE,aAAqB,EAChC,QAAQ,EAAE,YAAoB,EAC9B,IAAI,EAAE,QAAmB,EACzB,MAA0B,EAC1B,YAAY,EACZ,KAAK,GACN,EAAE,cAAc,2CA6EhB;AAsFD,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,WAAW,EACX,KAAK,EACL,YAAY,EACZ,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,aAAqB,EACrB,GAAG,IAAI,EACR,EAAE,mBAAmB,2CA8LrB;AAmKD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,QAAQ,EACR,QAAgB,EAChB,OAAe,EACf,KAAK,GACN,EAAE,mBAAmB,2CA6BrB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,SAAiB,EACjB,QAAQ,EACR,KAAK,GACN,EAAE,kBAAkB,2CAkBpB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAoB,EAAE,EAAE,kBAAkB,2CA4BrF;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAQ,EACR,KAAK,EACL,iBAAiB,EACjB,KAAK,GACN,EAAE,KAAK,CAAC,iBAAiB,CACxB,aAAa,GAAG;IACd,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,CAAC,EAAE,kBAAkB,CAAC,mBAAmB,CAAC,CAAC;CAC7D,CACF,2CAyBA;AAED,wBAAgB,cAAc,CAAC,EAC7B,QAAQ,EACR,KAAK,GACN,EAAE;IACD,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf,2CAqCA"}
@@ -192,4 +192,71 @@ export interface GlassColors {
192
192
  * and pins both on every alpha or surface change.
193
193
  */
194
194
  export declare function resolveGlassColors(fill: string): GlassColors;
195
+ /**
196
+ * The CHROME alpha — the neutral counterpart of {@link GLASS_FILL_ALPHA}.
197
+ *
198
+ * ── WHY A SECOND ALPHA AND NOT THE SAME ONE ─────────────────────────────────
199
+ *
200
+ * {@link GLASS_FILL_ALPHA} prices a BRAND fill: a `primary` button whose label
201
+ * is that fill's own on-colour, sitting on one of Bloom's five neutral
202
+ * surfaces. A page header's island is neither of those things. It is a NEUTRAL
203
+ * surface off the existing ladder (`styles/surface-levels`, rung 1 — the same
204
+ * fill a card and a menu panel paint) and it floats over content Bloom does not
205
+ * own: a photograph, a video still, a map, a list that scrolls under it. Its
206
+ * label is the theme's own `text`, not an on-fill token.
207
+ *
208
+ * So the two materials are priced against different backdrops, and the number
209
+ * that is right for one is wrong for the other in a measurable direction:
210
+ *
211
+ * brand fill backdrop ∈ Bloom's own five surfaces worst case: light mode,
212
+ * a white-ish page LIFTS
213
+ * the pane under a white
214
+ * label
215
+ * chrome fill backdrop ∈ [black, white] — anything worst case: DARK mode
216
+ * over a WHITE backdrop,
217
+ * which lifts a dark pane
218
+ * under a white label
219
+ *
220
+ * That is why dark carries the HIGHER alpha here and light the lower one, which
221
+ * is the opposite of the intuition that a dark UI can afford more transparency.
222
+ * A dark island has the whole luminance range above it to be washed out INTO; a
223
+ * light island over the same white backdrop barely moves, because it is already
224
+ * near white.
225
+ *
226
+ * ── WHAT THESE TWO VALUES BUY ───────────────────────────────────────────────
227
+ *
228
+ * Measured over 64 presets x the two extremes of the backdrop range, with the
229
+ * theme's own `text` as the label, in `theme/__tests__/glass-colors.test.ts`.
230
+ * The gate pins the floors EXACTLY, in both directions, so a hundredth in
231
+ * either direction has to be a decision:
232
+ *
233
+ * light 0.72 worst AA ratio over the range …pinned by the gate
234
+ * dark 0.80 worst AA ratio over the range …pinned by the gate
235
+ *
236
+ * and both remain genuinely translucent: the gate also measures how far the
237
+ * PAINTED pane moves between a black and a white backdrop, asserts that
238
+ * movement is non-zero, and asserts it is monotonic in the alpha — so an alpha
239
+ * quietly raised to 1.0 to buy contrast fails on the translucency side rather
240
+ * than passing on the legibility side.
241
+ */
242
+ export declare const GLASS_CHROME_ALPHA: {
243
+ readonly light: 0.72;
244
+ readonly dark: 0.8;
245
+ };
246
+ /**
247
+ * Resolve the pane around a NEUTRAL chrome fill — an island of controls
248
+ * floating over content.
249
+ *
250
+ * Both arguments are resolved colour strings the caller already holds, for the
251
+ * same reason {@link resolveGlassColors} takes one: the caller is the only one
252
+ * who knows which rung of the surface ladder its container sits on. In practice
253
+ * that is `resolveSurfaceLevel(theme, 1)` — `.background` for `fill`, `.border`
254
+ * for `hairline` — which is the fill a card and a menu panel already paint, so
255
+ * an island reads as Bloom chrome rather than as a fourth material.
256
+ *
257
+ * The LABEL is not returned, exactly as in `resolveGlassColors`: a neutral pane
258
+ * carries the theme's own `text`, and the rungs under it come from
259
+ * `surfaceTextOn(theme, fill)` — the caller is already holding both.
260
+ */
261
+ export declare function resolveChromeGlassColors(fill: string, hairline: string, isDark: boolean): GlassColors;
195
262
  //# sourceMappingURL=glass-colors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"glass-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/glass-colors.ts"],"names":[],"mappings":"AAyEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;IAItB,0EAA0E;;CAElE,CAAC;AAEX,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAElF,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,6CAA6C,CAAC;AAE9E,oFAAoF;AACpF,eAAO,MAAM,oBAAoB,KAAK,CAAC;AAEvC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,eAAoC,CAAC;AAEnE;;;;;;;;;GASG;AACH,eAAO,MAAM,oBAAoB,QAA4K,CAAC;AAE9M;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,oBAAoB,QAA6B,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,QAAQ,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAM5D"}
1
+ {"version":3,"file":"glass-colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/glass-colors.ts"],"names":[],"mappings":"AAyEA;;;;;;;;;;;;;;;;;;;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AAW,CAUb"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxy.so/bloom",
3
- "version": "2.12.4",
3
+ "version": "3.0.0",
4
4
  "packageManager": "bun@1.3.14",
5
5
  "description": "Bloom UI — Oxy ecosystem component library for React Native + Expo + Web",
6
6
  "main": "lib/commonjs/index.js",
@@ -272,6 +272,20 @@
272
272
  "default": "./lib/commonjs/button-group/index.js"
273
273
  }
274
274
  },
275
+ "./control-surface": {
276
+ "react-native": {
277
+ "types": "./lib/typescript/module/control-surface/index.d.ts",
278
+ "default": "./src/control-surface/index.ts"
279
+ },
280
+ "import": {
281
+ "types": "./lib/typescript/module/control-surface/index.d.ts",
282
+ "default": "./lib/module/control-surface/index.js"
283
+ },
284
+ "require": {
285
+ "types": "./lib/typescript/commonjs/control-surface/index.d.ts",
286
+ "default": "./lib/commonjs/control-surface/index.js"
287
+ }
288
+ },
275
289
  "./layout": {
276
290
  "react-native": {
277
291
  "types": "./lib/typescript/module/layout/index.d.ts",
@@ -135,7 +135,16 @@ const ButtonGradientFill = memo(function ButtonGradientFill({
135
135
  pointerEvents="none"
136
136
  style={[StyleSheet.absoluteFill, { borderRadius: radius, overflow: 'hidden' }]}
137
137
  >
138
- <Svg style={StyleSheet.absoluteFill}>
138
+ {/*
139
+ `width`/`height` are load-bearing beside `absoluteFill`: an `<svg>` is a
140
+ REPLACED element, so `width: auto` resolves to its intrinsic size and an
141
+ SVG without one falls back to CSS's 300 x 150 — `left: 0; right: 0` does
142
+ not stretch it. A button wider than 300px stopped its gradient dead at
143
+ 300, and every narrower one scaled the vertical ramp over 150px instead
144
+ of its own 36, so only the top quarter of the gradient was ever visible.
145
+ Native is unaffected. Gate: `src/__tests__/svg-absolute-fill-size.test.ts`.
146
+ */}
147
+ <Svg width="100%" height="100%" style={StyleSheet.absoluteFill}>
139
148
  <Defs>
140
149
  <LinearGradient id={id} x1="0" y1="0" x2="0" y2="1">
141
150
  <Stop offset="0" stopColor={gradient[0]} />