@factorialco/f0-react 1.214.3 → 1.216.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/experimental.d.ts +47 -6
- package/dist/experimental.js +8886 -8608
- package/dist/f0.d.ts +2 -1
- package/dist/f0.js +30 -29
- package/dist/{hooks-BD8D792R.js → hooks-D6jAJ7EH.js} +80 -80
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AIMessage } from '@copilotkit/shared';
|
|
1
2
|
import { AlertAvatarProps as AlertAvatarProps_2 } from '../../f0';
|
|
2
3
|
import { AlertTagCellValue } from './types/alertTag.tsx';
|
|
3
4
|
import { AlertTagCellValue as AlertTagCellValue_2 } from '../../value-display/types/alertTag';
|
|
@@ -255,11 +256,14 @@ declare type AIButton = {
|
|
|
255
256
|
*/
|
|
256
257
|
export declare const AiChat: () => JSX_2.Element | null;
|
|
257
258
|
|
|
258
|
-
export declare const AiChatProvider: ({ enabled, greeting, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
259
|
+
export declare const AiChatProvider: ({ enabled, greeting, initialMessage, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
|
|
259
260
|
|
|
260
261
|
export declare type AiChatProviderProps = {
|
|
261
262
|
enabled?: boolean;
|
|
262
263
|
greeting?: string;
|
|
264
|
+
initialMessage?: string | string[];
|
|
265
|
+
onThumbsUp?: (message: AIMessage) => void;
|
|
266
|
+
onThumbsDown?: (message: AIMessage) => void;
|
|
263
267
|
} & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
|
|
264
268
|
|
|
265
269
|
declare type AiChatProviderReturnValue = {
|
|
@@ -278,12 +282,19 @@ declare type AiChatProviderReturnValue = {
|
|
|
278
282
|
*/
|
|
279
283
|
setAutoClearMinutes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
280
284
|
autoClearMinutes: number | null;
|
|
285
|
+
initialMessage?: string | string[];
|
|
286
|
+
setInitialMessage: React.Dispatch<React.SetStateAction<string | string[] | undefined>>;
|
|
287
|
+
onThumbsUp?: (message: AIMessage) => void;
|
|
288
|
+
onThumbsDown?: (message: AIMessage) => void;
|
|
281
289
|
} & Pick<AiChatState, "greeting" | "agent">;
|
|
282
290
|
|
|
283
291
|
declare interface AiChatState {
|
|
284
292
|
greeting?: string;
|
|
285
293
|
enabled: boolean;
|
|
286
294
|
agent?: string;
|
|
295
|
+
initialMessage?: string | string[];
|
|
296
|
+
onThumbsUp?: (message: AIMessage) => void;
|
|
297
|
+
onThumbsDown?: (message: AIMessage) => void;
|
|
287
298
|
}
|
|
288
299
|
|
|
289
300
|
export declare const Alert: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
@@ -783,7 +794,7 @@ declare interface ButtonProps_2 extends React_2.ButtonHTMLAttributes<HTMLButtonE
|
|
|
783
794
|
|
|
784
795
|
declare type ButtonSize = (typeof sizes)[number];
|
|
785
796
|
|
|
786
|
-
declare type ButtonVariant = (typeof
|
|
797
|
+
declare type ButtonVariant = (typeof variants_3)[number];
|
|
787
798
|
|
|
788
799
|
declare const buttonVariants: (props?: ({
|
|
789
800
|
disabled?: boolean | undefined;
|
|
@@ -833,6 +844,27 @@ export declare type CalendarMode = "single" | "range";
|
|
|
833
844
|
|
|
834
845
|
export declare type CalendarView = "day" | "month" | "year" | "week" | "quarter" | "halfyear";
|
|
835
846
|
|
|
847
|
+
declare type CalloutAction = {
|
|
848
|
+
label: string;
|
|
849
|
+
onClick: () => void;
|
|
850
|
+
icon?: IconType;
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
declare interface CalloutInternalProps {
|
|
854
|
+
title: string;
|
|
855
|
+
onClose?: () => void;
|
|
856
|
+
children: React.ReactNode;
|
|
857
|
+
actions?: CalloutAction[];
|
|
858
|
+
variant: CalloutVariant;
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
declare interface CalloutSkeletonProps {
|
|
862
|
+
compact?: boolean;
|
|
863
|
+
variant?: CalloutVariant;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
declare type CalloutVariant = (typeof variants)[number];
|
|
867
|
+
|
|
836
868
|
declare type CardAvatarVariant = AvatarVariant | {
|
|
837
869
|
type: "emoji";
|
|
838
870
|
emoji: string;
|
|
@@ -976,7 +1008,7 @@ declare type ChartConfig_2 = {
|
|
|
976
1008
|
|
|
977
1009
|
declare const ChartContainer: React_2.ForwardRefExoticComponent<Omit<ChartContainerComponentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
978
1010
|
|
|
979
|
-
declare interface ChartContainerComponentProps extends React_2.ComponentProps<"div">, VariantProps<typeof
|
|
1011
|
+
declare interface ChartContainerComponentProps extends React_2.ComponentProps<"div">, VariantProps<typeof variants_2> {
|
|
980
1012
|
config: ChartConfig_2;
|
|
981
1013
|
children: React_2.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
982
1014
|
}
|
|
@@ -1727,10 +1759,11 @@ declare const defaultTranslations: {
|
|
|
1727
1759
|
readonly closeChat: "Close Chat with One AI";
|
|
1728
1760
|
readonly scrollToBottom: "Scroll to bottom";
|
|
1729
1761
|
readonly welcome: "Ask or create with One";
|
|
1730
|
-
readonly
|
|
1762
|
+
readonly defaultInitialMessage: "How can I help you today?";
|
|
1731
1763
|
readonly inputPlaceholder: "Write something here...";
|
|
1732
1764
|
readonly stopAnswerGeneration: "Stop generating";
|
|
1733
1765
|
readonly sendMessage: "Send message";
|
|
1766
|
+
readonly thoughtsGroupTitle: "Reflection";
|
|
1734
1767
|
};
|
|
1735
1768
|
readonly select: {
|
|
1736
1769
|
readonly noResults: "No results found";
|
|
@@ -2101,6 +2134,12 @@ declare interface F0ButtonToggleProps {
|
|
|
2101
2134
|
size?: "sm" | "md" | "lg";
|
|
2102
2135
|
}
|
|
2103
2136
|
|
|
2137
|
+
export declare const F0Callout: ForwardRefExoticComponent<CalloutInternalProps & RefAttributes<HTMLDivElement>> & {
|
|
2138
|
+
Skeleton: ({ compact, variant }: CalloutSkeletonProps) => JSX_2.Element;
|
|
2139
|
+
};
|
|
2140
|
+
|
|
2141
|
+
export declare type F0CalloutProps = CalloutInternalProps;
|
|
2142
|
+
|
|
2104
2143
|
export declare function F0TableOfContent(props: TOCProps): JSX_2.Element;
|
|
2105
2144
|
|
|
2106
2145
|
declare const F0TagAlert: ForwardRefExoticComponent<Props_8 & RefAttributes<HTMLDivElement>>;
|
|
@@ -4818,7 +4857,9 @@ declare type ValueDisplayVisualizationType = "table" | "card" | "list" | (string
|
|
|
4818
4857
|
|
|
4819
4858
|
declare type Variant = "neutral" | "info" | "positive" | "warning" | "critical";
|
|
4820
4859
|
|
|
4821
|
-
declare const variants:
|
|
4860
|
+
declare const variants: readonly ["ai", "critical", "positive", "info", "warning"];
|
|
4861
|
+
|
|
4862
|
+
declare const variants_2: (props?: ({
|
|
4822
4863
|
aspect?: "small" | "square" | "wide" | undefined;
|
|
4823
4864
|
} & ({
|
|
4824
4865
|
class?: ClassValue;
|
|
@@ -4828,7 +4869,7 @@ declare const variants: (props?: ({
|
|
|
4828
4869
|
className?: ClassValue;
|
|
4829
4870
|
})) | undefined) => string;
|
|
4830
4871
|
|
|
4831
|
-
declare const
|
|
4872
|
+
declare const variants_3: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote"];
|
|
4832
4873
|
|
|
4833
4874
|
export declare const VerticalBarChartWidget: ForwardRefExoticComponent<Omit<WidgetProps_2 & {
|
|
4834
4875
|
chart: VerticalBarChartProps;
|