@factorialco/f0-react 6.5.0 → 6.6.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.
@@ -11998,9 +11998,11 @@ declare module "@tiptap/core" {
11998
11998
 
11999
11999
  declare module "@tiptap/core" {
12000
12000
  interface Commands<ReturnType> {
12001
- fontSize: {
12002
- setFontSize: (fontSize: string) => ReturnType;
12003
- unsetFontSize: () => ReturnType;
12001
+ enhanceHighlight: {
12002
+ setEnhanceHighlight: (from: number, to: number, options?: {
12003
+ placeholder?: string;
12004
+ }) => ReturnType;
12005
+ clearEnhanceHighlight: () => ReturnType;
12004
12006
  };
12005
12007
  }
12006
12008
  }
@@ -12008,11 +12010,9 @@ declare module "@tiptap/core" {
12008
12010
 
12009
12011
  declare module "@tiptap/core" {
12010
12012
  interface Commands<ReturnType> {
12011
- enhanceHighlight: {
12012
- setEnhanceHighlight: (from: number, to: number, options?: {
12013
- placeholder?: string;
12014
- }) => ReturnType;
12015
- clearEnhanceHighlight: () => ReturnType;
12013
+ fontSize: {
12014
+ setFontSize: (fontSize: string) => ReturnType;
12015
+ unsetFontSize: () => ReturnType;
12016
12016
  };
12017
12017
  }
12018
12018
  }
@@ -3,8 +3,8 @@ import { cX as a1, cW as s1, d7 as l1, cT as c1, cU as d1, cN as u1, cO as f1, c
3
3
  import { jsx as n, jsxs as h, Fragment as Ae } from "react/jsx-runtime";
4
4
  import Y, { forwardRef as Oe, useRef as O, useTransition as bu, useState as B, useLayoutEffect as Hn, useId as Ln, useContext as zt, createContext as ht, useEffect as q, useCallback as U, useMemo as de, Fragment as _t, isValidElement as vu, cloneElement as hs, Suspense as Er, lazy as sn, createElement as or, memo as ps, Children as gs } from "react";
5
5
  import { d as k, T as xu, a as yu, b as wu, f as Ye, c as Nu, u as Cu } from "./tooltip-Cik7KBQT.js";
6
- import { C as Iu, P as ku, E as Su, a as Uo, b as Wn, M as Tu, p as Ru, c as Eu, R as Ri, e as bs, u as Lu, f as zu, g as Fu, h as Au, i as Pu, j as Mu, O as vs, k as xs, S as Ou, A as Du, B as Bu, L as _u, l as $u, V as Hu, m as Wu, n as ju, o as Uu } from "./index-C5uJNrqj.js";
7
- import { a5 as D1, a6 as B1, v as _1, w as $1, s as H1, N as W1, x as j1, H as U1, ag as V1, K as G1, t as K1, a3 as q1, ai as Y1, ah as X1, X as J1, al as Q1, F as Z1, a0 as ey, Z as ty, T as ny, an as ry, U as oy, a1 as iy, a2 as ay, y as sy, aj as ly, ak as cy, W as dy, a4 as uy, ad as fy, af as my, z as hy, G as py, I as gy, _ as by, am as vy, $ as xy, Y as yy, ao as wy, D as Ny, J as Cy, q as Iy, r as ky, a9 as Sy, aa as Ty, a7 as Ry, ae as Ey, Q as Ly, ab as zy, a8 as Fy, ac as Ay } from "./index-C5uJNrqj.js";
6
+ import { C as Iu, P as ku, E as Su, a as Uo, b as Wn, M as Tu, p as Ru, c as Eu, R as Ri, e as bs, u as Lu, f as zu, g as Fu, h as Au, i as Pu, j as Mu, O as vs, k as xs, S as Ou, A as Du, B as Bu, L as _u, l as $u, V as Hu, m as Wu, n as ju, o as Uu } from "./index-GMJbBTvj.js";
7
+ import { a5 as D1, a6 as B1, v as _1, w as $1, s as H1, N as W1, x as j1, H as U1, ag as V1, K as G1, t as K1, a3 as q1, ai as Y1, ah as X1, X as J1, al as Q1, F as Z1, a0 as ey, Z as ty, T as ny, an as ry, U as oy, a1 as iy, a2 as ay, y as sy, aj as ly, ak as cy, W as dy, a4 as uy, ad as fy, af as my, z as hy, G as py, I as gy, _ as by, am as vy, $ as xy, Y as yy, ao as wy, D as Ny, J as Cy, q as Iy, r as ky, a9 as Sy, aa as Ty, a7 as Ry, ae as Ey, Q as Ly, ab as zy, a8 as Fy, ac as Ay } from "./index-GMJbBTvj.js";
8
8
  import Vu from "react-dom";
9
9
  const Gu = hc("Search", [
10
10
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -7899,7 +7899,7 @@ const fl = () => Ut(ol, "useChatJump"), Jh = () => Ut(il, "useChatHighlightedId"
7899
7899
  }, Pr = (e, t) => {
7900
7900
  const r = document.createElement("a");
7901
7901
  r.href = e, r.download = t, r.rel = "noreferrer", r.click();
7902
- }, tp = sn(() => import("./ChatPdfThumbnail-DyDN7a-p.js")), np = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), rp = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), op = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), ip = 288, ap = 160, sp = (e) => {
7902
+ }, tp = sn(() => import("./ChatPdfThumbnail-D64TOT76.js")), np = sn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), rp = sn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), op = sn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), ip = 288, ap = 160, sp = (e) => {
7903
7903
  const [t, r] = B(!1);
7904
7904
  return q(() => {
7905
7905
  const o = e.current;
@@ -9942,7 +9942,7 @@ const kp = {
9942
9942
  ] })
9943
9943
  ] }) });
