@factorialco/f0-react 1.390.2 → 1.392.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
@@ -1625,6 +1625,12 @@ export declare const createPageLayoutBlock: <Props = unknown>(displayName: strin
1625
1625
 
1626
1626
  export declare const createPageLayoutBlockGroup: <Props = unknown>(displayName: string, Component: React.ComponentType<Props>) => React.ComponentType<Props> & PageLayoutGroupComponent;
1627
1627
 
1628
+ /**
1629
+ * CSS RGB color string type
1630
+ * @example 'rgb(255, 0, 0)' or 'rgb(255,0,0)'
1631
+ */
1632
+ declare type CSSRgbString = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`;
1633
+
1628
1634
  /**
1629
1635
  * Extracts the current filters type from filter options.
1630
1636
  * Creates a type mapping filter keys to their respective value types.
@@ -2389,6 +2395,7 @@ export declare const defaultTranslations: {
2389
2395
  readonly errors: {
2390
2396
  readonly saveFailed: "Save failed";
2391
2397
  };
2398
+ readonly addRow: "Add row";
2392
2399
  };
2393
2400
  readonly itemsCount: "items";
2394
2401
  readonly emptyStates: {
@@ -2865,6 +2872,12 @@ declare type EditableTableVisualizationOptions<R extends RecordType, _Filters ex
2865
2872
  * Rejection sets an error on the edited column.
2866
2873
  */
2867
2874
  onCellChange: (updatedItem: R) => Promise<void | Record<string, string>>;
2875
+ /** When provided, renders an "Add" button row at the bottom of the table and nested rows. Receives the parent item when triggered from a nested row. Supports async functions for loading state. */
2876
+ onAddRow?: (parentItem?: R) => void | Promise<void>;
2877
+ /** Custom label for the root-level "Add row" button. Falls back to the default i18n translation. */
2878
+ addRowButtonLabel?: string;
2879
+ /** Custom label for the nested-row "Add row" button. Falls back to the default i18n translation. */
2880
+ nestedAddRowButtonLabel?: string;
2868
2881
  };
2869
2882
 
2870
2883
  declare type EditableTableVisualizationSettings = TableVisualizationSettings;
@@ -3070,6 +3083,35 @@ export declare interface F0AiCollapsibleMessageProps {
3070
3083
  */
3071
3084
  export declare const F0AiFullscreenChat: () => JSX_2.Element | null;
3072
3085
 
3086
+ export declare class F0AiMask {
3087
+ readonly element: HTMLElement;
3088
+ private canvas;
3089
+ private options;
3090
+ private running;
3091
+ private disposed;
3092
+ private startTime;
3093
+ private lastTime;
3094
+ private rafId;
3095
+ private glr;
3096
+ private observer?;
3097
+ constructor(options?: MaskOptions);
3098
+ start(): void;
3099
+ pause(): void;
3100
+ dispose(): void;
3101
+ resize(width: number, height: number, ratio?: number): void;
3102
+ /**
3103
+ * Automatically resizes the canvas to match the dimensions of the given element.
3104
+ * @note using ResizeObserver
3105
+ */
3106
+ autoResize(sourceElement: HTMLElement): void;
3107
+ fadeIn(): Promise<void>;
3108
+ fadeOut(): Promise<void>;
3109
+ private checkGLError;
3110
+ private getGLErrorName;
3111
+ private setupGL;
3112
+ private render;
3113
+ }
3114
+
3073
3115
  export declare const F0Alert: WithDataTestIdReturnType_3<({ title, description, action, link, icon, variant, }: F0AlertProps) => JSX_2.Element>;
3074
3116
 
3075
3117
  export declare interface F0AlertProps {
@@ -6270,6 +6312,62 @@ export declare interface LoadingStateProps {
6270
6312
  /** Margin tokens (spacing + auto for centering) */
6271
6313
  export declare type MarginToken = SpacingToken | "auto";
6272
6314
 
6315
+ declare type MaskOptions = {
6316
+ /**
6317
+ * The width of the Mask element.
6318
+ * @default 600
6319
+ */
6320
+ width?: number;
6321
+ /**
6322
+ * The height of the Mask element.
6323
+ * @default 600
6324
+ */
6325
+ height?: number;
6326
+ /**
6327
+ * Device pixel ratio multiplier; can be less than 1.
6328
+ */
6329
+ ratio?: number;
6330
+ /**
6331
+ * Color mode. Upon what background color will the element be displayed.
6332
+ * - dark: optimize for dark background. (clean and luminous glow. may be invisible on light backgrounds.)
6333
+ * - light: optimize for light background. (high saturation glow. not elegant on dark backgrounds.)
6334
+ * @default light
6335
+ * @note It's not possible to make a style that works well on both light and dark backgrounds.
6336
+ * @note If you do not know the background color, start with light.
6337
+ */
6338
+ mode?: "dark" | "light";
6339
+ /**
6340
+ * Color list.
6341
+ * @default ['rgb(57, 182, 255)', 'rgb(189, 69, 251)', 'rgb(255, 87, 51)', 'rgb(255, 214, 0)']
6342
+ * @note The color list must be specified with 4 colors in an array, formatted as rgb color strings.
6343
+ */
6344
+ colors?: [CSSRgbString, CSSRgbString, CSSRgbString, CSSRgbString];
6345
+ /**
6346
+ * The width of the border.
6347
+ * @default 8
6348
+ */
6349
+ borderWidth?: number;
6350
+ /**
6351
+ * The width of the glow effect.
6352
+ * @default 200
6353
+ *
6354
+ */
6355
+ glowWidth?: number;
6356
+ /**
6357
+ * The border radius.
6358
+ * @default 8
6359
+ */
6360
+ borderRadius?: number;
6361
+ /**
6362
+ * Custom class names for wrapper and canvas elements.
6363
+ */
6364
+ classNames?: string;
6365
+ /**
6366
+ * Custom styles for wrapper and canvas elements.
6367
+ */
6368
+ styles?: Partial<CSSStyleDeclaration>;
6369
+ };
6370
+
6273
6371
  declare const MAX_EXPANDED_ACTIONS = 2;
6274
6372
 
6275
6373
  declare type MentionedUser = {
@@ -8700,6 +8798,11 @@ declare module "gridstack" {
8700
8798
  }
8701
8799
 
8702
8800
 
8801
+ declare namespace Calendar {
8802
+ var displayName: string;
8803
+ }
8804
+
8805
+
8703
8806
  declare module "@tiptap/core" {
8704
8807
  interface Commands<ReturnType> {
8705
8808
  aiBlock: {
@@ -8731,10 +8834,8 @@ declare module "@tiptap/core" {
8731
8834
 
8732
8835
  declare module "@tiptap/core" {
8733
8836
  interface Commands<ReturnType> {
8734
- videoEmbed: {
8735
- setVideoEmbed: (options: {
8736
- src: string;
8737
- }) => ReturnType;
8837
+ transcript: {
8838
+ insertTranscript: (data: TranscriptData) => ReturnType;
8738
8839
  };
8739
8840
  }
8740
8841
  }
@@ -8742,13 +8843,10 @@ declare module "@tiptap/core" {
8742
8843
 
8743
8844
  declare module "@tiptap/core" {
8744
8845
  interface Commands<ReturnType> {
8745
- transcript: {
8746
- insertTranscript: (data: TranscriptData) => ReturnType;
8846
+ videoEmbed: {
8847
+ setVideoEmbed: (options: {
8848
+ src: string;
8849
+ }) => ReturnType;
8747
8850
  };
8748
8851
  }
8749
8852
  }
8750
-
8751
-
8752
- declare namespace Calendar {
8753
- var displayName: string;
8754
- }
package/dist/f0.js CHANGED
@@ -6,8 +6,8 @@ import q, { forwardRef as Ke, useRef as Y, useImperativeHandle as Xc, Children a
6
6
  import { createPortal as Ao, unstable_batchedUpdates as en, flushSync as nd } from "react-dom";
7
7
  import { L as Oo, C as id, i as Mo, S as gs, a as sd, f as Jn, b as _r, c as od, A as ad, d as tn, e as Io, E as ld, g as sn, h as cd, j as dd, k as ud, l as ir, m as Lo, u as fd, G as hd, n as md, o as vs, p as pd, q as Po, r as gd, B as Fo, X as zo, Y as hi, s as vd, t as Bo, v as yd, w as bd, x as xd, y as wd, z as _d, D as Cd, F as Ed, H as Sd, I as ys, J as kd, K as Dd, M as Nd, N as Rd, O as Td, P as Ad, Q as Od, R as Md, V as Id, T as Ld, U as mi, W as Vo, Z as Pd, _ as Fd, $ as zd, a0 as Bd, a1 as Ho, a2 as jo, a3 as Vd, a4 as $o, a5 as Wo, a6 as Hd, a7 as jd, a8 as $d, a9 as Wd } from "./DataCollectionStorageProvider-6el79_MC.js";
8
8
  import { af as cb, aa as db, ad as ub, ae as fb, ab as hb, ac as mb, ag as pb, ah as gb, ai as vb, aj as yb } from "./DataCollectionStorageProvider-6el79_MC.js";
9
- import { A as xb, F as wb, c as _b, b as Cb, a as Eb, o as Sb, u as kb } from "./F0HILActionConfirmation-B5UWkFgg.js";
10
- import { defaultTranslations as Nb } from "./i18n-provider-defaults.js";
9
+ import { A as xb, F as wb, c as _b, d as Cb, b as Eb, a as Sb, o as kb, u as Db } from "./F0HILActionConfirmation-C_1UQkak.js";
10
+ import { defaultTranslations as Rb } from "./i18n-provider-defaults.js";
11
11
  import './f0.css';const Gd = {
12
12
  xs: 1,
13
13
  sm: 2,
@@ -17682,8 +17682,9 @@ export {
17682
17682
  Uv as F0AiChatTextArea,
17683
17683
  Zv as F0AiCollapsibleMessage,
17684
17684
  qv as F0AiFullscreenChat,
17685
+ wb as F0AiMask,
17685
17686
  vv as F0Alert,
17686
- wb as F0AuraVoiceAnimation,
17687
+ _b as F0AuraVoiceAnimation,
17687
17688
  Kv as F0Avatar,
17688
17689
  Ld as F0AvatarAlert,
17689
17690
  Xv as F0AvatarCompany,
@@ -17712,7 +17713,7 @@ export {
17712
17713
  yv as F0FilterPickerContent,
17713
17714
  _v as F0Form,
17714
17715
  Dv as F0GridStack,
17715
- _b as F0HILActionConfirmation,
17716
+ Cb as F0HILActionConfirmation,
17716
17717
  Sv as F0Heading,
17717
17718
  Wr as F0Icon,
17718
17719
  fc as F0Link,
@@ -17771,8 +17772,8 @@ export {
17771
17772
  Wo as UpsellingButton,
17772
17773
  Av as UpsellingPopover,
17773
17774
  tv as VerticalBarChart,
17774
- Cb as actionItemStatuses,
17775
- Eb as aiTranslations,
17775
+ Eb as actionItemStatuses,
17776
+ Sb as aiTranslations,
17776
17777
  Wg as avatarVariants,
17777
17778
  zy as buildTranslations,
17778
17779
  dv as buttonDropdownModes,
@@ -17790,7 +17791,7 @@ export {
17790
17791
  fu as createPageLayoutBlockGroup,
17791
17792
  Mv as dataCollectionLocalStorageHandler,
17792
17793
  gv as datepickerSizes,
17793
- Nb as defaultTranslations,
17794
+ Rb as defaultTranslations,
17794
17795
  Zn as evaluateRenderIf,
17795
17796
  at as experimental,
17796
17797
  bv as f0FormField,
@@ -17809,13 +17810,13 @@ export {
17809
17810
  Ce as isZodType,
17810
17811
  hv as linkVariants,
17811
17812
  Ky as modules,
17812
- Sb as oneIconSizes,
17813
+ kb as oneIconSizes,
17813
17814
  hb as predefinedPresets,
17814
17815
  mb as selectSizes,
17815
17816
  mv as tagDotColors,
17816
17817
  dt as unwrapZodSchema,
17817
17818
  Xy as useAiChat,
17818
- kb as useAiChatTranslations,
17819
+ Db as useAiChatTranslations,
17819
17820
  Yy as useData,
17820
17821
  Jy as useDataSource,
17821
17822
  Qy as useDefaultCopilotActions,
@@ -249,6 +249,7 @@ export declare const defaultTranslations: {
249
249
  readonly errors: {
250
250
  readonly saveFailed: "Save failed";
251
251
  };
252
+ readonly addRow: "Add row";
252
253
  };
253
254
  readonly itemsCount: "items";
254
255
  readonly emptyStates: {
@@ -645,6 +646,11 @@ declare module "gridstack" {
645
646
  }
646
647
 
647
648
 
649
+ declare namespace Calendar {
650
+ var displayName: string;
651
+ }
652
+
653
+
648
654
  declare module "@tiptap/core" {
649
655
  interface Commands<ReturnType> {
650
656
  aiBlock: {
@@ -676,10 +682,8 @@ declare module "@tiptap/core" {
676
682
 
677
683
  declare module "@tiptap/core" {
678
684
  interface Commands<ReturnType> {
679
- videoEmbed: {
680
- setVideoEmbed: (options: {
681
- src: string;
682
- }) => ReturnType;
685
+ transcript: {
686
+ insertTranscript: (data: TranscriptData) => ReturnType;
683
687
  };
684
688
  }
685
689
  }
@@ -687,13 +691,10 @@ declare module "@tiptap/core" {
687
691
 
688
692
  declare module "@tiptap/core" {
689
693
  interface Commands<ReturnType> {
690
- transcript: {
691
- insertTranscript: (data: TranscriptData) => ReturnType;
694
+ videoEmbed: {
695
+ setVideoEmbed: (options: {
696
+ src: string;
697
+ }) => ReturnType;
692
698
  };
693
699
  }
694
700
  }
695
-
696
-
697
- declare namespace Calendar {
698
- var displayName: string;
699
- }
@@ -248,7 +248,8 @@ const e = {
248
248
  editableTable: {
249
249
  errors: {
250
250
  saveFailed: "Save failed"
251
- }
251
+ },
252
+ addRow: "Add row"
252
253
  },
253
254
  itemsCount: "items",
254
255
  emptyStates: {