@factorialco/f0-react 7.32.0 → 7.33.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.
Files changed (30) hide show
  1. package/dist/{ChatPdfThumbnail-Cg2_Torf.js → ChatPdfThumbnail-CewvkWu-.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-D9vt19Do.js → ChatPostComposerDialog-CKwdWt5B.js} +3 -3
  3. package/dist/{DocumentToolbar-VcjNLI2W.js → DocumentToolbar-BdgPc16e.js} +2 -2
  4. package/dist/{DocxViewer-B_vuIwqx.js → DocxViewer-HWpF_G9w.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-DT4-88F7.js → F0AiProcessingOverlay-DxlgF3Pt.js} +4035 -3852
  6. package/dist/{F0CanvasPanel-BWGjNwSC.js → F0CanvasPanel-BCZjxhVB.js} +7047 -7049
  7. package/dist/{F0Map-BAGn-Pbt.js → F0Map-DZtgpSnS.js} +4 -4
  8. package/dist/{F0VideoPlayer-BiPN02OV.js → F0VideoPlayer-EqXupZV9.js} +1 -1
  9. package/dist/{MapProvider-DC2FAppw.js → MapProvider-C4K2ey4N.js} +2 -2
  10. package/dist/{SheetViewer-CW5aD1Gh.js → SheetViewer-yK40OmE1.js} +2 -2
  11. package/dist/{TextViewer-BoRCHEug.js → TextViewer-BYFQn6S1.js} +2 -2
  12. package/dist/ai.d.ts +420 -13
  13. package/dist/ai.js +23 -22
  14. package/dist/component-status.d.ts +8 -8
  15. package/dist/component-status.js +1 -1
  16. package/dist/{experimental-BqvlI_rl.js → experimental-BKF7swb0.js} +7 -7
  17. package/dist/experimental.d.ts +54 -16
  18. package/dist/experimental.js +100 -100
  19. package/dist/f0.d.ts +132 -10
  20. package/dist/f0.js +22 -21
  21. package/dist/i18n-provider-defaults.d.ts +12 -8
  22. package/dist/i18n-provider-defaults.js +4 -0
  23. package/dist/index-Bt9DLm3D.js +4 -0
  24. package/dist/{index-CqgzgxRb.js → index-BzA0lEl1.js} +2 -2
  25. package/dist/{index-C63g3BaC.js → index-C_LLYE_o.js} +3 -3
  26. package/dist/{index-DFjMggw2.js → index-Ca0rOdez.js} +3 -3
  27. package/dist/{index-DgYKKlh1.js → index-DlMbfdLc.js} +1 -1
  28. package/dist/{pdfWorker-BM17l5Gd.js → pdfWorker-CA3xmb-5.js} +2 -2
  29. package/package.json +1 -1
  30. package/dist/index-U6-zZZzn.js +0 -4
package/dist/ai.d.ts CHANGED
@@ -1,26 +1,60 @@
1
1
  import { AgentState } from '@livekit/components-react';
2
+ import { AlertTagCellValue } from '../../../ui/value-display/types/alertTag';
3
+ import { AlertTagCellValue as AlertTagCellValue_2 } from './types/alertTag';
4
+ import { AmountCellValue } from '../../../ui/value-display/types/amount';
5
+ import { AmountCellValue as AmountCellValue_2 } from './types/amount';
2
6
  import { AnchorHTMLAttributes } from 'react';
7
+ import { AvatarListCellValue } from '../../../ui/value-display/types/avatarList';
8
+ import { AvatarListCellValue as AvatarListCellValue_2 } from './types/avatarList';
3
9
  import * as AvatarPrimitive from '@radix-ui/react-avatar';
10
+ import { BarSeriesCellValue } from './types/barSeries';
4
11
  import { baseColors } from '@factorialco/f0-core';
12
+ import { CategoryBarChartCellValue } from './types/categoryBarChart';
5
13
  import { ClassValue } from 'cva';
14
+ import { CompanyCellValue } from '../../../ui/value-display/types/company';
15
+ import { CompanyCellValue as CompanyCellValue_2 } from './types/company';
6
16
  import { CompanyItemProps } from './types';
7
17
  import { ComponentProps } from 'react';
8
18
  import { ComponentType } from 'react';
19
+ import { CompoundCellValue } from './types/compound';
20
+ import { CountCellValue } from './types/count';
21
+ import { CountryCellValue } from './types/country';
9
22
  import { CSSProperties } from 'react';
