@factorialco/f0-react 1.368.0 → 1.369.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/{DataCollectionStorageProvider-CJIP1e_M.js → DataCollectionStorageProvider-rZ2EAPyf.js} +1 -1
- package/dist/{F0AiChat-3B4UugKL.js → F0AiChat-DzKzMaxV.js} +19294 -19226
- package/dist/{F0HILActionConfirmation-CZTSs7VF.js → F0HILActionConfirmation-DgyaZFiq.js} +47 -44
- package/dist/ai.d.ts +51 -14
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +28 -5
- package/dist/experimental.js +2362 -2334
- package/dist/f0.d.ts +51 -14
- package/dist/f0.js +5 -5
- package/dist/i18n-provider-defaults.d.ts +8 -5
- package/dist/i18n-provider-defaults.js +3 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/f0.d.ts
CHANGED
|
@@ -288,6 +288,21 @@ export declare type AiChatProviderProps = {
|
|
|
288
288
|
* When enabled, the chat can be resized between 300px and 50% of the screen width
|
|
289
289
|
*/
|
|
290
290
|
resizable?: boolean;
|
|
291
|
+
/**
|
|
292
|
+
* The default visualization mode for the chat
|
|
293
|
+
* When set to "fullscreen", the chat starts in fullscreen mode and auto-opens
|
|
294
|
+
* @default "sidepanel"
|
|
295
|
+
*/
|
|
296
|
+
defaultVisualizationMode?: VisualizationMode;
|
|
297
|
+
/**
|
|
298
|
+
* When true, prevents switching between visualization modes (hides the expand/collapse button)
|
|
299
|
+
* @default false
|
|
300
|
+
*/
|
|
301
|
+
lockVisualizationMode?: boolean;
|
|
302
|
+
/**
|
|
303
|
+
* Optional footer content rendered below the textarea
|
|
304
|
+
*/
|
|
305
|
+
footer?: React.ReactNode;
|
|
291
306
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
292
307
|
threadId: string;
|
|
293
308
|
feedback: string;
|
|
@@ -311,14 +326,6 @@ declare type AiChatProviderReturnValue = {
|
|
|
311
326
|
tmp_setAgent: (agent?: string) => void;
|
|
312
327
|
placeholders: string[];
|
|
313
328
|
setPlaceholders: React.Dispatch<React.SetStateAction<string[]>>;
|
|
314
|
-
/**
|
|
315
|
-
* Set the amount of minutes after which the chat will be cleared automatically
|
|
316
|
-
* Set `null` to disable auto-clearing
|
|
317
|
-
*
|
|
318
|
-
* @default 15
|
|
319
|
-
*/
|
|
320
|
-
setAutoClearMinutes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
321
|
-
autoClearMinutes: number | null;
|
|
322
329
|
/**
|
|
323
330
|
* The initial message to display in the chat
|
|
324
331
|
*/
|
|
@@ -354,6 +361,22 @@ declare type AiChatProviderReturnValue = {
|
|
|
354
361
|
* Reset the chat width to the default value (360px)
|
|
355
362
|
*/
|
|
356
363
|
resetChatWidth: () => void;
|
|
364
|
+
/**
|
|
365
|
+
* The current visualization mode of the chat
|
|
366
|
+
*/
|
|
367
|
+
visualizationMode: VisualizationMode;
|
|
368
|
+
/**
|
|
369
|
+
* Set the visualization mode
|
|
370
|
+
*/
|
|
371
|
+
setVisualizationMode: React.Dispatch<React.SetStateAction<VisualizationMode>>;
|
|
372
|
+
/**
|
|
373
|
+
* When true, prevents switching between visualization modes
|
|
374
|
+
*/
|
|
375
|
+
lockVisualizationMode: boolean;
|
|
376
|
+
/**
|
|
377
|
+
* Optional footer content rendered below the textarea
|
|
378
|
+
*/
|
|
379
|
+
footer?: React.ReactNode;
|
|
357
380
|
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable">;
|
|
358
381
|
|
|
359
382
|
/**
|
|
@@ -367,6 +390,9 @@ declare interface AiChatState {
|
|
|
367
390
|
welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
|
|
368
391
|
disclaimer?: AiChatDisclaimer;
|
|
369
392
|
resizable?: boolean;
|
|
393
|
+
defaultVisualizationMode?: VisualizationMode;
|
|
394
|
+
lockVisualizationMode?: boolean;
|
|
395
|
+
footer?: React.ReactNode;
|
|
370
396
|
placeholders?: string[];
|
|
371
397
|
setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
|
|
372
398
|
onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
|
|
@@ -407,6 +433,7 @@ export declare const aiTranslations: {
|
|
|
407
433
|
defaultInitialMessage: string;
|
|
408
434
|
inputPlaceholder: string;
|
|
409
435
|
stopAnswerGeneration: string;
|
|
436
|
+
responseStopped: string;
|
|
410
437
|
sendMessage: string;
|
|
411
438
|
thoughtsGroupTitle: string;
|
|
412
439
|
resourcesGroupTitle: string;
|
|
@@ -425,6 +452,8 @@ export declare const aiTranslations: {
|
|
|
425
452
|
placeholder: string;
|
|
426
453
|
};
|
|
427
454
|
};
|
|
455
|
+
expandChat: string;
|
|
456
|
+
collapseChat: string;
|
|
428
457
|
ask: string;
|
|
429
458
|
};
|
|
430
459
|
};
|
|
@@ -2346,6 +2375,7 @@ export declare const defaultTranslations: {
|
|
|
2346
2375
|
readonly defaultInitialMessage: "How can I help you today?";
|
|
2347
2376
|
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
2348
2377
|
readonly stopAnswerGeneration: "Stop generating";
|
|
2378
|
+
readonly responseStopped: "You stopped this response";
|
|
2349
2379
|
readonly sendMessage: "Send message";
|
|
2350
2380
|
readonly thoughtsGroupTitle: "Reflection";
|
|
2351
2381
|
readonly resourcesGroupTitle: "Resources";
|
|
@@ -2364,6 +2394,8 @@ export declare const defaultTranslations: {
|
|
|
2364
2394
|
readonly placeholder: "Share what didn’t work";
|
|
2365
2395
|
};
|
|
2366
2396
|
};
|
|
2397
|
+
readonly expandChat: "Expand chat";
|
|
2398
|
+
readonly collapseChat: "Collapse chat";
|
|
2367
2399
|
readonly ask: "Ask One";
|
|
2368
2400
|
readonly growth: {
|
|
2369
2401
|
readonly demoCard: {
|
|
@@ -2721,7 +2753,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
|
|
|
2721
2753
|
/**
|
|
2722
2754
|
* @experimental This is an experimental component use it at your own risk
|
|
2723
2755
|
*/
|
|
2724
|
-
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
2756
|
+
export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
2725
2757
|
|
|
2726
2758
|
export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, placeholders, defaultPlaceholder, autoFocus, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
2727
2759
|
|
|
@@ -7635,6 +7667,11 @@ declare type VisualizacionTypeDefinition<Props, Settings = Record<string, never>
|
|
|
7635
7667
|
};
|
|
7636
7668
|
};
|
|
7637
7669
|
|
|
7670
|
+
/**
|
|
7671
|
+
* Visualization mode for the AI chat
|
|
7672
|
+
*/
|
|
7673
|
+
export declare type VisualizationMode = "sidepanel" | "fullscreen";
|
|
7674
|
+
|
|
7638
7675
|
declare type VisualizationSettings = {
|
|
7639
7676
|
[K in keyof typeof collectionVisualizations]: ExtractVisualizationSettings<(typeof collectionVisualizations)[K]>;
|
|
7640
7677
|
};
|
|
@@ -7733,11 +7770,6 @@ declare module "gridstack" {
|
|
|
7733
7770
|
}
|
|
7734
7771
|
|
|
7735
7772
|
|
|
7736
|
-
declare namespace Calendar {
|
|
7737
|
-
var displayName: string;
|
|
7738
|
-
}
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
7773
|
declare module "@tiptap/core" {
|
|
7742
7774
|
interface Commands<ReturnType> {
|
|
7743
7775
|
aiBlock: {
|
|
@@ -7774,3 +7806,8 @@ declare module "@tiptap/core" {
|
|
|
7774
7806
|
};
|
|
7775
7807
|
}
|
|
7776
7808
|
}
|
|
7809
|
+
|
|
7810
|
+
|
|
7811
|
+
declare namespace Calendar {
|
|
7812
|
+
var displayName: string;
|
|
7813
|
+
}
|
package/dist/f0.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a6 as X, a7 as vt, aa as Ji, ab as Mr, ac as Ir, ad as Za, ae as Ua, af as Qi, ag as qe, u as Zn, ah as zr, ai as qa, aj as Ya, ak as Ka, al as Xa, am as Me, an as Ie, ao as Ja, ap as Qa, aq as es, ar as eo, as as kn, at as ts, au as ns, av as rs, aw as is, ax as ss, ay as as, az as to, aA as no, aB as ro, aC as io, aD as so, a8 as Be, aE as ai, aF as ao, aG as oo, aH as os, aI as lo, aJ as Nt, aK as co, aL as uo, aM as ho, aN as fo, aO as mo, aP as po, aQ as go, aR as vo, aS as yo, aT as bo, aU as xo, aV as ls, aW as wo, aX as _o, aY as Co, aZ as Eo, a_ as ko, a$ as cs, b0 as So, b1 as Do, b2 as Ro, b3 as No, b4 as To, b5 as Oo, I as Ao, b6 as Mo, b7 as Io, b8 as zo, b9 as Lo } from "./F0AiChat-
|
|
2
|
-
import { A as Fm, bp as Hm, B as jm, C as $m, E as Wm, bE as Gm, h as Vm, F as Zm, a as Um, x as qm, i as Ym, b as Km, ba as Xm, bb as Jm, bc as Qm, bd as ep, bf as tp, bg as np, bh as rp, bi as ip, bj as sp, bk as ap, bl as op, bA as lp, s as cp, t as dp, v as up, bo as hp, w as fp, c as mp, bq as pp, n as gp, o as vp, p as yp, H as bp, k as xp, L as wp, O as _p, bn as Cp, q as Ep, P as kp, S as Sp, T as Dp, l as Rp, m as Np, U as Tp, bB as Op, bv as Ap, r as Mp, j as Ip, by as zp, bu as Lp, bF as Pp, bt as Bp, bs as Fp, be as Hp, d as jp, br as $p, bw as Wp, e as Gp, bG as Vp, bm as Zp, bx as Up, g as qp, f as Yp, bD as Kp, bz as Xp, bC as Jp } from "./F0AiChat-
|
|
1
|
+
import { a6 as X, a7 as vt, aa as Ji, ab as Mr, ac as Ir, ad as Za, ae as Ua, af as Qi, ag as qe, u as Zn, ah as zr, ai as qa, aj as Ya, ak as Ka, al as Xa, am as Me, an as Ie, ao as Ja, ap as Qa, aq as es, ar as eo, as as kn, at as ts, au as ns, av as rs, aw as is, ax as ss, ay as as, az as to, aA as no, aB as ro, aC as io, aD as so, a8 as Be, aE as ai, aF as ao, aG as oo, aH as os, aI as lo, aJ as Nt, aK as co, aL as uo, aM as ho, aN as fo, aO as mo, aP as po, aQ as go, aR as vo, aS as yo, aT as bo, aU as xo, aV as ls, aW as wo, aX as _o, aY as Co, aZ as Eo, a_ as ko, a$ as cs, b0 as So, b1 as Do, b2 as Ro, b3 as No, b4 as To, b5 as Oo, I as Ao, b6 as Mo, b7 as Io, b8 as zo, b9 as Lo } from "./F0AiChat-DzKzMaxV.js";
|
|
2
|
+
import { A as Fm, bp as Hm, B as jm, C as $m, E as Wm, bE as Gm, h as Vm, F as Zm, a as Um, x as qm, i as Ym, b as Km, ba as Xm, bb as Jm, bc as Qm, bd as ep, bf as tp, bg as np, bh as rp, bi as ip, bj as sp, bk as ap, bl as op, bA as lp, s as cp, t as dp, v as up, bo as hp, w as fp, c as mp, bq as pp, n as gp, o as vp, p as yp, H as bp, k as xp, L as wp, O as _p, bn as Cp, q as Ep, P as kp, S as Sp, T as Dp, l as Rp, m as Np, U as Tp, bB as Op, bv as Ap, r as Mp, j as Ip, by as zp, bu as Lp, bF as Pp, bt as Bp, bs as Fp, be as Hp, d as jp, br as $p, bw as Wp, e as Gp, bG as Vp, bm as Zp, bx as Up, g as qp, f as Yp, bD as Kp, bz as Xp, bC as Jp } from "./F0AiChat-DzKzMaxV.js";
|
|
3
3
|
import { jsx as f, jsxs as M, Fragment as cn } from "react/jsx-runtime";
|
|
4
4
|
import V, { forwardRef as Ee, useRef as F, useImperativeHandle as Po, Children as Sn, createContext as Xe, useContext as Fe, useState as Z, useMemo as B, useEffect as j, useCallback as J, useLayoutEffect as yr, createElement as oi, isValidElement as ds, Fragment as Bo, memo as Fo, useReducer as Ho, cloneElement as jo, PureComponent as $o } from "react";
|
|
5
5
|
import { createPortal as us, unstable_batchedUpdates as bn } from "react-dom";
|
|
6
|
-
import { L as hs, C as Wo, i as fs, D as Go, S as li, a as Vo, f as or, b as Vt, c as Zo, A as Uo, d as xn, e as ms, E as qo, g as Cn, h as Yo, j as Ko, k as Xo, l as St, m as ps, u as Jo, G as Qo, n as el, o as ci, p as tl, q as gs, r as nl, B as vs, X as ys, Y as br, s as rl, t as bs, v as il, w as sl, x as al, y as ol, z as ll, F as cl, H as dl, I as ul, J as di, K as hl, M as Ut, N as lr, O as fl, P as ml, Q as pl, R as gl, T as vl, U as yl, V as bl, W as xl, Z as wl, _ as _l, $ as Cl, a0 as ui, a1 as El, a2 as kl, a3 as xs, a4 as Sl, a5 as Dl, a6 as Rl, a7 as Lr, a8 as hi, a9 as Nl, aa as Tl, ab as Ol, ac as Al, ad as Ml, ae as Il, af as zl, ag as Ll, ah as Pl, ai as ws, aj as Bl, ak as Fl, al as _s, am as fi, an as Cs, ao as Hl, ap as jl, aq as $l, ar as Wl } from "./DataCollectionStorageProvider-
|
|
7
|
-
import { aI as eg, as as tg, at as ng, aw as rg, aA as ig, aB as sg, aD as ag, aE as og, aF as lg, aG as cg, az as dg, aC as ug, au as hg, av as fg, aH as mg, ax as pg, ay as gg, aJ as vg, aK as yg, aL as bg, aM as xg } from "./DataCollectionStorageProvider-
|
|
8
|
-
import { A as _g, F as Cg, c as Eg, b as kg, a as Sg, o as Dg, u as Rg } from "./F0HILActionConfirmation-
|
|
6
|
+
import { L as hs, C as Wo, i as fs, D as Go, S as li, a as Vo, f as or, b as Vt, c as Zo, A as Uo, d as xn, e as ms, E as qo, g as Cn, h as Yo, j as Ko, k as Xo, l as St, m as ps, u as Jo, G as Qo, n as el, o as ci, p as tl, q as gs, r as nl, B as vs, X as ys, Y as br, s as rl, t as bs, v as il, w as sl, x as al, y as ol, z as ll, F as cl, H as dl, I as ul, J as di, K as hl, M as Ut, N as lr, O as fl, P as ml, Q as pl, R as gl, T as vl, U as yl, V as bl, W as xl, Z as wl, _ as _l, $ as Cl, a0 as ui, a1 as El, a2 as kl, a3 as xs, a4 as Sl, a5 as Dl, a6 as Rl, a7 as Lr, a8 as hi, a9 as Nl, aa as Tl, ab as Ol, ac as Al, ad as Ml, ae as Il, af as zl, ag as Ll, ah as Pl, ai as ws, aj as Bl, ak as Fl, al as _s, am as fi, an as Cs, ao as Hl, ap as jl, aq as $l, ar as Wl } from "./DataCollectionStorageProvider-rZ2EAPyf.js";
|
|
7
|
+
import { aI as eg, as as tg, at as ng, aw as rg, aA as ig, aB as sg, aD as ag, aE as og, aF as lg, aG as cg, az as dg, aC as ug, au as hg, av as fg, aH as mg, ax as pg, ay as gg, aJ as vg, aK as yg, aL as bg, aM as xg } from "./DataCollectionStorageProvider-rZ2EAPyf.js";
|
|
8
|
+
import { A as _g, F as Cg, c as Eg, b as kg, a as Sg, o as Dg, u as Rg } from "./F0HILActionConfirmation-DgyaZFiq.js";
|
|
9
9
|
import { defaultTranslations as Tg } from "./i18n-provider-defaults.js";
|
|
10
10
|
import './f0.css';const Gl = {
|
|
11
11
|
xs: 1,
|
|
@@ -354,6 +354,7 @@ export declare const defaultTranslations: {
|
|
|
354
354
|
readonly defaultInitialMessage: "How can I help you today?";
|
|
355
355
|
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
356
356
|
readonly stopAnswerGeneration: "Stop generating";
|
|
357
|
+
readonly responseStopped: "You stopped this response";
|
|
357
358
|
readonly sendMessage: "Send message";
|
|
358
359
|
readonly thoughtsGroupTitle: "Reflection";
|
|
359
360
|
readonly resourcesGroupTitle: "Resources";
|
|
@@ -372,6 +373,8 @@ export declare const defaultTranslations: {
|
|
|
372
373
|
readonly placeholder: "Share what didn’t work";
|
|
373
374
|
};
|
|
374
375
|
};
|
|
376
|
+
readonly expandChat: "Expand chat";
|
|
377
|
+
readonly collapseChat: "Collapse chat";
|
|
375
378
|
readonly ask: "Ask One";
|
|
376
379
|
readonly growth: {
|
|
377
380
|
readonly demoCard: {
|
|
@@ -603,11 +606,6 @@ declare module "gridstack" {
|
|
|
603
606
|
}
|
|
604
607
|
|
|
605
608
|
|
|
606
|
-
declare namespace Calendar {
|
|
607
|
-
var displayName: string;
|
|
608
|
-
}
|
|
609
|
-
|
|
610
|
-
|
|
611
609
|
declare module "@tiptap/core" {
|
|
612
610
|
interface Commands<ReturnType> {
|
|
613
611
|
aiBlock: {
|
|
@@ -644,3 +642,8 @@ declare module "@tiptap/core" {
|
|
|
644
642
|
};
|
|
645
643
|
}
|
|
646
644
|
}
|
|
645
|
+
|
|
646
|
+
|
|
647
|
+
declare namespace Calendar {
|
|
648
|
+
var displayName: string;
|
|
649
|
+
}
|
|
@@ -354,6 +354,7 @@ const e = {
|
|
|
354
354
|
defaultInitialMessage: "How can I help you today?",
|
|
355
355
|
inputPlaceholder: "Ask about time, people, or company info and a lot of other things...",
|
|
356
356
|
stopAnswerGeneration: "Stop generating",
|
|
357
|
+
responseStopped: "You stopped this response",
|
|
357
358
|
sendMessage: "Send message",
|
|
358
359
|
thoughtsGroupTitle: "Reflection",
|
|
359
360
|
resourcesGroupTitle: "Resources",
|
|
@@ -372,6 +373,8 @@ const e = {
|
|
|
372
373
|
placeholder: "Share what didn’t work"
|
|
373
374
|
}
|
|
374
375
|
},
|
|
376
|
+
expandChat: "Expand chat",
|
|
377
|
+
collapseChat: "Collapse chat",
|
|
375
378
|
ask: "Ask One",
|
|
376
379
|
growth: {
|
|
377
380
|
demoCard: {
|