@factorialco/f0-react 1.454.0 → 1.456.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.d.ts CHANGED
@@ -1,22 +1,41 @@
1
1
  import { AgentState } from '@livekit/components-react';
2
2
  import { AIMessage } from '@copilotkit/shared';
3
3
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
4
+ import { baseColors } from '@factorialco/f0-core';
4
5
  import { ClassValue } from 'cva';
6
+ import { CompanyItemProps } from './types';
5
7
  import { ComponentProps } from 'react';
6
8
  import { CopilotKitProps } from '@copilotkit/react-core';
9
+ import { EmployeeItemProps } from './types';
10
+ import { F0TagBalanceProps as F0TagBalanceProps_2 } from './types';
11
+ import { F0TagCompanyProps } from './types';
12
+ import { F0TagPersonProps } from './types';
13
+ import { F0TagTeamProps } from './types';
7
14
  import { f1Colors } from '@factorialco/f0-core';
15
+ import { ForwardedRef } from 'react';
8
16
  import { ForwardRefExoticComponent } from 'react';
9
17
  import { InputProps } from '@copilotkit/react-ui';
18
+ import { ItemProps } from './types';
10
19
  import { JSX as JSX_2 } from 'react';
11
20
  import { LocalAudioTrack } from 'livekit-client';
12
21
  import { Message } from '@copilotkit/shared';
22
+ import { Props as Props_3 } from './types';
13
23
  import * as React_2 from 'react';
14
24
  import { ReactElement } from 'react';
15
25
  import { ReactNode } from 'react';
26
+ import { Ref } from 'react';
16
27
  import { RefAttributes } from 'react';
17
28
  import { RemoteAudioTrack } from 'livekit-client';
18
29
  import { SVGProps } from 'react';
19
30
  import * as SwitchPrimitive from '@radix-ui/react-switch';
31
+ import { TagAlertProps } from '../../../f0';
32
+ import { TagBalanceProps } from '../../../f0';
33
+ import { TagDotProps } from '../../../f0';
34
+ import { TagListProps } from '../../../f0';
35
+ import { TagRawProps } from '../../../f0';
36
+ import { TagStatusProps } from '../../../f0';
37
+ import { TagType } from '../../../f0';
38
+ import { TeamItemProps } from './types';
20
39
  import { TrackReferenceOrPlaceholder } from '@livekit/components-react';
21
40
  import { VariantProps } from 'cva';
22
41
  import { WithDataTestIdReturnType } from '../../../lib/data-testid';
