@factorialco/f0-react 2.19.1 → 2.20.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,49 +1,44 @@
1
- import { d as o, l as r, k as e, F as t, a as n, C as i, b as d, m as C, n as F, e as l, h as m, I as u, g as h, c as A, i as D, u as c, j as v, f as I } from "./useDataCollectionSource-DTsD48r9.js";
2
- import { defaultTranslations as b } from "./i18n-provider-defaults.js";
3
- import { A as p, C as P, c as S, D as T, a as w, b as x, e as H, f as M, g as V, h as k, p as j, l as y, r as O, m as q, n as z, i as B, F as E, d as L, M as W, k as G, j as J, q as K, o as N, s as Q, u as R } from "./F0AiProposalCard-CzWoGKwm.js";
1
+ import { C as e, D as r, e as i, F as t, h as o, i as n, a as F, k as C, l, m as A, n as u, d, f as m, g as h, I as c, P as I, c as P, j as f, u as g, b as v } from "./F0CanvasPanel-ClSoMwWX.js";
2
+ import { defaultTranslations as p } from "./i18n-provider-defaults.js";
3
+ import { A as S, j as x, g as H, m as V, l as b, n as k, h as M, d as O, i as j, F as D, f as w, a as z, k as B, o as E, u as L, e as q, b as G, c as J } from "./F0AiTableCard-CJyoi39I.js";
4
4
  export {
5
- p as AiChatTranslationsProvider,
6
- o as CanvasCard,
7
- r as ChatSpinner,
8
- P as CloseCanvasButton,
9
- S as DashboardCanvasProvider,
10
- T as DashboardCard,
11
- w as DashboardContent,
12
- x as DashboardHeader,
13
- H as DataDownloadCard,
14
- M as DataDownloadContent,
15
- V as DataDownloadHeader,
16
- k as DataDownloadProvider,
17
- e as F0ActionItem,
5
+ S as AiChatTranslationsProvider,
6
+ e as ChatSpinner,
7
+ r as DropOverlay,
8
+ i as F0ActionItem,
18
9
  t as F0AiChat,
19
- n as F0AiChatProvider,
20
- i as F0AiChatTextArea,
21
- d as F0AiFullscreenChat,
22
- j as F0AiInsightCard,
23
- y as F0AiMask,
24
- O as F0AiProposalCard,
25
- q as F0AuraVoiceAnimation,
26
- z as F0HILActionConfirmation,
27
- B as F0MessageCreditsWarning,
28
- C as F0OneIcon,
29
- F as F0OneSwitch,
30
- l as FormCard,
31
- m as FormCardValueFormatterProvider,
32
- E as FormContent,
33
- L as FormHeader,
34
- u as I18nProvider,
35
- W as MessageSources,
36
- G as actionItemStatuses,
37
- J as aiTranslations,
38
- K as contentTypes,
39
- b as defaultTranslations,
40
- N as oneIconSizes,
41
- Q as savedDashboardConfigStore,
42
- h as useAiChat,
43
- R as useAiChatTranslations,
44
- A as useCanvasEntity,
45
- D as useFormCardValueFormatter,
46
- c as useI18n,
47
- v as useSetFormCardValueFormatter,
48
- I as useToolCallId
10
+ o as F0AiChatHeader,
11
+ n as F0AiChatHistory,
12
+ F as F0AiChatProvider,
13
+ C as F0AiChatTextArea,
14
+ x as F0AiInsightCard,
15
+ H as F0AiMask,
16
+ V as F0AiMessageSources,
17
+ l as F0AiMessagesContainer,
18
+ A as F0AiPong,
19
+ b as F0AiProposalCard,
20
+ k as F0AiTableCard,
21
+ M as F0AuraVoiceAnimation,
22
+ O as F0CanvasCard,
23
+ u as F0CanvasPanel,
24
+ d as F0ClarifyingPanel,
25
+ j as F0HILActionConfirmation,
26
+ m as F0OneIcon,
27
+ h as F0OneSwitch,
28
+ D as FormCardValueFormatterProvider,
29
+ c as I18nProvider,
30
+ I as PongBall,
31
+ w as actionItemStatuses,
32
+ z as aiTranslations,
33
+ B as contentTypes,
34
+ p as defaultTranslations,
35
+ E as oneIconSizes,
36
+ P as useAiChat,
37
+ L as useAiChatTranslations,
38
+ q as useCanvasEntity,
39
+ f as useChatHistory,
40
+ G as useFormCardValueFormatter,
41
+ g as useI18n,
42
+ J as useSetFormCardValueFormatter,
43
+ v as useToolCallId
49
44
  };