23
+ import { DateCellValue } from '../../../ui/value-display/types/date';
24
+ import { DateCellValue as DateCellValue_2 } from './types/date';
25
+ import { default as default_2 } from 'react';
26
+ import { DeltaCellValue } from './types/delta';
27
+ import { DotTagCellValue } from '../../../ui/value-display/types/dotTag';
28
+ import { DotTagCellValue as DotTagCellValue_2 } from './types/dotTag';
10
29
  import { EmployeeItemProps } from './types';
11
30
  import { F0TagBalanceProps as F0TagBalanceProps_2 } from './types';
12
31
  import { F0TagCompanyProps } from './types';
13
32
  import { F0TagPersonProps } from './types';
14
33
  import { F0TagTeamProps } from './types';
15
34
  import { f1Colors } from '@factorialco/f0-core';
35
+ import { FileCellValue } from '../../../ui/value-display/types/file';
36
+ import { FileCellValue as FileCellValue_2 } from './types/file';
37
+ import { FolderCellValue } from '../../../ui/value-display/types/folder';
38
+ import { FolderCellValue as FolderCellValue_2 } from './types/folder';
16
39
  import { ForwardedRef } from 'react';
17
40
  import { ForwardRefExoticComponent } from 'react';
41
+ import { HourDistributionCellValue } from './types/hourDistribution';
18
42
  import { HTMLAttributeAnchorTarget } from 'react';
19
43
  import { HTMLAttributes } from 'react';
44
+ import { IconCellValue } from './types/icon';
20
45
  import { ItemProps } from './types';
21
46
  import { JSX as JSX_2 } from 'react';
22
47
  import { LocalAudioTrack } from 'livekit-client';
48
+ import { LongTextCellValue } from './types/longText';
23
49
  import { NamedExoticComponent } from 'react';
50
+ import { NumberCellValue } from '../../../ui/value-display/types/number';
51
+ import { NumberCellValue as NumberCellValue_2 } from './types/number';
52
+ import { PercentageCellValue } from './types/percentage';
53
+ import { PersonCellValue } from '../../../ui/value-display/types/person';
54
+ import { PersonCellValue as PersonCellValue_2 } from './types/person';
55
+ import { ProgressBarCellValue } from '../../../ui/value-display/types/progressBar';
56
+ import { ProgressBarCellValue as ProgressBarCellValue_2 } from './types/progressBar';
57
+ import { ProgressSeriesCellValue } from './types/progressSeries';
24
58
  import { Props as Props_3 } from './types';
25
59
  import * as React_2 from 'react';
26
60
  import { ReactElement } from 'react';
@@ -30,17 +64,29 @@ import { Ref } from 'react';
30
64
  import { RefAttributes } from 'react';
31
65
  import { RefObject } from 'react';
32
66
  import { RemoteAudioTrack } from 'livekit-client';
67
+ import { StatusCellValue } from '../../../ui/value-display/types/status';
68
+ import { StatusCellValue as StatusCellValue_2 } from './types/status';
69
+ import { SummaryCellValue } from './types/summary';
33
70
  import { SVGProps } from 'react';
34
71
  import * as SwitchPrimitive from '@radix-ui/react-switch';
35
72
  import { TagAlertProps } from '../../../f0';
36
73
  import { TagBalanceProps } from '../../../f0';
74
+ import { TagCellValue } from '../../../ui/value-display/types/tag';
75
+ import { TagCellValue as TagCellValue_2 } from './types/tag';
37
76
  import { TagDotProps } from '../../../f0';
77
+ import { TagListCellValue } from '../../../ui/value-display/types/tagList';
78
+ import { TagListCellValue as TagListCellValue_2 } from './types/tagList';
38
79
  import { TagListProps } from '../../../f0';
39
80
  import { TagRawProps } from '../../../f0';
40
81
  import { TagStatusProps } from '../../../f0';
41
82
  import { TagType } from '../../../f0';
83
+ import { TeamCellValue } from '../../../ui/value-display/types/team';
84
+ import { TeamCellValue as TeamCellValue_2 } from './types/team';
42
85
  import { TeamItemProps } from './types';
86
+ import { TextCellValue } from '../../../ui/value-display/types/text';
87
+ import { TextCellValue as TextCellValue_2 } from './types/text';
43
88
  import { TrackReferenceOrPlaceholder } from '@livekit/components-react';
89
+ import { ValueDisplayRendererContext } from '../../../ui/value-display';
44
90
  import { VariantProps } from 'cva';
45
91
  import { WithDataTestIdReturnType } from '../../lib/data-testid';
46
92
  import { WithDataTestIdReturnType as WithDataTestIdReturnType_2 } from '../../../lib/data-testid';
