@factorialco/f0-react 1.435.0 → 1.436.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/{F0AiChat-BsYN-CYp.js → F0AiChat-Cg05PVK9.js} +32945 -32411
- package/dist/{F0HILActionConfirmation-zvTnEJgf.js → F0HILActionConfirmation-CMnMjtvP.js} +1 -1
- package/dist/ai.d.ts +102 -5
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +14 -5
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +129 -9
- package/dist/f0.js +4163 -4143
- package/dist/i18n-provider-defaults.d.ts +14 -5
- package/dist/i18n-provider-defaults.js +11 -2
- package/dist/{index-CHmxufWS.js → index-B0hDgrco.js} +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
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-Cg05PVK9.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
|
@@ -237,6 +237,10 @@ declare type AiChatProviderReturnValue = {
|
|
|
237
237
|
inProgress: boolean;
|
|
238
238
|
/** Set the in-progress state (synced from CopilotKit's isLoading) */
|
|
239
239
|
setInProgress: (value: boolean) => void;
|
|
240
|
+
/** The current clarifying question shown in the textarea, or null if none */
|
|
241
|
+
clarifyingQuestion: ClarifyingQuestionState | null;
|
|
242
|
+
/** Set the current clarifying question (or null to dismiss) */
|
|
243
|
+
setClarifyingQuestion: React.Dispatch<React.SetStateAction<ClarifyingQuestionState | null>>;
|
|
240
244
|
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits" | "fileAttachments"> & {
|
|
241
245
|
/** The current canvas content, or null when canvas is closed */
|
|
242
246
|
canvasContent: CanvasContent | null;
|
|
@@ -422,6 +426,15 @@ export declare const aiTranslations: {
|
|
|
422
426
|
};
|
|
423
427
|
readonly attachFile: "Attach file";
|
|
424
428
|
readonly removeFile: "Remove";
|
|
429
|
+
readonly clarifyingQuestion: {
|
|
430
|
+
readonly submit: "Submit";
|
|
431
|
+
readonly next: "Next";
|
|
432
|
+
readonly back: "Back";
|
|
433
|
+
readonly typeYourAnswer: "Type your answer…";
|
|
434
|
+
readonly stepOf: "{{current}} of {{total}}";
|
|
435
|
+
readonly custom: "own answer";
|
|
436
|
+
readonly skipped: "skipped";
|
|
437
|
+
};
|
|
425
438
|
readonly growth: {
|
|
426
439
|
readonly demoCard: {
|
|
427
440
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -672,6 +685,81 @@ declare type ChatTextareaProps = InputProps & {
|
|
|
672
685
|
onGetCredits?: () => void;
|
|
673
686
|
};
|
|
674
687
|
|
|
688
|
+
/**
|
|
689
|
+
* A single selectable option within a clarifying question step.
|
|
690
|
+
*/
|
|
691
|
+
declare interface ClarifyingOption {
|
|
692
|
+
/** Unique identifier for this option */
|
|
693
|
+
id: string;
|
|
694
|
+
/** Display label shown to the user */
|
|
695
|
+
label: string;
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* The active clarifying question state pushed into the AiChat context.
|
|
700
|
+
* When no clarifying question is active the context value is `null`.
|
|
701
|
+
*
|
|
702
|
+
* Navigation metadata (currentStepIndex, totalSteps) and callbacks live
|
|
703
|
+
* here so the panel component stays a pure view of this state.
|
|
704
|
+
*/
|
|
705
|
+
declare interface ClarifyingQuestionState {
|
|
706
|
+
/** The current step's data + interaction state */
|
|
707
|
+
currentStep: ClarifyingStepState;
|
|
708
|
+
/** Zero-based index of the current step */
|
|
709
|
+
currentStepIndex: number;
|
|
710
|
+
/** Total number of steps (1 for single-step questions) */
|
|
711
|
+
totalSteps: number;
|
|
712
|
+
/** Toggle selection of an option by its ID */
|
|
713
|
+
toggleOption: (optionId: string) => void;
|
|
714
|
+
/** Confirm the current step's selection and advance (or submit on final step) */
|
|
715
|
+
confirm: () => void;
|
|
716
|
+
/** Go back to the previous step */
|
|
717
|
+
back: () => void;
|
|
718
|
+
/** Set the custom answer text */
|
|
719
|
+
setCustomAnswerText: (text: string) => void;
|
|
720
|
+
/** Toggle whether the custom answer is included in the submission */
|
|
721
|
+
setCustomAnswerActive: (active: boolean) => void;
|
|
722
|
+
/** Activate the custom answer input (in single mode, clears predefined selections) */
|
|
723
|
+
activateCustomAnswer: () => void;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Selection mode for a clarifying question step.
|
|
728
|
+
* - "single": only one option can be selected (rendered as radio buttons)
|
|
729
|
+
* - "multiple": multiple options can be selected (rendered as checkboxes)
|
|
730
|
+
*/
|
|
731
|
+
declare type ClarifyingSelectionMode = "single" | "multiple";
|
|
732
|
+
|
|
733
|
+
/**
|
|
734
|
+
* Pure data describing a single clarifying question step.
|
|
735
|
+
* This is what the AI backend sends — no UI state or callbacks.
|
|
736
|
+
*/
|
|
737
|
+
declare interface ClarifyingStepData {
|
|
738
|
+
/** The question text displayed to the user */
|
|
739
|
+
question: string;
|
|
740
|
+
/** Available options the user can select from */
|
|
741
|
+
options: ClarifyingOption[];
|
|
742
|
+
/** Selection mode. Defaults to "single" when omitted */
|
|
743
|
+
selectionMode?: ClarifyingSelectionMode;
|
|
744
|
+
/** Whether the user can skip this step without selecting any option */
|
|
745
|
+
optional?: boolean;
|
|
746
|
+
/** Whether the user can type a free-text custom answer */
|
|
747
|
+
allowCustomAnswer?: boolean;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* A step enriched with the user's current interaction state.
|
|
752
|
+
* Used internally by the controller to track selections per step.
|
|
753
|
+
*/
|
|
754
|
+
declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
755
|
+
/** IDs of currently selected options */
|
|
756
|
+
selectedOptionIds: string[];
|
|
757
|
+
/** Current custom answer text (preserved even when deactivated) */
|
|
758
|
+
customAnswerText?: string;
|
|
759
|
+
/** Whether the custom answer is currently included in the submission */
|
|
760
|
+
isCustomAnswerActive: boolean;
|
|
761
|
+
}
|
|
762
|
+
|
|
675
763
|
declare interface CollectionComputation {
|
|
676
764
|
datasetId: string;
|
|
677
765
|
sortBy?: string;
|
|
@@ -1163,6 +1251,15 @@ export declare const defaultTranslations: {
|
|
|
1163
1251
|
};
|
|
1164
1252
|
readonly attachFile: "Attach file";
|
|
1165
1253
|
readonly removeFile: "Remove";
|
|
1254
|
+
readonly clarifyingQuestion: {
|
|
1255
|
+
readonly submit: "Submit";
|
|
1256
|
+
readonly next: "Next";
|
|
1257
|
+
readonly back: "Back";
|
|
1258
|
+
readonly typeYourAnswer: "Type your answer…";
|
|
1259
|
+
readonly stepOf: "{{current}} of {{total}}";
|
|
1260
|
+
readonly custom: "own answer";
|
|
1261
|
+
readonly skipped: "skipped";
|
|
1262
|
+
};
|
|
1166
1263
|
readonly growth: {
|
|
1167
1264
|
readonly demoCard: {
|
|
1168
1265
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -1872,6 +1969,11 @@ declare module "gridstack" {
|
|
|
1872
1969
|
}
|
|
1873
1970
|
|
|
1874
1971
|
|
|
1972
|
+
declare namespace Calendar {
|
|
1973
|
+
var displayName: string;
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
|
|
1875
1977
|
declare module "@tiptap/core" {
|
|
1876
1978
|
interface Commands<ReturnType> {
|
|
1877
1979
|
aiBlock: {
|
|
@@ -1919,8 +2021,3 @@ declare module "@tiptap/core" {
|
|
|
1919
2021
|
};
|
|
1920
2022
|
}
|
|
1921
2023
|
}
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
declare namespace Calendar {
|
|
1925
|
-
var displayName: string;
|
|
1926
|
-
}
|
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-
|
|
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-Cg05PVK9.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-
|
|
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-CMnMjtvP.js";
|
|
4
4
|
export {
|
|
5
5
|
p as AiChatTranslationsProvider,
|
|
6
6
|
t as ChatSpinner,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -2849,6 +2849,15 @@ declare const defaultTranslations: {
|
|
|
2849
2849
|
};
|
|
2850
2850
|
readonly attachFile: "Attach file";
|
|
2851
2851
|
readonly removeFile: "Remove";
|
|
2852
|
+
readonly clarifyingQuestion: {
|
|
2853
|
+
readonly submit: "Submit";
|
|
2854
|
+
readonly next: "Next";
|
|
2855
|
+
readonly back: "Back";
|
|
2856
|
+
readonly typeYourAnswer: "Type your answer…";
|
|
2857
|
+
readonly stepOf: "{{current}} of {{total}}";
|
|
2858
|
+
readonly custom: "own answer";
|
|
2859
|
+
readonly skipped: "skipped";
|
|
2860
|
+
};
|
|
2852
2861
|
readonly growth: {
|
|
2853
2862
|
readonly demoCard: {
|
|
2854
2863
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -7506,6 +7515,11 @@ declare module "gridstack" {
|
|
|
7506
7515
|
}
|
|
7507
7516
|
|
|
7508
7517
|
|
|
7518
|
+
declare namespace Calendar {
|
|
7519
|
+
var displayName: string;
|
|
7520
|
+
}
|
|
7521
|
+
|
|
7522
|
+
|
|
7509
7523
|
declare module "@tiptap/core" {
|
|
7510
7524
|
interface Commands<ReturnType> {
|
|
7511
7525
|
aiBlock: {
|
|
@@ -7553,8 +7567,3 @@ declare module "@tiptap/core" {
|
|
|
7553
7567
|
};
|
|
7554
7568
|
}
|
|
7555
7569
|
}
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
declare namespace Calendar {
|
|
7559
|
-
var displayName: string;
|
|
7560
|
-
}
|
package/dist/experimental.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { cN as Uu, cO as Gu, cP as Ku, a1 as qu, cQ as uo, cR as Un, cS as Yu, cT as ms, cU as _i, cV as br, K as k, R as X, L as rt, u as me, cW as Ju, cX as Xu, cY as Zu, cZ as Qu, c_ as ef, af as Le, c$ as tf, a0 as Pt, d0 as nf, b3 as rf, _ as H, b9 as sf, ba as of, U as $t, d1 as Yl, bi as lf, bc as af, M as $, d2 as gs, Z as T, d3 as it, d4 as cf, d5 as df, bd as uf, au as ff, bf as hf, aC as Bt, d6 as Jl, d7 as pf, d8 as At, aV as xn, av as bs, aw as on, k as Xl, a4 as pt, d9 as Zl, da as mf, db as fo, dc as Qt, dd as ws, de as Mn, df as wr, dg as gf, dh as Ql, di as bf, dj as xs, dk as yn, dl as Re, dm as wf, dn as xf, dp as yt, dq as oi, dr as yf, ds as bn, dt as Ut, du as vf, P as ge, dv as kf, dw as Cf, dx as Sf, dy as Nf, dz as If, W as Ye, Y as de, dA as ys, aR as On, cK as $r, dB as ea, dC as vs, dD as Af, dE as _f, dF as Tf, dG as Ef, dH as Df, dI as Rf, dJ as Lf, dK as Mf, dL as Of, b6 as Ff, dM as zf, b4 as Pf, dN as $f, dO as Bf, dP as Hf, dQ as jf, dR as Vf, dS as Wf, dT as Uf, dU as Gf, b_ as nt, dV as ta, dW as Kf, a3 as V, N as na, dX as ra, dY as qf, aZ as ks, an as Yf, dZ as Jf, d_ as Xf, ah as ln, d$ as Zf, e0 as Qf, e1 as eh, e2 as th, aM as Br, e3 as ia, e4 as sa, ca as oa, e5 as nh, aF as xr, e6 as rh, e7 as ih, e8 as sh, e9 as oh, ea as lh, ad as ah, ae as ch, ag as dh, eb as la, ec as uh, ed as fh, as as yr, ee as Kt, ef as hh, eg as aa, eh as Cs, ei as ph, ej as mh, ek as ca, el as Ti, bX as Ei, em as da, en as gh, eo as bh, cJ as Hr, bz as ua, cM as wh, cL as xh, ep as yh, bA as en, eq as vh, aJ as Gn, er as ho, es as Di, et as kh, bn as Ch, eu as Sh, bV as fa, b$ as Nh, cl as ha, cj as Ss, a9 as Ih, cm as Ah, bY as Ns, aq as pa, a as _h, c as Th, bR as Eh, ev as ma, ew as Dh, ex as Rh, F as Lh, ey as ga, ez as ba, eA as Mh, bs as po, eB as Oh, eC as Fh, bT as zh, bq as wa, bt as Ph, eD as $h, eE as Bh, eF as Hh, eG as jh, bU as xa, $ as Vh, Q as st, bF as Is, eH as As, eI as _s, eJ as ya, bG as Ts, eK as va, eL as Wh, eM as Uh, eN as Gh, eO as Kh, eP as qh, bH as Yh, eQ as Jh, bW as Xh, eR as Zh, eS as mo, eT as go, eU as bo, aX as Qh, eV as ep, eW as tp, b8 as np, eX as ka, by as rp, eY as ip, eZ as sp } from "./F0AiChat-
|
|
2
|
-
import { f1 as jN, f0 as VN, ai as WN, e_ as UN, fl as GN, az as KN, e$ as qN, aE as YN, f9 as JN, fa as XN, fc as ZN, fj as QN, fk as eI, aG as tI, f3 as nI, f2 as rI, fb as iI, c9 as sI, fe as oI, ff as lI, f8 as aI, f5 as cI, f7 as dI, f4 as uI, bZ as fI, f6 as hI, fg as pI, fh as mI, fd as gI, fi as bI } from "./F0AiChat-
|
|
1
|
+
import { cN as Uu, cO as Gu, cP as Ku, a1 as qu, cQ as uo, cR as Un, cS as Yu, cT as ms, cU as _i, cV as br, K as k, R as X, L as rt, u as me, cW as Ju, cX as Xu, cY as Zu, cZ as Qu, c_ as ef, af as Le, c$ as tf, a0 as Pt, d0 as nf, b3 as rf, _ as H, b9 as sf, ba as of, U as $t, d1 as Yl, bi as lf, bc as af, M as $, d2 as gs, Z as T, d3 as it, d4 as cf, d5 as df, bd as uf, au as ff, bf as hf, aC as Bt, d6 as Jl, d7 as pf, d8 as At, aV as xn, av as bs, aw as on, k as Xl, a4 as pt, d9 as Zl, da as mf, db as fo, dc as Qt, dd as ws, de as Mn, df as wr, dg as gf, dh as Ql, di as bf, dj as xs, dk as yn, dl as Re, dm as wf, dn as xf, dp as yt, dq as oi, dr as yf, ds as bn, dt as Ut, du as vf, P as ge, dv as kf, dw as Cf, dx as Sf, dy as Nf, dz as If, W as Ye, Y as de, dA as ys, aR as On, cK as $r, dB as ea, dC as vs, dD as Af, dE as _f, dF as Tf, dG as Ef, dH as Df, dI as Rf, dJ as Lf, dK as Mf, dL as Of, b6 as Ff, dM as zf, b4 as Pf, dN as $f, dO as Bf, dP as Hf, dQ as jf, dR as Vf, dS as Wf, dT as Uf, dU as Gf, b_ as nt, dV as ta, dW as Kf, a3 as V, N as na, dX as ra, dY as qf, aZ as ks, an as Yf, dZ as Jf, d_ as Xf, ah as ln, d$ as Zf, e0 as Qf, e1 as eh, e2 as th, aM as Br, e3 as ia, e4 as sa, ca as oa, e5 as nh, aF as xr, e6 as rh, e7 as ih, e8 as sh, e9 as oh, ea as lh, ad as ah, ae as ch, ag as dh, eb as la, ec as uh, ed as fh, as as yr, ee as Kt, ef as hh, eg as aa, eh as Cs, ei as ph, ej as mh, ek as ca, el as Ti, bX as Ei, em as da, en as gh, eo as bh, cJ as Hr, bz as ua, cM as wh, cL as xh, ep as yh, bA as en, eq as vh, aJ as Gn, er as ho, es as Di, et as kh, bn as Ch, eu as Sh, bV as fa, b$ as Nh, cl as ha, cj as Ss, a9 as Ih, cm as Ah, bY as Ns, aq as pa, a as _h, c as Th, bR as Eh, ev as ma, ew as Dh, ex as Rh, F as Lh, ey as ga, ez as ba, eA as Mh, bs as po, eB as Oh, eC as Fh, bT as zh, bq as wa, bt as Ph, eD as $h, eE as Bh, eF as Hh, eG as jh, bU as xa, $ as Vh, Q as st, bF as Is, eH as As, eI as _s, eJ as ya, bG as Ts, eK as va, eL as Wh, eM as Uh, eN as Gh, eO as Kh, eP as qh, bH as Yh, eQ as Jh, bW as Xh, eR as Zh, eS as mo, eT as go, eU as bo, aX as Qh, eV as ep, eW as tp, b8 as np, eX as ka, by as rp, eY as ip, eZ as sp } from "./F0AiChat-Cg05PVK9.js";
|
|
2
|
+
import { f1 as jN, f0 as VN, ai as WN, e_ as UN, fl as GN, az as KN, e$ as qN, aE as YN, f9 as JN, fa as XN, fc as ZN, fj as QN, fk as eI, aG as tI, f3 as nI, f2 as rI, fb as iI, c9 as sI, fe as oI, ff as lI, f8 as aI, f5 as cI, f7 as dI, f4 as uI, bZ as fI, f6 as hI, fg as pI, fh as mI, fd as gI, fi as bI } from "./F0AiChat-Cg05PVK9.js";
|
|
3
3
|
import { jsx as c, jsxs as g, Fragment as re } from "react/jsx-runtime";
|
|
4
4
|
import * as he from "react";
|
|
5
5
|
import ne, { forwardRef as F, useRef as K, useTransition as op, useState as L, useLayoutEffect as Ca, useContext as Es, createContext as Ds, useCallback as J, useMemo as ee, useEffect as W, useId as Sa, useImperativeHandle as Na, memo as Ia, Fragment as lp, isValidElement as ap, cloneElement as Aa, Children as _a } from "react";
|
|
6
|
-
import { C as cp, m as dp, N as He, o as ot, q as Te, t as up, v as sr, w as Ue, x as Ta, y as Oe, z as Rs, E as $e, G as wo, H as fp, I as Ea, J as Ie, K as ze, O as vn, Q as vr, U as Da, W as hp, X as Ht, Y as pp, Z as mp, a0 as gp, a1 as Fn, a2 as zn, a3 as Ls, a4 as bp, a5 as Ra, a6 as La, a7 as Ma, a8 as wp, a9 as Oa, aa as Fa, ab as za, ac as Pa, ad as $a, ae as Ba, n as xo, af as xp, ag as yo, ah as yp, ai as vp, aj as kp, ak as Ha, al as Cp, am as Sp, an as Np, ao as ja, e as Ri, ap as Ip, aq as Ap, ar as _p, as as Tp, at as Ep, au as Dp, av as Rp, M as Lp, aw as Mp, ax as Op, ay as Fp, az as zp, u as Va, aA as Pp, aB as $p, aC as Bp, aD as Hp, aE as jp, aF as Vp, aG as vo, aH as Wp, aI as Up, aJ as Gp } from "./index-
|
|
7
|
-
import { A as xI, f as yI, B as vI, a as kI, g as CI, j as SI, D as NI, F as II, b as AI, aM as _I, aK as TI, aL as EI, L as DI, h as RI, i as LI, k as MI, c as OI, R as FI, S as zI, T as PI, V as $I, _ as BI, l as HI, p as jI, s as VI } from "./index-
|
|
6
|
+
import { C as cp, m as dp, N as He, o as ot, q as Te, t as up, v as sr, w as Ue, x as Ta, y as Oe, z as Rs, E as $e, G as wo, H as fp, I as Ea, J as Ie, K as ze, O as vn, Q as vr, U as Da, W as hp, X as Ht, Y as pp, Z as mp, a0 as gp, a1 as Fn, a2 as zn, a3 as Ls, a4 as bp, a5 as Ra, a6 as La, a7 as Ma, a8 as wp, a9 as Oa, aa as Fa, ab as za, ac as Pa, ad as $a, ae as Ba, n as xo, af as xp, ag as yo, ah as yp, ai as vp, aj as kp, ak as Ha, al as Cp, am as Sp, an as Np, ao as ja, e as Ri, ap as Ip, aq as Ap, ar as _p, as as Tp, at as Ep, au as Dp, av as Rp, M as Lp, aw as Mp, ax as Op, ay as Fp, az as zp, u as Va, aA as Pp, aB as $p, aC as Bp, aD as Hp, aE as jp, aF as Vp, aG as vo, aH as Wp, aI as Up, aJ as Gp } from "./index-B0hDgrco.js";
|
|
7
|
+
import { A as xI, f as yI, B as vI, a as kI, g as CI, j as SI, D as NI, F as II, b as AI, aM as _I, aK as TI, aL as EI, L as DI, h as RI, i as LI, k as MI, c as OI, R as FI, S as zI, T as PI, V as $I, _ as BI, l as HI, p as jI, s as VI } from "./index-B0hDgrco.js";
|
|
8
8
|
import './experimental.css';const Kp = Uu("Search", [
|
|
9
9
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
10
10
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
package/dist/f0.d.ts
CHANGED
|
@@ -540,6 +540,10 @@ declare type AiChatProviderReturnValue = {
|
|
|
540
540
|
inProgress: boolean;
|
|
541
541
|
/** Set the in-progress state (synced from CopilotKit's isLoading) */
|
|
542
542
|
setInProgress: (value: boolean) => void;
|
|
543
|
+
/** The current clarifying question shown in the textarea, or null if none */
|
|
544
|
+
clarifyingQuestion: ClarifyingQuestionState | null;
|
|
545
|
+
/** Set the current clarifying question (or null to dismiss) */
|
|
546
|
+
setClarifyingQuestion: React.Dispatch<React.SetStateAction<ClarifyingQuestionState | null>>;
|
|
543
547
|
} & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits" | "fileAttachments"> & {
|
|
544
548
|
/** The current canvas content, or null when canvas is closed */
|
|
545
549
|
canvasContent: CanvasContent | null;
|
|
@@ -725,6 +729,15 @@ export declare const aiTranslations: {
|
|
|
725
729
|
};
|
|
726
730
|
readonly attachFile: "Attach file";
|
|
727
731
|
readonly removeFile: "Remove";
|
|
732
|
+
readonly clarifyingQuestion: {
|
|
733
|
+
readonly submit: "Submit";
|
|
734
|
+
readonly next: "Next";
|
|
735
|
+
readonly back: "Back";
|
|
736
|
+
readonly typeYourAnswer: "Type your answer…";
|
|
737
|
+
readonly stepOf: "{{current}} of {{total}}";
|
|
738
|
+
readonly custom: "own answer";
|
|
739
|
+
readonly skipped: "skipped";
|
|
740
|
+
};
|
|
728
741
|
readonly growth: {
|
|
729
742
|
readonly demoCard: {
|
|
730
743
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -2228,6 +2241,81 @@ export declare const chipVariants: (props?: ({
|
|
|
2228
2241
|
className?: ClassValue;
|
|
2229
2242
|
})) | undefined) => string;
|
|
2230
2243
|
|
|
2244
|
+
/**
|
|
2245
|
+
* A single selectable option within a clarifying question step.
|
|
2246
|
+
*/
|
|
2247
|
+
declare interface ClarifyingOption {
|
|
2248
|
+
/** Unique identifier for this option */
|
|
2249
|
+
id: string;
|
|
2250
|
+
/** Display label shown to the user */
|
|
2251
|
+
label: string;
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
/**
|
|
2255
|
+
* The active clarifying question state pushed into the AiChat context.
|
|
2256
|
+
* When no clarifying question is active the context value is `null`.
|
|
2257
|
+
*
|
|
2258
|
+
* Navigation metadata (currentStepIndex, totalSteps) and callbacks live
|
|
2259
|
+
* here so the panel component stays a pure view of this state.
|
|
2260
|
+
*/
|
|
2261
|
+
declare interface ClarifyingQuestionState {
|
|
2262
|
+
/** The current step's data + interaction state */
|
|
2263
|
+
currentStep: ClarifyingStepState;
|
|
2264
|
+
/** Zero-based index of the current step */
|
|
2265
|
+
currentStepIndex: number;
|
|
2266
|
+
/** Total number of steps (1 for single-step questions) */
|
|
2267
|
+
totalSteps: number;
|
|
2268
|
+
/** Toggle selection of an option by its ID */
|
|
2269
|
+
toggleOption: (optionId: string) => void;
|
|
2270
|
+
/** Confirm the current step's selection and advance (or submit on final step) */
|
|
2271
|
+
confirm: () => void;
|
|
2272
|
+
/** Go back to the previous step */
|
|
2273
|
+
back: () => void;
|
|
2274
|
+
/** Set the custom answer text */
|
|
2275
|
+
setCustomAnswerText: (text: string) => void;
|
|
2276
|
+
/** Toggle whether the custom answer is included in the submission */
|
|
2277
|
+
setCustomAnswerActive: (active: boolean) => void;
|
|
2278
|
+
/** Activate the custom answer input (in single mode, clears predefined selections) */
|
|
2279
|
+
activateCustomAnswer: () => void;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
/**
|
|
2283
|
+
* Selection mode for a clarifying question step.
|
|
2284
|
+
* - "single": only one option can be selected (rendered as radio buttons)
|
|
2285
|
+
* - "multiple": multiple options can be selected (rendered as checkboxes)
|
|
2286
|
+
*/
|
|
2287
|
+
declare type ClarifyingSelectionMode = "single" | "multiple";
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* Pure data describing a single clarifying question step.
|
|
2291
|
+
* This is what the AI backend sends — no UI state or callbacks.
|
|
2292
|
+
*/
|
|
2293
|
+
declare interface ClarifyingStepData {
|
|
2294
|
+
/** The question text displayed to the user */
|
|
2295
|
+
question: string;
|
|
2296
|
+
/** Available options the user can select from */
|
|
2297
|
+
options: ClarifyingOption[];
|
|
2298
|
+
/** Selection mode. Defaults to "single" when omitted */
|
|
2299
|
+
selectionMode?: ClarifyingSelectionMode;
|
|
2300
|
+
/** Whether the user can skip this step without selecting any option */
|
|
2301
|
+
optional?: boolean;
|
|
2302
|
+
/** Whether the user can type a free-text custom answer */
|
|
2303
|
+
allowCustomAnswer?: boolean;
|
|
2304
|
+
}
|
|
2305
|
+
|
|
2306
|
+
/**
|
|
2307
|
+
* A step enriched with the user's current interaction state.
|
|
2308
|
+
* Used internally by the controller to track selections per step.
|
|
2309
|
+
*/
|
|
2310
|
+
declare interface ClarifyingStepState extends ClarifyingStepData {
|
|
2311
|
+
/** IDs of currently selected options */
|
|
2312
|
+
selectedOptionIds: string[];
|
|
2313
|
+
/** Current custom answer text (preserved even when deactivated) */
|
|
2314
|
+
customAnswerText?: string;
|
|
2315
|
+
/** Whether the custom answer is currently included in the submission */
|
|
2316
|
+
isCustomAnswerActive: boolean;
|
|
2317
|
+
}
|
|
2318
|
+
|
|
2231
2319
|
declare type ColId = string;
|
|
2232
2320
|
|
|
2233
2321
|
declare interface CollectionComputation {
|
|
@@ -3502,6 +3590,15 @@ export declare const defaultTranslations: {
|
|
|
3502
3590
|
};
|
|
3503
3591
|
readonly attachFile: "Attach file";
|
|
3504
3592
|
readonly removeFile: "Remove";
|
|
3593
|
+
readonly clarifyingQuestion: {
|
|
3594
|
+
readonly submit: "Submit";
|
|
3595
|
+
readonly next: "Next";
|
|
3596
|
+
readonly back: "Back";
|
|
3597
|
+
readonly typeYourAnswer: "Type your answer…";
|
|
3598
|
+
readonly stepOf: "{{current}} of {{total}}";
|
|
3599
|
+
readonly custom: "own answer";
|
|
3600
|
+
readonly skipped: "skipped";
|
|
3601
|
+
};
|
|
3505
3602
|
readonly growth: {
|
|
3506
3603
|
readonly demoCard: {
|
|
3507
3604
|
readonly title: "See {{moduleName}} in action";
|
|
@@ -5802,8 +5899,15 @@ export declare interface F0FileConfig {
|
|
|
5802
5899
|
multiple?: boolean;
|
|
5803
5900
|
/** Helper text shown in the dropzone area */
|
|
5804
5901
|
description?: string;
|
|
5805
|
-
/**
|
|
5806
|
-
|
|
5902
|
+
/**
|
|
5903
|
+
* Consumer-provided upload hook.
|
|
5904
|
+
*
|
|
5905
|
+
* When used inside `<F0Form>`, the form-level `useUpload` is preferred.
|
|
5906
|
+
* This prop is primarily for standalone file fields rendered outside of
|
|
5907
|
+
* `<F0Form>` / `F0FormContext.Provider`, where the upload hook cannot be
|
|
5908
|
+
* supplied via context.
|
|
5909
|
+
*/
|
|
5910
|
+
useUpload?: UseFileUpload;
|
|
5807
5911
|
}
|
|
5808
5912
|
|
|
5809
5913
|
/**
|
|
@@ -5819,8 +5923,11 @@ export declare type F0FileField = F0BaseField & {
|
|
|
5819
5923
|
multiple?: boolean;
|
|
5820
5924
|
/** Dropzone description text */
|
|
5821
5925
|
description?: string;
|
|
5822
|
-
/**
|
|
5823
|
-
|
|
5926
|
+
/**
|
|
5927
|
+
* Consumer-provided upload hook for standalone usage.
|
|
5928
|
+
* When inside `<F0Form>`, the form-level `useUpload` takes precedence.
|
|
5929
|
+
*/
|
|
5930
|
+
useUpload?: UseFileUpload;
|
|
5824
5931
|
/** Conditional rendering */
|
|
5825
5932
|
renderIf?: FileFieldRenderIf;
|
|
5826
5933
|
};
|
|
@@ -6120,6 +6227,8 @@ export declare interface F0FormPropsWithPerSectionDefinition<T extends F0PerSect
|
|
|
6120
6227
|
styling?: F0FormStylingConfig;
|
|
6121
6228
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
6122
6229
|
initialFiles?: InitialFile[];
|
|
6230
|
+
/** Upload hook shared by all file fields in the form. */
|
|
6231
|
+
useUpload?: UseFileUpload;
|
|
6123
6232
|
/**
|
|
6124
6233
|
* Callback that renders custom fields identified by `customFieldName`.
|
|
6125
6234
|
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
@@ -6174,6 +6283,10 @@ export declare interface F0FormPropsWithPerSectionSchema<T extends F0PerSectionS
|
|
|
6174
6283
|
* `defaultValues` against `InitialFile.value`.
|
|
6175
6284
|
*/
|
|
6176
6285
|
initialFiles?: InitialFile[];
|
|
6286
|
+
/**
|
|
6287
|
+
* Upload hook shared by all file fields in the form.
|
|
6288
|
+
*/
|
|
6289
|
+
useUpload?: UseFileUpload;
|
|
6177
6290
|
/**
|
|
6178
6291
|
* Callback that renders custom fields identified by `customFieldName`.
|
|
6179
6292
|
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
@@ -6229,6 +6342,11 @@ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchem
|
|
|
6229
6342
|
* `defaultValues` against `InitialFile.value`.
|
|
6230
6343
|
*/
|
|
6231
6344
|
initialFiles?: InitialFile[];
|
|
6345
|
+
/**
|
|
6346
|
+
* Upload hook shared by all file fields in the form.
|
|
6347
|
+
* Called once per file to obtain an independent upload instance.
|
|
6348
|
+
*/
|
|
6349
|
+
useUpload?: UseFileUpload;
|
|
6232
6350
|
/**
|
|
6233
6351
|
* Callback that renders custom fields identified by `customFieldName`.
|
|
6234
6352
|
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
@@ -6263,6 +6381,8 @@ export declare interface F0FormPropsWithSingleSchemaDefinition<TSchema extends F
|
|
|
6263
6381
|
styling?: F0FormStylingConfig;
|
|
6264
6382
|
formRef?: React.MutableRefObject<F0FormRef | null>;
|
|
6265
6383
|
initialFiles?: InitialFile[];
|
|
6384
|
+
/** Upload hook shared by all file fields in the form. */
|
|
6385
|
+
useUpload?: UseFileUpload;
|
|
6266
6386
|
/**
|
|
6267
6387
|
* Callback that renders custom fields identified by `customFieldName`.
|
|
6268
6388
|
* When a field has `customFieldName`, this function is called instead of the inline `render`.
|
|
@@ -11561,6 +11681,11 @@ declare module "gridstack" {
|
|
|
11561
11681
|
}
|
|
11562
11682
|
|
|
11563
11683
|
|
|
11684
|
+
declare namespace Calendar {
|
|
11685
|
+
var displayName: string;
|
|
11686
|
+
}
|
|
11687
|
+
|
|
11688
|
+
|
|
11564
11689
|
declare module "@tiptap/core" {
|
|
11565
11690
|
interface Commands<ReturnType> {
|
|
11566
11691
|
aiBlock: {
|
|
@@ -11608,8 +11733,3 @@ declare module "@tiptap/core" {
|
|
|
11608
11733
|
};
|
|
11609
11734
|
}
|
|
11610
11735
|
}
|
|
11611
|
-
|
|
11612
|
-
|
|
11613
|
-
declare namespace Calendar {
|
|
11614
|
-
var displayName: string;
|
|
11615
|
-
}
|