@oxy.so/bloom 19.5.1 → 19.6.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 (403) hide show
  1. package/docs/activity-heatmap.mdx +7 -0
  2. package/docs/adoption-matrix.mdx +26 -26
  3. package/docs/announcement.mdx +7 -0
  4. package/docs/app-shell.mdx +18 -11
  5. package/docs/avatar.mdx +2 -0
  6. package/docs/badge.mdx +2 -0
  7. package/docs/chip.mdx +6 -2
  8. package/docs/compose-layouts.mdx +114 -2
  9. package/docs/composition-bar.mdx +4 -0
  10. package/docs/contact-card.mdx +5 -0
  11. package/docs/dialog.mdx +7 -0
  12. package/docs/divider.mdx +8 -0
  13. package/docs/empty-state.mdx +8 -0
  14. package/docs/engagement-bar.mdx +9 -0
  15. package/docs/icon-circle.mdx +2 -0
  16. package/docs/layout.mdx +1 -1
  17. package/docs/list.mdx +4 -3
  18. package/docs/page-header.mdx +7 -0
  19. package/docs/public-parts.mdx +39 -28
  20. package/docs/screen.mdx +4 -0
  21. package/docs/scroll.mdx +6 -3
  22. package/docs/sidebar.mdx +26 -5
  23. package/docs/task-catalog.json +1 -1
  24. package/docs/task-catalog.mdx +1 -1
  25. package/docs/typography.mdx +9 -0
  26. package/lib/commonjs/app-shell/AppShell.js +3 -3
  27. package/lib/commonjs/app-shell/AppShell.js.map +1 -1
  28. package/lib/commonjs/app-shell/AppShellEngine.js +2 -1
  29. package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
  30. package/lib/commonjs/app-shell/AppShellPanelLayout.js +345 -172
  31. package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
  32. package/lib/commonjs/app-shell/RetainedPanelLayout.js +6 -0
  33. package/lib/commonjs/app-shell/RetainedPanelLayout.js.map +1 -1
  34. package/lib/commonjs/app-shell/panel-layout-css.js +20 -13
  35. package/lib/commonjs/app-shell/panel-layout-css.js.map +1 -1
  36. package/lib/commonjs/app-shell/panel-layout.js +33 -185
  37. package/lib/commonjs/app-shell/panel-layout.js.map +1 -1
  38. package/lib/commonjs/app-shell/panel-motion.js +13 -36
  39. package/lib/commonjs/app-shell/panel-motion.js.map +1 -1
  40. package/lib/commonjs/app-shell/panel-transitions.js +26 -0
  41. package/lib/commonjs/app-shell/panel-transitions.js.map +1 -0
  42. package/lib/commonjs/app-shell/shell-layout-css.js +2 -2
  43. package/lib/commonjs/app-shell/shell-layout-css.js.map +1 -1
  44. package/lib/commonjs/app-shell/use-panel-exit-completion.js +100 -0
  45. package/lib/commonjs/app-shell/use-panel-exit-completion.js.map +1 -0
  46. package/lib/commonjs/app-shell/use-panel-resize.js +21 -7
  47. package/lib/commonjs/app-shell/use-panel-resize.js.map +1 -1
  48. package/lib/commonjs/app-shell/use-panel-reveal.js +2 -1
  49. package/lib/commonjs/app-shell/use-panel-reveal.js.map +1 -1
  50. package/lib/commonjs/bottom-sheet/BottomSheetBase.js +3 -2
  51. package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
  52. package/lib/commonjs/chip/Chip.js +10 -1
  53. package/lib/commonjs/chip/Chip.js.map +1 -1
  54. package/lib/commonjs/chip/shared.js +2 -2
  55. package/lib/commonjs/dialog/DialogBottomSheet.js +6 -3
  56. package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
  57. package/lib/commonjs/engagement-bar/EngagementAction.js +6 -5
  58. package/lib/commonjs/engagement-bar/EngagementAction.js.map +1 -1
  59. package/lib/commonjs/engagement-bar/EngagementBar.js +31 -7
  60. package/lib/commonjs/engagement-bar/EngagementBar.js.map +1 -1
  61. package/lib/commonjs/engagement-bar/EngagementPop.js +10 -3
  62. package/lib/commonjs/engagement-bar/EngagementPop.js.map +1 -1
  63. package/lib/commonjs/engagement-bar/context.js.map +1 -1
  64. package/lib/commonjs/engagement-bar/paint.js +59 -12
  65. package/lib/commonjs/engagement-bar/paint.js.map +1 -1
  66. package/lib/commonjs/hooks/use-border-box-size.js +46 -0
  67. package/lib/commonjs/hooks/use-border-box-size.js.map +1 -0
  68. package/lib/commonjs/layout/ScrollBar.web.js +62 -29
  69. package/lib/commonjs/layout/ScrollBar.web.js.map +1 -1
  70. package/lib/commonjs/layout/scroll-metrics.js.map +1 -1
  71. package/lib/commonjs/list/VirtualList.js +12 -0
  72. package/lib/commonjs/list/VirtualList.js.map +1 -1
  73. package/lib/commonjs/list/VirtualList.web.js +40 -19
  74. package/lib/commonjs/list/VirtualList.web.js.map +1 -1
  75. package/lib/commonjs/list/flash-list-module.js.map +1 -1
  76. package/lib/commonjs/page-header/EdgeScrim.js +14 -4
  77. package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
  78. package/lib/commonjs/page-header/PageHeader.js +19 -6
  79. package/lib/commonjs/page-header/PageHeader.js.map +1 -1
  80. package/lib/commonjs/screen/ScreenBase.js +15 -6
  81. package/lib/commonjs/screen/ScreenBase.js.map +1 -1
  82. package/lib/commonjs/screen/ScreenScrollViewBase.js +12 -2
  83. package/lib/commonjs/screen/ScreenScrollViewBase.js.map +1 -1
  84. package/lib/commonjs/screen/context.js.map +1 -1
  85. package/lib/commonjs/screen/use-intrinsic-content-height.js +53 -0
  86. package/lib/commonjs/screen/use-intrinsic-content-height.js.map +1 -0
  87. package/lib/commonjs/screen/use-screen-viewport.js +37 -6
  88. package/lib/commonjs/screen/use-screen-viewport.js.map +1 -1
  89. package/lib/commonjs/scroll/constants.js +4 -1
  90. package/lib/commonjs/scroll/constants.js.map +1 -1
  91. package/lib/commonjs/scroll/owner-handoff.js +27 -7
  92. package/lib/commonjs/scroll/owner-handoff.js.map +1 -1
  93. package/lib/commonjs/scroll/use-scroll-restoration.web.js +2 -11
  94. package/lib/commonjs/scroll/use-scroll-restoration.web.js.map +1 -1
  95. package/lib/commonjs/sidebar/Sidebar.js +121 -87
  96. package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
  97. package/lib/commonjs/sidebar/arrangement.js +36 -0
  98. package/lib/commonjs/sidebar/arrangement.js.map +1 -0
  99. package/lib/commonjs/sidebar/index.js.map +1 -1
  100. package/lib/commonjs/stay-filters/CountFilter.js +1 -1
  101. package/lib/commonjs/stay-filters/FilterChip.js +1 -1
  102. package/lib/commonjs/stay-filters/ToggleChipGroup.js +1 -1
  103. package/lib/module/app-shell/AppShell.js +3 -3
  104. package/lib/module/app-shell/AppShell.js.map +1 -1
  105. package/lib/module/app-shell/AppShellEngine.js +2 -1
  106. package/lib/module/app-shell/AppShellEngine.js.map +1 -1
  107. package/lib/module/app-shell/AppShellPanelLayout.js +319 -147
  108. package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
  109. package/lib/module/app-shell/RetainedPanelLayout.js +7 -1
  110. package/lib/module/app-shell/RetainedPanelLayout.js.map +1 -1
  111. package/lib/module/app-shell/panel-layout-css.js +19 -12
  112. package/lib/module/app-shell/panel-layout-css.js.map +1 -1
  113. package/lib/module/app-shell/panel-layout.js +32 -183
  114. package/lib/module/app-shell/panel-layout.js.map +1 -1
  115. package/lib/module/app-shell/panel-motion.js +14 -36
  116. package/lib/module/app-shell/panel-motion.js.map +1 -1
  117. package/lib/module/app-shell/panel-transitions.js +21 -0
  118. package/lib/module/app-shell/panel-transitions.js.map +1 -0
  119. package/lib/module/app-shell/shell-layout-css.js +2 -2
  120. package/lib/module/app-shell/shell-layout-css.js.map +1 -1
  121. package/lib/module/app-shell/use-panel-exit-completion.js +97 -0
  122. package/lib/module/app-shell/use-panel-exit-completion.js.map +1 -0
  123. package/lib/module/app-shell/use-panel-resize.js +22 -8
  124. package/lib/module/app-shell/use-panel-resize.js.map +1 -1
  125. package/lib/module/app-shell/use-panel-reveal.js +2 -1
  126. package/lib/module/app-shell/use-panel-reveal.js.map +1 -1
  127. package/lib/module/bottom-sheet/BottomSheetBase.js +3 -2
  128. package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
  129. package/lib/module/chip/Chip.js +10 -1
  130. package/lib/module/chip/Chip.js.map +1 -1
  131. package/lib/module/chip/shared.js +2 -2
  132. package/lib/module/dialog/DialogBottomSheet.js +6 -3
  133. package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
  134. package/lib/module/engagement-bar/EngagementAction.js +7 -6
  135. package/lib/module/engagement-bar/EngagementAction.js.map +1 -1
  136. package/lib/module/engagement-bar/EngagementBar.js +29 -5
  137. package/lib/module/engagement-bar/EngagementBar.js.map +1 -1
  138. package/lib/module/engagement-bar/EngagementPop.js +10 -3
  139. package/lib/module/engagement-bar/EngagementPop.js.map +1 -1
  140. package/lib/module/engagement-bar/context.js.map +1 -1
  141. package/lib/module/engagement-bar/paint.js +60 -13
  142. package/lib/module/engagement-bar/paint.js.map +1 -1
  143. package/lib/module/hooks/use-border-box-size.js +42 -0
  144. package/lib/module/hooks/use-border-box-size.js.map +1 -0
  145. package/lib/module/layout/ScrollBar.web.js +64 -31
  146. package/lib/module/layout/ScrollBar.web.js.map +1 -1
  147. package/lib/module/layout/scroll-metrics.js.map +1 -1
  148. package/lib/module/list/VirtualList.js +12 -0
  149. package/lib/module/list/VirtualList.js.map +1 -1
  150. package/lib/module/list/VirtualList.web.js +41 -20
  151. package/lib/module/list/VirtualList.web.js.map +1 -1
  152. package/lib/module/list/flash-list-module.js.map +1 -1
  153. package/lib/module/page-header/EdgeScrim.js +14 -4
  154. package/lib/module/page-header/EdgeScrim.js.map +1 -1
  155. package/lib/module/page-header/PageHeader.js +19 -6
  156. package/lib/module/page-header/PageHeader.js.map +1 -1
  157. package/lib/module/screen/ScreenBase.js +15 -6
  158. package/lib/module/screen/ScreenBase.js.map +1 -1
  159. package/lib/module/screen/ScreenScrollViewBase.js +12 -2
  160. package/lib/module/screen/ScreenScrollViewBase.js.map +1 -1
  161. package/lib/module/screen/context.js.map +1 -1
  162. package/lib/module/screen/use-intrinsic-content-height.js +50 -0
  163. package/lib/module/screen/use-intrinsic-content-height.js.map +1 -0
  164. package/lib/module/screen/use-screen-viewport.js +39 -8
  165. package/lib/module/screen/use-screen-viewport.js.map +1 -1
  166. package/lib/module/scroll/constants.js +3 -0
  167. package/lib/module/scroll/constants.js.map +1 -1
  168. package/lib/module/scroll/owner-handoff.js +27 -8
  169. package/lib/module/scroll/owner-handoff.js.map +1 -1
  170. package/lib/module/scroll/use-scroll-restoration.web.js +1 -10
  171. package/lib/module/scroll/use-scroll-restoration.web.js.map +1 -1
  172. package/lib/module/sidebar/Sidebar.js +121 -87
  173. package/lib/module/sidebar/Sidebar.js.map +1 -1
  174. package/lib/module/sidebar/arrangement.js +32 -0
  175. package/lib/module/sidebar/arrangement.js.map +1 -0
  176. package/lib/module/sidebar/index.js.map +1 -1
  177. package/lib/module/stay-filters/CountFilter.js +1 -1
  178. package/lib/module/stay-filters/FilterChip.js +1 -1
  179. package/lib/module/stay-filters/ToggleChipGroup.js +1 -1
  180. package/lib/typescript/commonjs/app-shell/AppShell.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
  182. package/lib/typescript/commonjs/app-shell/AppShellPanelLayout.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/app-shell/RetainedPanelLayout.d.ts.map +1 -1
  184. package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts +2 -1
  185. package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts +11 -2
  187. package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts.map +1 -1
  188. package/lib/typescript/commonjs/app-shell/panel-layout.d.ts +13 -27
  189. package/lib/typescript/commonjs/app-shell/panel-layout.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/app-shell/panel-motion.d.ts +1 -12
  191. package/lib/typescript/commonjs/app-shell/panel-motion.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts +4 -0
  193. package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts.map +1 -0
  194. package/lib/typescript/commonjs/app-shell/shell-layout-css.d.ts.map +1 -1
  195. package/lib/typescript/commonjs/app-shell/types.d.ts +4 -0
  196. package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
  197. package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts +14 -0
  198. package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts.map +1 -0
  199. package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts +2 -2
  200. package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts.map +1 -1
  201. package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts +4 -2
  202. package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts.map +1 -1
  203. package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts +2 -2
  204. package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts.map +1 -1
  205. package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/bottom-sheet/types.d.ts +2 -0
  207. package/lib/typescript/commonjs/bottom-sheet/types.d.ts.map +1 -1
  208. package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
  209. package/lib/typescript/commonjs/chip/shared.d.ts +1 -1
  210. package/lib/typescript/commonjs/chip/types.d.ts +1 -1
  211. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
  212. package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
  213. package/lib/typescript/commonjs/dialog/types.d.ts +2 -0
  214. package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
  215. package/lib/typescript/commonjs/engagement-bar/EngagementAction.d.ts.map +1 -1
  216. package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts +3 -3
  217. package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts.map +1 -1
  218. package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts +2 -1
  219. package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts.map +1 -1
  220. package/lib/typescript/commonjs/engagement-bar/context.d.ts +1 -0
  221. package/lib/typescript/commonjs/engagement-bar/context.d.ts.map +1 -1
  222. package/lib/typescript/commonjs/engagement-bar/paint.d.ts +4 -2
  223. package/lib/typescript/commonjs/engagement-bar/paint.d.ts.map +1 -1
  224. package/lib/typescript/commonjs/engagement-bar/types.d.ts +10 -1
  225. package/lib/typescript/commonjs/engagement-bar/types.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts +13 -0
  227. package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/layout/ScrollBar.web.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/layout/scroll-metrics.d.ts +2 -0
  230. package/lib/typescript/commonjs/layout/scroll-metrics.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/layout/types.d.ts +2 -2
  232. package/lib/typescript/commonjs/layout/types.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/list/VirtualList.d.ts.map +1 -1
  234. package/lib/typescript/commonjs/list/VirtualList.web.d.ts.map +1 -1
  235. package/lib/typescript/commonjs/list/flash-list-module.d.ts +1 -1
  236. package/lib/typescript/commonjs/list/flash-list-module.d.ts.map +1 -1
  237. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +3 -1
  238. package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
  239. package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
  240. package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/page-header/types.d.ts +2 -0
  242. package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/screen/ScreenBase.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/screen/ScreenScrollViewBase.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/screen/context.d.ts +3 -0
  246. package/lib/typescript/commonjs/screen/context.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts +3 -0
  248. package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/screen/use-screen-viewport.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/scroll/constants.d.ts +2 -0
  251. package/lib/typescript/commonjs/scroll/constants.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/scroll/owner-handoff.d.ts +3 -1
  253. package/lib/typescript/commonjs/scroll/owner-handoff.d.ts.map +1 -1
  254. package/lib/typescript/commonjs/scroll/use-scroll-restoration.web.d.ts.map +1 -1
  255. package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
  256. package/lib/typescript/commonjs/sidebar/arrangement.d.ts +32 -0
  257. package/lib/typescript/commonjs/sidebar/arrangement.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/sidebar/index.d.ts +1 -0
  259. package/lib/typescript/commonjs/sidebar/index.d.ts.map +1 -1
  260. package/lib/typescript/commonjs/sidebar/types.d.ts +13 -1
  261. package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/stay-filters/CountFilter.d.ts +1 -1
  263. package/lib/typescript/commonjs/stay-filters/ToggleChipGroup.d.ts +1 -1
  264. package/lib/typescript/module/app-shell/AppShell.d.ts.map +1 -1
  265. package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
  266. package/lib/typescript/module/app-shell/AppShellPanelLayout.d.ts.map +1 -1
  267. package/lib/typescript/module/app-shell/RetainedPanelLayout.d.ts.map +1 -1
  268. package/lib/typescript/module/app-shell/panel-layout-css.d.ts +2 -1
  269. package/lib/typescript/module/app-shell/panel-layout-css.d.ts.map +1 -1
  270. package/lib/typescript/module/app-shell/panel-layout-types.d.ts +11 -2
  271. package/lib/typescript/module/app-shell/panel-layout-types.d.ts.map +1 -1
  272. package/lib/typescript/module/app-shell/panel-layout.d.ts +13 -27
  273. package/lib/typescript/module/app-shell/panel-layout.d.ts.map +1 -1
  274. package/lib/typescript/module/app-shell/panel-motion.d.ts +1 -12
  275. package/lib/typescript/module/app-shell/panel-motion.d.ts.map +1 -1
  276. package/lib/typescript/module/app-shell/panel-transitions.d.ts +4 -0
  277. package/lib/typescript/module/app-shell/panel-transitions.d.ts.map +1 -0
  278. package/lib/typescript/module/app-shell/shell-layout-css.d.ts.map +1 -1
  279. package/lib/typescript/module/app-shell/types.d.ts +4 -0
  280. package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
  281. package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts +14 -0
  282. package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts.map +1 -0
  283. package/lib/typescript/module/app-shell/use-panel-reorder.d.ts +2 -2
  284. package/lib/typescript/module/app-shell/use-panel-reorder.d.ts.map +1 -1
  285. package/lib/typescript/module/app-shell/use-panel-resize.d.ts +4 -2
  286. package/lib/typescript/module/app-shell/use-panel-resize.d.ts.map +1 -1
  287. package/lib/typescript/module/app-shell/use-panel-reveal.d.ts +2 -2
  288. package/lib/typescript/module/app-shell/use-panel-reveal.d.ts.map +1 -1
  289. package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
  290. package/lib/typescript/module/bottom-sheet/types.d.ts +2 -0
  291. package/lib/typescript/module/bottom-sheet/types.d.ts.map +1 -1
  292. package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
  293. package/lib/typescript/module/chip/shared.d.ts +1 -1
  294. package/lib/typescript/module/chip/types.d.ts +1 -1
  295. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
  296. package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
  297. package/lib/typescript/module/dialog/types.d.ts +2 -0
  298. package/lib/typescript/module/dialog/types.d.ts.map +1 -1
  299. package/lib/typescript/module/engagement-bar/EngagementAction.d.ts.map +1 -1
  300. package/lib/typescript/module/engagement-bar/EngagementBar.d.ts +3 -3
  301. package/lib/typescript/module/engagement-bar/EngagementBar.d.ts.map +1 -1
  302. package/lib/typescript/module/engagement-bar/EngagementPop.d.ts +2 -1
  303. package/lib/typescript/module/engagement-bar/EngagementPop.d.ts.map +1 -1
  304. package/lib/typescript/module/engagement-bar/context.d.ts +1 -0
  305. package/lib/typescript/module/engagement-bar/context.d.ts.map +1 -1
  306. package/lib/typescript/module/engagement-bar/paint.d.ts +4 -2
  307. package/lib/typescript/module/engagement-bar/paint.d.ts.map +1 -1
  308. package/lib/typescript/module/engagement-bar/types.d.ts +10 -1
  309. package/lib/typescript/module/engagement-bar/types.d.ts.map +1 -1
  310. package/lib/typescript/module/hooks/use-border-box-size.d.ts +13 -0
  311. package/lib/typescript/module/hooks/use-border-box-size.d.ts.map +1 -0
  312. package/lib/typescript/module/layout/ScrollBar.web.d.ts.map +1 -1
  313. package/lib/typescript/module/layout/scroll-metrics.d.ts +2 -0
  314. package/lib/typescript/module/layout/scroll-metrics.d.ts.map +1 -1
  315. package/lib/typescript/module/layout/types.d.ts +2 -2
  316. package/lib/typescript/module/layout/types.d.ts.map +1 -1
  317. package/lib/typescript/module/list/VirtualList.d.ts.map +1 -1
  318. package/lib/typescript/module/list/VirtualList.web.d.ts.map +1 -1
  319. package/lib/typescript/module/list/flash-list-module.d.ts +1 -1
  320. package/lib/typescript/module/list/flash-list-module.d.ts.map +1 -1
  321. package/lib/typescript/module/page-header/EdgeScrim.d.ts +3 -1
  322. package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
  323. package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
  324. package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
  325. package/lib/typescript/module/page-header/types.d.ts +2 -0
  326. package/lib/typescript/module/page-header/types.d.ts.map +1 -1
  327. package/lib/typescript/module/screen/ScreenBase.d.ts.map +1 -1
  328. package/lib/typescript/module/screen/ScreenScrollViewBase.d.ts.map +1 -1
  329. package/lib/typescript/module/screen/context.d.ts +3 -0
  330. package/lib/typescript/module/screen/context.d.ts.map +1 -1
  331. package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts +3 -0
  332. package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts.map +1 -0
  333. package/lib/typescript/module/screen/use-screen-viewport.d.ts.map +1 -1
  334. package/lib/typescript/module/scroll/constants.d.ts +2 -0
  335. package/lib/typescript/module/scroll/constants.d.ts.map +1 -1
  336. package/lib/typescript/module/scroll/owner-handoff.d.ts +3 -1
  337. package/lib/typescript/module/scroll/owner-handoff.d.ts.map +1 -1
  338. package/lib/typescript/module/scroll/use-scroll-restoration.web.d.ts.map +1 -1
  339. package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
  340. package/lib/typescript/module/sidebar/arrangement.d.ts +32 -0
  341. package/lib/typescript/module/sidebar/arrangement.d.ts.map +1 -0
  342. package/lib/typescript/module/sidebar/index.d.ts +1 -0
  343. package/lib/typescript/module/sidebar/index.d.ts.map +1 -1
  344. package/lib/typescript/module/sidebar/types.d.ts +13 -1
  345. package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
  346. package/lib/typescript/module/stay-filters/CountFilter.d.ts +1 -1
  347. package/lib/typescript/module/stay-filters/ToggleChipGroup.d.ts +1 -1
  348. package/package.json +1 -1
  349. package/src/__tests__/support/public-part-classifications.json +169 -26
  350. package/src/__tests__/support/yoga-host-tree.ts +55 -2
  351. package/src/app-shell/AppShell.tsx +7 -3
  352. package/src/app-shell/AppShellEngine.tsx +6 -2
  353. package/src/app-shell/AppShellPanelLayout.tsx +466 -189
  354. package/src/app-shell/RetainedPanelLayout.tsx +7 -1
  355. package/src/app-shell/panel-layout-css.ts +41 -27
  356. package/src/app-shell/panel-layout-types.ts +11 -2
  357. package/src/app-shell/panel-layout.ts +49 -256
  358. package/src/app-shell/panel-motion.ts +34 -52
  359. package/src/app-shell/panel-transitions.ts +39 -0
  360. package/src/app-shell/shell-layout-css.ts +6 -2
  361. package/src/app-shell/types.ts +4 -0
  362. package/src/app-shell/use-panel-exit-completion.ts +95 -0
  363. package/src/app-shell/use-panel-reorder.ts +2 -2
  364. package/src/app-shell/use-panel-resize.ts +37 -10
  365. package/src/app-shell/use-panel-reveal.ts +4 -9
  366. package/src/bottom-sheet/BottomSheetBase.tsx +6 -2
  367. package/src/bottom-sheet/types.ts +2 -0
  368. package/src/chip/Chip.tsx +3 -1
  369. package/src/chip/shared.ts +2 -2
  370. package/src/chip/types.ts +1 -1
  371. package/src/dialog/DialogBottomSheet.tsx +13 -2
  372. package/src/dialog/types.ts +2 -0
  373. package/src/engagement-bar/EngagementAction.tsx +5 -4
  374. package/src/engagement-bar/EngagementBar.tsx +30 -5
  375. package/src/engagement-bar/EngagementPop.tsx +11 -3
  376. package/src/engagement-bar/context.ts +1 -0
  377. package/src/engagement-bar/paint.ts +60 -13
  378. package/src/engagement-bar/types.ts +10 -1
  379. package/src/hooks/use-border-box-size.ts +38 -0
  380. package/src/layout/ScrollBar.web.tsx +74 -40
  381. package/src/layout/scroll-metrics.tsx +2 -0
  382. package/src/layout/types.ts +2 -2
  383. package/src/list/VirtualList.tsx +18 -0
  384. package/src/list/VirtualList.web.tsx +69 -22
  385. package/src/list/flash-list-module.ts +2 -0
  386. package/src/page-header/EdgeScrim.tsx +29 -9
  387. package/src/page-header/PageHeader.tsx +10 -6
  388. package/src/page-header/types.ts +2 -0
  389. package/src/screen/ScreenBase.tsx +13 -6
  390. package/src/screen/ScreenScrollViewBase.tsx +24 -2
  391. package/src/screen/context.ts +3 -0
  392. package/src/screen/use-intrinsic-content-height.ts +56 -0
  393. package/src/screen/use-screen-viewport.ts +60 -11
  394. package/src/scroll/constants.ts +3 -0
  395. package/src/scroll/owner-handoff.ts +45 -11
  396. package/src/scroll/use-scroll-restoration.web.ts +4 -10
  397. package/src/sidebar/Sidebar.tsx +146 -121
  398. package/src/sidebar/arrangement.ts +47 -0
  399. package/src/sidebar/index.ts +6 -0
  400. package/src/sidebar/types.ts +13 -1
  401. package/src/stay-filters/CountFilter.tsx +1 -1
  402. package/src/stay-filters/FilterChip.tsx +1 -1
  403. package/src/stay-filters/ToggleChipGroup.tsx +1 -1
