@factorialco/f0-react 4.7.0 → 4.8.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/{F0CanvasPanel-NAs7-9VU.js → F0CanvasPanel-B-6B9ckI.js} +432 -431
- package/dist/ai.d.ts +10 -6
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +178 -6
- package/dist/experimental.js +3207 -2909
- package/dist/f0.d.ts +10 -6
- package/dist/f0.js +6 -6
- package/dist/i18n-provider-defaults.d.ts +10 -6
- package/dist/i18n-provider-defaults.js +4 -0
- package/dist/styles.css +1 -1
- package/dist/{useChatHistory-hrv_qH8R.js → useChatHistory-msevU72I.js} +1 -1
- package/dist/{useDataCollectionSource-Coj9e5oF.js → useDataCollectionSource-Cs0H4TUr.js} +1 -1
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -1810,6 +1810,10 @@ export declare const defaultTranslations: {
|
|
|
1810
1810
|
readonly navigation: {
|
|
1811
1811
|
readonly sidebar: {
|
|
1812
1812
|
readonly label: "Main navigation";
|
|
1813
|
+
readonly search: "Search";
|
|
1814
|
+
readonly tabs: {
|
|
1815
|
+
readonly label: "Sidebar sections";
|
|
1816
|
+
};
|
|
1813
1817
|
readonly companySelector: {
|
|
1814
1818
|
readonly label: "Select a company";
|
|
1815
1819
|
readonly placeholder: "Select a company";
|
|
@@ -4742,8 +4746,10 @@ declare module "@tiptap/core" {
|
|
|
4742
4746
|
|
|
4743
4747
|
declare module "@tiptap/core" {
|
|
4744
4748
|
interface Commands<ReturnType> {
|
|
4745
|
-
|
|
4746
|
-
|
|
4749
|
+
videoEmbed: {
|
|
4750
|
+
setVideoEmbed: (options: {
|
|
4751
|
+
src: string;
|
|
4752
|
+
}) => ReturnType;
|
|
4747
4753
|
};
|
|
4748
4754
|
}
|
|
4749
4755
|
}
|
|
@@ -4751,10 +4757,8 @@ declare module "@tiptap/core" {
|
|
|
4751
4757
|
|
|
4752
4758
|
declare module "@tiptap/core" {
|
|
4753
4759
|
interface Commands<ReturnType> {
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
src: string;
|
|
4757
|
-
}) => ReturnType;
|
|
4760
|
+
transcript: {
|
|
4761
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
4758
4762
|
};
|
|
4759
4763
|
}
|
|
4760
4764
|
}
|
package/dist/ai.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as e, D as r, c as t, F as o, a as i, 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-
|
|
1
|
+
import { C as e, D as r, c as t, F as o, a as i, 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 P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-
|
|
3
|
+
import { A as P, s as v, t as f, w as g, l as p, i as T, q as y, x as S, p as x, r as H, j as V, e as b, g as k, k as w, F as M, h as O, a as D, n as j, m as q, o as z, b as B, f as E, v as L, c as R, d as G, u as J } from "./useChatHistory-msevU72I.js";
|
|
4
4
|
export {
|
|
5
5
|
P as AiChatTranslationsProvider,
|
|
6
6
|
e as ChatSpinner,
|
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";
|
|
@@ -8199,6 +8203,135 @@ export declare const Sidebar: WithDataTestIdReturnType_5<typeof _Sidebar>;
|
|
|
8199
8203
|
|
|
8200
8204
|
declare function _Sidebar({ header, body, footer, onFooterDropdownClick, }: SidebarProps): JSX_2.Element;
|
|
8201
8205
|
|
|
8206
|
+
export declare type SidebarChat = {
|
|
8207
|
+
id: string;
|
|
8208
|
+
label: string;
|
|
8209
|
+
/** Person / team / company avatar (F0Avatar variant). */
|
|
8210
|
+
avatar: AvatarVariant;
|
|
8211
|
+
onClick?: () => void;
|
|
8212
|
+
/** When > 0, the chat is rendered as unread (darker, bolder name). */
|
|
8213
|
+
unreadCount?: number;
|
|
8214
|
+
presence?: SidebarChatPresence;
|
|
8215
|
+
/** Status icon shown to the right of the name. People only. */
|
|
8216
|
+
status?: SidebarChatStatus;
|
|
8217
|
+
/** Epoch ms of the last activity; used for ordering. */
|
|
8218
|
+
lastActivityAt?: number;
|
|
8219
|
+
};
|
|
8220
|
+
|
|
8221
|
+
/**
|
|
8222
|
+
* A top-of-list action in the Messages tab (e.g. "New chat", "New group").
|
|
8223
|
+
* The list renders one ghost button per action, so any number can be added.
|
|
8224
|
+
*/
|
|
8225
|
+
export declare type SidebarChatAction = {
|
|
8226
|
+
label: string;
|
|
8227
|
+
icon?: IconType;
|
|
8228
|
+
onClick?: () => void;
|
|
8229
|
+
};
|
|
8230
|
+
|
|
8231
|
+
export declare type SidebarChatActions = Omit<SidebarChatStore, "groups" | "activeChatId" | "unreadChatsCount">;
|
|
8232
|
+
|
|
8233
|
+
export declare type SidebarChatGroup = {
|
|
8234
|
+
id: string;
|
|
8235
|
+
title: string;
|
|
8236
|
+
/** Initial open state of the collapsible group. @default true */
|
|
8237
|
+
isOpen?: boolean;
|
|
8238
|
+
chats: SidebarChat[];
|
|
8239
|
+
};
|
|
8240
|
+
|
|
8241
|
+
export declare const SidebarChatItem: ({ chat, isActive, onClick, }: {
|
|
8242
|
+
chat: SidebarChat;
|
|
8243
|
+
isActive: boolean;
|
|
8244
|
+
onClick: () => void;
|
|
8245
|
+
}) => JSX_2.Element;
|
|
8246
|
+
|
|
8247
|
+
/**
|
|
8248
|
+
* Body of the "Messages" tab: chat groups read from `SidebarChatProvider`.
|
|
8249
|
+
* Chats fade in/out as they are added/removed; live reordering from the store
|
|
8250
|
+
* is applied instantly (Slack-style), without layout projection — that avoids
|
|
8251
|
+
* the resize-like "bounce" when the tab mounts.
|
|
8252
|
+
*/
|
|
8253
|
+
export declare const SidebarChatList: ({ actions, }: {
|
|
8254
|
+
/** Ghost actions rendered at the very top (e.g. New chat, New group). */
|
|
8255
|
+
actions?: SidebarChatAction[];
|
|
8256
|
+
}) => JSX_2.Element;
|
|
8257
|
+
|
|
8258
|
+
export declare type SidebarChatPresence = "online" | "offline";
|
|
8259
|
+
|
|
8260
|
+
export declare const SidebarChatProvider: ({ children, initialGroups, initialActiveChatId, }: SidebarChatProviderProps) => JSX_2.Element;
|
|
8261
|
+
|
|
8262
|
+
export declare type SidebarChatProviderProps = {
|
|
8263
|
+
children: ReactNode;
|
|
8264
|
+
/** Initial chat groups. Live updates are applied through the store actions. */
|
|
8265
|
+
initialGroups?: SidebarChatGroup[];
|
|
8266
|
+
/** Initially active chat id. Chats are not navigation links (see store). */
|
|
8267
|
+
initialActiveChatId?: string;
|
|
8268
|
+
};
|
|
8269
|
+
|
|
8270
|
+
/**
|
|
8271
|
+
* Status shown as a small icon avatar to the right of a person's name (people
|
|
8272
|
+
* only). The consumer fully controls it — pass any icon with an accessible
|
|
8273
|
+
* label. F0 does not hardcode any set of statuses.
|
|
8274
|
+
*/
|
|
8275
|
+
export declare type SidebarChatStatus = {
|
|
8276
|
+
icon: IconType;
|
|
8277
|
+
label: string;
|
|
8278
|
+
};
|
|
8279
|
+
|
|
8280
|
+
/**
|
|
8281
|
+
* Imperative store API exposed by `useSidebarChats`. Every mutation is stable
|
|
8282
|
+
* (identity preserved across renders) so it can be called from anywhere with
|
|
8283
|
+
* access to the context — e.g. a websocket handler pushing live updates.
|
|
8284
|
+
*/
|
|
8285
|
+
export declare type SidebarChatStore = {
|
|
8286
|
+
groups: SidebarChatGroup[];
|
|
8287
|
+
/**
|
|
8288
|
+
* Id of the currently active chat. Chats are not navigation links — you can
|
|
8289
|
+
* be on any page (e.g. the dashboard) with a chat active — so the active
|
|
8290
|
+
* state is driven from here, not from the router.
|
|
8291
|
+
*/
|
|
8292
|
+
activeChatId?: string;
|
|
8293
|
+
/** Number of conversations with unread messages (across all groups). */
|
|
8294
|
+
unreadChatsCount: number;
|
|
8295
|
+
/** Replace the whole tree. */
|
|
8296
|
+
setGroups: (groups: SidebarChatGroup[]) => void;
|
|
8297
|
+
/** Set (or clear, with `null`) the active chat. */
|
|
8298
|
+
setActiveChat: (id: string | null) => void;
|
|
8299
|
+
/** Insert a chat into a group, or update it in place if it already exists. */
|
|
8300
|
+
upsertChat: (groupId: string, chat: SidebarChat) => void;
|
|
8301
|
+
/** Patch an existing chat by id, regardless of its group. */
|
|
8302
|
+
updateChat: (id: string, patch: Partial<SidebarChat>) => void;
|
|
8303
|
+
/** Remove a chat by id. */
|
|
8304
|
+
removeChat: (id: string) => void;
|
|
8305
|
+
/** Convenience setter for the unread counter of a chat. */
|
|
8306
|
+
setUnread: (id: string, count: number) => void;
|
|
8307
|
+
/** Reorder the chats of a group given the new ordered list of ids. */
|
|
8308
|
+
reorder: (groupId: string, orderedIds: string[]) => void;
|
|
8309
|
+
};
|
|
8310
|
+
|
|
8311
|
+
/**
|
|
8312
|
+
* Collapsible titled section used across the Sidebar (navigation categories,
|
|
8313
|
+
* chat groups). Title + rotating chevron + animated height.
|
|
8314
|
+
*/
|
|
8315
|
+
export declare const SidebarCollapsibleSection: ({ title, isOpen: initialIsOpen, isRoot, onCollapse, children, highlightWhenCollapsed, isDragging, wasDragging, }: SidebarCollapsibleSectionProps) => JSX_2.Element;
|
|
8316
|
+
|
|
8317
|
+
export declare interface SidebarCollapsibleSectionProps {
|
|
8318
|
+
title: string;
|
|
8319
|
+
/** Initial open state. @default true */
|
|
8320
|
+
isOpen?: boolean;
|
|
8321
|
+
/** Root sections render their content without the collapsible header. */
|
|
8322
|
+
isRoot?: boolean;
|
|
8323
|
+
onCollapse?: (isOpen: boolean) => void;
|
|
8324
|
+
children?: ReactNode;
|
|
8325
|
+
/**
|
|
8326
|
+
* Emphasises the title (darker, bolder) while the section is collapsed —
|
|
8327
|
+
* Slack-style hint that hidden items need attention (e.g. unread chats).
|
|
8328
|
+
*/
|
|
8329
|
+
highlightWhenCollapsed?: boolean;
|
|
8330
|
+
/** Drag-aware guards used by the sortable Menu; safe to omit elsewhere. */
|
|
8331
|
+
isDragging?: boolean;
|
|
8332
|
+
wasDragging?: RefObject<boolean>;
|
|
8333
|
+
}
|
|
8334
|
+
|
|
8202
8335
|
export declare function SidebarFooter({ user, options, showActivityButton, activityButtonShortcut, onActivityButtonClick, onDropdownClick, hasActivityUpdates, }: SidebarFooterProps): JSX_2.Element;
|
|
8203
8336
|
|
|
8204
8337
|
declare interface SidebarFooterProps {
|
|
@@ -8233,6 +8366,35 @@ declare interface SidebarProps {
|
|
|
8233
8366
|
|
|
8234
8367
|
declare type SidebarState = "locked" | "unlocked" | "hidden";
|
|
8235
8368
|
|
|
8369
|
+
export declare type SidebarTab = {
|
|
8370
|
+
id: string;
|
|
8371
|
+
label: string;
|
|
8372
|
+
icon: IconType;
|
|
8373
|
+
/** Unread counter shown next to the tab. */
|
|
8374
|
+
badge?: number;
|
|
8375
|
+
};
|
|
8376
|
+
|
|
8377
|
+
/**
|
|
8378
|
+
* Tab switcher that replaces the `SearchBar` row when the Sidebar gains tabs.
|
|
8379
|
+
* The active tab shows icon + label (animated in); inactive tabs are
|
|
8380
|
+
* icon-only. Search becomes an icon button on the right.
|
|
8381
|
+
*
|
|
8382
|
+
* When no tabs are needed, keep composing the Sidebar header with `SearchBar`
|
|
8383
|
+
* instead — that path is unchanged.
|
|
8384
|
+
*/
|
|
8385
|
+
export declare const SidebarTabs: ({ tabs, activeTab, onTabChange, search, }: SidebarTabsProps) => JSX_2.Element;
|
|
8386
|
+
|
|
8387
|
+
export declare type SidebarTabsProps = {
|
|
8388
|
+
tabs: SidebarTab[];
|
|
8389
|
+
activeTab: string;
|
|
8390
|
+
onTabChange: (id: string) => void;
|
|
8391
|
+
search: {
|
|
8392
|
+
/** Accessible label / tooltip for the search icon button. */
|
|
8393
|
+
placeholder?: string;
|
|
8394
|
+
onClick?: () => void;
|
|
8395
|
+
};
|
|
8396
|
+
};
|
|
8397
|
+
|
|
8236
8398
|
/**
|
|
8237
8399
|
* Response structure for non-paginated data
|
|
8238
8400
|
*/
|
|
@@ -9257,6 +9419,16 @@ declare interface User_2 {
|
|
|
9257
9419
|
|
|
9258
9420
|
export declare function useSidebar(): FrameContextType;
|
|
9259
9421
|
|
|
9422
|
+
/**
|
|
9423
|
+
* Access only the mutation actions, without subscribing to state changes.
|
|
9424
|
+
* Use this from code that pushes updates (e.g. websocket handlers) so it
|
|
9425
|
+
* doesn't re-render on every chat change.
|
|
9426
|
+
*/
|
|
9427
|
+
export declare const useSidebarChatActions: () => SidebarChatActions;
|
|
9428
|
+
|
|
9429
|
+
/** Read the chat state (groups, active chat) and the imperative store API. */
|
|
9430
|
+
export declare const useSidebarChats: () => SidebarChatStore;
|
|
9431
|
+
|
|
9260
9432
|
/**
|
|
9261
9433
|
* Profile data for a vacancy entity (ATS vacancy/position), resolved asynchronously
|
|
9262
9434
|
* and displayed in the entity reference hover card.
|
|
@@ -9802,8 +9974,10 @@ declare module "@tiptap/core" {
|
|
|
9802
9974
|
|
|
9803
9975
|
declare module "@tiptap/core" {
|
|
9804
9976
|
interface Commands<ReturnType> {
|
|
9805
|
-
|
|
9806
|
-
|
|
9977
|
+
videoEmbed: {
|
|
9978
|
+
setVideoEmbed: (options: {
|
|
9979
|
+
src: string;
|
|
9980
|
+
}) => ReturnType;
|
|
9807
9981
|
};
|
|
9808
9982
|
}
|
|
9809
9983
|
}
|
|
@@ -9811,10 +9985,8 @@ declare module "@tiptap/core" {
|
|
|
9811
9985
|
|
|
9812
9986
|
declare module "@tiptap/core" {
|
|
9813
9987
|
interface Commands<ReturnType> {
|
|
9814
|
-
|
|
9815
|
-
|
|
9816
|
-
src: string;
|
|
9817
|
-
}) => ReturnType;
|
|
9988
|
+
transcript: {
|
|
9989
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
9818
9990
|
};
|
|
9819
9991
|
}
|
|
9820
9992
|
}
|