@oxy.so/bloom 22.0.1 → 22.1.1
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 +13 -13
- 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/list.mdx +6 -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/swipe-row.mdx +30 -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/list/ListPerson.js +6 -9
- package/lib/commonjs/list/ListPerson.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/commonjs/swipe-row/SwipeRow.js +6 -1
- package/lib/commonjs/swipe-row/SwipeRow.js.map +1 -1
- package/lib/commonjs/swipe-row/SwipeRowBubble.js +7 -8
- package/lib/commonjs/swipe-row/SwipeRowBubble.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/list/ListPerson.js +7 -10
- package/lib/module/list/ListPerson.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/module/swipe-row/SwipeRow.js +6 -1
- package/lib/module/swipe-row/SwipeRow.js.map +1 -1
- package/lib/module/swipe-row/SwipeRowBubble.js +8 -9
- package/lib/module/swipe-row/SwipeRowBubble.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/list/ListPerson.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/commonjs/swipe-row/SwipeRowBubble.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/list/ListPerson.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/lib/typescript/module/swipe-row/SwipeRowBubble.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/list/ListPerson.tsx +12 -7
- 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
- package/src/swipe-row/SwipeRow.tsx +5 -4
- package/src/swipe-row/SwipeRowBubble.tsx +12 -8
package/src/app-shell/types.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AppShellLayout, AppShellPresentation, AppShellPanelRole } from './composition';
|
|
1
2
|
import type { AppColorName } from '../theme/color-presets';
|
|
2
3
|
import type { ReactNode } from 'react';
|
|
3
4
|
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
|
|
@@ -177,12 +178,17 @@ export type AppShellScroll = 'document' | 'container' | 'fixed' | 'page';
|
|
|
177
178
|
export type AppShellBarVisibility = 'compact' | 'always';
|
|
178
179
|
|
|
179
180
|
export interface AppShellEngineProps {
|
|
181
|
+
/** Semantic structure; omitted retains the legacy variant contract. */
|
|
182
|
+
layout?: AppShellLayout;
|
|
183
|
+
/** Structural surface policy, independent of navigation compactness. */
|
|
184
|
+
presentation?: AppShellPresentation;
|
|
180
185
|
/**
|
|
181
186
|
* Native: keep the shell, navigation and pages inside the device's safe area.
|
|
182
187
|
* The bottom-bar slot still owns its bottom inset; without bottom chrome the
|
|
183
|
-
* frame reserves it.
|
|
184
|
-
*
|
|
185
|
-
* dialogs and other portaled surfaces.
|
|
188
|
+
* frame reserves it. Descendant PageHeaders inherit that top-edge ownership;
|
|
189
|
+
* an explicit header safeArea value still wins. Device insets remain available
|
|
190
|
+
* to dialogs and other portaled surfaces. Semantic layouts default to true;
|
|
191
|
+
* legacy layouts default to false. No effect on web.
|
|
186
192
|
*/
|
|
187
193
|
safeArea?: boolean;
|
|
188
194
|
/**
|
|
@@ -545,6 +551,12 @@ export type AppShellProps = Omit<AppShellEngineProps, 'scroll'> &
|
|
|
545
551
|
|
|
546
552
|
/** One panel: a rounded surface in a `panels` shell, alone or in `AppShellPanels`. */
|
|
547
553
|
export interface AppShellPanelProps {
|
|
554
|
+
/** Meaning of the region; the enclosing family supplies geometry and adaptation defaults. */
|
|
555
|
+
role?: AppShellPanelRole;
|
|
556
|
+
/** Controlled inspector visibility across inline and floating presentations. */
|
|
557
|
+
open?: boolean;
|
|
558
|
+
onOpenChange?: (open: boolean) => void;
|
|
559
|
+
label?: string;
|
|
548
560
|
/** Names the panel for `AppShellPanels`' `show` and `useAppShellPanel()`. */
|
|
549
561
|
id?: string;
|
|
550
562
|
children?: ReactNode;
|
|
@@ -339,7 +339,7 @@ export function createCanvasPanel(
|
|
|
339
339
|
style={{ flex: 1, minHeight: 0, overflow: 'hidden' }}
|
|
340
340
|
accessibilityLabel={accessibilityLabel}
|
|
341
341
|
>
|
|
342
|
-
<ScreenScope sizing="fill">
|
|
342
|
+
<ScreenScope inheritSafeArea sizing="fill">
|
|
343
343
|
<ScrollOffsetProvider value={scrollY}>
|
|
344
344
|
<GestureDetector gesture={handlePan} touchAction="none">
|
|
345
345
|
<View style={{ display: lateral ? 'none' : 'flex' }}>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button } from '../button';
|
|
2
|
+
import { Screen, ScreenScrollView } from '../screen';
|
|
3
|
+
import { Dialog } from './Dialog';
|
|
4
|
+
import { createDetailDialog } from './DetailDialogBase';
|
|
5
|
+
import { DetailDialogMotion } from './DetailDialogMotion';
|
|
6
|
+
|
|
7
|
+
export const DetailDialog = createDetailDialog({
|
|
8
|
+
Dialog,
|
|
9
|
+
Button,
|
|
10
|
+
Screen,
|
|
11
|
+
ScreenScrollView,
|
|
12
|
+
Motion: DetailDialogMotion,
|
|
13
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Button } from '../button/index.web';
|
|
2
|
+
import { Screen, ScreenScrollView } from '../screen/index.web';
|
|
3
|
+
import { Dialog } from './Dialog.web';
|
|
4
|
+
import { createDetailDialog } from './DetailDialogBase';
|
|
5
|
+
import { DetailDialogMotion } from './DetailDialogMotion.web';
|
|
6
|
+
|
|
7
|
+
export const DetailDialog = createDetailDialog({
|
|
8
|
+
Dialog,
|
|
9
|
+
Button,
|
|
10
|
+
Screen,
|
|
11
|
+
ScreenScrollView,
|
|
12
|
+
Motion: DetailDialogMotion,
|
|
13
|
+
});
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { useContext, type ComponentType, type ReactNode } from 'react';
|
|
2
|
+
import { PageHeader } from '../page-header/PageHeader';
|
|
3
|
+
import { RiCloseLine } from '../icons/remix/RiCloseLine';
|
|
4
|
+
import { useCommonMessages } from '../locale/common-messages';
|
|
5
|
+
import { useTopEdgeInset } from '../layout/top-edge';
|
|
6
|
+
import { useTheme } from '../theme/use-theme';
|
|
7
|
+
import { Platform, useWindowDimensions } from 'react-native';
|
|
8
|
+
import { SafeAreaInsetsContext } from 'react-native-safe-area-context';
|
|
9
|
+
import {
|
|
10
|
+
SafeAreaConsumedContext,
|
|
11
|
+
NO_CONSUMED_SAFE_AREA,
|
|
12
|
+
WindowSafeAreaInsetsContext,
|
|
13
|
+
} from '../layout/safe-area-ownership';
|
|
14
|
+
import type { Button } from '../button';
|
|
15
|
+
import type { Screen, ScreenScrollView } from '../screen';
|
|
16
|
+
import { BREAKPOINTS } from '../styles/breakpoints';
|
|
17
|
+
import { StyledView } from '../styles/styled-primitives';
|
|
18
|
+
import { DetailDialogSectionGroup } from './DetailDialogSection';
|
|
19
|
+
import { useDialogContext } from './context';
|
|
20
|
+
import type { DetailDialogProps, DialogProps } from './types';
|
|
21
|
+
|
|
22
|
+
type DetailPlatform = {
|
|
23
|
+
Dialog: ComponentType<DialogProps>;
|
|
24
|
+
Button: typeof Button;
|
|
25
|
+
Screen: typeof Screen;
|
|
26
|
+
ScreenScrollView: typeof ScreenScrollView;
|
|
27
|
+
Motion: ComponentType<{ children: ReactNode }>;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** One layout/material/scroll owner for product records and the board template. */
|
|
31
|
+
export function createDetailDialog({
|
|
32
|
+
Dialog,
|
|
33
|
+
Button,
|
|
34
|
+
Screen,
|
|
35
|
+
ScreenScrollView,
|
|
36
|
+
Motion,
|
|
37
|
+
}: DetailPlatform) {
|
|
38
|
+
function BodyViewport({
|
|
39
|
+
body,
|
|
40
|
+
scrollable,
|
|
41
|
+
testID,
|
|
42
|
+
}: {
|
|
43
|
+
body: ReactNode;
|
|
44
|
+
scrollable: boolean;
|
|
45
|
+
testID: string;
|
|
46
|
+
}) {
|
|
47
|
+
const top = useTopEdgeInset();
|
|
48
|
+
return (
|
|
49
|
+
<StyledView className="relative min-h-0 flex-1">
|
|
50
|
+
{scrollable ? (
|
|
51
|
+
<ScreenScrollView
|
|
52
|
+
testID={`${testID}-scroll`}
|
|
53
|
+
style={{ flex: 1, minHeight: 0 }}
|
|
54
|
+
contentContainerStyle={{ flexGrow: 1, paddingTop: top }}
|
|
55
|
+
>
|
|
56
|
+
{body}
|
|
57
|
+
</ScreenScrollView>
|
|
58
|
+
) : (
|
|
59
|
+
body
|
|
60
|
+
)}
|
|
61
|
+
</StyledView>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
function DetailContent({
|
|
65
|
+
header,
|
|
66
|
+
subtitle,
|
|
67
|
+
actions,
|
|
68
|
+
children,
|
|
69
|
+
scrollFooter,
|
|
70
|
+
footer,
|
|
71
|
+
footerKeyboardBehavior = 'visible',
|
|
72
|
+
closeLabel,
|
|
73
|
+
contentKind = 'document',
|
|
74
|
+
scrollable = true,
|
|
75
|
+
testID = 'detail-dialog',
|
|
76
|
+
}: DetailDialogProps) {
|
|
77
|
+
const { close } = useDialogContext();
|
|
78
|
+
const { colors } = useTheme();
|
|
79
|
+
const common = useCommonMessages();
|
|
80
|
+
const body = (
|
|
81
|
+
<StyledView style={{ flexGrow: 1, ...(scrollable ? {} : { flex: 1, minHeight: 0 }) }}>
|
|
82
|
+
<StyledView
|
|
83
|
+
className="px-6 max-sm:px-4"
|
|
84
|
+
style={scrollable ? undefined : { flex: 1, minHeight: 0 }}
|
|
85
|
+
>
|
|
86
|
+
{scrollable ? <DetailDialogSectionGroup>{children}</DetailDialogSectionGroup> : children}
|
|
87
|
+
</StyledView>
|
|
88
|
+
{scrollFooter != null && (
|
|
89
|
+
<StyledView className="mt-auto flex flex-col gap-2.5 px-3 pb-3">
|
|
90
|
+
{scrollFooter}
|
|
91
|
+
</StyledView>
|
|
92
|
+
)}
|
|
93
|
+
</StyledView>
|
|
94
|
+
);
|
|
95
|
+
return (
|
|
96
|
+
<Motion>
|
|
97
|
+
<StyledView
|
|
98
|
+
style={{
|
|
99
|
+
flex: 1,
|
|
100
|
+
minHeight: 0,
|
|
101
|
+
height: '100%',
|
|
102
|
+
borderRadius: 24,
|
|
103
|
+
overflow: 'hidden',
|
|
104
|
+
backgroundColor: colors.card,
|
|
105
|
+
}}
|
|
106
|
+
testID={`${testID}-surface`}
|
|
107
|
+
>
|
|
108
|
+
<Screen
|
|
109
|
+
kind={contentKind}
|
|
110
|
+
scroll={scrollable ? 'content' : 'none'}
|
|
111
|
+
navigationScope="isolated"
|
|
112
|
+
headerPlacement={scrollable ? 'overlay' : 'inset'}
|
|
113
|
+
header={
|
|
114
|
+
<PageHeader
|
|
115
|
+
testID={`${testID}-header`}
|
|
116
|
+
title={header}
|
|
117
|
+
subtitle={subtitle}
|
|
118
|
+
actions={
|
|
119
|
+
<>
|
|
120
|
+
{actions}
|
|
121
|
+
<Button
|
|
122
|
+
appearance="outline"
|
|
123
|
+
tone="neutral"
|
|
124
|
+
iconOnly
|
|
125
|
+
icon={<RiCloseLine />}
|
|
126
|
+
accessibilityLabel={closeLabel ?? common.close}
|
|
127
|
+
onPress={() => close()}
|
|
128
|
+
/>
|
|
129
|
+
</>
|
|
130
|
+
}
|
|
131
|
+
/>
|
|
132
|
+
}
|
|
133
|
+
bottomBar={footer}
|
|
134
|
+
bottomBarKeyboardBehavior={footerKeyboardBehavior}
|
|
135
|
+
>
|
|
136
|
+
<BodyViewport body={body} scrollable={scrollable} testID={testID} />
|
|
137
|
+
</Screen>
|
|
138
|
+
</StyledView>
|
|
139
|
+
</Motion>
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
function DetailDialog(props: DetailDialogProps) {
|
|
143
|
+
const { width, height } = useWindowDimensions();
|
|
144
|
+
const windowInsets = useContext(WindowSafeAreaInsetsContext);
|
|
145
|
+
const triggerInsets = useContext(SafeAreaInsetsContext);
|
|
146
|
+
const physical = windowInsets ?? triggerInsets ?? NO_CONSUMED_SAFE_AREA;
|
|
147
|
+
const native = Platform.OS !== 'web';
|
|
148
|
+
const compact = width < BREAKPOINTS.sm;
|
|
149
|
+
const centered = props.mode === 'center' && !compact;
|
|
150
|
+
const gap = compact ? 8 : 12;
|
|
151
|
+
const targetWidth = Math.min(609, width - physical.left - physical.right - gap * 2);
|
|
152
|
+
const centerY = centered ? (height - physical.top - physical.bottom) * 0.04 : gap;
|
|
153
|
+
const nativeInset = {
|
|
154
|
+
top: physical.top + centerY,
|
|
155
|
+
bottom: physical.bottom + centerY,
|
|
156
|
+
left: centered ? (width - targetWidth) / 2 : physical.left + gap,
|
|
157
|
+
right: centered ? (width - targetWidth) / 2 : physical.right + gap,
|
|
158
|
+
};
|
|
159
|
+
return (
|
|
160
|
+
<Dialog
|
|
161
|
+
open={props.open}
|
|
162
|
+
startOpen={props.startOpen}
|
|
163
|
+
onClose={props.onClose}
|
|
164
|
+
label={props.label}
|
|
165
|
+
testID={props.testID}
|
|
166
|
+
presentation="custom"
|
|
167
|
+
exitDuration={560}
|
|
168
|
+
placement="center"
|
|
169
|
+
width={609}
|
|
170
|
+
inset={native ? nativeInset : undefined}
|
|
171
|
+
minSideGutter={0}
|
|
172
|
+
maxWidth={609}
|
|
173
|
+
contentPadding={0}
|
|
174
|
+
scrollable={false}
|
|
175
|
+
morph={false}
|
|
176
|
+
containerClassName="fixed inset-0 z-100 flex items-stretch justify-end overflow-hidden p-3 max-sm:p-2"
|
|
177
|
+
containerStyle={{
|
|
178
|
+
alignItems: centered ? 'center' : 'flex-end',
|
|
179
|
+
justifyContent: centered ? 'center' : 'flex-start',
|
|
180
|
+
padding: compact ? 8 : 12,
|
|
181
|
+
}}
|
|
182
|
+
panelStyle={
|
|
183
|
+
native
|
|
184
|
+
? { backgroundColor: 'transparent' }
|
|
185
|
+
: {
|
|
186
|
+
width: '100%',
|
|
187
|
+
maxWidth: 609,
|
|
188
|
+
height: centered ? '92%' : '100%',
|
|
189
|
+
maxHeight: '100%',
|
|
190
|
+
backgroundColor: 'transparent',
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
>
|
|
194
|
+
<StyledView
|
|
195
|
+
className="h-full w-full max-w-[609px] outline-none"
|
|
196
|
+
style={{ flex: 1, minHeight: 0 }}
|
|
197
|
+
>
|
|
198
|
+
<SafeAreaConsumedContext.Provider value={native ? physical : NO_CONSUMED_SAFE_AREA}>
|
|
199
|
+
<DetailContent {...props} />
|
|
200
|
+
</SafeAreaConsumedContext.Provider>
|
|
201
|
+
</StyledView>
|
|
202
|
+
</Dialog>
|
|
203
|
+
);
|
|
204
|
+
}
|
|
205
|
+
DetailDialog.displayName = 'DetailDialog';
|
|
206
|
+
return DetailDialog;
|
|
207
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { useEffect, useState, type ReactNode } from 'react';
|
|
2
|
+
import { useWindowDimensions } from 'react-native';
|
|
3
|
+
import Animated, {
|
|
4
|
+
Easing,
|
|
5
|
+
useAnimatedStyle,
|
|
6
|
+
useSharedValue,
|
|
7
|
+
withTiming,
|
|
8
|
+
} from 'react-native-reanimated';
|
|
9
|
+
import { useDialogContext } from './context';
|
|
10
|
+
import { StyledView } from '../styles/styled-primitives';
|
|
11
|
+
import { DetailDialogEnteredContext } from './context';
|
|
12
|
+
import { usePrefersReducedMotion } from '../hooks/use-prefers-reduced-motion';
|
|
13
|
+
const AnimatedView = Animated.createAnimatedComponent(StyledView);
|
|
14
|
+
function phase(start: number, end: number, value: number) {
|
|
15
|
+
'worklet';
|
|
16
|
+
const t = Math.min(1, Math.max(0, (value - start) / (end - start)));
|
|
17
|
+
return t * t * (3 - 2 * t);
|
|
18
|
+
}
|
|
19
|
+
export function GenieSurface({
|
|
20
|
+
children,
|
|
21
|
+
corner = false,
|
|
22
|
+
}: {
|
|
23
|
+
children: ReactNode;
|
|
24
|
+
corner?: boolean;
|
|
25
|
+
}) {
|
|
26
|
+
const { isClosing = false } = useDialogContext();
|
|
27
|
+
const reduced = usePrefersReducedMotion();
|
|
28
|
+
const progress = useSharedValue(reduced ? 0 : 1);
|
|
29
|
+
const [height, setHeight] = useState(280);
|
|
30
|
+
const [entered, setEntered] = useState(reduced || !corner);
|
|
31
|
+
const { height: viewportHeight } = useWindowDimensions();
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
progress.value = withTiming(isClosing ? 1 : 0, {
|
|
34
|
+
duration: reduced ? 0 : 480,
|
|
35
|
+
easing: Easing.bezier(0.42, 0, 0.58, 1),
|
|
36
|
+
});
|
|
37
|
+
}, [isClosing, progress, reduced]);
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (isClosing || !corner) return;
|
|
40
|
+
const timer = setTimeout(() => setEntered(true), reduced ? 0 : 480);
|
|
41
|
+
return () => clearTimeout(timer);
|
|
42
|
+
}, [isClosing, corner, reduced]);
|
|
43
|
+
const style = useAnimatedStyle(() => {
|
|
44
|
+
const p = reduced ? 0 : progress.value;
|
|
45
|
+
const extension = 64 * phase(0, 0.42, p);
|
|
46
|
+
const swallow = phase(0.32, 1, p);
|
|
47
|
+
const stretch = Math.max(0.001, ((height + extension) * (1 - swallow)) / height);
|
|
48
|
+
return {
|
|
49
|
+
opacity: 1 - phase(0.94, 1, p),
|
|
50
|
+
transform: [
|
|
51
|
+
{
|
|
52
|
+
translateY: corner
|
|
53
|
+
? viewportHeight * swallow * 0.5
|
|
54
|
+
: extension + (height * (1 - stretch)) / 2,
|
|
55
|
+
},
|
|
56
|
+
{ translateX: corner ? 24 * phase(0, 0.72, p) : 0 },
|
|
57
|
+
{ scaleX: corner ? 1 - 0.88 * swallow : 1 },
|
|
58
|
+
{ scaleY: stretch },
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
}, [progress, reduced, corner, height, viewportHeight]);
|
|
62
|
+
return (
|
|
63
|
+
<DetailDialogEnteredContext.Provider value={entered}>
|
|
64
|
+
<AnimatedView
|
|
65
|
+
onLayout={(event) => setHeight(event.nativeEvent.layout.height || 280)}
|
|
66
|
+
style={[corner ? { flex: 1, minHeight: 0 } : {}, style]}
|
|
67
|
+
>
|
|
68
|
+
{children}
|
|
69
|
+
</AnimatedView>
|
|
70
|
+
</DetailDialogEnteredContext.Provider>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export function DetailDialogMotion({ children }: { children: ReactNode }) {
|
|
74
|
+
return <GenieSurface corner>{children}</GenieSurface>;
|
|
75
|
+
}
|