@@ -6,6 +6,7 @@ import { formatCompactNumber } from '../locale/format-number';
6
6
  import { useBloomLocale } from '../locale/context';
7
7
  import { interactiveWebCss, useInteractiveWebCss } from '../styles/interactive-web-css';
8
8
  import { useTheme } from '../theme/use-theme';
9
+ import { useBloomAppearance } from '../appearance/context';
9
10
  import { ENGAGEMENT_ACTION_SELECTOR } from './constants';
10
11
  import { EngagementBarContext, type EngagementBarContextValue } from './context';
11
12
  import { WASH_VAR, resolveEngagementPaint } from './paint';
@@ -33,8 +34,8 @@ ${ENGAGEMENT_ACTION_SELECTOR} { transition: none; }
33
34
  });
34
35
 
35
36
  /**
36
- * A post's action bar: a row of `EngagementAction`s with an optional trailing
37
- * group pushed to the far edge.
37
+ * A row or media rail of `EngagementAction`s with an optional trailing group
38
+ * pushed to the far edge.
38
39
  *
39
40
  * The bar resolves paint, the count format and haptics ONCE and hands them to
40
41
  * its actions through one context, because a feed mounts one bar per row and
@@ -46,28 +47,46 @@ export function EngagementBar({
46
47
  formatCount,
47
48
  locale,
48
49
  haptics = true,
50
+ orientation = 'horizontal',
51
+ size: sizeProp,
52
+ tone = 'default',
53
+ showZeroCounts = false,
49
54
  style,
50
55
  testID,
51
56
  }: EngagementBarProps) {
52
57
  const theme = useTheme();
58
+ const { size } = useBloomAppearance({ size: sizeProp }, { size: 'md', tone: 'neutral' });
53
59
  const impact = useHaptics();
54
60
  const resolvedLocale = useBloomLocale(locale);
55
61
  useInteractiveWebCss(STYLE_ID, ENGAGEMENT_ACTION_CSS);
56
62
 
57
63
  const value = useMemo<EngagementBarContextValue>(
58
64
  () => ({
59
- paint: resolveEngagementPaint(theme.colors),
65
+ paint: resolveEngagementPaint(theme.colors, { orientation, size, tone }),
66
+ showZeroCounts,
60
67
  formatCount: formatCount ?? ((count) => formatCompactNumber(count, resolvedLocale)),
61
68
  haptic: haptics ? impact : () => undefined,
62
69
  }),
63
- [theme.colors, formatCount, resolvedLocale, haptics, impact],
70
+ [
71
+ theme.colors,
72
+ formatCount,
73
+ resolvedLocale,
74
+ haptics,
75
+ impact,
76
+ orientation,
77
+ size,
78
+ tone,
79
+ showZeroCounts,
80
+ ],
64
81
  );
65
82
 
66
83
  return (
67
84
  <EngagementBarContext.Provider value={value}>
68
85
  <View style={[value.paint.bar, style]} testID={testID}>
69
86
  {children}
70
- {trailing ? <View style={TRAILING}>{trailing}</View> : null}
87
+ {trailing ? (
88
+ <View style={orientation === 'vertical' ? TRAILING_VERTICAL : TRAILING}>{trailing}</View>
89
+ ) : null}
71
90
  </View>
72
91
  </EngagementBarContext.Provider>
73
92
  );
@@ -80,3 +99,9 @@ const TRAILING = {
80
99
  alignItems: 'center',
81
100
  justifyContent: 'flex-end',
82
101
  } as const;
102
+ const TRAILING_VERTICAL = {
103
+ flexDirection: 'column',
104
+ alignItems: 'center',
105
+ marginTop: 'auto',
106
+ gap: 8,
107
+ } as const;
@@ -47,10 +47,12 @@ const BURST = { duration: POP_MS, easing: EASE_OUT, reduceMotion: ReduceMotion.S
47
47
  export function EngagementPop({
48
48
  icon: Icon,
49
49
  color,
50
+ size = ENGAGEMENT_ICON_SIZE,
50
51
  onDone,
51
52
  }: {
52
53
  icon: BloomIconComponent;
53
54
  color: string;
55
+ size?: number;
54
56
  onDone?: EngagementMotionDone;
55
57
  }) {
56
58
  const scale = useSharedValue(1);
@@ -81,10 +83,16 @@ export function EngagementPop({
81
83
  );
82
84
 
83
85
  return (
84
- <View style={BOX}>
85
- <Animated.View style={[RING, { borderColor: color }, ringStyle]} />
86
+ <View style={[BOX, { width: size, height: size }]}>
87
+ <Animated.View
88
+ style={[
89
+ RING,
90
+ { width: size, height: size, borderRadius: size / 2, borderColor: color },
91
+ ringStyle,
92
+ ]}
93
+ />
86
94
  <Animated.View style={glyphStyle}>
87
- <Icon width={ENGAGEMENT_ICON_SIZE} height={ENGAGEMENT_ICON_SIZE} fill={color} />
95
+ <Icon width={size} height={size} fill={color} />
88
96
  </Animated.View>
89
97
  </View>
90
98
  );
@@ -5,6 +5,7 @@ import type { EngagementPaint } from './paint';
5
5
 
6
6
  export interface EngagementBarContextValue {
7
7
  paint: EngagementPaint;
8
+ showZeroCounts: boolean;
8
9
  formatCount: (count: number) => string;
9
10
  haptic: (strength: HapticStrength) => void;
10
11
  }
@@ -6,8 +6,15 @@ import { borderRadius, fontSize } from '../styles/tokens';
6
6
  import { IS_WEB } from '../styles/platform';
7
7
  import type { WebCssStyle } from '../styles/web-view-style';
8
8
  import { SANS_FONT_FAMILY } from '../text-field/shared';
9
- import { ENGAGEMENT_COUNT_GAP, ENGAGEMENT_PAD_X, ENGAGEMENT_PAD_Y } from './constants';
10
- import type { EngagementTone } from './types';
9
+ import {
10
+ ENGAGEMENT_COUNT_GAP,
11
+ ENGAGEMENT_PAD_X,
12
+ ENGAGEMENT_PAD_Y,
13
+ ENGAGEMENT_ICON_SIZE,
14
+ ENGAGEMENT_SPINNER_SIZE,
15
+ } from './constants';
16
+ import type { EngagementBarProps, EngagementTone } from './types';
17
+ import type { BloomSize } from '../appearance/types';
11
18
 
12
19
  const TONES: readonly EngagementTone[] = [
13
20
  'primary',
@@ -39,6 +46,8 @@ export interface EngagementTonePaint {
39
46
  * action reads one context and allocates no style of its own.
40
47
  */
