@factorialco/f0-react 4.6.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 +15 -11
- package/dist/ai.js +2 -2
- package/dist/experimental.d.ts +184 -11
- package/dist/experimental.js +3212 -2911
- package/dist/f0.d.ts +15 -11
- package/dist/f0.js +6 -6
- package/dist/i18n-provider-defaults.d.ts +15 -11
- 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";
|
|
@@ -4719,15 +4723,6 @@ declare module "@tiptap/core" {
|
|
|
4719
4723
|
}
|
|
4720
4724
|
|
|
4721
4725
|
|
|
4722
|
-
declare module "@tiptap/core" {
|
|
4723
|
-
interface Commands<ReturnType> {
|
|
4724
|
-
moodTracker: {
|
|
4725
|
-
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
4726
|
-
};
|
|
4727
|
-
}
|
|
4728
|
-
}
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
4726
|
declare module "@tiptap/core" {
|
|
4732
4727
|
interface Commands<ReturnType> {
|
|
4733
4728
|
enhanceHighlight: {
|
|
@@ -4742,8 +4737,8 @@ declare module "@tiptap/core" {
|
|
|
4742
4737
|
|
|
4743
4738
|
declare module "@tiptap/core" {
|
|
4744
4739
|
interface Commands<ReturnType> {
|
|
4745
|
-
|
|
4746
|
-
|
|
4740
|
+
moodTracker: {
|
|
4741
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
4747
4742
|
};
|
|
4748
4743
|
}
|
|
4749
4744
|
}
|
|
@@ -4760,6 +4755,15 @@ declare module "@tiptap/core" {
|
|
|
4760
4755
|
}
|
|
4761
4756
|
|
|
4762
4757
|
|
|
4758
|
+
declare module "@tiptap/core" {
|
|
4759
|
+
interface Commands<ReturnType> {
|
|
4760
|
+
transcript: {
|
|
4761
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
4762
|
+
};
|
|
4763
|
+
}
|
|
4764
|
+
}
|
|
4765
|
+
|
|
4766
|
+
|
|
4763
4767
|
declare namespace F0GraphNodeWrapperInner {
|
|
4764
4768
|
var displayName: string;
|
|
4765
4769
|
}
|
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";
|
|
@@ -6349,6 +6353,7 @@ export declare interface MenuCategory {
|
|
|
6349
6353
|
export declare interface MenuItem extends NavigationItem {
|
|
6350
6354
|
icon: IconType;
|
|
6351
6355
|
badge?: number;
|
|
6356
|
+
tag?: string;
|
|
6352
6357
|
}
|
|
6353
6358
|
|
|
6354
6359
|
export declare interface MenuProps {
|
|
@@ -8198,6 +8203,135 @@ export declare const Sidebar: WithDataTestIdReturnType_5<typeof _Sidebar>;
|
|
|
8198
8203
|
|
|
8199
8204
|
declare function _Sidebar({ header, body, footer, onFooterDropdownClick, }: SidebarProps): JSX_2.Element;
|
|
8200
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
|
+
|
|
8201
8335
|
export declare function SidebarFooter({ user, options, showActivityButton, activityButtonShortcut, onActivityButtonClick, onDropdownClick, hasActivityUpdates, }: SidebarFooterProps): JSX_2.Element;
|
|
8202
8336
|
|
|
8203
8337
|
declare interface SidebarFooterProps {
|
|
@@ -8232,6 +8366,35 @@ declare interface SidebarProps {
|
|
|
8232
8366
|
|
|
8233
8367
|
declare type SidebarState = "locked" | "unlocked" | "hidden";
|
|
8234
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
|
+
|
|
8235
8398
|
/**
|
|
8236
8399
|
* Response structure for non-paginated data
|
|
8237
8400
|
*/
|
|
@@ -9256,6 +9419,16 @@ declare interface User_2 {
|
|
|
9256
9419
|
|
|
9257
9420
|
export declare function useSidebar(): FrameContextType;
|
|
9258
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
|
+
|
|
9259
9432
|
/**
|
|
9260
9433
|
* Profile data for a vacancy entity (ATS vacancy/position), resolved asynchronously
|
|
9261
9434
|
* and displayed in the entity reference hover card.
|
|
@@ -9778,15 +9951,6 @@ declare module "@tiptap/core" {
|
|
|
9778
9951
|
}
|
|
9779
9952
|
|
|
9780
9953
|
|
|
9781
|
-
declare module "@tiptap/core" {
|
|
9782
|
-
interface Commands<ReturnType> {
|
|
9783
|
-
moodTracker: {
|
|
9784
|
-
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
9785
|
-
};
|
|
9786
|
-
}
|
|
9787
|
-
}
|
|
9788
|
-
|
|
9789
|
-
|
|
9790
9954
|
declare module "@tiptap/core" {
|
|
9791
9955
|
interface Commands<ReturnType> {
|
|
9792
9956
|
enhanceHighlight: {
|
|
@@ -9801,8 +9965,8 @@ declare module "@tiptap/core" {
|
|
|
9801
9965
|
|
|
9802
9966
|
declare module "@tiptap/core" {
|
|
9803
9967
|
interface Commands<ReturnType> {
|
|
9804
|
-
|
|
9805
|
-
|
|
9968
|
+
moodTracker: {
|
|
9969
|
+
insertMoodTracker: (data: MoodTrackerData) => ReturnType;
|
|
9806
9970
|
};
|
|
9807
9971
|
}
|
|
9808
9972
|
}
|
|
@@ -9819,6 +9983,15 @@ declare module "@tiptap/core" {
|
|
|
9819
9983
|
}
|
|
9820
9984
|
|
|
9821
9985
|
|
|
9986
|
+
declare module "@tiptap/core" {
|
|
9987
|
+
interface Commands<ReturnType> {
|
|
9988
|
+
transcript: {
|
|
9989
|
+
insertTranscript: (data: TranscriptData) => ReturnType;
|
|
9990
|
+
};
|
|
9991
|
+
}
|
|
9992
|
+
}
|
|
9993
|
+
|
|
9994
|
+
|
|
9822
9995
|
declare namespace F0GraphNodeWrapperInner {
|
|
9823
9996
|
var displayName: string;
|
|
9824
9997
|
}
|