@oxy.so/bloom 22.0.1 → 22.1.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/adoption-matrix.mdx +10 -10
- package/docs/agent-task-index.mdx +1 -1
- package/docs/app-conventions.mdx +11 -0
- package/docs/app-shell.mdx +25 -2
- package/docs/compose-layouts.mdx +6 -0
- package/docs/composition.mdx +3 -1
- package/docs/dialog.mdx +57 -0
- package/docs/layout.mdx +10 -0
- package/docs/project-board.mdx +28 -1
- package/docs/public-parts.mdx +8 -2
- package/docs/screen.mdx +15 -0
- package/docs/semantic-composition.mdx +207 -0
- package/docs/task-catalog.json +16 -3
- package/docs/task-catalog.mdx +6 -6
- package/docs/ui-architecture.mdx +6 -4
- package/lib/commonjs/app-shell/AppShell.js +18 -9
- package/lib/commonjs/app-shell/AppShell.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellEngine.js +18 -5
- package/lib/commonjs/app-shell/AppShellEngine.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellPanelLayout.js +59 -30
- package/lib/commonjs/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/commonjs/app-shell/AppShellPanels.js +53 -31
- package/lib/commonjs/app-shell/AppShellPanels.js.map +1 -1
- package/lib/commonjs/app-shell/composition.js +232 -0
- package/lib/commonjs/app-shell/composition.js.map +1 -0
- package/lib/commonjs/app-shell/context.js +7 -1
- package/lib/commonjs/app-shell/context.js.map +1 -1
- package/lib/commonjs/app-shell/hooks/index.js +13 -0
- package/lib/commonjs/app-shell/hooks/index.js.map +1 -1
- package/lib/commonjs/app-shell/index.js +38 -0
- package/lib/commonjs/app-shell/index.js.map +1 -1
- package/lib/commonjs/app-shell/index.web.js +38 -0
- package/lib/commonjs/app-shell/index.web.js.map +1 -1
- package/lib/commonjs/app-shell/panel-layout-css.js +7 -3
- package/lib/commonjs/app-shell/panel-layout-css.js.map +1 -1
- package/lib/commonjs/app-shell/panel-session.js +210 -0
- package/lib/commonjs/app-shell/panel-session.js.map +1 -0
- package/lib/commonjs/app-shell/shell-layout-css.js +6 -4
- package/lib/commonjs/app-shell/shell-layout-css.js.map +1 -1
- package/lib/commonjs/canvas/CanvasPanelBase.js +1 -0
- package/lib/commonjs/canvas/CanvasPanelBase.js.map +1 -1
- package/lib/commonjs/chat-screen/ChatInfoPanelBase.js +1 -0
- package/lib/commonjs/chat-screen/ChatInfoPanelBase.js.map +1 -1
- package/lib/commonjs/dialog/DetailDialog.js +19 -0
- package/lib/commonjs/dialog/DetailDialog.js.map +1 -0
- package/lib/commonjs/dialog/DetailDialog.web.js +19 -0
- package/lib/commonjs/dialog/DetailDialog.web.js.map +1 -0
- package/lib/commonjs/dialog/DetailDialogBase.js +204 -0
- package/lib/commonjs/dialog/DetailDialogBase.js.map +1 -0
- package/lib/commonjs/dialog/DetailDialogMotion.js +87 -0
- package/lib/commonjs/dialog/DetailDialogMotion.js.map +1 -0
- package/lib/commonjs/dialog/DetailDialogMotion.web.js +345 -0
- package/lib/commonjs/dialog/DetailDialogMotion.web.js.map +1 -0
- package/lib/commonjs/dialog/DetailDialogSection.js +49 -0
- package/lib/commonjs/dialog/DetailDialogSection.js.map +1 -0
- package/lib/commonjs/dialog/Dialog.js +101 -90
- package/lib/commonjs/dialog/Dialog.js.map +1 -1
- package/lib/commonjs/dialog/context.js +4 -1
- package/lib/commonjs/dialog/context.js.map +1 -1
- package/lib/commonjs/dialog/index.js +20 -0
- package/lib/commonjs/dialog/index.js.map +1 -1
- package/lib/commonjs/dialog/index.web.js +20 -0
- package/lib/commonjs/dialog/index.web.js.map +1 -1
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +28 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/layout/app-shell-region.js.map +1 -1
- package/lib/commonjs/layout/index.js +7 -0
- package/lib/commonjs/layout/index.js.map +1 -1
- package/lib/commonjs/layout/index.web.js +7 -0
- package/lib/commonjs/layout/index.web.js.map +1 -1
- package/lib/commonjs/layout/safe-area-ownership.js +31 -0
- package/lib/commonjs/layout/safe-area-ownership.js.map +1 -0
- package/lib/commonjs/layout/screen-scope.js +26 -20
- package/lib/commonjs/layout/screen-scope.js.map +1 -1
- package/lib/commonjs/list/ListMail.js +5 -1
- package/lib/commonjs/list/ListMail.js.map +1 -1
- package/lib/commonjs/page-header/PageHeader.js +3 -1
- package/lib/commonjs/page-header/PageHeader.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoard.js +2 -0
- package/lib/commonjs/project-board/ProjectBoard.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoard.web.js +2 -0
- package/lib/commonjs/project-board/ProjectBoard.web.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardBase.js +29 -41
- package/lib/commonjs/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/commonjs/project-board/ProjectBoardCardContent.js +56 -0
- package/lib/commonjs/project-board/ProjectBoardCardContent.js.map +1 -0
- package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js +7 -340
- package/lib/commonjs/project-board/TicketCornerGenieSurface.web.js.map +1 -1
- package/lib/commonjs/project-board/TicketDetailDialog.js +317 -412
- package/lib/commonjs/project-board/TicketDetailDialog.js.map +1 -1
- package/lib/commonjs/project-board/TicketGenieSurface.js +13 -82
- package/lib/commonjs/project-board/TicketGenieSurface.js.map +1 -1
- package/lib/commonjs/project-board/TicketTokenChart.js +1 -1
- package/lib/commonjs/project-board/TicketTokenChart.js.map +1 -1
- package/lib/commonjs/project-board/context.js +9 -2
- package/lib/commonjs/project-board/context.js.map +1 -1
- package/lib/commonjs/project-board/index.js +7 -0
- package/lib/commonjs/project-board/index.js.map +1 -1
- package/lib/commonjs/project-board/index.web.js +7 -0
- package/lib/commonjs/project-board/index.web.js.map +1 -1
- package/lib/commonjs/screen/ScreenBase.js +44 -32
- package/lib/commonjs/screen/ScreenBase.js.map +1 -1
- package/lib/commonjs/screen/ScreenContent.js +61 -0
- package/lib/commonjs/screen/ScreenContent.js.map +1 -0
- package/lib/commonjs/screen/ScreenScrollViewBase.js +66 -1
- package/lib/commonjs/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/commonjs/screen/content.js +25 -0
- package/lib/commonjs/screen/content.js.map +1 -0
- package/lib/commonjs/screen/index.js +7 -0
- package/lib/commonjs/screen/index.js.map +1 -1
- package/lib/commonjs/screen/index.web.js +7 -0
- package/lib/commonjs/screen/index.web.js.map +1 -1
- package/lib/commonjs/screen/keyboard-components.js.map +1 -1
- package/lib/module/app-shell/AppShell.js +15 -5
- package/lib/module/app-shell/AppShell.js.map +1 -1
- package/lib/module/app-shell/AppShellEngine.js +18 -5
- package/lib/module/app-shell/AppShellEngine.js.map +1 -1
- package/lib/module/app-shell/AppShellPanelLayout.js +60 -30
- package/lib/module/app-shell/AppShellPanelLayout.js.map +1 -1
- package/lib/module/app-shell/AppShellPanels.js +52 -28
- package/lib/module/app-shell/AppShellPanels.js.map +1 -1
- package/lib/module/app-shell/composition.js +226 -0
- package/lib/module/app-shell/composition.js.map +1 -0
- package/lib/module/app-shell/context.js +4 -0
- package/lib/module/app-shell/context.js.map +1 -1
- package/lib/module/app-shell/hooks/index.js +1 -0
- package/lib/module/app-shell/hooks/index.js.map +1 -1
- package/lib/module/app-shell/index.js +3 -0
- package/lib/module/app-shell/index.js.map +1 -1
- package/lib/module/app-shell/index.web.js +3 -0
- package/lib/module/app-shell/index.web.js.map +1 -1
- package/lib/module/app-shell/panel-layout-css.js +7 -3
- package/lib/module/app-shell/panel-layout-css.js.map +1 -1
- package/lib/module/app-shell/panel-session.js +204 -0
- package/lib/module/app-shell/panel-session.js.map +1 -0
- package/lib/module/app-shell/shell-layout-css.js +6 -4
- package/lib/module/app-shell/shell-layout-css.js.map +1 -1
- package/lib/module/canvas/CanvasPanelBase.js +1 -0
- package/lib/module/canvas/CanvasPanelBase.js.map +1 -1
- package/lib/module/chat-screen/ChatInfoPanelBase.js +1 -0
- package/lib/module/chat-screen/ChatInfoPanelBase.js.map +1 -1
- package/lib/module/dialog/DetailDialog.js +15 -0
- package/lib/module/dialog/DetailDialog.js.map +1 -0
- package/lib/module/dialog/DetailDialog.web.js +15 -0
- package/lib/module/dialog/DetailDialog.web.js.map +1 -0
- package/lib/module/dialog/DetailDialogBase.js +200 -0
- package/lib/module/dialog/DetailDialogBase.js.map +1 -0
- package/lib/module/dialog/DetailDialogMotion.js +81 -0
- package/lib/module/dialog/DetailDialogMotion.js.map +1 -0
- package/lib/module/dialog/DetailDialogMotion.web.js +342 -0
- package/lib/module/dialog/DetailDialogMotion.web.js.map +1 -0
- package/lib/module/dialog/DetailDialogSection.js +44 -0
- package/lib/module/dialog/DetailDialogSection.js.map +1 -0
- package/lib/module/dialog/Dialog.js +102 -91
- package/lib/module/dialog/Dialog.js.map +1 -1
- package/lib/module/dialog/context.js +3 -0
- package/lib/module/dialog/context.js.map +1 -1
- package/lib/module/dialog/index.js +2 -0
- package/lib/module/dialog/index.js.map +1 -1
- package/lib/module/dialog/index.web.js +2 -0
- package/lib/module/dialog/index.web.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +2 -2
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/layout/app-shell-region.js.map +1 -1
- package/lib/module/layout/index.js +1 -0
- package/lib/module/layout/index.js.map +1 -1
- package/lib/module/layout/index.web.js +1 -0
- package/lib/module/layout/index.web.js.map +1 -1
- package/lib/module/layout/safe-area-ownership.js +26 -0
- package/lib/module/layout/safe-area-ownership.js.map +1 -0
- package/lib/module/layout/screen-scope.js +26 -20
- package/lib/module/layout/screen-scope.js.map +1 -1
- package/lib/module/list/ListMail.js +5 -1
- package/lib/module/list/ListMail.js.map +1 -1
- package/lib/module/page-header/PageHeader.js +3 -1
- package/lib/module/page-header/PageHeader.js.map +1 -1
- package/lib/module/project-board/ProjectBoard.js +2 -0
- package/lib/module/project-board/ProjectBoard.js.map +1 -1
- package/lib/module/project-board/ProjectBoard.web.js +2 -0
- package/lib/module/project-board/ProjectBoard.web.js.map +1 -1
- package/lib/module/project-board/ProjectBoardBase.js +30 -42
- package/lib/module/project-board/ProjectBoardBase.js.map +1 -1
- package/lib/module/project-board/ProjectBoardCardContent.js +52 -0
- package/lib/module/project-board/ProjectBoardCardContent.js.map +1 -0
- package/lib/module/project-board/TicketCornerGenieSurface.web.js +1 -339
- package/lib/module/project-board/TicketCornerGenieSurface.web.js.map +1 -1
- package/lib/module/project-board/TicketDetailDialog.js +317 -412
- package/lib/module/project-board/TicketDetailDialog.js.map +1 -1
- package/lib/module/project-board/TicketGenieSurface.js +1 -78
- package/lib/module/project-board/TicketGenieSurface.js.map +1 -1
- package/lib/module/project-board/TicketTokenChart.js +1 -1
- package/lib/module/project-board/TicketTokenChart.js.map +1 -1
- package/lib/module/project-board/context.js +1 -1
- package/lib/module/project-board/context.js.map +1 -1
- package/lib/module/project-board/index.js +1 -0
- package/lib/module/project-board/index.js.map +1 -1
- package/lib/module/project-board/index.web.js +1 -0
- package/lib/module/project-board/index.web.js.map +1 -1
- package/lib/module/screen/ScreenBase.js +22 -10
- package/lib/module/screen/ScreenBase.js.map +1 -1
- package/lib/module/screen/ScreenContent.js +57 -0
- package/lib/module/screen/ScreenContent.js.map +1 -0
- package/lib/module/screen/ScreenScrollViewBase.js +67 -2
- package/lib/module/screen/ScreenScrollViewBase.js.map +1 -1
- package/lib/module/screen/content.js +21 -0
- package/lib/module/screen/content.js.map +1 -0
- package/lib/module/screen/index.js +1 -0
- package/lib/module/screen/index.js.map +1 -1
- package/lib/module/screen/index.web.js +1 -0
- package/lib/module/screen/index.web.js.map +1 -1
- package/lib/module/screen/keyboard-components.js.map +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/AppShellPanels.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/composition.d.ts +52 -0
- package/lib/typescript/commonjs/app-shell/composition.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/context.d.ts +4 -0
- package/lib/typescript/commonjs/app-shell/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/hooks/index.d.ts +2 -0
- package/lib/typescript/commonjs/app-shell/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/index.d.ts +5 -0
- package/lib/typescript/commonjs/app-shell/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/index.web.d.ts +5 -0
- package/lib/typescript/commonjs/app-shell/index.web.d.ts.map +1 -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 +2 -1
- package/lib/typescript/commonjs/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/panel-session.d.ts +51 -0
- package/lib/typescript/commonjs/app-shell/panel-session.d.ts.map +1 -0
- package/lib/typescript/commonjs/app-shell/shell-layout-css.d.ts +2 -1
- package/lib/typescript/commonjs/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +15 -3
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/DetailDialog.d.ts +5 -0
- package/lib/typescript/commonjs/dialog/DetailDialog.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/DetailDialog.web.d.ts +5 -0
- package/lib/typescript/commonjs/dialog/DetailDialog.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/DetailDialogBase.d.ts +20 -0
- package/lib/typescript/commonjs/dialog/DetailDialogBase.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.d.ts +9 -0
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.web.d.ts +7 -0
- package/lib/typescript/commonjs/dialog/DetailDialogMotion.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/DetailDialogSection.d.ts +6 -0
- package/lib/typescript/commonjs/dialog/DetailDialogSection.d.ts.map +1 -0
- package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/context.d.ts +2 -0
- package/lib/typescript/commonjs/dialog/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.d.ts +3 -1
- package/lib/typescript/commonjs/dialog/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts +3 -1
- package/lib/typescript/commonjs/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/dialog/types.d.ts +37 -0
- package/lib/typescript/commonjs/dialog/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +3 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +3 -3
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/app-shell-region.d.ts +2 -0
- package/lib/typescript/commonjs/layout/app-shell-region.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/index.d.ts +1 -0
- package/lib/typescript/commonjs/layout/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/index.web.d.ts +1 -0
- package/lib/typescript/commonjs/layout/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/layout/safe-area-ownership.d.ts +8 -0
- package/lib/typescript/commonjs/layout/safe-area-ownership.d.ts.map +1 -0
- package/lib/typescript/commonjs/layout/screen-scope.d.ts +3 -1
- package/lib/typescript/commonjs/layout/screen-scope.d.ts.map +1 -1
- package/lib/typescript/commonjs/list/ListMail.d.ts.map +1 -1
- package/lib/typescript/commonjs/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoard.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoard.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/ProjectBoardCardContent.d.ts +4 -0
- package/lib/typescript/commonjs/project-board/ProjectBoardCardContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/project-board/TicketCornerGenieSurface.web.d.ts +1 -6
- package/lib/typescript/commonjs/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketDetailDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/TicketGenieSurface.d.ts +1 -8
- package/lib/typescript/commonjs/project-board/TicketGenieSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/context.d.ts +2 -1
- package/lib/typescript/commonjs/project-board/context.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/index.d.ts +2 -1
- package/lib/typescript/commonjs/project-board/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/index.web.d.ts +2 -1
- package/lib/typescript/commonjs/project-board/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/project-board/types.d.ts +12 -0
- package/lib/typescript/commonjs/project-board/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/ScreenContent.d.ts +14 -0
- package/lib/typescript/commonjs/screen/ScreenContent.d.ts.map +1 -0
- package/lib/typescript/commonjs/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/content.d.ts +6 -0
- package/lib/typescript/commonjs/screen/content.d.ts.map +1 -0
- package/lib/typescript/commonjs/screen/index.d.ts +3 -0
- package/lib/typescript/commonjs/screen/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/index.web.d.ts +3 -0
- package/lib/typescript/commonjs/screen/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/keyboard-components.d.ts +5 -0
- package/lib/typescript/commonjs/screen/keyboard-components.d.ts.map +1 -1
- package/lib/typescript/commonjs/screen/types.d.ts +7 -0
- package/lib/typescript/commonjs/screen/types.d.ts.map +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/AppShellPanels.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/composition.d.ts +52 -0
- package/lib/typescript/module/app-shell/composition.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/context.d.ts +4 -0
- package/lib/typescript/module/app-shell/context.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/hooks/index.d.ts +2 -0
- package/lib/typescript/module/app-shell/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/index.d.ts +5 -0
- package/lib/typescript/module/app-shell/index.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/index.web.d.ts +5 -0
- package/lib/typescript/module/app-shell/index.web.d.ts.map +1 -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 +2 -1
- package/lib/typescript/module/app-shell/panel-layout-types.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/panel-session.d.ts +51 -0
- package/lib/typescript/module/app-shell/panel-session.d.ts.map +1 -0
- package/lib/typescript/module/app-shell/shell-layout-css.d.ts +2 -1
- package/lib/typescript/module/app-shell/shell-layout-css.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +15 -3
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/dialog/DetailDialog.d.ts +5 -0
- package/lib/typescript/module/dialog/DetailDialog.d.ts.map +1 -0
- package/lib/typescript/module/dialog/DetailDialog.web.d.ts +5 -0
- package/lib/typescript/module/dialog/DetailDialog.web.d.ts.map +1 -0
- package/lib/typescript/module/dialog/DetailDialogBase.d.ts +20 -0
- package/lib/typescript/module/dialog/DetailDialogBase.d.ts.map +1 -0
- package/lib/typescript/module/dialog/DetailDialogMotion.d.ts +9 -0
- package/lib/typescript/module/dialog/DetailDialogMotion.d.ts.map +1 -0
- package/lib/typescript/module/dialog/DetailDialogMotion.web.d.ts +7 -0
- package/lib/typescript/module/dialog/DetailDialogMotion.web.d.ts.map +1 -0
- package/lib/typescript/module/dialog/DetailDialogSection.d.ts +6 -0
- package/lib/typescript/module/dialog/DetailDialogSection.d.ts.map +1 -0
- package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
- package/lib/typescript/module/dialog/context.d.ts +2 -0
- package/lib/typescript/module/dialog/context.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.d.ts +3 -1
- package/lib/typescript/module/dialog/index.d.ts.map +1 -1
- package/lib/typescript/module/dialog/index.web.d.ts +3 -1
- package/lib/typescript/module/dialog/index.web.d.ts.map +1 -1
- package/lib/typescript/module/dialog/types.d.ts +37 -0
- package/lib/typescript/module/dialog/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +3 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +3 -3
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/app-shell-region.d.ts +2 -0
- package/lib/typescript/module/layout/app-shell-region.d.ts.map +1 -1
- package/lib/typescript/module/layout/index.d.ts +1 -0
- package/lib/typescript/module/layout/index.d.ts.map +1 -1
- package/lib/typescript/module/layout/index.web.d.ts +1 -0
- package/lib/typescript/module/layout/index.web.d.ts.map +1 -1
- package/lib/typescript/module/layout/safe-area-ownership.d.ts +8 -0
- package/lib/typescript/module/layout/safe-area-ownership.d.ts.map +1 -0
- package/lib/typescript/module/layout/screen-scope.d.ts +3 -1
- package/lib/typescript/module/layout/screen-scope.d.ts.map +1 -1
- package/lib/typescript/module/list/ListMail.d.ts.map +1 -1
- package/lib/typescript/module/page-header/PageHeader.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoard.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoard.web.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoardBase.d.ts.map +1 -1
- package/lib/typescript/module/project-board/ProjectBoardCardContent.d.ts +4 -0
- package/lib/typescript/module/project-board/ProjectBoardCardContent.d.ts.map +1 -0
- package/lib/typescript/module/project-board/TicketCornerGenieSurface.web.d.ts +1 -6
- package/lib/typescript/module/project-board/TicketCornerGenieSurface.web.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketDetailDialog.d.ts.map +1 -1
- package/lib/typescript/module/project-board/TicketGenieSurface.d.ts +1 -8
- package/lib/typescript/module/project-board/TicketGenieSurface.d.ts.map +1 -1
- package/lib/typescript/module/project-board/context.d.ts +2 -1
- package/lib/typescript/module/project-board/context.d.ts.map +1 -1
- package/lib/typescript/module/project-board/index.d.ts +2 -1
- package/lib/typescript/module/project-board/index.d.ts.map +1 -1
- package/lib/typescript/module/project-board/index.web.d.ts +2 -1
- package/lib/typescript/module/project-board/index.web.d.ts.map +1 -1
- package/lib/typescript/module/project-board/types.d.ts +12 -0
- package/lib/typescript/module/project-board/types.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/ScreenContent.d.ts +14 -0
- package/lib/typescript/module/screen/ScreenContent.d.ts.map +1 -0
- package/lib/typescript/module/screen/ScreenScrollViewBase.d.ts.map +1 -1
- package/lib/typescript/module/screen/content.d.ts +6 -0
- package/lib/typescript/module/screen/content.d.ts.map +1 -0
- package/lib/typescript/module/screen/index.d.ts +3 -0
- package/lib/typescript/module/screen/index.d.ts.map +1 -1
- package/lib/typescript/module/screen/index.web.d.ts +3 -0
- package/lib/typescript/module/screen/index.web.d.ts.map +1 -1
- package/lib/typescript/module/screen/keyboard-components.d.ts +5 -0
- package/lib/typescript/module/screen/keyboard-components.d.ts.map +1 -1
- package/lib/typescript/module/screen/types.d.ts +7 -0
- package/lib/typescript/module/screen/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/support/public-part-classifications.json +19 -1
- package/src/app-shell/AppShell.tsx +15 -6
- package/src/app-shell/AppShellEngine.tsx +36 -10
- package/src/app-shell/AppShellPanelLayout.tsx +106 -55
- package/src/app-shell/AppShellPanels.tsx +75 -44
- package/src/app-shell/composition.ts +257 -0
- package/src/app-shell/context.ts +5 -0
- package/src/app-shell/hooks/index.ts +3 -0
- package/src/app-shell/index.ts +16 -0
- package/src/app-shell/index.web.ts +16 -0
- package/src/app-shell/panel-layout-css.ts +7 -3
- package/src/app-shell/panel-layout-types.ts +2 -1
- package/src/app-shell/panel-session.tsx +246 -0
- package/src/app-shell/shell-layout-css.ts +6 -1
- package/src/app-shell/types.ts +15 -3
- package/src/canvas/CanvasPanelBase.tsx +1 -1
- package/src/chat-screen/ChatInfoPanelBase.tsx +1 -1
- package/src/dialog/DetailDialog.tsx +13 -0
- package/src/dialog/DetailDialog.web.tsx +13 -0
- package/src/dialog/DetailDialogBase.tsx +207 -0
- package/src/dialog/DetailDialogMotion.tsx +75 -0
- package/src/dialog/DetailDialogMotion.web.tsx +360 -0
- package/src/dialog/DetailDialogSection.tsx +42 -0
- package/src/dialog/Dialog.tsx +98 -85
- package/src/dialog/context.ts +3 -0
- package/src/dialog/index.ts +5 -0
- package/src/dialog/index.web.ts +5 -0
- package/src/dialog/types.ts +40 -0
- package/src/index.ts +7 -0
- package/src/index.web.ts +7 -0
- package/src/layout/app-shell-region.ts +2 -0
- package/src/layout/index.ts +2 -0
- package/src/layout/index.web.ts +2 -0
- package/src/layout/safe-area-ownership.ts +22 -0
- package/src/layout/screen-scope.tsx +31 -22
- package/src/list/ListMail.tsx +5 -1
- package/src/page-header/PageHeader.tsx +3 -1
- package/src/project-board/ProjectBoard.tsx +2 -0
- package/src/project-board/ProjectBoard.web.tsx +2 -0
- package/src/project-board/ProjectBoardBase.tsx +13 -13
- package/src/project-board/ProjectBoardCardContent.tsx +54 -0
- package/src/project-board/TicketCornerGenieSurface.web.tsx +1 -362
- package/src/project-board/TicketDetailDialog.tsx +311 -426
- package/src/project-board/TicketGenieSurface.tsx +4 -75
- package/src/project-board/TicketTokenChart.tsx +1 -1
- package/src/project-board/context.ts +2 -1
- package/src/project-board/index.ts +2 -0
- package/src/project-board/index.web.ts +2 -0
- package/src/project-board/types.ts +13 -0
- package/src/screen/ScreenBase.tsx +30 -7
- package/src/screen/ScreenContent.tsx +61 -0
- package/src/screen/ScreenScrollViewBase.tsx +80 -1
- package/src/screen/content.ts +26 -0
- package/src/screen/index.ts +4 -0
- package/src/screen/index.web.ts +4 -0
- package/src/screen/keyboard-components.ts +2 -0
- package/src/screen/types.ts +7 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import type { AppShellProps } from './types';
|
|
2
|
+
import type { AppShellPanelDefinition, AppShellPanelLayout } from './panel-layout-types';
|
|
3
|
+
|
|
4
|
+
/** Semantic structure, independent of the material used to present it. */
|
|
5
|
+
export type AppShellLayout =
|
|
6
|
+
| 'workspace'
|
|
7
|
+
| 'collection-detail'
|
|
8
|
+
| 'feed'
|
|
9
|
+
| 'deck'
|
|
10
|
+
| 'catalog'
|
|
11
|
+
| 'map-browser';
|
|
12
|
+
export type AppShellPresentation = 'continuous' | 'framed' | 'floating';
|
|
13
|
+
export type AppShellPanelRole =
|
|
14
|
+
| 'main'
|
|
15
|
+
| 'collection'
|
|
16
|
+
| 'detail'
|
|
17
|
+
| 'inspector'
|
|
18
|
+
| 'context'
|
|
19
|
+
| 'canvas';
|
|
20
|
+
export interface AppShellComposition {
|
|
21
|
+
family?: AppShellLayout;
|
|
22
|
+
presentation?: AppShellPresentation;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const FAMILY = {
|
|
26
|
+
workspace: {
|
|
27
|
+
variant: 'dashboard',
|
|
28
|
+
flow: 'bounded',
|
|
29
|
+
mode: 'split',
|
|
30
|
+
gutter: 12,
|
|
31
|
+
navigationGap: 12,
|
|
32
|
+
},
|
|
33
|
+
'collection-detail': {
|
|
34
|
+
variant: 'dashboard',
|
|
35
|
+
flow: 'bounded',
|
|
36
|
+
mode: 'split',
|
|
37
|
+
gutter: 12,
|
|
38
|
+
navigationGap: 12,
|
|
39
|
+
},
|
|
40
|
+
feed: { variant: 'feed', flow: 'document', mode: 'split', gutter: 8, navigationGap: 0 },
|
|
41
|
+
deck: { variant: 'feed', flow: 'bounded', mode: 'deck', gutter: 8, navigationGap: 0 },
|
|
42
|
+
catalog: { variant: 'feed', flow: 'document', mode: 'split', gutter: 8, navigationGap: 4 },
|
|
43
|
+
'map-browser': {
|
|
44
|
+
variant: 'dashboard',
|
|
45
|
+
flow: 'bounded',
|
|
46
|
+
mode: 'split',
|
|
47
|
+
gutter: 12,
|
|
48
|
+
navigationGap: 12,
|
|
49
|
+
},
|
|
50
|
+
} as const;
|
|
51
|
+
|
|
52
|
+
/** Undefined always defers, including object-spread props from adapters. */
|
|
53
|
+
function explicit<T extends object>(value: T): T {
|
|
54
|
+
return Object.fromEntries(Object.entries(value).filter(([, entry]) => entry !== undefined)) as T;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** One resolution path for root descriptors, route groups and local groups. */
|
|
58
|
+
export function resolvePanelComposition(
|
|
59
|
+
layout: AppShellPanelLayout,
|
|
60
|
+
inherited: AppShellComposition = {},
|
|
61
|
+
): AppShellPanelLayout {
|
|
62
|
+
const family = layout.family ?? inherited.family;
|
|
63
|
+
const presentation = layout.presentation ?? inherited.presentation;
|
|
64
|
+
if (!family && !presentation && !layout.panels.some((panel) => panel.role || panel.group))
|
|
65
|
+
return layout;
|
|
66
|
+
const recipe = family ? FAMILY[family] : undefined;
|
|
67
|
+
const panels = layout.panels.map((panel): AppShellPanelDefinition => {
|
|
68
|
+
const role = panel.role;
|
|
69
|
+
const defaults: Partial<AppShellPanelDefinition> =
|
|
70
|
+
role === 'collection'
|
|
71
|
+
? { width: 380, minWidth: 320, maxWidth: 480, resizable: true }
|
|
72
|
+
: role === 'inspector'
|
|
73
|
+
? { width: 320, minWidth: 280, maxWidth: 420 }
|
|
74
|
+
: role === 'context'
|
|
75
|
+
? { width: 320, minWidth: 240, hideBelow: 'xl' }
|
|
76
|
+
: role === 'canvas'
|
|
77
|
+
? { minWidth: 380, span: 1 }
|
|
78
|
+
: role === 'main' || role === 'detail'
|
|
79
|
+
? { minWidth: 320, span: 1 }
|
|
80
|
+
: {};
|
|
81
|
+
if (panel.span !== undefined) {
|
|
82
|
+
delete defaults.width;
|
|
83
|
+
delete defaults.maxWidth;
|
|
84
|
+
}
|
|
85
|
+
if (layout.axis === 'vertical') {
|
|
86
|
+
delete defaults.width;
|
|
87
|
+
delete defaults.minWidth;
|
|
88
|
+
delete defaults.maxWidth;
|
|
89
|
+
}
|
|
90
|
+
if (role === 'inspector' && panel.open !== undefined) {
|
|
91
|
+
if (!panel.onOpenChange || !panel.label) {
|
|
92
|
+
throw new Error(
|
|
93
|
+
'Bloom inspector: controlled open requires onOpenChange and an accessible label.',
|
|
94
|
+
);
|
|
95
|
+
}
|
|
96
|
+
if (panel.visible !== undefined && panel.visible !== panel.open) {
|
|
97
|
+
throw new Error(
|
|
98
|
+
'Bloom inspector: open and visible must agree; prefer open as the visibility owner.',
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
defaults.visible = panel.open;
|
|
102
|
+
defaults.floating = {
|
|
103
|
+
below: 'lg',
|
|
104
|
+
whenConstrained: true,
|
|
105
|
+
placement: 'end',
|
|
106
|
+
label: panel.label,
|
|
107
|
+
...explicit(panel.floating ?? {}),
|
|
108
|
+
open: panel.open,
|
|
109
|
+
onOpenChange: panel.onOpenChange,
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
...defaults,
|
|
114
|
+
...explicit(panel),
|
|
115
|
+
...(role === 'inspector' && panel.open !== undefined
|
|
116
|
+
? { visible: panel.open, floating: defaults.floating }
|
|
117
|
+
: {}),
|
|
118
|
+
...(panel.group
|
|
119
|
+
? { group: resolvePanelComposition(panel.group, { family, presentation }) }
|
|
120
|
+
: {}),
|
|
121
|
+
};
|
|
122
|
+
});
|
|
123
|
+
if (presentation === 'continuous' && layout.appearance === 'separated') {
|
|
124
|
+
throw new Error(
|
|
125
|
+
'Bloom continuous composition cannot use separated surfaces. Use joined/plain, or a local framed presentation.',
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
return {
|
|
129
|
+
mode: recipe?.mode ?? 'split',
|
|
130
|
+
flow: recipe?.flow ?? 'bounded',
|
|
131
|
+
...(family === 'collection-detail' ? { collapseBelow: 'lg' as const } : {}),
|
|
132
|
+
appearance: presentation === 'continuous' ? 'joined' : 'separated',
|
|
133
|
+
...explicit(layout),
|
|
134
|
+
family,
|
|
135
|
+
presentation,
|
|
136
|
+
panels,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/** Legacy props are accepted at this boundary and resolved once, before any renderer runs. */
|
|
141
|
+
export function resolveAppShellComposition(props: AppShellProps): AppShellProps {
|
|
142
|
+
if (!props.layout && !props.presentation) {
|
|
143
|
+
if (!props.panelLayout) return props;
|
|
144
|
+
const panelLayout = resolvePanelComposition(props.panelLayout);
|
|
145
|
+
return panelLayout === props.panelLayout ? props : { ...props, panelLayout };
|
|
146
|
+
}
|
|
147
|
+
const family = props.layout ?? 'workspace';
|
|
148
|
+
const presentation = props.presentation ?? 'framed';
|
|
149
|
+
const recipe = FAMILY[family];
|
|
150
|
+
if (presentation === 'continuous') {
|
|
151
|
+
if (
|
|
152
|
+
(props.gutter !== undefined && props.gutter !== 0) ||
|
|
153
|
+
(props.navigationGap !== undefined && props.navigationGap !== 0) ||
|
|
154
|
+
props.framedFrom !== undefined ||
|
|
155
|
+
props.variant === 'canvas' ||
|
|
156
|
+
props.sidebar?.surface === 'card' ||
|
|
157
|
+
Object.values(props.frameInset ?? {}).some((value) => value !== undefined && value !== 0)
|
|
158
|
+
) {
|
|
159
|
+
throw new Error(
|
|
160
|
+
'Bloom continuous composition owns its zero outer frame. Remove nonzero gutter/navigationGap/frameInset, framedFrom, card sidebar or canvas variant overrides, or select framed presentation.',
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
const continuous = presentation === 'continuous';
|
|
165
|
+
const result: AppShellProps = {
|
|
166
|
+
variant: recipe.variant,
|
|
167
|
+
safeArea: true,
|
|
168
|
+
panels: true,
|
|
169
|
+
scroll: recipe.flow === 'document' || family === 'deck' ? 'page' : 'fixed',
|
|
170
|
+
navFrom: 'md',
|
|
171
|
+
navigationAlign: recipe.variant === 'feed' ? 'content' : 'edge',
|
|
172
|
+
contentMaxWidth: recipe.variant === 'dashboard' ? 'none' : undefined,
|
|
173
|
+
gutter: continuous ? 0 : recipe.gutter,
|
|
174
|
+
navigationGap: continuous ? 0 : recipe.navigationGap,
|
|
175
|
+
...explicit(props),
|
|
176
|
+
layout: family,
|
|
177
|
+
presentation,
|
|
178
|
+
sidebar: props.sidebar
|
|
179
|
+
? {
|
|
180
|
+
surface: continuous
|
|
181
|
+
? 'docked'
|
|
182
|
+
: presentation === 'floating'
|
|
183
|
+
? 'card'
|
|
184
|
+
: recipe.variant === 'feed'
|
|
185
|
+
? 'plain'
|
|
186
|
+
: 'docked',
|
|
187
|
+
...explicit(props.sidebar),
|
|
188
|
+
}
|
|
189
|
+
: undefined,
|
|
190
|
+
};
|
|
191
|
+
if (props.panelLayout)
|
|
192
|
+
result.panelLayout = resolvePanelComposition(props.panelLayout, { family, presentation });
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/** Declarative diagnostics. Actual measured visibility is exposed by useAppShellPanel. */
|
|
197
|
+
export function explainAppShellComposition(props: AppShellProps) {
|
|
198
|
+
const resolved = resolveAppShellComposition(props);
|
|
199
|
+
return {
|
|
200
|
+
phase: 'declaration' as const,
|
|
201
|
+
measured: false as const,
|
|
202
|
+
precedence: [
|
|
203
|
+
'explicit defined value',
|
|
204
|
+
'presentation constraint',
|
|
205
|
+
'role/family default',
|
|
206
|
+
'legacy default',
|
|
207
|
+
],
|
|
208
|
+
family: resolved.layout ?? 'legacy',
|
|
209
|
+
presentation: resolved.presentation ?? 'legacy',
|
|
210
|
+
frame: {
|
|
211
|
+
gutter: resolved.gutter,
|
|
212
|
+
navigationGap: resolved.navigationGap,
|
|
213
|
+
sources: {
|
|
214
|
+
gutter:
|
|
215
|
+
props.gutter !== undefined
|
|
216
|
+
? 'explicit'
|
|
217
|
+
: resolved.presentation === 'continuous'
|
|
218
|
+
? 'presentation'
|
|
219
|
+
: resolved.layout
|
|
220
|
+
? 'family'
|
|
221
|
+
: 'legacy',
|
|
222
|
+
navigationGap:
|
|
223
|
+
props.navigationGap !== undefined
|
|
224
|
+
? 'explicit'
|
|
225
|
+
: resolved.presentation === 'continuous'
|
|
226
|
+
? 'presentation'
|
|
227
|
+
: resolved.layout
|
|
228
|
+
? 'family'
|
|
229
|
+
: 'legacy',
|
|
230
|
+
},
|
|
231
|
+
source:
|
|
232
|
+
resolved.presentation === 'continuous'
|
|
233
|
+
? 'presentation'
|
|
234
|
+
: props.gutter !== undefined
|
|
235
|
+
? 'explicit'
|
|
236
|
+
: resolved.layout
|
|
237
|
+
? 'family'
|
|
238
|
+
: 'legacy',
|
|
239
|
+
},
|
|
240
|
+
owners: { frame: 'AppShell', surfaces: 'panel group', scroll: 'Screen', state: 'application' },
|
|
241
|
+
panels:
|
|
242
|
+
resolved.panelLayout?.panels.map((panel) => ({
|
|
243
|
+
id: panel.id,
|
|
244
|
+
role: panel.role ?? 'custom',
|
|
245
|
+
minWidth: panel.minWidth,
|
|
246
|
+
visible: panel.visible ?? true,
|
|
247
|
+
ownership: { identity: panel.id, navigation: 'panel', contentState: 'application' },
|
|
248
|
+
reason: panel.floating
|
|
249
|
+
? 'floating is eligible below its declared threshold; whenConstrained also responds to available group capacity'
|
|
250
|
+
: 'the existing panel solver compares available group capacity with declared minimum sizes',
|
|
251
|
+
adaptation: panel.floating
|
|
252
|
+
? 'sheet below threshold or when constrained'
|
|
253
|
+
: 'active panel when constrained',
|
|
254
|
+
threshold: panel.floating?.below ?? resolved.panelLayout?.collapseBelow,
|
|
255
|
+
})) ?? [],
|
|
256
|
+
};
|
|
257
|
+
}
|
package/src/app-shell/context.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppShellComposition } from './composition';
|
|
1
2
|
/**
|
|
2
3
|
* What `AppShell` tells the page inside it about its navigation drawer, so a
|
|
3
4
|
* page without a `title` — or with its own `header` — can still open it.
|
|
@@ -156,3 +157,7 @@ export function usePanelScrollContainer<T = unknown>(): RefObject<T | null> | nu
|
|
|
156
157
|
*/
|
|
157
158
|
export const ShellColorClaimContext = createContext<ColorClaim | null>(null);
|
|
158
159
|
ShellColorClaimContext.displayName = 'BloomShellColorClaimContext';
|
|
160
|
+
|
|
161
|
+
/** Semantic defaults are scoped to a shell or an intentionally local group. */
|
|
162
|
+
export const AppShellCompositionContext = createContext<AppShellComposition>({});
|
|
163
|
+
export const useAppShellComposition = () => useContext(AppShellCompositionContext);
|
|
@@ -7,3 +7,6 @@ export {
|
|
|
7
7
|
} from '../context';
|
|
8
8
|
export type { AppShellContextValue, AppShellPanelValue } from '../context';
|
|
9
9
|
export { usePanelNavigation, useOptionalPanelNavigation } from '../PanelNavigation';
|
|
10
|
+
|
|
11
|
+
export { usePanelSessionState, usePanelSessionFocus } from '../panel-session';
|
|
12
|
+
export type { PanelSessionFocusTarget } from '../panel-session';
|
package/src/app-shell/index.ts
CHANGED
|
@@ -90,3 +90,19 @@ export type {
|
|
|
90
90
|
NotificationBellProps,
|
|
91
91
|
ProOfferCardProps,
|
|
92
92
|
} from './types';
|
|
93
|
+
|
|
94
|
+
export {
|
|
95
|
+
resolveAppShellComposition,
|
|
96
|
+
resolvePanelComposition,
|
|
97
|
+
explainAppShellComposition,
|
|
98
|
+
} from './composition';
|
|
99
|
+
export { useAppShellComposition } from './context';
|
|
100
|
+
export type {
|
|
101
|
+
AppShellLayout,
|
|
102
|
+
AppShellPresentation,
|
|
103
|
+
AppShellPanelRole,
|
|
104
|
+
AppShellComposition,
|
|
105
|
+
} from './composition';
|
|
106
|
+
|
|
107
|
+
export { usePanelSessionState, usePanelSessionFocus } from './panel-session';
|
|
108
|
+
export type { PanelSessionFocusTarget } from './panel-session';
|
|
@@ -95,3 +95,19 @@ export type {
|
|
|
95
95
|
NotificationBellProps,
|
|
96
96
|
ProOfferCardProps,
|
|
97
97
|
} from './types';
|
|
98
|
+
|
|
99
|
+
export {
|
|
100
|
+
resolveAppShellComposition,
|
|
101
|
+
resolvePanelComposition,
|
|
102
|
+
explainAppShellComposition,
|
|
103
|
+
} from './composition';
|
|
104
|
+
export { useAppShellComposition } from './context';
|
|
105
|
+
export type {
|
|
106
|
+
AppShellLayout,
|
|
107
|
+
AppShellPresentation,
|
|
108
|
+
AppShellPanelRole,
|
|
109
|
+
AppShellComposition,
|
|
110
|
+
} from './composition';
|
|
111
|
+
|
|
112
|
+
export { usePanelSessionState, usePanelSessionFocus } from './panel-session';
|
|
113
|
+
export type { PanelSessionFocusTarget } from './panel-session';
|
|
@@ -120,8 +120,12 @@ ${group}[data-bloom-panel-resizing="vertical"]{cursor:row-resize}
|
|
|
120
120
|
);
|
|
121
121
|
const envelope = deck ? '100%' : `${panelEnvelope(layout, lower, gap)}px`;
|
|
122
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`;
|
|
123
|
+
// The same CSS owner that positions tracks also paints their joined seam.
|
|
124
|
+
// CSS_TRACK deliberately contains no measured geometry; React must not gate
|
|
125
|
+
// this decoration on its placeholder gap, which stays zero on the web.
|
|
126
|
+
rules += `${group} [data-bloom-panel-owner="${scope}"] > [data-bloom-panel-separator="${scope}"]{inset-block-start:${vertical ? 'calc(-1 * var(--bloom-panel-gap, 0px))' : '0'};inset-block-end:${vertical ? 'auto' : '0'};inset-inline-start:${vertical ? '0' : 'calc(-1 * var(--bloom-panel-gap, 0px))'};inset-inline-end:${vertical ? '0' : 'auto'};inline-size:${vertical ? 'auto' : 'var(--bloom-panel-gap, 0px)'};block-size:${vertical ? 'var(--bloom-panel-gap, 0px)' : 'auto'}}\n`;
|
|
123
127
|
const hidden = (index: number) =>
|
|
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`;
|
|
128
|
+
`${item(index)}{--bloom-panel-visible:0;--bloom-panel-gap:0px;--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`;
|
|
125
129
|
for (let index = 0; index < layout.panels.length; index++) {
|
|
126
130
|
const p = layout.panels[index]!;
|
|
127
131
|
rules += `${item(index)}{--bloom-panel-floating:${p.floating && lower < breakpointPx(p.floating.below) ? 1 : 0}}\n`;
|
|
@@ -164,7 +168,7 @@ ${group}[data-bloom-panel-resizing="vertical"]{cursor:row-resize}
|
|
|
164
168
|
: flexible && dim !== undefined
|
|
165
169
|
? 0
|
|
166
170
|
: (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`;
|
|
171
|
+
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-panel-gap:${position > 0 ? gap : 0}px;--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`;
|
|
168
172
|
const entering = item(index).replace(
|
|
169
173
|
group,
|
|
170
174
|
`${group}[data-bloom-panel-ready]:not([data-bloom-panel-ordering])`,
|
|
@@ -225,7 +229,7 @@ ${row}{width:100%!important;min-width:0!important}
|
|
|
225
229
|
layout.panels.forEach((p, index) => {
|
|
226
230
|
rules +=
|
|
227
231
|
p.id === active?.id
|
|
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}`
|
|
232
|
+
? `${item(index)}{--bloom-panel-alone-display:flex;--bloom-panel-multiple-display:none;--bloom-panel-visible:1;--bloom-panel-gap:0px;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}`
|
|
229
233
|
: hidden(index) +
|
|
230
234
|
(p.floating?.whenConstrained ? `${item(index)}{--bloom-panel-floating:1}` : '');
|
|
231
235
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppShellComposition } from './composition';
|
|
1
2
|
import type { ScrollRestorationPersistence } from '../scroll/types';
|
|
2
3
|
import type { ReactNode, Ref } from 'react';
|
|
3
4
|
import type { Breakpoint } from '../styles/breakpoints';
|
|
@@ -96,7 +97,7 @@ export interface AppShellPanelViewport {
|
|
|
96
97
|
scrollBy(offset: { x?: number; y?: number }): void;
|
|
97
98
|
reveal(id: string): void;
|
|
98
99
|
}
|
|
99
|
-
export interface AppShellPanelLayout {
|
|
100
|
+
export interface AppShellPanelLayout extends AppShellComposition {
|
|
100
101
|
panels: readonly AppShellPanelDefinition[];
|
|
101
102
|
/** Chrome spanning the complete workspace. The group's Screen reserves it once.
|
|
102
103
|
* In joined layouts it shares the group's one Surface. Use null to temporarily
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createContext,
|
|
3
|
+
useCallback,
|
|
4
|
+
useContext,
|
|
5
|
+
useLayoutEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
useSyncExternalStore,
|
|
8
|
+
type Dispatch,
|
|
9
|
+
type ReactNode,
|
|
10
|
+
type RefCallback,
|
|
11
|
+
type SetStateAction,
|
|
12
|
+
} from 'react';
|
|
13
|
+
import { Platform, TextInput } from 'react-native';
|
|
14
|
+
|
|
15
|
+
type Presentation = 'inline' | 'floating';
|
|
16
|
+
type Selection = { start: number; end: number };
|
|
17
|
+
|
|
18
|
+
/** A text input handle on React Native or the web. */
|
|
19
|
+
export interface PanelSessionFocusTarget {
|
|
20
|
+
focus(): void;
|
|
21
|
+
isFocused?(): boolean;
|
|
22
|
+
/** React Native TextInput command; applies the current native event count. */
|
|
23
|
+
setSelection?(start: number, end: number): void;
|
|
24
|
+
setNativeProps?(props: { selection: Selection }): void;
|
|
25
|
+
setSelectionRange?(start: number, end: number): void;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** Internal, scoped to one descriptor ID for the lifetime of its panel owner. */
|
|
29
|
+
class PanelSession {
|
|
30
|
+
values = new Map<string, unknown>();
|
|
31
|
+
listeners = new Set<() => void>();
|
|
32
|
+
presentation: Presentation = 'inline';
|
|
33
|
+
active = true;
|
|
34
|
+
readPresentation?: () => Presentation;
|
|
35
|
+
focus: {
|
|
36
|
+
key: string;
|
|
37
|
+
presentation: Presentation;
|
|
38
|
+
target: PanelSessionFocusTarget | null;
|
|
39
|
+
selection?: Selection;
|
|
40
|
+
} | null = null;
|
|
41
|
+
subscribe = (listener: () => void) => {
|
|
42
|
+
this.listeners.add(listener);
|
|
43
|
+
return () => this.listeners.delete(listener);
|
|
44
|
+
};
|
|
45
|
+
read<T>(key: string, initial: T | (() => T)): T {
|
|
46
|
+
if (!this.values.has(key)) {
|
|
47
|
+
this.values.set(key, typeof initial === 'function' ? (initial as () => T)() : initial);
|
|
48
|
+
}
|
|
49
|
+
return this.values.get(key) as T;
|
|
50
|
+
}
|
|
51
|
+
write<T>(key: string, action: SetStateAction<T>, initial: T | (() => T)) {
|
|
52
|
+
const previous = this.read(key, initial);
|
|
53
|
+
const next = typeof action === 'function' ? (action as (value: T) => T)(previous) : action;
|
|
54
|
+
if (Object.is(previous, next)) return;
|
|
55
|
+
this.values.set(key, next);
|
|
56
|
+
for (const listener of this.listeners) listener();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const PanelSessionContext = createContext<PanelSession | null>(null);
|
|
61
|
+
|
|
62
|
+
/** Internal: sits above BOTH inline and modal presentation branches. */
|
|
63
|
+
export function PanelSessionProvider({
|
|
64
|
+
presentation,
|
|
65
|
+
active,
|
|
66
|
+
readPresentation,
|
|
67
|
+
children,
|
|
68
|
+
}: {
|
|
69
|
+
presentation: Presentation;
|
|
70
|
+
active: boolean;
|
|
71
|
+
readPresentation?: () => Presentation;
|
|
72
|
+
children: ReactNode;
|
|
73
|
+
}) {
|
|
74
|
+
const session = useRef<PanelSession | null>(null);
|
|
75
|
+
if (!session.current) session.current = new PanelSession();
|
|
76
|
+
session.current.presentation = presentation;
|
|
77
|
+
session.current.active = active;
|
|
78
|
+
session.current.readPresentation = readPresentation;
|
|
79
|
+
// Closing must never leave a pending focus request for a later reopen.
|
|
80
|
+
if (!active) session.current.focus = null;
|
|
81
|
+
return (
|
|
82
|
+
<PanelSessionContext.Provider value={session.current}>{children}</PanelSessionContext.Provider>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function useSession() {
|
|
87
|
+
const parent = useContext(PanelSessionContext);
|
|
88
|
+
const local = useRef<PanelSession | null>(null);
|
|
89
|
+
if (!local.current) local.current = new PanelSession();
|
|
90
|
+
return parent ?? local.current;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* State registered with the enclosing panel, retained across inline/sheet
|
|
95
|
+
* remounts and hidden/closed presentations. Use a unique domain key (for example
|
|
96
|
+
* `comment:${id}:draft`). Removing the panel/route destroys its session. Outside
|
|
97
|
+
* a descriptor panel this behaves as component-local state. This does not retain
|
|
98
|
+
* arbitrary React state, native views, media instances or network persistence.
|
|
99
|
+
*/
|
|
100
|
+
export function usePanelSessionState<T>(
|
|
101
|
+
key: string,
|
|
102
|
+
initial: T | (() => T),
|
|
103
|
+
): [T, Dispatch<SetStateAction<T>>] {
|
|
104
|
+
const session = useSession();
|
|
105
|
+
const initialRef = useRef(initial);
|
|
106
|
+
initialRef.current = initial;
|
|
107
|
+
const snapshot = useCallback(() => session.read(key, initialRef.current), [session, key]);
|
|
108
|
+
const value = useSyncExternalStore(session.subscribe, snapshot, snapshot);
|
|
109
|
+
const setValue = useCallback(
|
|
110
|
+
(action: SetStateAction<T>) => session.write(key, action, initialRef.current),
|
|
111
|
+
[session, key],
|
|
112
|
+
);
|
|
113
|
+
return [value, setValue];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Register a text input's focus and selection with its panel. Attach `ref`,
|
|
118
|
+
* `onFocus`, `onBlur`, `onSelectionChange`; compose existing handlers normally.
|
|
119
|
+
* A presentation change restores the focused input after the new dialog has
|
|
120
|
+
* mounted. User blur/close never requests focus. Input value belongs in
|
|
121
|
+
* usePanelSessionState; focus is restoration, not native view retention.
|
|
122
|
+
*/
|
|
123
|
+
export function usePanelSessionFocus<T extends PanelSessionFocusTarget>(key: string) {
|
|
124
|
+
const session = useSession();
|
|
125
|
+
const presentation = session.presentation;
|
|
126
|
+
const target = useRef<T | null>(null);
|
|
127
|
+
const selection = useRef<Selection | undefined>(undefined);
|
|
128
|
+
const ref: RefCallback<T> = useCallback((node: T | null) => {
|
|
129
|
+
target.current = node;
|
|
130
|
+
}, []);
|
|
131
|
+
const restoreSelection = useCallback(
|
|
132
|
+
(pending: NonNullable<PanelSession['focus']>) => {
|
|
133
|
+
if (!session.active || session.focus !== pending || !target.current) return;
|
|
134
|
+
if (pending.selection) {
|
|
135
|
+
selection.current = pending.selection;
|
|
136
|
+
const { start, end } = pending.selection;
|
|
137
|
+
if (target.current.setSelection) target.current.setSelection(start, end);
|
|
138
|
+
else if (target.current.setSelectionRange) target.current.setSelectionRange(start, end);
|
|
139
|
+
else target.current.setNativeProps?.({ selection: pending.selection });
|
|
140
|
+
}
|
|
141
|
+
session.focus = { ...pending, presentation, target: target.current };
|
|
142
|
+
},
|
|
143
|
+
[session, presentation],
|
|
144
|
+
);
|
|
145
|
+
const onFocus = useCallback(() => {
|
|
146
|
+
if (!session.active || session.presentation !== presentation) return;
|
|
147
|
+
const pending = session.focus;
|
|
148
|
+
// An imperatively opened Dialog can autofocus its first field before the
|
|
149
|
+
// session's restoration frame. Keep that transfer's snapshot intact until
|
|
150
|
+
// the frame restores selection. A user pointer/key already cancels it.
|
|
151
|
+
if (pending?.key === key && pending.presentation !== presentation) {
|
|
152
|
+
// Native focus is asynchronous and can initialize the caret AFTER focus()
|
|
153
|
+
// returns. Send the selection command only after its focus event arrives.
|
|
154
|
+
if (Platform.OS !== 'web') restoreSelection(pending);
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
157
|
+
session.focus = { key, presentation, target: target.current, selection: selection.current };
|
|
158
|
+
}, [session, key, presentation, restoreSelection]);
|
|
159
|
+
const onBlur = useCallback(() => {
|
|
160
|
+
// CSS resolves responsive presentation before ResizeObserver commits React
|
|
161
|
+
// state. Read that same owner rather than clearing a transfer on early blur.
|
|
162
|
+
const currentPresentation = session.readPresentation?.() ?? session.presentation;
|
|
163
|
+
if (currentPresentation === presentation && session.focus?.key === key) session.focus = null;
|
|
164
|
+
}, [session, key, presentation]);
|
|
165
|
+
useLayoutEffect(() => {
|
|
166
|
+
if (Platform.OS !== 'web' || typeof document === 'undefined') return;
|
|
167
|
+
const cancelForUserChoice = (event: Event) => {
|
|
168
|
+
if (session.focus?.key !== key) return;
|
|
169
|
+
const keyboard = event as KeyboardEvent;
|
|
170
|
+
if (
|
|
171
|
+
event.target !== target.current ||
|
|
172
|
+
keyboard.key === 'Tab' ||
|
|
173
|
+
keyboard.key === 'Escape' ||
|
|
174
|
+
session.focus.presentation !== presentation
|
|
175
|
+
) {
|
|
176
|
+
session.focus = null;
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
document.addEventListener('pointerdown', cancelForUserChoice, true);
|
|
180
|
+
document.addEventListener('keydown', cancelForUserChoice, true);
|
|
181
|
+
return () => {
|
|
182
|
+
document.removeEventListener('pointerdown', cancelForUserChoice, true);
|
|
183
|
+
document.removeEventListener('keydown', cancelForUserChoice, true);
|
|
184
|
+
};
|
|
185
|
+
}, [session, key, presentation]);
|
|
186
|
+
const onSelectionChange = useCallback(
|
|
187
|
+
(event: { nativeEvent: { selection: Selection } }) => {
|
|
188
|
+
selection.current = event.nativeEvent.selection;
|
|
189
|
+
if (
|
|
190
|
+
session.focus?.key === key &&
|
|
191
|
+
session.focus.presentation === presentation &&
|
|
192
|
+
session.presentation === presentation &&
|
|
193
|
+
session.focus.target === target.current
|
|
194
|
+
) {
|
|
195
|
+
session.focus.selection = selection.current;
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
[session, key, presentation],
|
|
199
|
+
);
|
|
200
|
+
useLayoutEffect(() => {
|
|
201
|
+
const focused = session.focus;
|
|
202
|
+
if (!session.active || focused?.key !== key || focused.presentation === presentation) return;
|
|
203
|
+
// Dialog's own focus boundary mounts first; restore on the next frame so it
|
|
204
|
+
// does not replace the previously focused editor with the first button.
|
|
205
|
+
const cancelForInteraction = () => {
|
|
206
|
+
if (session.focus === focused) session.focus = null;
|
|
207
|
+
};
|
|
208
|
+
if (Platform.OS === 'web' && typeof document !== 'undefined') {
|
|
209
|
+
document.addEventListener('pointerdown', cancelForInteraction, true);
|
|
210
|
+
document.addEventListener('keydown', cancelForInteraction, true);
|
|
211
|
+
}
|
|
212
|
+
const frame = requestAnimationFrame(() => {
|
|
213
|
+
if (!session.active || session.focus !== focused || !target.current) return;
|
|
214
|
+
const current: unknown =
|
|
215
|
+
Platform.OS === 'web'
|
|
216
|
+
? typeof document === 'undefined'
|
|
217
|
+
? null
|
|
218
|
+
: document.activeElement
|
|
219
|
+
: TextInput.State.currentlyFocusedInput();
|
|
220
|
+
const empty =
|
|
221
|
+
current == null || (typeof document !== 'undefined' && current === document.body);
|
|
222
|
+
// Never take focus back after the user or another surface chose a new
|
|
223
|
+
// destination during adaptation. The previous host may already detach.
|
|
224
|
+
if (!empty && current !== focused.target && current !== target.current) {
|
|
225
|
+
session.focus = null;
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (Platform.OS !== 'web') {
|
|
229
|
+
// TextInput.State/isFocused can change before the native event too.
|
|
230
|
+
// Even an autofocused host must confirm focus through onFocus.
|
|
231
|
+
target.current.focus();
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
target.current.focus();
|
|
235
|
+
restoreSelection(focused);
|
|
236
|
+
});
|
|
237
|
+
return () => {
|
|
238
|
+
cancelAnimationFrame(frame);
|
|
239
|
+
if (Platform.OS === 'web' && typeof document !== 'undefined') {
|
|
240
|
+
document.removeEventListener('pointerdown', cancelForInteraction, true);
|
|
241
|
+
document.removeEventListener('keydown', cancelForInteraction, true);
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}, [session, key, presentation, restoreSelection]);
|
|
245
|
+
return { ref, onFocus, onBlur, onSelectionChange };
|
|
246
|
+
}
|
|
@@ -15,6 +15,7 @@ type Options = Pick<
|
|
|
15
15
|
| 'navFrom'
|
|
16
16
|
| 'navExpandedFrom'
|
|
17
17
|
| 'framedFrom'
|
|
18
|
+
| 'presentation'
|
|
18
19
|
| 'panels'
|
|
19
20
|
| 'variant'
|
|
20
21
|
| 'navigationAlign'
|
|
@@ -40,6 +41,7 @@ export interface CssShellState {
|
|
|
40
41
|
capacityCollapsed: boolean;
|
|
41
42
|
framed: boolean;
|
|
42
43
|
small: boolean;
|
|
44
|
+
compact: boolean;
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
/** Descriptor compilation only: container queries resolve the live shell width. */
|
|
@@ -98,6 +100,7 @@ ${root} [data-bloom-dock-moving] :is([data-bloom-shell-nav="${scope}"],[data-blo
|
|
|
98
100
|
: 'rail'
|
|
99
101
|
: (sidebar?.variant ?? 'panel');
|
|
100
102
|
const framed =
|
|
103
|
+
options.presentation !== 'continuous' &&
|
|
101
104
|
!!options.panels &&
|
|
102
105
|
options.variant !== 'canvas' &&
|
|
103
106
|
(options.framedFrom !== undefined
|
|
@@ -163,7 +166,7 @@ ${root} [data-bloom-dock-moving] :is([data-bloom-shell-nav="${scope}"],[data-blo
|
|
|
163
166
|
? `max(var(--bloom-frame-start), calc((100cqw - var(--bloom-nav-width) - var(--bloom-nav-gap) - ${alignmentEnvelope} - var(--bloom-frame-end) + var(--bloom-frame-start)) / 2))`
|
|
164
167
|
: 'var(--bloom-frame-start)';
|
|
165
168
|
const state = (collapsed: boolean, capacity: boolean) =>
|
|
166
|
-
`${frame}{--bloom-nav-mode:${mode};--bloom-nav-collapsed:${collapsed ? 1 : 0};--bloom-nav-capacity:${capacity ? 1 : 0};--bloom-framed:${framed ? 1 : 0};--bloom-small:${width >= BREAKPOINTS.sm ? 1 : 0};--bloom-drawer-trigger-display:${hasNav && !inFlow ? 'flex' : 'none'};--bloom-nav-display:${inFlow ? 'flex' : 'none'};--bloom-panel-nav-display:${mode === 'panel' ? 'flex' : 'none'};--bloom-rail-nav-display:${mode === 'rail' ? 'flex' : 'none'};${navGeometry(collapsed)}--bloom-frame-top:${flush ? 0 : edge('top')}px;--bloom-frame-bottom:${flush ? 0 : edge('bottom')}px;--bloom-frame-start:${flush ? 0 : edge('start')}px;--bloom-frame-end:${edge('end')}px;--bloom-body-gutter-top:${flush ? edge('top') : 0}px;--bloom-body-gutter-bottom:${flush ? edge('bottom') : 0}px; --bloom-frame-alignment:${alignment};justify-content:flex-start!important}`;
|
|
169
|
+
`${frame}{--bloom-nav-mode:${mode};--bloom-nav-collapsed:${collapsed ? 1 : 0};--bloom-nav-capacity:${capacity ? 1 : 0};--bloom-framed:${framed ? 1 : 0};--bloom-small:${width >= BREAKPOINTS.sm ? 1 : 0};--bloom-compact:${(hasNav ? !inFlow : width < BREAKPOINTS.md) ? 1 : 0};--bloom-drawer-trigger-display:${hasNav && !inFlow ? 'flex' : 'none'};--bloom-nav-display:${inFlow ? 'flex' : 'none'};--bloom-panel-nav-display:${mode === 'panel' ? 'flex' : 'none'};--bloom-rail-nav-display:${mode === 'rail' ? 'flex' : 'none'};${navGeometry(collapsed)}--bloom-frame-top:${flush ? 0 : edge('top')}px;--bloom-frame-bottom:${flush ? 0 : edge('bottom')}px;--bloom-frame-start:${flush ? 0 : edge('start')}px;--bloom-frame-end:${edge('end')}px;--bloom-body-gutter-top:${flush ? edge('top') : 0}px;--bloom-body-gutter-bottom:${flush ? edge('bottom') : 0}px; --bloom-frame-alignment:${alignment};justify-content:flex-start!important}`;
|
|
167
170
|
const query = `(min-width:${width}px)${upper === undefined ? '' : ` and (width < ${upper}px)`}`;
|
|
168
171
|
let rules = state(baseCollapsed, false);
|
|
169
172
|
rules += `${root} [data-bloom-shell-bar="${scope}"][data-bloom-shell-bar-visibility="compact"]{display:${inFlow ? 'none' : 'flex'}!important}\n`;
|
|
@@ -194,6 +197,7 @@ export function useCssShellLayout(
|
|
|
194
197
|
capacityCollapsed: false,
|
|
195
198
|
framed: true,
|
|
196
199
|
small: true,
|
|
200
|
+
compact: false,
|
|
197
201
|
});
|
|
198
202
|
const css = useMemo(() => (scope ? shellLayoutCss(scope, options) : ''), [scope, options]);
|
|
199
203
|
useLayoutEffect(() => {
|
|
@@ -213,6 +217,7 @@ export function useCssShellLayout(
|
|
|
213
217
|
capacityCollapsed: value('--bloom-nav-capacity') === '1',
|
|
214
218
|
framed: value('--bloom-framed') === '1',
|
|
215
219
|
small: value('--bloom-small') === '1',
|
|
220
|
+
compact: value('--bloom-compact') === '1',
|
|
216
221
|
};
|
|
217
222
|
setState((previous) => (JSON.stringify(previous) === JSON.stringify(next) ? previous : next));
|
|
218
223
|
};
|