@@ -556,12 +556,6 @@ declare type AiChatProviderProps = {
556
556
  * them here so canvas logic lives in one place.
557
557
  */
558
558
  canvasEntities?: Record<string, CanvasEntityDefinition>;
559
- /**
560
- * Available tool hints that the user can activate to provide intent context
561
- * to the AI. Renders a selector button next to the send button.
562
- * Only one tool hint can be active at a time.
563
- */
564
- toolHints?: AiChatToolHint[];
565
559
  /**
566
560
  * Credits configuration. When provided, a credits button is shown in the chat header.
567
561
  * Groups fetchUsage, upgradePlanUrl, and company/plan display info.
@@ -605,32 +599,10 @@ declare type AiChatProviderProps = {
605
599
  runtimeFetch?: typeof fetch;
606
600
  } & Pick<CopilotKitProps, "agent" | "credentials" | "children" | "runtimeUrl" | "showDevConsole" | "threadId" | "headers">;
607
601
 
608
- /**
609
- * A tool hint that can be activated to prepend invisible context to the user's
610
- * message, telling the AI about the user's intent (e.g. "generate tables",
611
- * "data analysis"). Similar to Gemini's tool selector UI.
612
- *
613
- * Only one tool hint can be active at a time. It persists across messages
614
- * until the user explicitly removes it.
615
- */
616
- declare type AiChatToolHint = {
617
- /** Unique identifier for this tool hint */
618
- id: string;
619
- /** Display label shown in the selector and chip */
620
- label: string;
621
- /** Optional icon shown in the selector and chip */
622
- icon?: IconType;
623
- /**
624
- * Prompt text injected as invisible context before the user's message.
625
- * The AI receives this but the user never sees it in the chat.
626
- */
627
- prompt: string;
628
- };
629
-
630
602
  declare type AiChatTrackingOptions = {
631
603
  onVisibility?: () => void;
632
604
  onClose?: () => void;
633
- onWelcomeSuggestionClick?: (suggestion: WelcomeScreenSuggestion) => void;
605
+ onWelcomeSuggestionClick?: (item: WelcomeScreenSuggestionItem) => void;
634
606
  onNewChat?: () => void;
635
607
  onMessage?: (message: Message_2) => void;
636
608
  };
@@ -1454,13 +1426,7 @@ declare type CanvasContentBase = {
1454
1426
  * Contract for a canvas entity type.
1455
1427
  *
1456
1428
  * Each entity (dashboard, survey, goal, job-posting…) implements this
1457
- * interface and is added to the `canvasEntities` record in `registry.ts`.
1458
- *
1459
- * To add a new entity type:
1460
- * 1. Create a folder in `canvas/entities/<your-entity>/`
1461
- * 2. Define a type extending `CanvasContentBase` in `types.ts`
1462
- * 3. Implement and export `CanvasEntityDefinition` in `index.tsx`
1463
- * 4. Add the entity to the record in `canvas/registry.ts`
1429
+ * interface and is added to the `canvasEntities` record passed to F0AiChat.
1464
1430
  */
1465
1431
  declare type CanvasEntityDefinition<T extends CanvasContentBase = CanvasContentBase> = {
1466
1432
  /** Must match the `type` discriminant on the content object */
@@ -3186,13 +3152,6 @@ declare const defaultTranslations: {
3186
3152
  readonly thoughtsGroupTitle: "Reflection";
3187
3153
  readonly resourcesGroupTitle: "Resources";
3188
3154
  readonly thinking: "Thinking...";
3189
- readonly closeDashboard: "Close dashboard";
3190
- readonly unsavedChanges: "Unsaved changes";
3191
- readonly saveChanges: "Save changes";
3192
- readonly discardChanges: "Discard";
3193
- readonly saveAsChanges: "Save as";
3194
- readonly exportTable: "Download table";
3195
- readonly generatedTableFilename: "OneGeneratedTable";
3196
3155
  readonly feedbackModal: {
3197
3156
  readonly positive: {
3198
3157
  readonly title: "What did you like about this response?";
@@ -3205,7 +3164,6 @@ declare const defaultTranslations: {
3205
3164
  readonly placeholder: "Share what didn’t work";
3206
3165
  };
3207
3166
  };
3208
- readonly dataDownloadPreview: "Preview {{shown}} of {{total}} rows — download the Excel to see all data.";
3209
3167
  readonly expandChat: "Expand chat";
3210
3168
  readonly collapseChat: "Collapse chat";
3211
3169
  readonly chatHistory: "Chat history";
@@ -3223,7 +3181,6 @@ declare const defaultTranslations: {
3223
3181
  readonly deleteChat: "Delete chat";
3224
3182
  readonly ask: "Ask One";
3225
3183
  readonly view: "View";
3226
- readonly tools: "Tools";
3227
3184
  readonly entityRef: {
3228
3185
  readonly candidate: {
3229
3186
  readonly source: "Source";
@@ -3245,42 +3202,22 @@ declare const defaultTranslations: {
3245
3202
  readonly needMoreCredits: "Need more credits?";
3246
3203
  };
3247
3204
  readonly reportCard: {
3248
- readonly reportLabel: "Report";
3249
3205
  readonly tableLabel: "Table";
3250
3206
  readonly openButton: "Open";
3251
3207
  };
3252
3208
  readonly formCard: {
3253
3209
  readonly moreFields: "Open to see all fields";
3254
3210
  };
3255
- readonly dashboard: {
3256
- readonly save: "Save";
3257
- readonly saveToAnalytics: "Save the dashboard in Analytics";
3258
- readonly saveTableToAnalytics: "Save the table in Analytics";
3259
- readonly saveAs: "Save as";
3260
- readonly saveDialog: {
3261
- readonly title: "Save dashboard";
3262
- readonly titleLabel: "Title";
3263
- readonly descriptionLabel: "Description";
3264
- readonly descriptionPlaceholder: "Add a description (optional)";
3265
- readonly save: "Save";
3266
- readonly cancel: "Cancel";
3267
- };
3268
- readonly status: {
3269
- readonly saved: "Saved";
3270
- readonly draft: "Draft";
3271
- readonly unsaved: "Unsaved";
3272
- };
3273
- readonly statusLabel: "Status";
3274
- readonly lastEdited: "Last edited";
3275
- readonly createdBy: "Created by";
3211
+ readonly aiTable: {
3212
+ readonly title: "Table";
3213
+ readonly downloadExcel: "Download Excel";
3214
+ readonly downloadCsv: "Download CSV";
3276
3215
  };
3277
3216
  readonly dataDownload: {
3278
3217
  readonly title: "Download";
3279
3218
  readonly download: "Download {{format}}";
3280
3219
  readonly exportDashboard: "Export dashboard as {{format}}";
3281
- readonly export: "Export";
3282
3220
  readonly exporting: "Exporting…";
3283
- readonly rows: "{{amount}} rows";
3284
3221
  };
3285
3222
  readonly dashboardItem: {
3286
3223
  readonly chartType: "Chart type";
@@ -3300,11 +3237,6 @@ declare const defaultTranslations: {
3300
3237
  readonly soft: "You're running low on AI credits.";
3301
3238
  readonly getCredits: "Get credits";
3302
3239
  readonly dismiss: "Dismiss";
3303
- readonly messageBanner: {
3304
- readonly title: "This response requires credits";
3305
- readonly description: "Your company has run out of AI credits.";
3306
- readonly actionLabel: "Get credits";
3307
- };
3308
3240
  };
3309
3241
  readonly attachFile: "Attach file";
3310
3242
  readonly removeFile: "Remove";
@@ -3522,8 +3454,6 @@ declare const defaultTranslations: {
3522
3454
  };
3523
3455
  };
3524
3456
  readonly forms: {
3525
- readonly yes: "Yes";
3526
- readonly no: "No";
3527
3457
  readonly actionBar: {
3528
3458
  readonly unsavedChanges: "You have changes pending to be saved";
3529
3459
  readonly saving: "Saving...";
@@ -6482,6 +6412,7 @@ declare namespace _Page {
6482
6412
  export declare type PageAction = {
6483
6413
  label: string;
6484
6414
  icon: IconType;
6415
+ variant?: ActionButtonVariant;
6485
6416
  } & ({
6486
6417
  href: string;
6487
6418
  } | {
@@ -8279,11 +8210,23 @@ export declare const WeekStartDay: {
8279
8210
  export declare type WeekStartsOn = (typeof WeekStartDay)[keyof typeof WeekStartDay];
8280
8211
 
8281
8212
  /**
8282
- * Welcome screen suggestion item
8213
+ * A welcome-screen group rendered as an outline button in the welcome row.
8214
+ * Clicking the group opens a popover listing its `items`.
8283
8215
  */
8284
8216
  declare type WelcomeScreenSuggestion = {
8285
8217
  icon: IconType;
8286
- message: string;
8218
+ label: string;
8219
+ items: WelcomeScreenSuggestionItem[];
8220
+ };
8221
+
8222
+ /**
8223
+ * A single sub-suggestion shown inside a welcome-screen group's popover.
8224
+ * The `title` is the label users see; `prompt` is what gets sent to the AI
8225
+ * when they click (falls back to `title` when omitted). They can diverge so
8226
+ * you can show a short, scannable title while sending a fully-formed prompt.
8227
+ */
8228
+ declare type WelcomeScreenSuggestionItem = {
8229
+ title: string;
8287
8230
  prompt?: string;
8288
8231
  };
8289
8232
 
@@ -8484,6 +8427,11 @@ declare module "gridstack" {
8484
8427
  }
8485
8428
 
8486
8429
 
8430
+ declare namespace Calendar {
8431
+ var displayName: string;
8432
+ }
8433
+
8434
+
8487
8435
  declare module "@tiptap/core" {
8488
8436
  interface Commands<ReturnType> {
8489
8437
  aiBlock: {
@@ -8533,11 +8481,6 @@ declare module "@tiptap/core" {
8533
8481
  }
8534
8482
 
8535
8483
 
8536
- declare namespace Calendar {
8537
- var displayName: string;
8538
- }
8539
-
8540
-
8541
8484
  declare namespace F0GraphNodeWrapperInner {
8542
8485
  var displayName: string;
8543
8486
  }