@factorialco/f0-react 4.55.0 → 4.56.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/dist/f0.d.ts CHANGED
@@ -5821,8 +5821,14 @@ declare type EditableTableColumnDefinition<R extends RecordType, Sortings extend
5821
5821
  /**
5822
5822
  * Configuration for `"date"` cells. Accepts `minDate` / `maxDate` to
5823
5823
  * restrict the selectable date range in the picker.
5824
+ *
5825
+ * Can be a static object or a function that receives the current row item
5826
+ * to return a per-row range (e.g. bound one date field by another field's
5827
+ * value: `(item) => ({ minDate: parseISO(item.startDate) })`). The picker's
5828
+ * default visible month follows `minDate`, so a per-row `minDate` also
5829
+ * opens the calendar on that date.
5824
5830
  */
5825
- dateConfig?: DateCellConfig;
5831
+ dateConfig?: DateCellConfig | ((item: R) => DateCellConfig);
5826
5832
  /**
5827
5833
  * Called after this cell's value changes. Use to compute derived values
5828
5834
  * and update other cells in the same row.
@@ -6264,10 +6270,20 @@ export declare const F0AiChatCreditsButton: ({ credits, employeeCredits, trigger
6264
6270
  * - with-history: title acts as a thread selector (clickable) — the host
6265
6271
  * wires `onOpenHistory` to mount its own history dialog.
6266
6272
  * - legacy: title is static; a "new chat" button is shown when `hasMessages`.
6273
+ * Hosts can add header actions that F0 renders alongside the built-in controls.
6267
6274
  *
6268
6275
  * Decoupled from CopilotKit and `useAiChat()` — everything via props.
6269
6276
  */
6270
- export declare const F0AiChatHeader: ({ historyEnabled, title, currentThreadTitle, fullscreen, lockVisualizationMode, onToggleVisualizationMode, onClose, onNewChat, onOpenHistory, hasMessages, credits, employeeCredits, compact, }: F0AiChatHeaderProps) => JSX_2.Element;
6277
+ export declare const F0AiChatHeader: ({ historyEnabled, title, currentThreadTitle, fullscreen, lockVisualizationMode, onToggleVisualizationMode, onClose, onNewChat, onOpenHistory, hasMessages, credits, employeeCredits, compact, actions, }: F0AiChatHeaderProps) => JSX_2.Element;
6278
+
6279
+ export declare interface F0AiChatHeaderAction {
6280
+ /** Stable identifier used as the React key. */
6281
+ id: string;
6282
+ /** Already-localized accessible label and tooltip. */
6283
+ label: string;
6284
+ icon: IconType;
6285
+ onClick: () => void;
6286
+ }
6271
6287
 
6272
6288
  export declare type F0AiChatHeaderProps = {
6273
6289
  /**
@@ -6302,9 +6318,9 @@ export declare type F0AiChatHeaderProps = {
6302
6318
  /** Legacy variant gate: only renders the "new chat" button when true. */
6303
6319
  hasMessages?: boolean;
6304
6320
  /**
6305
- * Minimal header: render only the expand + close controls (no title, new
6306
- * chat or credits popover). Use when a sidebar owns the chat navigation and
6307
- * the credits/settings popover (see `F0AiChatCreditsButton`).
6321
+ * Minimal header: render only header actions plus the expand and close controls
6322
+ * (no title, new chat or credits popover). Use when a sidebar owns the chat
6323
+ * navigation and the credits/settings popover (see `F0AiChatCreditsButton`).
6308
6324
  */
6309
6325
  compact?: boolean;
6310
6326
  /** Credits configuration. When present, renders the credits popover button. */
@@ -6315,6 +6331,11 @@ export declare type F0AiChatHeaderProps = {
6315
6331
  * with `credits`). Hosts opt in per-employee.
6316
6332
  */
6317
6333
  employeeCredits?: AiChatEmployeeCredits;
6334
+ /**
6335
+ * Additional actions rendered immediately before the fullscreen and close
6336
+ * controls. F0 owns their presentation so they match the built-in actions.
6337
+ */
6338
+ actions?: F0AiChatHeaderAction[];
6318
6339
  };
6319
6340
 
6320
6341
  /**