@factorialco/f0-react 4.24.0 → 4.25.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.d.ts CHANGED
@@ -2647,6 +2647,20 @@ export declare const defaultTranslations: {
2647
2647
  readonly submit: "Submit";
2648
2648
  readonly stepOf: "Step {{current}} of {{total}}";
2649
2649
  };
2650
+ readonly pdfViewer: {
2651
+ readonly toolbar: "Document toolbar";
2652
+ readonly previousPage: "Previous page";
2653
+ readonly nextPage: "Next page";
2654
+ readonly zoomIn: "Zoom in";
2655
+ readonly zoomOut: "Zoom out";
2656
+ readonly scaleSelector: "Zoom level";
2657
+ readonly pageWidth: "Page width";
2658
+ readonly pageFit: "Page fit";
2659
+ readonly rotate: "Rotate";
2660
+ readonly print: "Print";
2661
+ readonly download: "Download";
2662
+ readonly loading: "Loading document";
2663
+ };
2650
2664
  };
2651
2665
 
2652
2666
  declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> & {
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as h } from "./F0CanvasPanel-Bca0wz2p.js";
1
+ import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as h } from "./F0CanvasPanel-CYITfwlc.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay-CkJL2WvT.js";
3
+ import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay--OAyX7JL.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -3988,6 +3988,20 @@ declare const defaultTranslations: {
3988
3988
  readonly submit: "Submit";
3989
3989
  readonly stepOf: "Step {{current}} of {{total}}";
3990
3990
  };
3991
+ readonly pdfViewer: {
3992
+ readonly toolbar: "Document toolbar";
3993
+ readonly previousPage: "Previous page";
3994
+ readonly nextPage: "Next page";
3995
+ readonly zoomIn: "Zoom in";
3996
+ readonly zoomOut: "Zoom out";
3997
+ readonly scaleSelector: "Zoom level";
3998
+ readonly pageWidth: "Page width";
3999
+ readonly pageFit: "Page fit";
4000
+ readonly rotate: "Rotate";
4001
+ readonly print: "Print";
4002
+ readonly download: "Download";
4003
+ readonly loading: "Loading document";
4004
+ };
3991
4005
  };
3992
4006
 
