@factorialco/f0-react 2.22.0 → 2.23.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/{F0CanvasPanel-v9tjaOnW.js → F0CanvasPanel-CSOSmTuX.js} +39792 -51692
- package/dist/F0CanvasPanel.css +1 -1
- package/dist/ai.d.ts +143 -126
- package/dist/ai.js +42 -42
- package/dist/experimental.d.ts +69 -22
- package/dist/experimental.js +68 -68
- package/dist/f0.d.ts +143 -126
- package/dist/f0.js +2678 -2678
- package/dist/i18n-provider-defaults.d.ts +11 -11
- package/dist/styles.css +1 -1
- package/dist/useChatHistory-CUWc-i-8.js +17998 -0
- package/dist/useChatHistory.css +1 -0
- package/dist/{useDataCollectionSource-BzwXcIpi.js → useDataCollectionSource-DnYC5D7b.js} +14389 -12769
- package/package.json +1 -6
- package/dist/F0AiTableCard-BzXULBvr.js +0 -9343
package/dist/ai.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { defaultTranslations as
|
|
3
|
-
import { A as
|
|
1
|
+
import { D as e, F as r, a as t, e as i, f as o, c as n, d as F, I as C, P as A, b as l, u } from "./F0CanvasPanel-CSOSmTuX.js";
|
|
2
|
+
import { defaultTranslations as m } from "./i18n-provider-defaults.js";
|
|
3
|
+
import { A as c, C as I, h as P, s as v, t as f, w as p, m as T, j as g, q as y, x as S, p as x, r as H, k as V, e as b, g as M, l as O, F as k, i as w, a as D, n as j, o as q, b as z, f as B, v as E, c as L, d as G, u as J } from "./useChatHistory-CUWc-i-8.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
5
|
+
c as AiChatTranslationsProvider,
|
|
6
|
+
I as ChatSpinner,
|
|
7
|
+
e as DropOverlay,
|
|
8
|
+
P as F0ActionItem,
|
|
9
|
+
r as F0AiChat,
|
|
10
|
+
v as F0AiChatHeader,
|
|
11
|
+
f as F0AiChatHistory,
|
|
12
|
+
t as F0AiChatProvider,
|
|
13
|
+
p as F0AiChatTextArea,
|
|
14
|
+
T as F0AiInsightCard,
|
|
15
|
+
g as F0AiMask,
|
|
16
|
+
y as F0AiMessageSources,
|
|
17
|
+
S as F0AiMessagesContainer,
|
|
18
|
+
i as F0AiPong,
|
|
19
|
+
x as F0AiProposalCard,
|
|
20
|
+
H as F0AiTableCard,
|
|
21
|
+
V as F0AuraVoiceAnimation,
|
|
22
|
+
b as F0CanvasCard,
|
|
23
|
+
o as F0CanvasPanel,
|
|
24
|
+
M as F0ClarifyingPanel,
|
|
25
|
+
O as F0HILActionConfirmation,
|
|
26
|
+
n as F0OneIcon,
|
|
27
|
+
F as F0OneSwitch,
|
|
28
|
+
k as FormCardValueFormatterProvider,
|
|
29
|
+
C as I18nProvider,
|
|
30
|
+
A as PongBall,
|
|
31
|
+
w as actionItemStatuses,
|
|
32
|
+
D as aiTranslations,
|
|
33
|
+
j as contentTypes,
|
|
34
|
+
m as defaultTranslations,
|
|
35
|
+
q as oneIconSizes,
|
|
36
|
+
l as useAiChat,
|
|
37
|
+
z as useAiChatTranslations,
|
|
38
|
+
B as useCanvasEntity,
|
|
39
|
+
E as useChatHistory,
|
|
40
|
+
L as useFormCardValueFormatter,
|
|
41
|
+
u as useI18n,
|
|
42
|
+
G as useSetFormCardValueFormatter,
|
|
43
|
+
J as useToolCallId
|
|
44
44
|
};
|
package/dist/experimental.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AIMessage } from '@copilotkit/shared';
|
|
2
1
|
import { AlertAvatarProps as AlertAvatarProps_2 } from './F0AvatarAlert';
|
|
3
2
|
import { AlertTagCellValue } from './types/alertTag';
|
|
4
3
|
import { AlertTagCellValue as AlertTagCellValue_2 } from './experimental';
|
|
@@ -25,7 +24,6 @@ import { CompanyCellValue as CompanyCellValue_2 } from './experimental';
|
|
|
25
24
|
import { CompanyItemProps } from './types';
|
|
26
25
|
import { ComponentProps } from 'react';
|
|
27
26
|
import { CompoundCellValue } from './types/compound';
|
|
28
|
-
import { CopilotKitProps } from '@copilotkit/react-core';
|
|
29
27
|
import { CountCellValue } from './types/count';
|
|
30
28
|
import { CountryCellValue } from './types/country';
|
|
31
29
|
import { DateCellValue } from './types/date';
|
|
@@ -68,7 +66,6 @@ import { LineChartConfig } from './experimental';
|
|
|
68
66
|
import { LineChartProps } from './experimental';
|
|
69
67
|
import { LineChartPropsBase } from './utils/types';
|
|
70
68
|
import { LongTextCellValue } from './types/longText';
|
|
71
|
-
import { Message as Message_2 } from '@copilotkit/shared';
|
|
72
69
|
import { NumberCellValue } from './types/number';
|
|
73
70
|
import { NumberCellValue as NumberCellValue_2 } from './experimental';
|
|
74
71
|
import { NumberFilterOptions } from './NumberFilter/NumberFilter';
|
|
@@ -502,6 +499,11 @@ declare type AiChatFileAttachmentConfig = {
|
|
|
502
499
|
*/
|
|
503
500
|
declare type AiChatProviderProps = {
|
|
504
501
|
enabled?: boolean;
|
|
502
|
+
/**
|
|
503
|
+
* Greeting phrase(s) shown by the welcome screen when the chat is empty.
|
|
504
|
+
* A single string renders once; an array rotates through phrases. Purely
|
|
505
|
+
* UI config — does not affect runtime behavior.
|
|
506
|
+
*/
|
|
505
507
|
initialMessage?: string | string[];
|
|
506
508
|
welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
|
|
507
509
|
disclaimer?: AiChatDisclaimer;
|
|
@@ -579,31 +581,40 @@ declare type AiChatProviderProps = {
|
|
|
579
581
|
* File attachment configuration. When provided, enables file uploads in the chat.
|
|
580
582
|
*/
|
|
581
583
|
fileAttachments?: AiChatFileAttachmentConfig;
|
|
582
|
-
onThumbsUp?: (message:
|
|
584
|
+
onThumbsUp?: (message: F0AIMessage, { threadId, feedback }: {
|
|
583
585
|
threadId: string;
|
|
584
586
|
feedback: string;
|
|
585
587
|
}) => void;
|
|
586
|
-
onThumbsDown?: (message:
|
|
588
|
+
onThumbsDown?: (message: F0AIMessage, { threadId, feedback }: {
|
|
587
589
|
threadId: string;
|
|
588
590
|
feedback: string;
|
|
589
591
|
}) => void;
|
|
590
592
|
tracking?: AiChatTrackingOptions;
|
|
591
593
|
/**
|
|
592
|
-
* Optional
|
|
594
|
+
* Optional name of the AI agent. Forwarded to the host runtime adapter
|
|
595
|
+
* (mock in stories, CopilotKit in factorial) — f0 itself only stores it.
|
|
593
596
|
*/
|
|
594
|
-
|
|
597
|
+
agent?: string;
|
|
595
598
|
/**
|
|
596
|
-
*
|
|
599
|
+
* Slot elements rendered inside `<F0AiChat />`. Host apps (factorial in
|
|
600
|
+
* production, the mock runtime in stories) provide their own connected
|
|
601
|
+
* wrappers — f0 ships only the shell. Passing slots here makes them
|
|
602
|
+
* available to any `<F0AiChat />` mounted under this provider (used by
|
|
603
|
+
* `ApplicationFrame`, which renders the chat itself).
|
|
597
604
|
*/
|
|
598
|
-
|
|
599
|
-
|
|
605
|
+
chatHeader?: React.ReactNode;
|
|
606
|
+
chatMessages?: React.ReactNode;
|
|
607
|
+
chatInput?: React.ReactNode;
|
|
608
|
+
/** Children rendered inside the provider. */
|
|
609
|
+
children?: React.ReactNode;
|
|
610
|
+
};
|
|
600
611
|
|
|
601
612
|
declare type AiChatTrackingOptions = {
|
|
602
613
|
onVisibility?: () => void;
|
|
603
614
|
onClose?: () => void;
|
|
604
615
|
onWelcomeSuggestionClick?: (event: WelcomeSuggestionClickEvent) => void;
|
|
605
616
|
onNewChat?: () => void;
|
|
606
|
-
onMessage?: (message:
|
|
617
|
+
onMessage?: (message: F0Message) => void;
|
|
607
618
|
};
|
|
608
619
|
|
|
609
620
|
/**
|
|
@@ -4077,6 +4088,9 @@ export declare const F0AiBanner: ForwardRefExoticComponent<Omit<AiBannerInternal
|
|
|
4077
4088
|
|
|
4078
4089
|
export declare type F0AiBannerProps = AiBannerInternalProps;
|
|
4079
4090
|
|
|
4091
|
+
/** Assistant-flavoured `F0Message`. Same shape — alias kept for clarity. */
|
|
4092
|
+
declare type F0AIMessage = F0Message;
|
|
4093
|
+
|
|
4080
4094
|
declare const F0AvatarAlert: WithDataTestIdReturnType_5<({ type, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: AlertAvatarProps_2) => JSX_2.Element>;
|
|
4081
4095
|
|
|
4082
4096
|
declare type F0AvatarCompanyProps = {
|
|
@@ -4309,6 +4323,24 @@ declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantProps<type
|
|
|
4309
4323
|
color?: "default" | "currentColor" | `#${string}` | Lowercase<NestedKeyOf<typeof f1Colors.icon>>;
|
|
4310
4324
|
}
|
|
4311
4325
|
|
|
4326
|
+
declare type F0Message = {
|
|
4327
|
+
id: string;
|
|
4328
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
4329
|
+
content?: unknown;
|
|
4330
|
+
toolCalls?: F0ToolCall[];
|
|
4331
|
+
toolCallId?: string;
|
|
4332
|
+
createdAt?: string;
|
|
4333
|
+
generativeUI?: () => unknown;
|
|
4334
|
+
rawData?: unknown;
|
|
4335
|
+
/**
|
|
4336
|
+
* Reply quote text attached to the message by the composer. Rendered
|
|
4337
|
+
* as a block above the user bubble. Adapters (factorial / mock) own
|
|
4338
|
+
* the wire encoding; F0 only reads this structured field.
|
|
4339
|
+
*/
|
|
4340
|
+
replyQuote?: string;
|
|
4341
|
+
[key: string]: any;
|
|
4342
|
+
};
|
|
4343
|
+
|
|
4312
4344
|
/**
|
|
4313
4345
|
* @experimental This is an experimental component, use it at your own risk.
|
|
4314
4346
|
*/
|
|
@@ -4591,6 +4623,21 @@ declare interface F0TagStatusProps {
|
|
|
4591
4623
|
|
|
4592
4624
|
declare const F0TagTeam: WithDataTestIdReturnType_5<ForwardRefExoticComponent<F0TagTeamProps & RefAttributes<HTMLDivElement>>>;
|
|
4593
4625
|
|
|
4626
|
+
/**
|
|
4627
|
+
* Loose message shape used inside f0. Mirrors the CopilotKit `Message`
|
|
4628
|
+
* shape so adapters (factorial, mock runtime) can map back and forth
|
|
4629
|
+
* with no field rename, but is owned by f0 — nothing in `src/` imports
|
|
4630
|
+
* from `@copilotkit/*` anymore.
|
|
4631
|
+
*/
|
|
4632
|
+
declare type F0ToolCall = {
|
|
4633
|
+
id: string;
|
|
4634
|
+
type?: "function";
|
|
4635
|
+
function: {
|
|
4636
|
+
name: string;
|
|
4637
|
+
arguments: string;
|
|
4638
|
+
};
|
|
4639
|
+
};
|
|
4640
|
+
|
|
4594
4641
|
/**
|
|
4595
4642
|
* @experimental This is an experimental component use it at your own risk
|
|
4596
4643
|
*/
|
|
@@ -8438,6 +8485,11 @@ declare module "gridstack" {
|
|
|
8438
8485
|
}
|
|
8439
8486
|
|
|
8440
8487
|
|
|
8488
|
+
declare namespace Calendar {
|
|
8489
|
+
var displayName: string;
|
|
8490
|
+
}
|
|
8491
|
+
|
|
8492
|
+
|
|
8441
8493
|
declare module "@tiptap/core" {
|
|
8442
8494
|
interface Commands<ReturnType> {
|
|
8443
8495
|
aiBlock: {
|
|
@@ -8469,10 +8521,8 @@ declare module "@tiptap/core" {
|
|
|
8469
8521
|
|
|
8470
8522
|
declare module "@tiptap/core" {
|
|
8471
8523
|
interface Commands<ReturnType> {
|
|
8472
|
-
|
|
8473
|
-
|
|
8474
|
-
src: string;
|
|
8475
|
-
}) => ReturnType;
|
|
8524
|
+
transcript: {
|
|
8525
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
8476
8526
|
};
|
|
8477
8527
|
}
|
|
8478
8528
|
}
|
|
@@ -8480,18 +8530,15 @@ declare module "@tiptap/core" {
|
|
|
8480
8530
|
|
|
8481
8531
|
declare module "@tiptap/core" {
|
|
8482
8532
|
interface Commands<ReturnType> {
|
|
8483
|
-
|
|
8484
|
-
|
|
8533
|
+
videoEmbed: {
|
|
8534
|
+
setVideoEmbed: (options: {
|
|
8535
|
+
src: string;
|
|
8536
|
+
}) => ReturnType;
|
|
8485
8537
|
};
|
|
8486
8538
|
}
|
|
8487
8539
|
}
|
|
8488
8540
|
|
|
8489
8541
|
|
|
8490
|
-
declare namespace Calendar {
|
|
8491
|
-
var displayName: string;
|
|
8492
|
-
}
|
|
8493
|
-
|
|
8494
|
-
|
|
8495
8542
|
declare namespace F0GraphNodeWrapperInner {
|
|
8496
8543
|
var displayName: string;
|
|
8497
8544
|
}
|