@factorialco/f0-react 1.414.1 → 1.416.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/ai.js CHANGED
@@ -1,58 +1,29 @@
1
- import { I as e, u as t } from "./F0Input-C9w04Jpr.js";
2
- import { defaultTranslations as i } from "./i18n-provider-defaults.js";
3
- import { A as r, B as l, C as A, p as F, E as c, h as u, F as C, a as h, D as d, i as m, b as T, j as f, w as p, x as g, y as I, z as S, c as k, q as x, s as v, t as H, H as M, I as P, L as b, O as w, v as E, P as O, S as y, T as D, m as R, n as L, o as q, U as z, k as B, l as U, g as j, r as V, u as G, d as J, f as K, e as N } from "./F0AiChat-CBy7rZCW.js";
4
- import { A as W, F as X, c as Y, d as Z, e as _, b as $, a as aa, o as sa, u as ea } from "./F0HILActionConfirmation-BvAjbJKj.js";
1
+ import { i as t, h as i, F as e, a as n, C as o, b as r, j as A, k as c, I as u, g as F, c as h, d as C, u as l, f as I, e as f } from "./registry-BAlv1mKf.js";
2
+ import { defaultTranslations as d } from "./i18n-provider-defaults.js";
3
+ import { A as p, F as S, c as g, d as v, b as x, a as k, o as O, u as P } from "./F0HILActionConfirmation-wHMAslzT.js";
5
4
  export {
6
- r as A,
7
- W as AiChatTranslationsProvider,
8
- l as Blockquote,
9
- A as ChatSpinner,
10
- F as Em,
11
- c as EntityRef,
12
- u as F0ActionItem,
13
- C as F0AiChat,
14
- h as F0AiChatProvider,
15
- d as F0AiChatTextArea,
16
- m as F0AiCollapsibleMessage,
17
- T as F0AiFullscreenChat,
18
- X as F0AiMask,
19
- Y as F0AuraVoiceAnimation,
20
- Z as F0ChatReportCard,
21
- f as F0DataDownload,
22
- _ as F0HILActionConfirmation,
23
- p as F0MessageSources,
24
- g as F0OneIcon,
25
- I as F0OneSwitch,
26
- S as F0Thinking,
27
- k as FullscreenChatContext,
28
- x as H1,
29
- v as H2,
30
- H as H3,
31
- M as Hr,
32
- e as I18nProvider,
33
- P as Image,
34
- b as Li,
35
- w as Ol,
36
- E as P,
37
- O as Pre,
38
- y as Strong,
39
- D as Table,
40
- R as TableSimple,
41
- L as Td,
42
- q as Th,
43
- z as Ul,
44
- $ as actionItemStatuses,
45
- aa as aiTranslations,
46
- i as defaultTranslations,
47
- B as f0MarkdownRenderers,
48
- U as f0MarkdownRenderersSimple,
49
- j as getCanvasEntity,
50
- sa as oneIconSizes,
51
- V as registerCanvasEntity,
52
- G as useAiChat,
53
- ea as useAiChatTranslations,
54
- J as useDefaultCopilotActions,
55
- t as useI18n,
56
- K as useMessageSourcesAction,
57
- N as useOrchestratorThinkingAction
5
+ p as AiChatTranslationsProvider,
6
+ t as ChatSpinner,
7
+ i as F0ActionItem,
8
+ e as F0AiChat,
9
+ n as F0AiChatProvider,
10
+ o as F0AiChatTextArea,
11
+ r as F0AiFullscreenChat,
12
+ S as F0AiMask,
13
+ g as F0AuraVoiceAnimation,
14
+ v as F0HILActionConfirmation,
15
+ A as F0OneIcon,
16
+ c as F0OneSwitch,
17
+ u as I18nProvider,
18
+ x as actionItemStatuses,
19
+ k as aiTranslations,
20
+ d as defaultTranslations,
21
+ F as getCanvasEntity,
22
+ O as oneIconSizes,
23
+ h as useAiChat,
24
+ P as useAiChatTranslations,
25
+ C as useDefaultCopilotActions,
26
+ l as useI18n,
27
+ I as useMessageSourcesAction,
28
+ f as useOrchestratorThinkingAction
58
29
  };