9944
9944
  }, Dp = sn(
9945
- () => import("./index-Cdvq3ahA.js").then((e) => e.i).then((e) => ({
9945
+ () => import("./index-BW-Go-y_.js").then((e) => e.i).then((e) => ({
9946
9946
  default: e.F0PdfViewer
9947
9947
  }))
9948
9948
  ), Bp = () => {
package/dist/f0.d.ts CHANGED
@@ -10439,6 +10439,23 @@ export declare type F0FormFieldProps = F0FormFieldFileProps | F0FormFieldNonFile
10439
10439
  */
10440
10440
  export declare type F0FormLikeComponent = React.ComponentType<F0FormCommonProps>;
10441
10441
 
10442
+ /**
10443
+ * Styling configuration for per-section schema forms.
10444
+ * Extends the base config with options that only apply when each section
10445
+ * has its own independent schema and submit button.
10446
+ */
10447
+ declare interface F0FormPerSectionStylingConfig extends F0FormStylingConfig {
10448
+ /**
10449
+ * Renders only the section selected in the sidepanel instead of stacking
10450
+ * all sections. Useful for large forms where showing every section at once
10451
+ * is overwhelming. Hidden sections stay mounted so their values, dirty
10452
+ * state, and validation are preserved.
10453
+ * Has no effect unless `showSectionsSidepanel` is true.
10454
+ * @default false
10455
+ */
10456
+ showOnlySelectedSection?: boolean;
10457
+ }
10458
+
10442
10459
  /**
10443
10460
  * Union of all F0Form prop variants.
10444
10461
  * The component detects the mode based on whether `schema` is a single Zod schema
@@ -10481,7 +10498,7 @@ declare interface F0FormPropsWithDefinition {
10481
10498
  export declare interface F0FormPropsWithPerSectionDefinition<T extends F0PerSectionSchema> {
10482
10499
  formDefinition: F0FormDefinitionPerSection_2<T>;
10483
10500
  className?: string;
10484
- styling?: F0FormStylingConfig;
10501
+ styling?: F0FormPerSectionStylingConfig;
10485
10502
  formRef?: React.MutableRefObject<F0FormRef | null>;
10486
10503
  initialFiles?: InitialFile[];
10487
10504
  /** Upload hook shared by all file fields in the form. */
@@ -10529,7 +10546,7 @@ export declare interface F0FormPropsWithPerSectionSchema<T extends F0PerSectionS
10529
10546
  /**
10530
10547
  * Styling configuration for form layout and appearance.
10531
10548
  */
10532
- styling?: F0FormStylingConfig;
10549
+ styling?: F0FormPerSectionStylingConfig;
10533
10550
  /**
10534
10551
  * Ref to control the form programmatically from outside.
10535
10552
  */
@@ -10739,7 +10756,9 @@ declare type F0FormStateCallback = (state: {
10739
10756
  */
10740
10757
  export declare interface F0FormStylingConfig {
10741
10758
  /**
10742
- * Shows a sidebar with section navigation (Table of Contents)
10759
+ * Shows a sidebar with section navigation (Table of Contents).
10760
+ * Automatically hidden on small viewports (max-width 560px), where
10761
+ * sections stack as in the regular layout.
10743
10762
  * @default false
10744
10763
  */
10745
10764
  showSectionsSidepanel?: boolean;
@@ -19286,9 +19305,11 @@ declare module "@tiptap/core" {
19286
19305
 
19287
19306
  declare module "@tiptap/core" {
19288
19307
  interface Commands<ReturnType> {
19289
- fontSize: {
19290
- setFontSize: (fontSize: string) => ReturnType;
19291
- unsetFontSize: () => ReturnType;
19308
+ enhanceHighlight: {
19309
+ setEnhanceHighlight: (from: number, to: number, options?: {
19310
+ placeholder?: string;
19311
+ }) => ReturnType;
19312
+ clearEnhanceHighlight: () => ReturnType;
19292
19313
  };
19293
19314
  }
19294
19315
  }
@@ -19296,11 +19317,9 @@ declare module "@tiptap/core" {
19296
19317
 
19297
19318
  declare module "@tiptap/core" {
19298
19319
  interface Commands<ReturnType> {
19299
- enhanceHighlight: {
19300
- setEnhanceHighlight: (from: number, to: number, options?: {
19301
- placeholder?: string;
19302
- }) => ReturnType;
19303
- clearEnhanceHighlight: () => ReturnType;
19320
+ fontSize: {
19321
+ setFontSize: (fontSize: string) => ReturnType;
19322
+ unsetFontSize: () => ReturnType;
19304
19323
  };
19305
19324
  }
19306
19325
  }
package/dist/f0.js CHANGED
@@ -7,12 +7,12 @@ import { D as r5, E as n5, G as i5, H as Dd, I as Pb, J as FN, K as GN, L as Qn,
7
7
  import { A as yve, C as _ve, t as bve, s as xve, v as wve, y as Sve, l as Cve, i as Tve, q as Dve, z as Ave, B as Mve, p as Eve, r as Lve, j as Nve, e as Ive, g as kve, k as Pve, T as Rve, w as Ove, h as Bve, a as zve, n as Vve, m as Fve, o as Gve, b as Hve, f as Wve, x as Uve, c as $ve, d as Yve, u as Xve } from "./F0AiProcessingOverlay-BkfsZ5Iy.js";
8
8
  import { d as ee, u as ff, h as f5, i as tl, P as hf, g as ql, j as h5, f as Ga } from "./tooltip-Cik7KBQT.js";
9
9
  import { createPortal as np } from "react-dom";
10
- import { C as d5, ap as v5, aq as p5, ar as g5, as as Ow, at as m5, au as y5, av as _5, aw as b5, ax as x5, ay as w5, az as S5, j as C5, F as HN, aA as T5, aB as D5, aC as A5, aD as M5, aE as E5, aF as WN, aG as L5, aH as ip, aI as Za, aJ as N5, aK as Rb, aL as Ob, K as I5, aM as k5, aN as xs, aO as UN, aP as P5, aQ as R5, aR as O5, aS as B5, aT as z5, aU as V5, a0 as F5, ag as G5, aV as H5, X as W5, E as U5, a as $5, e as ap, R as Bb, u as zb, _ as $N, O as Vb, aW as YN, aX as Bw, aY as Fb, s as Y5, f as XN, a4 as qN, aZ as X5, a_ as q5, a$ as Z5, b0 as j5, M as K5 } from "./index-C5uJNrqj.js";
11
- import { v as Zve, w as jve, N as Kve, x as Qve, H as Jve, bm as epe, bl as tpe, bf as rpe, b2 as npe, b1 as ipe, b3 as ape, b4 as ope, b6 as spe, b7 as lpe, ai as upe, ah as cpe, al as fpe, Z as hpe, T as dpe, an as vpe, U as ppe, y as gpe, bn as mpe, aj as ype, ak as _pe, W as bpe, z as xpe, P as wpe, G as Spe, I as Cpe, am as Tpe, Y as Dpe, ao as Ape, D as Mpe, J as Epe, bp as Lpe, q as Npe, r as Ipe, be as kpe, bj as Ppe, bj as Rpe, bk as Ope, ba as Bpe, b9 as zpe, bo as Vpe, ae as Fpe, bc as Gpe, bd as Hpe, Q as Wpe, bq as Upe, br as $pe, g as Ype, bg as Xpe, bh as qpe, bi as Zpe, b5 as jpe, bb as Kpe, h as Qpe, k as Jpe, b8 as ege, bs as tge } from "./index-C5uJNrqj.js";
10
+ import { C as d5, ap as v5, aq as p5, ar as g5, as as Ow, at as m5, au as y5, av as _5, aw as b5, ax as x5, ay as w5, az as S5, j as C5, F as HN, aA as T5, aB as D5, aC as A5, aD as M5, aE as E5, aF as WN, aG as L5, aH as ip, aI as Za, aJ as N5, aK as Rb, aL as Ob, K as I5, aM as k5, aN as xs, aO as UN, aP as P5, aQ as R5, aR as O5, aS as B5, aT as z5, aU as V5, a0 as F5, ag as G5, aV as H5, X as W5, E as U5, a as $5, e as ap, R as Bb, u as zb, _ as $N, O as Vb, aW as YN, aX as Bw, aY as Fb, s as Y5, f as XN, a4 as qN, aZ as X5, a_ as q5, a$ as Z5, b0 as j5, M as K5 } from "./index-GMJbBTvj.js";
11
+ import { v as Zve, w as jve, N as Kve, x as Qve, H as Jve, bm as epe, bl as tpe, bf as rpe, b2 as npe, b1 as ipe, b3 as ape, b4 as ope, b6 as spe, b7 as lpe, ai as upe, ah as cpe, al as fpe, Z as hpe, T as dpe, an as vpe, U as ppe, y as gpe, bn as mpe, aj as ype, ak as _pe, W as bpe, z as xpe, P as wpe, G as Spe, I as Cpe, am as Tpe, Y as Dpe, ao as Ape, D as Mpe, J as Epe, bp as Lpe, q as Npe, r as Ipe, be as kpe, bj as Ppe, bj as Rpe, bk as Ope, ba as Bpe, b9 as zpe, bo as Vpe, ae as Fpe, bc as Gpe, bd as Hpe, Q as Wpe, bq as Upe, br as $pe, g as Ype, bg as Xpe, bh as qpe, bi as Zpe, b5 as jpe, bb as Kpe, h as Qpe, k as Jpe, b8 as ege, bs as tge } from "./index-GMJbBTvj.js";
12
12
  import { l as jy, c as ZN, d as Ad, r as Ky } from "./F0VideoPlayer-FW15Bsth.js";
13
13
  import { F as nge } from "./F0VideoPlayer-FW15Bsth.js";
14
- import { F as age, p as oge } from "./index-Cdvq3ahA.js";
15
- import { c as lge } from "./pdfWorker-CDTHY8xz.js";
14
+ import { F as age, p as oge } from "./index-BW-Go-y_.js";
15
+ import { c as lge } from "./pdfWorker-M-OJp-Of.js";
16
16
  import { g as Q5 } from "./_commonjsHelpers-ByX85dGu.js";
17
17
  import { utils as vl, write as jN } from "./xlsx-CzlURDDb.js";
18
18
  import { defaultTranslations as cge } from "./i18n-provider-defaults.js";
@@ -1118,9 +1118,11 @@ declare module "@tiptap/core" {
1118
1118
 
1119
1119
  declare module "@tiptap/core" {
1120
1120
  interface Commands<ReturnType> {
1121
- fontSize: {
1122
- setFontSize: (fontSize: string) => ReturnType;
1123
- unsetFontSize: () => ReturnType;
1121
+ enhanceHighlight: {
1122
+ setEnhanceHighlight: (from: number, to: number, options?: {
1123
+ placeholder?: string;
1124
+ }) => ReturnType;
1125
+ clearEnhanceHighlight: () => ReturnType;
1124
1126
  };
1125
1127
  }
1126
1128
  }
@@ -1128,11 +1130,9 @@ declare module "@tiptap/core" {
1128
1130
 
1129
1131
  declare module "@tiptap/core" {
1130
1132
  interface Commands<ReturnType> {
1131
- enhanceHighlight: {
1132
- setEnhanceHighlight: (from: number, to: number, options?: {
1133
- placeholder?: string;
1134
- }) => ReturnType;
1135
- clearEnhanceHighlight: () => ReturnType;
1133
+ fontSize: {
1134
+ setFontSize: (fontSize: string) => ReturnType;
1135
+ unsetFontSize: () => ReturnType;
1136
1136
  };
1137
1137
  }
1138
1138
  }
@@ -1,7 +1,7 @@
1
1
  import { S as L, m as ye, u as Z, n as Se, o as Re, i as ke, j as _e, k as Ne, q as Ce, l as Le, w as Fe, r as Ve, s as Te } from "./F0CanvasPanel-C6qzM_nP.js";
2
2
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
3
3
  import { lazy as J, forwardRef as ne, Suspense as He, useState as V, useRef as A, useMemo as te, useCallback as w, useEffect as T } from "react";
4
- import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-CDTHY8xz.js";
4
+ import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-M-OJp-Of.js";
5
5
  import { F as We } from "./Printer-BD-FEi_2.js";
6
6
  import { d as ae } from "./tooltip-Cik7KBQT.js";
7
7
  import './index.css';const Oe = ({
@@ -222,7 +222,7 @@ import './index.css';const Oe = ({
222
222
  }), i;
223
223
  };
224
224
  Ee();
225
- const qe = J(() => import("./SheetViewer-CqS4McZP.js")), Ge = J(() => import("./DocxViewer-Dl3crfqU.js")), Ze = J(() => import("./TextViewer-CnSGe6Lw.js")), oe = 48, se = ne(
225
+ const qe = J(() => import("./SheetViewer-DLlvoFk3.js")), Ge = J(() => import("./DocxViewer-K910aw8q.js")), Ze = J(() => import("./TextViewer-CUtAVCh5.js")), oe = 48, se = ne(
226
226
  (o, a) => {
227
227
  const { kind: e = "pdf", mimeType: i, ...l } = o;
228
228
  if (e === "pdf") return /* @__PURE__ */ t(le, { ref: a, ...l });