@factorialco/f0-react 1.293.0 → 1.294.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/f0.d.ts CHANGED
@@ -109,6 +109,10 @@ declare type ActionButtonProps = ActionBaseProps & {
109
109
  onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
110
110
  };
111
111
 
112
+ declare type ActionButtonVariant = (typeof actionButtonVariants)[number];
113
+
114
+ declare const actionButtonVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai"];
115
+
112
116
  declare interface ActionCommonProps {
113
117
  /**
114
118
  * Tooltip
@@ -209,7 +213,7 @@ declare const actionSizes: readonly ["sm", "md", "lg"];
209
213
 
210
214
  declare type ActionVariant = (typeof actionVariants)[number];
211
215
 
212
- declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "link", "unstyled", "mention"];
216
+ declare const actionVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote", "ai", "link", "unstyled", "mention"];
213
217
 
214
218
  export declare type AlertAvatarProps = VariantProps<typeof alertAvatarVariants> & {
215
219
  type: (typeof alertAvatarTypes)[number];
@@ -602,7 +606,7 @@ export declare type ButtonDropdownVariant = (typeof buttonDropdownVariants)[numb
602
606
 
603
607
  export declare const buttonDropdownVariants: readonly ["default", "outline", "neutral"];
604
608
 
605
- declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "className" | "pressed" | "compact" | "variant" | "tooltip"> & DataAttributes & {
609
+ declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "className" | "pressed" | "compact" | "tooltip"> & DataAttributes & {
606
610
  /**
607
611
  * The aria-label of the button if not provided title or label will be used.
608
612
  */
@@ -610,7 +614,7 @@ declare type ButtonInternalProps = Pick<ActionProps, "size" | "disabled" | "clas
610
614
  /**
611
615
  * The variant of the button.
612
616
  */
613
- variant?: ButtonVariant;
617
+ variant?: ActionButtonVariant;
614
618
  /**
615
619
  * Callback fired when the button is clicked. Supports async functions for loading state.
616
620
  */
@@ -700,9 +704,9 @@ declare type ButtonType = (typeof buttonTypes)[number];
700
704
 
701
705
  declare const buttonTypes: readonly ["button", "submit", "reset"];
702
706
 
703
- export declare type ButtonVariant = (typeof buttonVariants)[number];
707
+ export declare type ButtonVariant = Exclude<(typeof actionButtonVariants)[number], "ai">;
704
708
 
705
- export declare const buttonVariants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote"];
709
+ export declare const buttonVariants: ("default" | "critical" | "promote" | "neutral" | "outline" | "ghost" | "outlinePromote")[];
706
710
 
707
711
  declare type CalendarMode = "single" | "range";
708
712
 
@@ -2163,7 +2167,9 @@ export declare type F0AvatarTeamProps = {
2163
2167
  badge?: AvatarBadge;
2164
2168
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
2165
2169
 
2166
- export declare const F0Button: ForwardRefExoticComponent<F0ButtonProps & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
2170
+ export declare const F0Button: ForwardRefExoticComponent<Omit<ButtonInternalProps, "style" | "className" | "variant" | "compact" | "pressed" | "append" | "noAutoTooltip" | "noTitle"> & {
2171
+ variant?: Exclude<ButtonInternalProps["variant"], "ai">;
2172
+ } & RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
2167
2173
 
2168
2174
  export declare const F0ButtonDropdown: ({ onClick, value, ...props }: F0ButtonDropdownProps) => JSX_2.Element | undefined;
2169
2175
 
@@ -2209,7 +2215,9 @@ export declare type F0ButtonDropdownProps<T = string> = {
2209
2215
  onClick: (value: T, item: ButtonDropdownItem<T>) => void;
2210
2216
  };
2211
2217
 
2212
- export declare type F0ButtonProps = Omit<ButtonInternalProps, (typeof privateProps)[number]>;
2218
+ export declare type F0ButtonProps = Omit<ButtonInternalProps, (typeof privateProps)[number] | "variant"> & {
2219
+ variant?: Exclude<ButtonInternalProps["variant"], "ai">;
2220
+ };
2213
2221
 
2214
2222
  export declare const F0ButtonToggle: ForwardRefExoticComponent<F0ButtonToggleProps & RefAttributes<HTMLButtonElement>>;
2215
2223
 
@@ -4519,6 +4527,31 @@ declare global {
4519
4527
  }
4520
4528
 
4521
4529
 
4530
+ declare module "gridstack" {
4531
+ interface GridStackWidget {
4532
+ id?: string;
4533
+ allowedSizes?: Array<{
4534
+ w: number;
4535
+ h: number;
4536
+ }>;
4537
+ renderFn?: () => React.ReactElement | null;
4538
+ meta?: Record<string, unknown>;
4539
+ }
4540
+ interface GridStackNode {
4541
+ id?: string;
4542
+ w?: number;
4543
+ h?: number;
4544
+ x?: number;
4545
+ y?: number;
4546
+ allowedSizes?: Array<{
4547
+ w: number;
4548
+ h: number;
4549
+ }>;
4550
+ renderFn?: () => React.ReactElement | null;
4551
+ }
4552
+ }
4553
+
4554
+
4522
4555
  declare module "@tiptap/core" {
4523
4556
  interface Commands<ReturnType> {
4524
4557
  aiBlock: {
@@ -4546,28 +4579,8 @@ declare module "@tiptap/core" {
4546
4579
  }
4547
4580
 
4548
4581
 
4549
- declare module "gridstack" {
4550
- interface GridStackWidget {
4551
- id?: string;
4552
- allowedSizes?: Array<{
4553
- w: number;
4554
- h: number;
4555
- }>;
4556
- renderFn?: () => React.ReactElement | null;
4557
- meta?: Record<string, unknown>;
4558
- }
4559
- interface GridStackNode {
4560
- id?: string;
4561
- w?: number;
4562
- h?: number;
4563
- x?: number;
4564
- y?: number;
4565
- allowedSizes?: Array<{
4566
- w: number;
4567
- h: number;
4568
- }>;
4569
- renderFn?: () => React.ReactElement | null;
4570
- }
4582
+ declare namespace Calendar {
4583
+ var displayName: string;
4571
4584
  }
4572
4585
 
4573
4586
 
@@ -4578,8 +4591,3 @@ declare module "@tiptap/core" {
4578
4591
  };
4579
4592
  }
4580
4593
  }
4581
-
4582
-
4583
- declare namespace Calendar {
4584
- var displayName: string;
4585
- }
package/dist/f0.js CHANGED
@@ -1,5 +1,5 @@
1
- import { S as Ge, a as Kt, f as Ce, L as J, b as Vt, A as qt, i as ae, c as tt, d as it, E as Xt, g as he, e as Yt, h as Jt, C as Zt, j as Qt, k as V, l as st, u as ei, G as ti, m as ii, n as $e, o as si, p as rt, q as ri, B as nt, X as ot, Y as ze, r as ni, s as at, t as oi, v as ai, w as li, x as hi, y as di, z as ci, D as ui, F as fi, H as Ue, I as gi, J as Z, K as Ne, M as pi, N as mi, O as vi, P as lt, Q as L, R as F, T as yi, U as bi, V as xi, W as _i, Z as wi, _ as Ei, $ as Ci, a0 as ht, a1 as Ni, a2 as de, a3 as dt, a4 as ct, a5 as Ri, a6 as ut, a7 as ft, a8 as gt, a9 as pt, aa as zi, ab as Di, ac as mt, ad as Pi, ae as Si, af as vt, ag as ki, ah as yt, ai as Oi, aj as Ai, ak as Ti, al as Li, am as Mi, an as Hi, ao as Bi, ap as Fi, aq as bt, ar as q, as as xt, at as Ii, au as Wi, av as je, aw as Gi, ax as _t, ay as $i, az as Ui, aA as ji, aB as Ki, aC as Vi, aD as qi, aE as Xi, aF as Yi, aG as Ji, aH as Zi, aI as Qi, aJ as es } from "./hooks-C7xcrcsI.js";
2
- import { bc as Fr, bp as Ir, by as Wr, aK as Gr, aL as $r, aM as Ur, aN as jr, aO as Kr, aP as Vr, aQ as qr, aR as Xr, aT as Yr, aU as Jr, aV as Zr, aW as Qr, aX as en, aY as tn, aZ as sn, bu as rn, a$ as nn, b0 as on, b3 as an, b4 as ln, b5 as hn, b6 as dn, b9 as cn, ba as un, bb as fn, be as gn, b2 as pn, bd as mn, b8 as vn, bv as yn, bo as bn, bj as xn, bm as _n, bi as wn, bz as En, bh as Cn, bg as Nn, aS as Rn, a_ as zn, b1 as Dn, b7 as Pn, bf as Sn, bk as kn, bq as On, br as An, bs as Tn, bA as Ln, bl as Mn, bt as Hn, bx as Bn, bn as Fn, bw as In } from "./hooks-C7xcrcsI.js";
1
+ import { S as Ge, a as Kt, f as Ce, L as J, b as Vt, A as qt, i as ae, c as tt, d as it, E as Xt, g as he, e as Yt, h as Jt, C as Zt, j as Qt, k as V, l as st, u as ei, G as ti, m as ii, n as $e, o as si, p as rt, q as ri, B as nt, X as ot, Y as ze, r as ni, s as at, t as oi, v as ai, w as li, x as hi, y as di, z as ci, D as ui, F as fi, H as Ue, I as gi, J as Z, K as Ne, M as pi, N as mi, O as vi, P as lt, Q as L, R as F, T as yi, U as bi, V as xi, W as _i, Z as wi, _ as Ei, $ as Ci, a0 as ht, a1 as Ni, a2 as de, a3 as dt, a4 as ct, a5 as Ri, a6 as ut, a7 as ft, a8 as gt, a9 as pt, aa as zi, ab as Di, ac as mt, ad as Pi, ae as Si, af as vt, ag as ki, ah as yt, ai as Oi, aj as Ai, ak as Ti, al as Li, am as Mi, an as Hi, ao as Bi, ap as Fi, aq as bt, ar as q, as as xt, at as Ii, au as Wi, av as je, aw as Gi, ax as _t, ay as $i, az as Ui, aA as ji, aB as Ki, aC as Vi, aD as qi, aE as Xi, aF as Yi, aG as Ji, aH as Zi, aI as Qi, aJ as es } from "./hooks-B9lijBjS.js";
2
+ import { bc as Fr, bp as Ir, by as Wr, aK as Gr, aL as $r, aM as Ur, aN as jr, aO as Kr, aP as Vr, aQ as qr, aR as Xr, aT as Yr, aU as Jr, aV as Zr, aW as Qr, aX as en, aY as tn, aZ as sn, bu as rn, a$ as nn, b0 as on, b3 as an, b4 as ln, b5 as hn, b6 as dn, b9 as cn, ba as un, bb as fn, be as gn, b2 as pn, bd as mn, b8 as vn, bv as yn, bo as bn, bj as xn, bm as _n, bi as wn, bz as En, bh as Cn, bg as Nn, aS as Rn, a_ as zn, b1 as Dn, b7 as Pn, bf as Sn, bk as kn, bq as On, br as An, bs as Tn, bA as Ln, bl as Mn, bt as Hn, bx as Bn, bn as Fn, bw as In } from "./hooks-B9lijBjS.js";
3
3
  import { jsx as g, jsxs as R, Fragment as xe } from "react/jsx-runtime";
4
4
  import * as ke from "react";
5
5
  import P, { PureComponent as ts, useState as M, forwardRef as U, createElement as Ke, useRef as Q, useImperativeHandle as wt, Children as is, createContext as _e, useContext as Et, useCallback as K, useEffect as ce, useLayoutEffect as Ve, useMemo as Ct } from "react";
@@ -839,7 +839,9 @@ const Ts = ({ value: a, max: e = 100, label: t, color: i }, s) => {
839
839
  type: "info"
840
840
  },
841
841
  Rs
842
- ), _r = Ci, wr = ht, Er = ["default", "outline", "neutral"], Cr = ht, Nr = ["sm", "md", "lg"], Rr = Ni, Se = ({ count: a, list: e }) => {
842
+ ), _r = Ci.filter(
843
+ (a) => a !== "ai"
844
+ ), wr = ht, Er = ["default", "outline", "neutral"], Cr = ht, Nr = ["sm", "md", "lg"], Rr = Ni, Se = ({ count: a, list: e }) => {
843
845
  const [t, i] = M(!1), s = g(de, {
844
846
  label: `+${a}`
845
847
  });