@factorialco/f0-react 2.55.3 → 2.57.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/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-Dr0WIoJu.js";
1
+ import { D as e, F as r, a as t, e as o, f as i, c as n, d as F, I as C, P as A, b as l, u as d } from "./F0CanvasPanel-Dr6ruMgi.js";
2
2
  import { defaultTranslations as m } from "./i18n-provider-defaults.js";
3
- import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-Dkrf7Ox1.js";
3
+ import { A as c, C as I, h as P, t as v, v as f, x as p, n as T, j as g, r as y, y as S, q as x, s as H, k as V, e as b, g as k, l as w, F as M, i as O, a as D, p as j, m as q, o as z, b as B, f as E, w as L, c as R, d as G, u as J } from "./useChatHistory-RT7UPbrU.js";
4
4
  export {
5
5
  c as AiChatTranslationsProvider,
6
6
  I as ChatSpinner,
@@ -24,6 +24,7 @@ import { CompanyCellValue as CompanyCellValue_2 } from './experimental';
24
24
  import { CompanyItemProps } from './types';
25
25
  import { ComponentProps } from 'react';
26
26
  import { CompoundCellValue } from './types/compound';
27
+ import { Context } from 'react';
27
28
  import { CountCellValue } from './types/count';
28
29
  import { CountryCellValue } from './types/country';
29
30
  import { DateCellValue } from './types/date';
@@ -80,6 +81,7 @@ import { ProgressBarCellValue } from './types/progressBar';
80
81
  import { ProgressBarCellValue as ProgressBarCellValue_2 } from './experimental';
81
82
  import { Props as Props_5 } from './types';
82
83
  import { PropsWithChildren } from 'react';
84
+ import { Provider } from 'react';
83
85
  import { RadarChartProps } from './RadarChart';
84
86
  import * as React_2 from 'react';
85
87
  import { ReactElement } from 'react';
@@ -726,6 +728,18 @@ export declare interface ApplicationFrameProps {
726
728
  children: React.ReactNode;
727
729
  }
728
730
 
731
+ /**
732
+ * The slice of persisted collection state that was actually applied to the
733
+ * data source during hydration. `sortings: null` means the user had
734
+ * explicitly cleared the sorting on the originating list.
735
+ */
736
+ export declare type AppliedCollectionState<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Grouping extends GroupingDefinition<R>> = {
737
+ filters?: FiltersState<Filters>;
738
+ sortings?: SortingsState<Sortings>;
739
+ search?: string;
740
+ grouping?: GroupingState<R, Grouping>;
741
+ };
742
+
729
743
  declare const ApprovalStep: FC<ApprovalStepProps>;
730
744
 
731
745
  declare type ApprovalStepProps = {
@@ -991,6 +1005,14 @@ export declare type BaseDataAdapter<R extends RecordType, Filters extends Filter
991
1005
  * side-effects on reactive adapters (e.g. Apollo watchQuery).
992
1006
  */
993
1007
  exportFetchData?: (options: Options) => FetchReturn | Promise<FetchReturn>;
1008
+ /**
1009
+ * Optional id-relative capability: fetch the immediate neighbours of an
1010
+ * item under the current filters/sortings/search, without loading pages.
1011
+ * Enables detail-page prev/next on direct links / hard refresh, where the
1012
+ * item may not be in any loaded page window. One-shot semantics: when an
1013
+ * Observable is returned, only the first settled emission is consumed.
1014
+ */
1015
+ fetchItemNeighbors?: (options: ItemNeighborsFetchOptions<Filters, Options>) => ItemNeighborsResponse<R> | Promise<ItemNeighborsResponse<R>> | Observable<PromiseState<ItemNeighborsResponse<R>>>;
994
1016
  };
995
1017
 
996
1018
  /**
@@ -2534,6 +2556,10 @@ declare type DataCollectionStatusComplete<CurrentFiltersState extends FiltersSta
2534
2556
  settings?: DataCollectionSettings;
2535
2557
  };
2536
2558
 
2559
+ declare type DataCollectionStorage<CurrentFiltersState extends FiltersState<FiltersDefinition> = FiltersState<FiltersDefinition>> = {
2560
+ settings?: DataCollectionSettings;
2561
+ } & DataCollectionStatus<CurrentFiltersState>;
2562
+
2537
2563
  declare type DataCollectionStorageFeature = (typeof dataCollectionStorageFeatures)[number];
2538
2564
 
2539
2565
  /**
@@ -2705,6 +2731,8 @@ export declare type DataSourceDefinition<R extends RecordType = RecordType, Filt
2705
2731
  }) => number | undefined;
2706
2732
  };
2707
2733
 
2734
+ declare type DataSourceItemId = string | number | symbol;
2735
+
2708
2736
  declare type DateCellConfig = {
2709
2737
  /** Earliest selectable date. Dates before this are disabled in the picker. */
2710
2738
  minDate?: Date;
@@ -5607,6 +5635,42 @@ declare type ItemDefinition = {
5607
5635
  avatar?: AvatarVariant;
5608
5636
  };
5609
5637
 
5638
+ /**
5639
+ * Options for an id-relative neighbours fetch. Derived from the adapter's own
5640
+ * fetch options, so extended adapters (e.g. OneDataCollection's, which add
5641
+ * `navigationFilters`) carry their extra context automatically. Pagination is
5642
+ * stripped: the request is relative to an item id, not to a page.
5643
+ */
5644
+ export declare type ItemNeighborsFetchOptions<Filters extends FiltersDefinition, Options extends BaseFetchOptions<Filters> = BaseFetchOptions<Filters>> = Omit<Options, "pagination"> & {
5645
+ /** Id of the reference item (as produced by the source's idProvider) */
5646
+ id: ItemNeighborsId;
5647
+ };
5648
+
5649
+ /**
5650
+ * Identifier used to reference an item in id-relative fetches.
5651
+ * Symbols are excluded on purpose: the id must be serializable so it can
5652
+ * cross a network boundary to a backend.
5653
+ */
5654
+ export declare type ItemNeighborsId = string | number;
5655
+
5656
+ /**
5657
+ * Result of an id-relative neighbours fetch.
5658
+ *
5659
+ * `previous`/`next` are the immediate neighbours of the reference item under
5660
+ * the given filters/sortings/search, or null at the collection edges. If the
5661
+ * reference item itself does not match the current filters, return
5662
+ * `{ previous: null, next: null }` (optionally with `total`) — consumers
5663
+ * disable navigation in that case.
5664
+ */
5665
+ export declare type ItemNeighborsResponse<R> = {
5666
+ previous: R | null;
5667
+ next: R | null;
5668
+ /** 1-indexed position of the reference item in the filtered+sorted collection */
5669
+ position?: number;
5670
+ /** Total number of records matching the current filters/search */
5671
+ total?: number;
5672
+ };
5673
+
5610
5674
  export declare function ItemSectionHeader({ item, children, isActive, collapsible, isExpanded, onToggleExpanded, sortable, hideChildrenCounter, canDropInside, onDragOver, onDragLeave, onDrop, currentParentId, draggedItemId, }: TOCItemSectionHeaderProps): JSX_2.Element;
5611
5675
 
5612
5676
  /**
@@ -6785,6 +6849,27 @@ export declare type PageBasedPaginatedResponse<TRecord> = BasePaginatedResponse<
6785
6849
 
6786
6850
  export declare function PageHeader({ module, statusTag, breadcrumbs, actions, embedded, navigation, productUpdates, favorites, oneSwitchTooltip, oneSwitchAutoOpen, }: HeaderProps): JSX_2.Element;
6787
6851
 
6852
+ export declare type PageHeaderItemNavigationInput<R extends RecordType> = Pick<UseDataSourceItemNavigationReturn<R>, "previousItem" | "nextItem" | "previousItemUrl" | "nextItemUrl" | "absoluteIndex" | "totalItems" | "activeIndex">;
6853
+
6854
+ export declare const PageHeaderNavigationContext: Context<NavigationProps | null>;
6855
+
6856
+ /**
6857
+ * Provider that lets a page component inject navigation data into PageHeader
6858
+ * without needing to pass it down as a prop. PageHeader reads this context
6859
+ * only when its own `navigation` prop is undefined, so the prop always wins.
6860
+ *
6861
+ * @example
6862
+ * ```tsx
6863
+ * const { navigation } = useDataCollectionItemNavigation({ source, collectionId, activeItemId })
6864
+ * return (
6865
+ * <PageHeaderNavigationProvider value={navigation}>
6866
+ * <MyDetailPage />
6867
+ * </PageHeaderNavigationProvider>
6868
+ * )
6869
+ * ```
6870
+ */
6871
+ export declare const PageHeaderNavigationProvider: Provider<NavigationProps | null>;
6872
+
6788
6873
  export declare function PageNavigation({ previous, next, counter }: NavigationProps): JSX_2.Element;
6789
6874
 
6790
6875
  declare interface PageProps {
@@ -6815,6 +6900,14 @@ export declare type PaginatedDataAdapter<R extends RecordType, Filters extends F
6815
6900
  * side-effects on reactive adapters (e.g. Apollo watchQuery).
6816
6901
  */
6817
6902
  exportFetchData?: (options: Options) => FetchReturn | Promise<FetchReturn>;
6903
+ /**
6904
+ * Optional id-relative capability: fetch the immediate neighbours of an
6905
+ * item under the current filters/sortings/search, without loading pages.
6906
+ * Enables detail-page prev/next on direct links / hard refresh, where the
6907
+ * item may not be in any loaded page window. One-shot semantics: when an
6908
+ * Observable is returned, only the first settled emission is consumed.
6909
+ */
6910
+ fetchItemNeighbors?: (options: ItemNeighborsFetchOptions<Filters, Options>) => ItemNeighborsResponse<R> | Promise<ItemNeighborsResponse<R>> | Observable<PromiseState<ItemNeighborsResponse<R>>>;
6818
6911
  };
6819
6912
 
6820
6913
  export declare type PaginatedFetchOptions<Filters extends FiltersDefinition> = BaseFetchOptions<Filters> & {
@@ -7469,6 +7562,45 @@ declare type SectionProps = {
7469
7562
  onItemVisible?: (id: string) => void;
7470
7563
  };
7471
7564
 
7565
+ export declare interface SeedableDefinition<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Grouping extends GroupingDefinition<R>> {
7566
+ filters?: Filters;
7567
+ sortings?: Sortings;
7568
+ search?: SearchOptions;
7569
+ grouping?: Grouping;
7570
+ }
7571
+
7572
+ /**
7573
+ * Applies a OneDataCollection's persisted state onto a data source's runtime
7574
+ * setters, validating every piece against the declared definition first so
7575
+ * stale persisted keys (schema drift, renamed filters) never reach the
7576
+ * adapter.
7577
+ *
7578
+ * - Filters: resolved per-visualization (`visualizationFilters` wins over
7579
+ * `filters`), then pruned to the keys declared in `definition.filters`.
7580
+ * - Sortings: a single `{ field, order } | null` — `null` is an explicit
7581
+ * user "clear sorting" and is applied; `undefined` keeps the defaults.
7582
+ * - Search: applied only when the definition enables search.
7583
+ * - Grouping: applied only when the persisted field is a declared groupBy —
7584
+ * grouping changes record order, and prev/next must match the list.
7585
+ *
7586
+ * Pure besides invoking the given setters. Returns what was applied, or null
7587
+ * when the storage contributed nothing.
7588
+ */
7589
+ export declare function seedFromStorage<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Grouping extends GroupingDefinition<R>>(storage: DataCollectionStorage<FiltersState<Filters>>, definition: SeedableDefinition<R, Filters, Sortings, Grouping>, target: SeedTarget<R, Filters, Sortings, Grouping>): AppliedCollectionState<R, Filters, Sortings, Grouping> | null;
7590
+
7591
+ export declare interface SeedTarget<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Grouping extends GroupingDefinition<R>> {
7592
+ setCurrentFilters: (filters: FiltersState<Filters>) => void;
7593
+ setCurrentSortings: (sortings: {
7594
+ field: keyof Sortings;
7595
+ order: "asc" | "desc";
7596
+ } | null) => void;
7597
+ setCurrentSearch: (search: string | undefined) => void;
7598
+ setCurrentGrouping: (grouping: {
7599
+ field: keyof Grouping["groupBy"];
7600
+ order?: "asc" | "desc";
7601
+ } | undefined) => void;
7602
+ }
7603
+
7472
7604
  /**
7473
7605
  * @experimental This is an experimental component use it at your own risk
7474
7606
  */
@@ -8343,6 +8475,107 @@ declare type UseDataCollectionDataReturn<R extends RecordType> = UseDataReturn<R
8343
8475
  summaries?: R;
8344
8476
  };
8345
8477
 
8478
+ /**
8479
+ * Item navigation (prev/next + counter + PageHeader wiring) fed from a
8480
+ * **declared** data collection source definition plus the `collectionId` of
8481
+ * the originating list — not from a mounted collection.
8482
+ *
8483
+ * Because it never needs the list mounted, it works on a direct link / hard
8484
+ * refresh of a detail page: the persisted filters/sortings/search the list
8485
+ * wrote through the data collection storage handler are read by
8486
+ * `collectionId`, validated against the definition, and seeded into the
8487
+ * source before the first fetch (exactly one fetch, with the right state).
8488
+ *
8489
+ * Persisted state intentionally wins over `source.currentFilters` /
8490
+ * `currentSortings`: the definition values apply on mount and the hydrated
8491
+ * state lands right after, mirroring what the user last saw on the list.
8492
+ *
8493
+ * @example
8494
+ * ```tsx
8495
+ * const { navigation } = useDataCollectionItemNavigation({
8496
+ * source: employeesSourceDefinition, // same definition the list uses
8497
+ * collectionId: "organization/employees/v1", // same id the list uses
8498
+ * activeItemId: routeParams.employeeId,
8499
+ * getItemTitle: (employee) => employee.name,
8500
+ * })
8501
+ * return (
8502
+ * <PageHeaderNavigationProvider value={navigation}>
8503
+ * <EmployeeDetailPage />
8504
+ * </PageHeaderNavigationProvider>
8505
+ * )
8506
+ * ```
8507
+ */
8508
+ export declare function useDataCollectionItemNavigation<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(props: UseDataCollectionItemNavigationProps<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>): UseDataCollectionItemNavigationReturn<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
8509
+
8510
+ export declare interface UseDataCollectionItemNavigationProps<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> {
8511
+ /**
8512
+ * The declared data source definition — the same one the originating list
8513
+ * passes to `useDataCollectionSource` / `OneDataCollection`. `itemUrl`
8514
+ * comes from here unless overridden.
8515
+ */
8516
+ source: DataCollectionSourceDefinition<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
8517
+ /**
8518
+ * The `id` of the originating `OneDataCollection` (e.g.
8519
+ * `organization/employees/v1`). Its persisted filters/sortings/search are
8520
+ * read through the data collection storage handler and seeded into the
8521
+ * source, so navigation matches what the user saw on the list — even on a
8522
+ * direct link where the list was never mounted.
8523
+ */
8524
+ collectionId: string;
8525
+ /** Controlled active item ID — typically the detail route param. */
8526
+ activeItemId?: DataSourceItemId | null;
8527
+ /** Default active item ID for uncontrolled usage. */
8528
+ defaultActiveItemId?: DataSourceItemId | null;
8529
+ /** Callback fired whenever the active item changes. */
8530
+ onActiveItemChange?: (id: DataSourceItemId | null) => void;
8531
+ /** Overrides the source idProvider. */
8532
+ idProvider?: (item: R, index?: number) => DataSourceItemId;
8533
+ /** Overrides `source.itemUrl`. */
8534
+ itemUrl?: (item: R) => string | undefined;
8535
+ /** Accessible titles for the PageHeader prev/next links. */
8536
+ getItemTitle?: (item: R) => string;
8537
+ /**
8538
+ * Gates everything: while false neither the persisted state is read nor
8539
+ * any data fetched.
8540
+ * @default true
8541
+ */
8542
+ enabled?: boolean;
8543
+ /**
8544
+ * When false, skips reading the persisted collection state and fetches
8545
+ * with the definition defaults.
8546
+ * @default true
8547
+ */
8548
+ restorePersistedState?: boolean;
8549
+ /**
8550
+ * Forwarded to `useDataCollectionSource` for `dataAdapter` memoization,
8551
+ * same convention as `useDataCollectionSource(source, deps)`.
8552
+ */
8553
+ deps?: ReadonlyArray<unknown>;
8554
+ }
8555
+
8556
+ export declare interface UseDataCollectionItemNavigationReturn<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> extends UseDataSourceItemNavigationReturn<R> {
8557
+ /** True once persisted state was applied AND the first fetch resolved. */
8558
+ isReady: boolean;
8559
+ /**
8560
+ * Render-ready PageHeader navigation. Pass it to the `navigation` prop or
8561
+ * inject it via `PageHeaderNavigationProvider`. Null while there is
8562
+ * nothing useful to render (e.g. the active item is not in the loaded
8563
+ * window on a deep direct link).
8564
+ */
8565
+ navigation: NavigationProps | null;
8566
+ /**
8567
+ * What was actually read and applied from the persisted collection state,
8568
+ * or null when nothing was (empty storage, restore disabled, read error).
8569
+ */
8570
+ appliedCollectionState: AppliedCollectionState<R, Filters, Sortings, Grouping> | null;
8571
+ /** The runtime data source created from the definition (escape hatch). */
8572
+ dataSource: DataCollectionSource<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
8573
+ /** The fetched data backing the navigation (escape hatch). */
8574
+ data: Data<R>;
8575
+ paginationInfo: PaginationInfo | null;
8576
+ isLoading: boolean;
8577
+ }
8578
+
8346
8579
  export declare const useDataCollectionSource: <R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(source: DataCollectionSourceDefinition<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, deps?: ReadonlyArray<unknown>) => DataCollectionSource<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
8347
8580
 
8348
8581
  /**
@@ -8350,6 +8583,14 @@ export declare const useDataCollectionSource: <R extends RecordType = RecordType
8350
8583
  */
8351
8584
  declare interface UseDataOptions<R extends RecordType, Filters extends FiltersDefinition> {
8352
8585
  filters?: Partial<FiltersState<Filters>>;
8586
+ /**
8587
+ * When false, suspends all data fetching: the initial fetch effect does not
8588
+ * run until `enabled` becomes true. Useful to delay the first fetch until
8589
+ * async state (e.g. persisted filters) has been applied to the source.
8590
+ * `isInitialLoading` stays true while disabled.
8591
+ * @default true
8592
+ */
8593
+ enabled?: boolean;
8353
8594
  /**
8354
8595
  * A function that is called when an error occurs during data fetching.
8355
8596
  * It is called with the error object.
@@ -8389,6 +8630,43 @@ declare interface UseDataReturn<R extends RecordType> {
8389
8630
  mergedFilters: FiltersState<FiltersDefinition>;
8390
8631
  }
8391
8632
 
8633
+ declare interface UseDataSourceItemNavigationReturn<R extends RecordType> {
8634
+ /** The currently active item ID */
8635
+ activeItemId: DataSourceItemId | null;
8636
+ /** The currently active item record, or null if not found in loaded data */
8637
+ activeItem: R | null;
8638
+ /** The active item index within the currently loaded records */
8639
+ activeIndex: number;
8640
+ /** The active item index within the full collection when it can be inferred */
8641
+ absoluteIndex: number | null;
8642
+ /** Number of records currently loaded into the datasource */
8643
+ loadedItemsCount: number;
8644
+ /** Total number of matching records when pagination exposes it */
8645
+ totalItems: number | undefined;
8646
+ /** The previous loaded item record, or null if unavailable */
8647
+ previousItem: R | null;
8648
+ /** The next loaded item record, or null if unavailable */
8649
+ nextItem: R | null;
8650
+ /** URL of the active item (derived via `itemUrl`), or null if unavailable */
8651
+ activeItemUrl: string | null;
8652
+ /** Navigate to the next item. Fetches next page if at boundary */
8653
+ goToNext: () => void;
8654
+ /** Navigate to the previous item. Fetches previous page if at boundary */
8655
+ goToPrevious: () => void;
8656
+ /** Whether there is a next item (or more pages to load) */
8657
+ hasNext: boolean;
8658
+ /** Whether there is a previous item (or previous pages to load) */
8659
+ hasPrevious: boolean;
8660
+ /** Directly set the active item ID */
8661
+ setActiveItemId: (id: DataSourceItemId | null) => void;
8662
+ /** True while waiting for a page transition to resolve the pending navigation */
8663
+ isNavigating: boolean;
8664
+ /** URL of the next loaded item (derived via `itemUrl`), or null if unavailable */
8665
+ nextItemUrl: string | null;
8666
+ /** URL of the previous loaded item (derived via `itemUrl`), or null if unavailable */
8667
+ previousItemUrl: string | null;
8668
+ }
8669
+
8392
8670
  export declare function useExportAction<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>>({ source, currentVisualization, filename, enabled, }: UseExportActionProps<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>): SecondaryActionItem;
8393
8671
 
8394
8672
  declare interface UseExportActionProps<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> {
@@ -8405,6 +8683,35 @@ export declare const useInfiniteScrollPagination: (paginationInfo: PaginationInf
8405
8683
  loadingIndicatorRef: RefObject<HTMLTableCellElement>;
8406
8684
  };
8407
8685
 
8686
+ /**
8687
+ * Converts an item-navigation result into the `NavigationProps` shape that
8688
+ * `PageHeader` accepts (directly or via `PageHeaderNavigationProvider`).
8689
+ *
8690
+ * URLs are read from `previousItemUrl` / `nextItemUrl`, which are computed by
8691
+ * the `itemUrl` option on the navigation hook. A null URL omits that link
8692
+ * (the button renders disabled). The counter is included only when both the
8693
+ * absolute position and the total are known — never a misleading `0/n`.
8694
+ *
8695
+ * Returns null when there is nothing useful to render (no input, or the
8696
+ * active item could not be located and no total is known), so it can be
8697
+ * passed straight to `PageHeaderNavigationProvider`.
8698
+ */
8699
+ export declare function usePageHeaderItemNavigation<R extends RecordType>(nav: PageHeaderItemNavigationInput<R> | null, config?: UsePageHeaderItemNavigationConfig<R>): NavigationProps | null;
8700
+
8701
+ export declare interface UsePageHeaderItemNavigationConfig<R extends RecordType> {
8702
+ /**
8703
+ * Returns a human-readable title for a navigation link. Used as the
8704
+ * accessible label on the prev/next buttons.
8705
+ */
8706
+ getItemTitle?: (item: R) => string;
8707
+ }
8708
+
8709
+ /**
8710
+ * Returns the navigation value injected by the nearest
8711
+ * `PageHeaderNavigationProvider`, or null when no provider is present.
8712
+ */
8713
+ export declare function usePageHeaderNavigation(): NavigationProps | null;
8714
+
8408
8715
  export declare interface User {
8409
8716
  id: string;
8410
8717
  fullname: string;