@factorialco/f0-react 1.374.2 → 1.375.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.
@@ -43870,7 +43870,7 @@ const xn = ({ avatar: e, size: t = "xs" }) => {
43870
43870
  const { label: t, icon: n, avatar: r, description: a, href: i, critical: s, ...l } = e, c = f2("flex items-start gap-1.5 w-full", s && "text-f1-foreground-critical");
43871
43871
  return o(BH, {
43872
43872
  asChild: !0,
43873
- className: c,
43873
+ className: f2(c, "cursor-pointer"),
43874
43874
  children: i ? o(P7, {
43875
43875
  href: i,
43876
43876
  className: f2(c, "text-f1-foreground no-underline hover:cursor-pointer"),
@@ -1,6 +1,6 @@
1
1
  import { jsx as X, jsxs as le } from "react/jsx-runtime";
2
2
  import { useInsertionEffect as Xe, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as ze, useMemo as Ye } from "react";
3
- import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-DHTXU56n.js";
3
+ import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-Bb12WR9x.js";
4
4
  import { useTrackVolume as pt } from "@livekit/components-react";
5
5
  function vt(t, e, r) {
6
6
  Xe(() => t.on(e, r), [t, e, r]);
package/dist/ai.d.ts CHANGED
@@ -1232,10 +1232,8 @@ declare module "@tiptap/core" {
1232
1232
 
1233
1233
  declare module "@tiptap/core" {
1234
1234
  interface Commands<ReturnType> {
1235
- videoEmbed: {
1236
- setVideoEmbed: (options: {
1237
- src: string;
1238
- }) => ReturnType;
1235
+ transcript: {
1236
+ insertTranscript: (data: TranscriptData) => ReturnType;
1239
1237
  };
1240
1238
  }
1241
1239
  }
@@ -1243,8 +1241,10 @@ declare module "@tiptap/core" {
1243
1241
 
1244
1242
  declare module "@tiptap/core" {
1245
1243
  interface Commands<ReturnType> {
1246
- transcript: {
1247
- insertTranscript: (data: TranscriptData) => ReturnType;
1244
+ videoEmbed: {
1245
+ setVideoEmbed: (options: {
1246
+ src: string;
1247
+ }) => ReturnType;
1248
1248
  };
1249
1249
  }
1250
1250
  }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-DHTXU56n.js";
1
+ import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-Bb12WR9x.js";
2
2
  import { defaultTranslations as R } from "./i18n-provider-defaults.js";
3
- import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-COzrRg8x.js";
3
+ import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-DqkMrDGj.js";
4
4
  export {
5
5
  e as A,
6
6
  y as AiChatTranslationsProvider,
@@ -6736,10 +6736,8 @@ declare module "@tiptap/core" {
6736
6736
 
6737
6737
  declare module "@tiptap/core" {
6738
6738
  interface Commands<ReturnType> {
6739
- videoEmbed: {
6740
- setVideoEmbed: (options: {
6741
- src: string;
6742
- }) => ReturnType;
6739
+ transcript: {
6740
+ insertTranscript: (data: TranscriptData) => ReturnType;
6743
6741
  };
6744
6742
  }
6745
6743
  }
@@ -6747,8 +6745,10 @@ declare module "@tiptap/core" {
6747
6745
 
6748
6746
  declare module "@tiptap/core" {
6749
6747
  interface Commands<ReturnType> {
6750
- transcript: {
6751
- insertTranscript: (data: TranscriptData) => ReturnType;
6748
+ videoEmbed: {
6749
+ setVideoEmbed: (options: {
6750
+ src: string;
6751
+ }) => ReturnType;
6752
6752
  };
6753
6753
  }
6754
6754
  }
@@ -1,10 +1,10 @@
1
- import { a5 as Vd, bG as Hp, bH as Vp, bI as Wp, bJ as zo, bK as Up, bL as Qi, D as Gp, bM as qp, ab as G, V as Wd, J as Kp, bN as Jp, ao as Ni, bO as Ud, bP as Yp, bQ as Qp, ak as Xp, bR as Ca, bS as Gr, bT as Zp, a6 as k, a7 as Nt, u as Y, bU as eg, bV as tg, bW as ng, bX as rg, bY as ig, av as we, bZ as og, b_ as ul, b$ as Gd, c0 as ms, aj as Ae, c1 as sg, c2 as qd, ah as q, c3 as Kd, c4 as Jd, ac as it, c5 as Yd, c6 as ps, c7 as Qd, a8 as j, c8 as Er, ag as M, c9 as mt, ca as lg, cb as ag, cc as ar, aI as Xd, cd as Zd, a_ as Zt, ce as eu, cf as fl, cg as ut, aJ as hl, aK as bn, v as tu, ch as nu, ci as cg, cj as ka, ck as Pn, cl as ml, cm as Tr, cn as Si, co as dg, cp as ru, cq as ug, cr as pl, cs as cr, ct as Ye, cu as fg, cv as hg, cw as Vt, cx as $o, cy as mg, cz as sr, cA as An, cB as pg, cC as iu, cD as gg, cE as bg, cF as vg, cG as yg, ad as We, af as Ne, cH as cn, aT as en, bD as Dr, cI as ou, cJ as gl, cK as xg, cL as wg, cM as Cg, cN as kg, cO as Ng, cP as Sg, cQ as Ig, cR as Ag, cS as Eg, cT as bl, cU as Tg, cV as su, cW as Dg, cX as _g, cY as Lg, cZ as Og, c_ as Rg, c$ as Fg, d0 as Mg, d1 as Pg, be as Ct, d2 as lu, d3 as zg, am as se, a9 as dr, d4 as au, d5 as cu, aW as vl, t as $g, d6 as jg, d7 as Bg, al as ur, d8 as Hg, d9 as jo, da as Vg, db as yl, dc as Wt, aP as du, dd as Na, de as Sa, df as Wg, dg as Ia, dh as uu, di as xl, aO as zn, aM as fu, at as wl, au as Cl, aw as kl, aL as Ii, ai as _r, dj as Ug, dk as Gg, dl as hu, dm as qg, ax as kt, dn as Kg, dp as mu, dq as pu, dr as Jg, ds as Lr, dt as Nl, du as Xi, bg as dn, dv as gs, dw as Yg, dx as Qg, dy as Xg, dz as Zg, dA as eb, dB as tb, dC as gu, dD as nb, dE as bu, dF as rb, dG as ib, dH as ob, aG as Aa, dI as vu, dJ as bs, aB as vs, dK as yu, dL as ys, bn as Sl, aV as un, b9 as Zi, dM as eo, dN as sb, dO as lb, dP as ab, bC as to, aU as xu, bF as cb, bE as db, dQ as wu, dR as ub, aD as Dn, dS as Ea, dT as Ai, dU as fb, dV as hb, bf as mb, ba as Cu, a as pb, d as gb, dW as Il, dX as bb, F as vb, dY as ku, dZ as Nu, d_ as yb, d$ as xb, e0 as wb, e1 as Cb, e2 as kb, e3 as Su, e4 as Nb, bb as Iu, e5 as Au, e6 as Sb, e7 as Ib, e8 as Ab, e9 as Eb, ea as Tb, eb as Db, ec as _b, ed as Lb, bq as Ob, br as Rb, by as no, bw as Al, a$ as ro, ee as io, ef as oo, b0 as so, eg as El, bx as Eu, aC as Fb, bs as Ei, eh as Tu, ei as Mb, ej as xs, ek as Pb, el as Ta, em as zb, en as $b, eo as jb, ep as Bb, eq as Hb, er as Vb, es as Wb, aa as Du, bm as Ub, bv as Gb, aX as qb, aY as Kb, aZ as Jb, an as pt, et as _u, eu as Yb, ev as Qb, ew as Xb, ex as Zb, b1 as e0, ey as t0, ez as Da, eA as _a, eB as La, eC as n0, eD as r0, eE as i0, eF as o0, eG as Lu, eH as s0 } from "./F0AiChat-DHTXU56n.js";
2
- import { eK as _L, eJ as LL, eI as OL, eP as RL, eQ as FL, eM as ML, eL as PL, eO as zL, bd as $L, eN as jL } from "./F0AiChat-DHTXU56n.js";
1
+ import { a5 as Vd, bG as Hp, bH as Vp, bI as Wp, bJ as zo, bK as Up, bL as Qi, D as Gp, bM as qp, ab as G, V as Wd, J as Kp, bN as Jp, ao as Ni, bO as Ud, bP as Yp, bQ as Qp, ak as Xp, bR as Ca, bS as Gr, bT as Zp, a6 as k, a7 as Nt, u as Y, bU as eg, bV as tg, bW as ng, bX as rg, bY as ig, av as we, bZ as og, b_ as ul, b$ as Gd, c0 as ms, aj as Ae, c1 as sg, c2 as qd, ah as q, c3 as Kd, c4 as Jd, ac as it, c5 as Yd, c6 as ps, c7 as Qd, a8 as j, c8 as Er, ag as M, c9 as mt, ca as lg, cb as ag, cc as ar, aI as Xd, cd as Zd, a_ as Zt, ce as eu, cf as fl, cg as ut, aJ as hl, aK as bn, v as tu, ch as nu, ci as cg, cj as ka, ck as Pn, cl as ml, cm as Tr, cn as Si, co as dg, cp as ru, cq as ug, cr as pl, cs as cr, ct as Ye, cu as fg, cv as hg, cw as Vt, cx as $o, cy as mg, cz as sr, cA as An, cB as pg, cC as iu, cD as gg, cE as bg, cF as vg, cG as yg, ad as We, af as Ne, cH as cn, aT as en, bD as Dr, cI as ou, cJ as gl, cK as xg, cL as wg, cM as Cg, cN as kg, cO as Ng, cP as Sg, cQ as Ig, cR as Ag, cS as Eg, cT as bl, cU as Tg, cV as su, cW as Dg, cX as _g, cY as Lg, cZ as Og, c_ as Rg, c$ as Fg, d0 as Mg, d1 as Pg, be as Ct, d2 as lu, d3 as zg, am as se, a9 as dr, d4 as au, d5 as cu, aW as vl, t as $g, d6 as jg, d7 as Bg, al as ur, d8 as Hg, d9 as jo, da as Vg, db as yl, dc as Wt, aP as du, dd as Na, de as Sa, df as Wg, dg as Ia, dh as uu, di as xl, aO as zn, aM as fu, at as wl, au as Cl, aw as kl, aL as Ii, ai as _r, dj as Ug, dk as Gg, dl as hu, dm as qg, ax as kt, dn as Kg, dp as mu, dq as pu, dr as Jg, ds as Lr, dt as Nl, du as Xi, bg as dn, dv as gs, dw as Yg, dx as Qg, dy as Xg, dz as Zg, dA as eb, dB as tb, dC as gu, dD as nb, dE as bu, dF as rb, dG as ib, dH as ob, aG as Aa, dI as vu, dJ as bs, aB as vs, dK as yu, dL as ys, bn as Sl, aV as un, b9 as Zi, dM as eo, dN as sb, dO as lb, dP as ab, bC as to, aU as xu, bF as cb, bE as db, dQ as wu, dR as ub, aD as Dn, dS as Ea, dT as Ai, dU as fb, dV as hb, bf as mb, ba as Cu, a as pb, d as gb, dW as Il, dX as bb, F as vb, dY as ku, dZ as Nu, d_ as yb, d$ as xb, e0 as wb, e1 as Cb, e2 as kb, e3 as Su, e4 as Nb, bb as Iu, e5 as Au, e6 as Sb, e7 as Ib, e8 as Ab, e9 as Eb, ea as Tb, eb as Db, ec as _b, ed as Lb, bq as Ob, br as Rb, by as no, bw as Al, a$ as ro, ee as io, ef as oo, b0 as so, eg as El, bx as Eu, aC as Fb, bs as Ei, eh as Tu, ei as Mb, ej as xs, ek as Pb, el as Ta, em as zb, en as $b, eo as jb, ep as Bb, eq as Hb, er as Vb, es as Wb, aa as Du, bm as Ub, bv as Gb, aX as qb, aY as Kb, aZ as Jb, an as pt, et as _u, eu as Yb, ev as Qb, ew as Xb, ex as Zb, b1 as e0, ey as t0, ez as Da, eA as _a, eB as La, eC as n0, eD as r0, eE as i0, eF as o0, eG as Lu, eH as s0 } from "./F0AiChat-Bb12WR9x.js";
2
+ import { eK as _L, eJ as LL, eI as OL, eP as RL, eQ as FL, eM as ML, eL as PL, eO as zL, bd as $L, eN as jL } from "./F0AiChat-Bb12WR9x.js";
3
3
  import { jsx as l, jsxs as g, Fragment as Z } from "react/jsx-runtime";
4
4
  import * as Fe from "react";
5
5
  import Q, { createContext as Pt, forwardRef as J, useRef as W, useEffect as V, useContext as zt, PureComponent as l0, useTransition as a0, useState as R, useLayoutEffect as Kn, useId as Tl, useCallback as ne, useMemo as P, useImperativeHandle as Ou, memo as lo, Fragment as $n, isValidElement as Ru, cloneElement as Dl, createElement as Oa, Children as Fu } from "react";
6
- import { f as _n, aG as fr, j as qr, aH as c0, b as Bo, aI as d0, A as u0, d as Kr, i as f0, m as h0, G as m0, g as Ra, aJ as p0, l as Fa, aK as g0, p as b0, aL as Mu, aM as Pu, aN as v0, C as y0, az as x0, ae as jn, D as De, aO as ot, aP as St, aQ as Ge, aR as w0, aS as ci, aT as lt, aU as zu, aV as Xe, aW as _l, aX as nt, aY as Ma, aZ as C0, a_ as $u, a$ as He, b0 as et, b1 as hr, b2 as Ti, b3 as ju, b4 as k0, b5 as vn, b6 as N0, b7 as S0, b8 as I0, b9 as Or, ba as Rr, bb as Ll, bc as A0, bd as Bu, be as Hu, bf as Vu, bg as E0, bh as Wu, bi as Uu, bj as Gu, bk as qu, bl as Ku, bm as Ju, bn as ws, bo as T0, bp as Pa, bq as D0, br as _0, bs as L0, t as O0, x as R0, y as F0, F as M0, M as za, N as $a, O as P0, P as z0, a4 as $0, a5 as j0, bt as B0, bu as H0, a7 as V0, bv as Yu, bw as W0, bx as U0, by as G0, am as ao, bz as Ol, bA as Qu, al as Cs, bB as q0, ak as Xu, a2 as Fr, ag as K0, bC as J0, bD as Y0, bE as Q0, ap as Rl, bF as X0, aD as Z0, bG as ks, bH as ev, bI as Di, bJ as tv, aE as nv, bK as rv, aC as Zu, aB as iv, aA as ov, bL as sv, bM as lv, bN as av, bO as cv, bP as dv, bQ as uv, bR as fv, bS as hv, bT as mv, bU as pv, bV as gv, bW as bv, bX as vv, bY as yv, bZ as xv, aF as ef, at as tf, b_ as wv, R as Cv, T as kv, V as Nv, W as Sv, Z as Iv, U as Av, b$ as ja, c0 as Ev, c1 as Tv, n as Dv } from "./DataCollectionStorageProvider-CWC0VRoY.js";
7
- import { ah as HL, c2 as VL, a8 as WL, a3 as UL, aa as GL, c6 as qL, c5 as KL, c3 as JL, c4 as YL, a6 as QL, a9 as XL, aq as ZL, ar as eO } from "./DataCollectionStorageProvider-CWC0VRoY.js";
6
+ import { f as _n, aG as fr, j as qr, aH as c0, b as Bo, aI as d0, A as u0, d as Kr, i as f0, m as h0, G as m0, g as Ra, aJ as p0, l as Fa, aK as g0, p as b0, aL as Mu, aM as Pu, aN as v0, C as y0, az as x0, ae as jn, D as De, aO as ot, aP as St, aQ as Ge, aR as w0, aS as ci, aT as lt, aU as zu, aV as Xe, aW as _l, aX as nt, aY as Ma, aZ as C0, a_ as $u, a$ as He, b0 as et, b1 as hr, b2 as Ti, b3 as ju, b4 as k0, b5 as vn, b6 as N0, b7 as S0, b8 as I0, b9 as Or, ba as Rr, bb as Ll, bc as A0, bd as Bu, be as Hu, bf as Vu, bg as E0, bh as Wu, bi as Uu, bj as Gu, bk as qu, bl as Ku, bm as Ju, bn as ws, bo as T0, bp as Pa, bq as D0, br as _0, bs as L0, t as O0, x as R0, y as F0, F as M0, M as za, N as $a, O as P0, P as z0, a4 as $0, a5 as j0, bt as B0, bu as H0, a7 as V0, bv as Yu, bw as W0, bx as U0, by as G0, am as ao, bz as Ol, bA as Qu, al as Cs, bB as q0, ak as Xu, a2 as Fr, ag as K0, bC as J0, bD as Y0, bE as Q0, ap as Rl, bF as X0, aD as Z0, bG as ks, bH as ev, bI as Di, bJ as tv, aE as nv, bK as rv, aC as Zu, aB as iv, aA as ov, bL as sv, bM as lv, bN as av, bO as cv, bP as dv, bQ as uv, bR as fv, bS as hv, bT as mv, bU as pv, bV as gv, bW as bv, bX as vv, bY as yv, bZ as xv, aF as ef, at as tf, b_ as wv, R as Cv, T as kv, V as Nv, W as Sv, Z as Iv, U as Av, b$ as ja, c0 as Ev, c1 as Tv, n as Dv } from "./DataCollectionStorageProvider-DYikAZhp.js";
7
+ import { ah as HL, c2 as VL, a8 as WL, a3 as UL, aa as GL, c6 as qL, c5 as KL, c3 as JL, c4 as YL, a6 as QL, a9 as XL, aq as ZL, ar as eO } from "./DataCollectionStorageProvider-DYikAZhp.js";
8
8
  import './experimental.css';function nf(t, e) {
9
9
  const n = Vd(e()), r = () => n.set(e());
10
10
  return r(), Hp(() => {
package/dist/f0.d.ts CHANGED
@@ -3797,7 +3797,10 @@ export declare interface F0FilterPickerContentProps<Filters extends FiltersDefin
3797
3797
  /**
3798
3798
  * @experimental This is an experimental component, use it at your own risk
3799
3799
  */
3800
- export declare const F0Form: <TSchema extends F0FormSchema>(props: F0FormProps<TSchema>) => React.ReactElement;
3800
+ export declare const F0Form: {
3801
+ <TSchema extends F0FormSchema>(props: F0FormPropsWithSingleSchema<TSchema>): React.ReactElement;
3802
+ <T extends F0PerSectionSchema>(props: F0FormPropsWithPerSectionSchema<T>): React.ReactElement;
3803
+ };
3801
3804
 
3802
3805
  /**
3803
3806
  * Submit configuration for action bar type
@@ -3938,44 +3941,60 @@ export declare function f0FormField<T extends ZodTypeAny, TConfig = undefined>(s
3938
3941
  export declare function f0FormField<T extends ZodTypeAny, V extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>>(schema: T, config: F0FieldConfig<V, R>): T & F0ZodType<T>;
3939
3942
 
3940
3943
  /**
3941
- * Props for the F0Form component
3942
- *
3943
- * @typeParam TSchema - The Zod object schema type. The form data type is inferred from this.
3944
- * Can be a plain ZodObject or a refined ZodObject (using .refine()).
3945
- *
3946
- * @example
3947
- * ```tsx
3948
- * const schema = z.object({
3949
- * name: f0FormField(z.string(), { label: "Name" }),
3950
- * age: f0FormField(z.number(), { label: "Age" }),
3951
- * })
3952
- *
3953
- * // Default submit button
3954
- * <F0Form
3955
- * name="my-form"
3956
- * schema={schema}
3957
- * defaultValues={{ name: "" }}
3958
- * onSubmit={(data) => ({ success: true })}
3959
- * />
3960
- *
3961
- * // With cross-field validation using .refine()
3962
- * const schemaWithRefine = z.object({
3963
- * startDate: f0FormField(z.date(), { label: "Start" }),
3964
- * endDate: f0FormField(z.date(), { label: "End" }),
3965
- * }).refine((data) => data.endDate > data.startDate, {
3966
- * message: "End date must be after start date",
3967
- * path: ["endDate"],
3968
- * })
3969
- * ```
3944
+ * Union of both F0Form prop variants.
3945
+ * The component detects the mode based on whether `schema` is a single Zod schema
3946
+ * or a record of schemas keyed by section ID.
3970
3947
  */
3971
- export declare interface F0FormProps<TSchema extends F0FormSchema> {
3972
- /** Unique name for the form, used for generating anchor links (e.g., #forms.[name].[sectionId].[fieldId]) */
3948
+ export declare type F0FormProps<TSchema extends F0FormSchema | F0PerSectionSchema = F0FormSchema | F0PerSectionSchema> = TSchema extends F0FormSchema ? F0FormPropsWithSingleSchema<TSchema> : TSchema extends F0PerSectionSchema ? F0FormPropsWithPerSectionSchema<TSchema> : never;
3949
+
3950
+ /**
3951
+ * Props for the F0Form component (per-section schema mode).
3952
+ * Each section key in the schema maps to an independent form with its own
3953
+ * validation and submit button.
3954
+ */
3955
+ export declare interface F0FormPropsWithPerSectionSchema<T extends F0PerSectionSchema> {
3956
+ /** Unique name for the form, used for generating anchor links */
3957
+ name: string;
3958
+ /** Record mapping section IDs to their Zod schemas. Each section is independently validated and submitted. */
3959
+ schema: T;
3960
+ /** Section configurations keyed by section ID */
3961
+ sections?: Record<string, F0PerSectionSectionConfig>;
3962
+ /** Default values for each section, keyed by section ID */
3963
+ defaultValues?: {
3964
+ [K in keyof T]?: Partial<z.infer<T[K]>>;
3965
+ };
3966
+ /** Callback when a section is submitted. Receives the section ID and its validated data, both correctly typed. */
3967
+ onSubmit: PerSectionSubmitHandler<T>;
3968
+ /** Global submit config applied to all sections (can be overridden per section) */
3969
+ submitConfig?: F0PerSectionSubmitConfig;
3970
+ /** Additional class name for the form container */
3971
+ className?: string;
3972
+ /**
3973
+ * When to trigger and display validation errors
3974
+ * @default "on-blur"
3975
+ */
3976
+ errorTriggerMode?: F0FormErrorTriggerMode;
3977
+ /**
3978
+ * Styling configuration for form layout and appearance.
3979
+ */
3980
+ styling?: F0FormStylingConfig;
3981
+ /**
3982
+ * Ref to control the form programmatically from outside.
3983
+ */
3984
+ formRef?: React.MutableRefObject<F0FormRef | null>;
3985
+ }
3986
+
3987
+ /**
3988
+ * Props for the F0Form component (single schema mode)
3989
+ */
3990
+ export declare interface F0FormPropsWithSingleSchema<TSchema extends F0FormSchema> {
3991
+ /** Unique name for the form, used for generating anchor links */
3973
3992
  name: string;
3974
3993
  /** Zod object schema with F0 field configurations */
3975
3994
  schema: TSchema;
3976
3995
  /** Section configurations keyed by section ID */
3977
3996
  sections?: Record<string, F0SectionConfig>;
3978
- /** Default values for the form fields (partial of the schema type) */
3997
+ /** Default values for the form fields */
3979
3998
  defaultValues?: Partial<z.infer<TSchema>>;
3980
3999
  /** Callback when the form is submitted with valid data */
3981
4000
  onSubmit: (data: z.infer<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
@@ -3999,14 +4018,6 @@ export declare interface F0FormProps<TSchema extends F0FormSchema> {
3999
4018
  /**
4000
4019
  * Ref to control the form programmatically from outside.
4001
4020
  * Use with the `useF0Form` hook to get a ref and submit/reset functions.
4002
- *
4003
- * @example
4004
- * ```tsx
4005
- * const { formRef, submit } = useF0Form()
4006
- *
4007
- * <F0Form formRef={formRef} ... />
4008
- * <Button onClick={submit}>Submit</Button>
4009
- * ```
4010
4021
  */
4011
4022
  formRef?: React.MutableRefObject<F0FormRef | null>;
4012
4023
  }
@@ -4265,6 +4276,42 @@ export declare const F0OneSwitch: ({ className, disabled }: F0OneSwitchProps) =>
4265
4276
  */
4266
4277
  export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root>;
4267
4278
 
4279
+ /**
4280
+ * A record mapping section IDs to their individual schemas.
4281
+ * When used, each section gets independent validation and its own submit button.
4282
+ */
4283
+ export declare type F0PerSectionSchema = Record<string, F0FormSchema>;
4284
+
4285
+ /**
4286
+ * Section configuration for per-section schema mode.
4287
+ * Extends F0SectionConfig with per-section submit and default values.
4288
+ */
4289
+ export declare interface F0PerSectionSectionConfig extends F0SectionConfig {
4290
+ /** Override submit config for this specific section */
4291
+ submitConfig?: F0PerSectionSubmitConfig;
4292
+ }
4293
+
4294
+ /**
4295
+ * Per-section submit configuration, extending the base submit config
4296
+ * with an optional per-section label override.
4297
+ */
4298
+ export declare interface F0PerSectionSubmitConfig {
4299
+ /** Custom label for the submit button (per section) */
4300
+ label?: string;
4301
+ /**
4302
+ * Custom icon for the submit button
4303
+ * - undefined: uses default Save icon
4304
+ * - null: no icon shown
4305
+ * - IconType: custom icon
4306
+ */
4307
+ icon?: IconType | null;
4308
+ /**
4309
+ * When true, the submit button is only visible once the section has unsaved changes.
4310
+ * @default false
4311
+ */
4312
+ showSubmitWhenDirty?: boolean;
4313
+ }
4314
+
4268
4315
  export declare const F0Provider: React.FC<{
4269
4316
  children: React.ReactNode;
4270
4317
  link?: LinkContextValue;
@@ -5260,6 +5307,14 @@ export declare type InferF0FormValues<T extends z.ZodObject<z.ZodRawShape>> = z.
5260
5307
  */
5261
5308
  export declare function inferFieldType(schema: ZodTypeAny, config: F0FieldConfig): F0FieldType;
5262
5309
 
5310
+ /**
5311
+ * Helper type to infer the combined values from a per-section schema record.
5312
+ * Merges all section schemas into a single type.
5313
+ */
5314
+ export declare type InferPerSectionValues<T extends F0PerSectionSchema> = {
5315
+ [K in keyof T]: z.infer<T[K]>;
5316
+ };
5317
+
5263
5318
  export declare type InFilterDefinition<T = string | number, R extends RecordType = RecordType> = BaseFilterDefinition<"in"> & {
5264
5319
  options: InFilterOptions_2<T, R>;
5265
5320
  };
@@ -6081,6 +6136,24 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
6081
6136
  [K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
6082
6137
  }[Extract<keyof T, string>];
6083
6138
 
6139
+ /**
6140
+ * Creates a union of `[sectionId, data]` pairs for each key in T.
6141
+ * Used to build a callback where TypeScript narrows `data` based on `sectionId`.
6142
+ *
6143
+ * @example
6144
+ * For T = { profile: ZodObject<{name: ZodString}>, settings: ZodObject<{theme: ZodEnum}> }
6145
+ * Produces: ["profile", { name: string }] | ["settings", { theme: "light" | "dark" }]
6146
+ */
6147
+ declare type PerSectionSubmitArgs<T extends F0PerSectionSchema> = {
6148
+ [K in keyof T & string]: [sectionId: K, data: z.infer<T[K]>];
6149
+ }[keyof T & string];
6150
+
6151
+ /**
6152
+ * Callback type for per-section submit. Uses a discriminated union of argument
6153
+ * tuples so that narrowing `sectionId` also narrows `data` to the correct type.
6154
+ */
6155
+ declare type PerSectionSubmitHandler<T extends F0PerSectionSchema> = (...args: PerSectionSubmitArgs<T>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
6156
+
6084
6157
  export declare type PersonAvatarVariant = Extract<AvatarVariant, {
6085
6158
  type: "person";
6086
6159
  }>;
@@ -7857,10 +7930,8 @@ declare module "@tiptap/core" {
7857
7930
 
7858
7931
  declare module "@tiptap/core" {
7859
7932
  interface Commands<ReturnType> {
7860
- videoEmbed: {
7861
- setVideoEmbed: (options: {
7862
- src: string;
7863
- }) => ReturnType;
7933
+ transcript: {
7934
+ insertTranscript: (data: TranscriptData) => ReturnType;
7864
7935
  };
7865
7936
  }
7866
7937
  }
@@ -7868,8 +7939,10 @@ declare module "@tiptap/core" {
7868
7939
 
7869
7940
  declare module "@tiptap/core" {
7870
7941
  interface Commands<ReturnType> {
7871
- transcript: {
7872
- insertTranscript: (data: TranscriptData) => ReturnType;
7942
+ videoEmbed: {
7943
+ setVideoEmbed: (options: {
7944
+ src: string;
7945
+ }) => ReturnType;
7873
7946
  };
7874
7947
  }
7875
7948
  }