@factorialco/f0-react 4.0.4 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-BEfffklz.js";
1
+ import { C as e, D as r, c as t, F as o, a as i, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-BIGiuzKy.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-XWv7ITeI.js";
3
+ import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-B7HN_-nJ.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -2975,6 +2975,8 @@ declare interface DatePickerPopupProps {
2975
2975
  asChild?: boolean;
2976
2976
  onCompareToChange?: (compareTo: DateRangeComplete | DateRangeComplete[] | undefined) => void;
2977
2977
  weekStartsOn?: WeekStartsOn;
2978
+ /** When true, switching granularity only changes the view; selection and close happen only on a cell click. Default false. */
2979
+ selectOnCellOnly?: boolean;
2978
2980
  }
2979
2981
 
2980
2982
  export declare type DatePickerValue = {
@@ -6916,7 +6918,7 @@ export declare const OneCalendar: WithDataTestIdReturnType_2< {
6916
6918
  displayName: string;
6917
6919
  }>;
6918
6920
 
6919
- export declare const OneCalendarInternal: ({ mode, view, onSelect, defaultMonth, defaultSelected, showNavigation, showInput, minDate, maxDate, compact, weekStartsOn, }: OneCalendarInternalProps) => JSX_2.Element;
6921
+ export declare const OneCalendarInternal: ({ mode, view, onSelect, defaultMonth, defaultSelected, showNavigation, showInput, minDate, maxDate, compact, weekStartsOn, selectOnCellOnly, }: OneCalendarInternalProps) => JSX_2.Element;
6920
6922
 
6921
6923
  export declare interface OneCalendarInternalProps {
6922
6924
  mode: CalendarMode;
@@ -6930,6 +6932,8 @@ export declare interface OneCalendarInternalProps {
6930
6932
  maxDate?: Date;
6931
6933
  compact?: boolean;
6932
6934
  weekStartsOn?: WeekStartsOn;
6935
+ /** When true, a granularity change updates the view without emitting `onSelect`. Default false. */
6936
+ selectOnCellOnly?: boolean;
6933
6937
  }
6934
6938
 
6935
6939
  export declare type OneCalendarProps = Omit<OneCalendarInternalProps, (typeof privateProps_6)[number]>;
@@ -1,9 +1,9 @@
1
- import { h as ga, B as pa, i as ba, j as xa, k as Dt, l as Be, m as Te, n as va, o as b, p as J, q as ye, u as oe, T as ya, r as wa, s as Na, R as Ca, t as Ia, v as ce, w as ka, x as Nt, y as ut, z as Ve, A as Le, E as Sa, G as Fa, H as U, J as Aa, K as La, L as xe, M as mn, N as Oa, O as Pa, Q as H, S as hn, U as z, V as ke, W as Ea, X as _a, Y as Da, Z as Ta, _ as za, $ as Oe, a0 as gn, a1 as Ra, a2 as we, a3 as Ue, a4 as Ba, e as pn, a5 as Ae, a6 as $a, a7 as bn, a8 as ie, a9 as X, aa as xn, ab as vn, ac as Ma, ad as yn, ae as pe, af as ae, ag as Wa, ah as ja, ai as Va, aj as Ua, ak as ve, al as Ye, am as Ha, an as Ga, ao as Ka, ap as qa, aq as Je, ar as wn, as as Ya, at as Ja, au as Za, av as He, aw as Xa, ax as Nn, ay as Qa, az as er, aA as tr, aB as nr, aC as ar, aD as rr, aE as ir, aF as lr, aG as ft, aH as Cn, aI as mt, aJ as In, aK as sr, aL as or, aM as cr, aN as dr, aO as ur, aP as Ze, aQ as Xe, aR as ht, aS as kn, aT as fr, aU as Ct, aV as mr, aW as hr, aX as gr, aY as Re, aZ as pr, a_ as br, a$ as $e, b0 as Tt, b1 as gt, b2 as xr, b3 as vr, a as yr, b as wr, b4 as Sn, b5 as Nr, g as Cr, F as Ir, b6 as kr, b7 as Fn, b8 as Sr, b9 as An, ba as Ln, bb as Fr, bc as Ar, bd as Lr, be as Or, bf as Pr, bg as Er, bh as _r, bi as Dr, bj as Tr, bk as On, bl as zr, bm as Rr, bn as Br, bo as $r, bp as ge, bq as It, br as kt, bs as St, bt as Pn, bu as Ft, bv as En, bw as _n, bx as Mr, by as Wr, bz as jr, bA as Vr, bB as Ur, bC as Hr, bD as Gr, bE as Kr, bF as zt, bG as qr, bH as Yr, bI as Rt, bJ as Bt, bK as $t, bL as Jr, bM as Zr, bN as Xr, bO as Qr, bP as Dn, bQ as ei, bR as ti } from "./F0CanvasPanel-BEfffklz.js";
2
- import { c2 as Kc, c1 as qc, ce as Yc, b_ as Jc, b$ as Zc, bS as Xc, bT as Qc, ch as ed, bU as td, bV as nd, ci as ad, c0 as rd, ca as id, cb as ld, cf as sd, bW as od, c4 as cd, c3 as dd, bX as ud, bY as fd, cc as md, cj as hd, cd as gd, cg as pd, c9 as bd, c6 as xd, c8 as vd, c5 as yd, bZ as wd, c7 as Nd } from "./F0CanvasPanel-BEfffklz.js";
1
+ import { h as ga, B as pa, i as ba, j as xa, k as Dt, l as Be, m as Te, n as va, o as b, p as J, q as ye, u as oe, T as ya, r as wa, s as Na, R as Ca, t as Ia, v as ce, w as ka, x as Nt, y as ut, z as Ve, A as Le, E as Sa, G as Fa, H as U, J as Aa, K as La, L as xe, M as mn, N as Oa, O as Pa, Q as H, S as hn, U as z, V as ke, W as Ea, X as _a, Y as Da, Z as Ta, _ as za, $ as Oe, a0 as gn, a1 as Ra, a2 as we, a3 as Ue, a4 as Ba, e as pn, a5 as Ae, a6 as $a, a7 as bn, a8 as ie, a9 as X, aa as xn, ab as vn, ac as Ma, ad as yn, ae as pe, af as ae, ag as Wa, ah as ja, ai as Va, aj as Ua, ak as ve, al as Ye, am as Ha, an as Ga, ao as Ka, ap as qa, aq as Je, ar as wn, as as Ya, at as Ja, au as Za, av as He, aw as Xa, ax as Nn, ay as Qa, az as er, aA as tr, aB as nr, aC as ar, aD as rr, aE as ir, aF as lr, aG as ft, aH as Cn, aI as mt, aJ as In, aK as sr, aL as or, aM as cr, aN as dr, aO as ur, aP as Ze, aQ as Xe, aR as ht, aS as kn, aT as fr, aU as Ct, aV as mr, aW as hr, aX as gr, aY as Re, aZ as pr, a_ as br, a$ as $e, b0 as Tt, b1 as gt, b2 as xr, b3 as vr, a as yr, b as wr, b4 as Sn, b5 as Nr, g as Cr, F as Ir, b6 as kr, b7 as Fn, b8 as Sr, b9 as An, ba as Ln, bb as Fr, bc as Ar, bd as Lr, be as Or, bf as Pr, bg as Er, bh as _r, bi as Dr, bj as Tr, bk as On, bl as zr, bm as Rr, bn as Br, bo as $r, bp as ge, bq as It, br as kt, bs as St, bt as Pn, bu as Ft, bv as En, bw as _n, bx as Mr, by as Wr, bz as jr, bA as Vr, bB as Ur, bC as Hr, bD as Gr, bE as Kr, bF as zt, bG as qr, bH as Yr, bI as Rt, bJ as Bt, bK as $t, bL as Jr, bM as Zr, bN as Xr, bO as Qr, bP as Dn, bQ as ei, bR as ti } from "./F0CanvasPanel-BIGiuzKy.js";
2
+ import { c2 as Kc, c1 as qc, ce as Yc, b_ as Jc, b$ as Zc, bS as Xc, bT as Qc, ch as ed, bU as td, bV as nd, ci as ad, c0 as rd, ca as id, cb as ld, cf as sd, bW as od, c4 as cd, c3 as dd, bX as ud, bY as fd, cc as md, cj as hd, cd as gd, cg as pd, c9 as bd, c6 as xd, c8 as vd, c5 as yd, bZ as wd, c7 as Nd } from "./F0CanvasPanel-BIGiuzKy.js";
3
3
  import { jsx as e, jsxs as o, Fragment as Z } from "react/jsx-runtime";
4
4
  import ue, { forwardRef as G, useRef as j, useTransition as ni, useState as D, useLayoutEffect as Tn, useId as pt, useContext as Pe, createContext as Qe, useEffect as W, useCallback as ne, useMemo as q, Fragment as ai, isValidElement as ri, cloneElement as zn, Children as Rn } from "react";
5
- import { C as ii, P as li, a as Bn, M as si, p as oi, b as ci, R as Mt, c as $n, u as di, d as ui, e as fi, f as mi, g as hi, h as Mn, S as gi, A as pi, B as bi, L as xi, i as vi, V as yi, j as wi, k as Ni, l as Ci, O as Ii } from "./useDataCollectionSource-BIPtqfqk.js";
6
- import { r as Id, s as kd, o as Sd, H as Fd, t as Ad, z as Ld, a8 as Od, G as Pd, q as Ed, aa as _d, a9 as Dd, Q as Td, ad as zd, F as Rd, Y as Bd, U as $d, J as Md, af as Wd, K as jd, Z as Vd, _ as Ud, v as Hd, ab as Gd, ac as Kd, N as qd, $ as Yd, a5 as Jd, a7 as Zd, w as Xd, y as Qd, D as eu, W as tu, ae as nu, X as au, T as ru, ag as iu, x as lu, E as su, m as ou, n as cu, a1 as du, a2 as uu, a6 as fu, I as mu, a3 as hu, a0 as gu, a4 as pu } from "./useDataCollectionSource-BIPtqfqk.js";
5
+ import { C as ii, P as li, a as Bn, M as si, p as oi, b as ci, R as Mt, c as $n, u as di, d as ui, e as fi, f as mi, g as hi, h as Mn, S as gi, A as pi, B as bi, L as xi, i as vi, V as yi, j as wi, k as Ni, l as Ci, O as Ii } from "./useDataCollectionSource-DD8fxq_z.js";
6
+ import { r as Id, s as kd, o as Sd, H as Fd, t as Ad, z as Ld, a8 as Od, G as Pd, q as Ed, aa as _d, a9 as Dd, Q as Td, ad as zd, F as Rd, Y as Bd, U as $d, J as Md, af as Wd, K as jd, Z as Vd, _ as Ud, v as Hd, ab as Gd, ac as Kd, N as qd, $ as Yd, a5 as Jd, a7 as Zd, w as Xd, y as Qd, D as eu, W as tu, ae as nu, X as au, T as ru, ag as iu, x as lu, E as su, m as ou, n as cu, a1 as du, a2 as uu, a6 as fu, I as mu, a3 as hu, a0 as gu, a4 as pu } from "./useDataCollectionSource-DD8fxq_z.js";
7
7
  const ki = ga("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
@@ -4115,6 +4115,8 @@ declare interface DatePickerPopupProps {
4115
4115
  asChild?: boolean;
4116
4116
  onCompareToChange?: (compareTo: DateRangeComplete | DateRangeComplete[] | undefined) => void;
4117
4117
  weekStartsOn?: WeekStartsOn;
4118
+ /** When true, switching granularity only changes the view; selection and close happen only on a cell click. Default false. */
4119
+ selectOnCellOnly?: boolean;
4118
4120
  }
4119
4121
 
4120
4122
  export declare const datepickerSizes: readonly ["sm", "md"];
@@ -8045,9 +8047,9 @@ declare type F0DateOrDateTimeFieldConfig = F0DateFieldConfig | F0TimeFieldConfig
8045
8047
 
8046
8048
  export declare const F0DatePicker: WithDataTestIdReturnType_3<typeof F0DatePicker_2>;
8047
8049
 
8048
- declare function F0DatePicker_2({ onChange, value, presets, granularities, minDate, maxDate, open, showIcon, displayFormat, ...inputProps }: F0DatePickerProps): JSX_2.Element;
8050
+ declare function F0DatePicker_2({ onChange, value, presets, granularities, minDate, maxDate, open, showIcon, displayFormat, selectOnCellOnly, ...inputProps }: F0DatePickerProps): JSX_2.Element;
8049
8051
 
8050
- export declare type F0DatePickerProps = Pick<DatePickerPopupProps, "granularities" | "minDate" | "maxDate" | "presets" | "open" | "onOpenChange"> & {
8052
+ export declare type F0DatePickerProps = Pick<DatePickerPopupProps, "granularities" | "minDate" | "maxDate" | "presets" | "open" | "onOpenChange" | "selectOnCellOnly"> & {
8051
8053
  showIcon?: boolean;
8052
8054
  /** Controls how the selected date is displayed in the input. Defaults to "long" (e.g. "01 Aug 2025"). Use "default" for dd/MM/yyyy. */
8053
8055
  displayFormat?: DateStringFormat;
@@ -8359,7 +8361,7 @@ export declare interface F0FAQItem {
8359
8361
  /**
8360
8362
  * Union of all F0 field types used for rendering
8361
8363
  */
8362
- export declare type F0Field = F0TextField | F0NumberField | F0DurationField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0RichTextField | F0FileField | F0CardSelectField | F0CustomField;
8364
+ export declare type F0Field = F0TextField | F0NumberField | F0DurationField | F0TextareaField | F0SelectField | F0CheckboxField | F0SwitchField | F0DateField | F0TimeField | F0DateTimeField | F0DateRangeField | F0PeriodField | F0RichTextField | F0FileField | F0CardSelectField | F0CustomField;
8363
8365
 
8364
8366
  /**
8365
8367
  * Alert configuration for a field.
@@ -8394,12 +8396,12 @@ export declare type F0FieldAlertProps = Omit<F0AlertProps, "variant"> & {
8394
8396
  * @typeParam T - The value type for select fields (string or number)
8395
8397
  * @typeParam R - Record type for data source (when using source instead of options)
8396
8398
  */
8397
- export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0FileFieldConfig | F0ObjectConfig | F0StringCardSelectConfig;
8399
+ export declare type F0FieldConfig<T extends string | number = string | number, R extends Record<string, unknown> = Record<string, unknown>> = F0StringConfig<string, undefined, R> | F0NumberFieldConfig<R> | F0BooleanConfig | F0DateFieldConfig | F0TimeFieldConfig | F0DateTimeFieldConfig | F0ArrayConfig<T, R> | F0FileFieldConfig | F0ObjectConfig | F0PeriodFieldConfig | F0StringCardSelectConfig;
8398
8400
 
8399
8401
  /**
8400
8402
  * Field types for rendering
8401
8403
  */
8402
- export declare type F0FieldType = "text" | "number" | "percentage" | "money" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "file" | "cardSelect" | "custom";
8404
+ export declare type F0FieldType = "text" | "number" | "percentage" | "money" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "custom";
8403
8405
 
8404
8406
  export declare type F0FileAction = {
8405
8407
  icon?: IconType;
@@ -8746,6 +8748,12 @@ export declare function f0FormField<T extends z.ZodArray<ZodTypeAny>, V extends
8746
8748
  */
8747
8749
  export declare function f0FormField<T extends z.ZodObject<z.ZodRawShape>, TConfig = undefined>(schema: T, config: F0ObjectConfig<z.infer<T>, TConfig>): T & F0ZodType<T>;
8748
8750
 
8751
+ /**
8752
+ * Period field - date navigator that preserves the full DatePickerValue.
8753
+ * Use with `z.custom<DatePickerValue>()` (or its optional/nullable wrappers).
8754
+ */
8755
+ export declare function f0FormField<T extends ZodTypeAny>(schema: T, config: F0PeriodFieldConfig): T & F0ZodType<T>;
8756
+
8749
8757
  /**
8750
8758
  * Optional wrapper - inherits inner type's config
8751
8759
  * @typeParam V - The value type for select fields (string or number)
@@ -8916,6 +8924,14 @@ export declare namespace f0FormField {
8916
8924
  export function dateRange(config: DateRangeConfig & {
8917
8925
  optional?: false | undefined;
8918
8926
  }): DateRangeObjectSchema & F0ZodType<DateRangeObjectSchema>;
8927
+ /* Excluded from this release type: PeriodValueSchema */
8928
+ /* Excluded from this release type: DatePeriodConfig */
8929
+ export function datePeriod(config: DatePeriodConfig & {
8930
+ optional: true;
8931
+ }): z.ZodOptional<z.ZodNullable<PeriodValueSchema>> & F0ZodType<z.ZodOptional<z.ZodNullable<PeriodValueSchema>>>;
8932
+ export function datePeriod(config: DatePeriodConfig & {
8933
+ optional?: false | undefined;
8934
+ }): PeriodValueSchema & F0ZodType<PeriodValueSchema>;
8919
8935
  /* Excluded from this release type: RichTextObjectSchema */
8920
8936
  /* Excluded from this release type: RichTextConfig */
8921
8937
  export function richText(config: RichTextConfig & {
@@ -9763,6 +9779,70 @@ export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof Swi
9763
9779
  autoOpen?: boolean;
9764
9780
  };
9765
9781
 
9782
+ /**
9783
+ * F0 config options specific to period fields.
9784
+ *
9785
+ * A period field reuses `F0DatePicker` exactly like the `date` field, but keeps
9786
+ * the full `DatePickerValue` (`{ value: { from, to }, granularity }`) as the
9787
+ * form value instead of collapsing it to a single `Date`. This lets a form
9788
+ * declare a real "period" selector (Year / Half year / Quarter / Month / Range).
9789
+ *
9790
+ * Note: `clearable` is derived from the Zod schema (optional/nullable).
9791
+ */
9792
+ export declare interface F0PeriodConfig {
9793
+ /** Available granularities for the period picker */
9794
+ granularities?: DateGranularity[];
9795
+ /** Preset period options to display */
9796
+ presets?: DatePreset[];
9797
+ /**
9798
+ * Controls how the selected period is displayed in the input.
9799
+ * Defaults to "long" (e.g. "01 Aug 2025"). Use "default" for dd/MM/yyyy.
9800
+ */
9801
+ displayFormat?: DateStringFormat;
9802
+ /**
9803
+ * Minimum selectable date.
9804
+ * Can be a static Date or a function that receives form values for dynamic constraints.
9805
+ * @example
9806
+ * // Static constraint
9807
+ * minDate: new Date("2024-01-01")
9808
+ *
9809
+ * // Dynamic constraint based on another field
9810
+ * minDate: ({ values }) => values.startDate
9811
+ */
9812
+ minDate?: F0DateConstraintProp;
9813
+ /**
9814
+ * Maximum selectable date.
9815
+ * Can be a static Date or a function that receives form values for dynamic constraints.
9816
+ * @example
9817
+ * // Static constraint
9818
+ * maxDate: new Date("2025-12-31")
9819
+ *
9820
+ * // Dynamic constraint based on another field
9821
+ * maxDate: ({ values }) => values.endDate
9822
+ */
9823
+ maxDate?: F0DateConstraintProp;
9824
+ }
9825
+
9826
+ /**
9827
+ * Period field with all properties for rendering.
9828
+ * Includes properties derived from the Zod schema.
9829
+ */
9830
+ export declare type F0PeriodField = F0BaseField & F0PeriodConfig & {
9831
+ type: "period";
9832
+ /** Whether the period can be cleared (derived from optional/nullable) */
9833
+ clearable?: boolean;
9834
+ /** Conditional rendering based on another field's value */
9835
+ renderIf?: PeriodFieldRenderIf;
9836
+ };
9837
+
9838
+ /**
9839
+ * Config for period fields (date navigator that preserves the full
9840
+ * DatePickerValue: `{ value: { from, to }, granularity }`).
9841
+ */
9842
+ export declare type F0PeriodFieldConfig = F0BaseConfig & F0PeriodConfig & {
9843
+ fieldType: "period";
9844
+ };
9845
+
9766
9846
  /**
9767
9847
  * A record mapping section IDs to their individual schemas.
9768
9848
  * When used, each section gets independent validation and its own submit button.
@@ -10740,6 +10820,39 @@ export declare interface F0TimelineRowTaskProps extends F0TimelineRowBaseProps {
10740
10820
  otherActions?: F0TimelineRowOtherAction[];
10741
10821
  }
10742
10822
 
10823
+ declare type F0ToastProps = {
10824
+ /**
10825
+ * The title of the toast
10826
+ */
10827
+ title?: string;
10828
+ /**
10829
+ * The description of the toast
10830
+ */
10831
+ description?: string;
10832
+ /**
10833
+ * The variant of the toast
10834
+ */
10835
+ variant?: F0ToastVariant;
10836
+ /**
10837
+ * The duration of the toast in milliseconds (if not provided, the toast will stay open until the user closes it)
10838
+ */
10839
+ duration?: number;
10840
+ /**
10841
+ * Whether the toast is paused. If true, the duraction timer will not tick in anycase
10842
+ */
10843
+ forcePauseTimer?: boolean;
10844
+ /**
10845
+ * The callback to be called when the toast is closed
10846
+ */
10847
+ onClose?: () => void;
10848
+ /**
10849
+ * The actions to display in the toast ()
10850
+ */
10851
+ actions?: ToastActionButton | [ToastActionButton] | ToastActionLink | [ToastActionLink] | [ToastActionButton, ToastActionLink];
10852
+ };
10853
+
10854
+ declare type F0ToastVariant = (typeof toastVariants)[number];
10855
+
10743
10856
  /**
10744
10857
  * Loose message shape used inside f0. Mirrors the CopilotKit `Message`
10745
10858
  * shape so adapters (factorial, mock runtime) can map back and forth
@@ -10901,7 +11014,7 @@ export declare function fieldsToSeconds(fields: DurationFields): number;
10901
11014
  /**
10902
11015
  * Field types for rendering
10903
11016
  */
10904
- export declare type FieldType = "text" | "number" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "richtext" | "file" | "cardSelect" | "custom";
11017
+ export declare type FieldType = "text" | "number" | "duration" | "textarea" | "select" | "checkbox" | "switch" | "date" | "time" | "datetime" | "daterange" | "period" | "richtext" | "file" | "cardSelect" | "custom";
10905
11018
 
10906
11019
  export declare const FILE_TYPES: {
10907
11020
  readonly PDF: "pdf";
@@ -13195,7 +13308,7 @@ export declare const OneCalendar: WithDataTestIdReturnType_3< {
13195
13308
  displayName: string;
13196
13309
  }>;
13197
13310
 
13198
- export declare const OneCalendarInternal: ({ mode, view, onSelect, defaultMonth, defaultSelected, showNavigation, showInput, minDate, maxDate, compact, weekStartsOn, }: OneCalendarInternalProps) => JSX_2.Element;
13311
+ export declare const OneCalendarInternal: ({ mode, view, onSelect, defaultMonth, defaultSelected, showNavigation, showInput, minDate, maxDate, compact, weekStartsOn, selectOnCellOnly, }: OneCalendarInternalProps) => JSX_2.Element;
13199
13312
 
13200
13313
  export declare interface OneCalendarInternalProps {
13201
13314
  mode: CalendarMode;
@@ -13209,6 +13322,8 @@ export declare interface OneCalendarInternalProps {
13209
13322
  maxDate?: Date;
13210
13323
  compact?: boolean;
13211
13324
  weekStartsOn?: WeekStartsOn;
13325
+ /** When true, a granularity change updates the view without emitting `onSelect`. Default false. */
13326
+ selectOnCellOnly?: boolean;
13212
13327
  }
13213
13328
 
13214
13329
  export declare type OneCalendarProps = Omit<OneCalendarInternalProps, (typeof privateProps_6)[number]>;
@@ -13496,6 +13611,21 @@ declare type PendingQuote = {
13496
13611
  text: string;
13497
13612
  };
13498
13613
 
13614
+ declare type PeriodFieldRenderIf = PeriodRenderIfCondition | CommonRenderIfCondition | F0BaseFieldRenderIfFunction;
13615
+
13616
+ declare interface PeriodRenderIfBase {
13617
+ fieldId: string;
13618
+ }
13619
+
13620
+ /**
13621
+ * RenderIf conditions specific to period fields.
13622
+ * The value is a `DatePickerValue` object, so only `isEmpty` is meaningful
13623
+ * (same approach as date range fields).
13624
+ */
13625
+ export declare type PeriodRenderIfCondition = PeriodRenderIfBase & {
13626
+ isEmpty: boolean;
13627
+ };
13628
+
13499
13629
  /**
13500
13630
  * Creates a union of `[sectionId, data]` pairs for each key in T.
13501
13631
  * Used to build a callback where TypeScript narrows `data` based on `sectionId`.
@@ -14159,7 +14289,7 @@ declare interface RenderIfBase {
14159
14289
  /**
14160
14290
  * Union of all possible RenderIf conditions (used internally for evaluation)
14161
14291
  */
14162
- export declare type RenderIfCondition = CommonRenderIfCondition | TextRenderIfCondition | NumberRenderIfCondition | BooleanRenderIfCondition | SelectRenderIfCondition | DateRenderIfCondition | DateRangeRenderIfCondition;
14292
+ export declare type RenderIfCondition = CommonRenderIfCondition | TextRenderIfCondition | NumberRenderIfCondition | BooleanRenderIfCondition | SelectRenderIfCondition | DateRenderIfCondition | DateRangeRenderIfCondition | PeriodRenderIfCondition;
14163
14293
 
14164
14294
  export declare interface ReplaceBlockNotesTextEditorPageDocumentPatch {
14165
14295
  type: "replace_block";
@@ -15432,6 +15562,111 @@ export declare type TimelineRowStatus = (typeof timelineRowStatuses)[number];
15432
15562
 
15433
15563
  export declare const timelineRowStatuses: readonly ["completed", "in-progress", "not-started"];
15434
15564
 
15565
+ declare type ToastActionButton = {
15566
+ type: "button";
15567
+ label: string;
15568
+ onClick: () => void;
15569
+ icon?: IconType;
15570
+ /**
15571
+ * If true, the toast will not be closed automatically when the action is clicked.
15572
+ */
15573
+ keepOpen?: boolean;
15574
+ };
15575
+
15576
+ declare type ToastActionLink = {
15577
+ type: "link";
15578
+ label: string;
15579
+ href: string;
15580
+ /**
15581
+ * If true, the toast will not be closed automatically when the action is clicked.
15582
+ */
15583
+ keepOpen?: boolean;
15584
+ };
15585
+
15586
+ export declare type ToastId = string;
15587
+
15588
+ export declare type ToastOptions = {
15589
+ /**
15590
+ * The title of the toast
15591
+ */
15592
+ title?: string;
15593
+ /**
15594
+ * The description of the toast
15595
+ */
15596
+ description?: string;
15597
+ /**
15598
+ * The variant of the toast
15599
+ */
15600
+ variant?: F0ToastVariant;
15601
+ /**
15602
+ * The actions to display in the toast
15603
+ */
15604
+ actions?: F0ToastProps["actions"];
15605
+ /**
15606
+ * Optional id for the toast. If not provided, a random id will be generated.
15607
+ */
15608
+ id?: ToastId;
15609
+ } & ({
15610
+ /**
15611
+ * The duration of the toast in milliseconds (if not provided, the toast will stay open until the user closes it)
15612
+ * @default 5000
15613
+ */
15614
+ duration?: number;
15615
+ /**
15616
+ * Whether the toast should persist until the user closes it
15617
+ */
15618
+ persistent?: undefined;
15619
+ } | {
15620
+ duration?: undefined;
15621
+ persistent: true;
15622
+ });
15623
+
15624
+ export declare const ToastProvider: ({ children, portalTargets, }: ToastProviderProps) => JSX_2.Element;
15625
+
15626
+ /**
15627
+ * A toast as held by the store: the public options resolved into the props the
15628
+ * `F0Toast` component renders, plus a stable `id` and an `onClose` callback.
15629
+ */
15630
+ export declare type ToastProviderItem = F0ToastProps & {
15631
+ id: ToastId;
15632
+ onClose: () => void;
15633
+ };
15634
+
15635
+ declare type ToastProviderProps = {
15636
+ children: React.ReactNode;
15637
+ portalTargets?: Record<"mobile" | "desktop", string>;
15638
+ };
15639
+
15640
+ /**
15641
+ * Imperative API for toast notifications. Can be called from anywhere — no hook
15642
+ * required — as long as `<F0Provider>` (which mounts `ToastProvider`) is in the
15643
+ * tree.
15644
+ *
15645
+ * @example
15646
+ * import { toasts } from "@factorialco/f0-react"
15647
+ *
15648
+ * const id = toasts.open({ title: "Saved", variant: "success" })
15649
+ * toasts.close(id)
15650
+ * toasts.closeAll()
15651
+ */
15652
+ export declare const toasts: {
15653
+ /**
15654
+ * Show a toast.
15655
+ * @param options The options for the toast
15656
+ * @returns The id of the created toast (pass it to `toasts.close` to dismiss it)
15657
+ */
15658
+ open: (options: ToastOptions) => ToastId;
15659
+ /**
15660
+ * Dismiss a toast by id.
15661
+ * @param id The id returned by `toasts.open`
15662
+ */
15663
+ close: (id: ToastId) => void;
15664
+ /** Dismiss every open toast. */
15665
+ closeAll: () => void;
15666
+ };
15667
+
15668
+ declare const toastVariants: readonly ["error", "warning", "success", "default"];
15669
+
15435
15670
  /** A button rendered in the footer at the bottom of the table of contents */
15436
15671
  declare type TOCAction = {
15437
15672
  label: string;
@@ -16241,6 +16476,16 @@ export declare const useGroups: <R extends RecordType>(groups: GroupRecord<R>[],
16241
16476
  setGroupOpen: (key: string, open: boolean) => void;
16242
16477
  };
16243
16478
 
16479
+ /**
16480
+ * Returns true when the viewport width is >= 640px (Tailwind's `sm` breakpoint).
16481
+ */
16482
+ export declare const useIsDesktop: () => boolean;
16483
+
16484
+ /**
16485
+ * Returns true when the viewport width is < 640px (below Tailwind's `sm` breakpoint).
16486
+ */
16487
+ export declare const useIsMobile: () => boolean;
16488
+
16244
16489
  /**
16245
16490
  * Resolves the previous/next neighbours of an item through the adapter's
16246
16491
  * optional id-relative `fetchItemNeighbors` capability.