@factorialco/f0-react 4.16.0 → 4.17.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/ai.d.ts CHANGED
@@ -266,7 +266,27 @@ export declare type AiChatProviderProps = {
266
266
  * UI config — does not affect runtime behavior.
267
267
  */
268
268
  initialMessage?: string | string[];
269
+ /**
270
+ * Grouped suggestions rendered as outline buttons above the composer on the
271
+ * welcome screen. Optional and independent of `welcomeScreenCards` — provide
272
+ * either, both, or neither, in any counts. No hard limit on the number of
273
+ * groups yet.
274
+ */
269
275
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
276
+ /**
277
+ * Cards rendered below the composer on the fullscreen welcome screen. Each
278
+ * card carries its own `onClick` — the chat owns the layout; the host owns
279
+ * the interaction.
280
+ *
281
+ * Hosts that must build a card's `onClick` inside the chat provider (e.g.
282
+ * needing `openCanvas`) can register the cards dynamically via
283
+ * `setWelcomeScreenCards` from `useAiChat()` instead of passing them here.
284
+ *
285
+ * Optional and independent of `welcomeScreenSuggestions` — provide either,
286
+ * both, or neither, in any counts. At most 4 cards are rendered (the row is a
287
+ * 2×2 grid); extras are dropped.
288
+ */
289
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
270
290
  disclaimer?: AiChatDisclaimer;
271
291
  /**
272
292
  * Enable resizable chat window
@@ -396,6 +416,8 @@ declare type AiChatProviderReturnValue = {
396
416
  setInitialMessage: React.Dispatch<React.SetStateAction<string | string[] | undefined>>;
397
417
  welcomeScreenSuggestions: WelcomeScreenSuggestion[];
398
418
  setWelcomeScreenSuggestions: React.Dispatch<React.SetStateAction<WelcomeScreenSuggestion[]>>;
419
+ welcomeScreenCards: F0AiChatWelcomeCard[];
420
+ setWelcomeScreenCards: React.Dispatch<React.SetStateAction<F0AiChatWelcomeCard[]>>;
399
421
  onThumbsUp?: (message: F0AIMessage, { threadId, feedback }: {
400
422
  threadId: string;
401
423
  feedback: string;
@@ -536,6 +558,7 @@ declare interface AiChatState {
536
558
  chatMessages?: React.ReactNode;
537
559
  chatInput?: React.ReactNode;
538
560
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
561
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
539
562
  disclaimer?: AiChatDisclaimer;
540
563
  resizable?: boolean;
541
564
  defaultVisualizationMode?: VisualizationMode;
@@ -2915,7 +2938,7 @@ export declare interface F0AiChatProps {
2915
2938
  /**
2916
2939
  * @experimental This is an experimental component use it at your own risk
2917
2940
  */
2918
- export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHeader, chatMessages, chatInput, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
2941
+ export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHeader, chatMessages, chatInput, welcomeScreenSuggestions, welcomeScreenCards, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
2919
2942
 
2920
2943
  /**
2921
2944
  * Headless chat composer.
@@ -2926,7 +2949,7 @@ export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHea
2926
2949
  * coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
2927
2950
  * provide the wiring.
2928
2951
  */
2929
- export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
2952
+ export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenCards, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
2930
2953
 
2931
2954
  export declare type F0AiChatTextAreaProps = {
2932
2955
  ref: RefObject<HTMLDivElement>;
@@ -2998,16 +3021,28 @@ export declare type F0AiChatTextAreaProps = {
2998
3021
  * the welcome screen. Clicking a group opens a single popover (above the
2999
3022
  * row, left-aligned, spanning the composer width) with that group's items.
3000
3023
  * Hovering an item previews its prompt in the textarea placeholder.
3024
+ *
3025
+ * Optional and independent of `welcomeScreenCards` — the two can have
3026
+ * different counts. No hard limit on the number of groups yet.
3001
3027
  */
3002
3028
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
3003
3029
  /** Called when the user clicks a sub-suggestion. Receives the picked
3004
3030
  * `item` and its parent `group` (the outline-button entry). */
3005
3031
  onSuggestionClick?: (item: WelcomeScreenSuggestionItem, group: WelcomeScreenSuggestion) => void;
3032
+ /**
3033
+ * Cards rendered as a grid below the composer on the fullscreen welcome
3034
+ * screen. Each card carries its own `onClick`; the host decides the behavior.
3035
+ *
3036
+ * Optional and independent of `welcomeScreenSuggestions` — the two can have
3037
+ * different counts. At most 4 cards are rendered (a 2×2 grid); extras are
3038
+ * dropped.
3039
+ */
3040
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
3006
3041
  /**
3007
3042
  * When true on the welcome screen, the composer adopts the fullscreen
3008
3043
  * layout: the input slot grows to claim the bottom half (so the textarea
3009
- * rises toward the vertical center), and the welcome suggestions render
3010
- * below the textarea with their popover opening downward (instead of above).
3044
+ * rises toward the vertical center) and the welcome cards render below it.
3045
+ * The welcome suggestions row sits above the composer in both layouts.
3011
3046
  */
3012
3047
  fullscreen?: boolean;
3013
3048
  };
@@ -3027,6 +3062,35 @@ export declare type F0AiChatTextAreaSubmitPayload = {
3027
3062
  quote: PendingQuote | null;
3028
3063
  };
3029
3064
 
3065
+ /**
3066
+ * A card shown below the composer on the fullscreen welcome screen, rendered
3067
+ * as an `F0CardHorizontal`. Each card owns its behavior via `onClick`, so
3068
+ * different cards can trigger different things (send a prompt, open a dialog,
3069
+ * navigate, …).
3070
+ *
3071
+ * The chat owns the layout; the host owns the interaction. Up to 4 cards are
3072
+ * rendered (a 2×2 grid); extras are dropped.
3073
+ */
3074
+ export declare type F0AiChatWelcomeCard = {
3075
+ /** Stable identifier, also used as the React key. */
3076
+ id: string;
3077
+ icon: IconType;
3078
+ title: string;
3079
+ description?: string;
3080
+ /**
3081
+ * Optional prompt the card represents. The card's own `onClick` decides
3082
+ * whether to send it — cards without a `message` (e.g. a "Browse templates"
3083
+ * card) simply do something else.
3084
+ */
3085
+ message?: string;
3086
+ /**
3087
+ * Invoked when the card is clicked. The host wires the behavior per card —
3088
+ * send `message` as a prompt, open a dialog, navigate, … A card without an
3089
+ * `onClick` renders as non-interactive.
3090
+ */
3091
+ onClick?: () => void;
3092
+ };
3093
+
3030
3094
  export declare const F0AiInsightCard: WithDataTestIdReturnType_2<ForwardRefExoticComponent<F0AiInsightCardPublicProps & RefAttributes<HTMLDivElement>> & {
3031
3095
  Skeleton: () => JSX_2.Element;
3032
3096
  }>;
@@ -4890,7 +4954,8 @@ declare interface WeekdaysProps {
4890
4954
 
4891
4955
  /**
4892
4956
  * A welcome-screen group rendered as an outline button in the welcome row.
4893
- * Clicking the group opens a popover listing its `items`.
4957
+ * Clicking the group opens a popover listing its `items`. The number of groups
4958
+ * is not capped yet (unlike welcome cards, which top out at 4).
4894
4959
  */
4895
4960
  export declare type WelcomeScreenSuggestion = {
4896
4961
  icon: IconType;
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as h } from "./F0CanvasPanel-BG60xqVg.js";
1
+ import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as h } from "./F0CanvasPanel-D27ptXCV.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay-ULAd1MR5.js";
3
+ import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay-DAZ9hqA5.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -524,7 +524,27 @@ declare type AiChatProviderProps = {
524
524
  * UI config — does not affect runtime behavior.
525
525
  */
526
526
  initialMessage?: string | string[];
527
+ /**
528
+ * Grouped suggestions rendered as outline buttons above the composer on the
529
+ * welcome screen. Optional and independent of `welcomeScreenCards` — provide
530
+ * either, both, or neither, in any counts. No hard limit on the number of
531
+ * groups yet.
532
+ */
527
533
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
534
+ /**
535
+ * Cards rendered below the composer on the fullscreen welcome screen. Each
536
+ * card carries its own `onClick` — the chat owns the layout; the host owns
537
+ * the interaction.
538
+ *
539
+ * Hosts that must build a card's `onClick` inside the chat provider (e.g.
540
+ * needing `openCanvas`) can register the cards dynamically via
541
+ * `setWelcomeScreenCards` from `useAiChat()` instead of passing them here.
542
+ *
543
+ * Optional and independent of `welcomeScreenSuggestions` — provide either,
544
+ * both, or neither, in any counts. At most 4 cards are rendered (the row is a
545
+ * 2×2 grid); extras are dropped.
546
+ */
547
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
528
548
  disclaimer?: AiChatDisclaimer;
529
549
  /**
530
550
  * Enable resizable chat window
@@ -4526,6 +4546,35 @@ export declare const F0AiBanner: ForwardRefExoticComponent<Omit<AiBannerInternal
4526
4546
 
4527
4547
  export declare type F0AiBannerProps = AiBannerInternalProps;
4528
4548
 
4549
+ /**
4550
+ * A card shown below the composer on the fullscreen welcome screen, rendered
4551
+ * as an `F0CardHorizontal`. Each card owns its behavior via `onClick`, so
4552
+ * different cards can trigger different things (send a prompt, open a dialog,
4553
+ * navigate, …).
4554
+ *
4555
+ * The chat owns the layout; the host owns the interaction. Up to 4 cards are
4556
+ * rendered (a 2×2 grid); extras are dropped.
4557
+ */
4558
+ declare type F0AiChatWelcomeCard = {
4559
+ /** Stable identifier, also used as the React key. */
4560
+ id: string;
4561
+ icon: IconType;
4562
+ title: string;
4563
+ description?: string;
4564
+ /**
4565
+ * Optional prompt the card represents. The card's own `onClick` decides
4566
+ * whether to send it — cards without a `message` (e.g. a "Browse templates"
4567
+ * card) simply do something else.
4568
+ */
4569
+ message?: string;
4570
+ /**
4571
+ * Invoked when the card is clicked. The host wires the behavior per card —
4572
+ * send `message` as a prompt, open a dialog, navigate, … A card without an
4573
+ * `onClick` renders as non-interactive.
4574
+ */
4575
+ onClick?: () => void;
4576
+ };
4577
+
4529
4578
  /** Assistant-flavoured `F0Message`. Same shape — alias kept for clarity. */
4530
4579
  declare type F0AIMessage = F0Message;
4531
4580
 
@@ -10277,7 +10326,8 @@ export declare type WeekStartsOn = (typeof WeekStartDay)[keyof typeof WeekStartD
10277
10326
 
10278
10327
  /**
10279
10328
  * A welcome-screen group rendered as an outline button in the welcome row.
10280
- * Clicking the group opens a popover listing its `items`.
10329
+ * Clicking the group opens a popover listing its `items`. The number of groups
10330
+ * is not capped yet (unlike welcome cards, which top out at 4).
10281
10331
  */
10282
10332
  declare type WelcomeScreenSuggestion = {
10283
10333
  icon: IconType;
@@ -1,9 +1,9 @@
1
- import { h as Ua, B as Va, i as Ga, j as Ka, k as wn, l as lt, m as et, n as qa, o as g, p as ae, q as $e, u as te, T as Ya, r as Qa, s as Ja, R as Xa, t as Za, v as ye, w as es, x as nn, y as bt, z as at, A as Ee, E as ts, G as ns, H as Z, J as rs, K as as, L as ce, M as ir, N as ss, O as is, Q as ue, S as St, U as Q, V as He, W as os, X as ls, Y as cs, Z as ds, _ as us, $ as Se, a0 as or, a1 as lr, a2 as Be, a3 as xt, a4 as fs, e as cr, a5 as We, a6 as dr, a7 as Ft, a8 as Ne, a9 as pe, aa as vt, ab as ur, ac as ms, ad as fr, ae as ve, af as we, ag as hs, ah as ps, ai as gs, aj as bs, ak as xs, al as ze, am as Tt, an as mr, ao as vs, ap as ys, aq as ws, ar as At, as as hr, at as pr, au as Ns, av as Cs, aw as yt, ax as ks, ay as gr, az as Is, aA as Ss, aB as Fs, aC as Ts, aD as As, aE as br, aF as xr, aG as vr, aH as Gt, aI as yr, aJ as Kt, aK as wr, aL as Es, aM as Rs, aN as Ds, aO as Nr, aP as Ps, aQ as De, aR as Je, aS as qt, aT as Cr, aU as Ls, aV as rn, aW as Os, aX as _s, aY as zs, aZ as Ye, a_ as $s, a$ as Bs, b0 as ct, b1 as Nn, b2 as Yt, b3 as Ms, b4 as js, a as Ws, b as Hs, b5 as Et, b6 as Us, g as Vs, F as Gs, b7 as Ks, b8 as kr, b9 as qs, ba as an, bb as Ys, bc as sn, bd as Xe, be as Qs, bf as Ir, bg as Sr, bh as Js, bi as Fr, bj as Xs, bk as Zs, bl as ei, bm as Tr, bn as ti, bo as ni, bp as ri, bq as on, br as ai, bs as si, bt as ii, bu as oi, bv as li, bw as ci, bx as Ar, by as Er, bz as di, bA as ui, bB as fi, bC as mi, bD as hi, bE as Rr, bF as pi, bG as gi, bH as Dr, bI as Pr, bJ as bi, bK as xi, bL as vi, bM as yi, bN as wi, bO as Ni, bP as Lr, bQ as Ci, bR as ki, bS as Ii, bT as Or, bU as Si, bV as Fi, bW as Ti, bX as Ai, bY as Ei, bZ as Ri, b_ as Pe, b$ as ln, c0 as cn, c1 as dn, c2 as _r, c3 as un, c4 as zr, c5 as $r, c6 as Di, c7 as Pi, c8 as Li, c9 as Oi, ca as _i, cb as zi, cc as $i, cd as Cn, ce as Bi, cf as Mi, cg as kn, ch as In, ci as Sn, cj as ji, ck as Wi, cl as Hi, cm as Ui, cn as Br, co as Vi, cp as Gi } from "./F0CanvasPanel-BG60xqVg.js";
2
- import { cB as xm, cA as vm, cN as ym, cx as wm, cy as Nm, cq as Cm, cr as km, cr as Im, cs as Sm, cQ as Fm, cz as Tm, cJ as Am, cK as Em, cO as Rm, ct as Dm, cD as Pm, cC as Lm, cu as Om, cv as _m, cL as zm, cR as $m, cM as Bm, cP as Mm, cI as jm, cF as Wm, cH as Hm, cE as Um, cw as Vm, cG as Gm } from "./F0CanvasPanel-BG60xqVg.js";
1
+ import { h as Ua, B as Va, i as Ga, j as Ka, k as wn, l as lt, m as et, n as qa, o as g, p as ae, q as $e, u as te, T as Ya, r as Qa, s as Ja, R as Xa, t as Za, v as ye, w as es, x as nn, y as bt, z as at, A as Ee, E as ts, G as ns, H as Z, J as rs, K as as, L as ce, M as ir, N as ss, O as is, Q as ue, S as St, U as Q, V as He, W as os, X as ls, Y as cs, Z as ds, _ as us, $ as Se, a0 as or, a1 as lr, a2 as Be, a3 as xt, a4 as fs, e as cr, a5 as We, a6 as dr, a7 as Ft, a8 as Ne, a9 as pe, aa as vt, ab as ur, ac as ms, ad as fr, ae as ve, af as we, ag as hs, ah as ps, ai as gs, aj as bs, ak as xs, al as ze, am as Tt, an as mr, ao as vs, ap as ys, aq as ws, ar as At, as as hr, at as pr, au as Ns, av as Cs, aw as yt, ax as ks, ay as gr, az as Is, aA as Ss, aB as Fs, aC as Ts, aD as As, aE as br, aF as xr, aG as vr, aH as Gt, aI as yr, aJ as Kt, aK as wr, aL as Es, aM as Rs, aN as Ds, aO as Nr, aP as Ps, aQ as De, aR as Je, aS as qt, aT as Cr, aU as Ls, aV as rn, aW as Os, aX as _s, aY as zs, aZ as Ye, a_ as $s, a$ as Bs, b0 as ct, b1 as Nn, b2 as Yt, b3 as Ms, b4 as js, a as Ws, b as Hs, b5 as Et, b6 as Us, g as Vs, F as Gs, b7 as Ks, b8 as kr, b9 as qs, ba as an, bb as Ys, bc as sn, bd as Xe, be as Qs, bf as Ir, bg as Sr, bh as Js, bi as Fr, bj as Xs, bk as Zs, bl as ei, bm as Tr, bn as ti, bo as ni, bp as ri, bq as on, br as ai, bs as si, bt as ii, bu as oi, bv as li, bw as ci, bx as Ar, by as Er, bz as di, bA as ui, bB as fi, bC as mi, bD as hi, bE as Rr, bF as pi, bG as gi, bH as Dr, bI as Pr, bJ as bi, bK as xi, bL as vi, bM as yi, bN as wi, bO as Ni, bP as Lr, bQ as Ci, bR as ki, bS as Ii, bT as Or, bU as Si, bV as Fi, bW as Ti, bX as Ai, bY as Ei, bZ as Ri, b_ as Pe, b$ as ln, c0 as cn, c1 as dn, c2 as _r, c3 as un, c4 as zr, c5 as $r, c6 as Di, c7 as Pi, c8 as Li, c9 as Oi, ca as _i, cb as zi, cc as $i, cd as Cn, ce as Bi, cf as Mi, cg as kn, ch as In, ci as Sn, cj as ji, ck as Wi, cl as Hi, cm as Ui, cn as Br, co as Vi, cp as Gi } from "./F0CanvasPanel-D27ptXCV.js";
2
+ import { cB as xm, cA as vm, cN as ym, cx as wm, cy as Nm, cq as Cm, cr as km, cr as Im, cs as Sm, cQ as Fm, cz as Tm, cJ as Am, cK as Em, cO as Rm, ct as Dm, cD as Pm, cC as Lm, cu as Om, cv as _m, cL as zm, cR as $m, cM as Bm, cP as Mm, cI as jm, cF as Wm, cH as Hm, cE as Um, cw as Vm, cG as Gm } from "./F0CanvasPanel-D27ptXCV.js";
3
3
  import { jsx as t, jsxs as d, Fragment as fe } from "react/jsx-runtime";
4
4
  import Te, { forwardRef as de, useRef as O, useTransition as Ki, useState as A, useLayoutEffect as Qe, useId as Qt, useContext as Le, createContext as Ie, useEffect as G, useCallback as H, useMemo as X, Fragment as Ke, isValidElement as qi, cloneElement as Mr, memo as jr, Children as Wr } from "react";
5
- import { C as Yi, P as Qi, a as st, M as Ji, p as Xi, b as Zi, R as Fn, c as Hr, u as eo, d as to, e as no, f as ro, g as ao, D as so, h as io, O as Ur, i as Vr, S as oo, A as lo, B as co, L as uo, j as fo, V as mo, k as ho, l as po, m as go } from "./useDataCollectionSource-CKu3oieA.js";
6
- import { s as qm, t as Ym, q as Qm, J as Jm, v as Xm, E as Zm, aa as eh, I as th, r as nh, ac as rh, ab as ah, U as sh, af as ih, F as oh, _ as lh, X as ch, N as dh, ah as uh, Q as fh, $ as mh, a0 as hh, w as ph, ad as gh, ae as bh, T as xh, a1 as vh, a7 as yh, a9 as wh, x as Nh, z as Ch, G as kh, Y as Ih, ag as Sh, Z as Fh, W as Th, ai as Ah, y as Eh, H as Rh, n as Dh, o as Ph, a3 as Lh, a4 as Oh, a8 as _h, K as zh, a5 as $h, a2 as Bh, a6 as Mh } from "./useDataCollectionSource-CKu3oieA.js";
5
+ import { C as Yi, P as Qi, a as st, M as Ji, p as Xi, b as Zi, R as Fn, c as Hr, u as eo, d as to, e as no, f as ro, g as ao, D as so, h as io, O as Ur, i as Vr, S as oo, A as lo, B as co, L as uo, j as fo, V as mo, k as ho, l as po, m as go } from "./useDataCollectionSource-C0kEZrNj.js";
6
+ import { s as qm, t as Ym, q as Qm, J as Jm, v as Xm, E as Zm, aa as eh, I as th, r as nh, ac as rh, ab as ah, U as sh, af as ih, F as oh, _ as lh, X as ch, N as dh, ah as uh, Q as fh, $ as mh, a0 as hh, w as ph, ad as gh, ae as bh, T as xh, a1 as vh, a7 as yh, a9 as wh, x as Nh, z as Ch, G as kh, Y as Ih, ag as Sh, Z as Fh, W as Th, ai as Ah, y as Eh, H as Rh, n as Dh, o as Ph, a3 as Lh, a4 as Oh, a8 as _h, K as zh, a5 as $h, a2 as Bh, a6 as Mh } from "./useDataCollectionSource-C0kEZrNj.js";
7
7
  const bo = Ua("Search", [
8
8
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
9
9
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -552,7 +552,27 @@ export declare type AiChatProviderProps = {
552
552
  * UI config — does not affect runtime behavior.
553
553
  */
554
554
  initialMessage?: string | string[];
555
+ /**
556
+ * Grouped suggestions rendered as outline buttons above the composer on the
557
+ * welcome screen. Optional and independent of `welcomeScreenCards` — provide
558
+ * either, both, or neither, in any counts. No hard limit on the number of
559
+ * groups yet.
560
+ */
555
561
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
562
+ /**
563
+ * Cards rendered below the composer on the fullscreen welcome screen. Each
564
+ * card carries its own `onClick` — the chat owns the layout; the host owns
565
+ * the interaction.
566
+ *
567
+ * Hosts that must build a card's `onClick` inside the chat provider (e.g.
568
+ * needing `openCanvas`) can register the cards dynamically via
569
+ * `setWelcomeScreenCards` from `useAiChat()` instead of passing them here.
570
+ *
571
+ * Optional and independent of `welcomeScreenSuggestions` — provide either,
572
+ * both, or neither, in any counts. At most 4 cards are rendered (the row is a
573
+ * 2×2 grid); extras are dropped.
574
+ */
575
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
556
576
  disclaimer?: AiChatDisclaimer;
557
577
  /**
558
578
  * Enable resizable chat window
@@ -682,6 +702,8 @@ declare type AiChatProviderReturnValue = {
682
702
  setInitialMessage: React.Dispatch<React.SetStateAction<string | string[] | undefined>>;
683
703
  welcomeScreenSuggestions: WelcomeScreenSuggestion[];
684
704
  setWelcomeScreenSuggestions: React.Dispatch<React.SetStateAction<WelcomeScreenSuggestion[]>>;
705
+ welcomeScreenCards: F0AiChatWelcomeCard[];
706
+ setWelcomeScreenCards: React.Dispatch<React.SetStateAction<F0AiChatWelcomeCard[]>>;
685
707
  onThumbsUp?: (message: F0AIMessage, { threadId, feedback }: {
686
708
  threadId: string;
687
709
  feedback: string;
@@ -822,6 +844,7 @@ declare interface AiChatState {
822
844
  chatMessages?: React.ReactNode;
823
845
  chatInput?: React.ReactNode;
824
846
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
847
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
825
848
  disclaimer?: AiChatDisclaimer;
826
849
  resizable?: boolean;
827
850
  defaultVisualizationMode?: VisualizationMode;
@@ -6187,7 +6210,7 @@ export declare interface F0AiChatProps {
6187
6210
  /**
6188
6211
  * @experimental This is an experimental component use it at your own risk
6189
6212
  */
6190
- export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHeader, chatMessages, chatInput, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
6213
+ export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHeader, chatMessages, chatInput, welcomeScreenSuggestions, welcomeScreenCards, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
6191
6214
 
6192
6215
  /**
6193
6216
  * Headless chat composer.
@@ -6198,7 +6221,7 @@ export declare const F0AiChatProvider: ({ enabled, side, initialMessage, chatHea
6198
6221
  * coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
6199
6222
  * provide the wiring.
6200
6223
  */
6201
- export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
6224
+ export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenCards, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
6202
6225
 
6203
6226
  export declare type F0AiChatTextAreaProps = {
6204
6227
  ref: RefObject<HTMLDivElement>;
@@ -6270,16 +6293,28 @@ export declare type F0AiChatTextAreaProps = {
6270
6293
  * the welcome screen. Clicking a group opens a single popover (above the
6271
6294
  * row, left-aligned, spanning the composer width) with that group's items.
6272
6295
  * Hovering an item previews its prompt in the textarea placeholder.
6296
+ *
6297
+ * Optional and independent of `welcomeScreenCards` — the two can have
6298
+ * different counts. No hard limit on the number of groups yet.
6273
6299
  */
6274
6300
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
6275
6301
  /** Called when the user clicks a sub-suggestion. Receives the picked
6276
6302
  * `item` and its parent `group` (the outline-button entry). */
6277
6303
  onSuggestionClick?: (item: WelcomeScreenSuggestionItem, group: WelcomeScreenSuggestion) => void;
6304
+ /**
6305
+ * Cards rendered as a grid below the composer on the fullscreen welcome
6306
+ * screen. Each card carries its own `onClick`; the host decides the behavior.
6307
+ *
6308
+ * Optional and independent of `welcomeScreenSuggestions` — the two can have
6309
+ * different counts. At most 4 cards are rendered (a 2×2 grid); extras are
6310
+ * dropped.
6311
+ */
6312
+ welcomeScreenCards?: F0AiChatWelcomeCard[];
6278
6313
  /**
6279
6314
  * When true on the welcome screen, the composer adopts the fullscreen
6280
6315
  * layout: the input slot grows to claim the bottom half (so the textarea
6281
- * rises toward the vertical center), and the welcome suggestions render
6282
- * below the textarea with their popover opening downward (instead of above).
6316
+ * rises toward the vertical center) and the welcome cards render below it.
6317
+ * The welcome suggestions row sits above the composer in both layouts.
6283
6318
  */
6284
6319
  fullscreen?: boolean;
6285
6320
  };
@@ -6299,6 +6334,35 @@ export declare type F0AiChatTextAreaSubmitPayload = {
6299
6334
  quote: PendingQuote | null;
6300
6335
  };
6301
6336
 
6337
+ /**
6338
+ * A card shown below the composer on the fullscreen welcome screen, rendered
6339
+ * as an `F0CardHorizontal`. Each card owns its behavior via `onClick`, so
6340
+ * different cards can trigger different things (send a prompt, open a dialog,
6341
+ * navigate, …).
6342
+ *
6343
+ * The chat owns the layout; the host owns the interaction. Up to 4 cards are
6344
+ * rendered (a 2×2 grid); extras are dropped.
6345
+ */
6346
+ export declare type F0AiChatWelcomeCard = {
6347
+ /** Stable identifier, also used as the React key. */
6348
+ id: string;
6349
+ icon: IconType;
6350
+ title: string;
6351
+ description?: string;
6352
+ /**
6353
+ * Optional prompt the card represents. The card's own `onClick` decides
6354
+ * whether to send it — cards without a `message` (e.g. a "Browse templates"
6355
+ * card) simply do something else.
6356
+ */
6357
+ message?: string;
6358
+ /**
6359
+ * Invoked when the card is clicked. The host wires the behavior per card —
6360
+ * send `message` as a prompt, open a dialog, navigate, … A card without an
6361
+ * `onClick` renders as non-interactive.
6362
+ */
6363
+ onClick?: () => void;
6364
+ };
6365
+
6302
6366
  /**
6303
6367
  * Context value for the AI form registry
6304
6368
  */
@@ -17314,7 +17378,8 @@ export declare type WeekStartsOn = (typeof WeekStartDay)[keyof typeof WeekStartD
17314
17378
 
17315
17379
  /**
17316
17380
  * A welcome-screen group rendered as an outline button in the welcome row.
17317
- * Clicking the group opens a popover listing its `items`.
17381
+ * Clicking the group opens a popover listing its `items`. The number of groups
17382
+ * is not capped yet (unlike welcome cards, which top out at 4).
17318
17383
  */
17319
17384
  export declare type WelcomeScreenSuggestion = {
17320
17385
  icon: IconType;
package/dist/f0.js CHANGED
@@ -1,13 +1,13 @@
1
- import { a8 as rt, b_ as K_, o as ae, q as Nn, gB as c2, p as Mn, eS as RG, gH as f2, af as Jp, U as K, u as We, H as tt, dm as hu, A as Xl, j as PG, L as xv, bP as no, a9 as Gt, a5 as Wf, gI as kG, ae as kl, gy as ub, gJ as OG, gK as BG, gL as uC, e0 as zG, gM as VG, gN as d2, fr as eg, gO as FG, gP as GG, gQ as Al, gR as $f, gS as vu, gT as HG, gU as h2, gV as WG, gW as $G, ch as UG, cg as YG, v as Es, J as Uf, K as Yf, Q as nt, O as Xf, fR as v2, Y as Zt, ad as qf, _ as ys, aQ as Q_, am as J_, gX as XG, b9 as qG, dX as cC, bN as p2, ba as ql, bb as ZG, aE as ew, aF as tw, aG as rw, cN as _v, gY as g2, gZ as jG, fv as KG, gA as fC, g_ as QG, g$ as JG, h0 as e3, h1 as t3, h2 as r3, dV as nw, aD as m2, h3 as dC, fp as n3, h4 as i3, fY as pu, fZ as Zf, g9 as a3, fP as y2, aa as bn, ar as o3, cY as cb, bU as b2, h5 as s3, f$ as x2, fO as l3, h6 as tg, dw as iw, gm as u3, a3 as _2, fo as c3, cj as f3, gb as aw, bA as d3, bB as h3, bC as v3, d as p3, eC as g3, G as w2, d2 as Ls, dK as S2, dv as C2, cm as ow, bL as T2, cS as sw, fT as Ol, fU as Bl, N as zl, fV as Vl, fS as Ga, bV as D2, at as m3, dt as wv, bm as Zl, be as Br, ct as y3, a2 as A2, dx as fb, dY as sf, cs as b3, $ as jf, aZ as M2, gg as qr, h7 as x3, h8 as _3, h9 as E2, ha as rg, hb as w3, hc as S3, bQ as L2, bR as N2, hd as C3, aT as I2, bS as R2, b$ as gu, c3 as mu, ca as Kf, dM as T3, c0 as D3, b8 as A3, S as P2, bd as M3, a1 as E3, bv as hC, dJ as lf, fs as L3, ft as N3, he as I3, aY as R3, c4 as P3, bT as k2, a6 as k3, bZ as O3, gE as B3, hf as db, bH as O2, b0 as z3, y as B2, hg as z2, hh as V2, hi as V3, hj as F3, I as G3, hk as H3, hl as W3, hm as $3, hn as U3 } from "./F0CanvasPanel-BG60xqVg.js";
2
- import { hD as yge, C as bge, D as xge, aR as _ge, c as wge, F as Sge, a as Cge, hw as Tge, f as Dge, bh as Age, aS as Mge, cc as Ege, dS as Lge, aJ as Nge, bq as Ige, al as Rge, d$ as Pge, au as kge, cq as Oge, g as Bge, bD as zge, cr as Vge, hr as Fge, hr as Gge, hI as Hge, bI as Wge, e as $ge, bM as Uge, aw as Yge, c5 as Xge, hy as qge, b4 as Zge, hz as jge, hB as Kge, hC as Qge, cQ as Jge, hF as eme, cJ as tme, cK as rme, P as nme, cO as ime, hA as ame, cL as ome, hE as sme, hJ as lme, ho as ume, hp as cme, hq as fme, cM as dme, hH as hme, hx as vme, hu as pme, ht as gme, cP as mme, fM as yme, gn as bme, hG as xme, aW as _me, cI as wme, cF as Sme, cH as Cme, cE as Tme, hv as Dme, gp as Ame, gj as Mme, g0 as Eme, hM as Lme, cw as Nme, cG as Ime, hL as Rme, br as Pme, dT as kme, fL as Ome, g1 as Bme, b as zme, bu as Vme, gG as Fme, aU as Gme, dU as Hme, hs as Wme, hs as $me, gl as Ume, gk as Yme, hK as Xme } from "./F0CanvasPanel-BG60xqVg.js";
1
+ import { a8 as rt, b_ as K_, o as ae, q as Nn, gC as c2, p as Mn, eS as RG, gI as f2, af as Jp, U as K, u as We, H as tt, dm as hu, A as Xl, j as PG, L as xv, bP as no, a9 as Gt, a5 as Wf, gJ as kG, ae as kl, gz as ub, gK as OG, gL as BG, gM as uC, e0 as zG, gN as VG, gO as d2, fr as eg, gP as FG, gQ as GG, gR as Al, gS as $f, gT as vu, gU as HG, gV as h2, gW as WG, gX as $G, ch as UG, cg as YG, v as Es, J as Uf, K as Yf, Q as nt, O as Xf, fR as v2, Y as Zt, ad as qf, _ as ys, aQ as Q_, am as J_, gY as XG, b9 as qG, dX as cC, bN as p2, ba as ql, bb as ZG, aE as ew, aF as tw, aG as rw, cN as _v, gZ as g2, g_ as jG, fv as KG, gB as fC, g$ as QG, h0 as JG, h1 as e3, h2 as t3, h3 as r3, dV as nw, aD as m2, h4 as dC, fp as n3, h5 as i3, fY as pu, fZ as Zf, ga as a3, fP as y2, aa as bn, ar as o3, cY as cb, bU as b2, h6 as s3, f$ as x2, fO as l3, h7 as tg, dw as iw, gn as u3, a3 as _2, fo as c3, cj as f3, gc as aw, bA as d3, bB as h3, bC as v3, d as p3, eC as g3, G as w2, d2 as Ls, dK as S2, dv as C2, cm as ow, bL as T2, cS as sw, fT as Ol, fU as Bl, N as zl, fV as Vl, fS as Ga, bV as D2, at as m3, dt as wv, bm as Zl, be as Br, ct as y3, a2 as A2, dx as fb, dY as sf, cs as b3, $ as jf, aZ as M2, gh as qr, h8 as x3, h9 as _3, ha as E2, hb as rg, hc as w3, hd as S3, bQ as L2, bR as N2, he as C3, aT as I2, bS as R2, b$ as gu, c3 as mu, ca as Kf, dM as T3, c0 as D3, b8 as A3, S as P2, bd as M3, a1 as E3, bv as hC, dJ as lf, fs as L3, ft as N3, hf as I3, aY as R3, c4 as P3, bT as k2, a6 as k3, bZ as O3, gF as B3, hg as db, bH as O2, b0 as z3, y as B2, hh as z2, hi as V2, hj as V3, hk as F3, I as G3, hl as H3, hm as W3, hn as $3, ho as U3 } from "./F0CanvasPanel-D27ptXCV.js";
2
+ import { hE as yge, C as bge, D as xge, aR as _ge, c as wge, F as Sge, a as Cge, hx as Tge, f as Dge, bh as Age, aS as Mge, cc as Ege, dS as Lge, aJ as Nge, bq as Ige, al as Rge, d$ as Pge, au as kge, cq as Oge, g as Bge, bD as zge, cr as Vge, hs as Fge, hs as Gge, hJ as Hge, bI as Wge, e as $ge, bM as Uge, aw as Yge, c5 as Xge, hz as qge, b4 as Zge, hA as jge, hC as Kge, hD as Qge, cQ as Jge, hG as eme, cJ as tme, cK as rme, P as nme, cO as ime, hB as ame, cL as ome, hF as sme, hK as lme, hp as ume, hq as cme, hr as fme, cM as dme, hI as hme, hy as vme, hv as pme, hu as gme, cP as mme, fM as yme, go as bme, hH as xme, aW as _me, cI as wme, cF as Sme, cH as Cme, cE as Tme, hw as Dme, gq as Ame, gk as Mme, g0 as Eme, hN as Lme, cw as Nme, cG as Ime, hM as Rme, br as Pme, dT as kme, fL as Ome, g1 as Bme, b as zme, bu as Vme, gH as Fme, aU as Gme, dU as Hme, ht as Wme, ht as $me, gm as Ume, gl as Yme, hL as Xme } from "./F0CanvasPanel-D27ptXCV.js";
3
3
  import { jsx as S, jsxs as B, Fragment as it } from "react/jsx-runtime";
4
4
  import * as wt from "react";
5
5
  import xt, { forwardRef as yr, useRef as ie, useImperativeHandle as Y3, Children as Sv, createContext as nn, useContext as Lr, useState as re, useMemo as le, useEffect as de, useCallback as oe, useLayoutEffect as hb, isValidElement as F2, Fragment as yu, memo as G2, useReducer as X3, cloneElement as q3, useId as Hc, useSyncExternalStore as jl } from "react";
6
- import { D as Z3, E as j3, G as K3, H as H2, I as Cv, J as lw, K as W2, L as $2, M as bi, N as Q3, O as J3, P as eH, Q as tH, R as rH, F as nH } from "./F0AiProcessingOverlay-ULAd1MR5.js";
7
- import { A as Zme, C as jme, t as Kme, s as Qme, v as Jme, y as eye, l as tye, i as rye, q as nye, z as iye, B as aye, p as oye, r as sye, j as lye, e as uye, g as cye, k as fye, T as dye, w as hye, h as vye, a as pye, n as gye, m as mye, o as yye, b as bye, f as xye, x as _ye, c as wye, d as Sye, u as Cye } from "./F0AiProcessingOverlay-ULAd1MR5.js";
6
+ import { D as Z3, E as j3, G as K3, H as H2, I as Cv, J as lw, K as W2, L as $2, M as bi, N as Q3, O as J3, P as eH, Q as tH, R as rH, F as nH } from "./F0AiProcessingOverlay-DAZ9hqA5.js";
7
+ import { A as Zme, C as jme, t as Kme, s as Qme, v as Jme, y as eye, l as tye, i as rye, q as nye, z as iye, B as aye, p as oye, r as sye, j as lye, e as uye, g as cye, k as fye, T as dye, w as hye, h as vye, a as pye, n as gye, m as mye, o as yye, b as bye, f as xye, x as _ye, c as wye, d as Sye, u as Cye } from "./F0AiProcessingOverlay-DAZ9hqA5.js";
8
8
  import { createPortal as Qf, unstable_batchedUpdates as Sd } from "react-dom";
9
- import { aj as U2, C as iH, F as Y2, ak as X2, al as aH, am as oH, an as sH, ao as ng, ap as ig, I as lH, aq as uH, ar as pa, _ as cH, aa as fH, as as dH, U as hH, at as vH, au as pH, c as ag, R as uw, u as cw, Y as q2, O as fw, D as gH, h as mH, av as Z2, aw as vC, ax as dw, q as yH, d as j2, a1 as K2, ay as bH, az as xH, aA as _H, aB as wH, aC as SH, M as CH } from "./useDataCollectionSource-CKu3oieA.js";
10
- import { s as Dye, t as Aye, J as Mye, v as Eye, E as Lye, aT as Nye, aS as Iye, aO as Rye, aE as Pye, aD as kye, aF as Oye, aG as Bye, ac as zye, ab as Vye, af as Fye, X as Gye, N as Hye, ah as Wye, Q as $ye, w as Uye, aU as Yye, ad as Xye, ae as qye, T as Zye, x as jye, P as Kye, z as Qye, G as Jye, ag as e0e, W as t0e, ai as r0e, y as n0e, H as i0e, aW as a0e, n as o0e, o as s0e, aN as l0e, aJ as u0e, aI as c0e, aV as f0e, a8 as d0e, aL as h0e, aM as v0e, K as p0e, aX as g0e, aY as m0e, e as y0e, aP as b0e, aQ as x0e, aR as _0e, aK as w0e, f as S0e, i as C0e, aH as T0e, aZ as D0e } from "./useDataCollectionSource-CKu3oieA.js";
9
+ import { aj as U2, C as iH, F as Y2, ak as X2, al as aH, am as oH, an as sH, ao as ng, ap as ig, I as lH, aq as uH, ar as pa, _ as cH, aa as fH, as as dH, U as hH, at as vH, au as pH, c as ag, R as uw, u as cw, Y as q2, O as fw, D as gH, h as mH, av as Z2, aw as vC, ax as dw, q as yH, d as j2, a1 as K2, ay as bH, az as xH, aA as _H, aB as wH, aC as SH, M as CH } from "./useDataCollectionSource-C0kEZrNj.js";
10
+ import { s as Dye, t as Aye, J as Mye, v as Eye, E as Lye, aT as Nye, aS as Iye, aO as Rye, aE as Pye, aD as kye, aF as Oye, aG as Bye, ac as zye, ab as Vye, af as Fye, X as Gye, N as Hye, ah as Wye, Q as $ye, w as Uye, aU as Yye, ad as Xye, ae as qye, T as Zye, x as jye, P as Kye, z as Qye, G as Jye, ag as e0e, W as t0e, ai as r0e, y as n0e, H as i0e, aW as a0e, n as o0e, o as s0e, aN as l0e, aJ as u0e, aI as c0e, aV as f0e, a8 as d0e, aL as h0e, aM as v0e, K as p0e, aX as g0e, aY as m0e, e as y0e, aP as b0e, aQ as x0e, aR as _0e, aK as w0e, f as S0e, i as C0e, aH as T0e, aZ as D0e } from "./useDataCollectionSource-C0kEZrNj.js";
11
11
  import { utils as Fl, write as Q2 } from "./xlsx-Bedf3nwD.js";
12
12
  import { defaultTranslations as M0e } from "./i18n-provider-defaults.js";
13
13
  import './f0.css';const TH = {