41
48
  export interface EngagementPaint {
49
+ iconSize: number;
50
+ spinnerSize: number;
42
51
  /** Glyph and count colour at rest. */
43
52
  restColor: string;
44
53
  restCount: TextStyle;
@@ -64,31 +73,69 @@ const COUNT_BASE: TextStyle = {
64
73
  fontVariant: ['tabular-nums'],
65
74
  };
66
75
 
67
- export function resolveEngagementPaint(colors: ThemeColors): EngagementPaint {
76
+ const GEOMETRY: Record<BloomSize, { iconSize: number; spinnerSize: number; countSize: number }> = {
77
+ xs: { iconSize: 16, spinnerSize: 12, countSize: fontSize.xs },
78
+ sm: { iconSize: 18, spinnerSize: 14, countSize: 12 },
79
+ md: {
80
+ iconSize: ENGAGEMENT_ICON_SIZE,
81
+ spinnerSize: ENGAGEMENT_SPINNER_SIZE,
82
+ countSize: fontSize.sm,
83
+ },
84
+ lg: { iconSize: 28, spinnerSize: 24, countSize: fontSize.sm },
85
+ };
86
+
87
+ export function resolveEngagementPaint(
88
+ colors: ThemeColors,
89
+ {
90
+ orientation = 'horizontal',
91
+ size = 'md',
92
+ tone: surface = 'default',
93
+ }: Pick<EngagementBarProps, 'orientation' | 'size' | 'tone'> = {},
94
+ ): EngagementPaint {
95
+ const vertical = orientation === 'vertical';
96
+ const onImage = surface === 'onImage';
97
+ const geometry = GEOMETRY[size];
98
+ const actionBase = vertical
99
+ ? {
100
+ ...ACTION_BASE,
101
+ flexDirection: 'column' as const,
102
+ minWidth: 44,
103
+ minHeight: 44,
104
+ paddingTop: 4,
105
+ paddingBottom: 4,
106
+ }
107
+ : ACTION_BASE;
108
+ const countBase: TextStyle = { ...COUNT_BASE, fontSize: geometry.countSize };
109
+ const restColor = onImage ? '#FFFFFF' : colors.textSecondary;
68
110
  const tones = {} as Record<EngagementTone, EngagementTonePaint>;
69
111
  for (const tone of TONES) {
70
112
  const color = resolveAccentColors(colors, tone, 'outlined').foreground;
71
- const wash = resolveAccentColors(colors, tone, 'subtle').background;
72
- const webRest: WebCssStyle = { ...ACTION_BASE, [WASH_VAR]: wash };
73
- const rest: ViewStyle = IS_WEB ? webRest : ACTION_BASE;
113
+ const wash = onImage
114
+ ? 'rgba(255,255,255,0.16)'
115
+ : resolveAccentColors(colors, tone, 'subtle').background;
116
+ const webRest = { ...actionBase, [WASH_VAR]: wash } as WebCssStyle;
117
+ const rest: ViewStyle = IS_WEB ? webRest : actionBase;
74
118
  tones[tone] = {
75
119
  color,
76
120
  rest,
77
121
  pressed: { ...rest, backgroundColor: wash },
78
- activeCount: { ...COUNT_BASE, color, fontWeight: '600' },
122
+ activeCount: { ...countBase, color, fontWeight: '600' },
79
123
  };
80
124
  }
81
125
  const neutral = resolveAccentColors(colors, 'default', 'subtle');
82
126
  return {
83
- restColor: colors.textSecondary,
84
- restCount: { ...COUNT_BASE, color: colors.textSecondary },
127
+ iconSize: geometry.iconSize,
128
+ spinnerSize: geometry.spinnerSize,
129
+ restColor,
130
+ restCount: { ...countBase, color: restColor },
85
131
  tones,
86
132
  bar: {
87
- flexDirection: 'row',
133
+ flexDirection: vertical ? 'column' : 'row',
88
134
  alignItems: 'center',
89
- marginLeft: -ENGAGEMENT_PAD_X,
90
- marginRight: -ENGAGEMENT_PAD_X,
91
- ...(IS_WEB ? { [RING_VAR]: colors.primary } : null),
135
+ marginLeft: vertical ? 0 : -ENGAGEMENT_PAD_X,
136
+ marginRight: vertical ? 0 : -ENGAGEMENT_PAD_X,
137
+ ...(vertical ? { gap: 8 } : null),
138
+ ...(IS_WEB ? { [RING_VAR]: onImage ? '#FFFFFF' : colors.primary } : null),
92
139
  },
93
140
  // Gives the bar's bleed back: the pill's own edge, not its first glyph,
94
141
  // lines up with the content edge.
@@ -9,11 +9,20 @@ import type {
9
9
 
10
10
  import type { BloomIconComponent } from '../icons/icon-component';
11
11
  import type { AccentTone } from '../theme/accent-colors';
12
+ import type { BloomSize } from '../appearance/types';
12
13
 
13
14
  /** The colour an action takes while `active`: any accent tone but the neutral one. */
14
15
  export type EngagementTone = Exclude<AccentTone, 'default'>;
15
16
 
16
17
  export interface EngagementBarProps {
18
+ /** Vertical rails stack actions and put each count below its glyph. Default horizontal. */
19
+ orientation?: 'horizontal' | 'vertical';
20
+ /** Inherits BloomScope (default md). Large uses 28px glyphs for media rails. */
21
+ size?: BloomSize;
22
+ /** White resting glyphs/counts over media; active actions retain their semantic tone. */
23
+ tone?: 'default' | 'onImage';
24
+ /** Keep zero counts visible, including the first 0→1 roll. Default false. */
25
+ showZeroCounts?: boolean;
17
26
  /** The leading actions, in reading order. */
18
27
  children: ReactNode;
19
28
  /** Actions pushed to the far edge of the row (save, translate, insights). */
@@ -39,7 +48,7 @@ export interface EngagementActionProps {
39
48
  /** Required: the action is a glyph, so nothing else names it. */
40
49
  accessibilityLabel: string;
41
50
  accessibilityHint?: string;
42
- /** Drawn beside the glyph through the bar's `formatCount`; hidden when `0` or absent. */
51
+ /** Beside the glyph, or below in a vertical bar; zero follows the bar's showZeroCounts. */
43
52
  count?: number | null;
44
53
  /**
45
54
  * Whether the viewer has done this (liked, reposted, saved). Defined makes the
@@ -0,0 +1,38 @@
1
+ import { useCallback, useRef, type ComponentRef } from 'react';
2
+ import { Platform, type LayoutChangeEvent, type View } from 'react-native';
3
+
4
+ type Size = { width: number; height: number };
5
+
6
+ /** Read size, not position: web resize entries already contain the measured box. */
7
+ export function useBorderBoxSize(onSize: (size: Size) => void) {
8
+ const callback = useRef(onSize);
9
+ callback.current = onSize;
10
+ const observer = useRef<ResizeObserver | null>(null);
11
+ const observe = Platform.OS === 'web' && typeof ResizeObserver !== 'undefined';
12
+ const ref = useCallback(
13
+ (view: ComponentRef<typeof View> | null) => {
14
+ observer.current?.disconnect();
15
+ observer.current = null;
16
+ if (!observe || !view) return;
17
+ const node = view as unknown as HTMLElement;
18
+ const current = new ResizeObserver((entries) => {
19
+ if (observer.current !== current) return;
20
+ const entry = entries.find((candidate) => candidate.target === node);
21
+ if (!entry) return;
22
+ const box = entry.borderBoxSize?.[0];
23
+ callback.current(
24
+ box
25
+ ? { width: box.inlineSize, height: box.blockSize }
26
+ : { width: node.offsetWidth, height: node.offsetHeight },
27
+ );
28
+ });
29
+ observer.current = current;
30
+ current.observe(node, { box: 'border-box' });
31
+ },
32
+ [observe],
33
+ );
34
+ const onLayout = useCallback((event: LayoutChangeEvent) => {
35
+ callback.current(event.nativeEvent.layout);
36
+ }, []);
37
+ return { ref: observe ? ref : undefined, onLayout: observe ? undefined : onLayout };
38
+ }
@@ -1,6 +1,6 @@
1
1
  import { resolveScrollElement } from '../scroll/scrollable.web';
2
- import { useEffect, useState } from 'react';
3
- import { adoptStyleSheet } from '../styles/adopt-style-sheet';
2
+ import { useLayoutEffect, useRef, useState } from 'react';
3
+ import { ServerStyleSheet } from '../styles/ServerStyleSheet';
4
4
  import { ScrollAreaBar } from './ScrollAreaBar.web';
5
5
  import type { ScrollBarProps } from './types';
6
6
 
@@ -10,9 +10,26 @@ const CSS = `
10
10
  [data-bloom-scroll-area] { scrollbar-width: none; }
11
11
  [data-bloom-scroll-area]::-webkit-scrollbar { display: none; }
12
12
  `;
13
- const owners = new WeakMap<HTMLElement, number>();
13
+ const owners = new WeakMap<HTMLElement, { count: number; original: string | null }>();
14
14
  const THICKNESS = { sm: 4, md: 6 } as const;
15
15
 
16
+ function claimIndicator(scroller: HTMLElement) {
17
+ const claim = owners.get(scroller) ?? {
18
+ count: 0,
19
+ original: scroller.getAttribute('data-bloom-scroll-area'),
20
+ };
21
+ claim.count += 1;
22
+ owners.set(scroller, claim);
23
+ scroller.setAttribute('data-bloom-scroll-area', '');
24
+ return () => {
25
+ claim.count -= 1;
26
+ if (claim.count > 0) return;
27
+ owners.delete(scroller);
28
+ if (claim.original === null) scroller.removeAttribute('data-bloom-scroll-area');
29
+ else scroller.setAttribute('data-bloom-scroll-area', claim.original);
30
+ };
31
+ }
32
+
16
33
  /**
17
34
  * Bloom's scrollbar over a scroller of your own: themed, compact, drawn OVER the content (so it
18
35
  * takes no room and nothing moves when it appears), and hidden when it is not needed. It hides
@@ -31,46 +48,63 @@ export function ScrollBar({
31
48
  offset,
32
49
  }: ScrollBarProps) {
33
50
  const [scroller, setScroller] = useState<HTMLElement | null>(null);
34
- useEffect(() => {
35
- adoptStyleSheet(STYLE_ID, CSS);
36
- }, []);
37
- // Every commit: a scroller that remounts is a new node, and the bar must follow it.
38
- useEffect(() => {
39
- const node =
40
- target === 'document'
41
- ? ((document.scrollingElement ?? document.documentElement) as HTMLElement)
42
- : resolveScrollElement(target);
43
- setScroller((was) => (was === node ? was : node));
44
- });
45
- useEffect(() => {
46
- if (!scroller) return;
47
- owners.set(scroller, (owners.get(scroller) ?? 0) + 1);
48
- scroller.setAttribute('data-bloom-scroll-area', '');
49
- return () => {
50
- const remaining = (owners.get(scroller) ?? 1) - 1;
51
- if (remaining > 0) owners.set(scroller, remaining);
52
- else {
53
- owners.delete(scroller);
54
- scroller.removeAttribute('data-bloom-scroll-area');
51
+ const claim = useRef<{ node: HTMLElement; release(): void } | null>(null);
52
+ const resolveOwner = () =>
53
+ target === 'document'
54
+ ? ((document.scrollingElement ?? document.documentElement) as HTMLElement)
55
+ : resolveScrollElement(target);
56
+ // Claim the current owner before paint, including a replaced ref. Waiting for
57
+ // passive effects exposed the system bar between document and panel modes.
58
+ useLayoutEffect(() => {
59
+ let cancelled = false;
60
+ const attach = () => {
61
+ const node = resolveOwner();
62
+ if (claim.current?.node !== node) {
63
+ claim.current?.release();
64
+ claim.current = node ? { node, release: claimIndicator(node) } : null;
55
65
  }
66
+ if (scroller !== node) setScroller(node);
67
+ return node;
56
68
  };
57
- }, [scroller]);
69
+ if (!attach()) {
70
+ // An ancestor ref attaches after child layout effects. Resolve once at
71
+ // the end of this commit, before paint, without a passive-render round trip.
72
+ queueMicrotask(() => {
73
+ if (!cancelled) attach();
74
+ });
75
+ }
76
+ return () => {
77
+ cancelled = true;
78
+ };
79
+ });
80
+ useLayoutEffect(
81
+ () => () => {
82
+ claim.current?.release();
83
+ claim.current = null;
84
+ },
85
+ [],
86
+ );
58
87
 
59
88
  return (
60
- <ScrollAreaBar
61
- scroller={scroller}
62
- area={
63
- target === 'document' && typeof document !== 'undefined'
64
- ? document.documentElement
65
- : (scroller?.parentElement ?? null)
66
- }
67
- viewport={target === 'document'}
68
- offset={offset}
69
- horizontal={Boolean(horizontal)}
70
- side={side}
71
- mode={scrollbar}
72
- thickness={THICKNESS[size]}
73
- insets={insets}
74
- />
89
+ <>
90
+ <ServerStyleSheet id={STYLE_ID} css={CSS} />
91
+ {scrollbar === 'never' ? null : (
92
+ <ScrollAreaBar
93
+ scroller={scroller}
94
+ area={
95
+ target === 'document' && typeof document !== 'undefined'
96
+ ? document.documentElement
97
+ : (scroller?.parentElement ?? null)
98
+ }
99
+ viewport={target === 'document'}
100
+ offset={offset}
101
+ horizontal={Boolean(horizontal)}
102
+ side={side}
103
+ mode={scrollbar}
104
+ thickness={THICKNESS[size]}
105
+ insets={insets}
106
+ />
107
+ )}
108
+ </>
75
109
  );
76
110
  }
@@ -6,6 +6,8 @@ export interface ScrollMetrics {
6
6
  scrollY: SharedValue<number>;
7
7
  contentHeight: SharedValue<number>;
8
8
  viewportHeight: SharedValue<number>;
9
+ /** Natural content extent, including viewport padding; -1 when unknown. */
10
+ intrinsicContentHeight?: SharedValue<number>;
9
11
  }
10
12
 
11
13
  /** Internal scope boundary; overlay screens must not follow the page beneath them. */
@@ -49,8 +49,8 @@ export interface ScrollBarProps {
49
49
  target: RefObject<unknown> | 'document';
50
50
  /** Cross-axis clearance for persistent viewport chrome (document bars). */
51
51
  offset?: number;
52
- /** When the bar shows. Default `'scroll'`. */
53
- scrollbar?: Exclude<ScrollAreaScrollbar, 'never'>;
52
+ /** When the bar shows. Default `'scroll'`; `'never'` hides both indicators on web. */
53
+ scrollbar?: ScrollAreaScrollbar;
54
54
  /** The bar's thickness: `sm` 4px (default) or `md` 6px. */
55
55
  size?: 'sm' | 'md';
56
56
  /** Which inline edge a vertical bar sits on. Default `'end'`. Ignored when `horizontal`. */
@@ -23,6 +23,8 @@
23
23
  import * as React from 'react';
24
24
  import Animated from 'react-native-reanimated';
25
25
  import { useScreenScroll } from '../screen/use-screen-scroll';
26
+ import { useIntrinsicContentHeight } from '../screen/use-intrinsic-content-height';
27
+ import { useScreenViewport } from '../screen/context';
26
28
  import { mergeRefs } from '../hooks/merge-refs';
27
29
  import { useHeaderDockInset } from '../layout/header-dock';
28
30
  import { useNativeScrollIndicator } from '../layout/use-native-scroll-indicator';
@@ -117,6 +119,8 @@ function VirtualListNativeInner<T>(
117
119
  // Optional: a list must work outside a provider, with the platform's spinner.
118
120
  const primary = React.useContext(BloomThemeContext)?.theme.colors.primary;
119
121
  const indicator = useNativeScrollIndicator(scrollbar);
122
+ const publishIntrinsic = useIntrinsicContentHeight();
123
+ const viewport = useScreenViewport();
120
124
  const stickyHeaderOffset = useHeaderDockInset();
121
125
  const header = renderSlot(ListHeaderComponent);
122
126
 
@@ -158,6 +162,20 @@ function VirtualListNativeInner<T>(
158
162
  onScroll: props.screenBinding?.onScroll,
159
163
  scrollEventThrottle: 16,
160
164
  contentContainerStyle,
165
+ onContentSizeChange: publishIntrinsic
166
+ ? (_width, height) => {
167
+ const flat = StyleSheet.flatten(contentContainerStyle);
168
+ publishIntrinsic(flat?.flexGrow || flat?.flex || flat?.minHeight ? -1 : height);
169
+ if (viewport?.active) viewport.metrics.contentHeight.value = height;
170
+ }
171
+ : undefined,
172
+ onLayout:
173
+ publishIntrinsic && viewport
174
+ ? (event) => {
175
+ if (viewport.active)
176
+ viewport.metrics.viewportHeight.value = event.nativeEvent.layout.height;
177
+ }
178
+ : undefined,
161
179
  numColumns,
162
180
  onEndReached: onEndReached ? () => onEndReached() : undefined,
163
181
  onEndReachedThreshold,