@factorialco/f0-react 2.59.0 → 2.61.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/f0.d.ts CHANGED
@@ -409,6 +409,21 @@ declare type ActionVariant = (typeof actionVariants)[number];
409
409
 
410
410
  declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
411
411
 
412
+ /**
413
+ * Wraps a `pages`-paginated data adapter so it presents itself as
414
+ * `infinite-scroll`, letting page-based sources (the typical list adapter) be
415
+ * consumed by components that only support cursor pagination — e.g.
416
+ * `F0Select` and the breadcrumb jump-to select.
417
+ *
418
+ * The cursor is the stringified next page: `cursor: null` fetches page 1,
419
+ * `cursor: "3"` fetches page 3, and `hasMore` is derived from
420
+ * `currentPage < pagesCount`. All three `fetchData` return channels (sync,
421
+ * Promise, Observable of PromiseState) are mapped; loading/error emissions
422
+ * pass through untouched. Adapters that already are `infinite-scroll` /
423
+ * `no-pagination` are returned as-is (same reference).
424
+ */
425
+ export declare const adaptDataAdapterToInfiniteScroll: <R extends RecordType, Filters extends FiltersDefinition>(dataAdapter: DataAdapter<R, Filters>) => DataAdapter<R, Filters>;
426
+
412
427
  declare type AddRowActionsResult = PrimaryActionItemDefinition | PrimaryActionItemDefinition[] | undefined;
413
428
 
414
429
  /* Excluded from this release type: AgentState */
@@ -9816,6 +9831,12 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
9816
9831
  onSearchChange?: (value: string) => void;
9817
9832
  searchValue?: string;
9818
9833
  onOpenChange?: (open: boolean) => void;
9834
+ /**
9835
+ * Called when the user changes the in-dropdown filters (requires a `source`
9836
+ * with filter definitions). Lets consumers keep an external context — e.g.
9837
+ * detail-page navigation — in sync with what the dropdown is showing.
9838
+ */
9839
+ onFiltersChange?: (filters: FiltersState<FiltersDefinition>) => void;
9819
9840
  searchEmptyMessage?: string;
9820
9841
  className?: string;
9821
9842
  actions?: Action_2[];
@@ -15877,7 +15898,7 @@ export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[],
15877
15898
  * id is null, nothing is fetched and `neighbors` stays null — consumers
15878
15899
  * keep their fallback behaviour.
15879
15900
  */
15880
- export declare function useItemNeighbors<R extends RecordType, Filters extends FiltersDefinition>({ dataAdapter, id, filters, sortings, search, enabled, onError, }: UseItemNeighborsOptions<R, Filters>): UseItemNeighborsReturn<R>;
15901
+ export declare function useItemNeighbors<R extends RecordType, Filters extends FiltersDefinition>({ dataAdapter, id, filters, sortings, search, enabled, fetchParamsProvider, onError, }: UseItemNeighborsOptions<R, Filters>): UseItemNeighborsReturn<R>;
15881
15902
 
15882
15903
  export declare interface UseItemNeighborsOptions<R extends RecordType, Filters extends FiltersDefinition> {
15883
15904
  /** The adapter that may implement the `fetchItemNeighbors` capability */
@@ -15896,6 +15917,13 @@ export declare interface UseItemNeighborsOptions<R extends RecordType, Filters e
15896
15917
  * @default true
15897
15918
  */
15898
15919
  enabled?: boolean;
15920
+ /**
15921
+ * Extends/transforms the options passed to `fetchItemNeighbors`, mirroring
15922
+ * `useData`'s option of the same name — e.g. OneDataCollection adds
15923
+ * `navigationFilters`. The extended options also key the response cache,
15924
+ * so extra context invalidates it correctly.
15925
+ */
15926
+ fetchParamsProvider?: <O extends BaseFetchOptions<Filters>>(options: O) => O;
15899
15927
  onError?: (error: DataError) => void;
15900
15928
  }
15901
15929
 
@@ -16376,9 +16404,8 @@ declare module "@tiptap/core" {
16376
16404
 
16377
16405
  declare module "@tiptap/core" {
16378
16406
  interface Commands<ReturnType> {
16379
- enhanceHighlight: {
16380
- setEnhanceHighlight: (from: number, to: number) => ReturnType;
16381
- clearEnhanceHighlight: () => ReturnType;
16407
+ moodTracker: {
16408
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
16382
16409
  };
16383
16410
  }
16384
16411
  }
@@ -16386,8 +16413,9 @@ declare module "@tiptap/core" {
16386
16413
 
16387
16414
  declare module "@tiptap/core" {
16388
16415
  interface Commands<ReturnType> {
16389
- moodTracker: {
16390
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
16416
+ enhanceHighlight: {
16417
+ setEnhanceHighlight: (from: number, to: number) => ReturnType;
16418
+ clearEnhanceHighlight: () => ReturnType;
16391
16419
  };
16392
16420
  }
16393
16421
  }