import * as React from 'react'; import { type StyleProp, type ViewStyle } from 'react-native'; import { type SelectionHistory } from './selectionHistory'; export type TripleSplitViewProps = { /** * Column 1 — the primary sidebar (a source list / category nav). Pushes made * from inside it SELECT the middle column (they reset it to the pushed * screen), iPad Settings/Mail style. */ sidebar: React.ReactNode; /** Shown in the middle column until the sidebar selects something. */ masterPlaceholder?: React.ReactNode; /** Shown in the detail column until the middle column selects something. */ detailPlaceholder?: React.ReactNode; /** * Below this width the whole thing collapses to just the sidebar; pushes go * to the main navigator (normal single-column stack), exactly like phones. */ breakingPointWidth?: number; sidebarWidth?: number; masterWidth?: number; sidebarStyle?: StyleProp; masterStyle?: StyleProp; detailStyle?: StyleProp; /** * Health-app style: float the sidebar as an absolutely-positioned TRANSLUCENT * glass panel ON TOP of the content columns, instead of reserving a column to * its left. The middle/detail content then spans edge-to-edge from x=0, so a * colored/gradient background visibly bleeds UNDER the sidebar. Make the * sidebar surface translucent via `sidebarStyle` (and/or a native BlurView on * iOS / `backdrop-filter` on web) for the frosted-glass look. Default false. */ floatingSidebar?: boolean; /** * Restore a previous middle/detail selection on mount — the hook that makes * the three columns deep-linkable. Paths are the registered `screen.path` * values (stable across reloads), NOT the internal per-instance pane keys. * The host typically reads these from the URL. */ initialSelection?: TripleSelection; /** * Fires whenever the middle or detail selection changes, with the full * current selection expressed as stable `screen.path` + params. The host * writes this to the URL (query string / route params) so the columns become * shareable, bookmarkable links without the panes fighting the main * navigator for browser history. */ onSelectionChange?: (selection: TripleSelection) => void; /** * Opt in to making the SIDEBAR→MIDDLE selection (which section is open) part * of navigation state. When set to a query-param name (e.g. `"section"`), * selecting a section from the sidebar: * * - reflects the selection in the URL of the MAIN navigator as a query param * (`…/more?section=werknemers`), so it is deep-linkable and restored on a * cold reload, * - keeps it on the MAIN navigator's single history timeline. Peer picks * replace the current entry by default; `selectionHistory="push"` opts into * browser/native Back and Forward stepping through previous selections. * * Switching to another section also drops any `detailParam` from the URL, so * the detail column empties (iPad Mail: changing mailbox clears the message). * * This is the three-column analogue of SplitView's `selectionParam`, applied * to the first level. Pair it with `detailParam` for the second level. */ sectionParam?: string; /** * Opt in to making the MIDDLE→DETAIL selection (which item is open) part of * navigation state. When set to a query-param name (e.g. `"detail"`), * selecting an item from the middle column reflects it in the MAIN URL * (`…/more?section=werknemers&detail=user/42`) and re-derives the detail pane * from that URL — so it is deep-linkable and cold-restorable, exactly like * SplitView's `selectionParam`. Peer picks replace history by default; * `selectionHistory="push"` opts into replaying them with Back/Forward. */ detailParam?: string; /** * How peer selections from the sidebar and middle column affect navigation * history. Defaults to `replace`; use `push` when Back/Forward should replay * previously selected sections/items. Narrow layouts and detail drill-downs * keep their normal push behaviour. */ selectionHistory?: SelectionHistory; }; /** One column's current selection: the registered screen path plus its params, * or null when that column is showing its placeholder. */ export type TripleSelection = { middle: TripleSelectionEntry | null; detail: TripleSelectionEntry | null; }; export type TripleSelectionEntry = { path: string; params?: any; }; /** * Three-column master/detail (iPad Mail / macOS Settings style) for wide * screens: sidebar → middle list → detail. * * Built on the same history-less-navigator technique as SplitView, applied * twice: pushes from the sidebar select the MIDDLE column (a second history- * less navigator); pushes from the middle column select the DETAIL column (a * third history-less navigator). On narrow screens the sidebar renders as-is * and navigation behaves exactly like today — full-screen pushes on the main * stack — so phones (iOS + Android) are unaffected. * * Cross-platform: no UIKit UISplitViewController dependency, so it renders * identically on iOS, Android and web (Android has no native 3-column * controller; this is the portable equivalent). */ export default function TripleSplitView({ sidebar, masterPlaceholder, detailPlaceholder, breakingPointWidth, sidebarWidth, masterWidth, sidebarStyle, masterStyle, detailStyle, floatingSidebar, initialSelection, onSelectionChange, sectionParam, detailParam, selectionHistory, }: TripleSplitViewProps): React.JSX.Element; //# sourceMappingURL=TripleSplitView.d.ts.map