@factorialco/f0-react 1.458.0 → 1.458.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-D8Nbyn2N.js → F0AiChat-bGx-xe3c.js} +643 -634
- package/dist/ai.d.ts +16 -16
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +16 -16
- package/dist/experimental.js +4 -4
- package/dist/f0.d.ts +180 -16
- package/dist/f0.js +1699 -1624
- package/dist/i18n-provider-defaults.d.ts +16 -16
- package/dist/{index-Dc8ulwvV.js → index-D_y183Vy.js} +1 -1
- package/dist/{types-CfpjN4dh.js → types-BgSqIwvg.js} +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -3209,21 +3209,16 @@ declare module "gridstack" {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
|
|
3211
3211
|
|
|
3212
|
-
declare
|
|
3213
|
-
|
|
3214
|
-
aiBlock: {
|
|
3215
|
-
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
3216
|
-
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
3217
|
-
};
|
|
3218
|
-
}
|
|
3212
|
+
declare namespace Calendar {
|
|
3213
|
+
var displayName: string;
|
|
3219
3214
|
}
|
|
3220
3215
|
|
|
3221
3216
|
|
|
3222
3217
|
declare module "@tiptap/core" {
|
|
3223
3218
|
interface Commands<ReturnType> {
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3219
|
+
aiBlock: {
|
|
3220
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
3221
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
3227
3222
|
};
|
|
3228
3223
|
}
|
|
3229
3224
|
}
|
|
@@ -3240,10 +3235,9 @@ declare module "@tiptap/core" {
|
|
|
3240
3235
|
|
|
3241
3236
|
declare module "@tiptap/core" {
|
|
3242
3237
|
interface Commands<ReturnType> {
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
}) => ReturnType;
|
|
3238
|
+
enhanceHighlight: {
|
|
3239
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
3240
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
3247
3241
|
};
|
|
3248
3242
|
}
|
|
3249
3243
|
}
|
|
@@ -3258,6 +3252,12 @@ declare module "@tiptap/core" {
|
|
|
3258
3252
|
}
|
|
3259
3253
|
|
|
3260
3254
|
|
|
3261
|
-
declare
|
|
3262
|
-
|
|
3255
|
+
declare module "@tiptap/core" {
|
|
3256
|
+
interface Commands<ReturnType> {
|
|
3257
|
+
videoEmbed: {
|
|
3258
|
+
setVideoEmbed: (options: {
|
|
3259
|
+
src: string;
|
|
3260
|
+
}) => ReturnType;
|
|
3261
|
+
};
|
|
3262
|
+
}
|
|
3263
3263
|
}
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { l as t, k as e, F as r, a as o, C as i, b as n, m as F, n as u, d as A, I as c, g as C, c as m, h, e as l, u as d, j as I, i as f, f as T } from "./F0AiChat-
|
|
1
|
+
import { l as t, k as e, F as r, a as o, C as i, b as n, m as F, n as u, d as A, I as c, g as C, c as m, h, e as l, u as d, j as I, i as f, f as T } from "./F0AiChat-bGx-xe3c.js";
|
|
2
2
|
import { defaultTranslations as S } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as v, e as x, F as P, c as V, d as k, b as O, a as b, f as y, o as M, u as j } from "./types-
|
|
3
|
+
import { A as v, e as x, F as P, c as V, d as k, b as O, a as b, f as y, o as M, u as j } from "./types-BgSqIwvg.js";
|
|
4
4
|
export {
|
|
5
5
|
v as AiChatTranslationsProvider,
|
|
6
6
|
t as ChatSpinner,
|
package/dist/experimental.d.ts
CHANGED
|
@@ -8015,21 +8015,16 @@ declare module "gridstack" {
|
|
|
8015
8015
|
}
|
|
8016
8016
|
|
|
8017
8017
|
|
|
8018
|
-
declare
|
|
8019
|
-
|
|
8020
|
-
aiBlock: {
|
|
8021
|
-
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
8022
|
-
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
8023
|
-
};
|
|
8024
|
-
}
|
|
8018
|
+
declare namespace Calendar {
|
|
8019
|
+
var displayName: string;
|
|
8025
8020
|
}
|
|
8026
8021
|
|
|
8027
8022
|
|
|
8028
8023
|
declare module "@tiptap/core" {
|
|
8029
8024
|
interface Commands<ReturnType> {
|
|
8030
|
-
|
|
8031
|
-
|
|
8032
|
-
|
|
8025
|
+
aiBlock: {
|
|
8026
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
8027
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
8033
8028
|
};
|
|
8034
8029
|
}
|
|
8035
8030
|
}
|
|
@@ -8046,10 +8041,9 @@ declare module "@tiptap/core" {
|
|
|
8046
8041
|
|
|
8047
8042
|
declare module "@tiptap/core" {
|
|
8048
8043
|
interface Commands<ReturnType> {
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
}) => ReturnType;
|
|
8044
|
+
enhanceHighlight: {
|
|
8045
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
8046
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
8053
8047
|
};
|
|
8054
8048
|
}
|
|
8055
8049
|
}
|
|
@@ -8064,6 +8058,12 @@ declare module "@tiptap/core" {
|
|
|
8064
8058
|
}
|
|
8065
8059
|
|
|
8066
8060
|
|
|
8067
|
-
declare
|
|
8068
|
-
|
|
8061
|
+
declare module "@tiptap/core" {
|
|
8062
|
+
interface Commands<ReturnType> {
|
|
8063
|
+
videoEmbed: {
|
|
8064
|
+
setVideoEmbed: (options: {
|
|
8065
|
+
src: string;
|
|
8066
|
+
}) => ReturnType;
|
|
8067
|
+
};
|
|
8068
|
+
}
|
|
8069
8069
|
}
|
package/dist/experimental.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a9 as oa, aa as ca, ab as da, ac as ua, ad as Ft, ae as Te, af as fa, ag as ht, ah as rt, ai as Be, O as b, W as Z, P as be, u as se, aj as ma, ak as ha, al as pa, am as ba, an as ga, a5 as oe, ao as xa, U as Ee, ap as va, aq as wa, ar as $, as as ya, at as Na, M as _e, au as ln, av as Ca, aw as ka, Q as B, ax as sn, a8 as E, ay as ge, az as Sa, aA as Ia, aB as Fa, aC as Aa, aD as La, aE as Ce, aF as on, aG as Ea, aH as xe, aI as $e, aJ as _a, aK as pt, n as cn, aL as Ne, aM as Oa, aN as dn, a6 as ne, aO as H, R as un, aP as fn, aQ as Ta, aR as mn, aS as me, a7 as ee, aT as Da, aU as za, aV as Pa, aW as Ra, X as pe, aX as Ge, aY as Ba, aZ as $a, a_ as Wa, a$ as Ma, b0 as He, b1 as hn, b2 as ja, b3 as Va, b4 as Ga, b5 as We, b6 as Ha, b7 as Ua, b8 as Ka, b9 as qa, ba as Ya, bb as Za, bc as Xa, bd as Ja, be as Qa, bf as er, bg as lt, bh as it, bi as pn, bj as tr, bk as nr, bl as bn, bm as ar, bn as rr, T as Ue, bo as bt, bp as gn, bq as lr, br as xn, bs as ir, bt as sr, bu as or, bv as Le, bw as cr, bx as De, by as At, bz as st, bA as dr, bB as ur, a as fr, c as mr, bC as hr, bD as vn, bE as pr, bF as br, F as gr, bG as wn, _ as xr, bH as yn, bI as vr, bJ as Lt, bK as wr, bL as yr, bM as Nr, bN as Cr, bO as Nn, bP as kr, bQ as Sr, bR as Ir, bS as Fr, bT as Ar, Y as Cn, bU as ue, bV as kn, bW as gt, bX as xt, bY as vt, bZ as Sn, b_ as wt, b$ as In, $ as Fn, c0 as Lr, c1 as Er, c2 as _r, c3 as Or, c4 as Tr, c5 as Dr, c6 as zr, c7 as Pr, c8 as Rr, c9 as Br, ca as $r, cb as Et, cc as _t, cd as Ot, ce as Wr, cf as Mr, cg as jr, ch as Vr, ci as An, cj as Gr, ck as Hr, cl as Ur } from "./F0AiChat-
|
|
2
|
-
import { cF as Ac, cE as Lc, co as Ec, cR as _c, cy as Oc, cz as Tc, cn as Dc, cB as zc, cp as Pc, d1 as Rc, c$ as Bc, cq as $c, cC as Wc, cD as Mc, cA as jc, cr as Vc, cN as Gc, cO as Hc, cS as Uc, cZ as Kc, c_ as qc, d0 as Yc, cx as Zc, cs as Xc, cH as Jc, cG as Qc, ct as ed, cu as td, cv as nd, cP as ad, d2 as rd, cm as ld, cQ as id, cU as sd, cV as od, cM as cd, cJ as dd, cL as ud, cI as fd, cw as md, cK as hd, cW as pd, cX as bd, cT as gd, cY as xd } from "./F0AiChat-
|
|
1
|
+
import { a9 as oa, aa as ca, ab as da, ac as ua, ad as Ft, ae as Te, af as fa, ag as ht, ah as rt, ai as Be, O as b, W as Z, P as be, u as se, aj as ma, ak as ha, al as pa, am as ba, an as ga, a5 as oe, ao as xa, U as Ee, ap as va, aq as wa, ar as $, as as ya, at as Na, M as _e, au as ln, av as Ca, aw as ka, Q as B, ax as sn, a8 as E, ay as ge, az as Sa, aA as Ia, aB as Fa, aC as Aa, aD as La, aE as Ce, aF as on, aG as Ea, aH as xe, aI as $e, aJ as _a, aK as pt, n as cn, aL as Ne, aM as Oa, aN as dn, a6 as ne, aO as H, R as un, aP as fn, aQ as Ta, aR as mn, aS as me, a7 as ee, aT as Da, aU as za, aV as Pa, aW as Ra, X as pe, aX as Ge, aY as Ba, aZ as $a, a_ as Wa, a$ as Ma, b0 as He, b1 as hn, b2 as ja, b3 as Va, b4 as Ga, b5 as We, b6 as Ha, b7 as Ua, b8 as Ka, b9 as qa, ba as Ya, bb as Za, bc as Xa, bd as Ja, be as Qa, bf as er, bg as lt, bh as it, bi as pn, bj as tr, bk as nr, bl as bn, bm as ar, bn as rr, T as Ue, bo as bt, bp as gn, bq as lr, br as xn, bs as ir, bt as sr, bu as or, bv as Le, bw as cr, bx as De, by as At, bz as st, bA as dr, bB as ur, a as fr, c as mr, bC as hr, bD as vn, bE as pr, bF as br, F as gr, bG as wn, _ as xr, bH as yn, bI as vr, bJ as Lt, bK as wr, bL as yr, bM as Nr, bN as Cr, bO as Nn, bP as kr, bQ as Sr, bR as Ir, bS as Fr, bT as Ar, Y as Cn, bU as ue, bV as kn, bW as gt, bX as xt, bY as vt, bZ as Sn, b_ as wt, b$ as In, $ as Fn, c0 as Lr, c1 as Er, c2 as _r, c3 as Or, c4 as Tr, c5 as Dr, c6 as zr, c7 as Pr, c8 as Rr, c9 as Br, ca as $r, cb as Et, cc as _t, cd as Ot, ce as Wr, cf as Mr, cg as jr, ch as Vr, ci as An, cj as Gr, ck as Hr, cl as Ur } from "./F0AiChat-bGx-xe3c.js";
|
|
2
|
+
import { cF as Ac, cE as Lc, co as Ec, cR as _c, cy as Oc, cz as Tc, cn as Dc, cB as zc, cp as Pc, d1 as Rc, c$ as Bc, cq as $c, cC as Wc, cD as Mc, cA as jc, cr as Vc, cN as Gc, cO as Hc, cS as Uc, cZ as Kc, c_ as qc, d0 as Yc, cx as Zc, cs as Xc, cH as Jc, cG as Qc, ct as ed, cu as td, cv as nd, cP as ad, d2 as rd, cm as ld, cQ as id, cU as sd, cV as od, cM as cd, cJ as dd, cL as ud, cI as fd, cw as md, cK as hd, cW as pd, cX as bd, cT as gd, cY as xd } from "./F0AiChat-bGx-xe3c.js";
|
|
3
3
|
import { jsx as e, jsxs as o, Fragment as U } from "react/jsx-runtime";
|
|
4
4
|
import re, { forwardRef as j, useRef as V, useTransition as Kr, useState as _, useLayoutEffect as Ln, useContext as Ke, createContext as yt, useCallback as Q, useMemo as K, useEffect as W, useId as qr, Fragment as Yr, isValidElement as Zr, cloneElement as En, Children as _n } from "react";
|
|
5
|
-
import { C as Xr, P as Jr, g as On, c as Qr, F as ot, f as el, a as tl, A as nl, B as al, L as rl, b as ll, V as il, d as sl, e as Tt, h as ol, i as cl } from "./index-
|
|
6
|
-
import { l as wd, m as yd, j as Nd, n as Cd, s as kd, D as Sd, k as Id, o as Fd, w as Ad, x as Ld, N as Ed, y as _d, p as Od, r as Td, R as Dd, u as zd, q as Pd, _ as Rd, v as Bd, t as $d } from "./index-
|
|
5
|
+
import { C as Xr, P as Jr, g as On, c as Qr, F as ot, f as el, a as tl, A as nl, B as al, L as rl, b as ll, V as il, d as sl, e as Tt, h as ol, i as cl } from "./index-D_y183Vy.js";
|
|
6
|
+
import { l as wd, m as yd, j as Nd, n as Cd, s as kd, D as Sd, k as Id, o as Fd, w as Ad, x as Ld, N as Ed, y as _d, p as Od, r as Td, R as Dd, u as zd, q as Pd, _ as Rd, v as Bd, t as $d } from "./index-D_y183Vy.js";
|
|
7
7
|
const dl = oa("Search", [
|
|
8
8
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
9
9
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
package/dist/f0.d.ts
CHANGED
|
@@ -161,6 +161,7 @@ import { WithDataTestIdReturnType as WithDataTestIdReturnType_7 } from './f0';
|
|
|
161
161
|
import { WithDataTestIdReturnType as WithDataTestIdReturnType_8 } from './f0';
|
|
162
162
|
import { z } from 'zod';
|
|
163
163
|
import { ZodEffects } from 'zod';
|
|
164
|
+
import { ZodErrorMap } from 'zod';
|
|
164
165
|
import { ZodRawShape } from 'zod';
|
|
165
166
|
import { ZodType } from 'zod';
|
|
166
167
|
import { ZodTypeAny } from 'zod';
|
|
@@ -2825,6 +2826,98 @@ export declare function createAtlaskitDriver(instanceId: symbol): DndDriver;
|
|
|
2825
2826
|
*/
|
|
2826
2827
|
export declare const createDataSourceDefinition: <R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(definition: DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>) => DataSourceDefinition<R, FiltersSchema, Sortings, Grouping>;
|
|
2827
2828
|
|
|
2829
|
+
/**
|
|
2830
|
+
* Creates a headless form tester from a form definition object returned by
|
|
2831
|
+
* `useF0FormDefinition`. Extracts the `schema` and `defaultValues` from the
|
|
2832
|
+
* definition and delegates to `createF0FormTester`.
|
|
2833
|
+
*
|
|
2834
|
+
* This is the recommended way to unit-test the validation logic of a form
|
|
2835
|
+
* definition hook without mounting any React components.
|
|
2836
|
+
*
|
|
2837
|
+
* @example
|
|
2838
|
+
* ```ts
|
|
2839
|
+
* // useEmployeeForm.ts
|
|
2840
|
+
* export function useEmployeeForm(employee: Employee) {
|
|
2841
|
+
* return useF0FormDefinition({
|
|
2842
|
+
* name: "employee-form",
|
|
2843
|
+
* schema: employeeSchema,
|
|
2844
|
+
* defaultValues: { name: employee.name, email: employee.email },
|
|
2845
|
+
* onSubmit: async ({ data }) => updateEmployee(data),
|
|
2846
|
+
* })
|
|
2847
|
+
* }
|
|
2848
|
+
*
|
|
2849
|
+
* // useEmployeeForm.test.ts
|
|
2850
|
+
* it("requires name and email", async () => {
|
|
2851
|
+
* const { result } = zeroRenderHook(() =>
|
|
2852
|
+
* useEmployeeForm({ name: "", email: "" })
|
|
2853
|
+
* )
|
|
2854
|
+
* const tester = createF0FormDefinitionTester(result.current)
|
|
2855
|
+
*
|
|
2856
|
+
* const { errors } = await tester.validate()
|
|
2857
|
+
* expect(errors).toHaveProperty("name")
|
|
2858
|
+
* expect(errors).toHaveProperty("email")
|
|
2859
|
+
* })
|
|
2860
|
+
*
|
|
2861
|
+
* it("is valid when required fields are filled", async () => {
|
|
2862
|
+
* const { result } = zeroRenderHook(() =>
|
|
2863
|
+
* useEmployeeForm({ name: "", email: "" })
|
|
2864
|
+
* )
|
|
2865
|
+
* const tester = createF0FormDefinitionTester(result.current)
|
|
2866
|
+
*
|
|
2867
|
+
* const { valid } = await tester.validate({ name: "Alice", email: "alice@example.com" })
|
|
2868
|
+
* expect(valid).toBe(true)
|
|
2869
|
+
* })
|
|
2870
|
+
* ```
|
|
2871
|
+
*
|
|
2872
|
+
* @remarks
|
|
2873
|
+
* This utility only supports **single-schema** form definitions
|
|
2874
|
+
* (`F0FormDefinitionSingleSchema`). If your form uses per-section definitions
|
|
2875
|
+
* (the array variant returned by {@link useF0FormDefinition}), you must create
|
|
2876
|
+
* a {@link createF0FormTester} for each section's schema directly.
|
|
2877
|
+
*/
|
|
2878
|
+
export declare function createF0FormDefinitionTester<TSchema extends F0FormSchema>(definition: F0FormDefinitionSingleSchema<TSchema>, options?: Pick<CreateF0FormTesterOptions<TSchema>, "errorMap">): F0FormTester<TSchema>;
|
|
2879
|
+
|
|
2880
|
+
/**
|
|
2881
|
+
* Create a headless form tester that validates a schema using the same
|
|
2882
|
+
* conditional resolver logic that real F0Form uses internally.
|
|
2883
|
+
*
|
|
2884
|
+
* No React, no DOM, no providers required.
|
|
2885
|
+
*
|
|
2886
|
+
* @example
|
|
2887
|
+
* ```ts
|
|
2888
|
+
* const schema = z.object({
|
|
2889
|
+
* name: f0FormField(z.string().min(1), { label: "Name" }),
|
|
2890
|
+
* email: f0FormField(z.string().email(), { label: "Email" }),
|
|
2891
|
+
* })
|
|
2892
|
+
*
|
|
2893
|
+
* const tester = createF0FormTester({ schema })
|
|
2894
|
+
*
|
|
2895
|
+
* const { errors } = await tester.validate()
|
|
2896
|
+
* expect(errors).toHaveProperty("name")
|
|
2897
|
+
* expect(errors).toHaveProperty("email")
|
|
2898
|
+
*
|
|
2899
|
+
* const { valid } = await tester.validate({ name: "Alice", email: "alice@example.com" })
|
|
2900
|
+
* expect(valid).toBe(true)
|
|
2901
|
+
* ```
|
|
2902
|
+
*/
|
|
2903
|
+
export declare function createF0FormTester<TSchema extends F0FormSchema>(options: CreateF0FormTesterOptions<TSchema>): F0FormTester<TSchema>;
|
|
2904
|
+
|
|
2905
|
+
export declare interface CreateF0FormTesterOptions<TSchema extends F0FormSchema> {
|
|
2906
|
+
schema: TSchema;
|
|
2907
|
+
defaultValues?: Partial<z.infer<TSchema>>;
|
|
2908
|
+
/**
|
|
2909
|
+
* Optional submit handler. When provided, `tester.submit(values)` will run
|
|
2910
|
+
* schema validation first and then call this handler if validation passes.
|
|
2911
|
+
* Mirrors the signature used inside F0Form — the tester supplies `data`.
|
|
2912
|
+
*/
|
|
2913
|
+
onSubmit?: (data: z.infer<TSchema>) => Promise<F0FormSubmitResult> | F0FormSubmitResult;
|
|
2914
|
+
/**
|
|
2915
|
+
* Optional Zod errorMap. Defaults to Zod's built-in English messages.
|
|
2916
|
+
* Pass a custom errorMap to get localised messages in assertions.
|
|
2917
|
+
*/
|
|
2918
|
+
errorMap?: ZodErrorMap;
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2828
2921
|
export declare const createPageLayoutBlock: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutBlockComponent;
|
|
2829
2922
|
|
|
2830
2923
|
export declare const createPageLayoutBlockGroup: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutGroupComponent;
|
|
@@ -7239,6 +7332,77 @@ export declare type F0FormSubmitResult = {
|
|
|
7239
7332
|
errors?: Record<string, string>;
|
|
7240
7333
|
};
|
|
7241
7334
|
|
|
7335
|
+
export declare interface F0FormTester<TSchema extends F0FormSchema> {
|
|
7336
|
+
/**
|
|
7337
|
+
* Run validation against the schema.
|
|
7338
|
+
*
|
|
7339
|
+
* Provided `values` are merged on top of the tester's `defaultValues` so
|
|
7340
|
+
* you can test incremental fills:
|
|
7341
|
+
*
|
|
7342
|
+
* ```ts
|
|
7343
|
+
* const { errors } = await tester.validate() // all required errors
|
|
7344
|
+
* const { errors } = await tester.validate({ name: "Alice" }) // remaining errors
|
|
7345
|
+
* const { valid } = await tester.validate({ name: "Alice", email: "a@b.com" }) // valid
|
|
7346
|
+
* ```
|
|
7347
|
+
*
|
|
7348
|
+
* Fields with `renderIf` conditions that evaluate to `false` for the given
|
|
7349
|
+
* values are skipped — matching real F0Form behaviour.
|
|
7350
|
+
*/
|
|
7351
|
+
validate(values?: Record<string, unknown>): Promise<F0FormValidationResult>;
|
|
7352
|
+
/**
|
|
7353
|
+
* Validate a single field in isolation.
|
|
7354
|
+
* Returns `{ valid, errors }` where `errors` contains at most one entry.
|
|
7355
|
+
*/
|
|
7356
|
+
validateField(fieldName: string, values?: Record<string, unknown>): Promise<F0FormValidationResult>;
|
|
7357
|
+
/**
|
|
7358
|
+
* Return field descriptions for all fields in the schema.
|
|
7359
|
+
* Delegates to `describeFormSchema()` — useful for asserting field metadata.
|
|
7360
|
+
*/
|
|
7361
|
+
describeFields(): FormFieldDescription[];
|
|
7362
|
+
/**
|
|
7363
|
+
* Return the default values this tester was created with, if any.
|
|
7364
|
+
*/
|
|
7365
|
+
getDefaultValues(): Partial<z.infer<TSchema>> | undefined;
|
|
7366
|
+
/**
|
|
7367
|
+
* Return the names of fields that are currently visible (renderIf === true)
|
|
7368
|
+
* for the given values, merged with the tester's defaultValues.
|
|
7369
|
+
*/
|
|
7370
|
+
getVisibleFields(values?: Record<string, unknown>): string[];
|
|
7371
|
+
/**
|
|
7372
|
+
* Run schema validation and, if it passes, call the `onSubmit` handler
|
|
7373
|
+
* provided in the options. Useful for testing server-side errors that an
|
|
7374
|
+
* `onSubmit` returns (e.g. duplicate email, insufficient permissions).
|
|
7375
|
+
*
|
|
7376
|
+
* If schema validation fails the handler is never called and the result
|
|
7377
|
+
* is `{ success: false, errors: <validation errors> }`.
|
|
7378
|
+
*
|
|
7379
|
+
* Requires `onSubmit` to be set in `createF0FormTesterOptions`.
|
|
7380
|
+
*
|
|
7381
|
+
* @example
|
|
7382
|
+
* ```ts
|
|
7383
|
+
* const tester = createF0FormDefinitionTester(result.current)
|
|
7384
|
+
*
|
|
7385
|
+
* const result = await tester.submit({ name: "Alice", email: "taken@example.com" })
|
|
7386
|
+
* expect(result.success).toBe(false)
|
|
7387
|
+
* expect((result as { errors: Record<string,string> }).errors.email)
|
|
7388
|
+
* .toBe("Email already registered")
|
|
7389
|
+
* ```
|
|
7390
|
+
*/
|
|
7391
|
+
submit(values?: Record<string, unknown>): Promise<F0FormSubmitResult>;
|
|
7392
|
+
}
|
|
7393
|
+
|
|
7394
|
+
export declare interface F0FormValidationResult {
|
|
7395
|
+
/** Whether all visible fields pass validation */
|
|
7396
|
+
valid: boolean;
|
|
7397
|
+
/** Flat map of field name → error message for every failing field */
|
|
7398
|
+
errors: Record<string, string>;
|
|
7399
|
+
/**
|
|
7400
|
+
* Root-level Zod error message (if any). Corresponds to issues with
|
|
7401
|
+
* `path.length === 0` — e.g. from `.refine()` calls at the object level.
|
|
7402
|
+
*/
|
|
7403
|
+
rootError?: string;
|
|
7404
|
+
}
|
|
7405
|
+
|
|
7242
7406
|
export declare const F0GridStack: WithDataTestIdReturnType_7< {
|
|
7243
7407
|
({ options, widgets, onChange, className, static: isStatic, forcePositionSync, }: F0GridStackProps_2): JSX_2.Element;
|
|
7244
7408
|
displayName: string;
|
|
@@ -13096,21 +13260,16 @@ declare module "gridstack" {
|
|
|
13096
13260
|
}
|
|
13097
13261
|
|
|
13098
13262
|
|
|
13099
|
-
declare
|
|
13100
|
-
|
|
13101
|
-
aiBlock: {
|
|
13102
|
-
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
13103
|
-
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
13104
|
-
};
|
|
13105
|
-
}
|
|
13263
|
+
declare namespace Calendar {
|
|
13264
|
+
var displayName: string;
|
|
13106
13265
|
}
|
|
13107
13266
|
|
|
13108
13267
|
|
|
13109
13268
|
declare module "@tiptap/core" {
|
|
13110
13269
|
interface Commands<ReturnType> {
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13270
|
+
aiBlock: {
|
|
13271
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
13272
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
13114
13273
|
};
|
|
13115
13274
|
}
|
|
13116
13275
|
}
|
|
@@ -13127,10 +13286,9 @@ declare module "@tiptap/core" {
|
|
|
13127
13286
|
|
|
13128
13287
|
declare module "@tiptap/core" {
|
|
13129
13288
|
interface Commands<ReturnType> {
|
|
13130
|
-
|
|
13131
|
-
|
|
13132
|
-
|
|
13133
|
-
}) => ReturnType;
|
|
13289
|
+
enhanceHighlight: {
|
|
13290
|
+
setEnhanceHighlight: (from: number, to: number) => ReturnType;
|
|
13291
|
+
clearEnhanceHighlight: () => ReturnType;
|
|
13134
13292
|
};
|
|
13135
13293
|
}
|
|
13136
13294
|
}
|
|
@@ -13145,6 +13303,12 @@ declare module "@tiptap/core" {
|
|
|
13145
13303
|
}
|
|
13146
13304
|
|
|
13147
13305
|
|
|
13148
|
-
declare
|
|
13149
|
-
|
|
13306
|
+
declare module "@tiptap/core" {
|
|
13307
|
+
interface Commands<ReturnType> {
|
|
13308
|
+
videoEmbed: {
|
|
13309
|
+
setVideoEmbed: (options: {
|
|
13310
|
+
src: string;
|
|
13311
|
+
}) => ReturnType;
|
|
13312
|
+
};
|
|
13313
|
+
}
|
|
13150
13314
|
}
|