@@ -803,6 +849,10 @@ export declare const aiTranslations: {
803
849
  readonly thinkingElapsedSeconds: "{{seconds}}s";
804
850
  readonly thinkingElapsedMinutes: "{{minutes}}m {{seconds}}s";
805
851
  readonly attribution: "Suggested by One";
852
+ readonly mentions: {
853
+ readonly people: "People";
854
+ readonly suggestions: "Mention suggestions";
855
+ };
806
856
  readonly evidence: {
807
857
  readonly show: "See {{name}}";
808
858
  readonly hide: "Hide {{name}}";
@@ -1404,6 +1454,28 @@ declare type CardAvatarVariant = AvatarVariant | {
1404
1454
  date: Date;
1405
1455
  };
1406
1456
 
1457
+ /**
1458
+ * Bookmark (save) toggle rendered as an icon button in the card's options overlay.
1459
+ * Shows an outline bookmark icon when not bookmarked and a filled one when bookmarked,
1460
+ * giving an at-a-glance indication of the saved state.
1461
+ */
1462
+ declare interface CardBookmark {
1463
+ /**
1464
+ * Whether the card is currently bookmarked (saved).
1465
+ * Controls the filled vs. outline icon and keeps the toggle visible while active.
1466
+ */
1467
+ bookmarked: boolean;
1468
+ /**
1469
+ * Called with the next bookmarked state when the user toggles the bookmark.
1470
+ */
1471
+ onBookmarkChange: (bookmarked: boolean) => void;
1472
+ /**
1473
+ * Accessible label for the toggle button (e.g. "Save product").
1474
+ * Falls back to the card `title` when omitted.
1475
+ */
1476
+ label?: string;
1477
+ }
1478
+
1407
1479
  declare interface CardHorizontalConfirmAction {
1408
1480
  onClick: () => void;
1409
1481
  /** Accessible label and tooltip. Defaults to "Confirm" / "Reject". */
@@ -1431,10 +1503,161 @@ declare interface CardHorizontalStatus {
1431
1503
  label: string;
1432
1504
  }
1433
1505
 
1434
- declare type CardInternalProps = F0AiInsightCardProps & {
1506
+ declare type CardImageAspectRatio = (typeof cardImageAspectRatios)[number];
1507
+
1508
+ declare const cardImageAspectRatios: readonly ["default", "video"];
1509
+
1510
+ declare type CardImageFit = (typeof cardImageFits)[number];
1511
+
1512
+ declare const cardImageFits: readonly ["contain", "cover", "fit-width", "fit-height", "scale-down"];
1513
+
1514
+ declare type CardImageSize = (typeof cardImageSizes)[number];
1515
+
1516
+ declare const cardImageSizes: readonly ["xs", "sm", "md", "lg", "xl"];
1517
+
1518
+ declare interface CardInternalProps {
1519
+ /**
1520
+ * Whether the card has a compact layout
1521
+ */
1522
+ compact?: boolean;
1523
+ /**
1524
+ * The avatar to display in the card
1525
+ */
1526
+ avatar?: CardAvatarVariant;
1527
+ /**
1528
+ * Whether the card has an image
1529
+ */
1530
+ image?: string;
1531
+ /**
1532
+ * How the image should be displayed/fitted within its container
1533
+ * @default "fit-width"
1534
+ */
1535
+ imageFit?: CardImageFit;
1536
+ /**
1537
+ * Size of the image container
1538
+ * @default "sm"
1539
+ */
1540
+ imageSize?: CardImageSize;
1541
+ /**
1542
+ * Constrain the image container to a fixed aspect ratio instead of a fixed height.
1543
+ * When set, `imageSize` is ignored for height.
1544
+ * @example "video"
1545
+ */
1546
+ imageAspectRatio?: CardImageAspectRatio;
1547
+ /**
1548
+ * Whether to show a blurred background image when the image doesn't fill the container
1549
+ * @default true
1550
+ */
1551
+ blurredBackground?: boolean;
1552
+ /**
1553
+ * The title of the card
1554
+ */
1555
+ title?: string;
1556
+ /**
1557
+ * The description of the card
1558
+ */
1559
+ description?: string;
1560
+ /**
1561
+ * Metadata items to display in the card
1562
+ */
1563
+ metadata?: CardMetadata[];
1564
+ /**
1565
+ * The children to display in the card
1566
+ */
1567
+ children?: ReactNode;
1568
+ /**
1569
+ * The link to navigate to when the card is clicked
1570
+ */
1571
+ link?: string;
1572
+ /**
1573
+ * The primary action that displays a primary button in the card footer
1574
+ */
1575
+ primaryAction?: CardPrimaryAction;
1576
+ /**
1577
+ * The secondary actions - either an array of button actions or a single link
1578
+ */
1579
+ secondaryActions?: CardSecondaryAction[] | CardSecondaryLink;
1580
+ /**
1581
+ * Actions to display in the dropdown menu inside the card content
1582
+ */
1583
+ otherActions?: DropdownItem[];
1584
+ /**
1585
+ * Bookmark (save) toggle rendered as an icon button in the card's options overlay.
1586
+ * Shows an outline bookmark when not bookmarked and a filled one when bookmarked.
1587
+ */
1588
+ bookmark?: CardBookmark;
1589
+ /**
1590
+ * Whether the card is selectable
1591
+ */
1592
+ selectable?: boolean;
1593
+ /**
1594
+ * Whether the card is selected
1595
+ */
1596
+ selected?: boolean;
1597
+ /**
1598
+ * The callback to handle the selection of the card
1599
+ */
1600
+ onSelect?: (selected: boolean) => void;
1601
+ /**
1602
+ * The callback to handle the click of the card
1603
+ */
1604
+ onClick?: () => void;
1605
+ /**
1606
+ * Force vertical metadata for compact layout
1607
+ * Private prop
1608
+ */
1609
+ forceVerticalMetadata?: boolean;
1610
+ /**
1611
+ * Whether the card should have a full height
1612
+ */
1613
+ fullHeight?: boolean;
1614
+ /**
1615
+ * Use a softer/lighter border (`border-f1-border-secondary`) instead of the default
1616
+ * `border-f1-border`. Opt-in so existing cards keep their current appearance.
1617
+ * @default false
1618
+ */
1619
+ subtleBorder?: boolean;
1620
+ /**
1621
+ * When true, disables the full-card overlay link so parent components
1622
+ * can manage drag-and-drop while still allowing click navigation via onClick
1623
+ */
1624
+ disableOverlayLink?: boolean;
1625
+ /**
1626
+ * Alert banner displayed above the card with a coloured header strip and matching border.
1627
+ * Supports info, warning, critical, and positive variants with a default icon per variant.
1628
+ * Use `visible` + `onDismiss` for controlled dismiss behaviour.
1629
+ */
1630
+ alert?: CardAlertProps;
1631
+ }
1632
+
1633
+ declare type CardInternalProps_2 = F0AiInsightCardProps & {
1435
1634
  className?: string;
1436
1635
  };
1437
1636
 
1637
+ declare type CardMetadata = {
1638
+ /** Leading icon. Optional — when omitted the row renders just the value. */
1639
+ icon?: IconType;
1640
+ property: Exclude<CardMetadataProperty, {
1641
+ type: "file";
1642
+ }>;
1643
+ } | {
1644
+ property: Extract<CardMetadataProperty, {
1645
+ type: "file";
1646
+ }>;
1647
+ };
1648
+
1649
+ /**
1650
+ * Card metadata property renderers.
1651
+ * Each metadata item consists of an icon and a property with its data.
1652
+ */
1653
+ declare type CardMetadataProperty = {
1654
+ [K in CardPropertyType]: {
1655
+ type: K;
1656
+ label: string;
1657
+ value: Parameters<(typeof valueDisplayRenderers)[K]>[0];
1658
+ };
1659
+ }[CardPropertyType];
1660
+
1438
1661
  declare interface CardPrimaryAction {
1439
1662
  label: string;
1440
1663
  icon?: IconType;
@@ -1449,6 +1672,27 @@ declare interface CardPrimaryAction {
1449
1672
  variant?: "default" | "outline";
1450
1673
  }
1451
1674
 
1675
+ declare const cardPropertyRenderers: {
1676
+ readonly text: (args: TextCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1677
+ readonly number: (args: NumberCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1678
+ readonly date: (args: DateCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1679
+ readonly amount: (args: AmountCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1680
+ readonly person: (args: PersonCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1681
+ readonly company: (args: CompanyCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1682
+ readonly team: (args: TeamCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1683
+ readonly status: (args: StatusCellValue) => default_2.JSX.Element;
1684
+ readonly tag: (args: TagCellValue) => default_2.JSX.Element;
1685
+ readonly avatarList: (args: AvatarListCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
1686
+ readonly tagList: (args: TagListCellValue) => default_2.JSX.Element;
1687
+ readonly alertTag: (args: AlertTagCellValue) => default_2.JSX.Element;
1688
+ readonly dotTag: (args: DotTagCellValue) => default_2.JSX.Element;
1689
+ readonly file: (args: FileCellValue) => default_2.JSX.Element;
1690
+ readonly folder: (args: FolderCellValue) => default_2.JSX.Element;
1691
+ readonly progressBar: (args: ProgressBarCellValue, _meta: ValueDisplayRendererContext) => default_2.JSX.Element | null;
1692
+ };
1693
+
1694
+ declare type CardPropertyType = keyof typeof cardPropertyRenderers;
1695
+
1452
1696
  declare interface CardSecondaryAction {
1453
1697
  label: string;
1454
1698
  icon?: IconType;
@@ -1848,6 +2092,16 @@ export declare const contentTypes: readonly ["text", "person", "people", "team",
1848
2092
 
1849
2093
  declare type CountryCode = keyof TranslationsType["countries"];
1850
2094
 
2095
+ /**
2096
+ * The `person` mention source for a person search: what `searchPersons`
2097
+ * becomes. Exported so hosts that build their own `mentionSources` can place
2098
+ * people explicitly.
2099
+ */
2100
+ export declare function createPersonMentionSource(searchPersons: (query: string) => Promise<PersonProfile[]>, options: {
2101
+ label: string;
2102
+ order?: MentionSource["order"];
2103
+ }): MentionSource;
2104
+
1851
2105
  /**
1852
2106
  * Credits usage data returned by the host app
1853
2107
  */
@@ -1862,6 +2116,32 @@ export declare type CreditsUsage = {
1862
2116
  */
1863
2117
  export declare type CSSRgbString = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`;
1864
2118
 
2119
+ /**
2120
+ * Hover card content of a host-registered entity type. `avatar` is the card's
2121
+ * leading slot, where a person's avatar goes: an icon for most entities
2122
+ * (`{ type: "icon", icon: PalmTree }`).
2123
+ */
2124
+ export declare type CustomEntityRefCard = Pick<F0CardProps, "title" | "description" | "avatar">;
2125
+
2126
+ /**
2127
+ * How a host-defined `<entity-ref type="…">` renders in messages.
2128
+ *
2129
+ * The ref renders exactly like a person mention: an `@label` chip whose
2130
+ * hover card is resolved on first open.
2131
+ */
2132
+ export declare type CustomEntityRefConfig = {
2133
+ /**
2134
+ * Lazily resolves the hover card the first time it opens. While it runs the
2135
+ * card shows a skeleton; when it is omitted or fails, the card shows the
2136
+ * label with `avatar`.
2137
+ */
2138
+ resolve?: (id: string) => Promise<CustomEntityRefCard>;
2139
+ /** Card avatar used when `resolve` returns none, or is omitted or fails. */
2140
+ avatar?: CustomEntityRefCard["avatar"];
2141
+ /** When set, the card gets a "View" action to this URL. */
2142
+ url?: (id: string) => string;
2143
+ };
2144
+
1865
2145
  /**
1866
2146
  * Callbacks for persisting dashboards externally (beyond chat history).
1867
2147
  */
@@ -2688,6 +2968,10 @@ export declare const defaultTranslations: {
2688
2968
  readonly thinkingElapsedSeconds: "{{seconds}}s";
2689
2969
  readonly thinkingElapsedMinutes: "{{minutes}}m {{seconds}}s";
2690
2970
  readonly attribution: "Suggested by One";
2971
+ readonly mentions: {
2972
+ readonly people: "People";
2973
+ readonly suggestions: "Mention suggestions";
2974
+ };
2691
2975
  readonly evidence: {
2692
2976
  readonly show: "See {{name}}";
2693
2977
  readonly hide: "Hide {{name}}";
@@ -3618,6 +3902,14 @@ declare type EmployeeCreditsUsage = {
3618
3902
  export declare type EntityRefs = {
3619
3903
  resolvers?: EntityResolvers;
3620
3904
  urls?: EntityUrlBuilders;
3905
+ /**
3906
+ * Entity types F0 does not know, keyed by the `type` attribute of
3907
+ * `<entity-ref>` (e.g. `allowance`, `timeoff_policy`). Built-in types
3908
+ * (`person`, `candidate`, …) keep their own renderers and are configured
3909
+ * through `resolvers` and `urls`; an entry here for one of them is ignored.
3910
+ * Types that are neither built in nor registered render as plain text.
3911
+ */
3912
+ custom?: Record<string, CustomEntityRefConfig>;
3621
3913
  };
3622
3914
 
3623
3915
  /**
@@ -3855,7 +4147,7 @@ export declare const F0AiChatProvider: ({ enabled, side, panelContentSide, initi
3855
4147
  * coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
3856
4148
  * provide the wiring.
3857
4149
  */
3858
- 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;
4150
+ export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, toolbarStart, onTranscribe, searchPersons, mentionSources, onProcessFilesRef, disclaimer, usageLimits, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenSuggestionsPlacement, welcomeScreenSuggestionsCollapsedByDefault, welcomeScreenCards, padding, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
3859
4151
 
3860
4152
  export declare type F0AiChatTextAreaProps = {
3861
4153
  ref: RefObject<HTMLDivElement>;
@@ -3906,8 +4198,20 @@ export declare type F0AiChatTextAreaProps = {
3906
4198
  * reviews and sends it manually). When omitted, the microphone is hidden.
3907
4199
  */
3908
4200
  onTranscribe?: TranscribeFn;
3909
- /** Async search used by the @-mention popover. When omitted, mentions are disabled. */
4201
+ /**
4202
+ * Async person search used by the @-mention popover. It becomes the built-in
4203
+ * `person` mention source, listed first unless `mentionSources` already has
4204
+ * a source of type `"person"`. When both this and `mentionSources` are
4205
+ * omitted, mentions are disabled.
4206
+ */
3910
4207
  searchPersons?: (query: string) => Promise<PersonProfile[]>;
4208
+ /**
4209
+ * Typed @-mention sources. Each source is a group in the popover and its
4210
+ * items are sent as `<entity-ref type="<item.type>" id="<item.id>">label</entity-ref>`.
4211
+ * Mentions are tracked by position, so two items with the same label keep
4212
+ * their own ids. Order the groups with `MentionSource.order`.
4213
+ */
4214
+ mentionSources?: MentionSource[];
3911
4215
  /**
3912
4216
  * Registers a callback that lets external drop zones forward dropped
3913
4217
  * files to this textarea's file-attachment pipeline. The textarea calls
@@ -4123,7 +4427,7 @@ export declare type F0AiInsightCardProps = {
4123
4427
  onAskOne?: () => void;
4124
4428
  } & AiInsightCardContent;
4125
4429
 
4126
- declare type F0AiInsightCardPublicProps = Omit<CardInternalProps, (typeof privateProps)[number]>;
4430
+ declare type F0AiInsightCardPublicProps = Omit<CardInternalProps_2, (typeof privateProps_2)[number]>;
4127
4431
 
4128
4432
  export declare class F0AiMask {
4129
4433
  readonly element: HTMLElement;
@@ -4736,6 +5040,8 @@ declare interface F0CardHorizontalProps {
4736
5040
  descriptionAsSingleLine?: boolean;
4737
5041
  }
4738
5042
 
5043
+ declare type F0CardProps = Omit<CardInternalProps, (typeof privateProps)[number]>;
5044
+
4739
5045
  /**
4740
5046
  * Clarifying question panel — content only, no mount animation.
4741
5047
  *
@@ -5261,6 +5567,50 @@ export declare type MaskOptions = {
5261
5567
  styles?: Partial<CSSStyleDeclaration>;
5262
5568
  };
5263
5569
 
5570
+ /** One row of the @-mention popover, as a {@link MentionSource} returns it. */
5571
+ export declare type MentionItem = {
5572
+ /** Serialised as the `type` attribute of the `<entity-ref>` tag. */
5573
+ type: string;
5574
+ /** Serialised as the `id` attribute of the `<entity-ref>` tag. */
5575
+ id: string;
5576
+ /** Inserted after the `@` in the textarea and used as the tag's text. */
5577
+ label: string;
5578
+ /** Secondary line under the label (job title, unit · policy…). */
5579
+ description?: string;
5580
+ /** Leading slot of the row: a person's avatar, or an icon for most entities. */
5581
+ avatar?: AvatarVariant;
5582
+ };
5583
+
5584
+ /** What a source knows about the message when it is asked to search. */
5585
+ export declare type MentionSearchContext = {
5586
+ /** The full textarea text. */
5587
+ text: string;
5588
+ /** Cursor offset in `text`. */
5589
+ cursor: number;
5590
+ /** Completed mentions that end before the `@` being typed, in text order. */
5591
+ mentionsBefore: TrackedMention[];
5592
+ };
5593
+
5594
+ /**
5595
+ * A typed source of @-mention suggestions. Each source is one group in the
5596
+ * popover.
5597
+ */
5598
+ export declare type MentionSource = {
5599
+ /** Identifies the group. Usually the `type` of the items it returns. */
5600
+ type: string;
5601
+ /** Heading of the group, shown when more than one source is configured. */
5602
+ label: string;
5603
+ /** Returns the rows for `query` (the text between the `@` and the cursor). */
5604
+ search: (query: string, context: MentionSearchContext) => Promise<MentionItem[]>;
5605
+ /**
5606
+ * Where the group sits in the popover: groups sort ascending, `0` when
5607
+ * unset, ties keep the order of the `mentionSources` array. A function lets
5608
+ * a group move up for the message so far, e.g. counters first once a person
5609
+ * is mentioned. Enter and the arrow keys follow the displayed order.
5610
+ */
5611
+ order?: number | ((context: MentionSearchContext) => number);
5612
+ };
5613
+
5264
5614
  /**
5265
5615
  * Loose message shape used by the headless container and its
5266
5616
  * subcomponents. Mirrors the CopilotKit `Message`/`AIMessage` shape
@@ -5598,7 +5948,9 @@ declare interface PongBallProps {
5598
5948
  style?: React.CSSProperties;
5599
5949
  }
5600
5950
 
5601
- declare const privateProps: readonly ["className"];
5951
+ declare const privateProps: readonly ["forceVerticalMetadata", "disableOverlayLink"];
5952
+
5953
+ declare const privateProps_2: readonly ["className"];
5602
5954
 
5603
5955
  declare type Props<Text extends string = string> = {
5604
5956
  text: Text extends "" ? never : Text;
@@ -5885,6 +6237,20 @@ declare interface ThreadItemProps extends ThreadActionHandlers {
5885
6237
  */
5886
6238
  export declare function ThreadListSkeleton(): JSX_2.Element;
5887
6239
 
6240
+ /**
6241
+ * A mention the composer has recorded. It is anchored by the offset of its
6242
+ * `@`, not matched by label, so two mentions with the same label (two people
6243
+ * called "Ana García", or a person and a counter both called "Vacation") keep
6244
+ * their own ids.
6245
+ */
6246
+ export declare type TrackedMention = {
6247
+ type: string;
6248
+ id: string;
6249
+ label: string;
6250
+ /** Offset of the mention's `@` in the textarea text. */
6251
+ start: number;
6252
+ };
6253
+
5888
6254
  /**
5889
6255
  * Transcribes a recorded audio blob to text (voice dictation). The returned
5890
6256
  * promise resolves with the final transcript; `onPartial` delivers
@@ -6068,6 +6434,47 @@ export declare type VacancyProfile = {
6068
6434
  vacancyType?: string;
6069
6435
  };
6070
6436
 
6437
+ declare type ValueDisplayRendererContext_2 = {
6438
+ visualization: ValueDisplayVisualizationType;
6439
+ i18n: TranslationsType;
6440
+ tableAlign?: ValueDisplayTableAlignment;
6441
+ };
6442
+
6443
+ declare const valueDisplayRenderers: {
6444
+ readonly text: (args: TextCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6445
+ readonly longText: (args: LongTextCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6446
+ readonly number: (args: NumberCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6447
+ readonly date: (args: DateCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6448
+ readonly amount: (args: AmountCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6449
+ readonly compound: (args: CompoundCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6450
+ readonly avatarList: (args: AvatarListCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6451
+ readonly status: (args: StatusCellValue_2) => JSX_2.Element;
6452
+ readonly alertTag: (args: AlertTagCellValue_2) => JSX_2.Element;
6453
+ readonly person: (args: PersonCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6454
+ readonly percentage: (args: PercentageCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element | null;
6455
+ readonly progressBar: (args: ProgressBarCellValue_2, _meta: ValueDisplayRendererContext_2) => JSX_2.Element | null;
6456
+ readonly progressSeries: (args: ProgressSeriesCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6457
+ readonly barSeries: (args: BarSeriesCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6458
+ readonly categoryBarChart: (args: CategoryBarChartCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6459
+ readonly hourDistribution: (args: HourDistributionCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6460
+ readonly company: (args: CompanyCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6461
+ readonly team: (args: TeamCellValue_2, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6462
+ readonly tag: (args: TagCellValue_2) => JSX_2.Element;
6463
+ readonly dotTag: (args: DotTagCellValue_2) => JSX_2.Element;
6464
+ readonly tagList: (args: TagListCellValue_2) => JSX_2.Element;
6465
+ readonly icon: (args: IconCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6466
+ readonly file: (args: FileCellValue_2) => JSX_2.Element;
6467
+ readonly folder: (args: FolderCellValue_2) => JSX_2.Element;
6468
+ readonly country: (args: CountryCellValue, context: ValueDisplayRendererContext_2) => JSX_2.Element;
6469
+ readonly delta: (args: DeltaCellValue) => JSX_2.Element;
6470
+ readonly summary: (args: SummaryCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6471
+ readonly count: (args: CountCellValue, meta: ValueDisplayRendererContext_2) => JSX_2.Element;
6472
+ };
6473
+
6474
+ declare type ValueDisplayTableAlignment = "left" | "right";
6475
+
6476
+ declare type ValueDisplayVisualizationType = "table" | "card" | "list" | (string & {});
6477
+
6071
6478
  declare type Variant = (typeof statuses)[number];
6072
6479
 
6073
6480
  /**
@@ -6195,11 +6602,9 @@ declare module "@tiptap/core" {
6195
6602
 
6196
6603
  declare module "@tiptap/core" {
6197
6604
  interface Commands<ReturnType> {
6198
- enhanceHighlight: {
6199
- setEnhanceHighlight: (from: number, to: number, options?: {
6200
- placeholder?: string;
6201
- }) => ReturnType;
6202
- clearEnhanceHighlight: () => ReturnType;
6605
+ fontSize: {
6606
+ setFontSize: (fontSize: string) => ReturnType;
6607
+ unsetFontSize: () => ReturnType;
6203
6608
  };
6204
6609
  }
6205
6610
  }
@@ -6207,9 +6612,11 @@ declare module "@tiptap/core" {
6207
6612
 
6208
6613
  declare module "@tiptap/core" {
6209
6614
  interface Commands<ReturnType> {
6210
- fontSize: {
6211
- setFontSize: (fontSize: string) => ReturnType;
6212
- unsetFontSize: () => ReturnType;
6615
+ enhanceHighlight: {
6616
+ setEnhanceHighlight: (from: number, to: number, options?: {
6617
+ placeholder?: string;
6618
+ }) => ReturnType;
6619
+ clearEnhanceHighlight: () => ReturnType;
6213
6620
  };
6214
6621
  }
6215
6622
  }
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
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-BWGjNwSC.js";
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-BCZjxhVB.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
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-DT4-88F7.js";
3
+ import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-DxlgF3Pt.js";
4
4
  export {
5
5
  g as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -12,9 +12,9 @@ export {
12
12
  I as F0AiChatHeader,
13
13
  T as F0AiChatHistory,
14
14
  o as F0AiChatProvider,
15
- f as F0AiChatTextArea,
16
- y as F0AiChatUsageLimitsButton,
17
- S as F0AiInsightCard,
15
+ S as F0AiChatTextArea,
16
+ f as F0AiChatUsageLimitsButton,
17
+ y as F0AiInsightCard,
18
18
  x as F0AiMask,
19
19
  b as F0AiMessageSources,
20
20
  k as F0AiMessagesContainer,
@@ -22,31 +22,32 @@ export {
22
22
  B as F0AiProcessingOverlay,
23
23
  H as F0AiProposalCard,
24
24
  L as F0AiTableCard,
25
- O as F0AuraVoiceAnimation,
26
- V as F0CanvasCard,
25
+ M as F0AuraVoiceAnimation,
26
+ O as F0CanvasCard,
27
27
  F as F0CanvasPanel,
28
- w as F0ClarifyingPanel,
29
- D as F0HILActionConfirmation,
28
+ V as F0ClarifyingPanel,
29
+ w as F0HILActionConfirmation,
30
30
  C as F0OneIcon,
31
31
  l as F0OneSwitch,
32
- M as FormCardValueFormatterProvider,
32
+ D as FormCardValueFormatterProvider,
33
33
  A as I18nProvider,
34
34
  d as PongBall,
35
35
  z as ThreadItem,
36
36
  E as ThreadListSkeleton,
37
- j as actionItemStatuses,
38
- q as aiTranslations,
39
- G as contentTypes,
37
+ G as actionItemStatuses,
38
+ j as aiTranslations,
39
+ q as contentTypes,
40
+ R as createPersonMentionSource,
40
41
  c as defaultTranslations,
41
- R as markdownRenderers,
42
- U as oneIconSizes,
43
- J as usageLimitsPopoverSides,
42
+ U as markdownRenderers,
43
+ J as oneIconSizes,
44
+ K as usageLimitsPopoverSides,
44
45
  u as useAiChat,
45
- K as useAiChatTranslations,
46
- N as useCanvasEntity,
47
- Q as useChatHistory,
48
- W as useFormCardValueFormatter,
46
+ N as useAiChatTranslations,
47
+ Q as useCanvasEntity,
48
+ W as useChatHistory,
49
+ X as useFormCardValueFormatter,
49
50
  m as useI18n,
50
- X as useSetFormCardValueFormatter,
51
- Y as useToolCallId
51
+ Y as useSetFormCardValueFormatter,
52
+ Z as useToolCallId
52
53
  };