@factorialco/f0-react 1.433.0 → 1.434.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.
@@ -1,7 +1,7 @@
1
1
  import { defaultTranslations as ke } from "./i18n-provider-defaults.js";
2
2
  import { jsx as q, jsxs as le } from "react/jsx-runtime";
3
3
  import { useInsertionEffect as Xe, createContext as Ye, useContext as $e, useRef as B, useEffect as ie, useState as Ue, useCallback as qe, useMemo as He } from "react";
4
- import { r as Ke, l as je, m as Qe, n as Je, o as Me, p as Ze, q as et, s as tt, t as rt, v as nt, w as Ne, x as ot, V as it, y as st, z as at, A as ct, S as ut, H as lt, B as se, D as ft, E as dt, G as ht, J as mt, K as pt, L as vt, M as fe, N as gt } from "./F0AiChat-C6Swk3kV.js";
4
+ import { r as Ke, l as je, m as Qe, n as Je, o as Me, p as Ze, q as et, s as tt, t as rt, v as nt, w as Ne, x as ot, V as it, y as st, z as at, A as ct, S as ut, H as lt, B as se, D as ft, E as dt, G as ht, J as mt, K as pt, L as vt, M as fe, N as gt } from "./F0AiChat-BCNtjNO0.js";
5
5
  import { useTrackVolume as wt } from "@livekit/components-react";
