@factorialco/f0-react 6.94.0 → 6.95.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/{F0AiProcessingOverlay-CnPJe6l9.js → F0AiProcessingOverlay-D6Y6MLaK.js} +3660 -3474
- package/dist/ai.d.ts +86 -19
- package/dist/ai.js +32 -30
- package/dist/component-status.d.ts +18 -18
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +25 -18
- package/dist/f0.d.ts +86 -19
- package/dist/f0.js +30 -28
- package/dist/i18n-provider-defaults.d.ts +25 -18
- package/dist/i18n-provider-defaults.js +7 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -686,6 +686,8 @@ declare interface AiChatState {
|
|
|
686
686
|
tracking?: AiChatTrackingOptions;
|
|
687
687
|
}
|
|
688
688
|
|
|
689
|
+
export declare type AiChatTextAreaUsageLimits = Pick<F0AiChatUsageLimitsButtonProps, "usage" | "error" | "onOpenChange">;
|
|
690
|
+
|
|
689
691
|
export declare type AiChatTrackingOptions = {
|
|
690
692
|
onVisibility?: () => void;
|
|
691
693
|
onClose?: () => void;
|
|
@@ -713,6 +715,32 @@ export declare interface AiChatTranslationsProviderProps {
|
|
|
713
715
|
translations: AiChatTranslations;
|
|
714
716
|
}
|
|
715
717
|
|
|
718
|
+
/**
|
|
719
|
+
* Host-resolved numbers for `F0AiChatUsageLimitsButton`. Percentages only: the
|
|
720
|
+
* product avoids credit counts in the chat.
|
|
721
|
+
*/
|
|
722
|
+
export declare type AiChatUsageLimits = {
|
|
723
|
+
/** The viewer's own allowance, 0–100. */
|
|
724
|
+
usedPercentage: number;
|
|
725
|
+
/** Already localized, e.g. "Resets in 3h 6m". */
|
|
726
|
+
description?: string;
|
|
727
|
+
unlimited?: boolean;
|
|
728
|
+
/** Extra rows below a divider, typically for admins. */
|
|
729
|
+
sections?: AiChatUsageLimitsSection[];
|
|
730
|
+
/** Renders the "Your company" row. */
|
|
731
|
+
onSeeCompany?: () => void;
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
export declare type AiChatUsageLimitsSection = {
|
|
735
|
+
id: string;
|
|
736
|
+
/** Already localized. */
|
|
737
|
+
label: string;
|
|
738
|
+
/** Already localized, e.g. "Renews Sep 4". */
|
|
739
|
+
description?: string;
|
|
740
|
+
usedPercentage: number;
|
|
741
|
+
unlimited?: boolean;
|
|
742
|
+
};
|
|
743
|
+
|
|
716
744
|
export declare type AiInsightCardContent = {
|
|
717
745
|
content: "text";
|
|
718
746
|
} | {
|
|
@@ -816,6 +844,13 @@ export declare const aiTranslations: {
|
|
|
816
844
|
readonly upgradePlan: "Upgrade";
|
|
817
845
|
readonly needMoreCredits: "Need more credits?";
|
|
818
846
|
};
|
|
847
|
+
readonly usageLimits: {
|
|
848
|
+
readonly title: "Personal allowance";
|
|
849
|
+
readonly used: "{{percentage}}% used";
|
|
850
|
+
readonly yourCompany: "Your company";
|
|
851
|
+
readonly unlimited: "Unlimited";
|
|
852
|
+
readonly error: "Could not load usage";
|
|
853
|
+
};
|
|
819
854
|
readonly reportCard: {
|
|
820
855
|
readonly tableLabel: "Table";
|
|
821
856
|
readonly openButton: "Open";
|
|
@@ -2634,6 +2669,13 @@ export declare const defaultTranslations: {
|
|
|
2634
2669
|
readonly upgradePlan: "Upgrade";
|
|
2635
2670
|
readonly needMoreCredits: "Need more credits?";
|
|
2636
2671
|
};
|
|
2672
|
+
readonly usageLimits: {
|
|
2673
|
+
readonly title: "Personal allowance";
|
|
2674
|
+
readonly used: "{{percentage}}% used";
|
|
2675
|
+
readonly yourCompany: "Your company";
|
|
2676
|
+
readonly unlimited: "Unlimited";
|
|
2677
|
+
readonly error: "Could not load usage";
|
|
2678
|
+
};
|
|
2637
2679
|
readonly reportCard: {
|
|
2638
2680
|
readonly tableLabel: "Table";
|
|
2639
2681
|
readonly openButton: "Open";
|
|
@@ -3577,7 +3619,7 @@ export declare const F0AiChatProvider: ({ enabled, side, panelContentSide, initi
|
|
|
3577
3619
|
* coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
|
|
3578
3620
|
* provide the wiring.
|
|
3579
3621
|
*/
|
|
3580
|
-
export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, toolbarStart, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenSuggestionsPlacement, welcomeScreenSuggestionsCollapsedByDefault, welcomeScreenCards, padding, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
3622
|
+
export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, toolbarStart, onTranscribe, searchPersons, onProcessFilesRef, disclaimer, usageLimits, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenSuggestionsPlacement, welcomeScreenSuggestionsCollapsedByDefault, welcomeScreenCards, padding, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
|
|
3581
3623
|
|
|
3582
3624
|
export declare type F0AiChatTextAreaProps = {
|
|
3583
3625
|
ref: RefObject<HTMLDivElement>;
|
|
@@ -3641,6 +3683,8 @@ export declare type F0AiChatTextAreaProps = {
|
|
|
3641
3683
|
* the welcome screen of the fullscreen layout to give the footer room.
|
|
3642
3684
|
*/
|
|
3643
3685
|
disclaimer?: AiChatDisclaimer;
|
|
3686
|
+
/** Usage ring at the right end of the disclaimer row; the text then aligns left. */
|
|
3687
|
+
usageLimits?: AiChatTextAreaUsageLimits;
|
|
3644
3688
|
/**
|
|
3645
3689
|
* Optional footer (e.g. powered-by, legal copy) rendered below the
|
|
3646
3690
|
* textarea on the welcome screen.
|
|
@@ -3782,6 +3826,25 @@ export declare type F0AiChatTextAreaSubmitPayload = {
|
|
|
3782
3826
|
quote: PendingQuote | null;
|
|
3783
3827
|
};
|
|
3784
3828
|
|
|
3829
|
+
/**
|
|
3830
|
+
* Headless usage-limits popover with its ring trigger. `F0AiChatTextArea`
|
|
3831
|
+
* renders it from its `usageLimits` prop.
|
|
3832
|
+
*/
|
|
3833
|
+
export declare const F0AiChatUsageLimitsButton: ({ usage, error, onOpenChange, trigger, side, }: F0AiChatUsageLimitsButtonProps) => JSX_2.Element;
|
|
3834
|
+
|
|
3835
|
+
export declare interface F0AiChatUsageLimitsButtonProps {
|
|
3836
|
+
/** `null` while loading: empty ring, skeleton in the popover. */
|
|
3837
|
+
usage: AiChatUsageLimits | null;
|
|
3838
|
+
/** Shows an error line instead of the rows. */
|
|
3839
|
+
error?: boolean;
|
|
3840
|
+
/** Hosts refetch on open. */
|
|
3841
|
+
onOpenChange?: (open: boolean) => void;
|
|
3842
|
+
/** Custom popover trigger (asChild). Defaults to the usage ring button. */
|
|
3843
|
+
trigger?: ReactNode;
|
|
3844
|
+
/** `"top"` suits the composer row; use `"bottom"` from a header. */
|
|
3845
|
+
side?: UsageLimitsPopoverSide;
|
|
3846
|
+
}
|
|
3847
|
+
|
|
3785
3848
|
/**
|
|
3786
3849
|
* A card shown below the composer on the fullscreen welcome screen, rendered
|
|
3787
3850
|
* as an `F0CardHorizontal`. Each card owns its behavior via `onClick`, so
|
|
@@ -5616,6 +5679,10 @@ export declare type UploadedFile = {
|
|
|
5616
5679
|
mimetype: string;
|
|
5617
5680
|
};
|
|
5618
5681
|
|
|
5682
|
+
export declare type UsageLimitsPopoverSide = (typeof usageLimitsPopoverSides)[number];
|
|
5683
|
+
|
|
5684
|
+
export declare const usageLimitsPopoverSides: readonly ["top", "bottom"];
|
|
5685
|
+
|
|
5619
5686
|
/**
|
|
5620
5687
|
* Read the AiChat context. Returns an inert fallback when no provider
|
|
5621
5688
|
* is mounted — that case is intentional in `ApplicationFrame`, which
|
|
@@ -5866,10 +5933,9 @@ declare namespace Calendar {
|
|
|
5866
5933
|
|
|
5867
5934
|
declare module "@tiptap/core" {
|
|
5868
5935
|
interface Commands<ReturnType> {
|
|
5869
|
-
|
|
5870
|
-
|
|
5871
|
-
|
|
5872
|
-
outdent: () => ReturnType;
|
|
5936
|
+
aiBlock: {
|
|
5937
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
5938
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
5873
5939
|
};
|
|
5874
5940
|
}
|
|
5875
5941
|
}
|
|
@@ -5889,9 +5955,9 @@ declare module "@tiptap/core" {
|
|
|
5889
5955
|
|
|
5890
5956
|
declare module "@tiptap/core" {
|
|
5891
5957
|
interface Commands<ReturnType> {
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5958
|
+
fontSize: {
|
|
5959
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
5960
|
+
unsetFontSize: () => ReturnType;
|
|
5895
5961
|
};
|
|
5896
5962
|
}
|
|
5897
5963
|
}
|
|
@@ -5899,8 +5965,10 @@ declare module "@tiptap/core" {
|
|
|
5899
5965
|
|
|
5900
5966
|
declare module "@tiptap/core" {
|
|
5901
5967
|
interface Commands<ReturnType> {
|
|
5902
|
-
|
|
5903
|
-
|
|
5968
|
+
indent: {
|
|
5969
|
+
setIndent: (level: number) => ReturnType;
|
|
5970
|
+
unsetIndent: () => ReturnType;
|
|
5971
|
+
outdent: () => ReturnType;
|
|
5904
5972
|
};
|
|
5905
5973
|
}
|
|
5906
5974
|
}
|
|
@@ -5908,9 +5976,8 @@ declare module "@tiptap/core" {
|
|
|
5908
5976
|
|
|
5909
5977
|
declare module "@tiptap/core" {
|
|
5910
5978
|
interface Commands<ReturnType> {
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
unsetFontSize: () => ReturnType;
|
|
5979
|
+
moodTracker: {
|
|
5980
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
5914
5981
|
};
|
|
5915
5982
|
}
|
|
5916
5983
|
}
|
|
@@ -5918,8 +5985,10 @@ declare module "@tiptap/core" {
|
|
|
5918
5985
|
|
|
5919
5986
|
declare module "@tiptap/core" {
|
|
5920
5987
|
interface Commands<ReturnType> {
|
|
5921
|
-
|
|
5922
|
-
|
|
5988
|
+
videoEmbed: {
|
|
5989
|
+
setVideoEmbed: (options: {
|
|
5990
|
+
src: string;
|
|
5991
|
+
}) => ReturnType;
|
|
5923
5992
|
};
|
|
5924
5993
|
}
|
|
5925
5994
|
}
|
|
@@ -5927,10 +5996,8 @@ declare module "@tiptap/core" {
|
|
|
5927
5996
|
|
|
5928
5997
|
declare module "@tiptap/core" {
|
|
5929
5998
|
interface Commands<ReturnType> {
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
src: string;
|
|
5933
|
-
}) => ReturnType;
|
|
5999
|
+
transcript: {
|
|
6000
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
5934
6001
|
};
|
|
5935
6002
|
}
|
|
5936
6003
|
}
|
package/dist/ai.js
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as
|
|
1
|
+
import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-CRfRDRcY.js";
|
|
2
2
|
import { defaultTranslations as c } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as g, C as p, t as v, s as I, v as T, y as f, z as y, l as S, i as x, q as b, D as k, E as B, p as H, r as L, j as O, e as V, g as w, k as D, F as M, T as z, w as E, h as j, a as q, n as G, m as R, o as U, B as J, b as K, f as N, x as Q, c as W, d as X, u as Y } from "./F0AiProcessingOverlay-D6Y6MLaK.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
g as AiChatTranslationsProvider,
|
|
6
6
|
e as ChatSpinner,
|
|
7
|
-
|
|
7
|
+
p as CollapsibleGroup,
|
|
8
8
|
r as DropOverlay,
|
|
9
9
|
t as F0ActionItem,
|
|
10
10
|
i as F0AiChat,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
v as F0AiChatCreditsButton,
|
|
12
|
+
I as F0AiChatHeader,
|
|
13
|
+
T as F0AiChatHistory,
|
|
14
14
|
o as F0AiChatProvider,
|
|
15
15
|
f as F0AiChatTextArea,
|
|
16
|
-
y as
|
|
17
|
-
S as
|
|
18
|
-
x as
|
|
19
|
-
b as
|
|
16
|
+
y as F0AiChatUsageLimitsButton,
|
|
17
|
+
S as F0AiInsightCard,
|
|
18
|
+
x as F0AiMask,
|
|
19
|
+
b as F0AiMessageSources,
|
|
20
|
+
k as F0AiMessagesContainer,
|
|
20
21
|
n as F0AiPong,
|
|
21
|
-
|
|
22
|
+
B as F0AiProcessingOverlay,
|
|
22
23
|
H as F0AiProposalCard,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
L as F0AiTableCard,
|
|
25
|
+
O as F0AuraVoiceAnimation,
|
|
26
|
+
V as F0CanvasCard,
|
|
26
27
|
F as F0CanvasPanel,
|
|
27
|
-
|
|
28
|
-
|
|
28
|
+
w as F0ClarifyingPanel,
|
|
29
|
+
D as F0HILActionConfirmation,
|
|
29
30
|
C as F0OneIcon,
|
|
30
31
|
l as F0OneSwitch,
|
|
31
|
-
|
|
32
|
+
M as FormCardValueFormatterProvider,
|
|
32
33
|
A as I18nProvider,
|
|
33
34
|
d as PongBall,
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
z as ThreadItem,
|
|
36
|
+
E as ThreadListSkeleton,
|
|
36
37
|
j as actionItemStatuses,
|
|
37
38
|
q as aiTranslations,
|
|
38
|
-
|
|
39
|
+
G as contentTypes,
|
|
39
40
|
c as defaultTranslations,
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
R as markdownRenderers,
|
|
42
|
+
U as oneIconSizes,
|
|
43
|
+
J as usageLimitsPopoverSides,
|
|
42
44
|
u as useAiChat,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
K as useAiChatTranslations,
|
|
46
|
+
N as useCanvasEntity,
|
|
47
|
+
Q as useChatHistory,
|
|
48
|
+
W as useFormCardValueFormatter,
|
|
49
|
+
m as useI18n,
|
|
50
|
+
X as useSetFormCardValueFormatter,
|
|
51
|
+
Y as useToolCallId
|
|
50
52
|
};
|
|
@@ -296,10 +296,9 @@ declare namespace Calendar {
|
|
|
296
296
|
|
|
297
297
|
declare module "@tiptap/core" {
|
|
298
298
|
interface Commands<ReturnType> {
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
outdent: () => ReturnType;
|
|
299
|
+
aiBlock: {
|
|
300
|
+
insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
|
|
301
|
+
executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
|
|
303
302
|
};
|
|
304
303
|
}
|
|
305
304
|
}
|
|
@@ -319,9 +318,9 @@ declare module "@tiptap/core" {
|
|
|
319
318
|
|
|
320
319
|
declare module "@tiptap/core" {
|
|
321
320
|
interface Commands<ReturnType> {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
fontSize: {
|
|
322
|
+
setFontSize: (fontSize: string) => ReturnType;
|
|
323
|
+
unsetFontSize: () => ReturnType;
|
|
325
324
|
};
|
|
326
325
|
}
|
|
327
326
|
}
|
|
@@ -329,8 +328,10 @@ declare module "@tiptap/core" {
|
|
|
329
328
|
|
|
330
329
|
declare module "@tiptap/core" {
|
|
331
330
|
interface Commands<ReturnType> {
|
|
332
|
-
|
|
333
|
-
|
|
331
|
+
indent: {
|
|
332
|
+
setIndent: (level: number) => ReturnType;
|
|
333
|
+
unsetIndent: () => ReturnType;
|
|
334
|
+
outdent: () => ReturnType;
|
|
334
335
|
};
|
|
335
336
|
}
|
|
336
337
|
}
|
|
@@ -338,9 +339,8 @@ declare module "@tiptap/core" {
|
|
|
338
339
|
|
|
339
340
|
declare module "@tiptap/core" {
|
|
340
341
|
interface Commands<ReturnType> {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
unsetFontSize: () => ReturnType;
|
|
342
|
+
moodTracker: {
|
|
343
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
344
344
|
};
|
|
345
345
|
}
|
|
346
346
|
}
|
|
@@ -348,8 +348,10 @@ declare module "@tiptap/core" {
|
|
|
348
348
|
|
|
349
349
|
declare module "@tiptap/core" {
|
|
350
350
|
interface Commands<ReturnType> {
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
videoEmbed: {
|
|
352
|
+
setVideoEmbed: (options: {
|
|
353
|
+
src: string;
|
|
354
|
+
}) => ReturnType;
|
|
353
355
|
};
|
|
354
356
|
}
|
|
355
357
|
}
|
|
@@ -357,10 +359,8 @@ declare module "@tiptap/core" {
|
|
|
357
359
|
|
|
358
360
|
declare module "@tiptap/core" {
|
|
359
361
|
interface Commands<ReturnType> {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
src: string;
|
|
363
|
-
}) => ReturnType;
|
|
362
|
+
transcript: {
|
|
363
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
364
364
|
};
|
|
365
365
|
}
|
|
366
366
|
}
|