@@ -133,6 +152,11 @@ export declare type AiChatProviderProps = {
133
152
  * URL builders (navigation links) for each entity type.
134
153
  */
135
154
  entityRefs?: EntityRefs;
155
+ /**
156
+ * Canvas action callbacks grouped by entity type.
157
+ * Provides save/create functions for persisting canvas entities externally.
158
+ */
159
+ canvasActions?: CanvasActions;
136
160
  /**
137
161
  * Available tool hints that the user can activate to provide intent context
138
162
  * to the AI. Renders a selector button next to the send button.
@@ -220,8 +244,14 @@ declare type AiChatProviderReturnValue = {
220
244
  * Append messages to the current conversation.
221
245
  * Useful for injecting pre-built assistant responses (e.g. dashboards)
222
246
  * from outside the chat. IDs are generated internally.
247
+ *
248
+ * @param options.persist - Whether to persist messages to the backend thread.
249
+ * Defaults to `true`. Pass `false` for client-only display messages that
250
+ * should not create or modify a backend thread (e.g. seed messages).
223
251
  */
224
- appendMessages: (messages: AppendMessage[]) => void;
252
+ appendMessages: (messages: AppendMessage[], options?: {
253
+ persist?: boolean;
254
+ }) => void;
225
255
  /* Excluded from this release type: setAppendMessagesFunction */
226
256
  /**
227
257
  * Atomically clear the conversation and inject new messages.
@@ -287,7 +317,14 @@ declare type AiChatProviderReturnValue = {
287
317
  */
288
318
  fileDragOver: boolean;
289
319
  /* Excluded from this release type: setFileDragOver */
290
- } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "toolHints" | "credits" | "creditWarning" | "fileAttachments"> & {
320
+ /**
321
+ * Pre-loaded context shown as an empty state in the chat.
322
+ * Prepended to the first user message as `<pending-context>`.
323
+ */
324
+ pendingContext: PendingContext | null;
325
+ /** Set pending context (pass null to clear) */
326
+ setPendingContext: React.Dispatch<React.SetStateAction<PendingContext | null>>;
327
+ } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "toolHints" | "credits" | "creditWarning" | "fileAttachments"> & {
291
328
  /** The current canvas content, or null when canvas is closed */
292
329
  canvasContent: CanvasContent | null;
293
330
  /** Open the canvas panel with the given content */
@@ -317,6 +354,7 @@ declare interface AiChatState {
317
354
  footer?: React.ReactNode;
318
355
  VoiceMode?: React.ComponentType;
319
356
  entityRefs?: EntityRefs;
357
+ canvasActions?: CanvasActions;
320
358
  toolHints?: AiChatToolHint[];
321
359
  credits?: AiChatCredits;
322
360
  creditWarning?: AiChatCreditWarning;
@@ -479,6 +517,19 @@ export declare const aiTranslations: {
479
517
  readonly formCard: {
480
518
  readonly moreFields: "Open to see all fields";
481
519
  };
520
+ readonly dashboard: {
521
+ readonly save: "Save";
522
+ readonly saveToAnalytics: "Save the dashboard in Analytics";
523
+ readonly saveAs: "Save as";
524
+ readonly saveDialog: {
525
+ readonly title: "Save dashboard";
526
+ readonly titleLabel: "Title";
527
+ readonly descriptionLabel: "Description";
528
+ readonly descriptionPlaceholder: "Add a description (optional)";
529
+ readonly save: "Save";
530
+ readonly cancel: "Cancel";
531
+ };
532
+ };
482
533
  readonly dataDownload: {
483
534
  readonly title: "Download";
484
535
  readonly download: "Download {{format}}";
@@ -548,6 +599,8 @@ export declare const aiTranslations: {
548
599
  };
549
600
  };
550
601
 
602
+ declare type AlertTagProps = ComponentProps<typeof F0TagAlert>;
603
+
551
604
  /**
552
605
  * A message to inject via appendMessages.
553
606
  * IDs are generated internally — callers only provide role, content, and
@@ -557,19 +610,38 @@ export declare type AppendMessage = {
557
610
  role: "user" | "assistant";
558
611
  content: string;
559
612
  toolCalls?: AppendToolCall[];
613
+ } | {
614
+ /** Tool result message — pairs with a toolCall from a previous assistant message */
615
+ role: "tool";
616
+ content: string;
617
+ /**
618
+ * ID of the paired tool call. Must equal the corresponding assistant
619
+ * message's `toolCalls[i].id` — supply `AppendToolCall.id` on that call
620
+ * and pass the same value here so the messages are correctly paired.
621
+ */
622
+ toolCallId: string;
560
623
  };
561
624
 
562
625
  /**
563
626
  * A tool call to inject via appendMessages.
564
- * IDs are generated internally callers only provide the function payload.
627
+ * IDs are generated internally unless `id` is provided.
628
+ * When pairing with a tool-result message, provide the same `id`
629
+ * in both the tool call and the tool-result's `toolCallId`.
565
630
  */
566
631
  export declare type AppendToolCall = {
632
+ id?: string;
567
633
  function: {
568
634
  name: string;
569
635
  arguments: string;
570
636
  };
571
637
  };
572
638
 
639
+ declare const Avatar: React_2.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React_2.RefAttributes<HTMLSpanElement>, "ref"> & {
640
+ size?: (typeof internalAvatarSizes)[number];
641
+ type?: (typeof internalAvatarTypes)[number];
642
+ color?: (typeof internalAvatarColors)[number];
643
+ } & React_2.RefAttributes<HTMLSpanElement>>;
644
+
573
645
  declare type AvatarBadge = ({
574
646
  type: "module";
575
647
  module: ModuleId;
@@ -580,10 +652,38 @@ declare type AvatarBadge = ({
580
652
  tooltip?: string;
581
653
  };
582
654
 
655
+ declare const avatarEmojiSizes: readonly ["sm", "md", "lg", "xl"];
656
+
657
+ declare type AvatarFileSize = (typeof avatarFileSizes)[number];
658
+
659
+ declare const avatarFileSizes: readonly ["xs", "sm", "md", "lg"];
660
+
661
+ declare const avatarIconSizes: readonly ["sm", "md", "lg"];
662
+
663
+ declare type AvatarListSize = (typeof avatarListSizes)[number];
664
+
665
+ declare const avatarListSizes: readonly ["xs", "sm", "md"];
666
+
583
667
  declare type AvatarSize = (typeof avatarSizes)[number];
584
668
 
585
669
  declare const avatarSizes: readonly ["xs", "sm", "md", "lg", "xl", "2xl"];
586
670
 
671
+ declare type AvatarVariant = DistributiveOmit<({
672
+ type: "person";
673
+ } & F0AvatarPersonProps) | ({
674
+ type: "emoji";
675
+ } & F0AvatarEmojiProps) | ({
676
+ type: "team";
677
+ } & F0AvatarTeamProps) | ({
678
+ type: "company";
679
+ } & F0AvatarCompanyProps) | ({
680
+ type: "file";
681
+ } & F0AvatarFileProps) | ({
682
+ type: "flag";
683
+ } & F0AvatarFlagProps) | ({
684
+ type: "icon";
685
+ } & F0AvatarIconProps), "size">;
686
+
587
687
  declare interface BadgeProps extends VariantProps<typeof badgeVariants> {
588
688
  icon: IconType;
589
689
  type?: VariantProps<typeof badgeVariants>["type"];
@@ -610,6 +710,8 @@ export declare type BalanceConfig = {
610
710
  hint?: string;
611
711
  };
612
712
 
713
+ declare type BalanceTagProps = ComponentProps<typeof F0TagBalance>;
714
+
613
715
  declare type BaseAvatarProps = {
614
716
  /**
615
717
  * The type of the avatar.
@@ -652,6 +754,12 @@ declare type BaseAvatarProps = {
652
754
  size: InternalAvatarProps["size"];
653
755
  });
654
756
 
757
+ declare type BaseColor = keyof typeof baseColors;
758
+
759
+ declare type BaseTag<T extends {
760
+ type: string;
761
+ }> = T & WithTooltipDescription;
762
+
655
763
  /**
656
764
  * Profile data for a candidate entity (ATS applicant), resolved asynchronously
657
765
  * and displayed in the entity reference hover card.
@@ -664,6 +772,15 @@ declare type CandidateProfile = {
664
772
  source?: string;
665
773
  };
666
774
 
775
+ /**
776
+ * Canvas-level action callbacks grouped by entity type.
777
+ * Each entity defines its own actions type; this aggregates them.
778
+ * Passed by the host app to F0AiChatProvider via `canvasActions`.
779
+ */
780
+ export declare type CanvasActions = {
781
+ dashboard?: DashboardCanvasActions;
782
+ };
783
+
667
784
  /**
668
785
  * Discriminated union for canvas panel content.
669
786
  * Add new entity types to this union as they are implemented.
@@ -1017,10 +1134,18 @@ declare interface CollectionComputation {
1017
1134
  limit?: number;
1018
1135
  }
1019
1136
 
1137
+ declare type CompanyAvatarVariant = Extract<AvatarVariant, {
1138
+ type: "company";
1139
+ }>;
1140
+
1141
+ declare type CompanyTagProps = ComponentProps<typeof F0TagCompany>;
1142
+
1020
1143
  export declare type ContentType = (typeof contentTypes)[number];
1021
1144
 
1022
1145
  export declare const contentTypes: readonly ["text", "person", "people", "team", "company", "alert", "balance", "sparkline"];
1023
1146
 
1147
+ declare type CountryCode = keyof TranslationsType["countries"];
1148
+
1024
1149
  /**
1025
1150
  * Credits usage data returned by the host app
1026
1151
  */
@@ -1035,6 +1160,16 @@ export declare type CreditsUsage = {
1035
1160
  */
1036
1161
  export declare type CSSRgbString = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`;
1037
1162
 
1163
+ /**
1164
+ * Callbacks for persisting dashboards externally (beyond chat history).
1165
+ */
1166
+ declare type DashboardCanvasActions = {
1167
+ /** Update an existing saved dashboard */
1168
+ save: (id: string, category: string, config: ChatDashboardConfig) => Promise<void>;
1169
+ /** Create a new saved dashboard. Returns the new dashboard ID if available. */
1170
+ create: (title: string, description: string, config: ChatDashboardConfig, category?: string) => Promise<string | void>;
1171
+ };
1172
+
1038
1173
  /**
1039
1174
  * Dashboard canvas content — renders an analytics dashboard.
1040
1175
  */
@@ -1045,6 +1180,14 @@ export declare type DashboardCanvasContent = CanvasContentBase & {
1045
1180
  baseUrl: string;
1046
1181
  headers: Record<string, string>;
1047
1182
  };
1183
+ /** Present when the dashboard is a pre-saved dashboard */
1184
+ savedDashboardId?: string;
1185
+ /** Category of the saved dashboard */
1186
+ savedDashboardCategory?: string;
1187
+ /** Description of the saved dashboard */
1188
+ savedDashboardDescription?: string;
1189
+ /** True when the agent has iterated on a saved dashboard but the user hasn't saved yet */
1190
+ savedDashboardUnsaved?: boolean;
1048
1191
  };
1049
1192
 
1050
1193
  declare interface DashboardFetchSpec {
@@ -1096,6 +1239,27 @@ declare type DataDownloadDataset = {
1096
1239
  columnLabels?: Record<string, string>;
1097
1240
  };
1098
1241
 
1242
+ declare const DataList: ForwardRefExoticComponent<DataListProps & RefAttributes<HTMLUListElement>> & {
1243
+ Item: ForwardRefExoticComponent<ItemProps & RefAttributes<HTMLLIElement>>;
1244
+ CompanyItem: ForwardRefExoticComponent<CompanyItemProps & RefAttributes<HTMLLIElement>>;
1245
+ PersonItem: ForwardRefExoticComponent<EmployeeItemProps & RefAttributes<HTMLLIElement>>;
1246
+ TeamItem: ForwardRefExoticComponent<TeamItemProps & RefAttributes<HTMLLIElement>>;
1247
+ DotTagItem: ForwardRefExoticComponent<TagDotProps & RefAttributes<HTMLLIElement>>;
1248
+ AlertTagItem: ForwardRefExoticComponent<TagAlertProps & RefAttributes<HTMLLIElement>>;
1249
+ BalanceTagItem: ForwardRefExoticComponent<TagBalanceProps & RefAttributes<HTMLLIElement>>;
1250
+ StatusTagItem: ForwardRefExoticComponent<TagStatusProps & RefAttributes<HTMLLIElement>>;
1251
+ RawTagItem: ForwardRefExoticComponent<TagRawProps & RefAttributes<HTMLLIElement>>;
1252
+ TagListItem: <T extends TagType>(props: TagListProps<T> & {
1253
+ ref?: Ref<HTMLLIElement>;
1254
+ }) => ReturnType<(<T_1 extends TagType>(props: TagListProps<T_1>, ref: ForwardedRef<HTMLLIElement>) => JSX_2.Element)>;
1255
+ };
1256
+
1257
+ declare type DataListProps = {
1258
+ children: ReactElement | ReactElement[];
1259
+ label?: string;
1260
+ isHorizontal?: boolean;
1261
+ };
1262
+
1099
1263
  export declare const defaultTranslations: {
1100
1264
  readonly countries: {
1101
1265
  ad: string;
@@ -1528,6 +1692,19 @@ export declare const defaultTranslations: {
1528
1692
  readonly formCard: {
1529
1693
  readonly moreFields: "Open to see all fields";
1530
1694
  };
1695
+ readonly dashboard: {
1696
+ readonly save: "Save";
1697
+ readonly saveToAnalytics: "Save the dashboard in Analytics";
1698
+ readonly saveAs: "Save as";
1699
+ readonly saveDialog: {
1700
+ readonly title: "Save dashboard";
1701
+ readonly titleLabel: "Title";
1702
+ readonly descriptionLabel: "Description";
1703
+ readonly descriptionPlaceholder: "Add a description (optional)";
1704
+ readonly save: "Save";
1705
+ readonly cancel: "Cancel";
1706
+ };
1707
+ };
1531
1708
  readonly dataDownload: {
1532
1709
  readonly title: "Download";
1533
1710
  readonly download: "Download {{format}}";
@@ -1758,6 +1935,8 @@ export declare const defaultTranslations: {
1758
1935
  };
1759
1936
  };
1760
1937
  readonly forms: {
1938
+ readonly yes: "Yes";
1939
+ readonly no: "No";
1761
1940
  readonly actionBar: {
1762
1941
  readonly unsavedChanges: "You have changes pending to be saved";
1763
1942
  readonly saving: "Saving...";
@@ -1819,6 +1998,52 @@ export declare const defaultTranslations: {
1819
1998
  };
1820
1999
  };
1821
2000
 
2001
+ declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> & {
2002
+ type: "item";
2003
+ }) | (ComponentProps<typeof DataList.PersonItem> & {
2004
+ type: "person";
2005
+ }) | (ComponentProps<typeof DataList.CompanyItem> & {
2006
+ type: "company";
2007
+ }) | (ComponentProps<typeof DataList.TeamItem> & {
2008
+ type: "team";
2009
+ }) | (ComponentProps<typeof Weekdays> & {
2010
+ type: "weekdays";
2011
+ }) | (ComponentProps<typeof DataList.DotTagItem> & {
2012
+ type: "dot-tag";
2013
+ }) | (Props & {
2014
+ type: "alert-tag";
2015
+ }) | (F0TagBalanceProps & {
2016
+ type: "balance-tag";
2017
+ }) | (F0TagStatusProps & {
2018
+ type: "status-tag";
2019
+ }) | (F0TagRawProps & {
2020
+ type: "raw-tag";
2021
+ }) | {
2022
+ [T in TagType_2]: {
2023
+ type: "tag-list";
2024
+ tagList: F0TagListProps<T>;
2025
+ };
2026
+ }[TagType_2] | {
2027
+ type: "avatar-list";
2028
+ avatarList: F0AvatarListProps;
2029
+ };
2030
+
2031
+ /**
2032
+ * Remove a property from a union of objects.
2033
+ * @example
2034
+ * type Person = {
2035
+ * name: string
2036
+ * age: number
2037
+ * } | {
2038
+ * name: string
2039
+ * height: number
2040
+ * }
2041
+ *
2042
+ * type PersonWithoutName = DistributiveOmit<Person, "name">
2043
+ * // { age: number } | { height: number }
2044
+ */
2045
+ declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
2046
+
1822
2047
  /**
1823
2048
  * Grouped configuration for entity references in the AI chat.
1824
2049
  * Combines resolver functions (data fetching) with URL builders (navigation).
@@ -1891,7 +2116,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
1891
2116
  /**
1892
2117
  * @experimental This is an experimental component use it at your own risk
1893
2118
  */
1894
- export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, toolHints, credits, creditWarning, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
2119
+ export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, toolHints, credits, creditWarning, fileAttachments, onThumbsUp, onThumbsDown, children, agent, tracking, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
1895
2120
 
1896
2121
  export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, creditWarning, }: ChatTextareaProps) => JSX_2.Element;
1897
2122
 
@@ -1973,6 +2198,75 @@ declare type F0AvatarCompanyProps = {
1973
2198
  badge?: AvatarBadge;
1974
2199
  } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
1975
2200
 
2201
+ declare type F0AvatarEmojiProps = {
2202
+ emoji: string;
2203
+ size?: (typeof avatarEmojiSizes)[number];
2204
+ } & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
2205
+
2206
+ declare type F0AvatarFileProps = Omit<React.ComponentPropsWithoutRef<typeof Avatar>, "type" | "size"> & {
2207
+ file: FileDef;
2208
+ size?: AvatarFileSize;
2209
+ badge?: AvatarBadge;
2210
+ } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby"> & WithDataTestIdProps;
2211
+
2212
+ declare type F0AvatarFlagProps = {
2213
+ flag: CountryCode | (string & {});
2214
+ size?: BaseAvatarProps["size"];
2215
+ badge?: AvatarBadge;
2216
+ } & Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">;
2217
+
2218
+ declare type F0AvatarIconProps = {
2219
+ icon: IconType;
2220
+ size?: (typeof avatarIconSizes)[number];
2221
+ state?: F0IconProps["state"];
2222
+ } & Partial<Pick<BaseAvatarProps, "aria-label" | "aria-labelledby">>;
2223
+
2224
+ declare type F0AvatarListProps = {
2225
+ /**
2226
+ * The size of the avatars in the list.
2227
+ * @default "md"
2228
+ */
2229
+ size?: AvatarListSize;
2230
+ /**
2231
+ * Whether to hide tooltips in each avatar.
2232
+ * @default false
2233
+ */
2234
+ noTooltip?: boolean;
2235
+ /**
2236
+ * The maximum number of avatars to display.
2237
+ * @default 3
2238
+ */
2239
+ max?: number;
2240
+ /**
2241
+ * The remaining number to display.
2242
+ */
2243
+ remainingCount?: number;
2244
+ /**
2245
+ * The layout of the avatar list.
2246
+ * - "fill" - Avatars will expand to fill the available width, with overflow items shown in a counter
2247
+ * - "compact" - Avatars will be stacked tightly together up to the max limit, with remaining shown in counter
2248
+ * @default "compact"
2249
+ */
2250
+ layout?: "fill" | "compact";
2251
+ } & F0AvatarListPropsAvatars;
2252
+
2253
+ declare type F0AvatarListPropsAvatars = {
2254
+ type: "person";
2255
+ avatars: (Omit<PersonAvatarVariant, "type"> & Record<string, unknown>)[];
2256
+ } | {
2257
+ type: "team";
2258
+ avatars: (Omit<TeamAvatarVariant, "type"> & Record<string, unknown>)[];
2259
+ } | {
2260
+ type: "company";
2261
+ avatars: (Omit<CompanyAvatarVariant, "type"> & Record<string, unknown>)[];
2262
+ } | {
2263
+ type: "flag";
2264
+ avatars: (Omit<FlagAvatarVariant, "type"> & Record<string, unknown>)[];
2265
+ } | {
2266
+ type: "file";
2267
+ avatars: (Omit<FileAvatarVariant, "type"> & Record<string, unknown>)[];
2268
+ };
2269
+
1976
2270
  declare type F0AvatarPersonProps = {
1977
2271
  /**
1978
2272
  * The first name of the person.
@@ -2097,6 +2391,110 @@ export declare type F0OneSwitchProps = React.ComponentPropsWithoutRef<typeof Swi
2097
2391
  autoOpen?: boolean;
2098
2392
  };
2099
2393
 
2394
+ declare const F0TagAlert: WithDataTestIdReturnType<ForwardRefExoticComponent<Props_3 & RefAttributes<HTMLDivElement>>>;
2395
+
2396
+ declare const F0TagBalance: WithDataTestIdReturnType<ForwardRefExoticComponent<F0TagBalanceProps_2 & RefAttributes<HTMLDivElement>>>;
2397
+
2398
+ declare type F0TagBalanceProps = {
2399
+ /**
2400
+ * Inverts the balance status color. Is useful when a negative percent mean something positive.
2401
+ */
2402
+ invertStatus?: boolean;
2403
+ /**
2404
+ * Hint text to display next to the tag (This text is not displayed when the balance is null or undefined)
2405
+ */
2406
+ hint?: string;
2407
+ /**
2408
+ * Info text to display an i icon and a tooltip next to the tag
2409
+ */
2410
+ info?: string;
2411
+ /**
2412
+ * Text to display when the balance is null or undefined
2413
+ */
2414
+ nullText?: string;
2415
+ /**
2416
+ * Value to display next to the tag can be a number, a Numeric or a NumericWithFormatter
2417
+ */
2418
+ amount: RelaxedNumericWithFormatter | Numeric;
2419
+ } & ({
2420
+ percentage: (Omit<RelaxedNumericWithFormatter, "value"> & {
2421
+ value: Omit<Numeric, "units" | "unitsPosition">;
2422
+ }) | Omit<Numeric, "units" | "unitsPosition">;
2423
+ } | {
2424
+ percentage?: null;
2425
+ formatterOptions?: undefined;
2426
+ });
2427
+
2428
+ declare const F0TagCompany: WithDataTestIdReturnType<ForwardRefExoticComponent<F0TagCompanyProps & RefAttributes<HTMLDivElement>>>;
2429
+
2430
+ declare type F0TagListProps<T extends TagType_2> = {
2431
+ /**
2432
+ * The type of tags to display. Only one type can be used at a time.
2433
+ */
2434
+ type: T;
2435
+ /**
2436
+ * Array of tag data corresponding to the specified type.
2437
+ */
2438
+ tags: Array<TagTypeMapping[T]>;
2439
+ /**
2440
+ * The maximum number of tags to display.
2441
+ * @default 4
2442
+ */
2443
+ max?: number;
2444
+ /**
2445
+ * The remaining number to display.
2446
+ */
2447
+ remainingCount?: number;
2448
+ };
2449
+
2450
+ declare const F0TagPerson: WithDataTestIdReturnType<ForwardRefExoticComponent<F0TagPersonProps & RefAttributes<HTMLDivElement>>>;
2451
+
2452
+ declare type F0TagRawProps = {
2453
+ /**
2454
+ * The label to display in the tag or used for accessible text
2455
+ */
2456
+ text: string;
2457
+ /**
2458
+ * Additional accessible text to display in the tag
2459
+ */
2460
+ additionalAccessibleText?: string;
2461
+ /**
2462
+ * Info text to display an i icon and a tooltip next to the tag
2463
+ */
2464
+ info?: string;
2465
+ } & ({
2466
+ icon: IconType;
2467
+ onlyIcon: true;
2468
+ } | {
2469
+ icon?: IconType;
2470
+ onlyIcon?: boolean;
2471
+ });
2472
+
2473
+ declare interface F0TagStatusProps {
2474
+ text: string;
2475
+ variant: Variant;
2476
+ /**
2477
+ * Sometimes you need to clarify the status for screen reader users
2478
+ * E.g., when showing a tooltip for sighted user, provide the tootip text to this prop because tooltips aren't accessible
2479
+ */
2480
+ additionalAccessibleText?: string;
2481
+ }
2482
+
2483
+ declare const F0TagTeam: WithDataTestIdReturnType<ForwardRefExoticComponent<F0TagTeamProps & RefAttributes<HTMLDivElement>>>;
2484
+
2485
+ declare type FileAvatarVariant = Extract<AvatarVariant, {
2486
+ type: "file";
2487
+ }>;
2488
+
2489
+ declare type FileDef = {
2490
+ name: string;
2491
+ type: string;
2492
+ };
2493
+
2494
+ declare type FlagAvatarVariant = Extract<AvatarVariant, {
2495
+ type: "flag";
2496
+ }>;
2497
+
2100
2498
  /**
2101
2499
  * A preset formatting instruction the LLM can specify instead of a
2102
2500
  * real formatter function. The wrapper component maps these to actual
@@ -2123,6 +2521,23 @@ declare type FormCanvasContent = CanvasContentBase & {
2123
2521
  formModule?: ModuleId;
2124
2522
  };
2125
2523
 
2524
+ export declare interface FormCardValueFormatterEntry<T = unknown> {
2525
+ /** Scope to a specific form. Omit to apply to all forms. */
2526
+ formName?: string;
2527
+ /** Scope to a specific custom field name. Omit to apply to all fields. */
2528
+ customFieldName?: string;
2529
+ /** Format function. Return `undefined` to fall back to built-in formatting. */
2530
+ format: (value: T, meta: {
2531
+ key: string;
2532
+ fieldType?: string;
2533
+ customFieldName?: string;
2534
+ }) => DetailsItemContent | DetailsItemContent[] | undefined;
2535
+ }
2536
+
2537
+ export declare function FormCardValueFormatterProvider({ children, }: {
2538
+ children: ReactNode;
2539
+ }): JSX_2.Element;
2540
+
2126
2541
  declare interface GaugeComputation {
2127
2542
  datasetId: string;
2128
2543
  aggregation: AggregationType;
@@ -2349,6 +2764,8 @@ declare type NestedKeyOf<T> = {
2349
2764
  } ? `${K}` | `${K}-${NestedKeyOf<T[K]>}` : `${K}-${NestedKeyOf<T[K]>}` : K extends "DEFAULT" ? never : `${K}`;
2350
2765
  }[keyof T & string];
2351
2766
 
2767
+ declare type NewColor = Extract<BaseColor, (typeof tagDotColors)[number]>;
2768
+
2352
2769
  declare type Numeric = NumericValue | number | undefined | null;
2353
2770
 
2354
2771
  /**
@@ -2476,6 +2893,23 @@ declare type PathsToStringProps<T> = T extends string ? [] : {
2476
2893
  [K in Extract<keyof T, string>]: [K, ...PathsToStringProps<T[K]>];
2477
2894
  }[Extract<keyof T, string>];
2478
2895
 
2896
+ /**
2897
+ * Pre-loaded context shown as an empty state in the chat.
2898
+ * The `context` string is prepended to the user's first message
2899
+ * as `<pending-context>...</pending-context>` so the agent receives it.
2900
+ * The conversation is not created until the user actually sends a message.
2901
+ */
2902
+ declare type PendingContext = {
2903
+ /** Human-readable label shown in the empty state (e.g. "Expenses dashboard") */
2904
+ label: string;
2905
+ /** Full context string prepended invisibly to the first user message */
2906
+ context: string;
2907
+ };
2908
+
2909
+ declare type PersonAvatarVariant = Extract<AvatarVariant, {
2910
+ type: "person";
2911
+ }>;
2912
+
2479
2913
  /**
2480
2914
  * Profile data for a person entity (employee), resolved asynchronously
2481
2915
  * and displayed in the entity reference hover card.
@@ -2488,6 +2922,8 @@ export declare type PersonProfile = {
2488
2922
  jobTitle?: string;
2489
2923
  };
2490
2924
 
2925
+ declare type PersonTagProps = ComponentProps<typeof F0TagPerson>;
2926
+
2491
2927
  declare interface PieComputation {
2492
2928
  datasetId: string;
2493
2929
  nameColumn: string;
@@ -2500,6 +2936,27 @@ declare interface PieComputation {
2500
2936
 
2501
2937
  declare const privateProps: readonly ["className"];
2502
2938
 
2939
+ declare type Props<Text extends string = string> = {
2940
+ text: Text extends "" ? never : Text;
2941
+ level: Level;
2942
+ /**
2943
+ * Info text to display an i icon and a tooltip next to the tag
2944
+ */
2945
+ info?: string;
2946
+ };
2947
+
2948
+ declare type Props_2 = {
2949
+ text: string;
2950
+ /**
2951
+ * Info text to display an i icon and a tooltip next to the tag
2952
+ */
2953
+ info?: string;
2954
+ } & ({
2955
+ color: NewColor;
2956
+ } | {
2957
+ customColor: string;
2958
+ });
2959
+
2503
2960
  declare interface RadarComputation {
2504
2961
  datasetId: string;
2505
2962
  seriesColumn: string;
@@ -2532,10 +2989,59 @@ export declare type RequisitionProfile = {
2532
2989
  reason?: string;
2533
2990
  };
2534
2991
 
2992
+ declare type SetFormCardValueFormatter = <T = unknown>(entry: FormCardValueFormatterEntry<T>) => void;
2993
+
2535
2994
  export declare type SparklineDataPoint = {
2536
2995
  value: number;
2537
2996
  };
2538
2997
 
2998
+ declare const statuses: readonly ["neutral", "info", "positive", "warning", "critical"];
2999
+
3000
+ declare type TagDataType<T extends string> = Omit<Extract<TagVariant, {
3001
+ type: T;
3002
+ }>, "type" | "description">;
3003
+
3004
+ declare const tagDotColors: ["viridian", "malibu", "yellow", "purple", "lilac", "barbie", "smoke", "army", "flubber", "indigo", "camel"];
3005
+
3006
+ declare type TagType_2 = (typeof tagTypes)[number];
3007
+
3008
+ declare type TagTypeMapping = {
3009
+ dot: TagDataType<"dot">;
3010
+ person: TagDataType<"person">;
3011
+ team: TagDataType<"team">;
3012
+ company: TagDataType<"company">;
3013
+ alert: TagDataType<"alert">;
3014
+ status: TagDataType<"status">;
3015
+ balance: TagDataType<"balance">;
3016
+ raw: TagDataType<"raw">;
3017
+ };
3018
+
3019
+ declare const tagTypes: readonly ["dot", "person", "team", "company", "alert", "status", "balance", "raw"];
3020
+
3021
+ declare type TagVariant = BaseTag<{
3022
+ type: "dot";
3023
+ } & Props_2> | BaseTag<{
3024
+ type: "person";
3025
+ } & PersonTagProps> | BaseTag<{
3026
+ type: "team";
3027
+ } & TeamTagProps> | BaseTag<{
3028
+ type: "company";
3029
+ } & CompanyTagProps> | BaseTag<{
3030
+ type: "alert";
3031
+ } & AlertTagProps> | BaseTag<{
3032
+ type: "status";
3033
+ } & F0TagStatusProps> | BaseTag<{
3034
+ type: "balance";
3035
+ } & BalanceTagProps> | BaseTag<{
3036
+ type: "raw";
3037
+ } & F0TagRawProps>;
3038
+
3039
+ declare type TeamAvatarVariant = Extract<AvatarVariant, {
3040
+ type: "team";
3041
+ }>;
3042
+
3043
+ declare type TeamTagProps = ComponentProps<typeof F0TagTeam>;
3044
+
2539
3045
  declare type TranslationKey = Join<PathsToStringProps<typeof defaultTranslations>, ".">;
2540
3046
 
2541
3047
  declare type TranslationShape<T> = {
@@ -2570,6 +3076,17 @@ export declare function useAiChatTranslations(): AiChatTranslations;
2570
3076
  */
2571
3077
  export declare function useDefaultCopilotActions(): void;
2572
3078
 
3079
+ /**
3080
+ * Returns a resolved formatter for the given `formName`.
3081
+ * Matches registered formatters by specificity:
3082
+ * formName + customFieldName > formName only > customFieldName only > global
3083
+ * Returns `null` when no provider is present or no formatters are registered.
3084
+ */
3085
+ export declare function useFormCardValueFormatter(formName: string): ((key: string, value: unknown, meta: {
3086
+ fieldType?: string;
3087
+ customFieldName?: string;
3088
+ }) => DetailsItemContent | DetailsItemContent[] | undefined) | null;
3089
+
2573
3090
  export declare function useI18n(): TranslationsType & {
2574
3091
  t: (key: TranslationKey, args?: Record<string, string | number>) => string;
2575
3092
  };
@@ -2586,6 +3103,27 @@ export declare const useMessageSourcesAction: () => void;
2586
3103
  */
2587
3104
  export declare const useOrchestratorThinkingAction: () => void;
2588
3105
 
3106
+ /**
3107
+ * Returns a setter to register value formatters used by FormCard.
3108
+ *
3109
+ * ```ts
3110
+ * const setFormatter = useSetFormCardValueFormatter()
3111
+ *
3112
+ * // Global formatter (all forms, all fields)
3113
+ * setFormatter({ format: (value) => ({ type: "item", text: String(value) }) })
3114
+ *
3115
+ * // Scoped to a form
3116
+ * setFormatter({ formName: "create-task", format: (value) => ... })
3117
+ *
3118
+ * // Scoped to a custom field name (across all forms)
3119
+ * setFormatter({ customFieldName: "assignees_selector", format: (value) => ... })
3120
+ *
3121
+ * // Scoped to both
3122
+ * setFormatter({ formName: "create-task", customFieldName: "assignees_selector", format: (value) => ... })
3123
+ * ```
3124
+ */
3125
+ export declare function useSetFormCardValueFormatter(): SetFormCardValueFormatter;
3126
+
2589
3127
  /**
2590
3128
  * Profile data for a vacancy entity (ATS vacancy/position), resolved asynchronously
2591
3129
  * and displayed in the entity reference hover card.
@@ -2597,11 +3135,20 @@ export declare type VacancyProfile = {
2597
3135
  vacancyType?: string;
2598
3136
  };
2599
3137
 
3138
+ declare type Variant = (typeof statuses)[number];
3139
+
2600
3140
  /**
2601
3141
  * Visualization mode for the AI chat
2602
3142
  */
2603
3143
  export declare type VisualizationMode = "sidepanel" | "fullscreen" | "canvas";
2604
3144
 
3145
+ declare const Weekdays: ForwardRefExoticComponent<WeekdaysProps & RefAttributes<HTMLDivElement>>;
3146
+
3147
+ declare interface WeekdaysProps {
3148
+ activatedDays?: number[];
3149
+ daysOfTheWeek?: string[];
3150
+ }
3151
+
2605
3152
  /**
2606
3153
  * Welcome screen suggestion item
2607
3154
  */
@@ -2611,6 +3158,17 @@ export declare type WelcomeScreenSuggestion = {
2611
3158
  prompt?: string;
2612
3159
  };
2613
3160
 
3161
+ declare type WithDataTestIdProps = {
3162
+ dataTestId?: string;
3163
+ };
3164
+
3165
+ declare interface WithTooltipDescription {
3166
+ /**
3167
+ * Optional description to show in the tooltip
3168
+ */
3169
+ description?: string;
3170
+ }
3171
+
2614
3172
  export { }
2615
3173
 
2616
3174
 
@@ -2651,6 +3209,11 @@ declare module "gridstack" {
2651
3209
  }
2652
3210
 
2653
3211
 
3212
+ declare namespace Calendar {
3213
+ var displayName: string;
3214
+ }
3215
+
3216
+
2654
3217
  declare module "@tiptap/core" {
2655
3218
  interface Commands<ReturnType> {
2656
3219
  aiBlock: {
@@ -2698,8 +3261,3 @@ declare module "@tiptap/core" {
2698
3261
  };
2699
3262
  }
2700
3263
  }
2701
-
2702
-
2703
- declare namespace Calendar {
2704
- var displayName: string;
2705
- }