3993
4007
  export declare interface DeleteBlockNotesTextEditorPageDocumentPatch {
@@ -1,9 +1,9 @@
1
- import { h as Va, B as Ga, i as Ka, j as qa, k as wn, l as lt, m as tt, n as Ya, o as g, p as re, q as Be, u as te, T as Qa, r as Ja, s as Xa, R as Za, t as es, v as we, w as ts, x as nn, y as bt, z as st, A as Ee, E as ns, G as rs, H as X, J as as, K as ss, L as ce, M as or, N as is, O as os, Q as ue, S as St, U as q, V as Ue, W as ls, X as cs, Y as ds, Z as us, _ as fs, $ as ke, a0 as lr, a1 as cr, a2 as Me, a3 as xt, a4 as ms, e as dr, a5 as He, a6 as ur, a7 as Ft, a8 as Ce, a9 as me, aa as vt, ab as fr, ac as hs, ad as mr, ae as ye, af as Ne, ag as ps, ah as gs, ai as bs, aj as xs, ak as vs, al as $e, am as Tt, an as hr, ao as ys, ap as ws, aq as Ns, ar as At, as as pr, at as gr, au as Cs, av as ks, aw as yt, ax as Is, ay as br, az as Ss, aA as Fs, aB as Ts, aC as As, aD as Es, aE as xr, aF as vr, aG as yr, aH as Gt, aI as wr, aJ as Kt, aK as Nr, aL as Rs, aM as Ds, aN as Ps, aO as Cr, aP as Ls, aQ as De, aR as Xe, aS as qt, aT as kr, aU as Os, aV as rn, aW as _s, aX as zs, aY as $s, aZ as Qe, a_ as Bs, a$ as Ms, b0 as ct, b1 as Nn, b2 as Yt, b3 as js, b4 as Ws, a as Hs, b as Us, b5 as Et, b6 as Vs, g as Gs, F as Ks, b7 as qs, b8 as Ir, b9 as Ys, ba as an, bb as Qs, bc as sn, bd as Ze, be as Js, bf as Sr, bg as Fr, bh as Xs, bi as Tr, bj as Zs, bk as ei, bl as ti, bm as Ar, bn as ni, bo as ri, bp as ai, bq as on, br as si, bs as ii, bt as oi, bu as li, bv as ci, bw as di, bx as Er, by as Rr, bz as ui, bA as fi, bB as mi, bC as hi, bD as pi, bE as Dr, bF as gi, bG as bi, bH as Pr, bI as Lr, bJ as xi, bK as vi, bL as yi, bM as wi, bN as Ni, bO as Ci, bP as Or, bQ as ki, bR as Ii, bS as Si, bT as Fi, bU as Ti, bV as _r, bW as Ai, bX as Ei, bY as Ri, bZ as Di, b_ as Pi, b$ as Li, c0 as Pe, c1 as ln, c2 as cn, c3 as dn, c4 as zr, c5 as un, c6 as $r, c7 as Br, c8 as Oi, c9 as _i, ca as zi, cb as $i, cc as Bi, cd as Mi, ce as ji, cf as Cn, cg as Wi, ch as Hi, ci as kn, cj as In, ck as Sn, cl as Ui, cm as Vi, cn as Gi, co as Ki, cp as Mr, cq as qi, cr as Yi } from "./F0CanvasPanel-Bca0wz2p.js";
2
- import { cD as vm, cC as ym, cP as wm, cz as Nm, cA as Cm, cs as km, ct as Im, ct as Sm, cu as Fm, cS as Tm, cB as Am, cL as Em, cM as Rm, cQ as Dm, cv as Pm, cF as Lm, cE as Om, cw as _m, cx as zm, cN as $m, cT as Bm, cO as Mm, cR as jm, cK as Wm, cH as Hm, cJ as Um, cG as Vm, cy as Gm, cI as Km } from "./F0CanvasPanel-Bca0wz2p.js";
1
+ import { h as Va, B as Ga, i as Ka, j as qa, k as wn, l as lt, m as tt, n as Ya, o as g, p as re, q as Be, u as te, T as Qa, r as Ja, s as Xa, R as Za, t as es, v as we, w as ts, x as nn, y as bt, z as st, A as Ee, E as ns, G as rs, H as X, J as as, K as ss, L as ce, M as or, N as is, O as os, Q as ue, S as St, U as q, V as Ue, W as ls, X as cs, Y as ds, Z as us, _ as fs, $ as ke, a0 as lr, a1 as cr, a2 as Me, a3 as xt, a4 as ms, e as dr, a5 as He, a6 as ur, a7 as Ft, a8 as Ce, a9 as me, aa as vt, ab as fr, ac as hs, ad as mr, ae as ye, af as Ne, ag as ps, ah as gs, ai as bs, aj as xs, ak as vs, al as $e, am as Tt, an as hr, ao as ys, ap as ws, aq as Ns, ar as At, as as pr, at as gr, au as Cs, av as ks, aw as yt, ax as Is, ay as br, az as Ss, aA as Fs, aB as Ts, aC as As, aD as Es, aE as xr, aF as vr, aG as yr, aH as Gt, aI as wr, aJ as Kt, aK as Nr, aL as Rs, aM as Ds, aN as Ps, aO as Cr, aP as Ls, aQ as De, aR as Xe, aS as qt, aT as kr, aU as Os, aV as rn, aW as _s, aX as zs, aY as $s, aZ as Qe, a_ as Bs, a$ as Ms, b0 as ct, b1 as Nn, b2 as Yt, b3 as js, b4 as Ws, a as Hs, b as Us, b5 as Et, b6 as Vs, g as Gs, F as Ks, b7 as qs, b8 as Ir, b9 as Ys, ba as an, bb as Qs, bc as sn, bd as Ze, be as Js, bf as Sr, bg as Fr, bh as Xs, bi as Tr, bj as Zs, bk as ei, bl as ti, bm as Ar, bn as ni, bo as ri, bp as ai, bq as on, br as si, bs as ii, bt as oi, bu as li, bv as ci, bw as di, bx as Er, by as Rr, bz as ui, bA as fi, bB as mi, bC as hi, bD as pi, bE as Dr, bF as gi, bG as bi, bH as Pr, bI as Lr, bJ as xi, bK as vi, bL as yi, bM as wi, bN as Ni, bO as Ci, bP as Or, bQ as ki, bR as Ii, bS as Si, bT as Fi, bU as Ti, bV as _r, bW as Ai, bX as Ei, bY as Ri, bZ as Di, b_ as Pi, b$ as Li, c0 as Pe, c1 as ln, c2 as cn, c3 as dn, c4 as zr, c5 as un, c6 as $r, c7 as Br, c8 as Oi, c9 as _i, ca as zi, cb as $i, cc as Bi, cd as Mi, ce as ji, cf as Cn, cg as Wi, ch as Hi, ci as kn, cj as In, ck as Sn, cl as Ui, cm as Vi, cn as Gi, co as Ki, cp as Mr, cq as qi, cr as Yi } from "./F0CanvasPanel-CYITfwlc.js";
2
+ import { cD as vm, cC as ym, cP as wm, cz as Nm, cA as Cm, cs as km, ct as Im, ct as Sm, cu as Fm, cS as Tm, cB as Am, cL as Em, cM as Rm, cQ as Dm, cv as Pm, cF as Lm, cE as Om, cw as _m, cx as zm, cN as $m, cT as Bm, cO as Mm, cR as jm, cK as Wm, cH as Hm, cJ as Um, cG as Vm, cy as Gm, cI as Km } from "./F0CanvasPanel-CYITfwlc.js";
3
3
  import { jsx as t, jsxs as d, Fragment as fe } from "react/jsx-runtime";
4
4
  import Te, { forwardRef as de, useRef as z, useTransition as Qi, useState as R, useLayoutEffect as Je, useId as Qt, useContext as Le, createContext as Ie, useEffect as K, useCallback as U, useMemo as J, Fragment as qe, isValidElement as Ji, cloneElement as jr, memo as Wr, Children as Hr } from "react";
5
- import { C as Xi, P as Zi, a as it, M as eo, p as to, b as no, R as Fn, c as Ur, u as ro, d as ao, e as so, f as io, g as oo, O as Vr, h as Gr, S as lo, A as co, B as uo, L as fo, i as mo, V as ho, j as po, k as go, l as bo } from "./useDataCollectionSource-Dk_5gIWm.js";
6
- import { r as Ym, s as Qm, o as Jm, H as Xm, t as Zm, z as eh, a8 as th, G as nh, q as rh, aa as ah, a9 as sh, Q as ih, ad as oh, F as lh, Y as ch, U as dh, J as uh, af as fh, K as mh, Z as hh, _ as ph, v as gh, ab as bh, ac as xh, N as vh, $ as yh, a5 as wh, a7 as Nh, w as Ch, y as kh, D as Ih, W as Sh, ae as Fh, X as Th, T as Ah, ag as Eh, x as Rh, E as Dh, m as Ph, n as Lh, a1 as Oh, a2 as _h, a6 as zh, I as $h, a3 as Bh, a0 as Mh, a4 as jh } from "./useDataCollectionSource-Dk_5gIWm.js";
5
+ import { C as Xi, P as Zi, a as it, M as eo, p as to, b as no, R as Fn, c as Ur, u as ro, d as ao, e as so, f as io, g as oo, O as Vr, h as Gr, S as lo, A as co, B as uo, L as fo, i as mo, V as ho, j as po, k as go, l as bo } from "./useDataCollectionSource-DMGVHA_H.js";
6
+ import { r as Ym, s as Qm, o as Jm, H as Xm, t as Zm, z as eh, a8 as th, G as nh, q as rh, aa as ah, a9 as sh, Q as ih, ad as oh, F as lh, Y as ch, U as dh, J as uh, af as fh, K as mh, Z as hh, _ as ph, v as gh, ab as bh, ac as xh, N as vh, $ as yh, a5 as wh, a7 as Nh, w as Ch, y as kh, D as Ih, W as Sh, ae as Fh, X as Th, T as Ah, ag as Eh, x as Rh, E as Dh, m as Ph, n as Lh, a1 as Oh, a2 as _h, a6 as zh, I as $h, a3 as Bh, a0 as Mh, a4 as jh } from "./useDataCollectionSource-DMGVHA_H.js";
7
7
  const xo = Va("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.css CHANGED
@@ -1 +1 @@
1
- .grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;left:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle,.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing,.grid-stack-animate .grid-stack-item.grid-stack-placeholder{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0%}.grid-stack-item .ui-resizable-handle{bottom:12px;right:12px;--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));overflow:hidden;border-radius:.625rem}.grid-stack-item .ui-resizable-se:after{content:"";position:absolute;inset:0;background-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.1904 11.6904C17.4443 11.4366 17.8565 11.4366 18.1104 11.6904C18.3641 11.9443 18.3642 12.3565 18.1104 12.6104L12.6104 18.1104C12.3565 18.3642 11.9443 17.3641 11.6904 18.1104C11.4366 17.8565 11.4366 17.4443 11.6904 17.1904L17.1904 11.6904ZM16.1904 6.19043C16.4443 5.93659 16.8565 5.93659 17.1104 6.19043C17.3641 6.44427 17.3642 6.85653 17.1104 7.11035L7.11035 17.1104C6.85653 17.3642 6.44427 17.3641 6.19043 17.1104C5.93659 16.8565 5.93659 16.4443 6.19043 16.1904L16.1904 6.19043Z' fill='%23A1ABBD'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:contain;width:100%;height:100%;background-color:#fff}.ui-draggable-dragging>.grid-stack-item-content{background-color:transparent!important;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.ui-draggable-dragging>.grid-stack-item-content>*{transform-origin:24px 24px;--tw-scale-x: .95 !important;--tw-scale-y: .95 !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;cursor:grabbing;border-radius:.875rem;border-color:hsl(var(--neutral-40));--tw-shadow: 0 6px 12px 0 hsl(var(--shadow)/.06),0 16px 24px -12px hsl(var(--shadow)/.05);--tw-shadow-colored: 0 6px 12px 0 var(--tw-shadow-color), 0 16px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.ui.draggable-dragging{cursor:grabbing!important}.grid-stack-placeholder>.placeholder-content{border-radius:.875rem;background-color:hsl(var(--neutral-100) / .05);opacity:.5;--tw-blur: blur(2px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grid-stack-item>.grid-stack-item-content{overflow:visible!important}.ui-resizable-resizing>.grid-stack-item-content{border-radius:.875rem}
1
+ .grid-stack{position:relative}.grid-stack-rtl{direction:ltr}.grid-stack-rtl>.grid-stack-item{direction:rtl}.grid-stack-placeholder>.placeholder-content{background-color:#0000001a;margin:0;position:absolute;width:auto;z-index:0!important}.grid-stack>.grid-stack-item{position:absolute;padding:0;top:0;left:0;width:var(--gs-column-width);height:var(--gs-cell-height)}.grid-stack>.grid-stack-item>.grid-stack-item-content{margin:0;position:absolute;width:auto;overflow-x:hidden;overflow-y:auto}.grid-stack>.grid-stack-item.size-to-content:not(.size-to-content-max)>.grid-stack-item-content{overflow-y:hidden}.grid-stack>.grid-stack-item>.grid-stack-item-content,.grid-stack>.grid-stack-placeholder>.placeholder-content{top:var(--gs-item-margin-top);right:var(--gs-item-margin-right);bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.grid-stack-item.ui-resizable-disabled>.ui-resizable-handle,.grid-stack-item.ui-resizable-autohide>.ui-resizable-handle{display:none}.grid-stack-item>.ui-resizable-ne,.grid-stack-item>.ui-resizable-nw,.grid-stack-item>.ui-resizable-se,.grid-stack-item>.ui-resizable-sw{background-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="none" stroke="%23666" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 20 20"><path d="m10 3 2 2H8l2-2v14l-2-2h4l-2 2"/></svg>');background-repeat:no-repeat;background-position:center}.grid-stack-item>.ui-resizable-ne{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-sw{transform:rotate(45deg)}.grid-stack-item>.ui-resizable-nw{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-se{transform:rotate(-45deg)}.grid-stack-item>.ui-resizable-nw{cursor:nw-resize;width:20px;height:20px;top:var(--gs-item-margin-top);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-n{cursor:n-resize;height:10px;top:var(--gs-item-margin-top);left:25px;right:25px}.grid-stack-item>.ui-resizable-ne{cursor:ne-resize;width:20px;height:20px;top:var(--gs-item-margin-top);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-e{cursor:e-resize;width:10px;top:15px;bottom:15px;right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-se{cursor:se-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);right:var(--gs-item-margin-right)}.grid-stack-item>.ui-resizable-s{cursor:s-resize;height:10px;left:25px;bottom:var(--gs-item-margin-bottom);right:25px}.grid-stack-item>.ui-resizable-sw{cursor:sw-resize;width:20px;height:20px;bottom:var(--gs-item-margin-bottom);left:var(--gs-item-margin-left)}.grid-stack-item>.ui-resizable-w{cursor:w-resize;width:10px;top:15px;bottom:15px;left:var(--gs-item-margin-left)}.grid-stack-item.ui-draggable-dragging>.ui-resizable-handle{display:none!important}.grid-stack-item.ui-draggable-dragging{will-change:left,top}.grid-stack-item.ui-resizable-resizing{will-change:width,height}.ui-draggable-dragging,.ui-resizable-resizing{z-index:10000}.ui-draggable-dragging>.grid-stack-item-content,.ui-resizable-resizing>.grid-stack-item-content{box-shadow:1px 4px 6px #0003;opacity:.8}.grid-stack-animate,.grid-stack-animate .grid-stack-item{transition:left .3s,top .3s,height .3s,width .3s}.grid-stack-animate .grid-stack-item.ui-draggable-dragging,.grid-stack-animate .grid-stack-item.ui-resizable-resizing,.grid-stack-animate .grid-stack-item.grid-stack-placeholder{transition:left 0s,top 0s,height 0s,width 0s}.grid-stack>.grid-stack-item[gs-y="0"]{top:0}.grid-stack>.grid-stack-item[gs-x="0"]{left:0%}.grid-stack-item .ui-resizable-handle{bottom:12px;right:12px;--tw-rotate: 0deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));overflow:hidden;border-radius:.625rem}.grid-stack-item .ui-resizable-se:after{content:"";position:absolute;inset:0;background-image:url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17.1904 11.6904C17.4443 11.4366 17.8565 11.4366 18.1104 11.6904C18.3641 11.9443 18.3642 12.3565 18.1104 12.6104L12.6104 18.1104C12.3565 18.3642 11.9443 17.3641 11.6904 18.1104C11.4366 17.8565 11.4366 17.4443 11.6904 17.1904L17.1904 11.6904ZM16.1904 6.19043C16.4443 5.93659 16.8565 5.93659 17.1104 6.19043C17.3641 6.44427 17.3642 6.85653 17.1104 7.11035L7.11035 17.1104C6.85653 17.3642 6.44427 17.3641 6.19043 17.1104C5.93659 16.8565 5.93659 16.4443 6.19043 16.1904L16.1904 6.19043Z' fill='%23A1ABBD'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:center;background-size:contain;width:100%;height:100%;background-color:#fff}.ui-draggable-dragging>.grid-stack-item-content{background-color:transparent!important;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)!important;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.ui-draggable-dragging>.grid-stack-item-content>*{transform-origin:24px 24px;--tw-scale-x: .95 !important;--tw-scale-y: .95 !important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important;cursor:grabbing;border-radius:.875rem;border-color:hsl(var(--neutral-40));--tw-shadow: 0 6px 12px 0 hsl(var(--shadow)/.06),0 16px 24px -12px hsl(var(--shadow)/.05);--tw-shadow-colored: 0 6px 12px 0 var(--tw-shadow-color), 0 16px 24px -12px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.ui.draggable-dragging{cursor:grabbing!important}.grid-stack-placeholder>.placeholder-content{border-radius:.875rem;background-color:hsl(var(--neutral-100) / .05);opacity:.5;--tw-blur: blur(2px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.grid-stack-item>.grid-stack-item-content{overflow:visible!important}.ui-resizable-resizing>.grid-stack-item-content{border-radius:.875rem}:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors:active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors:active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;inset:0;overflow:hidden;line-height:1;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::-moz-selection{background:transparent}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;inset:100% 0 0;z-index:-1;cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}.textLayer .endOfContent.active{top:0}.F0PdfViewer__surface{background-color:hsl(var(--neutral-0));background-image:linear-gradient(hsl(var(--neutral-5)),hsl(var(--neutral-5)))}.F0PdfViewer__page .react-pdf__Page__canvas{display:block;position:relative;z-index:0}.F0PdfViewer__page .react-pdf__Page__textContent{z-index:1;pointer-events:auto;-webkit-user-select:text;-moz-user-select:text;user-select:text}.F0PdfViewer__page .textLayer ::-moz-selection{background-color:hsl(var(--selected-50) / .3)}.F0PdfViewer__page .textLayer ::selection{background-color:hsl(var(--selected-50) / .3)}
package/dist/f0.d.ts CHANGED
@@ -62,6 +62,7 @@ import { F0FormDefinition as F0FormDefinition_2 } from './f0';
62
62
  import { F0FormDefinitionPerSection as F0FormDefinitionPerSection_2 } from './f0';
63
63
  import { F0FormDefinitionSingleSchema as F0FormDefinitionSingleSchema_2 } from './f0';
64
64
  import { F0GridStackProps as F0GridStackProps_2 } from './F0GridStack';
65
+ import { F0PdfViewerProps as F0PdfViewerProps_2 } from './types';
65
66
  import { F0SelectProps as F0SelectProps_2 } from './types';
66
67
  import { F0SliderProps as F0SliderProps_2 } from './types';
67
68
  import { F0SliderSkeletonProps } from './F0SliderSkeleton';
@@ -114,6 +115,7 @@ import { Observable } from 'zen-observable-ts';
114
115
  import { PageLayoutBlockComponent as PageLayoutBlockComponent_2 } from './types';
115
116
  import { PageLayoutGroupComponent as PageLayoutGroupComponent_2 } from './f0';
116
117
  import { PageProps } from './pages/Page';
118
+ import { PDFDocumentProxy } from 'pdfjs-dist';
117
119
  import { PercentageCellValue } from './types/percentage';
118
120
  import { PersonCellValue } from './f0';
119
121
  import { PersonCellValue as PersonCellValue_2 } from './types/person';
@@ -3236,6 +3238,8 @@ declare const componentTypes: readonly ["layout", "info", "action", "form"];
3236
3238
 
3237
3239
  export declare function computeSectionEndIds(elements: SurveyFormBuilderElement[]): Set<string>;
3238
3240
 
3241
+ export declare const configurePdfWorker: (src?: string) => void;
3242
+
3239
3243
  export declare type ConfirmDialogOptions = NotificationDialogBaseOptions & {
3240
3244
  /** The confirm action (default: label "Ok", value true). */
3241
3245
  confirm?: DialogSimpleAction;
@@ -5189,6 +5193,20 @@ export declare const defaultTranslations: {
5189
5193
  readonly submit: "Submit";
5190
5194
  readonly stepOf: "Step {{current}} of {{total}}";
5191
5195
  };
5196
+ readonly pdfViewer: {
5197
+ readonly toolbar: "Document toolbar";
5198
+ readonly previousPage: "Previous page";
5199
+ readonly nextPage: "Next page";
5200
+ readonly zoomIn: "Zoom in";
5201
+ readonly zoomOut: "Zoom out";
5202
+ readonly scaleSelector: "Zoom level";
5203
+ readonly pageWidth: "Page width";
5204
+ readonly pageFit: "Page fit";
5205
+ readonly rotate: "Rotate";
5206
+ readonly print: "Print";
5207
+ readonly download: "Download";
5208
+ readonly loading: "Loading document";
5209
+ };
5192
5210
  };
5193
5211
 
5194
5212
  /**
@@ -10123,6 +10141,42 @@ export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof Swi
10123
10141
  autoOpen?: boolean;
10124
10142
  };
10125
10143
 
10144
+ declare type F0PdfRotation = 0 | 90 | 180 | 270;
10145
+
10146
+ export declare type F0PdfScale = (typeof pdfScales)[number];
10147
+
10148
+ /**
10149
+ * @experimental This is an experimental component, use it at your own risk.
10150
+ */
10151
+ export declare const F0PdfViewer: WithDataTestIdReturnType_3<ForwardRefExoticComponent<F0PdfViewerProps_2 & RefAttributes<HTMLDivElement>> & {
10152
+ Skeleton: () => JSX_2.Element;
10153
+ }>;
10154
+
10155
+ export declare interface F0PdfViewerProps extends WithDataTestIdProps, DataAttributes_2 {
10156
+ /** Source URL of the PDF document. */
10157
+ url: string;
10158
+ /** File name used when downloading the document. Defaults to "document.pdf". */
10159
+ filename?: string;
10160
+ /** Zero-based page index to scroll to initially (and on change). */
10161
+ page?: number;
10162
+ /** Restrict rendering to a subset of pages (zero-based indexes). */
10163
+ pagesToDisplay?: number[];
10164
+ /** Initial zoom level. Defaults to "page-width". */
10165
+ initialScale?: F0PdfScale;
10166
+ /** Send credentials with the document request. Defaults to true. */
10167
+ withCredentials?: boolean;
10168
+ /** Show a toolbar control to rotate the document in 90° steps. */
10169
+ rotatable?: boolean;
10170
+ /** Initial rotation in degrees. Defaults to 0. */
10171
+ initialRotation?: F0PdfRotation;
10172
+ /** Called with the new rotation in degrees whenever the user rotates. */
10173
+ onRotationChange?: (rotation: F0PdfRotation) => void;
10174
+ /** Called once the document has loaded, with the pdf.js document proxy. */
10175
+ onPdfLoaded?: (pdf: PDFDocumentProxy) => void;
10176
+ /** Called with the 1-based page number when the visible page changes. */
10177
+ onPageChange?: (page: number) => void;
10178
+ }
10179
+
10126
10180
  /**
10127
10181
  * F0 config options specific to period fields.
10128
10182
  *
@@ -14032,6 +14086,8 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
14032
14086
  [K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
14033
14087
  }[Extract<keyof T, string>];
14034
14088
 
14089
+ export declare const pdfScales: readonly ["page-width", "page-fit", "0.5", "0.75", "1", "1.25", "1.5", "2", "3", "4"];
14090
+
14035
14091
  /**
14036
14092
  * Pre-loaded context shown as an empty state in the chat.
14037
14093
  * The `context` string is prepended to the user's first message