@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
@@ -13,7 +13,7 @@
13
13
  * accessibility tree, so showing it again is one style change with no relayout
14
14
  * of its content.
15
15
  */
16
- import { useCallback, useMemo, useRef, useState, type ReactNode } from 'react';
16
+ import { useCallback, useLayoutEffect, useMemo, useRef, useState, type ReactNode } from 'react';
17
17
  import { View, type LayoutChangeEvent, type ViewStyle } from 'react-native';
18
18
  import { useIsRtl } from '../hooks/use-is-rtl';
19
19
  import { ResizeHandle } from '../layout/ResizeHandle';
@@ -107,6 +107,12 @@ function RetainedHost({
107
107
  testID?: string;
108
108
  }) {
109
109
  const shown = box !== undefined;
110
+ const wasPresent = useRef(panel.visible !== false);
111
+ useLayoutEffect(() => {
112
+ const present = panel.visible !== false;
113
+ if (wasPresent.current && !present) panel.onExitComplete?.();
114
+ wasPresent.current = present;
115
+ }, [panel.visible, panel.onExitComplete]);
110
116
  const value = useMemo(
111
117
  () => ({
112
118
  id: panel.id,
@@ -18,6 +18,7 @@ import type { AppShellPanelLayout } from './panel-layout-types';
18
18
  const PANEL_MATERIAL = '[data-bloom-panel-material]';
19
19
 
20
20
  export const PanelCssContext = createContext<string | null>(null);
21
+ export const PanelResponsiveScopeContext = createContext<string | null>(null);
21
22
  export const PanelCssLayoutContext = createContext<{
22
23
  layout: AppShellPanelLayout;
23
24
  gap: number;
@@ -34,6 +35,8 @@ export function panelLayoutCss(
34
35
  widths: Readonly<Record<string, number>> = {},
35
36
  heights: Readonly<Record<string, number>> = {},
36
37
  fillWidth = false,
38
+ responsiveScope = scope,
39
+ fixedEnvelope = false,
37
40
  ) {
38
41
  const root = `[data-bloom-layout="${scope}"]`;
39
42
  const group = `[data-bloom-panel-group="${scope}"]`;
@@ -42,7 +45,7 @@ export function panelLayoutCss(
42
45
  `${group} [data-bloom-panel-owner="${scope}"][data-bloom-panel-index="${index}"]`;
43
46
  const liveSize = (index: number, fallback: string) =>
44
47
  `var(${panelSizeProperty(scope, index)}, ${fallback})`;
45
- const deck = layout.mode === 'deck';
48
+ const deck = layout.mode === 'deck' || layout.mode === 'flow';
46
49
  const ordered = layout.transition === 'exit-before-enter';
47
50
  const geometryDelay = ordered ? 150 : 0;
48
51
  const fadeMs = ordered ? 150 : 380;
@@ -63,7 +66,7 @@ export function panelLayoutCss(
63
66
  .map((property) => `${property} 380ms cubic-bezier(.4,0,.2,1) ${geometryDelay}ms`)
64
67
  .join(',');
65
68
  const document = layout.flow === 'document' && !deck;
66
- const pageDeck = deck && layout.horizontalScroll !== 'contained';
69
+ const pageDeck = deck && layout.mode !== 'flow' && layout.horizontalScroll !== 'contained';
67
70
  const thresholds = new Set<number>([0]);
68
71
  for (const panel of layout.panels) {
69
72
  if (panel.hideBelow !== undefined) thresholds.add(breakpointPx(panel.hideBelow));
@@ -87,7 +90,7 @@ ${root} [data-bloom-reading-content="${scope}"]{width:100%!important;flex-basis:
87
90
  ${row}{gap:0!important}
88
91
  ${group} [data-bloom-panel-owner="${scope}"][data-bloom-panel-index]{interpolate-size:allow-keywords;transition:${geometryTransitions},opacity ${ordered ? 150 : 380}ms cubic-bezier(.4,0,.2,1) var(--bloom-panel-fade-delay,0ms),scale 150ms ease var(--bloom-panel-fade-delay,0ms),display 380ms allow-discrete ${geometryDelay}ms;transition-behavior:allow-discrete}
89
92
  ${group} [data-bloom-panel-owner="${scope}"][data-bloom-panel-index]{--bloom-surface-presence-ms:${fadeMs}ms}
90
- ${group} [data-bloom-panel-owner="${scope}"][data-bloom-panel-index] ${PANEL_MATERIAL}>*{opacity:var(--bloom-surface-presence,1);transition:opacity ${fadeMs}ms cubic-bezier(.4,0,.2,1) var(--bloom-panel-fade-delay,0ms)}
93
+ ${group} [data-bloom-panel-owner="${scope}"][data-bloom-panel-index] ${PANEL_MATERIAL}>*{opacity:var(--bloom-surface-presence,1);transition:opacity var(--bloom-surface-presence-ms,${fadeMs}ms) cubic-bezier(.4,0,.2,1) var(--bloom-panel-fade-delay,0ms)}
91
94
  ${group}:not([data-bloom-panel-ready]) [data-bloom-panel-owner="${scope}"][data-bloom-panel-index],${root}:not(:has(${group}[data-bloom-panel-ready])) :is([data-bloom-reading-envelope="${scope}"],[data-bloom-shell-frame="${scope}"],[data-bloom-shell-nav="${scope}"]){transition:none!important}
92
95
  ${group}[data-bloom-panel-resizing] [data-bloom-panel-owner="${scope}"][data-bloom-panel-index],${root}:has(${group}[data-bloom-panel-resizing]) [data-bloom-reading-envelope="${scope}"]{transition:none!important}
93
96
  ${group}[data-bloom-panel-resizing]{user-select:none;cursor:col-resize}
@@ -118,7 +121,7 @@ ${group}[data-bloom-panel-resizing="vertical"]{cursor:row-resize}
118
121
  const envelope = deck ? '100%' : `${panelEnvelope(layout, lower, gap)}px`;
119
122
  let rules = `${root} [data-bloom-reading-envelope="${scope}"]{--bloom-reading-envelope:${envelope}}\n${row}{flex-direction:${vertical ? 'column' : 'row'}!important;--bloom-panel-axis:${axis}}\n`;
120
123
  const hidden = (index: number) =>
121
- `${item(index)}{--bloom-panel-visible:0;--bloom-panel-fade-delay:0ms;scale:${ordered ? 0.98 : 1};flex:0 0 0px!important;display:none!important;width:0!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;--bloom-surface-presence:0;margin:0!important;contain:size;overflow:hidden!important;pointer-events:none!important}\n${item(index)}:not(:has(${PANEL_MATERIAL})){opacity:0!important}\n`;
124
+ `${item(index)}{--bloom-panel-visible:0;--bloom-panel-fade-delay:0ms;scale:${ordered ? 0.98 : 1};flex:0 0 0px!important;display:none!important;width:${vertical ? '100%' : '0px'}!important;height:auto!important;max-width:none!important;max-height:none!important;min-width:0!important;min-height:0!important;--bloom-surface-presence:0;margin:0!important;contain:size;overflow:hidden!important;pointer-events:none!important}\n${item(index)} [data-bloom-panel-owner]{--bloom-surface-presence:0!important;--bloom-surface-presence-ms:${fadeMs}ms!important;--bloom-panel-fade-delay:0ms!important}\n${item(index)}:not(:has(${PANEL_MATERIAL})){opacity:0!important}\n`;
122
125
  for (let index = 0; index < layout.panels.length; index++) {
123
126
  const p = layout.panels[index]!;
124
127
  rules += `${item(index)}{--bloom-panel-floating:${p.floating && lower < breakpointPx(p.floating.below) ? 1 : 0}}\n`;
@@ -130,33 +133,43 @@ ${group}[data-bloom-panel-resizing="vertical"]{cursor:row-resize}
130
133
  const dim = vertical ? (heights[p.id] ?? p.height) : (widths[p.id] ?? p.width);
131
134
  const min = vertical ? p.minHeight : p.minWidth;
132
135
  const max = vertical ? p.maxHeight : p.maxWidth;
133
- const natural = vertical && document;
134
- const basis = forced
135
- ? natural
136
- ? 'auto'
137
- : '100%'
138
- : dim !== undefined
139
- ? `${dim}px`
140
- : deck
141
- ? `${DEFAULT_PANEL_WIDTH}px`
136
+ const natural = vertical && (document || layout.mode === 'flow');
137
+ const soleSplit = !deck && !natural && shown.length === 1;
138
+ // A percentage basis resolves to intrinsic content in an indefinite
139
+ // document column, and to its viewport in a bounded column. Keeping this
140
+ // basis across owner changes avoids an auto -> length interpolation that
141
+ // briefly collapses the persistent pane to its minimum.
142
+ const soleDocument = document && vertical && shown.length === 1 && dim === undefined;
143
+ const basis =
144
+ forced || soleSplit || soleDocument
145
+ ? natural && !soleDocument
146
+ ? 'auto'
147
+ : '100%'
148
+ : dim !== undefined
149
+ ? `${dim}px`
142
150
  : natural
143
151
  ? 'auto'
144
- : '0px';
145
- const grow = forced
146
- ? 1
147
- : natural
148
- ? 0
149
- : deck
150
- ? Math.max(0, p.span ?? 0)
151
- : flexible && dim !== undefined
152
- ? 0
153
- : (p.span ?? 1);
154
- rules += `${item(index)}{--bloom-panel-alone-display:${shown.length === 1 ? 'flex' : 'none'};--bloom-panel-multiple-display:${shown.length === 1 ? 'none' : 'flex'};--bloom-panel-visible:1;--bloom-surface-presence:1;--bloom-panel-fade-delay:${ordered ? 530 : 0}ms;scale:1;display:flex!important;flex:var(${panelGrowProperty(scope, index)}, ${grow}) ${deck || natural ? 0 : 1} ${liveSize(index, basis)}!important;width:${vertical ? '100%' : pageDeck ? (forced ? 'calc(var(--bloom-deck-viewport) - var(--bloom-frame-end))' : liveSize(index, `${dim ?? DEFAULT_PANEL_WIDTH}px`)) : dim !== undefined && !forced ? `${dim}px` : 'auto'}!important;height:auto!important;min-width:${vertical || forced ? 0 : (min ?? 0)}px!important;max-width:${vertical || forced ? '100%' : max === undefined ? 'none' : `${max}px`}!important;min-height:${vertical && !forced ? (min ?? 0) : 0}px!important;max-height:${vertical && !forced && max !== undefined ? `${max}px` : 'none'}!important;opacity:1!important;margin-inline-start:${!vertical && position > 0 ? gap : 0}px!important;margin-top:${vertical && position > 0 ? gap : 0}px!important}\n`;
152
+ : deck
153
+ ? `${DEFAULT_PANEL_WIDTH}px`
154
+ : '0px';
155
+ const grow =
156
+ forced || soleSplit || soleDocument
157
+ ? 1
158
+ : natural
159
+ ? 0
160
+ : deck
161
+ ? Math.max(0, p.span ?? 0)
162
+ : fixedEnvelope && dim !== undefined && p.span === undefined
163
+ ? 0
164
+ : flexible && dim !== undefined
165
+ ? 0
166
+ : (p.span ?? 1);
167
+ rules += `${item(index)}{--bloom-panel-alone-display:${shown.length === 1 ? 'flex' : 'none'};--bloom-panel-multiple-display:${shown.length === 1 ? 'none' : 'flex'};--bloom-panel-visible:1;--bloom-surface-presence:1;--bloom-panel-fade-delay:${ordered ? 530 : 0}ms;scale:1;display:flex!important;flex:var(${panelGrowProperty(scope, index)}, ${grow}) ${deck || natural ? 0 : 1} ${liveSize(index, basis)}!important;width:${vertical ? '100%' : pageDeck ? (forced ? 'calc(var(--bloom-deck-viewport) - var(--bloom-frame-end))' : liveSize(index, `${dim ?? DEFAULT_PANEL_WIDTH}px`)) : dim !== undefined && !forced ? `${dim}px` : 'auto'}!important;height:auto!important;min-width:${vertical || forced ? 0 : (min ?? 0)}px!important;max-width:${vertical || forced ? '100%' : max === undefined ? (deck ? 'none' : '100%') : `${max}px`}!important;min-height:${vertical && !forced ? (min ?? 0) : 0}px!important;max-height:${vertical && !forced && max !== undefined ? `${max}px` : 'none'}!important;opacity:1!important;margin-inline-start:${!vertical && position > 0 ? gap : 0}px!important;margin-top:${vertical && position > 0 ? gap : 0}px!important}\n`;
155
168
  const entering = item(index).replace(
156
169
  group,
157
170
  `${group}[data-bloom-panel-ready]:not([data-bloom-panel-ordering])`,
158
171
  );
159
- rules += `@starting-style{${entering}{scale:${ordered ? 0.98 : 1};flex:0 0 0px!important;width:${vertical ? '100%' : '0px'}!important;min-width:0!important;min-height:0!important;--bloom-surface-presence:0;margin-inline-start:0!important;margin-top:0!important}${entering}:not(:has(${PANEL_MATERIAL})){opacity:0!important}}\n`;
172
+ rules += `@starting-style{${entering}{scale:${ordered ? 0.98 : 1};flex:0 0 0px!important;width:${vertical ? '100%' : '0px'}!important;min-width:0!important;min-height:0!important;--bloom-surface-presence:0;margin-inline-start:0!important;margin-top:0!important}${entering} [data-bloom-panel-owner]{--bloom-surface-presence:0!important}${entering}:not(:has(${PANEL_MATERIAL})){opacity:0!important}}\n`;
160
173
  }
161
174
  if (pageDeck && !vertical) {
162
175
  const trackWidths = shown.map((panel) =>
@@ -213,11 +226,12 @@ ${row}{width:100%!important;min-width:0!important}
213
226
  rules +=
214
227
  p.id === active?.id
215
228
  ? `${item(index)}{--bloom-panel-alone-display:flex;--bloom-panel-multiple-display:none;--bloom-panel-visible:1;display:flex!important;flex:1 1 0px!important;min-width:0!important;min-height:0!important;max-width:100%!important;max-height:none!important;margin:0!important;opacity:1!important;--bloom-surface-presence:1}`
216
- : hidden(index);
229
+ : hidden(index) +
230
+ (p.floating?.whenConstrained ? `${item(index)}{--bloom-panel-floating:1}` : '');
217
231
  });
218
232
  rules += '}\n';
219
233
  }
220
- css += `@container ${scope} ${query}{${rules}}\n`;
234
+ css += `@container ${responsiveScope} ${query}{${rules}}\n`;
221
235
  }
222
236
  return css;
223
237
  }
@@ -46,7 +46,13 @@ export interface AppShellPanelDefinition extends Omit<AppShellPanelProps, 'child
46
46
  reorderLabel?: string;
47
47
  /** Explicit semantic visibility, independent of responsive eligibility. */
48
48
  visible?: boolean;
49
+ /** Actual exit completion; release payload after visible becomes false. Reopening cancels it. */
50
+ onExitComplete?: () => void;
51
+ /** Vertical resize gestures stop at measured content; initial layout stays unchanged. */
52
+ resizeMaxHeight?: 'content';
49
53
  content?: ReactNode;
54
+ /** A transparent, independently composed group. Keep its id and child ids stable. */
55
+ group?: AppShellPanelLayout;
50
56
  /** Host controls composed into the route Screen's existing PageHeader actions. */
51
57
  headerActions?: ReactNode;
52
58
  /** Panel footer composed below the route Screen bottom bar, measured and pinned by that Screen. */
@@ -102,8 +108,11 @@ export interface AppShellPanelLayout {
102
108
  onViewportScroll?: (offset: { x: number; y: number }) => void;
103
109
  /** Commit a full ID permutation after a handle drag or keyboard move. The host applies this order. */
104
110
  onPanelOrderChange?: (ids: readonly string[]) => void;
105
- mode?: 'split' | 'deck';
106
- /** Fade outgoing panels before moving tracks, then reveal incoming content at its settled width. */
111
+ /** Split divides available space; flow grows and scrolls along its axis. */
112
+ mode?: 'split' | 'flow' | 'deck';
113
+ /** Nested split only: let its sole inline panel use the web document scroll. */
114
+ singlePanelFlow?: 'document';
115
+ /** Simultaneous by default. Opt into exit-before-enter to stage outgoing, geometry and incoming motion. */
107
116
  transition?: 'simultaneous' | 'exit-before-enter';
108
117
  /** Web horizontal decks use the document scrollbar by default. Native remains native-scrolling. */
109
118
  horizontalScroll?: 'document' | 'contained';
@@ -60,118 +60,12 @@ export function panelEnvelope(layout: AppShellPanelLayout, shellWidth: number, g
60
60
  );
61
61
  }
62
62
 
63
- export interface ResolvedPanelTrack {
64
- id: string;
65
- width: number;
66
- visible: boolean;
67
- gap: number;
68
- /** Responsive presentation, independent of its open intent. */
69
- floating?: boolean;
70
- }
71
- export function resolvePanelTracks(
72
- layout: AppShellPanelLayout,
73
- available: number,
74
- shellWidth: number,
75
- gap: number,
76
- widths: Readonly<Record<string, number>> = {},
77
- ): ResolvedPanelTrack[] {
78
- const axis = resolvePanelAxis(layout, shellWidth);
79
- const eligible = eligiblePanels(layout, shellWidth).map((panel) => panelForAxis(panel, axis));
80
- const natural = axis === 'vertical' && layout.flow === 'document' && layout.mode !== 'deck';
81
- const deck = layout.mode === 'deck' || natural;
82
- const minimum =
83
- eligible.reduce((sum, panel) => sum + panelMinimum(panel), 0) +
84
- Math.max(0, eligible.length - 1) * gap;
85
- const compact =
86
- layout.mode !== 'deck' &&
87
- ((layout.collapseBelow !== undefined && shellWidth < breakpointPx(layout.collapseBelow)) ||
88
- (!natural && available < minimum));
89
- const active =
90
- eligible.find((panel) => panel.id === (layout.expandedPanel ?? layout.activePanel)) ??
91
- eligible[0];
92
- const shown =
93
- layout.expandedPanel || compact
94
- ? eligible.filter((panel) => panel.id === active?.id)
95
- : eligible;
96
- const room = Math.max(0, available - Math.max(0, shown.length - 1) * gap);
97
- // A flexible split track grows from a zero basis, as the CSS compositor's
98
- // `flex: <span> 1 0px` does: its share is proportional to its span, and only
99
- // a min/max boundary freezes it. Starting it at its minimum gave native a
100
- // `min + share` split that the browser never drew.
101
- const fromZero = (panel: AppShellPanelDefinition) =>
102
- !deck &&
103
- !natural &&
104
- widths[panel.id] === undefined &&
105
- panel.width === undefined &&
106
- shown.length > 1 &&
107
- !layout.expandedPanel;
108
- const sizes = shown.map((panel) =>
109
- fromZero(panel)
110
- ? 0
111
- : clampPanelWidth(
112
- panel,
113
- positive(
114
- widths[panel.id],
115
- positive(panel.width, deck && !natural ? DEFAULT_PANEL_WIDTH : panelMinimum(panel)),
116
- ),
117
- ),
118
- );
119
- if ((!deck || layout.expandedPanel) && shown.length === 1) sizes[0] = available;
120
- else if (!deck || (!natural && shown.some((panel) => (panel.span ?? 0) > 0))) {
121
- // Water-fill available room, freezing tracks at their min/max boundaries.
122
- for (let pass = 0; pass <= shown.length; pass++) {
123
- const delta = room - sizes.reduce((sum, value) => sum + value, 0);
124
- if (Math.abs(delta) < 0.01) break;
125
- // Deck columns may opt into spare room, but never shrink to fit:
126
- // overflow remains owned by the compositor's horizontal viewport.
127
- if (deck && delta < 0) break;
128
- let candidates = shown
129
- .map((panel, index) => ({ panel, index }))
130
- .filter(({ panel }) => !deck || (panel.span ?? 0) > 0)
131
- .filter(({ panel, index }) =>
132
- delta > 0 ? sizes[index]! < panelMaximum(panel) : sizes[index]! > panelMinimum(panel),
133
- );
134
- if (delta > 0 && !deck) {
135
- const flexible = candidates.filter(
136
- ({ panel }) => panel.width === undefined && widths[panel.id] === undefined,
137
- );
138
- if (flexible.length) candidates = flexible;
139
- }
140
- const weight = candidates.reduce(
141
- (sum, { panel }) => sum + Math.max(Number.EPSILON, positive(panel.span, 1)),
142
- 0,
143
- );
144
- if (!weight) break;
145
- candidates.forEach(({ panel, index }) => {
146
- sizes[index] = clampPanelWidth(
147
- panel,
148
- sizes[index]! + (delta * Math.max(Number.EPSILON, positive(panel.span, 1))) / weight,
149
- );
150
- });
151
- }
152
- }
153
- shown.forEach((panel, index) => {
154
- if (sizes[index]! < panelMinimum(panel)) sizes[index] = panelMinimum(panel);
155
- });
156
- return layout.panels.map((panel) => {
157
- const index = shown.findIndex((candidate) => candidate.id === panel.id);
158
- return {
159
- id: panel.id,
160
- width: index < 0 ? 0 : sizes[index]!,
161
- visible: index >= 0,
162
- gap: index > 0 ? gap : 0,
163
- ...(panel.floating ? { floating: shellWidth < breakpointPx(panel.floating.below) } : {}),
164
- };
165
- });
166
- }
167
-
168
63
  /**
169
64
  * A track as native flex lays it out: what `panelLayoutCss` writes for the web,
170
- * as Yoga's flex values along the group's axis. The room is never an input:
171
- * Yoga divides whatever room the group has in the same pass as a resize, so a
172
- * window resizing runs no JavaScript. Only the thresholds a width is compared
173
- * against decide anything here (the shell's breakpoints, the group's minimum),
174
- * so `shellWidth` and `room` may be quantized (`quantizeWidth`).
65
+ * as Yoga's flex values along the group's axis. Room only selects semantic
66
+ * capacity/floating states. Yoga divides the room continuously; React hears
67
+ * only threshold changes (shell breakpoints and group minimum capacity), so
68
+ * `shellWidth` and `room` may be quantized (`quantizeWidth`).
175
69
  */
176
70
  export interface PanelFlexTrack {
177
71
  id: string;
@@ -195,6 +89,8 @@ export interface PanelFlexTrack {
195
89
  export function panelLayoutWidthThresholds(layout: AppShellPanelLayout): number[] {
196
90
  const thresholds = new Set<number>([0]);
197
91
  for (const panel of layout.panels) {
92
+ if (panel.group)
93
+ for (const threshold of panelLayoutWidthThresholds(panel.group)) thresholds.add(threshold);
198
94
  if (panel.hideBelow !== undefined) thresholds.add(breakpointPx(panel.hideBelow));
199
95
  if (panel.floating) thresholds.add(breakpointPx(panel.floating.below));
200
96
  }
@@ -223,112 +119,8 @@ export function panelLayoutMinimum(
223
119
  }
224
120
 
225
121
  /**
226
- * Flexible split tracks with minimums, as the CSS compositor divides room:
227
- * each takes `clamp(λ · span, min, max)` for the one `λ` that fills the room,
228
- * growing from a zero basis. Yoga instead starts a track at its minimum and
229
- * divides what is left (its flex basis is bounded by min and max), which would
230
- * draw `min + share`. So native gives Yoga the CSS answer piecewise: a track
231
- * held at its minimum is a fixed track of that size, and every other track
232
- * grows from zero with no minimum; which tracks are held changes only at
233
- * thresholds of the room (`flexibleRoomThresholds`), where React redraws.
234
- */
235
- interface FlexibleTrack {
236
- id: string;
237
- span: number;
238
- min: number;
239
- max: number;
240
- }
241
-
242
- /** Below this a track's minimum and its share are the same size (px). */
243
- const HELD_TOLERANCE = 1e-6;
244
-
245
- /** What `λ` fills `available` (the water level), and the room each breakpoint needs. */
246
- function waterLevel(tracks: readonly FlexibleTrack[], available: number): number {
247
- const filled = (level: number) =>
248
- tracks.reduce(
249
- (sum, track) => sum + Math.min(track.max, Math.max(track.min, level * track.span)),
250
- 0,
251
- );
252
- const breakpoints = [
253
- 0,
254
- ...tracks.flatMap((track) => [track.min / track.span, track.max / track.span]),
255
- ]
256
- .filter((level) => Number.isFinite(level))
257
- .sort((a, b) => a - b);
258
- // The highest level that fills no more than `available`: on a stretch where
259
- // every track is held (filling does not grow), the level is that stretch's
260
- // end, so a room exactly at a threshold holds no track that it fills.
261
- let low = 0;
262
- for (const level of breakpoints) {
263
- if (filled(level) > available) {
264
- const from = filled(low);
265
- return low + ((available - from) / (filled(level) - from)) * (level - low);
266
- }
267
- low = level;
268
- }
269
- const free = tracks.filter((track) => !Number.isFinite(track.max));
270
- const span = free.reduce((sum, track) => sum + track.span, 0);
271
- return span > 0 ? low + (available - filled(low)) / span : low;
272
- }
273
-
274
- /** The split's shown tracks and what of the room is theirs to divide, as `resolvePanelFlex` decides them. */
275
- function splitShape(
276
- layout: AppShellPanelLayout,
277
- shellWidth: number,
278
- gap: number,
279
- dimensions: Readonly<Record<string, number>>,
280
- ) {
281
- const axis = resolvePanelAxis(layout, shellWidth);
282
- const eligible = eligiblePanels(layout, shellWidth).map((panel) => panelForAxis(panel, axis));
283
- const own = (panel: AppShellPanelDefinition) => dimensions[panel.id] ?? panel.width;
284
- const flexible: FlexibleTrack[] = eligible
285
- .filter((panel) => own(panel) === undefined)
286
- .map((panel) => ({
287
- id: panel.id,
288
- span: Math.max(Number.EPSILON, positive(panel.span, 1)),
289
- min: panelMinimum(panel),
290
- max: panelMaximum(panel),
291
- }));
292
- const fixed =
293
- eligible
294
- .filter((panel) => own(panel) !== undefined)
295
- .reduce((sum, panel) => sum + clampPanelWidth(panel, own(panel)!), 0) +
296
- Math.max(0, eligible.length - 1) * gap;
297
- return { flexible, fixed };
298
- }
299
-
300
- /**
301
- * The room at which a flexible track with a minimum stops being held at it
302
- * (`waterLevel` reaching `min / span`), for the group's size classes: between
303
- * two of these, which tracks are held does not change, and Yoga divides the
304
- * room alone.
305
- */
306
- export function flexibleRoomThresholds(
307
- layout: AppShellPanelLayout,
308
- shellWidth: number,
309
- gap: number,
310
- dimensions: Readonly<Record<string, number>> = {},
311
- ): number[] {
312
- if (layout.mode === 'deck' || layout.expandedPanel) return [];
313
- const { flexible, fixed } = splitShape(layout, shellWidth, gap, dimensions);
314
- if (flexible.length < 2) return [];
315
- return flexible
316
- .filter((track) => track.min > 0)
317
- .map(
318
- (held) =>
319
- fixed +
320
- flexible.reduce(
321
- (sum, track) =>
322
- sum + Math.min(track.max, Math.max(track.min, (held.min / held.span) * track.span)),
323
- 0,
324
- ),
325
- );
326
- }
327
-
328
- /**
329
- * Each panel's flex along the group's axis, decided as `resolvePanelTracks`
330
- * decides which tracks show (eligibility, collapse, the active one alone in too
331
- * little room) and sized as the CSS compositor sizes them: a flexible split
122
+ * Each panel's declarative flex constraints and responsive eligibility.
123
+ * The native engine distributes the actual room: a flexible split
332
124
  * track grows by its span from a zero basis; one with a width of its own keeps
333
125
  * it beside flexible ones and grows by its span when none is; a deck column
334
126
  * keeps its width and takes spare room only by an explicit span; a track shown
@@ -344,13 +136,15 @@ export function resolvePanelFlex(
344
136
  const axis = resolvePanelAxis(layout, shellWidth);
345
137
  const vertical = axis === 'vertical';
346
138
  const eligible = eligiblePanels(layout, shellWidth).map((panel) => panelForAxis(panel, axis));
347
- const natural = vertical && layout.flow === 'document' && layout.mode !== 'deck';
348
- const deck = layout.mode === 'deck' || natural;
139
+ const natural =
140
+ vertical && (layout.mode === 'flow' || (layout.flow === 'document' && layout.mode !== 'deck'));
141
+ const deck = layout.mode === 'deck' || layout.mode === 'flow' || natural;
349
142
  const minimum =
350
143
  eligible.reduce((sum, panel) => sum + panelMinimum(panel), 0) +
351
144
  Math.max(0, eligible.length - 1) * gap;
352
145
  const compact =
353
146
  layout.mode !== 'deck' &&
147
+ layout.mode !== 'flow' &&
354
148
  ((layout.collapseBelow !== undefined && shellWidth < breakpointPx(layout.collapseBelow)) ||
355
149
  (!natural && room < minimum));
356
150
  const active =
@@ -360,26 +154,14 @@ export function resolvePanelFlex(
360
154
  const shown = forced ? eligible.filter((panel) => panel.id === active?.id) : eligible;
361
155
  const own = (panel: AppShellPanelDefinition) => dimensions[panel.id] ?? panel.width;
362
156
  const flexible = shown.some((panel) => own(panel) === undefined);
363
- // Two or more flexible split tracks: those the room holds at their minimum
364
- // (`waterLevel`, `flexibleRoomThresholds`).
365
- const held = new Set<string>();
366
- let regime = false;
367
- if (!forced && !deck) {
368
- const shape = splitShape(layout, shellWidth, gap, dimensions);
369
- if (shape.flexible.length > 1 && shape.flexible.some((track) => track.min > 0)) {
370
- regime = true;
371
- const level = waterLevel(shape.flexible, Math.max(0, room - shape.fixed));
372
- // A room exactly at a threshold (a size class's lower bound is one) is
373
- // past it: the track there no longer needs holding. Rounding must not
374
- // say otherwise.
375
- for (const track of shape.flexible)
376
- if (track.min > level * track.span + HELD_TOLERANCE) held.add(track.id);
377
- }
378
- }
379
157
  return layout.panels.map((declared) => {
380
158
  const position = shown.findIndex((candidate) => candidate.id === declared.id);
381
159
  const floating = declared.floating
382
- ? { floating: shellWidth < breakpointPx(declared.floating.below) }
160
+ ? {
161
+ floating:
162
+ shellWidth < breakpointPx(declared.floating.below) ||
163
+ (!!declared.floating.whenConstrained && compact && declared.id !== active?.id),
164
+ }
383
165
  : {};
384
166
  if (position < 0)
385
167
  return {
@@ -409,19 +191,6 @@ export function resolvePanelFlex(
409
191
  max: Number.POSITIVE_INFINITY,
410
192
  gap: leading,
411
193
  };
412
- // Held at its minimum by the room: a fixed track of that size.
413
- if (held.has(panel.id))
414
- return {
415
- id: declared.id,
416
- visible: true,
417
- ...floating,
418
- grow: 0,
419
- shrink: 0,
420
- basis: panelMinimum(panel),
421
- min: panelMinimum(panel),
422
- max: panelMinimum(panel),
423
- gap: leading,
424
- };
425
194
  const basis =
426
195
  dimension !== undefined
427
196
  ? clampPanelWidth(panel, dimension)
@@ -443,9 +212,8 @@ export function resolvePanelFlex(
443
212
  shrink: deck ? 0 : 1,
444
213
  basis,
445
214
  ...(natural && dimension === undefined ? { basisAuto: true } : {}),
446
- // A flexible split track the room does not hold grows from zero with no
447
- // minimum for Yoga to start it at (the room keeps it above it).
448
- min: dimension === undefined && !deck && regime ? 0 : panelMinimum(panel),
215
+ // Min/max remain native flex constraints; no JS water-fill distribution.
216
+ min: panelMinimum(panel),
449
217
  max: panelMaximum(panel),
450
218
  gap: leading,
451
219
  };
@@ -467,6 +235,23 @@ export function resizePanelPair(
467
235
  return { [first.id]: width, [second.id]: total - width };
468
236
  }
469
237
 
238
+ /** A gesture may reduce an oversized pane, but cannot grow its excess back. */
239
+ export function panelContentResizeLimit(
240
+ panel: AppShellPanelDefinition,
241
+ currentSize: number,
242
+ contentMaximum: number | undefined,
243
+ ): AppShellPanelDefinition {
244
+ if (contentMaximum === undefined || !Number.isFinite(contentMaximum) || contentMaximum < 0)
245
+ return panel;
246
+ return {
247
+ ...panel,
248
+ maxWidth: Math.min(
249
+ panelMaximum(panel),
250
+ Math.max(panelMinimum(panel), currentSize, contentMaximum),
251
+ ),
252
+ };
253
+ }
254
+
470
255
  /** Committed weights override descriptor spans, in the resolver and the CSS compiler alike. */
471
256
  export function applyPanelSpans(
472
257
  layout: AppShellPanelLayout,
@@ -499,19 +284,27 @@ export function isFlexiblePanel(
499
284
  * The weights that draw a resized pair of flexible tracks at the sizes it
500
285
  * settled on. The pair keeps its combined span, so every other track keeps its
501
286
  * share; the split is the settled pixel ratio, so the proportion survives the
502
- * region growing or shrinking.
287
+ * region growing or shrinking. Native Yoga allocates free space beyond each
288
+ * minimum, so its gesture commit converts only that free portion to weights.
289
+ * This conversion runs once per gesture; it does not distribute layout.
503
290
  */
504
291
  export function splitPairSpans(
505
292
  first: AppShellPanelDefinition,
506
293
  second: AppShellPanelDefinition,
507
294
  firstSize: number,
508
295
  secondSize: number,
296
+ minimumBasis = false,
509
297
  ): Record<string, number> {
510
298
  const total = positive(first.span, 1) + positive(second.span, 1);
511
- const pixels = firstSize + secondSize;
299
+ const firstFree = minimumBasis ? Math.max(0, firstSize - panelMinimum(first)) : firstSize;
300
+ const secondFree = minimumBasis ? Math.max(0, secondSize - panelMinimum(second)) : secondSize;
301
+ const pixels = firstFree + secondFree;
512
302
  if (!(pixels > 0) || !(total > 0)) return {};
513
- const share = Math.max(0, Math.min(1, firstSize / pixels));
514
- return { [first.id]: total * share, [second.id]: total * (1 - share) };
303
+ const share = Math.max(0, Math.min(1, firstFree / pixels));
304
+ return {
305
+ [first.id]: minimumBasis ? Math.max(Number.EPSILON, total * share) : total * share,
306
+ [second.id]: minimumBasis ? Math.max(Number.EPSILON, total * (1 - share)) : total * (1 - share),
307
+ };
515
308
  }
516
309
 
517
310
  /** A panel along the window's top edge, away from the controls: its header moves the window. */
@@ -525,7 +318,7 @@ export const WINDOW_TOP_EDGE: WindowChrome = { leading: 0 };
525
318
  */
526
319
  export function panelWindowChrome(
527
320
  chrome: WindowChrome | null,
528
- tracks: readonly Pick<ResolvedPanelTrack, 'visible' | 'floating'>[],
321
+ tracks: readonly Pick<PanelFlexTrack, 'visible' | 'floating'>[],
529
322
  vertical: boolean,
530
323
  ): (WindowChrome | null)[] {
531
324
  const shown = (index: number) => !!tracks[index]?.visible && !tracks[index]?.floating;