@factorialco/f0-react 1.448.0 → 1.449.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/ai.d.ts CHANGED
@@ -216,6 +216,20 @@ declare type AiChatProviderReturnValue = {
216
216
  */
217
217
  sendMessage: (message: string | Message) => void;
218
218
  /* Excluded from this release type: setSendMessageFunction */
219
+ /**
220
+ * Append messages to the current conversation.
221
+ * Useful for injecting pre-built assistant responses (e.g. dashboards)
222
+ * from outside the chat. IDs are generated internally.
223
+ */
224
+ appendMessages: (messages: AppendMessage[]) => void;
225
+ /* Excluded from this release type: setAppendMessagesFunction */
226
+ /**
227
+ * Atomically clear the conversation and inject new messages.
228
+ * Starts a fresh thread without the race condition of calling
229
+ * clear() + appendMessages() separately.
230
+ */
231
+ clearAndAppend: (messages: AppendMessage[]) => void;
232
+ /* Excluded from this release type: setReplaceMessagesFunction */
219
233
  /**
220
234
  * Current width of the chat window (for resizable mode)
221
235
  */
@@ -530,6 +544,28 @@ export declare const aiTranslations: {
530
544
  };
531
545
  };
532
546
 
547
+ /**
548
+ * A message to inject via appendMessages.
549
+ * IDs are generated internally — callers only provide role, content, and
550
+ * optional tool calls.
551
+ */
552
+ export declare type AppendMessage = {
553
+ role: "user" | "assistant";
554
+ content: string;
555
+ toolCalls?: AppendToolCall[];
556
+ };
557
+
558
+ /**
559
+ * A tool call to inject via appendMessages.
560
+ * IDs are generated internally — callers only provide the function payload.
561
+ */
562
+ export declare type AppendToolCall = {
563
+ function: {
564
+ name: string;
565
+ arguments: string;
566
+ };
567
+ };
568
+
533
569
  declare type AvatarBadge = ({
534
570
  type: "module";
535
571
  module: ModuleId;
@@ -1550,6 +1586,8 @@ export declare const defaultTranslations: {
1550
1586
  readonly barChartHorizontal: "Bar (horizontal)";
1551
1587
  readonly lineChart: "Line";
1552
1588
  readonly funnel: "Funnel";
1589
+ readonly pieChart: "Pie";
1590
+ readonly table: "Table";
1553
1591
  };
1554
1592
  readonly select: {
1555
1593
  readonly noResults: "No results found";
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./F0AiChat-D1mRjixu.js";
1
+ import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./F0AiChat-DXLRzspJ.js";
2
2
  import { defaultTranslations as m } from "./i18n-provider-defaults.js";
3
- import { A as p, e as g, F as S, c as v, d as x, b as k, a as O, f as P, o as b, u as y } from "./types-DQz_EKLk.js";
3
+ import { A as p, e as g, F as S, c as v, d as x, b as k, a as O, f as P, o as b, u as y } from "./types-hferChl0.js";
4
4
  export {
5
5
  p as AiChatTranslationsProvider,
6
6
  t as ChatSpinner,
@@ -2926,6 +2926,8 @@ declare const defaultTranslations: {
2926
2926
  readonly barChartHorizontal: "Bar (horizontal)";
2927
2927
  readonly lineChart: "Line";
2928
2928
  readonly funnel: "Funnel";
2929
+ readonly pieChart: "Pie";
2930
+ readonly table: "Table";
2929
2931
  };
2930
2932
  readonly select: {
2931
2933
  readonly noResults: "No results found";
@@ -1,10 +1,10 @@
1
- import { a6 as zn, a7 as Pn, a8 as Rn, a9 as $n, aa as zt, ab as Re, ac as Bn, ad as xt, ae as ot, af as je, L as h, R as K, M as be, u as oe, ag as Wn, ah as Mn, ai as jn, aj as Vn, ak as Gn, a2 as le, al as Hn, Q as ke, am as Un, an as Kn, ao as B, ap as qn, aq as Yn, J as Oe, ar as ma, as as Jn, at as Zn, N as M, au as vt, a5 as _, av as fe, aw as Xn, ax as Qn, ay as er, az as tr, aA as ar, aB as Se, aC as ha, aD as nr, aE as ve, aF as Ee, aG as rr, aH as yt, k as pa, aI as Ce, aJ as lr, aK as ga, a3 as ae, aL as $, O as ba, aM as xa, aN as sr, aO as wt, aP as pe, a4 as ee, aQ as ir, aR as or, aS as cr, aT as dr, T as ge, aU as Ke, aV as ur, aW as fr, aX as mr, aY as hr, aZ as qe, a_ as va, a$ as pr, b0 as gr, b1 as br, b2 as Ve, b3 as xr, b4 as vr, b5 as yr, b6 as wr, b7 as Nr, b8 as Cr, b9 as Ir, ba as kr, bb as Sr, bc as Ar, bd as ya, be as wa, bf as Na, bg as ct, bh as dt, bi as Ca, bj as Lr, bk as Fr, bl as Tr, bm as _r, P as Ye, bn as Nt, bo as Ia, bp as Er, bq as ka, br as Dr, bs as Or, bt as zr, bu as Ie, bv as Pr, bw as $e, bx as Pt, by as ut, bz as Rr, bA as $r, bB as Br, X as Sa, W as Wr, bC as Aa, Y as Ct, Z as Mr, bD as jr, U as It, bE as Vr, a as Gr, c as Hr, bF as Ur, bG as La, bH as Kr, bI as qr, F as Yr, bJ as Fa, bK as Ta, bL as Jr, bM as Rt, bN as Zr, bO as Xr, bP as Qr, bQ as el, bR as _a, bS as tl, bT as al, bU as nl, bV as rl, bW as ll, bX as me, bY as kt, bZ as St, b_ as At, b$ as Ea, c0 as Lt, c1 as Da, c2 as sl, c3 as il, c4 as ol, c5 as cl, c6 as dl, c7 as ul, c8 as fl, c9 as ml, ca as hl, cb as pl, cc as gl, cd as $t, ce as Bt, cf as Wt, cg as bl, ch as xl, ci as vl, cj as yl, ck as Oa, cl as wl, cm as Nl, cn as Cl } from "./F0AiChat-D1mRjixu.js";
2
- import { cx as Ld, cw as Fd, cJ as Td, cp as _d, cq as Ed, cT as Dd, cr as Od, cv as zd, cs as Pd, cF as Rd, cG as $d, cK as Bd, cR as Wd, cS as Md, ct as jd, cz as Vd, cy as Gd, cH as Hd, co as Ud, cI as Kd, cM as qd, cN as Yd, cE as Jd, cB as Zd, cD as Xd, cA as Qd, cu as eu, cC as tu, cO as au, cP as nu, cL as ru, cQ as lu } from "./F0AiChat-D1mRjixu.js";
1
+ import { a6 as zn, a7 as Pn, a8 as Rn, a9 as $n, aa as zt, ab as Re, ac as Bn, ad as xt, ae as ot, af as je, L as h, R as K, M as be, u as oe, ag as Wn, ah as Mn, ai as jn, aj as Vn, ak as Gn, a2 as le, al as Hn, Q as ke, am as Un, an as Kn, ao as B, ap as qn, aq as Yn, J as Oe, ar as ma, as as Jn, at as Zn, N as M, au as vt, a5 as _, av as fe, aw as Xn, ax as Qn, ay as er, az as tr, aA as ar, aB as Se, aC as ha, aD as nr, aE as ve, aF as Ee, aG as rr, aH as yt, k as pa, aI as Ce, aJ as lr, aK as ga, a3 as ae, aL as $, O as ba, aM as xa, aN as sr, aO as wt, aP as pe, a4 as ee, aQ as ir, aR as or, aS as cr, aT as dr, T as ge, aU as Ke, aV as ur, aW as fr, aX as mr, aY as hr, aZ as qe, a_ as va, a$ as pr, b0 as gr, b1 as br, b2 as Ve, b3 as xr, b4 as vr, b5 as yr, b6 as wr, b7 as Nr, b8 as Cr, b9 as Ir, ba as kr, bb as Sr, bc as Ar, bd as ya, be as wa, bf as Na, bg as ct, bh as dt, bi as Ca, bj as Lr, bk as Fr, bl as Tr, bm as _r, P as Ye, bn as Nt, bo as Ia, bp as Er, bq as ka, br as Dr, bs as Or, bt as zr, bu as Ie, bv as Pr, bw as $e, bx as Pt, by as ut, bz as Rr, bA as $r, bB as Br, X as Sa, W as Wr, bC as Aa, Y as Ct, Z as Mr, bD as jr, U as It, bE as Vr, a as Gr, c as Hr, bF as Ur, bG as La, bH as Kr, bI as qr, F as Yr, bJ as Fa, bK as Ta, bL as Jr, bM as Rt, bN as Zr, bO as Xr, bP as Qr, bQ as el, bR as _a, bS as tl, bT as al, bU as nl, bV as rl, bW as ll, bX as me, bY as kt, bZ as St, b_ as At, b$ as Ea, c0 as Lt, c1 as Da, c2 as sl, c3 as il, c4 as ol, c5 as cl, c6 as dl, c7 as ul, c8 as fl, c9 as ml, ca as hl, cb as pl, cc as gl, cd as $t, ce as Bt, cf as Wt, cg as bl, ch as xl, ci as vl, cj as yl, ck as Oa, cl as wl, cm as Nl, cn as Cl } from "./F0AiChat-DXLRzspJ.js";
2
+ import { cx as Ld, cw as Fd, cJ as Td, cp as _d, cq as Ed, cT as Dd, cr as Od, cv as zd, cs as Pd, cF as Rd, cG as $d, cK as Bd, cR as Wd, cS as Md, ct as jd, cz as Vd, cy as Gd, cH as Hd, co as Ud, cI as Kd, cM as qd, cN as Yd, cE as Jd, cB as Zd, cD as Xd, cA as Qd, cu as eu, cC as tu, cO as au, cP as nu, cL as ru, cQ as lu } from "./F0AiChat-DXLRzspJ.js";
3
3
  import { jsx as e, jsxs as o, Fragment as U } from "react/jsx-runtime";
4
4
  import * as De from "react";
5
5
  import re, { forwardRef as E, useRef as G, useTransition as Il, useState as T, useLayoutEffect as za, useContext as Je, createContext as Ft, useCallback as Q, useMemo as q, useEffect as j, useId as kl, memo as Pa, Fragment as Sl, isValidElement as Al, cloneElement as Ra, Children as $a } from "react";
6
- import { C as Ll, P as Fl, g as Ba, c as Tl, a as Wa, F as ft, f as _l, b as El, u as Ma, A as Dl, B as Ol, L as zl, d as Pl, V as Rl, e as $l, h as Mt, i as Bl, j as Wl } from "./index-Dx1UjDSr.js";
7
- import { m as iu, n as ou, k as cu, v as du, o as uu, t as fu, E as mu, l as hu, y as pu, M as gu, I as bu, z as xu, p as vu, G as yu, H as wu, N as Nu, J as Cu, q as Iu, s as ku, R as Su, x as Au, K as Lu, S as Fu, T as Tu, r as _u, _ as Eu, D as Du, w as Ou } from "./index-Dx1UjDSr.js";
6
+ import { C as Ll, P as Fl, g as Ba, c as Tl, a as Wa, F as ft, f as _l, b as El, u as Ma, A as Dl, B as Ol, L as zl, d as Pl, V as Rl, e as $l, h as Mt, i as Bl, j as Wl } from "./index-BkJwEWAZ.js";
7
+ import { m as iu, n as ou, k as cu, v as du, o as uu, t as fu, E as mu, l as hu, y as pu, M as gu, I as bu, z as xu, p as vu, G as yu, H as wu, N as Nu, J as Cu, q as Iu, s as ku, R as Su, x as Au, K as Lu, S as Fu, T as Tu, r as _u, _ as Eu, D as Du, w as Ou } from "./index-BkJwEWAZ.js";
8
8
  const Ml = zn("Search", [
9
9
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
10
10
  ["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
package/dist/f0.d.ts CHANGED
@@ -594,6 +594,20 @@ declare type AiChatProviderReturnValue = {
594
594
  */
595
595
  sendMessage: (message: string | Message_2) => void;
596
596
  /* Excluded from this release type: setSendMessageFunction */
597
+ /**
598
+ * Append messages to the current conversation.
599
+ * Useful for injecting pre-built assistant responses (e.g. dashboards)
600
+ * from outside the chat. IDs are generated internally.
601
+ */
602
+ appendMessages: (messages: AppendMessage[]) => void;
603
+ /* Excluded from this release type: setAppendMessagesFunction */
604
+ /**
605
+ * Atomically clear the conversation and inject new messages.
606
+ * Starts a fresh thread without the race condition of calling
607
+ * clear() + appendMessages() separately.
608
+ */
609
+ clearAndAppend: (messages: AppendMessage[]) => void;
610
+ /* Excluded from this release type: setReplaceMessagesFunction */
597
611
  /**
598
612
  * Current width of the chat window (for resizable mode)
599
613
  */
@@ -956,6 +970,28 @@ declare type AnimationVariantsOptions = {
956
970
  maxDelay?: number;
957
971
  };
958
972
 
973
+ /**
974
+ * A message to inject via appendMessages.
975
+ * IDs are generated internally — callers only provide role, content, and
976
+ * optional tool calls.
977
+ */
978
+ export declare type AppendMessage = {
979
+ role: "user" | "assistant";
980
+ content: string;
981
+ toolCalls?: AppendToolCall[];
982
+ };
983
+
984
+ /**
985
+ * A tool call to inject via appendMessages.
986
+ * IDs are generated internally — callers only provide the function payload.
987
+ */
988
+ export declare type AppendToolCall = {
989
+ function: {
990
+ name: string;
991
+ arguments: string;
992
+ };
993
+ };
994
+
959
995
  export declare const AreaChart: WithDataTestIdReturnType_5<ForwardRefExoticComponent<Omit<LineChartPropsBase<LineChartConfig_2> & {
960
996
  lineType?: "step" | "linear" | "natural" | "monotoneX";
961
997
  marginTop?: number;
@@ -3977,6 +4013,8 @@ export declare const defaultTranslations: {
3977
4013
  readonly barChartHorizontal: "Bar (horizontal)";
3978
4014
  readonly lineChart: "Line";
3979
4015
  readonly funnel: "Funnel";
4016
+ readonly pieChart: "Pie";
4017
+ readonly table: "Table";
3980
4018
  };
3981
4019
  readonly select: {
3982
4020
  readonly noResults: "No results found";
@@ -5440,6 +5478,11 @@ declare type F0ButtonToggleInternalProps = {
5440
5478
  * Whether to show a border around the button toggle.
5441
5479
  */
5442
5480
  withBorder?: boolean;
5481
+ /**
5482
+ * @private
5483
+ * Additional CSS class names to apply to the button root.
5484
+ */
5485
+ className?: string;
5443
5486
  } & ({
5444
5487
  selected: boolean;
5445
5488
  onSelectedChange: (selected: boolean) => void;
package/dist/f0.js CHANGED
@@ -1,13 +1,13 @@
1
- import { cU as Xa, a3 as Pe, bX as yr, L as X, M as fn, cV as Ya, R as Rn, cW as Jd, aP as Ro, cX as eu, a4 as Ja, a5 as $e, u as De, ao as ze, cY as br, Q as tu, a9 as nu, J as el, cZ as jr, aL as St, aI as Ti, c_ as ru, c$ as su, d0 as iu, d1 as Ao, Z as ou, d2 as au, d3 as tl, d4 as lu, ba as Ri, bb as Ai, a2 as xr, bc as Fi, aU as nl, cJ as Hr, d5 as rl, d6 as cu, d7 as du, d8 as uu, aQ as fu, d9 as Oi, da as Fo, bE as hu, db as mu, dc as pu, dd as gu, az as sl, cp as oi, N as Be, aG as il, aH as ar, de as lr, df as ol, cr as Ii, dg as vu, dh as yu, aB as wr, di as Li, cs as al, b2 as Dn, ct as ll, dj as bu, dk as Mi, bw as xu, dl as cl, dm as dl, O as Tt, aZ as wu, dn as ai, dp as ul, dq as _u, dr as fl, bP as An, ds as vs, dt as Cu, du as Su, aF as Pi, cg as ku, dv as Nu, aO as ys, dw as hl, dx as Eu, dy as Du, dz as Tu, dA as Ru, j as Au, dB as Fu, an as ml, dC as wn, dD as pl, dE as gl, dF as Wr, cj as vl, ap as zi, aq as Bi, dG as Vi, at as $i, ay as pt, dH as ji, aA as Fn, dI as Yn, dJ as Jn, as as er, dK as tr, dL as Ou, dM as Tr, dN as yl, bA as qr, dO as ft, dP as bl, bR as bs, dQ as xl, bM as Hi, bS as Wi, b9 as Iu, cl as wl, dR as Lu, dS as Mu, dT as Pu, bo as _l, bu as zu, dU as Bu, dV as Vu, dW as $u, dX as Cl, bY as ju, c0 as Hu, c7 as Wu, dY as Sl, dZ as qu, d_ as Uu, d$ as Zu, e0 as Gu, I as Qu, e1 as Ku, e2 as Xu, e3 as Yu, e4 as Ju, bF as ef, e5 as tf } from "./F0AiChat-D1mRjixu.js";
2
- import { er as sw, e9 as iw, i as ow, eD as aw, bn as lw, h as cw, F as dw, a as uw, C as fw, b as hw, bQ as mw, c9 as pw, X as gw, ca as vw, bh as yw, U as bw, T as xw, W as ww, b0 as _w, eg as Cw, ek as Sw, e7 as kw, el as Nw, eH as Ew, k as Dw, Y as Tw, en as Rw, bC as Aw, bD as Fw, ep as Ow, eq as Iw, cT as Lw, ea as Mw, es as Pw, eb as zw, ec as Bw, ed as Vw, cF as $w, cG as jw, e6 as Hw, ee as Ww, ef as qw, bt as Uw, eo as Zw, cH as Gw, co as Qw, eI as Kw, eh as Xw, ei as Yw, ej as Jw, e8 as e0, cI as t0, eC as n0, ex as r0, eA as s0, g as i0, ew as o0, br as a0, cE as l0, cB as c0, cD as d0, cA as u0, ev as f0, eu as h0, cu as m0, cC as p0, c as g0, et as v0, ey as y0, d as b0, eE as x0, eF as w0, eG as _0, bp as C0, em as S0, ez as k0, f as N0, e as E0, P as D0, eB as T0, eJ as R0 } from "./F0AiChat-D1mRjixu.js";
1
+ import { cU as Xa, a3 as Pe, bX as yr, L as X, M as fn, cV as Ya, R as Rn, cW as Jd, aP as Ro, cX as eu, a4 as Ja, a5 as $e, u as De, ao as ze, cY as br, Q as tu, a9 as nu, J as el, cZ as jr, aL as St, aI as Ti, c_ as ru, c$ as su, d0 as iu, d1 as Ao, Z as ou, d2 as au, d3 as tl, d4 as lu, ba as Ri, bb as Ai, a2 as xr, bc as Fi, aU as nl, cJ as Hr, d5 as rl, d6 as cu, d7 as du, d8 as uu, aQ as fu, d9 as Oi, da as Fo, bE as hu, db as mu, dc as pu, dd as gu, az as sl, cp as oi, N as Be, aG as il, aH as ar, de as lr, df as ol, cr as Ii, dg as vu, dh as yu, aB as wr, di as Li, cs as al, b2 as Dn, ct as ll, dj as bu, dk as Mi, bw as xu, dl as cl, dm as dl, O as Tt, aZ as wu, dn as ai, dp as ul, dq as _u, dr as fl, bP as An, ds as vs, dt as Cu, du as Su, aF as Pi, cg as ku, dv as Nu, aO as ys, dw as hl, dx as Eu, dy as Du, dz as Tu, dA as Ru, j as Au, dB as Fu, an as ml, dC as wn, dD as pl, dE as gl, dF as Wr, cj as vl, ap as zi, aq as Bi, dG as Vi, at as $i, ay as pt, dH as ji, aA as Fn, dI as Yn, dJ as Jn, as as er, dK as tr, dL as Ou, dM as Tr, dN as yl, bA as qr, dO as ft, dP as bl, bR as bs, dQ as xl, bM as Hi, bS as Wi, b9 as Iu, cl as wl, dR as Lu, dS as Mu, dT as Pu, bo as _l, bu as zu, dU as Bu, dV as Vu, dW as $u, dX as Cl, bY as ju, c0 as Hu, c7 as Wu, dY as Sl, dZ as qu, d_ as Uu, d$ as Zu, e0 as Gu, I as Qu, e1 as Ku, e2 as Xu, e3 as Yu, e4 as Ju, bF as ef, e5 as tf } from "./F0AiChat-DXLRzspJ.js";
2
+ import { er as sw, e9 as iw, i as ow, eD as aw, bn as lw, h as cw, F as dw, a as uw, C as fw, b as hw, bQ as mw, c9 as pw, X as gw, ca as vw, bh as yw, U as bw, T as xw, W as ww, b0 as _w, eg as Cw, ek as Sw, e7 as kw, el as Nw, eH as Ew, k as Dw, Y as Tw, en as Rw, bC as Aw, bD as Fw, ep as Ow, eq as Iw, cT as Lw, ea as Mw, es as Pw, eb as zw, ec as Bw, ed as Vw, cF as $w, cG as jw, e6 as Hw, ee as Ww, ef as qw, bt as Uw, eo as Zw, cH as Gw, co as Qw, eI as Kw, eh as Xw, ei as Yw, ej as Jw, e8 as e0, cI as t0, eC as n0, ex as r0, eA as s0, g as i0, ew as o0, br as a0, cE as l0, cB as c0, cD as d0, cA as u0, ev as f0, eu as h0, cu as m0, cC as p0, c as g0, et as v0, ey as y0, d as b0, eE as x0, eF as w0, eG as _0, bp as C0, em as S0, ez as k0, f as N0, e as E0, P as D0, eB as T0, eJ as R0 } from "./F0AiChat-DXLRzspJ.js";
3
3
  import { jsx as c, jsxs as D, Fragment as Qe } from "react/jsx-runtime";
4
4
  import * as Rt from "react";
5
5
  import fe, { forwardRef as vt, useRef as Z, useImperativeHandle as nf, Children as Ur, createContext as ct, useContext as Je, useState as ee, useMemo as H, useEffect as re, useCallback as B, useLayoutEffect as li, createElement as Rr, isValidElement as kl, Fragment as Nl, memo as El, useReducer as rf, cloneElement as sf, useId as xs } from "react";
6
- import { g as of, h as af } from "./types-DQz_EKLk.js";
7
- import { A as F0, e as O0, F as I0, c as L0, d as M0, b as P0, a as z0, f as B0, o as V0, u as $0 } from "./types-DQz_EKLk.js";
6
+ import { g as of, h as af } from "./types-hferChl0.js";
7
+ import { A as F0, e as O0, F as I0, c as L0, d as M0, b as P0, a as z0, f as B0, o as V0, u as $0 } from "./types-hferChl0.js";
8
8
  import { createPortal as Dl, unstable_batchedUpdates as Ar, flushSync as lf } from "react-dom";
9
- import { C as cf, v as Tl, K as df, T as uf, S as Rl, y as qi, O as Ui, E as ff, $ as hf, Q as mf, U as pf, x as Al, k as gf, W as vf } from "./index-Dx1UjDSr.js";
10
- import { m as H0, n as W0, o as q0, t as U0, F as Z0, M as G0, p as Q0, G as K0, H as X0, N as Y0, J as J0, q as e_, P as t_, s as n_, R as r_, r as s_, _ as i_, D as o_, w as a_, u as l_ } from "./index-Dx1UjDSr.js";
9
+ import { C as cf, v as Tl, K as df, T as uf, S as Rl, y as qi, O as Ui, E as ff, $ as hf, Q as mf, U as pf, x as Al, k as gf, W as vf } from "./index-BkJwEWAZ.js";
10
+ import { m as H0, n as W0, o as q0, t as U0, F as Z0, M as G0, p as Q0, G as K0, H as X0, N as Y0, J as J0, q as e_, P as t_, s as n_, R as r_, r as s_, _ as i_, D as o_, w as a_, u as l_ } from "./index-BkJwEWAZ.js";
11
11
  import { defaultTranslations as d_ } from "./i18n-provider-defaults.js";
12
12
  import './f0.css';const yf = {
13
13
  xs: 1,
@@ -498,6 +498,8 @@ export declare const defaultTranslations: {
498
498
  readonly barChartHorizontal: "Bar (horizontal)";
499
499
  readonly lineChart: "Line";
500
500
  readonly funnel: "Funnel";
501
+ readonly pieChart: "Pie";
502
+ readonly table: "Table";
501
503
  };
502
504
  readonly select: {
503
505
  readonly noResults: "No results found";
@@ -100,7 +100,7 @@ const e = {
100
100
  jo: "Jordan",
101
101
  jp: "Japan",
102
102
  ke: "Kenya"
103
- }, t = {
103
+ }, a = {
104
104
  countries: e,
105
105
  approvals: {
106
106
  history: "Approval history",
@@ -497,7 +497,9 @@ const e = {
497
497
  barChartVertical: "Bar (vertical)",
498
498
  barChartHorizontal: "Bar (horizontal)",
499
499
  lineChart: "Line",
500
- funnel: "Funnel"
500
+ funnel: "Funnel",
501
+ pieChart: "Pie",
502
+ table: "Table"
501
503
  },
502
504
  select: {
503
505
  noResults: "No results found",
@@ -714,5 +716,5 @@ const e = {
714
716
  }
715
717
  };
716
718
  export {
717
- t as defaultTranslations
719
+ a as defaultTranslations
718
720
  };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as C, jsx as g, Fragment as xt } from "react/jsx-runtime";
2
2
  import * as De from "react";
3
3
  import N, { useRef as we, useState as Q, useCallback as Fe, useEffect as He, useLayoutEffect as _d, PureComponent as to, useMemo as Ir, createContext as cp, useContext as up, forwardRef as un, useId as hp, useDebugValue as w0, createRef as M3, memo as x0, createElement as O3, version as l1, Fragment as Mu, useImperativeHandle as za } from "react";
4
- import { J as Cn, aD as N3, L as q, au as _0, dp as D3, dn as P3, M as pp, a3 as _t, aL as Jr, eK as gs, eL as R3, eM as L3, eN as I3, eO as f1, eP as d1, eQ as c1, eR as u1, eS as h1, eT as S0, eU as Fl, eV as F3, eW as $3, eX as B3, aT as Ts, eY as Bt, eZ as Oe, e_ as Jt, e$ as C0, f0 as j3, f1 as E0, dB as mp, f2 as z3, f3 as Tt, f4 as Sd, f5 as tt, f6 as A0, f7 as Cd, f8 as yp, f9 as gp, fa as vp, fb as wt, fc as Kt, fd as Ou, fe as Ed, ff as H3, fg as $t, cW as Ad, fh as qt, fi as Yr, fj as bp, fk as Td, fl as $l, fm as Md, cb as kp, fn as V3, fo as cl, fp as sf, fq as W3, fr as q3, fs as U3, ft as K3, fu as G3, fv as J3, fw as T0, fx as M0, fy as O0, fz as N0, fA as D0, fB as Y3, fC as of, fD as X3, fE as Q3, fF as Ha, fG as ir, a0 as xi, fH as wp, fI as Va, fJ as P0, a1 as R0, fK as Z3, fL as e4, _ as t4, fM as n4, $ as i4, fN as ut, fO as Nt, ag as r4, ah as s4, ai as o4, al as a4, fP as L0, fQ as I0, bE as af, bX as ei, u as Rt, P as F0, bw as $0, R as ze, ca as l4, dh as f4, bh as d4, bQ as xp, ao as ct, O as Od, bo as c4, N as me, aB as no, d7 as u4, cA as It, ap as h4, aq as p4, cZ as B0, at as m4, aA as y4, dL as g4, dM as p1, ay as m1, ct as j0, dI as v4, dJ as b4, as as k4, dK as w4, aH as Wa, Q as dn, cY as z0, aP as Nd, aZ as x4, a2 as H0, eF as _4, fR as V0, fS as y1, fT as S4, bT as C4, bU as E4, eC as A4, eD as T4, eE as M4, cq as O4, aU as _p, fU as N4, fV as D4, fW as W0, fX as io, fY as Dd, fZ as Pd, f_ as ro, ba as P4, bb as R4, f$ as q0, bc as L4, eg as Sp, dk as g1, bL as I4, g0 as F4, b1 as $4, bq as U0, g1 as B4, g2 as Nu, g3 as K0, g4 as G0, g5 as J0, g6 as j4, g7 as z4, g8 as H4, g9 as V4, ga as Y0, gb as X0, gc as Q0, dE as Z0, gd as eb, dC as tb, ge as W4, gf as nb, gg as ib, gh as rb, T as sb, gi as ob, a5 as ae, bt as q4, a4 as Cp, aK as ab, bP as Rd, bn as U4, b4 as K4, gj as G4, gk as J4, gl as Y4, gm as X4, gn as Q4, aG as lb, aI as Ld, go as Z4, gp as e_, gq as t_, c9 as Ep, cT as n_, b0 as lf, dD as i_, gr as r_, dR as s_, dS as o_, gs as a_, b6 as l_, az as f_, aN as d_, bC as c_, bu as v1, U as u_, aF as h_, aE as b1, c1 as p_, cv as fb, gt as m_, a$ as y_, dU as g_, dV as v_, gu as b_, dW as k_, gv as w_, gw as x_, c8 as k1 } from "./F0AiChat-D1mRjixu.js";
4
+ import { J as Cn, aD as N3, L as q, au as _0, dp as D3, dn as P3, M as pp, a3 as _t, aL as Jr, eK as gs, eL as R3, eM as L3, eN as I3, eO as f1, eP as d1, eQ as c1, eR as u1, eS as h1, eT as S0, eU as Fl, eV as F3, eW as $3, eX as B3, aT as Ts, eY as Bt, eZ as Oe, e_ as Jt, e$ as C0, f0 as j3, f1 as E0, dB as mp, f2 as z3, f3 as Tt, f4 as Sd, f5 as tt, f6 as A0, f7 as Cd, f8 as yp, f9 as gp, fa as vp, fb as wt, fc as Kt, fd as Ou, fe as Ed, ff as H3, fg as $t, cW as Ad, fh as qt, fi as Yr, fj as bp, fk as Td, fl as $l, fm as Md, cb as kp, fn as V3, fo as cl, fp as sf, fq as W3, fr as q3, fs as U3, ft as K3, fu as G3, fv as J3, fw as T0, fx as M0, fy as O0, fz as N0, fA as D0, fB as Y3, fC as of, fD as X3, fE as Q3, fF as Ha, fG as ir, a0 as xi, fH as wp, fI as Va, fJ as P0, a1 as R0, fK as Z3, fL as e4, _ as t4, fM as n4, $ as i4, fN as ut, fO as Nt, ag as r4, ah as s4, ai as o4, al as a4, fP as L0, fQ as I0, bE as af, bX as ei, u as Rt, P as F0, bw as $0, R as ze, ca as l4, dh as f4, bh as d4, bQ as xp, ao as ct, O as Od, bo as c4, N as me, aB as no, d7 as u4, cA as It, ap as h4, aq as p4, cZ as B0, at as m4, aA as y4, dL as g4, dM as p1, ay as m1, ct as j0, dI as v4, dJ as b4, as as k4, dK as w4, aH as Wa, Q as dn, cY as z0, aP as Nd, aZ as x4, a2 as H0, eF as _4, fR as V0, fS as y1, fT as S4, bT as C4, bU as E4, eC as A4, eD as T4, eE as M4, cq as O4, aU as _p, fU as N4, fV as D4, fW as W0, fX as io, fY as Dd, fZ as Pd, f_ as ro, ba as P4, bb as R4, f$ as q0, bc as L4, eg as Sp, dk as g1, bL as I4, g0 as F4, b1 as $4, bq as U0, g1 as B4, g2 as Nu, g3 as K0, g4 as G0, g5 as J0, g6 as j4, g7 as z4, g8 as H4, g9 as V4, ga as Y0, gb as X0, gc as Q0, dE as Z0, gd as eb, dC as tb, ge as W4, gf as nb, gg as ib, gh as rb, T as sb, gi as ob, a5 as ae, bt as q4, a4 as Cp, aK as ab, bP as Rd, bn as U4, b4 as K4, gj as G4, gk as J4, gl as Y4, gm as X4, gn as Q4, aG as lb, aI as Ld, go as Z4, gp as e_, gq as t_, c9 as Ep, cT as n_, b0 as lf, dD as i_, gr as r_, dR as s_, dS as o_, gs as a_, b6 as l_, az as f_, aN as d_, bC as c_, bu as v1, U as u_, aF as h_, aE as b1, c1 as p_, cv as fb, gt as m_, a$ as y_, dU as g_, dV as v_, gu as b_, dW as k_, gv as w_, gw as x_, c8 as k1 } from "./F0AiChat-DXLRzspJ.js";
5
5
  import Ap from "react-dom";
6
6
  import './index.css';const __ = {
7
7
  active: !0,
@@ -32681,100 +32681,90 @@ function cR(t, e, n, i) {
32681
32681
  return t;
32682
32682
  },
32683
32683
  render: () => {
32684
- let r = null, s = null, o = null;
32685
- const a = () => {
32686
- const l = window.getSelection();
32687
- if (l && l.rangeCount > 0) {
32688
- const f = l.getRangeAt(0), { startContainer: d, startOffset: c } = f;
32689
- if (d.nodeType === Node.TEXT_NODE) {
32690
- const h = (d.textContent || "").lastIndexOf("@", c);
32691
- if (h !== -1) {
32692
- const p = document.createRange();
32693
- return p.setStart(d, h), p.setEnd(d, h + 1), p.getBoundingClientRect();
32684
+ let r = null, s = null, o = null, a = null;
32685
+ const l = () => {
32686
+ const f = window.getSelection();
32687
+ if (f && f.rangeCount > 0) {
32688
+ const d = f.getRangeAt(0), { startContainer: c, startOffset: u } = d;
32689
+ if (c.nodeType === Node.TEXT_NODE) {
32690
+ const p = (c.textContent || "").lastIndexOf("@", u);
32691
+ if (p !== -1) {
32692
+ const m = document.createRange();
32693
+ return m.setStart(c, p), m.setEnd(c, p + 1), m.getBoundingClientRect();
32694
32694
  }
32695
32695
  }
32696
- return f.getBoundingClientRect();
32696
+ return d.getBoundingClientRect();
32697
32697
  }
32698
32698
  return document.body.getBoundingClientRect();
32699
32699
  };
32700
32700
  return {
32701
- onStart: (l) => {
32702
- const f = (u) => {
32703
- const { state: h } = l.editor, { from: p, to: m } = h.selection, v = h.doc.resolve(p);
32704
- let b = -1;
32705
- const w = v.parentOffset, k = v.parent.textContent || "";
32706
- for (let _ = w - 1; _ >= Math.max(0, w - 100); _--) {
32707
- const x = k[_];
32708
- if (x === "@") {
32709
- b = p - (w - _);
32710
- break;
32711
- }
32712
- if (x === " " || x === `
32713
- ` || x === " ")
32714
- break;
32715
- }
32716
- b !== -1 ? l.editor.chain().focus().deleteRange({ from: b, to: m }).run() : l.editor.chain().focus().deleteRange(l.range).run(), l.editor.chain().focus().insertContent([
32701
+ onStart: (f) => {
32702
+ a = f;
32703
+ const d = (h) => {
32704
+ if (!a) return;
32705
+ const { editor: p, range: m } = a;
32706
+ p.chain().focus().insertContentAt(m, [
32717
32707
  {
32718
32708
  type: "mention",
32719
32709
  attrs: {
32720
- id: String(u.id),
32721
- label: u.label,
32722
- image_url: u.image_url,
32723
- href: u.href
32710
+ id: String(h.id),
32711
+ label: h.label,
32712
+ image_url: h.image_url,
32713
+ href: h.href
32724
32714
  }
32725
32715
  },
32726
32716
  {
32727
32717
  type: "text",
32728
32718
  text: " "
32729
32719
  }
32730
- ]).run();
32720
+ ]).run(), p.view.dom.ownerDocument.defaultView?.getSelection()?.collapseToEnd();
32731
32721
  };
32732
32722
  r = new gm(cx, {
32733
- props: { items: l.items, command: f },
32734
- editor: l.editor
32723
+ props: { items: f.items, command: d },
32724
+ editor: f.editor
32735
32725
  });
32736
- const c = (() => {
32737
- if (l.clientRect) {
32738
- const u = l.clientRect();
32739
- if (u && u.width && u.height) return u;
32726
+ const u = (() => {
32727
+ if (f.clientRect) {
32728
+ const h = f.clientRect();
32729
+ if (h && h.width && h.height) return h;
32740
32730
  }
32741
- return a();
32731
+ return l();
32742
32732
  })();
32743
32733
  o = document.createElement("div"), document.body.appendChild(o), s = dx.createRoot(o), s.render(
32744
32734
  /* @__PURE__ */ g(
32745
32735
  $v,
32746
32736
  {
32747
32737
  content: r.element,
32748
- anchorRect: c,
32749
- editor: l.editor
32738
+ anchorRect: u,
32739
+ editor: f.editor
32750
32740
  }
32751
32741
  )
32752
- ), l.editor?.commands.focus();
32742
+ ), f.editor?.commands.focus();
32753
32743
  },
32754
- onUpdate: (l) => {
32755
- if (!r || !o || !s) return;
32756
- r.updateProps({ items: l.items });
32757
- const d = (() => {
32758
- if (l.clientRect) {
32759
- const c = l.clientRect();
32760
- if (c && c.width && c.height) return c;
32744
+ onUpdate: (f) => {
32745
+ if (a = f, !r || !o || !s) return;
32746
+ r.updateProps({ items: f.items });
32747
+ const c = (() => {
32748
+ if (f.clientRect) {
32749
+ const u = f.clientRect();
32750
+ if (u && u.width && u.height) return u;
32761
32751
  }
32762
- return a();
32752
+ return l();
32763
32753
  })();
32764
32754
  s.render(
32765
32755
  /* @__PURE__ */ g(
32766
32756
  $v,
32767
32757
  {
32768
32758
  content: r.element,
32769
- anchorRect: d,
32770
- editor: l.editor
32759
+ anchorRect: c,
32760
+ editor: f.editor
32771
32761
  }
32772
32762
  )
32773
32763
  );
32774
32764
  },
32775
- onKeyDown: (l) => r ? l.event.key === "ArrowUp" || l.event.key === "ArrowDown" ? r.ref?.onKeyDown(l) || !1 : l.event.key === "Escape" ? (s && o && (s.unmount(), o.remove()), !0) : r.ref?.onKeyDown(l) || !1 : !1,
32765
+ onKeyDown: (f) => r ? f.event.key === "ArrowUp" || f.event.key === "ArrowDown" ? r.ref?.onKeyDown(f) || !1 : f.event.key === "Escape" ? (a = null, s && o && (s.unmount(), o.remove()), !0) : r.ref?.onKeyDown(f) || !1 : !1,
32776
32766
  onExit() {
32777
- s && o && (s.unmount(), o.remove()), r?.destroy();
32767
+ a = null, s && o && (s.unmount(), o.remove()), r?.destroy();
32778
32768
  }
32779
32769
  };
32780
32770
  }
@@ -1,7 +1,7 @@
1
1
  import { defaultTranslations as rt } from "./i18n-provider-defaults.js";
2
2
  import { jsx as h, jsxs as M, Fragment as Ge } from "react/jsx-runtime";
3
3
  import { useInsertionEffect as nt, forwardRef as me, createContext as ot, useContext as it, useRef as D, useEffect as ue, useState as de, useCallback as at, useMemo as st, useId as ct, createElement as lt } from "react";
4
- import { r as ut, l as dt, m as ft, n as ht, o as ke, p as mt, q as pt, s as vt, t as gt, v as wt, w as We, x as bt, V as yt, y as Tt, z as xt, A as At, S as Et, H as Rt, B as fe, D as Ct, E as St, G as Lt, J as It, K as Ft, L as X, M as ie, N as we, O as _t, u as Nt, P as ze, Q as Pt, R as he, T as Ut, U as Mt, W as Bt, X as Ot, Y as Vt, Z as Dt, _ as Gt, $ as kt, a0 as Wt, a1 as zt, a2 as Xt, a3 as Yt, a4 as $t, a5 as oe } from "./F0AiChat-D1mRjixu.js";
4
+ import { r as ut, l as dt, m as ft, n as ht, o as ke, p as mt, q as pt, s as vt, t as gt, v as wt, w as We, x as bt, V as yt, y as Tt, z as xt, A as At, S as Et, H as Rt, B as fe, D as Ct, E as St, G as Lt, J as It, K as Ft, L as X, M as ie, N as we, O as _t, u as Nt, P as ze, Q as Pt, R as he, T as Ut, U as Mt, W as Bt, X as Ot, Y as Vt, Z as Dt, _ as Gt, $ as kt, a0 as Wt, a1 as zt, a2 as Xt, a3 as Yt, a4 as $t, a5 as oe } from "./F0AiChat-DXLRzspJ.js";
5
5
  import { useTrackVolume as qt } from "@livekit/components-react";
6
6
  function Ht(t, e, r) {
7
7
  nt(() => t.on(e, r), [t, e, r]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "1.448.0",
3
+ "version": "1.449.1",
4
4
  "private": false,
5
5
  "files": [
6
6
  "assets",