@factorialco/f0-react 1.383.2 → 1.385.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as X, jsxs as le } from "react/jsx-runtime";
2
2
  import { useInsertionEffect as Xe, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as ze, useMemo as Ye } from "react";
3
- import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-A_15tua6.js";
3
+ import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-Ddo83UfP.js";
4
4
  import { useTrackVolume as pt } from "@livekit/components-react";
5
5
  function vt(t, e, r) {
6
6
  Xe(() => t.on(e, r), [t, e, r]);
package/dist/ai.d.ts CHANGED
@@ -72,6 +72,7 @@ export declare type AiChatProviderProps = {
72
72
  threadId: string;
73
73
  feedback: string;
74
74
  }) => void;
75
+ tracking?: AiChatTrackingOptions;
75
76
  } & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
76
77
 
77
78
  /**
@@ -102,6 +103,7 @@ declare type AiChatProviderReturnValue = {
102
103
  threadId: string;
103
104
  feedback: string;
104
105
  }) => void;
106
+ tracking?: AiChatTrackingOptions;
105
107
  /**
106
108
  * Clear/reset the chat conversation
107
109
  */
@@ -168,8 +170,20 @@ declare interface AiChatState {
168
170
  threadId: string;
169
171
  feedback: string;
170
172
  }) => void;
173
+ tracking?: AiChatTrackingOptions;
171
174
  }
172
175
 
176
+ /**
177
+ * Tracking options for the AI chat
178
+ */
179
+ declare type AiChatTrackingOptions = {
180
+ onVisibility?: () => void;
181
+ onClose?: () => void;
182
+ onWelcomeSuggestionClick?: (suggestion: WelcomeScreenSuggestion) => void;
183
+ onNewChat?: () => void;
184
+ onMessage?: (message: Message) => void;
185
+ };
186
+
173
187
  /**
174
188
  * AI Chat translations type
175
189
  */
@@ -838,7 +852,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
838
852
  /**
839
853
  * @experimental This is an experimental component use it at your own risk
840
854
  */
841
- export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
855
+ export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
842
856
 
843
857
  export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, placeholders, defaultPlaceholder, autoFocus, }: F0AiChatTextAreaProps) => JSX_2.Element;
844
858
 
@@ -992,12 +1006,16 @@ export declare interface F0OneIconProps extends SVGProps<SVGSVGElement> {
992
1006
  size?: "xs" | "sm" | "md" | "lg";
993
1007
  }
994
1008
 
995
- export declare const F0OneSwitch: ({ className, disabled, tooltip, autoOpen, }: F0OneSwitchProps) => JSX_2.Element | null;
1009
+ export declare const F0OneSwitch: ({ className, disabled, onVisible, tooltip, autoOpen, onToggle, }: F0OneSwitchProps) => JSX_2.Element | null;
996
1010
 
997
1011
  /**
998
1012
  * Props for the F0OneSwitch component
999
1013
  */
1000
1014
  export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof SwitchPrimitive.Root> & {
1015
+ /** Callback when the switch is visible */
1016
+ onVisible?: () => void;
1017
+ /** Callback when the switch is toggled */
1018
+ onToggle?: () => void;
1001
1019
  /** Custom text shown in the tooltip when the chat is closed */
1002
1020
  tooltip?: {
1003
1021
  whenDisabled?: string;
@@ -1223,11 +1241,6 @@ declare module "gridstack" {
1223
1241
  }
1224
1242
 
1225
1243
 
1226
- declare namespace Calendar {
1227
- var displayName: string;
1228
- }
1229
-
1230
-
1231
1244
  declare module "@tiptap/core" {
1232
1245
  interface Commands<ReturnType> {
1233
1246
  aiBlock: {
@@ -1275,3 +1288,8 @@ declare module "@tiptap/core" {
1275
1288
  };
1276
1289
  }
1277
1290
  }
1291
+
1292
+
1293
+ declare namespace Calendar {
1294
+ var displayName: string;
1295
+ }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-A_15tua6.js";
1
+ import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-Ddo83UfP.js";
2
2
  import { defaultTranslations as R } from "./i18n-provider-defaults.js";
3
- import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-D_Flf3Fk.js";
3
+ import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-C475SHSS.js";
4
4
  export {
5
5
  e as A,
6
6
  y as AiChatTranslationsProvider,
@@ -51,6 +51,7 @@ import { JSONContent as JSONContent_2 } from '@tiptap/core';
51
51
  import { JSX as JSX_2 } from 'react';
52
52
  import { LineChartProps } from './experimental';
53
53
  import { LongTextCellValue } from './types/longText';
54
+ import { Message as Message_2 } from '@copilotkit/shared';
54
55
  import { NumberCellValue } from './types/number';
55
56
  import { NumberCellValue as NumberCellValue_2 } from './experimental';
56
57
  import { NumberFilterOptions } from './NumberFilter/NumberFilter';
@@ -430,8 +431,20 @@ declare type AiChatProviderProps = {
430
431
  threadId: string;
431
432
  feedback: string;
432
433
  }) => void;
434
+ tracking?: AiChatTrackingOptions;
433
435
  } & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
434
436
 
437
+ /**
438
+ * Tracking options for the AI chat
439
+ */
440
+ declare type AiChatTrackingOptions = {
441
+ onVisibility?: () => void;
442
+ onClose?: () => void;
443
+ onWelcomeSuggestionClick?: (suggestion: WelcomeScreenSuggestion) => void;
444
+ onNewChat?: () => void;
445
+ onMessage?: (message: Message_2) => void;
446
+ };
447
+
435
448
  /**
436
449
  * @experimental This is an experimental component use it at your own risk
437
450
  */
@@ -3233,7 +3246,6 @@ declare type F0SelectBaseProps<T extends string, R = unknown> = {
3233
3246
  onOpenChange?: (open: boolean) => void;
3234
3247
  searchEmptyMessage?: string;
3235
3248
  className?: string;
3236
- selectContentClassName?: string;
3237
3249
  actions?: Action[];
3238
3250
  /** Container element to render the portal content into */
3239
3251
  portalContainer?: HTMLElement | null;
@@ -6747,11 +6759,6 @@ declare module "gridstack" {
6747
6759
  }
6748
6760
 
6749
6761
 
6750
- declare namespace Calendar {
6751
- var displayName: string;
6752
- }
6753
-
6754
-
6755
6762
  declare module "@tiptap/core" {
6756
6763
  interface Commands<ReturnType> {
6757
6764
  aiBlock: {
@@ -6799,3 +6806,8 @@ declare module "@tiptap/core" {
6799
6806
  };
6800
6807
  }
6801
6808
  }
6809
+
6810
+
6811
+ declare namespace Calendar {
6812
+ var displayName: string;
6813
+ }