@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.
- package/docs/activity-heatmap.mdx +7 -0
- package/docs/adoption-matrix.mdx +26 -26
- package/docs/announcement.mdx +7 -0
- package/docs/app-shell.mdx +18 -11
- package/docs/avatar.mdx +2 -0
- package/docs/badge.mdx +2 -0
- package/docs/chip.mdx +6 -2
- package/docs/compose-layouts.mdx +114 -2
- package/docs/composition-bar.mdx +4 -0
- package/docs/contact-card.mdx +5 -0
- package/docs/dialog.mdx +7 -0
- package/docs/divider.mdx +8 -0
- package/docs/empty-state.mdx +8 -0
- package/docs/engagement-bar.mdx +9 -0
- package/docs/icon-circle.mdx +2 -0
- package/docs/layout.mdx +1 -1
- package/docs/list.mdx +4 -3
- package/docs/page-header.mdx +7 -0
- package/docs/public-parts.mdx +39 -28
- package/docs/screen.mdx +4 -0
- package/docs/scroll.mdx +6 -3
- package/docs/sidebar.mdx +26 -5
- package/docs/task-catalog.json +1 -1
- package/docs/task-catalog.mdx +1 -1
- package/docs/typography.mdx +9 -0
- package/lib/commonjs/app-shell/AppShell.js +3 -3
- package/lib/commonjs/app-shell/AppShell.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellEngine.js +2 -1
- package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellPanelLayout.js +345 -172
- package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/RetainedPanelLayout.js +6 -0
- package/lib/commonjs/app-shell/RetainedPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/panel-layout-css.js +20 -13
- package/lib/commonjs/app-shell/panel-layout-css.js.map +1 -1
- package/lib/commonjs/app-shell/panel-layout.js +33 -185
- package/lib/commonjs/app-shell/panel-layout.js.map +1 -1
- package/lib/commonjs/app-shell/panel-motion.js +13 -36
- package/lib/commonjs/app-shell/panel-motion.js.map +1 -1
- package/lib/commonjs/app-shell/panel-transitions.js +26 -0
- package/lib/commonjs/app-shell/panel-transitions.js.map +1 -0
- package/lib/commonjs/app-shell/shell-layout-css.js +2 -2
- package/lib/commonjs/app-shell/shell-layout-css.js.map +1 -1
- package/lib/commonjs/app-shell/use-panel-exit-completion.js +100 -0
- package/lib/commonjs/app-shell/use-panel-exit-completion.js.map +1 -0
- package/lib/commonjs/app-shell/use-panel-resize.js +21 -7
- package/lib/commonjs/app-shell/use-panel-resize.js.map +1 -1
- package/lib/commonjs/app-shell/use-panel-reveal.js +2 -1
- package/lib/commonjs/app-shell/use-panel-reveal.js.map +1 -1
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js +3 -2
- package/lib/commonjs/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/commonjs/chip/Chip.js +10 -1
- package/lib/commonjs/chip/Chip.js.map +1 -1
- package/lib/commonjs/chip/shared.js +2 -2
- package/lib/commonjs/dialog/DialogBottomSheet.js +6 -3
- package/lib/commonjs/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementAction.js +6 -5
- package/lib/commonjs/engagement-bar/EngagementAction.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementBar.js +31 -7
- package/lib/commonjs/engagement-bar/EngagementBar.js.map +1 -1
- package/lib/commonjs/engagement-bar/EngagementPop.js +10 -3
- package/lib/commonjs/engagement-bar/EngagementPop.js.map +1 -1
- package/lib/commonjs/engagement-bar/context.js.map +1 -1
- package/lib/commonjs/engagement-bar/paint.js +59 -12
- package/lib/commonjs/engagement-bar/paint.js.map +1 -1
- package/lib/commonjs/hooks/use-border-box-size.js +46 -0
- package/lib/commonjs/hooks/use-border-box-size.js.map +1 -0
- package/lib/commonjs/layout/ScrollBar.web.js +62 -29
- package/lib/commonjs/layout/ScrollBar.web.js.map +1 -1
- package/lib/commonjs/layout/scroll-metrics.js.map +1 -1
- package/lib/commonjs/list/VirtualList.js +12 -0
- package/lib/commonjs/list/VirtualList.js.map +1 -1
- package/lib/commonjs/list/VirtualList.web.js +40 -19
- package/lib/commonjs/list/VirtualList.web.js.map +1 -1
- package/lib/commonjs/list/flash-list-module.js.map +1 -1
- package/lib/commonjs/page-header/EdgeScrim.js +14 -4
- package/lib/commonjs/page-header/EdgeScrim.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +19 -6
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/screen/ScreenBase.js +15 -6
- package/lib/commonjs/screen/ScreenBase.js.map +1 -1
- package/lib/commonjs/screen/ScreenScrollViewBase.js +12 -2
- package/lib/commonjs/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/commonjs/screen/context.js.map +1 -1
- package/lib/commonjs/screen/use-intrinsic-content-height.js +53 -0
- package/lib/commonjs/screen/use-intrinsic-content-height.js.map +1 -0
- package/lib/commonjs/screen/use-screen-viewport.js +37 -6
- package/lib/commonjs/screen/use-screen-viewport.js.map +1 -1
- package/lib/commonjs/scroll/constants.js +4 -1
- package/lib/commonjs/scroll/constants.js.map +1 -1
- package/lib/commonjs/scroll/owner-handoff.js +27 -7
- package/lib/commonjs/scroll/owner-handoff.js.map +1 -1
- package/lib/commonjs/scroll/use-scroll-restoration.web.js +2 -11
- package/lib/commonjs/scroll/use-scroll-restoration.web.js.map +1 -1
- package/lib/commonjs/sidebar/Sidebar.js +121 -87
- package/lib/commonjs/sidebar/Sidebar.js.map +1 -1
- package/lib/commonjs/sidebar/arrangement.js +36 -0
- package/lib/commonjs/sidebar/arrangement.js.map +1 -0
- package/lib/commonjs/sidebar/index.js.map +1 -1
- package/lib/commonjs/stay-filters/CountFilter.js +1 -1
- package/lib/commonjs/stay-filters/FilterChip.js +1 -1
- package/lib/commonjs/stay-filters/ToggleChipGroup.js +1 -1
- package/lib/module/app-shell/AppShell.js +3 -3
- package/lib/module/app-shell/AppShell.js.map +1 -1
- package/lib/module/app-shell/AppShellEngine.js +2 -1
- package/lib/module/app-shell/AppShellEngine.js.map +1 -1
- package/lib/module/app-shell/AppShellPanelLayout.js +319 -147
- package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/module/app-shell/RetainedPanelLayout.js +7 -1
- package/lib/module/app-shell/RetainedPanelLayout.js.map +1 -1
- package/lib/module/app-shell/panel-layout-css.js +19 -12
- package/lib/module/app-shell/panel-layout-css.js.map +1 -1
- package/lib/module/app-shell/panel-layout.js +32 -183
- package/lib/module/app-shell/panel-layout.js.map +1 -1
- package/lib/module/app-shell/panel-motion.js +14 -36
- package/lib/module/app-shell/panel-motion.js.map +1 -1
- package/lib/module/app-shell/panel-transitions.js +21 -0
- package/lib/module/app-shell/panel-transitions.js.map +1 -0
- package/lib/module/app-shell/shell-layout-css.js +2 -2
- package/lib/module/app-shell/shell-layout-css.js.map +1 -1
- package/lib/module/app-shell/use-panel-exit-completion.js +97 -0
- package/lib/module/app-shell/use-panel-exit-completion.js.map +1 -0
- package/lib/module/app-shell/use-panel-resize.js +22 -8
- package/lib/module/app-shell/use-panel-resize.js.map +1 -1
- package/lib/module/app-shell/use-panel-reveal.js +2 -1
- package/lib/module/app-shell/use-panel-reveal.js.map +1 -1
- package/lib/module/bottom-sheet/BottomSheetBase.js +3 -2
- package/lib/module/bottom-sheet/BottomSheetBase.js.map +1 -1
- package/lib/module/chip/Chip.js +10 -1
- package/lib/module/chip/Chip.js.map +1 -1
- package/lib/module/chip/shared.js +2 -2
- package/lib/module/dialog/DialogBottomSheet.js +6 -3
- package/lib/module/dialog/DialogBottomSheet.js.map +1 -1
- package/lib/module/engagement-bar/EngagementAction.js +7 -6
- package/lib/module/engagement-bar/EngagementAction.js.map +1 -1
- package/lib/module/engagement-bar/EngagementBar.js +29 -5
- package/lib/module/engagement-bar/EngagementBar.js.map +1 -1
- package/lib/module/engagement-bar/EngagementPop.js +10 -3
- package/lib/module/engagement-bar/EngagementPop.js.map +1 -1
- package/lib/module/engagement-bar/context.js.map +1 -1
- package/lib/module/engagement-bar/paint.js +60 -13
- package/lib/module/engagement-bar/paint.js.map +1 -1
- package/lib/module/hooks/use-border-box-size.js +42 -0
- package/lib/module/hooks/use-border-box-size.js.map +1 -0
- package/lib/module/layout/ScrollBar.web.js +64 -31
- package/lib/module/layout/ScrollBar.web.js.map +1 -1
- package/lib/module/layout/scroll-metrics.js.map +1 -1
- package/lib/module/list/VirtualList.js +12 -0
- package/lib/module/list/VirtualList.js.map +1 -1
- package/lib/module/list/VirtualList.web.js +41 -20
- package/lib/module/list/VirtualList.web.js.map +1 -1
- package/lib/module/list/flash-list-module.js.map +1 -1
- package/lib/module/page-header/EdgeScrim.js +14 -4
- package/lib/module/page-header/EdgeScrim.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +19 -6
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/screen/ScreenBase.js +15 -6
- package/lib/module/screen/ScreenBase.js.map +1 -1
- package/lib/module/screen/ScreenScrollViewBase.js +12 -2
- package/lib/module/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/module/screen/context.js.map +1 -1
- package/lib/module/screen/use-intrinsic-content-height.js +50 -0
- package/lib/module/screen/use-intrinsic-content-height.js.map +1 -0
- package/lib/module/screen/use-screen-viewport.js +39 -8
- package/lib/module/screen/use-screen-viewport.js.map +1 -1
- package/lib/module/scroll/constants.js +3 -0
- package/lib/module/scroll/constants.js.map +1 -1
- package/lib/module/scroll/owner-handoff.js +27 -8
- package/lib/module/scroll/owner-handoff.js.map +1 -1
- package/lib/module/scroll/use-scroll-restoration.web.js +1 -10
- package/lib/module/scroll/use-scroll-restoration.web.js.map +1 -1
- package/lib/module/sidebar/Sidebar.js +121 -87
- package/lib/module/sidebar/Sidebar.js.map +1 -1
- package/lib/module/sidebar/arrangement.js +32 -0
- package/lib/module/sidebar/arrangement.js.map +1 -0
- package/lib/module/sidebar/index.js.map +1 -1
- package/lib/module/stay-filters/CountFilter.js +1 -1
- package/lib/module/stay-filters/FilterChip.js +1 -1
- package/lib/module/stay-filters/ToggleChipGroup.js +1 -1
- package/lib/typescript/commonjs/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShellPanelLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/RetainedPanelLayout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts +2 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts +11 -2
- package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-layout.d.ts +13 -27
- package/lib/typescript/commonjs/app-shell/panel-layout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-motion.d.ts +1 -12
- package/lib/typescript/commonjs/app-shell/panel-motion.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/panel-transitions.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts +14 -0
- package/lib/typescript/commonjs/app-shell/use-panel-exit-completion.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts +2 -2
- package/lib/typescript/commonjs/app-shell/use-panel-reorder.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts +4 -2
- package/lib/typescript/commonjs/app-shell/use-panel-resize.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts +2 -2
- package/lib/typescript/commonjs/app-shell/use-panel-reveal.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/bottom-sheet/types.d.ts +2 -0
- package/lib/typescript/commonjs/bottom-sheet/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/commonjs/chip/shared.d.ts +1 -1
- package/lib/typescript/commonjs/chip/types.d.ts +1 -1
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/commonjs/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +2 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts +3 -3
- package/lib/typescript/commonjs/engagement-bar/EngagementBar.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts +2 -1
- package/lib/typescript/commonjs/engagement-bar/EngagementPop.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/context.d.ts +1 -0
- package/lib/typescript/commonjs/engagement-bar/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/paint.d.ts +4 -2
- package/lib/typescript/commonjs/engagement-bar/paint.d.ts.map +1 -1
- package/lib/typescript/commonjs/engagement-bar/types.d.ts +10 -1
- package/lib/typescript/commonjs/engagement-bar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts +13 -0
- package/lib/typescript/commonjs/hooks/use-border-box-size.d.ts.map +1 -0
- package/lib/typescript/commonjs/layout/ScrollBar.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/scroll-metrics.d.ts +2 -0
- package/lib/typescript/commonjs/layout/scroll-metrics.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/types.d.ts +2 -2
- package/lib/typescript/commonjs/layout/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/VirtualList.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/VirtualList.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/flash-list-module.d.ts +1 -1
- package/lib/typescript/commonjs/list/flash-list-module.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts +3 -1
- package/lib/typescript/commonjs/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/types.d.ts +2 -0
- package/lib/typescript/commonjs/page-header/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/context.d.ts +3 -0
- package/lib/typescript/commonjs/screen/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts +3 -0
- package/lib/typescript/commonjs/screen/use-intrinsic-content-height.d.ts.map +1 -0
- package/lib/typescript/commonjs/screen/use-screen-viewport.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/constants.d.ts +2 -0
- package/lib/typescript/commonjs/scroll/constants.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/owner-handoff.d.ts +3 -1
- package/lib/typescript/commonjs/scroll/owner-handoff.d.ts.map +1 -1
- package/lib/typescript/commonjs/scroll/use-scroll-restoration.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/arrangement.d.ts +32 -0
- package/lib/typescript/commonjs/sidebar/arrangement.d.ts.map +1 -0
- package/lib/typescript/commonjs/sidebar/index.d.ts +1 -0
- package/lib/typescript/commonjs/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts +13 -1
- package/lib/typescript/commonjs/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-filters/CountFilter.d.ts +1 -1
- package/lib/typescript/commonjs/stay-filters/ToggleChipGroup.d.ts +1 -1
- package/lib/typescript/module/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellEngine.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShellPanelLayout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/RetainedPanelLayout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout-css.d.ts +2 -1
- package/lib/typescript/module/app-shell/panel-layout-css.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout-types.d.ts +11 -2
- package/lib/typescript/module/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-layout.d.ts +13 -27
- package/lib/typescript/module/app-shell/panel-layout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-motion.d.ts +1 -12
- package/lib/typescript/module/app-shell/panel-motion.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-transitions.d.ts +4 -0
- package/lib/typescript/module/app-shell/panel-transitions.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +4 -0
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts +14 -0
- package/lib/typescript/module/app-shell/use-panel-exit-completion.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/use-panel-reorder.d.ts +2 -2
- package/lib/typescript/module/app-shell/use-panel-reorder.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-resize.d.ts +4 -2
- package/lib/typescript/module/app-shell/use-panel-resize.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/use-panel-reveal.d.ts +2 -2
- package/lib/typescript/module/app-shell/use-panel-reveal.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/BottomSheetBase.d.ts.map +1 -1
- package/lib/typescript/module/bottom-sheet/types.d.ts +2 -0
- package/lib/typescript/module/bottom-sheet/types.d.ts.map +1 -1
- package/lib/typescript/module/chip/Chip.d.ts.map +1 -1
- package/lib/typescript/module/chip/shared.d.ts +1 -1
- package/lib/typescript/module/chip/types.d.ts +1 -1
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts +2 -2
- package/lib/typescript/module/dialog/DialogBottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +2 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementAction.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementBar.d.ts +3 -3
- package/lib/typescript/module/engagement-bar/EngagementBar.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/EngagementPop.d.ts +2 -1
- package/lib/typescript/module/engagement-bar/EngagementPop.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/context.d.ts +1 -0
- package/lib/typescript/module/engagement-bar/context.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/paint.d.ts +4 -2
- package/lib/typescript/module/engagement-bar/paint.d.ts.map +1 -1
- package/lib/typescript/module/engagement-bar/types.d.ts +10 -1
- package/lib/typescript/module/engagement-bar/types.d.ts.map +1 -1
- package/lib/typescript/module/hooks/use-border-box-size.d.ts +13 -0
- package/lib/typescript/module/hooks/use-border-box-size.d.ts.map +1 -0
- package/lib/typescript/module/layout/ScrollBar.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/scroll-metrics.d.ts +2 -0
- package/lib/typescript/module/layout/scroll-metrics.d.ts.map +1 -1
- package/lib/typescript/module/layout/types.d.ts +2 -2
- package/lib/typescript/module/layout/types.d.ts.map +1 -1
- package/lib/typescript/module/list/VirtualList.d.ts.map +1 -1
- package/lib/typescript/module/list/VirtualList.web.d.ts.map +1 -1
- package/lib/typescript/module/list/flash-list-module.d.ts +1 -1
- package/lib/typescript/module/list/flash-list-module.d.ts.map +1 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts +3 -1
- package/lib/typescript/module/page-header/EdgeScrim.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/page-header/types.d.ts +2 -0
- package/lib/typescript/module/page-header/types.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/context.d.ts +3 -0
- package/lib/typescript/module/screen/context.d.ts.map +1 -1
- package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts +3 -0
- package/lib/typescript/module/screen/use-intrinsic-content-height.d.ts.map +1 -0
- package/lib/typescript/module/screen/use-screen-viewport.d.ts.map +1 -1
- package/lib/typescript/module/scroll/constants.d.ts +2 -0
- package/lib/typescript/module/scroll/constants.d.ts.map +1 -1
- package/lib/typescript/module/scroll/owner-handoff.d.ts +3 -1
- package/lib/typescript/module/scroll/owner-handoff.d.ts.map +1 -1
- package/lib/typescript/module/scroll/use-scroll-restoration.web.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/Sidebar.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/arrangement.d.ts +32 -0
- package/lib/typescript/module/sidebar/arrangement.d.ts.map +1 -0
- package/lib/typescript/module/sidebar/index.d.ts +1 -0
- package/lib/typescript/module/sidebar/index.d.ts.map +1 -1
- package/lib/typescript/module/sidebar/types.d.ts +13 -1
- package/lib/typescript/module/sidebar/types.d.ts.map +1 -1
- package/lib/typescript/module/stay-filters/CountFilter.d.ts +1 -1
- package/lib/typescript/module/stay-filters/ToggleChipGroup.d.ts +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/public-part-classifications.json +169 -26
- package/src/__tests__/support/yoga-host-tree.ts +55 -2
- package/src/app-shell/AppShell.tsx +7 -3
- package/src/app-shell/AppShellEngine.tsx +6 -2
- package/src/app-shell/AppShellPanelLayout.tsx +466 -189
- package/src/app-shell/RetainedPanelLayout.tsx +7 -1
- package/src/app-shell/panel-layout-css.ts +41 -27
- package/src/app-shell/panel-layout-types.ts +11 -2
- package/src/app-shell/panel-layout.ts +49 -256
- package/src/app-shell/panel-motion.ts +34 -52
- package/src/app-shell/panel-transitions.ts +39 -0
- package/src/app-shell/shell-layout-css.ts +6 -2
- package/src/app-shell/types.ts +4 -0
- package/src/app-shell/use-panel-exit-completion.ts +95 -0
- package/src/app-shell/use-panel-reorder.ts +2 -2
- package/src/app-shell/use-panel-resize.ts +37 -10
- package/src/app-shell/use-panel-reveal.ts +4 -9
- package/src/bottom-sheet/BottomSheetBase.tsx +6 -2
- package/src/bottom-sheet/types.ts +2 -0
- package/src/chip/Chip.tsx +3 -1
- package/src/chip/shared.ts +2 -2
- package/src/chip/types.ts +1 -1
- package/src/dialog/DialogBottomSheet.tsx +13 -2
- package/src/dialog/types.ts +2 -0
- package/src/engagement-bar/EngagementAction.tsx +5 -4
- package/src/engagement-bar/EngagementBar.tsx +30 -5
- package/src/engagement-bar/EngagementPop.tsx +11 -3
- package/src/engagement-bar/context.ts +1 -0
- package/src/engagement-bar/paint.ts +60 -13
- package/src/engagement-bar/types.ts +10 -1
- package/src/hooks/use-border-box-size.ts +38 -0
- package/src/layout/ScrollBar.web.tsx +74 -40
- package/src/layout/scroll-metrics.tsx +2 -0
- package/src/layout/types.ts +2 -2
- package/src/list/VirtualList.tsx +18 -0
- package/src/list/VirtualList.web.tsx +69 -22
- package/src/list/flash-list-module.ts +2 -0
- package/src/page-header/EdgeScrim.tsx +29 -9
- package/src/page-header/PageHeader.tsx +10 -6
- package/src/page-header/types.ts +2 -0
- package/src/screen/ScreenBase.tsx +13 -6
- package/src/screen/ScreenScrollViewBase.tsx +24 -2
- package/src/screen/context.ts +3 -0
- package/src/screen/use-intrinsic-content-height.ts +56 -0
- package/src/screen/use-screen-viewport.ts +60 -11
- package/src/scroll/constants.ts +3 -0
- package/src/scroll/owner-handoff.ts +45 -11
- package/src/scroll/use-scroll-restoration.web.ts +4 -10
- package/src/sidebar/Sidebar.tsx +146 -121
- package/src/sidebar/arrangement.ts +47 -0
- package/src/sidebar/index.ts +6 -0
- package/src/sidebar/types.ts +13 -1
- package/src/stay-filters/CountFilter.tsx +1 -1
- package/src/stay-filters/FilterChip.tsx +1 -1
- package/src/stay-filters/ToggleChipGroup.tsx +1 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { useEffect, useCallback, useLayoutEffect, useImperativeHandle, useMemo, useContext, useRef, useState } from 'react';
|
|
4
|
-
import {
|
|
3
|
+
import React, { useEffect, useCallback, useLayoutEffect, useImperativeHandle, useMemo, useContext, useRef, useState, useId } from 'react';
|
|
4
|
+
import { Platform } from 'react-native';
|
|
5
|
+
import { StyledView as View } from "../styles/styled-primitives.js";
|
|
6
|
+
import { SafeAreaInsetsContext, useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
7
|
import Animated, { cancelAnimation, useAnimatedStyle, useSharedValue, withTiming, runOnJS } from 'react-native-reanimated';
|
|
8
|
+
import { ContentPanelNestingContext } from "../content-panel/context.js";
|
|
6
9
|
import { useDialogControl, useDialogContext } from "../dialog/context.js";
|
|
7
10
|
import { CloseButton } from "../button/CloseButton.js";
|
|
8
11
|
import { useCommonMessages } from "../locale/common-messages.js";
|
|
9
|
-
import { useAppShellRegion } from "../layout/app-shell-region.js";
|
|
10
|
-
import { useBottomEdgeInset } from "../layout/bottom-edge.js";
|
|
12
|
+
import { AppShellRegionContext, useAppShellRegion } from "../layout/app-shell-region.js";
|
|
13
|
+
import { BottomEdgeProvider, useBottomEdgeInset } from "../layout/bottom-edge.js";
|
|
11
14
|
import { ScrollMetricsContext } from "../layout/scroll-metrics.js";
|
|
12
15
|
import { ScrollOffsetProvider } from "../layout/scroll-offset.js";
|
|
13
16
|
import { ScreenScope } from "../layout/screen-scope.js";
|
|
@@ -18,6 +21,8 @@ import { ScreenHostContext } from "../screen/context.js";
|
|
|
18
21
|
import { ResizeHandle } from "../layout/ResizeHandle.js";
|
|
19
22
|
import { PanelErrorBoundary } from "../error-boundary/PanelErrorBoundary.js";
|
|
20
23
|
import { PANEL_EXIT_MS, PANEL_LAYOUT_MS, animatePanelFlex } from "./panel-motion.js";
|
|
24
|
+
import { panelGeometryTransitions } from "./panel-transitions.js";
|
|
25
|
+
import { usePanelExitCompletion } from "./use-panel-exit-completion.js";
|
|
21
26
|
import { UNSET } from "../styles/animated-style.js";
|
|
22
27
|
import { useMeasuredSizeClass, useWindowSizeWhile } from "../hooks/use-width-class.js";
|
|
23
28
|
import { IS_WEB } from "../styles/platform.js";
|
|
@@ -33,15 +38,19 @@ import { PanelReorderHandle } from "./PanelReorderHandle.js";
|
|
|
33
38
|
import { usePanelReveal } from "./use-panel-reveal.js";
|
|
34
39
|
import { usePanelResize } from "./use-panel-resize.js";
|
|
35
40
|
import { useRoomChanged } from "./use-room-changed.js";
|
|
36
|
-
import { PanelCssContext, panelLayoutCss } from "./panel-layout-css.js";
|
|
41
|
+
import { PanelCssContext, PanelResponsiveScopeContext, panelCssScope, panelLayoutCss } from "./panel-layout-css.js";
|
|
37
42
|
import { ServerStyleSheet } from "../styles/ServerStyleSheet.js";
|
|
38
43
|
import { AppShellPanelContext, PanelScrollContainerContext, ShellColorClaimContext } from "./context.js";
|
|
39
44
|
import { useLatestClaim } from "../hooks/use-latest-claim.js";
|
|
40
45
|
import { PlacementBoundaryContext } from "../overlay/placement-boundary.js";
|
|
41
46
|
import { PanelNavigation, PanelScrollScope } from "./PanelNavigation.js";
|
|
42
|
-
import { applyPanelSpans, isFlexiblePanel, panelWindowChrome,
|
|
47
|
+
import { applyPanelSpans, isFlexiblePanel, panelWindowChrome, panelForAxis, eligiblePanels, panelLayoutMinimum, panelLayoutWidthThresholds, resolvePanelAxis, resolvePanelFlex, splitPairSpans } from "./panel-layout.js";
|
|
43
48
|
import { PanelDropProvider, PanelDropZones, usePanelDropCoordinator } from "./PanelDropZones.js";
|
|
44
49
|
import { RetainedPanelLayout } from "./RetainedPanelLayout.js";
|
|
50
|
+
const PanelWindowInsetsContext = /*#__PURE__*/React.createContext(null);
|
|
51
|
+
// The document is one scroll owner. Transparent groups delegate its restoration
|
|
52
|
+
// down the primary branch instead of each layout restoring the same window.
|
|
53
|
+
const PanelDocumentRestorationContext = /*#__PURE__*/React.createContext(true);
|
|
45
54
|
|
|
46
55
|
/** A track the CSS compositor sizes: its flex values are the stylesheet's, never read. */
|
|
47
56
|
const CSS_TRACK = {
|
|
@@ -106,6 +115,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
106
115
|
panel,
|
|
107
116
|
open,
|
|
108
117
|
children,
|
|
118
|
+
onClosed,
|
|
109
119
|
testID
|
|
110
120
|
}) {
|
|
111
121
|
const control = useDialogControl();
|
|
@@ -117,7 +127,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
117
127
|
return /*#__PURE__*/_jsx(Dialog, {
|
|
118
128
|
control: control,
|
|
119
129
|
label: panel.floating.label,
|
|
120
|
-
placement:
|
|
130
|
+
placement: panel.floating?.placement ?? 'end',
|
|
121
131
|
width: panel.floating.width ?? panel.width ?? 410,
|
|
122
132
|
inset: {
|
|
123
133
|
top: 12,
|
|
@@ -126,12 +136,14 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
126
136
|
right: 12
|
|
127
137
|
},
|
|
128
138
|
scrollable: false,
|
|
139
|
+
sizing: "fill",
|
|
129
140
|
contentPadding: 0,
|
|
130
141
|
testID: testID ? `${testID}-floating` : undefined,
|
|
131
142
|
onClose: () => {
|
|
132
143
|
// An explicit state close already belongs to the host. Only surface
|
|
133
144
|
// dismissal reports a new intent, after Dialog's exit completes.
|
|
134
145
|
if (intent.current) panel.floating.onOpenChange(false);
|
|
146
|
+
onClosed();
|
|
135
147
|
},
|
|
136
148
|
children: children
|
|
137
149
|
});
|
|
@@ -236,12 +248,14 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
236
248
|
visibilityReady,
|
|
237
249
|
index,
|
|
238
250
|
getSize,
|
|
239
|
-
modelSize,
|
|
240
251
|
vertical,
|
|
241
252
|
naturalHeight,
|
|
253
|
+
safeAreaTop,
|
|
254
|
+
shellWidth,
|
|
242
255
|
track,
|
|
243
256
|
alone,
|
|
244
257
|
document: documentFlow,
|
|
258
|
+
documentRestorationOwner,
|
|
245
259
|
joined,
|
|
246
260
|
gap,
|
|
247
261
|
onResize,
|
|
@@ -255,6 +269,13 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
255
269
|
testID
|
|
256
270
|
}) {
|
|
257
271
|
const layoutReady = useShellLayoutReady();
|
|
272
|
+
const fallbackInsets = useSafeAreaInsets();
|
|
273
|
+
const safeArea = useContext(SafeAreaInsetsContext) ?? fallbackInsets;
|
|
274
|
+
const windowInsets = useContext(PanelWindowInsetsContext) ?? safeArea;
|
|
275
|
+
const inlineInsets = useMemo(() => ({
|
|
276
|
+
...safeArea,
|
|
277
|
+
top: safeAreaTop
|
|
278
|
+
}), [safeArea, safeAreaTop]);
|
|
258
279
|
// One tree whether or not the panel holds the window's chrome right now.
|
|
259
280
|
const platformWindow = usePlatformWindow();
|
|
260
281
|
const windowed = platformWindow != null;
|
|
@@ -323,22 +344,26 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
323
344
|
const theme = useTheme();
|
|
324
345
|
const rtl = useIsRtl();
|
|
325
346
|
// Only the web places a sticky panel from the viewport's height.
|
|
326
|
-
const viewportHeight = useWindowSizeWhile(Platform.OS === 'web').height;
|
|
347
|
+
const viewportHeight = useWindowSizeWhile(Platform.OS === 'web' && !!panel.sticky && documentFlow).height;
|
|
327
348
|
const [stickyHeight, setStickyHeight] = useState(0);
|
|
328
349
|
const document = documentFlow && !track.floating;
|
|
350
|
+
const documentFrame = document && (!vertical || alone);
|
|
329
351
|
const floatingOpen = !!track.floating && !!panel.floating?.open && panel.visible !== false;
|
|
330
|
-
const sticky = !!panel.sticky &&
|
|
352
|
+
const sticky = !!panel.sticky && documentFrame;
|
|
331
353
|
const parent = React.useContext(ScreenContext);
|
|
332
|
-
const
|
|
354
|
+
const ancestorHost = useContext(ScreenHostContext);
|
|
355
|
+
const active = panel.visible !== false && (track.visible || floatingOpen) && (parent?.active ?? true) && ancestorHost.active;
|
|
333
356
|
const screenRef = useRef(null);
|
|
334
357
|
const scrollY = useSharedValue(0);
|
|
335
358
|
const contentHeight = useSharedValue(-1);
|
|
359
|
+
const intrinsicContentHeight = useSharedValue(-1);
|
|
336
360
|
const scrollViewportHeight = useSharedValue(0);
|
|
337
361
|
const metrics = useMemo(() => ({
|
|
338
362
|
scrollY,
|
|
339
363
|
contentHeight,
|
|
364
|
+
intrinsicContentHeight: panel.resizeMaxHeight === 'content' ? intrinsicContentHeight : undefined,
|
|
340
365
|
viewportHeight: scrollViewportHeight
|
|
341
|
-
}), [scrollY, contentHeight, scrollViewportHeight]);
|
|
366
|
+
}), [scrollY, contentHeight, intrinsicContentHeight, scrollViewportHeight, panel.resizeMaxHeight]);
|
|
342
367
|
const [screenColor, claimPanelColor] = useLatestClaim();
|
|
343
368
|
const claimShellColor = useContext(ShellColorClaimContext);
|
|
344
369
|
const claimColor = useCallback(color => {
|
|
@@ -359,6 +384,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
359
384
|
} = useContext(ScreenHostContext);
|
|
360
385
|
const host = useMemo(() => ({
|
|
361
386
|
active,
|
|
387
|
+
sizing: naturalHeight ? 'content' : 'fill',
|
|
362
388
|
back,
|
|
363
389
|
restoresDocument: document,
|
|
364
390
|
kind: Platform.OS !== 'web' ? 'native' : document ? 'document' : 'element',
|
|
@@ -369,15 +395,14 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
369
395
|
}) : panel.headerActions,
|
|
370
396
|
claimColor,
|
|
371
397
|
metrics
|
|
372
|
-
}), [active, back, document, metrics, panel.headerActions, reorderHandle, panel.bottomBar, claimColor, track.floating]);
|
|
398
|
+
}), [active, naturalHeight, back, document, metrics, panel.headerActions, reorderHandle, panel.bottomBar, claimColor, track.floating]);
|
|
373
399
|
const mounted = useRef(false);
|
|
374
400
|
if (track.visible || floatingOpen || panel.keepMounted) mounted.current = true;
|
|
375
401
|
const start = useRef(0);
|
|
376
402
|
const reduced = usePrefersReducedMotion();
|
|
377
403
|
// The track's flex along the group's axis (`resolvePanelFlex`), as shared
|
|
378
|
-
// values: Yoga
|
|
379
|
-
//
|
|
380
|
-
// shown, hidden, resized by its handle) moves them.
|
|
404
|
+
// values: Yoga distributes room without a React sizing pass. Semantic
|
|
405
|
+
// visibility changes and direct gestures update these declarative values.
|
|
381
406
|
const grow = useSharedValue(track.grow);
|
|
382
407
|
const basis = useSharedValue(track.basis);
|
|
383
408
|
const min = useSharedValue(track.min);
|
|
@@ -386,14 +411,20 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
386
411
|
const opacity = useSharedValue(track.visible ? 1 : 0);
|
|
387
412
|
const panelScale = useSharedValue(1);
|
|
388
413
|
const lastHeight = useSharedValue(0);
|
|
414
|
+
const lastWidth = useSharedValue(0);
|
|
389
415
|
// A resize gesture holds the track at the size it drags to (a frozen
|
|
390
416
|
// basis), and its commit lands at once: what it settled on is already drawn.
|
|
391
417
|
const gestureHeld = useRef(false);
|
|
392
418
|
useEffect(() => registerResizePreview({
|
|
393
419
|
read: () => {
|
|
394
420
|
const box = panelRef.current?.getBoundingClientRect?.();
|
|
395
|
-
return box ? vertical ? box.height : box.width :
|
|
421
|
+
return box ? vertical ? box.height : box.width : vertical ? lastHeight.value : lastWidth.value;
|
|
396
422
|
},
|
|
423
|
+
contentHeight: panel.resizeMaxHeight === 'content' ? height => {
|
|
424
|
+
const intrinsic = intrinsicContentHeight.value;
|
|
425
|
+
const viewport = scrollViewportHeight.value;
|
|
426
|
+
return intrinsic >= 0 && viewport > 0 ? Math.max(0, height - viewport) + intrinsic : undefined;
|
|
427
|
+
} : undefined,
|
|
397
428
|
update: size => {
|
|
398
429
|
gestureHeld.current = true;
|
|
399
430
|
cancelAnimation(grow);
|
|
@@ -401,10 +432,21 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
401
432
|
grow.value = 0;
|
|
402
433
|
basis.value = size;
|
|
403
434
|
}
|
|
404
|
-
}), [registerResizePreview, grow, basis, vertical]);
|
|
435
|
+
}), [registerResizePreview, grow, basis, vertical, panel.resizeMaxHeight, intrinsicContentHeight, scrollViewportHeight]);
|
|
405
436
|
// The panel paints the material: on the web its fade is its presence, never
|
|
406
437
|
// an opacity on the track above it (the CSS compositor does the same).
|
|
407
438
|
const fadeMs = cssScope || reduced ? 0 : transition === 'exit-before-enter' ? PANEL_EXIT_MS : PANEL_LAYOUT_MS;
|
|
439
|
+
const {
|
|
440
|
+
captureNativeCompletion,
|
|
441
|
+
completeFloating
|
|
442
|
+
} = usePanelExitCompletion({
|
|
443
|
+
present: panel.visible !== false && (!track.floating || floatingOpen),
|
|
444
|
+
floating: !!track.floating,
|
|
445
|
+
css: !!cssScope,
|
|
446
|
+
reducedMotion: reduced,
|
|
447
|
+
owner: panelRef,
|
|
448
|
+
onExitComplete: panel.onExitComplete
|
|
449
|
+
});
|
|
408
450
|
useSurfacePresenceContent(cssScope ? null : panelRef, {
|
|
409
451
|
presence: track.visible ? 1 : 0,
|
|
410
452
|
duration: fadeMs,
|
|
@@ -433,8 +475,8 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
433
475
|
max: track.max,
|
|
434
476
|
gap: track.gap,
|
|
435
477
|
visible: track.visible
|
|
436
|
-
}, transition === 'exit-before-enter', reduced || resized || held);
|
|
437
|
-
}, [track.grow, track.basis, track.min, track.max, track.gap, track.visible, grow, basis, min, max, leading, opacity, panelScale, transition, reduced, cssScope]);
|
|
478
|
+
}, transition === 'exit-before-enter', reduced || resized || held, track.floating ? undefined : captureNativeCompletion());
|
|
479
|
+
}, [track.grow, track.basis, track.min, track.max, track.gap, track.visible, track.floating, panel.visible, grow, basis, min, max, leading, opacity, panelScale, transition, reduced, cssScope, captureNativeCompletion]);
|
|
438
480
|
// Every key on every run (`styles/animated-style.ts`).
|
|
439
481
|
// The track's basis is its main-axis SIZE (`width` across, `height` down)
|
|
440
482
|
// under `flexBasis: auto`, never `flexBasis` itself: Fabric marks a node
|
|
@@ -520,8 +562,14 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
520
562
|
// Under the bottom bar a side-by-side panel reaches it: its content clears
|
|
521
563
|
// the bar and drives it (the shell's navigation motion); a stacked one sits
|
|
522
564
|
// above the group viewport's own clearance.
|
|
523
|
-
const underBar = !
|
|
524
|
-
const body = /*#__PURE__*/
|
|
565
|
+
const underBar = !documentFrame && !!region?.underBottomBar;
|
|
566
|
+
const body = panel.group ? /*#__PURE__*/_jsx(ScreenHostContext.Provider, {
|
|
567
|
+
value: {
|
|
568
|
+
...ancestorHost,
|
|
569
|
+
active
|
|
570
|
+
},
|
|
571
|
+
children: content
|
|
572
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
525
573
|
children: [/*#__PURE__*/_jsx(ScreenScope, {
|
|
526
574
|
inheritBottomEdge: document || underBar,
|
|
527
575
|
inheritNavigation: underBar,
|
|
@@ -542,11 +590,11 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
542
590
|
})
|
|
543
591
|
})
|
|
544
592
|
}), /*#__PURE__*/_jsx(DocumentPanelReserve, {
|
|
545
|
-
height:
|
|
593
|
+
height: documentFrame ? region?.bottomReserve ?? 0 : 0
|
|
546
594
|
})]
|
|
547
595
|
});
|
|
548
596
|
const framed = region?.framed ?? true;
|
|
549
|
-
const surface = joined ? /*#__PURE__*/_jsx(View, {
|
|
597
|
+
const surface = panel.group ? body : joined ? /*#__PURE__*/_jsx(View, {
|
|
550
598
|
style: FILL,
|
|
551
599
|
children: panel.errorBoundary ? /*#__PURE__*/_jsx(PanelErrorBoundary, {
|
|
552
600
|
...(panel.errorBoundary === true ? {} : panel.errorBoundary),
|
|
@@ -560,11 +608,11 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
560
608
|
framed: cssScope && cssFraming ? true : framed,
|
|
561
609
|
maskColor: region?.maskColor,
|
|
562
610
|
errorBoundary: panel.errorBoundary,
|
|
563
|
-
fill: !document,
|
|
611
|
+
fill: !document && !naturalHeight,
|
|
564
612
|
scrollable: false,
|
|
565
|
-
overlaySizing:
|
|
566
|
-
overlayInset:
|
|
567
|
-
surfaceStyle: [FILL,
|
|
613
|
+
overlaySizing: documentFrame ? 'viewport' : 'panel',
|
|
614
|
+
overlayInset: documentFrame ? region?.viewportInset : undefined,
|
|
615
|
+
surfaceStyle: [FILL, documentFrame && !sticky && region ? {
|
|
568
616
|
minHeight: webViewportHeightMinus(region.viewportInset.top + region.viewportInset.bottom)
|
|
569
617
|
} : undefined,
|
|
570
618
|
// Only along a window's top edge, so the style is unchanged elsewhere.
|
|
@@ -597,9 +645,10 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
597
645
|
} : undefined, resizable ? {
|
|
598
646
|
zIndex: 1
|
|
599
647
|
} : undefined, Platform.OS !== 'web' ? reorderStyle : undefined],
|
|
600
|
-
onLayout: event => {
|
|
648
|
+
onLayout: cssScope && !sticky ? undefined : event => {
|
|
601
649
|
if (track.visible) {
|
|
602
650
|
lastHeight.value = event.nativeEvent.layout.height;
|
|
651
|
+
lastWidth.value = event.nativeEvent.layout.width;
|
|
603
652
|
if (sticky) setStickyHeight(event.nativeEvent.layout.height);
|
|
604
653
|
}
|
|
605
654
|
},
|
|
@@ -631,7 +680,10 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
631
680
|
overflow: 'clip',
|
|
632
681
|
overflowClipMargin: gap
|
|
633
682
|
} : undefined],
|
|
634
|
-
children:
|
|
683
|
+
children: /*#__PURE__*/_jsx(SafeAreaInsetsContext.Provider, {
|
|
684
|
+
value: inlineInsets,
|
|
685
|
+
children: surface
|
|
686
|
+
})
|
|
635
687
|
})
|
|
636
688
|
})
|
|
637
689
|
})
|
|
@@ -687,28 +739,50 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
687
739
|
onNudge: dx => onNudge(!vertical && rtl ? -dx : dx)
|
|
688
740
|
})
|
|
689
741
|
}) : null]
|
|
690
|
-
}), track.floating && panel.floating ? /*#__PURE__*/_jsx(
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
742
|
+
}), track.floating && panel.floating ? /*#__PURE__*/_jsx(SafeAreaInsetsContext.Provider, {
|
|
743
|
+
value: windowInsets,
|
|
744
|
+
children: /*#__PURE__*/_jsx(PanelFloatingSurface, {
|
|
745
|
+
panel: panel,
|
|
746
|
+
open: floatingOpen,
|
|
747
|
+
onClosed: completeFloating,
|
|
748
|
+
testID: testID,
|
|
749
|
+
children: /*#__PURE__*/_jsx(SafeAreaInsetsContext.Provider, {
|
|
750
|
+
value: {
|
|
751
|
+
...windowInsets,
|
|
752
|
+
top: 0
|
|
753
|
+
},
|
|
754
|
+
children: /*#__PURE__*/_jsx(AppShellPanelContext.Provider, {
|
|
755
|
+
value: floatingValue,
|
|
756
|
+
children: /*#__PURE__*/_jsx(ColorScope, {
|
|
757
|
+
colorPreset: scopeColorPreset,
|
|
758
|
+
seed: scopeSeed,
|
|
759
|
+
asChild: true,
|
|
760
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
761
|
+
style: FILL,
|
|
762
|
+
children: panel.errorBoundary ? /*#__PURE__*/_jsx(PanelErrorBoundary, {
|
|
763
|
+
...(panel.errorBoundary === true ? {} : panel.errorBoundary),
|
|
764
|
+
children: body
|
|
765
|
+
}) : body
|
|
766
|
+
})
|
|
767
|
+
})
|
|
706
768
|
})
|
|
707
769
|
})
|
|
708
770
|
})
|
|
709
771
|
}) : null]
|
|
710
772
|
});
|
|
711
773
|
};
|
|
774
|
+
if (panel.group) return renderPanel(/*#__PURE__*/_jsx(PanelDocumentRestorationContext.Provider, {
|
|
775
|
+
value: documentRestorationOwner && active,
|
|
776
|
+
children: /*#__PURE__*/_jsx(NestedPanelGroup, {
|
|
777
|
+
layout: panel.group,
|
|
778
|
+
groupActions: /*#__PURE__*/_jsxs(_Fragment, {
|
|
779
|
+
children: [reorderHandle, panel.headerActions]
|
|
780
|
+
}),
|
|
781
|
+
shellWidth: shellWidth,
|
|
782
|
+
gap: gap,
|
|
783
|
+
testID: testID ? `${testID}-group` : undefined
|
|
784
|
+
})
|
|
785
|
+
}));
|
|
712
786
|
// Navigation and restoration belong to the persistent descriptor, above
|
|
713
787
|
// the inline/portal presentation boundary. Closing or docking a surface
|
|
714
788
|
// does not recreate its history or scroll store.
|
|
@@ -731,6 +805,110 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
731
805
|
}) : renderPanel(renderScreen(panel.content))
|
|
732
806
|
});
|
|
733
807
|
}
|
|
808
|
+
function NestedPanelGroup({
|
|
809
|
+
layout: declared,
|
|
810
|
+
shellWidth,
|
|
811
|
+
gap,
|
|
812
|
+
testID,
|
|
813
|
+
groupActions
|
|
814
|
+
}) {
|
|
815
|
+
const region = useAppShellRegion();
|
|
816
|
+
const parentScope = useContext(PanelCssContext);
|
|
817
|
+
const inheritedResponsiveScope = useContext(PanelResponsiveScopeContext);
|
|
818
|
+
const scope = panelCssScope(useId());
|
|
819
|
+
const groupRef = useRef(null);
|
|
820
|
+
const reducedMotion = usePrefersReducedMotion();
|
|
821
|
+
const wantsDocument = Platform.OS === 'web' && region?.flow === 'document' && declared.singlePanelFlow === 'document' && declared.mode !== 'flow' && declared.mode !== 'deck' && eligiblePanels(declared, shellWidth).length === 1;
|
|
822
|
+
const [documentReady, setDocumentReady] = useState(wantsDocument);
|
|
823
|
+
const document = wantsDocument && documentReady;
|
|
824
|
+
// Keep the same bounded owner while the outgoing track closes and the
|
|
825
|
+
// survivor expands, including ancestor width changes when leaving Deck.
|
|
826
|
+
// Transfer to document scrolling only when those actual CSS transitions
|
|
827
|
+
// finish: no timeout or JavaScript geometry calculation.
|
|
828
|
+
useLayoutEffect(() => {
|
|
829
|
+
if (!wantsDocument) {
|
|
830
|
+
setDocumentReady(false);
|
|
831
|
+
return;
|
|
832
|
+
}
|
|
833
|
+
if (documentReady) return;
|
|
834
|
+
const node = groupRef.current;
|
|
835
|
+
const ancestors = new Set();
|
|
836
|
+
for (let ancestor = node?.parentElement; ancestor; ancestor = ancestor.parentElement) {
|
|
837
|
+
if (ancestor.dataset.bloomPanelOwner || ancestor.dataset.bloomReadingEnvelope || ancestor.dataset.bloomShellFrame) ancestors.add(ancestor);
|
|
838
|
+
}
|
|
839
|
+
let cancelled = false;
|
|
840
|
+
const finishWhenSettled = () => {
|
|
841
|
+
if (cancelled) return;
|
|
842
|
+
const owners = node?.querySelectorAll(`[data-bloom-panel-owner="${scope}"]`);
|
|
843
|
+
const animations = reducedMotion ? [] : panelGeometryTransitions([...(owners ?? []), ...ancestors]);
|
|
844
|
+
if (!animations.length) {
|
|
845
|
+
setDocumentReady(true);
|
|
846
|
+
return;
|
|
847
|
+
}
|
|
848
|
+
// A resize can replace an in-flight transition without changing the
|
|
849
|
+
// requested owner. Recheck its replacement before committing the handoff.
|
|
850
|
+
void Promise.allSettled(animations.map(animation => animation.finished)).then(finishWhenSettled);
|
|
851
|
+
};
|
|
852
|
+
finishWhenSettled();
|
|
853
|
+
return () => {
|
|
854
|
+
cancelled = true;
|
|
855
|
+
};
|
|
856
|
+
}, [wantsDocument, documentReady, reducedMotion, scope]);
|
|
857
|
+
const firstInline = eligiblePanels(declared, shellWidth)[0]?.id;
|
|
858
|
+
const layout = {
|
|
859
|
+
...declared,
|
|
860
|
+
panels: groupActions ? declared.panels.map(panel => panel.id === firstInline ? {
|
|
861
|
+
...panel,
|
|
862
|
+
headerActions: /*#__PURE__*/_jsxs(_Fragment, {
|
|
863
|
+
children: [groupActions, panel.headerActions]
|
|
864
|
+
})
|
|
865
|
+
} : panel) : declared.panels,
|
|
866
|
+
flow: document ? 'document' : declared.flow ?? 'bounded',
|
|
867
|
+
horizontalScroll: 'contained',
|
|
868
|
+
gap: declared.gap ?? (declared.appearance === 'joined' || declared.appearance === 'plain' ? 1 : region?.gutter ?? gap)
|
|
869
|
+
};
|
|
870
|
+
const nestedRegion = useMemo(() => region ? {
|
|
871
|
+
...region,
|
|
872
|
+
flow: document ? 'document' : 'bounded',
|
|
873
|
+
bottomReserve: document ? region.bottomReserve : 0,
|
|
874
|
+
underBottomBar: false
|
|
875
|
+
} : null, [region, document]);
|
|
876
|
+
return /*#__PURE__*/_jsx(View, {
|
|
877
|
+
ref: groupRef,
|
|
878
|
+
className: "min-h-0 min-w-0 self-stretch grow shrink basis-auto",
|
|
879
|
+
...(parentScope ? {
|
|
880
|
+
dataSet: {
|
|
881
|
+
bloomLayout: scope
|
|
882
|
+
}
|
|
883
|
+
} : {}),
|
|
884
|
+
style: !document && region?.flow === 'document' ? {
|
|
885
|
+
height: webViewportHeightMinus(region.viewportInset.top + region.viewportInset.bottom),
|
|
886
|
+
flexGrow: 0,
|
|
887
|
+
flexShrink: 0
|
|
888
|
+
} : undefined,
|
|
889
|
+
children: /*#__PURE__*/_jsx(PanelCssContext.Provider, {
|
|
890
|
+
value: parentScope ? scope : null,
|
|
891
|
+
children: /*#__PURE__*/_jsx(PanelResponsiveScopeContext.Provider, {
|
|
892
|
+
value: inheritedResponsiveScope ?? parentScope,
|
|
893
|
+
children: /*#__PURE__*/_jsx(AppShellRegionContext.Provider, {
|
|
894
|
+
value: nestedRegion,
|
|
895
|
+
children: /*#__PURE__*/_jsx(BottomEdgeProvider, {
|
|
896
|
+
inherit: document,
|
|
897
|
+
children: /*#__PURE__*/_jsx(ContentPanelNestingContext.Provider, {
|
|
898
|
+
value: false,
|
|
899
|
+
children: /*#__PURE__*/_jsx(PanelLayoutView, {
|
|
900
|
+
layout: layout,
|
|
901
|
+
shellWidth: shellWidth,
|
|
902
|
+
gap: gap,
|
|
903
|
+
testID: testID
|
|
904
|
+
})
|
|
905
|
+
})
|
|
906
|
+
})
|
|
907
|
+
})
|
|
908
|
+
})
|
|
909
|
+
})
|
|
910
|
+
});
|
|
911
|
+
}
|
|
734
912
|
function PanelLayoutTracks({
|
|
735
913
|
layout: declared,
|
|
736
914
|
surfaceOwned = false,
|
|
@@ -746,8 +924,14 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
746
924
|
const layout = useMemo(() => applyPanelSpans(declared, spans), [declared, spans]);
|
|
747
925
|
const region = useAppShellRegion();
|
|
748
926
|
const restoration = useOptionalScrollRestorationContext();
|
|
927
|
+
const canRestoreDocument = useContext(PanelDocumentRestorationContext);
|
|
749
928
|
const ancestorHost = useContext(ScreenHostContext);
|
|
929
|
+
const parentScreen = useContext(ScreenContext);
|
|
930
|
+
const fallbackInsets = useSafeAreaInsets();
|
|
931
|
+
const safeArea = useContext(SafeAreaInsetsContext) ?? fallbackInsets;
|
|
932
|
+
const windowInsets = useContext(PanelWindowInsetsContext) ?? safeArea;
|
|
750
933
|
const cssScope = useContext(PanelCssContext);
|
|
934
|
+
const responsiveScope = useContext(PanelResponsiveScopeContext);
|
|
751
935
|
const rootRef = useRef(null);
|
|
752
936
|
const reorderScrollRef = useRef(null);
|
|
753
937
|
const reorderScrollOffset = useRef({
|
|
@@ -794,9 +978,9 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
794
978
|
const dimensions = vertical ? layout.heights ?? ownHeights : layout.widths ?? ownWidths;
|
|
795
979
|
const joined = layout.appearance === 'joined' || layout.appearance === 'plain';
|
|
796
980
|
const actualGap = layout.gap ?? (joined ? 1 : gap);
|
|
797
|
-
const document = layout.flow === 'document' && layout.mode !== 'deck' && Platform.OS === 'web';
|
|
798
|
-
const deck = layout.mode === 'deck';
|
|
799
|
-
const documentHorizontal = !!cssScope && deck && !vertical && layout.horizontalScroll !== 'contained';
|
|
981
|
+
const document = layout.flow === 'document' && layout.mode !== 'deck' && layout.mode !== 'flow' && Platform.OS === 'web';
|
|
982
|
+
const deck = layout.mode === 'deck' || layout.mode === 'flow';
|
|
983
|
+
const documentHorizontal = !!cssScope && deck && layout.mode !== 'flow' && !vertical && layout.horizontalScroll !== 'contained';
|
|
800
984
|
const reducedMotion = usePrefersReducedMotion();
|
|
801
985
|
// The group's own size matters only at thresholds: the room below which a
|
|
802
986
|
// split shows its active track alone (its minimum, in every range of the
|
|
@@ -805,11 +989,8 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
805
989
|
// size only when it crosses one of these (`useMeasuredSizeClass`).
|
|
806
990
|
const shellRanges = panelLayoutWidthThresholds(layout);
|
|
807
991
|
const minima = shellRanges.map(lower => panelLayoutMinimum(layout, lower, actualGap));
|
|
808
|
-
// And where flexible tracks with minimums stop being held at them
|
|
809
|
-
// (`flexibleRoomThresholds`): Yoga divides the room between those.
|
|
810
|
-
const regimes = shellRanges.flatMap(lower => flexibleRoomThresholds(layout, lower, actualGap, dimensions));
|
|
811
992
|
const heightReserve = document ? 0 : bottomEdge;
|
|
812
|
-
const roomThresholds =
|
|
993
|
+
const roomThresholds = minima;
|
|
813
994
|
const group = useMeasuredSizeClass(vertical ? eligibilityFromGroup ? shellRanges : [] : [...roomThresholds, ...(eligibilityFromGroup ? shellRanges : [])], vertical ? roomThresholds.map(threshold => threshold + heightReserve) : []);
|
|
814
995
|
const room = vertical ? Math.max(0, group.height - heightReserve) : group.width;
|
|
815
996
|
const eligibilityWidth = eligibilityFromGroup ? group.width : shellWidth;
|
|
@@ -829,18 +1010,6 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
829
1010
|
collapseBelow: Number.MAX_SAFE_INTEGER
|
|
830
1011
|
} : {})
|
|
831
1012
|
}, room, eligibilityWidth, actualGap, dimensions);
|
|
832
|
-
// A track's size in pixels, when a resize gesture starts and the platform
|
|
833
|
-
// gives no layout to read (`getBoundingClientRect`): the group's measured
|
|
834
|
-
// room as Yoga divides it, which `resolvePanelTracks` models.
|
|
835
|
-
const modelTrackSize = id => {
|
|
836
|
-
// The window until the group's first layout, as its size classes read it.
|
|
837
|
-
const measured = group.read() ?? Dimensions.get('window');
|
|
838
|
-
const exactRoom = vertical ? Math.max(0, measured.height - heightReserve) : measured.width;
|
|
839
|
-
return resolvePanelTracks({
|
|
840
|
-
...layout,
|
|
841
|
-
flow: document ? 'document' : 'bounded'
|
|
842
|
-
}, exactRoom, eligibilityFromGroup ? measured.width : shellWidth, actualGap, dimensions).find(track => track.id === id)?.width ?? 0;
|
|
843
|
-
};
|
|
844
1013
|
usePanelReveal({
|
|
845
1014
|
rootRef,
|
|
846
1015
|
request: layout.revealPanel,
|
|
@@ -850,13 +1019,13 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
850
1019
|
tracks,
|
|
851
1020
|
reducedMotion
|
|
852
1021
|
});
|
|
853
|
-
const cssRules = cssScope ? panelLayoutCss(cssScope, layout, actualGap, layout.widths ?? ownWidths, layout.heights ?? ownHeights, fillWidth) : '';
|
|
1022
|
+
const cssRules = cssScope ? panelLayoutCss(cssScope, layout, actualGap, layout.widths ?? ownWidths, layout.heights ?? ownHeights, fillWidth, responsiveScope ?? cssScope, !fillWidth && !eligibilityFromGroup && responsiveScope === null) : '';
|
|
854
1023
|
const visibilityReady = cssScope ? cssState.measured : layoutReady;
|
|
855
1024
|
useLayoutEffect(() => {
|
|
856
1025
|
if (!cssScope || !rootRef.current || typeof getComputedStyle !== 'function') return;
|
|
857
1026
|
const root = rootRef.current;
|
|
858
1027
|
const read = () => {
|
|
859
|
-
const row = root.querySelector(
|
|
1028
|
+
const row = root.querySelector(`[data-bloom-panel-row="${cssScope}"]`);
|
|
860
1029
|
if (!row) return;
|
|
861
1030
|
const axis = getComputedStyle(row).getPropertyValue('--bloom-panel-axis').trim();
|
|
862
1031
|
const next = layout.panels.map((panel, index) => {
|
|
@@ -888,11 +1057,16 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
888
1057
|
if (!root.hasAttribute('data-bloom-panel-resizing')) read();
|
|
889
1058
|
});
|
|
890
1059
|
observer?.observe(root);
|
|
891
|
-
const shell = root.closest(
|
|
1060
|
+
const shell = root.closest(`[data-bloom-layout="${responsiveScope ?? cssScope}"]`);
|
|
892
1061
|
if (shell) observer?.observe(shell);
|
|
893
1062
|
return () => observer?.disconnect();
|
|
894
|
-
}, [cssScope, cssRules, layout.panels]);
|
|
1063
|
+
}, [cssScope, responsiveScope, cssRules, layout.panels]);
|
|
895
1064
|
const visible = tracks.filter(track => track.visible);
|
|
1065
|
+
// Selection can survive Deck exit on a secondary column. Only actual
|
|
1066
|
+
// inline order (already resolved for expansion/compact mode) owns the page.
|
|
1067
|
+
const primaryId = visible[0]?.id;
|
|
1068
|
+
const primaryPanel = layout.panels.find(panel => panel.id === primaryId);
|
|
1069
|
+
const ownsDocumentRestoration = canRestoreDocument && ancestorHost.active !== false && parentScreen?.active !== false && primaryPanel !== undefined && !primaryPanel.group;
|
|
896
1070
|
const handedWindowChrome = useWindowChrome();
|
|
897
1071
|
const platformWindow = usePlatformWindow();
|
|
898
1072
|
// A web page deck scrolls the document from the shell's own start edge (the
|
|
@@ -916,7 +1090,8 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
916
1090
|
// Two flexible split tracks keep a proportion, not pixels: commit weights.
|
|
917
1091
|
if (!deck && ids.length === 2 && resized.every(candidate => candidate !== undefined && isFlexiblePanel(candidate, vertical, dimensions))) {
|
|
918
1092
|
const [first, second] = resized;
|
|
919
|
-
const
|
|
1093
|
+
const axis = vertical ? 'vertical' : 'horizontal';
|
|
1094
|
+
const weights = splitPairSpans(panelForAxis(first, axis), panelForAxis(second, axis), pair[first.id], pair[second.id], Platform.OS !== 'web');
|
|
920
1095
|
const nextSpans = {
|
|
921
1096
|
...spans,
|
|
922
1097
|
...weights
|
|
@@ -1044,15 +1219,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
1044
1219
|
bloomPanelRow: cssScope
|
|
1045
1220
|
}
|
|
1046
1221
|
} : {}),
|
|
1047
|
-
|
|
1048
|
-
flexDirection: vertical ? 'column' : 'row',
|
|
1049
|
-
alignItems: 'stretch',
|
|
1050
|
-
flexGrow: 1,
|
|
1051
|
-
flexShrink: document ? 0 : 1,
|
|
1052
|
-
flexBasis: document ? 'auto' : 0,
|
|
1053
|
-
minHeight: 0,
|
|
1054
|
-
minWidth: 0
|
|
1055
|
-
},
|
|
1222
|
+
className: `min-h-0 min-w-0 items-stretch grow ${vertical ? 'flex-col' : 'flex-row'} ${document || deck && vertical ? 'shrink-0 basis-auto' : 'shrink basis-0'}`,
|
|
1056
1223
|
children: layout.panels.map((panel, index) => /*#__PURE__*/_jsx(PanelHost, {
|
|
1057
1224
|
panel: panel,
|
|
1058
1225
|
registerReorder: reorder.register,
|
|
@@ -1073,9 +1240,10 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
1073
1240
|
visibilityReady: visibilityReady && trackById.has(panel.id),
|
|
1074
1241
|
index: index,
|
|
1075
1242
|
getSize: () => resize.size(panel.id),
|
|
1076
|
-
modelSize: () => modelTrackSize(panel.id),
|
|
1077
1243
|
vertical: vertical,
|
|
1078
|
-
|
|
1244
|
+
shellWidth: shellWidth,
|
|
1245
|
+
safeAreaTop: (parentScreen?.topInset ?? 0) > 0 || vertical && visible[0]?.id !== panel.id ? 0 : safeArea.top,
|
|
1246
|
+
naturalHeight: vertical && (document || layout.mode === 'flow') && panel.height === undefined && dimensions[panel.id] === undefined,
|
|
1079
1247
|
track: trackById.get(panel.id) ?? {
|
|
1080
1248
|
...CSS_TRACK,
|
|
1081
1249
|
id: panel.id,
|
|
@@ -1083,6 +1251,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
1083
1251
|
},
|
|
1084
1252
|
alone: visible.length === 1,
|
|
1085
1253
|
document: document,
|
|
1254
|
+
documentRestorationOwner: canRestoreDocument && panel.id === primaryId,
|
|
1086
1255
|
joined: joined,
|
|
1087
1256
|
gap: actualGap,
|
|
1088
1257
|
hasNext: visible[visible.length - 1]?.id !== panel.id,
|
|
@@ -1109,72 +1278,75 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
1109
1278
|
testID: testID ? `${testID}-scroll` : undefined,
|
|
1110
1279
|
children: row
|
|
1111
1280
|
});
|
|
1112
|
-
return /*#__PURE__*/_jsx(
|
|
1113
|
-
value:
|
|
1114
|
-
children: /*#__PURE__*/
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
bloomPanelGroup: cssScope,
|
|
1125
|
-
bloomPanelOrdering: reorder.ordering ? 'true' : undefined
|
|
1126
|
-
}
|
|
1127
|
-
} : {}),
|
|
1128
|
-
testID: testID,
|
|
1129
|
-
onLayout: cssScope ? undefined : group.onLayout,
|
|
1130
|
-
style: [{
|
|
1131
|
-
minWidth: 0,
|
|
1132
|
-
alignSelf: 'stretch',
|
|
1133
|
-
// Horizontal document panels reserve inside their own surface.
|
|
1134
|
-
// A bounded group reserves the bottom bar, or — when the app keeps
|
|
1135
|
-
// the bar over its content — fills under it and what scrolls clears
|
|
1136
|
-
// it (`useBottomEdgeInset`, the panel scroller, the vertical deck).
|
|
1137
|
-
paddingBottom: document ? vertical ? region?.bottomReserve ?? 0 : 0 : region?.underBottomBar ? 0 : bottomEdge,
|
|
1281
|
+
return /*#__PURE__*/_jsx(PanelWindowInsetsContext.Provider, {
|
|
1282
|
+
value: windowInsets,
|
|
1283
|
+
children: /*#__PURE__*/_jsx(PanelDropProvider, {
|
|
1284
|
+
value: drop,
|
|
1285
|
+
children: /*#__PURE__*/_jsxs(PanelOrderBoundary, {
|
|
1286
|
+
ids: layout.panels.map(panel => panel.id),
|
|
1287
|
+
rootRef: rootRef,
|
|
1288
|
+
children: [/*#__PURE__*/_jsx(ServerStyleSheet, {
|
|
1289
|
+
id: cssScope ?? '',
|
|
1290
|
+
css: cssRules
|
|
1291
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
1292
|
+
ref: rootRef,
|
|
1138
1293
|
...(cssScope ? {
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1294
|
+
dataSet: {
|
|
1295
|
+
bloomPanelGroup: cssScope,
|
|
1296
|
+
bloomPanelOrdering: reorder.ordering ? 'true' : undefined
|
|
1297
|
+
}
|
|
1298
|
+
} : {}),
|
|
1299
|
+
testID: testID,
|
|
1300
|
+
onLayout: cssScope ? undefined : group.onLayout,
|
|
1301
|
+
style: [{
|
|
1302
|
+
minWidth: 0,
|
|
1303
|
+
alignSelf: 'stretch',
|
|
1304
|
+
// Horizontal document panels reserve inside their own surface.
|
|
1305
|
+
// A bounded group reserves the bottom bar, or — when the app keeps
|
|
1306
|
+
// the bar over its content — fills under it and what scrolls clears
|
|
1307
|
+
// it (`useBottomEdgeInset`, the panel scroller, the vertical deck).
|
|
1308
|
+
paddingBottom: document ? vertical && visible.length > 1 ? region?.bottomReserve ?? 0 : 0 : region?.underBottomBar ? 0 : bottomEdge,
|
|
1309
|
+
...(cssScope ? {
|
|
1310
|
+
containerType: document ? 'inline-size' : 'size',
|
|
1311
|
+
containerName: `${cssScope}-group`
|
|
1312
|
+
} : {})
|
|
1313
|
+
}, document ? {} : FILL],
|
|
1314
|
+
children: [Platform.OS === 'web' && restoration && !ancestorHost.restoresDocument ? /*#__PURE__*/_jsx(DocumentRestoration, {
|
|
1315
|
+
enabled: document && ownsDocumentRestoration
|
|
1316
|
+
}) : null, joined && !surfaceOwned ? /*#__PURE__*/_jsx(ContentPanel, {
|
|
1317
|
+
appearance: layout.appearance === 'plain' ? 'plain' : undefined,
|
|
1318
|
+
framed: cssScope && !eligibilityFromGroup ? true : region?.framed ?? true,
|
|
1319
|
+
fill: !document,
|
|
1320
|
+
scrollable: false,
|
|
1321
|
+
overlaySizing: document ? 'viewport' : 'panel',
|
|
1322
|
+
overlayInset: document ? region?.viewportInset : undefined,
|
|
1323
|
+
surfaceStyle: groupWindowChrome && platformWindow ? [FILL, windowEdgeTopCorners(platformWindow.metrics)] : FILL,
|
|
1324
|
+
contentStyle: FILL,
|
|
1325
|
+
children: content
|
|
1326
|
+
}) : content, layout.onPanelOrderChange ? /*#__PURE__*/_jsx(Text, {
|
|
1327
|
+
accessibilityLiveRegion: "polite",
|
|
1328
|
+
"aria-live": "polite",
|
|
1329
|
+
style: {
|
|
1330
|
+
position: 'absolute',
|
|
1331
|
+
width: 1,
|
|
1332
|
+
height: 1,
|
|
1333
|
+
overflow: 'hidden',
|
|
1334
|
+
opacity: 0
|
|
1335
|
+
},
|
|
1336
|
+
children: reorder.announcement
|
|
1337
|
+
}) : null, documentHorizontal ? /*#__PURE__*/_jsx(ScrollBar, {
|
|
1338
|
+
target: "document",
|
|
1339
|
+
horizontal: true,
|
|
1340
|
+
offset: bottomEdge
|
|
1341
|
+
}) : null, documentHorizontal && layout.trailingAction ? /*#__PURE__*/_jsx(View, {
|
|
1342
|
+
dataSet: {
|
|
1343
|
+
bloomDeckTrailing: cssScope ?? undefined
|
|
1344
|
+
},
|
|
1345
|
+
testID: testID ? `${testID}-trailing-action` : undefined,
|
|
1346
|
+
children: layout.trailingAction
|
|
1347
|
+
}) : null]
|
|
1348
|
+
})]
|
|
1349
|
+
})
|
|
1178
1350
|
})
|
|
1179
1351
|
});
|
|
1180
1352
|
}
|
|
@@ -1191,7 +1363,7 @@ export function createPanelLayoutView(ContentPanel, ColorScope, ScrollArea, Scro
|
|
|
1191
1363
|
if (props.layout.header === undefined) return /*#__PURE__*/_jsx(PanelLayoutTracks, {
|
|
1192
1364
|
...props
|
|
1193
1365
|
});
|
|
1194
|
-
const document = props.layout.flow === 'document' && props.layout.mode !== 'deck' && Platform.OS === 'web';
|
|
1366
|
+
const document = props.layout.flow === 'document' && props.layout.mode !== 'deck' && props.layout.mode !== 'flow' && Platform.OS === 'web';
|
|
1195
1367
|
const joined = props.layout.appearance === 'joined' || props.layout.appearance === 'plain';
|
|
1196
1368
|
const workspace = /*#__PURE__*/_jsx(Screen, {
|
|
1197
1369
|
scroll: "none",
|