import { DataListViewType } from './lib/data-list-view.js'; /** * Maps `DataListViewType` to the UI surface pattern for list pages. * * **Data:** One `useTableState(fullRows, columns, …)` per tab; **filtered/sorted rows** * (`tableState.rows`) are the single source of truth for List, Board, and Dashboard. * Table view renders the same state via `DataTable`. * * | View | Surface | * |------------|---------| * | `table` | `DataTable` | * | `list` | `DataTableToolbar` + list layout | * | `board` | `DataTableToolbar` + board / kanban | * | `dashboard`| `DataTableToolbar` + KPI (`KeyMetrics`) + optional charts (`ChartCard`, Recharts, etc.) | * | `calendar` | `DataTableToolbar` + `ListPageCalendarView` (month grid + day detail) | * | `folder` | `DataTableToolbar` + icon grid (macOS-Finder-style) | * | `panel` | `DataTableToolbar` + resizable split (list / tree column + detail inspector) | */ /** What to render for the active view tab (routing / branching). */ type DataListViewRenderKind = "data-table" | "list-with-toolbar" | "board-with-toolbar" | "dashboard-with-toolbar" | "calendar-with-toolbar" | "folder-with-toolbar" | "panel-with-toolbar" | "tree-panel-with-toolbar"; /** * Stable classification for switch/if chains. **Every** `DataListViewType` maps to exactly one kind. * Use this so `dashboard` is never mistaken for `board` (a common bug when only `list` is special-cased). */ declare function getDataListViewRenderKind(view: DataListViewType): DataListViewRenderKind; declare function usesDataTableComponent(view: DataListViewType): boolean; /** KPI band + optional charts — not the kanban board. */ declare function usesDashboardSurface(view: DataListViewType): boolean; /** Shared toolbar (search, filters, properties); body differs by view. */ declare function usesToolbarWithFilteredRows(view: DataListViewType): boolean; /** * Central registry for list-page view types — labels, render kinds, and hub chrome rules. * * **Add a new view once here** (plus a body in `components/data-views/`). Hubs declare * `supportedViewTypes` on `ListPageTemplate`; table components branch with * `getDataListViewRenderKind` + `ListPageConnectedViewBody` (never a dashboard fallback). * * @see `docs/data-views-pattern.md` — "View registry and connected bodies" * @see `.cursor/rules/exxat-hub-supported-views.mdc` — default hubs use **`TABLE_ONLY_HUB_SUPPORTED_VIEWS`**; opt into **`FULL_HUB_SUPPORTED_VIEWS`** when product asks */ interface DataListViewDefinition { value: DataListViewType; label: string; icon: string; renderKind: DataListViewRenderKind; /** `ListPageTemplate` metrics slot above the views toolbar. */ hubMetricsStrip: boolean; } declare const DATA_LIST_VIEW_REGISTRY: readonly DataListViewDefinition[]; /** * Default view allowlist when a hub ships **table only** (no Add view until product asks). * Omit `supportedViewTypes` on `ListPageTemplate` + `HubTable` to use this default. */ declare const TABLE_ONLY_HUB_SUPPORTED_VIEWS: readonly ["table"]; /** * Default view allowlist for **primary list hubs** (Placements / Team / Students-style pages). * Opt in when the product needs table + list + board + dashboard — implement renderers for each. */ declare const PRIMARY_HUB_SUPPORTED_VIEWS: readonly ["table", "list", "board", "dashboard"]; /** * Default allowlist for **list-page hubs** in this design system (Library / Column types / * Tokens, etc.). Matches the All questions hub: table, list, board, dashboard, folder, * panel, and tree-panel. Pair with renderers for each kind on `HubTable` + `ListPageTemplate`. */ declare const FULL_HUB_SUPPORTED_VIEWS: readonly ["table", "list", "board", "dashboard", "folder", "panel", "tree-panel"]; /** Every registered view type (includes folder, panel, calendar, tree-panel). */ declare const ALL_DATA_LIST_VIEW_TYPES: DataListViewType[]; declare function dataListViewDefinition(view: DataListViewType): DataListViewDefinition; /** `ListPageTemplate` hub KPI strip — false for calendar and dashboard (inline KPIs). */ declare function showsListPageHubMetricsStrip(view: DataListViewType): boolean; /** Tiles for Add view + Properties when a hub only supports a subset of views. */ declare function dataListViewTilesForHub(supported: readonly DataListViewType[]): { type: DataListViewType; label: string; icon: string; }[]; /** `SelectionTileGrid` options for Properties when a hub supports a subset of views. */ declare function dataListViewSelectionTilesForHub(supported: readonly DataListViewType[]): { value: DataListViewType; label: string; icon: string; }[]; /** View types that expose Table Properties (all registered `DataListViewType` values). */ declare const DATA_LIST_SURFACE_VIEW_TYPES: ReadonlySet; declare function isDataListSurfaceViewType(viewType: string): viewType is DataListViewType; declare function isDataListViewTypeSupported(view: DataListViewType, supported: readonly DataListViewType[]): boolean; export { ALL_DATA_LIST_VIEW_TYPES as A, DATA_LIST_SURFACE_VIEW_TYPES as D, FULL_HUB_SUPPORTED_VIEWS as F, PRIMARY_HUB_SUPPORTED_VIEWS as P, TABLE_ONLY_HUB_SUPPORTED_VIEWS as T, DATA_LIST_VIEW_REGISTRY as a, type DataListViewDefinition as b, type DataListViewRenderKind as c, dataListViewDefinition as d, dataListViewSelectionTilesForHub as e, dataListViewTilesForHub as f, getDataListViewRenderKind as g, isDataListViewTypeSupported as h, isDataListSurfaceViewType as i, usesDataTableComponent as j, usesToolbarWithFilteredRows as k, showsListPageHubMetricsStrip as s, usesDashboardSurface as u };