6
6
  function Tt(t, e, r) {
7
7
  Xe(() => t.on(e, r), [t, e, r]);
package/dist/ai.d.ts CHANGED
@@ -52,6 +52,16 @@ declare type AiChatDisclaimer = {
52
52
  linkText?: string;
53
53
  };
54
54
 
55
+ export declare type AiChatFileAttachmentConfig = {
56
+ onUploadFiles: (files: File[]) => Promise<UploadedFile[]>;
57
+ allowedMimeTypes?: string | string[];
58
+ /**
59
+ * Maximum number of files that can be attached at once.
60
+ * Omit or pass undefined for no limit.
61
+ */
62
+ maxFiles?: number;
63
+ };
64
+
55
65
  /**
56
66
  * Interaction mode for the AI chat
57
67
  */
@@ -114,6 +124,10 @@ export declare type AiChatProviderProps = {
114
124
  * Groups fetchUsage, upgradePlanUrl, and company/plan display info.
115
125
  */
116
126
  credits?: AiChatCredits;
127
+ /**
128
+ * File attachment configuration. When provided, enables file uploads in the chat.
129
+ */
130
+ fileAttachments?: AiChatFileAttachmentConfig;
117
131
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
118
132
  threadId: string;
119
133
  feedback: string;
@@ -223,7 +237,7 @@ declare type AiChatProviderReturnValue = {
223
237
  inProgress: boolean;
224
238
  /** Set the in-progress state (synced from CopilotKit's isLoading) */
225
239
  setInProgress: (value: boolean) => void;
226
- } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits"> & {
240
+ } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits" | "fileAttachments"> & {
227
241
  /** The current canvas content, or null when canvas is closed */
228
242
  canvasContent: CanvasContent | null;
229
243
  /** Open the canvas panel with the given content */
@@ -255,6 +269,7 @@ declare interface AiChatState {
255
269
  entityRefs?: EntityRefs;
256
270
  toolHints?: AiChatToolHint[];
257
271
  credits?: AiChatCredits;
272
+ fileAttachments?: AiChatFileAttachmentConfig;
258
273
  placeholders?: string[];
259
274
  setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
260
275
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
@@ -290,9 +305,6 @@ export declare type AiChatToolHint = {
290
305
  prompt: string;
291
306
  };
292
307
 
293
- /**
294
- * Tracking options for the AI chat
295
- */
296
308
  declare type AiChatTrackingOptions = {
297
309
  onVisibility?: () => void;
298
310
  onClose?: () => void;
@@ -408,6 +420,8 @@ export declare const aiTranslations: {
408
420
  readonly actionLabel: "Get credits";
409
421
  };
410
422
  };
423
+ readonly attachFile: "Attach file";
424
+ readonly removeFile: "Remove";
411
425
  readonly growth: {
412
426
  readonly demoCard: {
413
427
  readonly title: "See {{moduleName}} in action";
@@ -1147,6 +1161,8 @@ export declare const defaultTranslations: {
1147
1161
  readonly actionLabel: "Get credits";
1148
1162
  };
1149
1163
  };
1164
+ readonly attachFile: "Attach file";
1165
+ readonly removeFile: "Remove";
1150
1166
  readonly growth: {
1151
1167
  readonly demoCard: {
1152
1168
  readonly title: "See {{moduleName}} in action";
@@ -1453,7 +1469,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
1453
1469
  /**
1454
1470
  * @experimental This is an experimental component use it at your own risk
1455
1471
  */
1456
- export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
1472
+ export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
1457
1473
 
1458
1474
  export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, creditWarning, onDismissCreditWarning, onGetCredits, }: ChatTextareaProps) => JSX_2.Element;
1459
1475
 
@@ -1767,6 +1783,15 @@ declare type TranslationShape_2<T> = {
1767
1783
 
1768
1784
  export declare type TranslationsType = TranslationShape<typeof defaultTranslations>;
1769
1785
 
1786
+ /**
1787
+ * Tracking options for the AI chat
1788
+ */
1789
+ export declare type UploadedFile = {
1790
+ url: string;
1791
+ filename: string;
1792
+ mimetype: string;
1793
+ };
1794
+
1770
1795
  export declare function useAiChat(): AiChatProviderReturnValue;
1771
1796
 
1772
1797
  export declare function useAiChatTranslations(): AiChatTranslations;
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./F0AiChat-C6Swk3kV.js";
1
+ import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./F0AiChat-BCNtjNO0.js";
2
2
  import { defaultTranslations as d } from "./i18n-provider-defaults.js";
3
- import { A as p, F as S, c as g, d as v, b as x, a as k, o as O, u as P } from "./F0HILActionConfirmation-K5ZONLkv.js";
3
+ import { A as p, F as S, c as g, d as v, b as x, a as k, o as O, u as P } from "./F0HILActionConfirmation-4KT5qQii.js";
4
4
  export {
5
5
  p as AiChatTranslationsProvider,
6
6
  t as ChatSpinner,
@@ -431,6 +431,16 @@ declare type AiChatDisclaimer = {
431
431
  linkText?: string;
432
432
  };
433
433
 
434
+ declare type AiChatFileAttachmentConfig = {
435
+ onUploadFiles: (files: File[]) => Promise<UploadedFile[]>;
436
+ allowedMimeTypes?: string | string[];
437
+ /**
438
+ * Maximum number of files that can be attached at once.
439
+ * Omit or pass undefined for no limit.
440
+ */
441
+ maxFiles?: number;
442
+ };
443
+
434
444
  /**
435
445
  * Props for the AiChatProvider component
436
446
  */
@@ -488,6 +498,10 @@ declare type AiChatProviderProps = {
488
498
  * Groups fetchUsage, upgradePlanUrl, and company/plan display info.
489
499
  */
490
500
  credits?: AiChatCredits;
501
+ /**
502
+ * File attachment configuration. When provided, enables file uploads in the chat.
503
+ */
504
+ fileAttachments?: AiChatFileAttachmentConfig;
491
505
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
492
506
  threadId: string;
493
507
  feedback: string;
@@ -521,9 +535,6 @@ declare type AiChatToolHint = {
521
535
  prompt: string;
522
536
  };
523
537
 
524
- /**
525
- * Tracking options for the AI chat
526
- */
527
538
  declare type AiChatTrackingOptions = {
528
539
  onVisibility?: () => void;
529
540
  onClose?: () => void;
@@ -2720,6 +2731,8 @@ declare const defaultTranslations: {
2720
2731
  readonly actionLabel: "Get credits";
2721
2732
  };
2722
2733
  };
2734
+ readonly attachFile: "Attach file";
2735
+ readonly removeFile: "Remove";
2723
2736
  readonly growth: {
2724
2737
  readonly demoCard: {
2725
2738
  readonly title: "See {{moduleName}} in action";
@@ -3386,6 +3399,7 @@ declare type F0AvatarFlagProps = {
3386
3399
  declare type F0AvatarIconProps = {
3387
3400
  icon: IconType;
3388
3401
  size?: (typeof avatarIconSizes)[number];
3402
+ state?: F0IconProps["state"];
3389
3403
  } & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
3390
3404
 
3391
3405
  declare type F0AvatarListProps = {
@@ -3825,11 +3839,24 @@ declare type FileDef = {
3825
3839
  export declare const FileItem: WithDataTestIdReturnType_4<ForwardRefExoticComponent<FileItemProps & RefAttributes<HTMLDivElement>>>;
3826
3840
 
3827
3841
  declare interface FileItemProps extends React.HTMLAttributes<HTMLDivElement> {
3828
- file: File;
3842
+ file: File | FileDef;
3829
3843
  actions?: FileAction[];
3830
3844
  disabled?: boolean;
3845
+ size?: FileItemSize;
3831
3846
  }
3832
3847
 
3848
+ export declare type FileItemSize = NonNullable<VariantProps<typeof fileItemVariants>["size"]>;
3849
+
3850
+ declare const fileItemVariants: (props?: ({
3851
+ size?: "lg" | "md" | undefined;
3852
+ } & ({
3853
+ class?: ClassValue;
3854
+ className?: never;
3855
+ } | {
3856
+ class?: never;
3857
+ className?: ClassValue;
3858
+ })) | undefined) => string;
3859
+
3833
3860
  export declare type filesConfig = {
3834
3861
  onFiles: (files: File[]) => void;
3835
3862
  multipleFiles: boolean;
@@ -6850,6 +6877,15 @@ declare namespace Types {
6850
6877
  }
6851
6878
  }
6852
6879
 
6880
+ /**
6881
+ * Tracking options for the AI chat
6882
+ */
6883
+ declare type UploadedFile = {
6884
+ url: string;
6885
+ filename: string;
6886
+ mimetype: string;
6887
+ };
6888
+
6853
6889
  export declare function useAiPromotionChat(): AiPromotionChatProviderReturnValue;
6854
6890
 
6855
6891
  export declare type UseDataCollectionData<R extends RecordType> = UseDataCollectionDataReturn<R> & {
@@ -1,10 +1,10 @@
1
- import { cI as Sf, a7 as _r, b7 as Nf, a6 as If, cJ as Af, cK as _f, a1 as Ef, cL as Eo, cM as er, cN as Tf, cO as Ls, cP as Ui, cQ as Er, K as k, R as Z, L as it, u as ge, cR as Df, cS as Rf, cT as Lf, cU as Of, cV as Mf, ak as Oe, cW as Ff, a0 as jt, cX as Pf, b8 as zf, _ as H, be as $f, bf as Bf, U as Ht, cY as ka, bn as jf, bh as Hf, M as B, cZ as Os, Z as E, c_ as st, c$ as Vf, d0 as Wf, bi as Uf, ay as Gf, bk as Kf, aH as Vt, d1 as Ca, d2 as qf, d3 as Tt, a_ as Sn, aA as Ms, aB as un, k as Sa, a4 as gt, d4 as Na, d5 as Yf, d6 as To, d7 as rn, d8 as Fs, d9 as Hn, da as Tr, db as Jf, dc as Ia, dd as Xf, de as Ps, df as Nn, dg as Le, dh as Zf, di as Qf, dj as Ct, dk as yi, dl as eh, dm as kn, dn as qt, dp as th, P as de, dq as nh, dr as rh, ds as ih, dt as sh, du as oh, W as Je, Y as ue, dv as zs, aW as Vn, cF as Qr, dw as Aa, dx as $s, dy as lh, dz as ah, dA as ch, dB as dh, dC as uh, dD as fh, dE as hh, dF as ph, dG as mh, bb as gh, dH as bh, b9 as wh, dI as xh, dJ as yh, dK as vh, dL as kh, dM as Ch, dN as Sh, dO as Nh, dP as Ih, c3 as rt, dQ as _a, dR as Ah, a3 as V, N as Ea, dS as Ta, dT as _h, b2 as Bs, a8 as Do, a9 as Ro, as as Eh, dU as Th, dV as Dh, am as fn, dW as Rh, dX as Lh, dY as Oh, dZ as Mh, aR as ei, d_ as Da, d$ as Ra, c5 as La, e0 as Fh, aK as Dr, e1 as Ph, e2 as zh, e3 as $h, e4 as Bh, e5 as jh, ai as Hh, aj as Vh, al as Wh, e6 as Oa, e7 as Uh, e8 as Gh, ax as Rr, e9 as Jt, ea as Kh, eb as Ma, ec as js, ed as qh, ee as Yh, ef as Fa, eg as Gi, c0 as Ki, eh as Pa, ei as Jh, ej as Xh, cE as ti, bE as za, cH as Zh, cG as Qh, ek as ep, bF as sn, el as tp, aO as tr, em as Lo, en as qi, eo as np, bs as rp, ep as ip, b_ as $a, c4 as sp, cg as Ba, ce as Hs, ae as op, ch as lp, c1 as Vs, av as ja, a as ap, c as cp, bW as dp, eq as Ha, er as up, es as fp, F as hp, et as Va, eu as Wa, ev as pp, bx as Oo, ew as mp, ex as gp, bY as bp, bv as Ua, by as wp, ey as xp, ez as yp, eA as vp, eB as kp, bZ as Ga, $ as Cp, Q as ot, bK as Ws, eC as Us, eD as Gs, eE as Ka, bL as Ks, eF as qa, eG as Sp, eH as Np, eI as Ip, eJ as Ap, eK as _p, bM as Ep, eL as Tp, b$ as Dp, eM as Rp, eN as Mo, eO as Fo, eP as Po, b0 as Lp, eQ as Op, eR as Mp, bd as Fp, eS as Ya, bD as Pp, eT as zp, eU as $p } from "./F0AiChat-C6Swk3kV.js";
2
- import { eY as fA, eX as hA, eV as pA, aE as mA, eW as gA, aJ as bA, f4 as wA, f5 as xA, f7 as yA, fe as vA, ff as kA, aL as CA, e_ as SA, eZ as NA, f6 as IA, f9 as AA, fa as _A, f3 as EA, f0 as TA, f2 as DA, e$ as RA, c2 as LA, f1 as OA, fb as MA, fc as FA, f8 as PA, fd as zA } from "./F0AiChat-C6Swk3kV.js";
1
+ import { cI as Sf, a7 as _r, b7 as Nf, a6 as If, cJ as Af, cK as _f, a1 as Ef, cL as Eo, cM as er, cN as Tf, cO as Ls, cP as Ui, cQ as Er, K as k, R as Z, L as it, u as ge, cR as Df, cS as Rf, cT as Lf, cU as Of, cV as Mf, ak as Oe, cW as Ff, a0 as jt, cX as Pf, b8 as zf, _ as H, be as $f, bf as Bf, U as Ht, cY as ka, bn as jf, bh as Hf, M as B, cZ as Os, Z as E, c_ as st, c$ as Vf, d0 as Wf, bi as Uf, ay as Gf, bk as Kf, aH as Vt, d1 as Ca, d2 as qf, d3 as Tt, a_ as Sn, aA as Ms, aB as un, k as Sa, a4 as gt, d4 as Na, d5 as Yf, d6 as To, d7 as rn, d8 as Fs, d9 as Hn, da as Tr, db as Jf, dc as Ia, dd as Xf, de as Ps, df as Nn, dg as Le, dh as Zf, di as Qf, dj as Ct, dk as yi, dl as eh, dm as kn, dn as qt, dp as th, P as de, dq as nh, dr as rh, ds as ih, dt as sh, du as oh, W as Je, Y as ue, dv as zs, aW as Vn, cF as Qr, dw as Aa, dx as $s, dy as lh, dz as ah, dA as ch, dB as dh, dC as uh, dD as fh, dE as hh, dF as ph, dG as mh, bb as gh, dH as bh, b9 as wh, dI as xh, dJ as yh, dK as vh, dL as kh, dM as Ch, dN as Sh, dO as Nh, dP as Ih, c3 as rt, dQ as _a, dR as Ah, a3 as V, N as Ea, dS as Ta, dT as _h, b2 as Bs, a8 as Do, a9 as Ro, as as Eh, dU as Th, dV as Dh, am as fn, dW as Rh, dX as Lh, dY as Oh, dZ as Mh, aR as ei, d_ as Da, d$ as Ra, c5 as La, e0 as Fh, aK as Dr, e1 as Ph, e2 as zh, e3 as $h, e4 as Bh, e5 as jh, ai as Hh, aj as Vh, al as Wh, e6 as Oa, e7 as Uh, e8 as Gh, ax as Rr, e9 as Jt, ea as Kh, eb as Ma, ec as js, ed as qh, ee as Yh, ef as Fa, eg as Gi, c0 as Ki, eh as Pa, ei as Jh, ej as Xh, cE as ti, bE as za, cH as Zh, cG as Qh, ek as ep, bF as sn, el as tp, aO as tr, em as Lo, en as qi, eo as np, bs as rp, ep as ip, b_ as $a, c4 as sp, cg as Ba, ce as Hs, ae as op, ch as lp, c1 as Vs, av as ja, a as ap, c as cp, bW as dp, eq as Ha, er as up, es as fp, F as hp, et as Va, eu as Wa, ev as pp, bx as Oo, ew as mp, ex as gp, bY as bp, bv as Ua, by as wp, ey as xp, ez as yp, eA as vp, eB as kp, bZ as Ga, $ as Cp, Q as ot, bK as Ws, eC as Us, eD as Gs, eE as Ka, bL as Ks, eF as qa, eG as Sp, eH as Np, eI as Ip, eJ as Ap, eK as _p, bM as Ep, eL as Tp, b$ as Dp, eM as Rp, eN as Mo, eO as Fo, eP as Po, b0 as Lp, eQ as Op, eR as Mp, bd as Fp, eS as Ya, bD as Pp, eT as zp, eU as $p } from "./F0AiChat-BCNtjNO0.js";
2
+ import { eY as fA, eX as hA, eV as pA, fg as mA, aE as gA, eW as bA, aJ as wA, f4 as xA, f5 as yA, f7 as vA, fe as kA, ff as CA, aL as SA, e_ as NA, eZ as IA, f6 as AA, f9 as _A, fa as EA, f3 as TA, f0 as DA, f2 as RA, e$ as LA, c2 as OA, f1 as MA, fb as FA, fc as PA, f8 as zA, fd as $A } from "./F0AiChat-BCNtjNO0.js";
3
3
  import { jsx as c, jsxs as g, Fragment as re } from "react/jsx-runtime";
4
4
  import * as pe from "react";
5
5
  import z, { PureComponent as Bp, forwardRef as F, useRef as q, useTransition as jp, useState as L, useLayoutEffect as Ja, useContext as qs, createContext as Ys, useCallback as X, useMemo as te, useEffect as U, useId as Xa, useImperativeHandle as Za, memo as Qa, Fragment as Hp, isValidElement as Vp, cloneElement as ec, Children as tc } from "react";
6
- import { f as Xt, ac as In, e as nr, ad as Wp, L as vi, ae as Up, A as Gp, i as rr, k as Kp, G as qp, g as zo, af as Yp, j as $o, n as Jp, ag as nc, ah as rc, ai as Xp, C as Zp, aa as Qp, aj as He, ak as lt, al as Te, am as em, an as gr, ao as Ge, ap as ic, aq as Fe, ar as Js, as as Be, at as Bo, au as tm, av as sc, aw as Ae, ax as ze, ay as An, az as Lr, aA as oc, aB as nm, aC as Wt, aD as rm, aE as im, aF as sm, aG as Wn, aH as Un, aI as Xs, aJ as om, aK as lc, aL as ac, aM as cc, aN as lm, aO as dc, aP as uc, aQ as fc, aR as hc, aS as pc, aT as mc, a3 as jo, aU as am, aV as Ho, aW as cm, aX as dm, aY as um, w as fm, x as hm, z as pm, J as mm, K as gm, s as bm, aZ as gc, a_ as wm, a$ as xm, b0 as ym, b1 as bc, a7 as Yi, b2 as vm, b3 as km, b4 as Cm, b5 as Sm, b6 as Nm, b7 as Im, b8 as Am, $ as _m, b9 as Em, ba as Tm, bb as Dm, bc as Rm, ab as wc, M as Lm, N as Om, P as Mm, Q as Fm, V as Pm, O as zm, bd as Vo, be as $m, bf as Bm, l as jm } from "./index-DNRZaDau.js";
7
- import { a5 as BA, W as jA, a0 as HA, R as VA, _ as WA, bk as UA, bj as GA, bh as KA, bi as qA, a4 as YA, T as JA, Z as XA, U as ZA, bg as QA, a8 as e_, a9 as t_ } from "./index-DNRZaDau.js";
6
+ import { f as Xt, ac as In, e as nr, ad as Wp, L as vi, ae as Up, A as Gp, i as rr, k as Kp, G as qp, g as zo, af as Yp, j as $o, n as Jp, ag as nc, ah as rc, ai as Xp, C as Zp, aa as Qp, aj as He, ak as lt, al as Te, am as em, an as gr, ao as Ge, ap as ic, aq as Fe, ar as Js, as as Be, at as Bo, au as tm, av as sc, aw as Ae, ax as ze, ay as An, az as Lr, aA as oc, aB as nm, aC as Wt, aD as rm, aE as im, aF as sm, aG as Wn, aH as Un, aI as Xs, aJ as om, aK as lc, aL as ac, aM as cc, aN as lm, aO as dc, aP as uc, aQ as fc, aR as hc, aS as pc, aT as mc, a3 as jo, aU as am, aV as Ho, aW as cm, aX as dm, aY as um, w as fm, x as hm, z as pm, J as mm, K as gm, s as bm, aZ as gc, a_ as wm, a$ as xm, b0 as ym, b1 as bc, a7 as Yi, b2 as vm, b3 as km, b4 as Cm, b5 as Sm, b6 as Nm, b7 as Im, b8 as Am, $ as _m, b9 as Em, ba as Tm, bb as Dm, bc as Rm, ab as wc, M as Lm, N as Om, P as Mm, Q as Fm, V as Pm, O as zm, bd as Vo, be as $m, bf as Bm, l as jm } from "./index-8e9inWY-.js";
7
+ import { a5 as jA, W as HA, a0 as VA, R as WA, _ as UA, bj as GA, bh as KA, bi as qA, a4 as YA, T as JA, Z as XA, U as ZA, bg as QA, a8 as e_, a9 as t_ } from "./index-8e9inWY-.js";
8
8
  import './experimental.css';const Hm = Sf("Search", [
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
10
10
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
@@ -22364,7 +22364,7 @@ export {
22364
22364
  pp as Badge,
22365
22365
  HI as BarChartWidget,
22366
22366
  Vx as BaseActivityItemList,
22367
- BA as BaseBanner,
22367
+ jA as BaseBanner,
22368
22368
  Yx as BaseCelebration,
22369
22369
  sy as BaseCommunityPost,
22370
22370
  fA as BaseTabs,
@@ -22372,7 +22372,7 @@ export {
22372
22372
  xg as Breadcrumbs,
22373
22373
  fs as CalendarEvent,
22374
22374
  qI as CalendarEventList,
22375
- jA as CardSelectableContainer,
22375
+ HA as CardSelectableContainer,
22376
22376
  Zp as Carousel,
22377
22377
  tA as CategoryBarSection,
22378
22378
  yI as Celebration,
@@ -22387,37 +22387,37 @@ export {
22387
22387
  II as DaytimePage,
22388
22388
  Iy as DetailsItem,
22389
22389
  CI as DetailsItemsList,
22390
- HA as Dialog,
22390
+ VA as Dialog,
22391
22391
  gt as Dropdown,
22392
22392
  wI as EntitySelect,
22393
- VA as F0ActionBar,
22393
+ WA as F0ActionBar,
22394
22394
  ud as F0AiBanner,
22395
22395
  za as F0AvatarModule,
22396
22396
  mI as F0Callout,
22397
- WA as F0TableOfContent,
22397
+ UA as F0TableOfContent,
22398
22398
  bI as F0VersionHistory,
22399
22399
  pA as F1SearchBox,
22400
- UA as FILE_TYPES,
22401
- GA as FileItem,
22400
+ GA as FILE_TYPES,
22401
+ mA as FileItem,
22402
22402
  vI as HighlightBanner,
22403
22403
  JI as IndicatorsList,
22404
- mA as Input,
22404
+ gA as Input,
22405
22405
  KA as Item,
22406
22406
  qA as ItemSectionHeader,
22407
22407
  VI as LineChartWidget,
22408
22408
  DI as Menu,
22409
- gA as MobileDropdown,
22409
+ bA as MobileDropdown,
22410
22410
  PI as NotesTextEditor,
22411
22411
  FI as NotesTextEditorSkeleton,
22412
- bA as NumberInput,
22412
+ wA as NumberInput,
22413
22413
  AI as OmniButton,
22414
22414
  OI as OneApprovalHistory,
22415
- wA as OneCalendar,
22416
- xA as OneCalendarInternal,
22417
- yA as OneDataCollection,
22418
- vA as OneDateNavigator,
22415
+ xA as OneCalendar,
22416
+ yA as OneCalendarInternal,
22417
+ vA as OneDataCollection,
22418
+ kA as OneDateNavigator,
22419
22419
  Pp as OneEmptyState,
22420
- kA as OnePagination,
22420
+ CA as OnePagination,
22421
22421
  SI as OnePersonListItem,
22422
22422
  aA as OneRestrictComponent,
22423
22423
  _I as Page,
@@ -22440,9 +22440,9 @@ export {
22440
22440
  $I as Split,
22441
22441
  zI as Stack,
22442
22442
  GI as SummariesWidget,
22443
- CA as Switch,
22444
- SA as Tabs,
22445
- NA as TabsSkeleton,
22443
+ SA as Switch,
22444
+ NA as Tabs,
22445
+ IA as TabsSkeleton,
22446
22446
  rA as TasksList,
22447
22447
  ZA as Textarea,
22448
22448
  Fd as ToggleGroup,
@@ -22450,7 +22450,7 @@ export {
22450
22450
  Tt as Tooltip,
22451
22451
  eA as TwoColumnsList,
22452
22452
  UI as VerticalBarChartWidget,
22453
- IA as WeekStartDay,
22453
+ AA as WeekStartDay,
22454
22454
  ay as Weekdays,
22455
22455
  nn as Widget,
22456
22456
  XI as WidgetAvatarsListItem,
@@ -22464,20 +22464,20 @@ export {
22464
22464
  sA as WidgetStrip,
22465
22465
  rx as _RadarChart,
22466
22466
  QA as actionBarStatuses,
22467
- AA as downloadAsCSV,
22468
- _A as generateCSVContent,
22469
- EA as getGranularityDefinition,
22470
- TA as getGranularityDefinitions,
22471
- DA as getGranularitySimpleDefinition,
22472
- RA as granularityDefinitions,
22473
- LA as modules,
22467
+ _A as downloadAsCSV,
22468
+ EA as generateCSVContent,
22469
+ TA as getGranularityDefinition,
22470
+ DA as getGranularityDefinitions,
22471
+ RA as getGranularitySimpleDefinition,
22472
+ LA as granularityDefinitions,
22473
+ OA as modules,
22474
22474
  e_ as predefinedPresets,
22475
- OA as rangeSeparator,
22475
+ MA as rangeSeparator,
22476
22476
  t_ as selectSizes,
22477
22477
  ni as useAiPromotionChat,
22478
- MA as useDataCollectionData,
22479
- FA as useDataCollectionSource,
22480
- PA as useExportAction,
22481
- zA as useInfiniteScrollPagination,
22478
+ FA as useDataCollectionData,
22479
+ PA as useDataCollectionSource,
22480
+ zA as useExportAction,
22481
+ $A as useInfiniteScrollPagination,
22482
22482
  hn as useSidebar
22483
22483
  };
package/dist/f0.d.ts CHANGED
@@ -332,6 +332,16 @@ declare type AiChatDisclaimer = {
332
332
  linkText?: string;
333
333
  };
334
334
 
335
+ export declare type AiChatFileAttachmentConfig = {
336
+ onUploadFiles: (files: File[]) => Promise<UploadedFile[]>;
337
+ allowedMimeTypes?: string | string[];
338
+ /**
339
+ * Maximum number of files that can be attached at once.
340
+ * Omit or pass undefined for no limit.
341
+ */
342
+ maxFiles?: number;
343
+ };
344
+
335
345
  /**
336
346
  * Interaction mode for the AI chat
337
347
  */
@@ -394,6 +404,10 @@ export declare type AiChatProviderProps = {
394
404
  * Groups fetchUsage, upgradePlanUrl, and company/plan display info.
395
405
  */
396
406
  credits?: AiChatCredits;
407
+ /**
408
+ * File attachment configuration. When provided, enables file uploads in the chat.
409
+ */
410
+ fileAttachments?: AiChatFileAttachmentConfig;
397
411
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
398
412
  threadId: string;
399
413
  feedback: string;
@@ -503,7 +517,7 @@ declare type AiChatProviderReturnValue = {
503
517
  inProgress: boolean;
504
518
  /** Set the in-progress state (synced from CopilotKit's isLoading) */
505
519
  setInProgress: (value: boolean) => void;
506
- } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits"> & {
520
+ } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits" | "fileAttachments"> & {
507
521
  /** The current canvas content, or null when canvas is closed */
508
522
  canvasContent: CanvasContent | null;
509
523
  /** Open the canvas panel with the given content */
@@ -535,6 +549,7 @@ declare interface AiChatState {
535
549
  entityRefs?: EntityRefs;
536
550
  toolHints?: AiChatToolHint[];
537
551
  credits?: AiChatCredits;
552
+ fileAttachments?: AiChatFileAttachmentConfig;
538
553
  placeholders?: string[];
539
554
  setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
540
555
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
@@ -570,9 +585,6 @@ export declare type AiChatToolHint = {
570
585
  prompt: string;
571
586
  };
572
587
 
573
- /**
574
- * Tracking options for the AI chat
575
- */
576
588
  declare type AiChatTrackingOptions = {
577
589
  onVisibility?: () => void;
578
590
  onClose?: () => void;
@@ -688,6 +700,8 @@ export declare const aiTranslations: {
688
700
  readonly actionLabel: "Get credits";
689
701
  };
690
702
  };
703
+ readonly attachFile: "Attach file";
704
+ readonly removeFile: "Remove";
691
705
  readonly growth: {
692
706
  readonly demoCard: {
693
707
  readonly title: "See {{moduleName}} in action";
@@ -3265,6 +3279,8 @@ export declare const defaultTranslations: {
3265
3279
  readonly actionLabel: "Get credits";
3266
3280
  };
3267
3281
  };
3282
+ readonly attachFile: "Attach file";
3283
+ readonly removeFile: "Remove";
3268
3284
  readonly growth: {
3269
3285
  readonly demoCard: {
3270
3286
  readonly title: "See {{moduleName}} in action";
@@ -3902,7 +3918,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
3902
3918
  /**
3903
3919
  * @experimental This is an experimental component use it at your own risk
3904
3920
  */
3905
- export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
3921
+ export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
3906
3922
 
3907
3923
  export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, creditWarning, onDismissCreditWarning, onGetCredits, }: ChatTextareaProps) => JSX_2.Element;
3908
3924
 
@@ -4216,13 +4232,14 @@ declare type F0AvatarFlagProps = {
4216
4232
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
4217
4233
 
4218
4234
  export declare const F0AvatarIcon: WithDataTestIdReturnType_4< {
4219
- ({ icon, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: F0AvatarIconProps_2): JSX_2.Element;
4235
+ ({ icon, size, state, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: F0AvatarIconProps_2): JSX_2.Element;
4220
4236
  displayName: string;
4221
4237
  }>;
4222
4238
 
4223
4239
  export declare type F0AvatarIconProps = {
4224
4240
  icon: IconType;
4225
4241
  size?: (typeof avatarIconSizes)[number];
4242
+ state?: F0IconProps["state"];
4226
4243
  } & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
4227
4244
 
4228
4245
  export declare const F0AvatarList: WithDataTestIdReturnType_4< {
@@ -10131,6 +10148,15 @@ export declare interface TwoColumnLayoutProps {
10131
10148
  */
10132
10149
  export declare function unwrapZodSchema(schema: ZodTypeAny): ZodTypeAny;
10133
10150
 
10151
+ /**
10152
+ * Tracking options for the AI chat
10153
+ */
10154
+ export declare type UploadedFile = {
10155
+ url: string;
10156
+ filename: string;
10157
+ mimetype: string;
10158
+ };
10159
+
10134
10160
  declare type UpsellAction = BaseAction & {
10135
10161
  type: "upsell";
10136
10162
  variant: "promote" | "outlinePromote";
package/dist/f0.js CHANGED
@@ -1,12 +1,12 @@
1
- import { O as jo, P as xe, Q as yt, K as U, L as sn, R as nr, T as Vo, U as wa, W as pi, X as Wu, Y as $o, Z as je, u as De, _ as Le, $ as ur, a0 as Uu, a1 as Ku, a2 as Tr, a3 as ut, a4 as Sa, a5 as Qu, a6 as Hu, a7 as Gu, a8 as qn, a9 as Ns, aa as Xu, ab as Yu, ac as Ju, ad as gi, ae as ed, af as td, ag as zo, ah as nd, ai as _a, aj as ka, ak as rs, al as Ca, am as Zo, an as Or, ao as qo, ap as rd, aq as sd, ar as ad, as as id, at as Na, au as vi, av as od, aw as ld, ax as cd, ay as Wo, az as ud, M as Me, aA as dd, aB as Er, aC as rr, aD as Uo, aE as Da, aF as fd, aG as md, aH as dr, aI as Aa, aJ as Ko, aK as xn, aL as Qo, aM as hd, aN as Fa, aO as pd, aP as Ho, aQ as Go, N as kt, aR as gd, aS as Gs, aT as Xo, aU as vd, aV as Yo, aW as Sn, aX as Jo, aY as bd, aZ as yd, a_ as el, a$ as xd, b0 as wd, b1 as Sd, b2 as ss, b3 as _d, b4 as kd, b5 as Cd, b6 as Nd, j as Dd, b7 as Ad, b8 as tl, b9 as mn, ba as nl, bb as rl, bc as Ir, bd as sl, be as Ta, bf as Oa, bg as Ea, bh as Ia, bi as dt, bj as Ra, bk as _n, bl as Wn, bm as Un, bn as Kn, bo as Qn, bp as Fd, bq as br, br as al, bs as Rr, bt as ot, bu as il, bv as as, bw as ol, bx as Pa, by as La, bz as Td, bA as Od, bB as Ed, bC as Id, bD as Rd, bE as ll, bF as Pd, bG as Ld, bH as Md, bI as Bd, bJ as cl, bK as jd, bL as Vd, bM as $d, bN as ul, bO as zd, bP as Zd, bQ as qd, bR as Wd, I as Ud, bS as Kd, bT as Qd, bU as Hd, bV as Gd, bW as Xd, bX as Yd } from "./F0AiChat-C6Swk3kV.js";
2
- import { cl as r0, i as s0, cx as a0, cF as i0, h as o0, F as l0, a as c0, C as u0, b as d0, bY as f0, bZ as m0, b_ as h0, b$ as p0, c0 as g0, c1 as v0, c3 as b0, c4 as y0, c5 as x0, c6 as w0, ca as S0, cb as _0, cB as k0, k as C0, ce as N0, cf as D0, cg as A0, ch as F0, cj as T0, ck as O0, cm as E0, cd as I0, ci as R0, cC as P0, c7 as L0, c8 as M0, c9 as B0, cw as j0, cr as V0, cu as $0, g as z0, cq as Z0, cG as q0, cp as W0, co as U0, c2 as K0, c as Q0, cn as H0, cs as G0, d as X0, cy as Y0, cz as J0, cA as e1, cH as t1, cc as n1, ct as r1, f as s1, e as a1, cE as i1, cv as o1, cD as l1 } from "./F0AiChat-C6Swk3kV.js";
1
+ import { O as jo, P as xe, Q as yt, K as U, L as sn, R as nr, T as Vo, U as wa, W as pi, X as Wu, Y as $o, Z as je, u as De, _ as Le, $ as ur, a0 as Uu, a1 as Ku, a2 as Tr, a3 as ut, a4 as Sa, a5 as Qu, a6 as Hu, a7 as Gu, a8 as qn, a9 as Ns, aa as Xu, ab as Yu, ac as Ju, ad as gi, ae as ed, af as td, ag as zo, ah as nd, ai as _a, aj as ka, ak as rs, al as Ca, am as Zo, an as Or, ao as qo, ap as rd, aq as sd, ar as ad, as as id, at as Na, au as vi, av as od, aw as ld, ax as cd, ay as Wo, az as ud, M as Me, aA as dd, aB as Er, aC as rr, aD as Uo, aE as Da, aF as fd, aG as md, aH as dr, aI as Aa, aJ as Ko, aK as xn, aL as Qo, aM as hd, aN as Fa, aO as pd, aP as Ho, aQ as Go, N as kt, aR as gd, aS as Gs, aT as Xo, aU as vd, aV as Yo, aW as Sn, aX as Jo, aY as bd, aZ as yd, a_ as el, a$ as xd, b0 as wd, b1 as Sd, b2 as ss, b3 as _d, b4 as kd, b5 as Cd, b6 as Nd, j as Dd, b7 as Ad, b8 as tl, b9 as mn, ba as nl, bb as rl, bc as Ir, bd as sl, be as Ta, bf as Oa, bg as Ea, bh as Ia, bi as dt, bj as Ra, bk as _n, bl as Wn, bm as Un, bn as Kn, bo as Qn, bp as Fd, bq as br, br as al, bs as Rr, bt as ot, bu as il, bv as as, bw as ol, bx as Pa, by as La, bz as Td, bA as Od, bB as Ed, bC as Id, bD as Rd, bE as ll, bF as Pd, bG as Ld, bH as Md, bI as Bd, bJ as cl, bK as jd, bL as Vd, bM as $d, bN as ul, bO as zd, bP as Zd, bQ as qd, bR as Wd, I as Ud, bS as Kd, bT as Qd, bU as Hd, bV as Gd, bW as Xd, bX as Yd } from "./F0AiChat-BCNtjNO0.js";
2
+ import { cl as r0, i as s0, cx as a0, cF as i0, h as o0, F as l0, a as c0, C as u0, b as d0, bY as f0, bZ as m0, b_ as h0, b$ as p0, c0 as g0, c1 as v0, c3 as b0, c4 as y0, c5 as x0, c6 as w0, ca as S0, cb as _0, cB as k0, k as C0, ce as N0, cf as D0, cg as A0, ch as F0, cj as T0, ck as O0, cm as E0, cd as I0, ci as R0, cC as P0, c7 as L0, c8 as M0, c9 as B0, cw as j0, cr as V0, cu as $0, g as z0, cq as Z0, cG as q0, cp as W0, co as U0, c2 as K0, c as Q0, cn as H0, cs as G0, d as X0, cy as Y0, cz as J0, cA as e1, cH as t1, cc as n1, ct as r1, f as s1, e as a1, cE as i1, cv as o1, cD as l1 } from "./F0AiChat-BCNtjNO0.js";
3
3
  import { jsx as c, jsxs as N, Fragment as He } from "react/jsx-runtime";
4
4
  import * as Ct from "react";
5
5
  import Y, { forwardRef as st, useRef as K, useImperativeHandle as Jd, Children as Pr, useCallback as P, useMemo as z, useState as te, useEffect as le, createElement as yr, isValidElement as dl, Fragment as fl, useLayoutEffect as ef, createContext as It, memo as ml, useReducer as tf, useContext as nt, cloneElement as nf, PureComponent as rf, useId as Ma } from "react";
6
6
  import { unstable_batchedUpdates as xr, createPortal as sf, flushSync as af } from "react-dom";
7
- import { C as of, S as bi, a as lf, f as Ds, L as Bn, b as cf, A as uf, i as wr, c as hl, E as df, g as Nr, d as ff, e as mf, h as hf, j as bn, k as pl, u as pf, G as gf, l as vf, m as yi, r as bf, n as yf, o as gl, p as xf, B as vl, X as bl, Y as Xs, q as wf, s as yl, t as Sf, v as _f, w as kf, x as Cf, y as Nf, z as Df, D as Af, F as Ff, H as xi, I as Tf, J as Of, K as Ef, M as If, N as Rf, O as Pf, P as Lf, Q as Mf, V as Bf, R as Ys, T as jf, U as Vf, W as $f, Z as xl, _ as Ba, $ as wl, a0 as zf, a1 as Zf, a2 as qf, a3 as Wf, a4 as Uf, a5 as Kf, a6 as Qf } from "./index-DNRZaDau.js";
8
- import { a7 as u1, aa as d1, a8 as f1, a9 as m1, ab as h1 } from "./index-DNRZaDau.js";
9
- import { A as g1, F as v1, c as b1, d as y1, b as x1, a as w1, o as S1, u as _1 } from "./F0HILActionConfirmation-K5ZONLkv.js";
7
+ import { C as of, S as bi, a as lf, f as Ds, L as Bn, b as cf, A as uf, i as wr, c as hl, E as df, g as Nr, d as ff, e as mf, h as hf, j as bn, k as pl, u as pf, G as gf, l as vf, m as yi, r as bf, n as yf, o as gl, p as xf, B as vl, X as bl, Y as Xs, q as wf, s as yl, t as Sf, v as _f, w as kf, x as Cf, y as Nf, z as Df, D as Af, F as Ff, H as xi, I as Tf, J as Of, K as Ef, M as If, N as Rf, O as Pf, P as Lf, Q as Mf, V as Bf, R as Ys, T as jf, U as Vf, W as $f, Z as xl, _ as Ba, $ as wl, a0 as zf, a1 as Zf, a2 as qf, a3 as Wf, a4 as Uf, a5 as Kf, a6 as Qf } from "./index-8e9inWY-.js";
8
+ import { a7 as u1, aa as d1, a8 as f1, a9 as m1, ab as h1 } from "./index-8e9inWY-.js";
9
+ import { A as g1, F as v1, c as b1, d as y1, b as x1, a as w1, o as S1, u as _1 } from "./F0HILActionConfirmation-4KT5qQii.js";
10
10
  import { defaultTranslations as C1 } from "./i18n-provider-defaults.js";
11
11
  const Hf = {
12
12
  xs: 1,
@@ -445,6 +445,8 @@ export declare const defaultTranslations: {
445
445
  readonly actionLabel: "Get credits";
446
446
  };
447
447
  };
448
+ readonly attachFile: "Attach file";
449
+ readonly removeFile: "Remove";
448
450
  readonly growth: {
449
451
  readonly demoCard: {
450
452
  readonly title: "See {{moduleName}} in action";
@@ -445,6 +445,8 @@ const e = {
445
445
  actionLabel: "Get credits"
446
446
  }
447
447
  },
448
+ attachFile: "Attach file",
449
+ removeFile: "Remove",
448
450
  growth: {
449
451
  demoCard: {
450
452
  title: "See {{moduleName}} in action",