@factorialco/f0-react 4.7.0 → 4.9.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/{useChatHistory-hrv_qH8R.js → F0AiProcessingOverlay-B8K7o_Ei.js} +1386 -1292
- package/dist/{F0CanvasPanel-NAs7-9VU.js → F0CanvasPanel-B-6B9ckI.js} +432 -431
- package/dist/ai.d.ts +35 -0
- package/dist/ai.js +24 -23
- package/dist/experimental.d.ts +173 -0
- package/dist/experimental.js +3207 -2909
- package/dist/f0.d.ts +35 -0
- package/dist/f0.js +81 -80
- package/dist/i18n-provider-defaults.d.ts +5 -0
- package/dist/i18n-provider-defaults.js +5 -0
- package/dist/styles.css +1 -1
- package/dist/{useDataCollectionSource-Coj9e5oF.js → useDataCollectionSource-Cs0H4TUr.js} +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { HTMLAttributes } from 'react';
|
|
|
20
20
|
import { ItemProps } from './types';
|
|
21
21
|
import { JSX as JSX_2 } from 'react';
|
|
22
22
|
import { LocalAudioTrack } from 'livekit-client';
|
|
23
|
+
import { NamedExoticComponent } from 'react';
|
|
23
24
|
import { Props as Props_3 } from './types';
|
|
24
25
|
import * as React_2 from 'react';
|
|
25
26
|
import { ReactElement } from 'react';
|
|
@@ -607,6 +608,7 @@ export declare const aiTranslations: {
|
|
|
607
608
|
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
608
609
|
readonly stopAnswerGeneration: "Stop generating";
|
|
609
610
|
readonly responseStopped: "You stopped this response";
|
|
611
|
+
readonly applyingChanges: "Applying changes";
|
|
610
612
|
readonly sendMessage: "Send message";
|
|
611
613
|
readonly thoughtsGroupTitle: "Reasoning";
|
|
612
614
|
readonly resourcesGroupTitle: "Resources";
|
|
@@ -1810,6 +1812,10 @@ export declare const defaultTranslations: {
|
|
|
1810
1812
|
readonly navigation: {
|
|
1811
1813
|
readonly sidebar: {
|
|
1812
1814
|
readonly label: "Main navigation";
|
|
1815
|
+
readonly search: "Search";
|
|
1816
|
+
readonly tabs: {
|
|
1817
|
+
readonly label: "Sidebar sections";
|
|
1818
|
+
};
|
|
1813
1819
|
readonly companySelector: {
|
|
1814
1820
|
readonly label: "Select a company";
|
|
1815
1821
|
readonly placeholder: "Select a company";
|
|
@@ -2106,6 +2112,7 @@ export declare const defaultTranslations: {
|
|
|
2106
2112
|
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
2107
2113
|
readonly stopAnswerGeneration: "Stop generating";
|
|
2108
2114
|
readonly responseStopped: "You stopped this response";
|
|
2115
|
+
readonly applyingChanges: "Applying changes";
|
|
2109
2116
|
readonly sendMessage: "Send message";
|
|
2110
2117
|
readonly thoughtsGroupTitle: "Reasoning";
|
|
2111
2118
|
readonly resourcesGroupTitle: "Resources";
|
|
@@ -3018,6 +3025,34 @@ declare interface F0AiPongProps {
|
|
|
3018
3025
|
onClose: () => void;
|
|
3019
3026
|
}
|
|
3020
3027
|
|
|
3028
|
+
/**
|
|
3029
|
+
* Wraps a panel/canvas that F0AiChat is regenerating. While `active`, the
|
|
3030
|
+
* content blurs and stops receiving pointer events, and a centered pill — the
|
|
3031
|
+
* One icon plus an "Applying changes" label — floats over it, so the user gets
|
|
3032
|
+
* clear feedback that the surface is being updated and shouldn't be edited.
|
|
3033
|
+
*
|
|
3034
|
+
* Mirrors the survey form-builder "applying changes" affordance, lifted into
|
|
3035
|
+
* the F0AiChat family so any surface paired with the chat can reuse it.
|
|
3036
|
+
*/
|
|
3037
|
+
export declare const F0AiProcessingOverlay: NamedExoticComponent<F0AiProcessingOverlayProps>;
|
|
3038
|
+
|
|
3039
|
+
export declare interface F0AiProcessingOverlayProps {
|
|
3040
|
+
/**
|
|
3041
|
+
* When `true`, the wrapped content is blurred and locked
|
|
3042
|
+
* (`pointer-events-none`) and the floating status pill is shown over it.
|
|
3043
|
+
*/
|
|
3044
|
+
active: boolean;
|
|
3045
|
+
/**
|
|
3046
|
+
* Pill label. Defaults to the translated "Applying changes"
|
|
3047
|
+
* (`ai.applyingChanges`).
|
|
3048
|
+
*/
|
|
3049
|
+
label?: string;
|
|
3050
|
+
/** Extra classes for the wrapper element. */
|
|
3051
|
+
className?: string;
|
|
3052
|
+
/** The panel/canvas content the assistant is editing. */
|
|
3053
|
+
children: ReactNode;
|
|
3054
|
+
}
|
|
3055
|
+
|
|
3021
3056
|
export declare function F0AiProposalCard(props: F0AiProposalCardProps): JSX_2.Element;
|
|
3022
3057
|
|
|
3023
3058
|
export declare namespace F0AiProposalCard {
|
package/dist/ai.js
CHANGED
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { C as e, D as r, c as
|
|
1
|
+
import { C as e, D as r, c as i, F as o, a as t, f as n, g as F, d as C, e as A, I as l, P as d, b as u, u as m } from "./F0CanvasPanel-B-6B9ckI.js";
|
|
2
2
|
import { defaultTranslations as c } from "./i18n-provider-defaults.js";
|
|
3
|
-
import { A as
|
|
3
|
+
import { A as v, s as I, t as g, w as f, l as p, i as y, q as T, x as S, y as x, p as H, r as O, j as V, e as b, g as k, k as w, F as M, h as D, a as j, n as q, m as z, o as B, b as E, f as L, v as R, c as G, d as J, u as K } from "./F0AiProcessingOverlay-B8K7o_Ei.js";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
v as AiChatTranslationsProvider,
|
|
6
6
|
e as ChatSpinner,
|
|
7
7
|
r as DropOverlay,
|
|
8
|
-
|
|
8
|
+
i as F0ActionItem,
|
|
9
9
|
o as F0AiChat,
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
I as F0AiChatHeader,
|
|
11
|
+
g as F0AiChatHistory,
|
|
12
|
+
t as F0AiChatProvider,
|
|
13
|
+
f as F0AiChatTextArea,
|
|
14
14
|
p as F0AiInsightCard,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
y as F0AiMask,
|
|
16
|
+
T as F0AiMessageSources,
|
|
17
17
|
S as F0AiMessagesContainer,
|
|
18
18
|
n as F0AiPong,
|
|
19
|
-
x as
|
|
20
|
-
H as
|
|
19
|
+
x as F0AiProcessingOverlay,
|
|
20
|
+
H as F0AiProposalCard,
|
|
21
|
+
O as F0AiTableCard,
|
|
21
22
|
V as F0AuraVoiceAnimation,
|
|
22
23
|
b as F0CanvasCard,
|
|
23
24
|
F as F0CanvasPanel,
|
|
@@ -28,18 +29,18 @@ export {
|
|
|
28
29
|
M as FormCardValueFormatterProvider,
|
|
29
30
|
l as I18nProvider,
|
|
30
31
|
d as PongBall,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
D as actionItemStatuses,
|
|
33
|
+
j as aiTranslations,
|
|
34
|
+
q as contentTypes,
|
|
34
35
|
c as defaultTranslations,
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
z as markdownRenderers,
|
|
37
|
+
B as oneIconSizes,
|
|
37
38
|
u as useAiChat,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
E as useAiChatTranslations,
|
|
40
|
+
L as useCanvasEntity,
|
|
41
|
+
R as useChatHistory,
|
|
42
|
+
G as useFormCardValueFormatter,
|
|
42
43
|
m as useI18n,
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
J as useSetFormCardValueFormatter,
|
|
45
|
+
K as useToolCallId
|
|
45
46
|
};
|
package/dist/experimental.d.ts
CHANGED
|
@@ -3170,6 +3170,10 @@ declare const defaultTranslations: {
|
|
|
3170
3170
|
readonly navigation: {
|
|
3171
3171
|
readonly sidebar: {
|
|
3172
3172
|
readonly label: "Main navigation";
|
|
3173
|
+
readonly search: "Search";
|
|
3174
|
+
readonly tabs: {
|
|
3175
|
+
readonly label: "Sidebar sections";
|
|
3176
|
+
};
|
|
3173
3177
|
readonly companySelector: {
|
|
3174
3178
|
readonly label: "Select a company";
|
|
3175
3179
|
readonly placeholder: "Select a company";
|
|
@@ -3466,6 +3470,7 @@ declare const defaultTranslations: {
|
|
|
3466
3470
|
readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
|
|
3467
3471
|
readonly stopAnswerGeneration: "Stop generating";
|
|
3468
3472
|
readonly responseStopped: "You stopped this response";
|
|
3473
|
+
readonly applyingChanges: "Applying changes";
|
|
3469
3474
|
readonly sendMessage: "Send message";
|
|
3470
3475
|
readonly thoughtsGroupTitle: "Reasoning";
|
|
3471
3476
|
readonly resourcesGroupTitle: "Resources";
|
|
@@ -8199,6 +8204,135 @@ export declare const Sidebar: WithDataTestIdReturnType_5<typeof _Sidebar>;
|
|
|
8199
8204
|
|
|
8200
8205
|
declare function _Sidebar({ header, body, footer, onFooterDropdownClick, }: SidebarProps): JSX_2.Element;
|
|
8201
8206
|
|
|
8207
|
+
export declare type SidebarChat = {
|
|
8208
|
+
id: string;
|
|
8209
|
+
label: string;
|
|
8210
|
+
/** Person / team / company avatar (F0Avatar variant). */
|
|
8211
|
+
avatar: AvatarVariant;
|
|
8212
|
+
onClick?: () => void;
|
|
8213
|
+
/** When > 0, the chat is rendered as unread (darker, bolder name). */
|
|
8214
|
+
unreadCount?: number;
|
|
8215
|
+
presence?: SidebarChatPresence;
|
|
8216
|
+
/** Status icon shown to the right of the name. People only. */
|
|
8217
|
+
status?: SidebarChatStatus;
|
|
8218
|
+
/** Epoch ms of the last activity; used for ordering. */
|
|
8219
|
+
lastActivityAt?: number;
|
|
8220
|
+
};
|
|
8221
|
+
|
|
8222
|
+
/**
|
|
8223
|
+
* A top-of-list action in the Messages tab (e.g. "New chat", "New group").
|
|
8224
|
+
* The list renders one ghost button per action, so any number can be added.
|
|
8225
|
+
*/
|
|
8226
|
+
export declare type SidebarChatAction = {
|
|
8227
|
+
label: string;
|
|
8228
|
+
icon?: IconType;
|
|
8229
|
+
onClick?: () => void;
|
|
8230
|
+
};
|
|
8231
|
+
|
|
8232
|
+
export declare type SidebarChatActions = Omit<SidebarChatStore, "groups" | "activeChatId" | "unreadChatsCount">;
|
|
8233
|
+
|
|
8234
|
+
export declare type SidebarChatGroup = {
|
|
8235
|
+
id: string;
|
|
8236
|
+
title: string;
|
|
8237
|
+
/** Initial open state of the collapsible group. @default true */
|
|
8238
|
+
isOpen?: boolean;
|
|
8239
|
+
chats: SidebarChat[];
|
|
8240
|
+
};
|
|
8241
|
+
|
|
8242
|
+
export declare const SidebarChatItem: ({ chat, isActive, onClick, }: {
|
|
8243
|
+
chat: SidebarChat;
|
|
8244
|
+
isActive: boolean;
|
|
8245
|
+
onClick: () => void;
|
|
8246
|
+
}) => JSX_2.Element;
|
|
8247
|
+
|
|
8248
|
+
/**
|
|
8249
|
+
* Body of the "Messages" tab: chat groups read from `SidebarChatProvider`.
|
|
8250
|
+
* Chats fade in/out as they are added/removed; live reordering from the store
|
|
8251
|
+
* is applied instantly (Slack-style), without layout projection — that avoids
|
|
8252
|
+
* the resize-like "bounce" when the tab mounts.
|
|
8253
|
+
*/
|
|
8254
|
+
export declare const SidebarChatList: ({ actions, }: {
|
|
8255
|
+
/** Ghost actions rendered at the very top (e.g. New chat, New group). */
|
|
8256
|
+
actions?: SidebarChatAction[];
|
|
8257
|
+
}) => JSX_2.Element;
|
|
8258
|
+
|
|
8259
|
+
export declare type SidebarChatPresence = "online" | "offline";
|
|
8260
|
+
|
|
8261
|
+
export declare const SidebarChatProvider: ({ children, initialGroups, initialActiveChatId, }: SidebarChatProviderProps) => JSX_2.Element;
|
|
8262
|
+
|
|
8263
|
+
export declare type SidebarChatProviderProps = {
|
|
8264
|
+
children: ReactNode;
|
|
8265
|
+
/** Initial chat groups. Live updates are applied through the store actions. */
|
|
8266
|
+
initialGroups?: SidebarChatGroup[];
|
|
8267
|
+
/** Initially active chat id. Chats are not navigation links (see store). */
|
|
8268
|
+
initialActiveChatId?: string;
|
|
8269
|
+
};
|
|
8270
|
+
|
|
8271
|
+
/**
|
|
8272
|
+
* Status shown as a small icon avatar to the right of a person's name (people
|
|
8273
|
+
* only). The consumer fully controls it — pass any icon with an accessible
|
|
8274
|
+
* label. F0 does not hardcode any set of statuses.
|
|
8275
|
+
*/
|
|
8276
|
+
export declare type SidebarChatStatus = {
|
|
8277
|
+
icon: IconType;
|
|
8278
|
+
label: string;
|
|
8279
|
+
};
|
|
8280
|
+
|
|
8281
|
+
/**
|
|
8282
|
+
* Imperative store API exposed by `useSidebarChats`. Every mutation is stable
|
|
8283
|
+
* (identity preserved across renders) so it can be called from anywhere with
|
|
8284
|
+
* access to the context — e.g. a websocket handler pushing live updates.
|
|
8285
|
+
*/
|
|
8286
|
+
export declare type SidebarChatStore = {
|
|
8287
|
+
groups: SidebarChatGroup[];
|
|
8288
|
+
/**
|
|
8289
|
+
* Id of the currently active chat. Chats are not navigation links — you can
|
|
8290
|
+
* be on any page (e.g. the dashboard) with a chat active — so the active
|
|
8291
|
+
* state is driven from here, not from the router.
|
|
8292
|
+
*/
|
|
8293
|
+
activeChatId?: string;
|
|
8294
|
+
/** Number of conversations with unread messages (across all groups). */
|
|
8295
|
+
unreadChatsCount: number;
|
|
8296
|
+
/** Replace the whole tree. */
|
|
8297
|
+
setGroups: (groups: SidebarChatGroup[]) => void;
|
|
8298
|
+
/** Set (or clear, with `null`) the active chat. */
|
|
8299
|
+
setActiveChat: (id: string | null) => void;
|
|
8300
|
+
/** Insert a chat into a group, or update it in place if it already exists. */
|
|
8301
|
+
upsertChat: (groupId: string, chat: SidebarChat) => void;
|
|
8302
|
+
/** Patch an existing chat by id, regardless of its group. */
|
|
8303
|
+
updateChat: (id: string, patch: Partial<SidebarChat>) => void;
|
|
8304
|
+
/** Remove a chat by id. */
|
|
8305
|
+
removeChat: (id: string) => void;
|
|
8306
|
+
/** Convenience setter for the unread counter of a chat. */
|
|
8307
|
+
setUnread: (id: string, count: number) => void;
|
|
8308
|
+
/** Reorder the chats of a group given the new ordered list of ids. */
|
|
8309
|
+
reorder: (groupId: string, orderedIds: string[]) => void;
|
|
8310
|
+
};
|
|
8311
|
+
|
|
8312
|
+
/**
|
|
8313
|
+
* Collapsible titled section used across the Sidebar (navigation categories,
|
|
8314
|
+
* chat groups). Title + rotating chevron + animated height.
|
|
8315
|
+
*/
|
|
8316
|
+
export declare const SidebarCollapsibleSection: ({ title, isOpen: initialIsOpen, isRoot, onCollapse, children, highlightWhenCollapsed, isDragging, wasDragging, }: SidebarCollapsibleSectionProps) => JSX_2.Element;
|
|
8317
|
+
|
|
8318
|
+
export declare interface SidebarCollapsibleSectionProps {
|
|
8319
|
+
title: string;
|
|
8320
|
+
/** Initial open state. @default true */
|
|
8321
|
+
isOpen?: boolean;
|
|
8322
|
+
/** Root sections render their content without the collapsible header. */
|
|
8323
|
+
isRoot?: boolean;
|
|
8324
|
+
onCollapse?: (isOpen: boolean) => void;
|
|
8325
|
+
children?: ReactNode;
|
|
8326
|
+
/**
|
|
8327
|
+
* Emphasises the title (darker, bolder) while the section is collapsed —
|
|
8328
|
+
* Slack-style hint that hidden items need attention (e.g. unread chats).
|
|
8329
|
+
*/
|
|
8330
|
+
highlightWhenCollapsed?: boolean;
|
|
8331
|
+
/** Drag-aware guards used by the sortable Menu; safe to omit elsewhere. */
|
|
8332
|
+
isDragging?: boolean;
|
|
8333
|
+
wasDragging?: RefObject<boolean>;
|
|
8334
|
+
}
|
|
8335
|
+
|
|
8202
8336
|
export declare function SidebarFooter({ user, options, showActivityButton, activityButtonShortcut, onActivityButtonClick, onDropdownClick, hasActivityUpdates, }: SidebarFooterProps): JSX_2.Element;
|
|
8203
8337
|
|
|
8204
8338
|
declare interface SidebarFooterProps {
|
|
@@ -8233,6 +8367,35 @@ declare interface SidebarProps {
|
|
|
8233
8367
|
|
|
8234
8368
|
declare type SidebarState = "locked" | "unlocked" | "hidden";
|
|
8235
8369
|
|
|
8370
|
+
export declare type SidebarTab = {
|
|
8371
|
+
id: string;
|
|
8372
|
+
label: string;
|
|
8373
|
+
icon: IconType;
|
|
8374
|
+
/** Unread counter shown next to the tab. */
|
|
8375
|
+
badge?: number;
|
|
8376
|
+
};
|
|
8377
|
+
|
|
8378
|
+
/**
|
|
8379
|
+
* Tab switcher that replaces the `SearchBar` row when the Sidebar gains tabs.
|
|
8380
|
+
* The active tab shows icon + label (animated in); inactive tabs are
|
|
8381
|
+
* icon-only. Search becomes an icon button on the right.
|
|
8382
|
+
*
|
|
8383
|
+
* When no tabs are needed, keep composing the Sidebar header with `SearchBar`
|
|
8384
|
+
* instead — that path is unchanged.
|
|
8385
|
+
*/
|
|
8386
|
+
export declare const SidebarTabs: ({ tabs, activeTab, onTabChange, search, }: SidebarTabsProps) => JSX_2.Element;
|
|
8387
|
+
|
|
8388
|
+
export declare type SidebarTabsProps = {
|
|
8389
|
+
tabs: SidebarTab[];
|
|
8390
|
+
activeTab: string;
|
|
8391
|
+
onTabChange: (id: string) => void;
|
|
8392
|
+
search: {
|
|
8393
|
+
/** Accessible label / tooltip for the search icon button. */
|
|
8394
|
+
placeholder?: string;
|
|
8395
|
+
onClick?: () => void;
|
|
8396
|
+
};
|
|
8397
|
+
};
|
|
8398
|
+
|
|
8236
8399
|
/**
|
|
8237
8400
|
* Response structure for non-paginated data
|
|
8238
8401
|
*/
|
|
@@ -9257,6 +9420,16 @@ declare interface User_2 {
|
|
|
9257
9420
|
|
|
9258
9421
|
export declare function useSidebar(): FrameContextType;
|
|
9259
9422
|
|
|
9423
|
+
/**
|
|
9424
|
+
* Access only the mutation actions, without subscribing to state changes.
|
|
9425
|
+
* Use this from code that pushes updates (e.g. websocket handlers) so it
|
|
9426
|
+
* doesn't re-render on every chat change.
|
|
9427
|
+
*/
|
|
9428
|
+
export declare const useSidebarChatActions: () => SidebarChatActions;
|
|
9429
|
+
|
|
9430
|
+
/** Read the chat state (groups, active chat) and the imperative store API. */
|
|
9431
|
+
export declare const useSidebarChats: () => SidebarChatStore;
|
|
9432
|
+
|
|
9260
9433
|
/**
|
|
9261
9434
|
* Profile data for a vacancy entity (ATS vacancy/position), resolved asynchronously
|
|
9262
9435
|
* and displayed in the entity reference hover card.
|