@factorialco/f0-react 1.236.3 → 1.237.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 +81 -11
- package/dist/experimental.js +9856 -9386
- package/dist/f0.js +2 -2
- package/dist/{hooks-BntTX0VH.js → hooks-dUvLXJ7v.js} +33 -33
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -117,6 +117,15 @@ export declare interface ActionItemProps {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
declare type ActionProps = {
|
|
120
|
+
buttonType: "gradient" | "internal";
|
|
121
|
+
label: string;
|
|
122
|
+
onClick: () => void;
|
|
123
|
+
isLoading: boolean;
|
|
124
|
+
buttonVariant?: ButtonVariant;
|
|
125
|
+
icon?: IconType;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
declare type ActionProps_2 = {
|
|
120
129
|
/**
|
|
121
130
|
* The label of the action
|
|
122
131
|
*/
|
|
@@ -309,6 +318,64 @@ declare interface AiChatState {
|
|
|
309
318
|
onThumbsDown?: (message: AIMessage, threadId: string) => void;
|
|
310
319
|
}
|
|
311
320
|
|
|
321
|
+
/**
|
|
322
|
+
* @experimental This is an experimental component use it at your own risk
|
|
323
|
+
*/
|
|
324
|
+
export declare const AiPromotionChat: () => JSX_2.Element | null;
|
|
325
|
+
|
|
326
|
+
export declare const AiPromotionChatProvider: ({ enabled, greeting, title, description, benefits, actions, onShow, onHide, children, }: AiPromotionChatProviderProps) => JSX_2.Element;
|
|
327
|
+
|
|
328
|
+
export declare type AiPromotionChatProviderProps = {
|
|
329
|
+
enabled?: boolean;
|
|
330
|
+
greeting?: string;
|
|
331
|
+
title?: string;
|
|
332
|
+
description?: string;
|
|
333
|
+
benefits?: {
|
|
334
|
+
noBoldText: string;
|
|
335
|
+
boldText: string;
|
|
336
|
+
}[];
|
|
337
|
+
actions?: ActionProps[];
|
|
338
|
+
onShow?: () => void;
|
|
339
|
+
onHide?: () => void;
|
|
340
|
+
children: React.ReactNode;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
declare type AiPromotionChatProviderReturnValue = {
|
|
344
|
+
enabled: boolean;
|
|
345
|
+
setEnabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
346
|
+
open: boolean;
|
|
347
|
+
setOpen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
348
|
+
shouldPlayEntranceAnimation: boolean;
|
|
349
|
+
setShouldPlayEntranceAnimation: React.Dispatch<React.SetStateAction<boolean>>;
|
|
350
|
+
/**
|
|
351
|
+
* Set the amount of minutes after which the chat will be cleared automatically
|
|
352
|
+
* Set `null` to disable auto-clearing
|
|
353
|
+
*
|
|
354
|
+
* @default 15
|
|
355
|
+
*/
|
|
356
|
+
setAutoClearMinutes: React.Dispatch<React.SetStateAction<number | null>>;
|
|
357
|
+
autoClearMinutes: number | null;
|
|
358
|
+
/**
|
|
359
|
+
* Clear/reset the chat conversation
|
|
360
|
+
*/
|
|
361
|
+
clear: () => void;
|
|
362
|
+
/* Excluded from this release type: setClearFunction */
|
|
363
|
+
} & Pick<AiPromotionChatState, "greeting" | "title" | "description" | "benefits" | "actions" | "onShow" | "onHide">;
|
|
364
|
+
|
|
365
|
+
declare interface AiPromotionChatState {
|
|
366
|
+
enabled: boolean;
|
|
367
|
+
greeting?: string;
|
|
368
|
+
title?: string;
|
|
369
|
+
description?: string;
|
|
370
|
+
benefits?: {
|
|
371
|
+
noBoldText: string;
|
|
372
|
+
boldText: string;
|
|
373
|
+
}[];
|
|
374
|
+
actions?: ActionProps[];
|
|
375
|
+
onShow?: () => void;
|
|
376
|
+
onHide?: () => void;
|
|
377
|
+
}
|
|
378
|
+
|
|
312
379
|
export declare const Alert: React_2.ForwardRefExoticComponent<Omit<React_2.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
313
380
|
variant?: "info" | "warning" | "positive" | "destructive" | undefined;
|
|
314
381
|
} & ({
|
|
@@ -370,10 +437,11 @@ declare const alertVariants: (props?: ({
|
|
|
370
437
|
className?: ClassValue;
|
|
371
438
|
})) | undefined) => string;
|
|
372
439
|
|
|
373
|
-
export declare function ApplicationFrame({ children, sidebar, banner, ai, }: ApplicationFrameProps): JSX_2.Element;
|
|
440
|
+
export declare function ApplicationFrame({ children, sidebar, banner, ai, aiPromotion, }: ApplicationFrameProps): JSX_2.Element;
|
|
374
441
|
|
|
375
442
|
export declare interface ApplicationFrameProps {
|
|
376
443
|
ai?: Omit<AiChatProviderProps, "children">;
|
|
444
|
+
aiPromotion?: Omit<AiPromotionChatProviderProps, "children">;
|
|
377
445
|
banner?: React.ReactNode;
|
|
378
446
|
sidebar: React.ReactNode;
|
|
379
447
|
children: React.ReactNode;
|
|
@@ -813,7 +881,7 @@ declare interface ButtonProps_2 extends React_2.ButtonHTMLAttributes<HTMLButtonE
|
|
|
813
881
|
|
|
814
882
|
declare type ButtonSize = (typeof sizes)[number];
|
|
815
883
|
|
|
816
|
-
declare type ButtonVariant = (typeof
|
|
884
|
+
declare type ButtonVariant = (typeof variants)[number];
|
|
817
885
|
|
|
818
886
|
declare const buttonVariants: (props?: ({
|
|
819
887
|
disabled?: boolean | undefined;
|
|
@@ -882,7 +950,7 @@ declare interface CalloutSkeletonProps {
|
|
|
882
950
|
variant?: CalloutVariant;
|
|
883
951
|
}
|
|
884
952
|
|
|
885
|
-
declare type CalloutVariant = (typeof
|
|
953
|
+
declare type CalloutVariant = (typeof variants_2)[number];
|
|
886
954
|
|
|
887
955
|
declare type CardAvatarVariant = AvatarVariant | {
|
|
888
956
|
type: "emoji";
|
|
@@ -1027,7 +1095,7 @@ declare type ChartConfig_2 = {
|
|
|
1027
1095
|
|
|
1028
1096
|
declare const ChartContainer: React_2.ForwardRefExoticComponent<Omit<ChartContainerComponentProps, "ref"> & React_2.RefAttributes<HTMLDivElement>>;
|
|
1029
1097
|
|
|
1030
|
-
declare interface ChartContainerComponentProps extends React_2.ComponentProps<"div">, VariantProps<typeof
|
|
1098
|
+
declare interface ChartContainerComponentProps extends React_2.ComponentProps<"div">, VariantProps<typeof variants_3> {
|
|
1031
1099
|
config: ChartConfig_2;
|
|
1032
1100
|
children: React_2.ComponentProps<typeof RechartsPrimitive.ResponsiveContainer>["children"];
|
|
1033
1101
|
}
|
|
@@ -1916,7 +1984,7 @@ declare type EmptyState = {
|
|
|
1916
1984
|
emoji?: string;
|
|
1917
1985
|
title: string;
|
|
1918
1986
|
description?: string;
|
|
1919
|
-
actions?:
|
|
1987
|
+
actions?: ActionProps_2[];
|
|
1920
1988
|
};
|
|
1921
1989
|
|
|
1922
1990
|
declare const emptyStatesTypes: readonly ["no-data", "no-results", "error"];
|
|
@@ -3383,7 +3451,7 @@ declare type OneEmptyStateProps = {
|
|
|
3383
3451
|
* and can include a label, click handler, optional icon, and button variant.
|
|
3384
3452
|
* @optional
|
|
3385
3453
|
*/
|
|
3386
|
-
actions?:
|
|
3454
|
+
actions?: ActionProps_2[];
|
|
3387
3455
|
} & ({
|
|
3388
3456
|
/**
|
|
3389
3457
|
* The variant of the empty state
|
|
@@ -4863,7 +4931,7 @@ declare type Type = "bar-chart" | "line-chart";
|
|
|
4863
4931
|
|
|
4864
4932
|
declare namespace Types {
|
|
4865
4933
|
export {
|
|
4866
|
-
ActionProps,
|
|
4934
|
+
ActionProps_2 as ActionProps,
|
|
4867
4935
|
OneEmptyStateProps
|
|
4868
4936
|
}
|
|
4869
4937
|
}
|
|
@@ -4872,6 +4940,8 @@ declare type URL_2 = string;
|
|
|
4872
4940
|
|
|
4873
4941
|
export declare function useAiChat(): AiChatProviderReturnValue;
|
|
4874
4942
|
|
|
4943
|
+
export declare function useAiPromotionChat(): AiPromotionChatProviderReturnValue;
|
|
4944
|
+
|
|
4875
4945
|
export declare const useDataCollectionSource: <R extends RecordType = RecordType, FiltersSchema extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>>(source: DataCollectionSourceDefinition<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, deps?: ReadonlyArray<unknown>) => DataCollectionSource<R, FiltersSchema, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
|
|
4876
4946
|
|
|
4877
4947
|
export { useForm }
|
|
@@ -4930,9 +5000,11 @@ declare type ValueDisplayVisualizationType = "table" | "card" | "list" | (string
|
|
|
4930
5000
|
|
|
4931
5001
|
declare type Variant = "neutral" | "info" | "positive" | "warning" | "critical";
|
|
4932
5002
|
|
|
4933
|
-
declare const variants: readonly ["
|
|
5003
|
+
declare const variants: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote"];
|
|
5004
|
+
|
|
5005
|
+
declare const variants_2: readonly ["ai", "critical", "positive", "info", "warning"];
|
|
4934
5006
|
|
|
4935
|
-
declare const
|
|
5007
|
+
declare const variants_3: (props?: ({
|
|
4936
5008
|
aspect?: "small" | "square" | "wide" | undefined;
|
|
4937
5009
|
} & ({
|
|
4938
5010
|
class?: ClassValue;
|
|
@@ -4942,8 +5014,6 @@ declare const variants_2: (props?: ({
|
|
|
4942
5014
|
className?: ClassValue;
|
|
4943
5015
|
})) | undefined) => string;
|
|
4944
5016
|
|
|
4945
|
-
declare const variants_3: readonly ["default", "outline", "critical", "neutral", "ghost", "promote", "outlinePromote"];
|
|
4946
|
-
|
|
4947
5017
|
export declare const VerticalBarChartWidget: ForwardRefExoticComponent<Omit<WidgetProps_2 & {
|
|
4948
5018
|
chart: VerticalBarChartProps;
|
|
4949
5019
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|