@@ -400,6 +400,25 @@ declare type AIButton = {
400
400
  editable?: boolean;
401
401
  };
402
402
 
403
+ /**
404
+ * Credits configuration for the AI chat.
405
+ * Groups all credits-related props into a single object.
406
+ *
407
+ * When provided, a credits button is shown in the chat header.
408
+ */
409
+ declare type AiChatCredits = {
410
+ /** Async function to fetch credits usage. Called each time the popover opens. */
411
+ fetchUsage: () => Promise<CreditsUsage>;
412
+ /** URL to the plan upgrade page. When provided, a link is shown in the popover. */
413
+ upgradePlanUrl?: string;
414
+ /** Company name displayed in the popover header. */
415
+ companyName?: string;
416
+ /** Company logo URL displayed in the popover header. */
417
+ companyLogoUrl?: string;
418
+ /** Plan name displayed below the company name (e.g. "Free plan", "Enterprise"). */
419
+ planName?: string;
420
+ };
421
+
403
422
  /**
404
423
  * Disclaimer configuration for the chat input
405
424
  */
@@ -462,6 +481,11 @@ declare type AiChatProviderProps = {
462
481
  * Only one tool hint can be active at a time.
463
482
  */
464
483
  toolHints?: AiChatToolHint[];
484
+ /**
485
+ * Credits configuration. When provided, a credits button is shown in the chat header.
486
+ * Groups fetchUsage, upgradePlanUrl, and company/plan display info.
487
+ */
488
+ credits?: AiChatCredits;
465
489
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
466
490
  threadId: string;
467
491
  feedback: string;
@@ -1766,6 +1790,14 @@ declare const counterVariants: (props?: ({
1766
1790
 
1767
1791
  declare type CountryCode = keyof TranslationsType["countries"];
1768
1792
 
1793
+ /**
1794
+ * Credits usage data returned by the host app
1795
+ */
1796
+ declare type CreditsUsage = {
1797
+ used: number;
1798
+ total: number;
1799
+ };
1800
+
1769
1801
  /**
1770
1802
  * Extracts the current filters type from filter options.
1771
1803
  * Creates a type mapping filter keys to their respective value types.
@@ -2567,6 +2599,7 @@ declare const defaultTranslations: {
2567
2599
  readonly openChat: "Open Chat with One AI";
2568
2600
  readonly closeChat: "Close Chat with One AI";
2569
2601
  readonly startNewChat: "Start new chat";
2602
+ readonly settings: "Settings";
2570
2603
  readonly scrollToBottom: "Scroll to bottom";
2571
2604
  readonly welcome: "Ask or create with One";
2572
2605
  readonly defaultInitialMessage: "How can I help you today?";
@@ -2614,18 +2647,30 @@ declare const defaultTranslations: {
2614
2647
  readonly ask: "Ask One";
2615
2648
  readonly viewProfile: "View profile";
2616
2649
  readonly tools: "Tools";
2650
+ readonly credits: {
2651
+ readonly title: "Credits";
2652
+ readonly creditsLeft: "{{total}} left";
2653
+ readonly monthlyCredits: "Monthly credits";
2654
+ readonly creditsError: "Could not load credits";
2655
+ readonly upgradePlan: "Upgrade";
2656
+ readonly needMoreCredits: "Need more credits?";
2657
+ };
2617
2658
  readonly reportCard: {
2618
2659
  readonly reportLabel: "Report";
2619
2660
  readonly openButton: "Open";
2620
2661
  };
2621
2662
  readonly dataDownload: {
2622
2663
  readonly download: "Download {{format}}";
2664
+ readonly exportDashboard: "Export dashboard as {{format}}";
2665
+ readonly exporting: "Exporting...";
2623
2666
  };
2624
2667
  readonly pong: {
2625
- readonly ai: "AI";
2626
- readonly you: "YOU";
2668
+ readonly title: "Pong";
2627
2669
  readonly youWin: "You win!";
2628
2670
  readonly youLose: "You lose!";
2671
+ readonly goal: "Goal";
2672
+ readonly controls: "← → to move";
2673
+ readonly escToExit: "Esc to exit";
2629
2674
  };
2630
2675
  readonly growth: {
2631
2676
  readonly demoCard: {