@factorialco/f0-react 4.67.0 → 4.68.1
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/{ChatPdfThumbnail-DdGaoAhx.js → ChatPdfThumbnail-CaG1phtP.js} +1 -1
- package/dist/{DocumentToolbar-BTKvzHAu.js → DocumentToolbar-DxRPtnyk.js} +2 -2
- package/dist/{DocxViewer-C8TSH4uj.js → DocxViewer-B_wA8l77.js} +2 -2
- package/dist/{F0AiProcessingOverlay-D4uoUT5u.js → F0AiProcessingOverlay-C0NmG1vV.js} +1396 -1579
- package/dist/{F0CanvasPanel-DxDzkDr0.js → F0CanvasPanel-BStowVw4.js} +555 -553
- package/dist/F0VideoPlayer-BWRlLaGW.js +1418 -0
- package/dist/{SheetViewer-L64AYlhM.js → SheetViewer-BioSNqUs.js} +2 -2
- package/dist/{TextViewer-DdteOLrX.js → TextViewer-BtNnw0eP.js} +2 -2
- package/dist/VolumeMuted-XL3dwOL-.js +189 -0
- package/dist/ai.d.ts +6 -0
- package/dist/ai.js +2 -2
- package/dist/component-status.js +1 -1
- package/dist/experimental.d.ts +126 -6
- package/dist/experimental.js +7060 -6188
- package/dist/f0.d.ts +6 -0
- package/dist/f0.js +14645 -16044
- package/dist/i18n-provider-defaults.d.ts +6 -0
- package/dist/i18n-provider-defaults.js +7 -1
- package/dist/{index-BvfA8BM8.js → index-BZPUbw4M.js} +1 -1
- package/dist/{index-CnX1kb-7.js → index-Cql9uxeA.js} +3 -3
- package/dist/index-D_vSP4tQ.js +4 -0
- package/dist/{pdfWorker-JxQes0dQ.js → pdfWorker-CMiWD9U2.js} +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/experimental.d.ts
CHANGED
|
@@ -3762,7 +3762,9 @@ declare const defaultTranslations: {
|
|
|
3762
3762
|
readonly cancelRecording: "Cancel recording";
|
|
3763
3763
|
readonly dropFilesHere: "Drop your files here";
|
|
3764
3764
|
readonly removeFile: "Remove";
|
|
3765
|
+
readonly removeNamedFile: "Remove {{name}}";
|
|
3765
3766
|
readonly tooManyFilesError: "You can attach up to {{maxFiles}} files at once";
|
|
3767
|
+
readonly fileTooLargeError: "Each file must be {{maxFileSize}} or smaller";
|
|
3766
3768
|
readonly fileUploadError: "Upload failed";
|
|
3767
3769
|
readonly micPermissionDenied: "Microphone access is blocked. Allow it in your browser settings to dictate.";
|
|
3768
3770
|
readonly micError: "Couldn't access the microphone.";
|
|
@@ -3798,6 +3800,7 @@ declare const defaultTranslations: {
|
|
|
3798
3800
|
readonly reply: "Reply";
|
|
3799
3801
|
readonly react: "Add reaction";
|
|
3800
3802
|
readonly download: "Download";
|
|
3803
|
+
readonly downloadNamedFile: "Download {{name}}";
|
|
3801
3804
|
readonly removeQuote: "Remove quote";
|
|
3802
3805
|
readonly edit: "Edit";
|
|
3803
3806
|
readonly editing: "Editing";
|
|
@@ -3811,7 +3814,10 @@ declare const defaultTranslations: {
|
|
|
3811
3814
|
readonly previousImage: "Previous image";
|
|
3812
3815
|
readonly nextImage: "Next image";
|
|
3813
3816
|
readonly openDocument: "Open document";
|
|
3817
|
+
readonly openNamedDocument: "Open {{name}}";
|
|
3814
3818
|
readonly documentPreview: "Document preview";
|
|
3819
|
+
readonly videoPlayerLabel: "Video player: {{name}}";
|
|
3820
|
+
readonly loadingVideo: "Loading video: {{name}}";
|
|
3815
3821
|
readonly photo: "Photo";
|
|
3816
3822
|
readonly photoCount: {
|
|
3817
3823
|
readonly one: "{{count}} photo";
|
|
@@ -5187,7 +5193,11 @@ export declare type F0ChatChannel = {
|
|
|
5187
5193
|
* factorial sources these from its own data (e.g. HR vacation status).
|
|
5188
5194
|
*/
|
|
5189
5195
|
statuses?: F0ChatChannelStatus[];
|
|
5190
|
-
/**
|
|
5196
|
+
/**
|
|
5197
|
+
* Group only. Total channel members, including the current user. F0 compares
|
|
5198
|
+
* `memberCount - 1` with the unique other members in `readBy` (or its count
|
|
5199
|
+
* fallback) before showing the all-read footer state.
|
|
5200
|
+
*/
|
|
5191
5201
|
memberCount?: number;
|
|
5192
5202
|
/** DM only — the counterpart, used for the header identity hover card. */
|
|
5193
5203
|
user?: F0ChatUser;
|
|
@@ -5222,6 +5232,17 @@ export declare type F0ChatFileAttachment = {
|
|
|
5222
5232
|
name: string;
|
|
5223
5233
|
size?: number;
|
|
5224
5234
|
mimeType?: string;
|
|
5235
|
+
/** Poster used when a video file renders through the inline F0VideoPlayer. */
|
|
5236
|
+
thumbnailUrl?: string;
|
|
5237
|
+
/**
|
|
5238
|
+
* Optional captions/audio-description sources for video files. Passed
|
|
5239
|
+
* directly to F0VideoPlayer; ignored for non-video files.
|
|
5240
|
+
*/
|
|
5241
|
+
videoContent?: VideoPlayerContent;
|
|
5242
|
+
/** Initial locale for localized video audio and accessibility content. */
|
|
5243
|
+
videoDefaultLanguage?: string;
|
|
5244
|
+
/** Declare that a video file has no audio, so captions are not required. */
|
|
5245
|
+
videoSilent?: boolean;
|
|
5225
5246
|
/** 0–100 while uploading; undefined once done. */
|
|
5226
5247
|
progress?: number;
|
|
5227
5248
|
};
|
|
@@ -5354,9 +5375,14 @@ export declare type F0ChatMessage = {
|
|
|
5354
5375
|
*/
|
|
5355
5376
|
mentionedEveryone?: boolean;
|
|
5356
5377
|
/**
|
|
5357
|
-
* Group read receipts —
|
|
5358
|
-
*
|
|
5359
|
-
|
|
5378
|
+
* Group read receipts — the other members who have read this message.
|
|
5379
|
+
* Hosts derive this from their transport's per-member read pointers.
|
|
5380
|
+
*/
|
|
5381
|
+
readBy?: F0ChatUser[];
|
|
5382
|
+
/**
|
|
5383
|
+
* Group read-receipt count for hosts that cannot provide reader identities.
|
|
5384
|
+
* Prefer `readBy` when identities are available; F0 derives its count from
|
|
5385
|
+
* `readBy.length`.
|
|
5360
5386
|
*/
|
|
5361
5387
|
readByCount?: number;
|
|
5362
5388
|
/**
|
|
@@ -5389,7 +5415,10 @@ export declare type F0ChatMessageReply = {
|
|
|
5389
5415
|
* shows a tappable critical alert whose menu is reduced to Retry / Delete.
|
|
5390
5416
|
* `delivered` (reached the counterpart's device, not read yet) is for backends
|
|
5391
5417
|
* that distinguish it — Stream doesn't, so the factorial adapter never emits it
|
|
5392
|
-
* and those messages go straight from `sent` to `read`.
|
|
5418
|
+
* and those messages go straight from `sent` to `read`. In groups, `read`
|
|
5419
|
+
* should only be emitted when all other channel members have read the message;
|
|
5420
|
+
* F0 also guards that transition with `channel.memberCount` and the available
|
|
5421
|
+
* `readBy` / `readByCount`.
|
|
5393
5422
|
*/
|
|
5394
5423
|
export declare type F0ChatMessageStatus = "sending" | "sent" | "delivered" | "read" | "failed";
|
|
5395
5424
|
|
|
@@ -5423,6 +5452,10 @@ export declare type F0ChatReaction = {
|
|
|
5423
5452
|
emoji: string;
|
|
5424
5453
|
count: number;
|
|
5425
5454
|
reactedByMe: boolean;
|
|
5455
|
+
/**
|
|
5456
|
+
* People who reacted with this emoji. Hosts may omit this initial list and
|
|
5457
|
+
* provide {@link F0ChatRuntime.loadReactionUsers} to resolve it lazily.
|
|
5458
|
+
*/
|
|
5426
5459
|
users?: F0ChatUser[];
|
|
5427
5460
|
};
|
|
5428
5461
|
|
|
@@ -5483,6 +5516,13 @@ export declare type F0ChatRuntime = {
|
|
|
5483
5516
|
retryMessage: (id: string) => void | Promise<void>;
|
|
5484
5517
|
loadOlder: () => void;
|
|
5485
5518
|
toggleReaction: (messageId: string, emoji: string) => void | Promise<void>;
|
|
5519
|
+
/**
|
|
5520
|
+
* Resolve the complete user list for one reaction on demand. F0 calls this
|
|
5521
|
+
* when the reaction receives pointer hover or keyboard focus and caches the
|
|
5522
|
+
* result while its count is unchanged. Omit when every reaction already
|
|
5523
|
+
* carries its complete {@link F0ChatReaction.users} list.
|
|
5524
|
+
*/
|
|
5525
|
+
loadReactionUsers?: (messageId: string, emoji: string) => Promise<F0ChatUser[]>;
|
|
5486
5526
|
/**
|
|
5487
5527
|
* Delete a message that exists server-side (soft delete → tombstone, or hard
|
|
5488
5528
|
* delete → removed from `messages`).
|
|
@@ -5530,6 +5570,13 @@ export declare type F0ChatRuntime = {
|
|
|
5530
5570
|
* textarea (mirrors the AI chat). Omit for no limit.
|
|
5531
5571
|
*/
|
|
5532
5572
|
maxFiles?: number;
|
|
5573
|
+
/**
|
|
5574
|
+
* Maximum size in bytes for each file selected, dropped, or pasted into the
|
|
5575
|
+
* composer. When any file exceeds the limit, the composer rejects the whole
|
|
5576
|
+
* batch before calling `uploadFiles` and keeps the validation error visible
|
|
5577
|
+
* until the next attachment attempt. Omit for no size limit.
|
|
5578
|
+
*/
|
|
5579
|
+
maxFileSizeBytes?: number;
|
|
5533
5580
|
/**
|
|
5534
5581
|
* Optional voice dictation — same signature as the AI chat (streams partials).
|
|
5535
5582
|
* Not part of the Stream transport; a host wires it to its own speech service
|
|
@@ -7673,6 +7720,26 @@ declare interface LoadingStateProps {
|
|
|
7673
7720
|
label: string;
|
|
7674
7721
|
}
|
|
7675
7722
|
|
|
7723
|
+
/** A single value, or the same value provided in multiple languages. */
|
|
7724
|
+
declare type Localized<T> = T | LocalizedOption<T>[];
|
|
7725
|
+
|
|
7726
|
+
/**
|
|
7727
|
+
* Shared helpers for content that can be provided in one language (a plain
|
|
7728
|
+
* value) or several (a list of per-locale entries) — used by the media players
|
|
7729
|
+
* for captions, descriptions, transcriptions and summaries.
|
|
7730
|
+
*/
|
|
7731
|
+
declare interface LocalizedOption<T> {
|
|
7732
|
+
/** BCP-47 language tag, e.g. `"en"`, `"es"`, `"en-US"`. */
|
|
7733
|
+
locale: string;
|
|
7734
|
+
/**
|
|
7735
|
+
* Display label for the language picker. Defaults to the language name for
|
|
7736
|
+
* `locale` (via `Intl.DisplayNames`), so this is only needed to override it.
|
|
7737
|
+
*/
|
|
7738
|
+
label?: string;
|
|
7739
|
+
/** The value for this locale. */
|
|
7740
|
+
value: T;
|
|
7741
|
+
}
|
|
7742
|
+
|
|
7676
7743
|
export declare const MAX_EXPANDED_ACTIONS = 2;
|
|
7677
7744
|
|
|
7678
7745
|
export declare type MentionedUser = {
|
|
@@ -9010,7 +9077,7 @@ declare const privateProps_5: readonly [];
|
|
|
9010
9077
|
|
|
9011
9078
|
declare const privateProps_6: readonly ["compact"];
|
|
9012
9079
|
|
|
9013
|
-
declare const privateProps_7: readonly ["delay"];
|
|
9080
|
+
declare const privateProps_7: readonly ["delay", "onOpen"];
|
|
9014
9081
|
|
|
9015
9082
|
declare type ProductUpdate = {
|
|
9016
9083
|
title: string;
|
|
@@ -9222,6 +9289,8 @@ declare interface ReactionProps {
|
|
|
9222
9289
|
initialCount: number;
|
|
9223
9290
|
hasReacted?: boolean;
|
|
9224
9291
|
users?: User_2[];
|
|
9292
|
+
/** Resolve the complete user list on first hover or keyboard focus. */
|
|
9293
|
+
loadUsers?: () => Promise<User_2[]>;
|
|
9225
9294
|
onInteraction?: (emoji: string) => void;
|
|
9226
9295
|
size?: "sm" | "md" | "lg";
|
|
9227
9296
|
}
|
|
@@ -10659,6 +10728,7 @@ declare type TooltipInternalProps = {
|
|
|
10659
10728
|
shortcut?: ComponentProps<typeof Shortcut>["keys"];
|
|
10660
10729
|
delay?: number;
|
|
10661
10730
|
instant?: boolean;
|
|
10731
|
+
onOpen?: () => void;
|
|
10662
10732
|
} & ({
|
|
10663
10733
|
label: string;
|
|
10664
10734
|
description?: string;
|
|
@@ -11166,6 +11236,56 @@ declare const VerticalOverflowList: {
|
|
|
11166
11236
|
displayName: string;
|
|
11167
11237
|
};
|
|
11168
11238
|
|
|
11239
|
+
/**
|
|
11240
|
+
* Structured content for the video player.
|
|
11241
|
+
*
|
|
11242
|
+
* Every field accepts either a single value or a localized list
|
|
11243
|
+
* (`[{ locale, label?, value }]`) — pass several languages and a language
|
|
11244
|
+
* selector appears in the controls. A single shared selection drives captions,
|
|
11245
|
+
* descriptions and the described source together (each falls back to its first
|
|
11246
|
+
* entry for languages it doesn't provide). See `F0VideoPlayerProps.defaultLanguage`.
|
|
11247
|
+
*
|
|
11248
|
+
* `captions` are timed text shown over the video during playback (WCAG 2.1
|
|
11249
|
+
* SC 1.2.2, Captions). Pass either a WebVTT resource URL or a raw WebVTT string
|
|
11250
|
+
* (the player turns raw VTT into a blob track, so no CORS setup is needed); a
|
|
11251
|
+
* remote URL requires the video host to allow cross-origin reads. When omitted,
|
|
11252
|
+
* the player uses any caption/subtitle track embedded in the video file. A
|
|
11253
|
+
* captions toggle in the controls shows/hides them (a filled glyph when on, a
|
|
11254
|
+
* line glyph when off).
|
|
11255
|
+
*
|
|
11256
|
+
* Audio description (WCAG 2.1 SC 1.2.5) conveys on-screen visual information as
|
|
11257
|
+
* audio, complementary to captions — both are independent and can be on at
|
|
11258
|
+
* once. Provide it in one of two ways, toggled with the audio-description
|
|
11259
|
+
* control (a filled "AD" badge when on, a line badge when off):
|
|
11260
|
+
* - `describedSrc`: a pre-produced media rendition with description mixed into
|
|
11261
|
+
* the audio. Toggling swaps the source, preserving position and play state.
|
|
11262
|
+
* Highest quality; assumed the same length as `src`.
|
|
11263
|
+
* - `descriptions`: a WebVTT `kind="descriptions"` script (URL or raw VTT),
|
|
11264
|
+
* delivered at runtime — the video pauses on each cue so the description can
|
|
11265
|
+
* be spoken (extended audio description), then resumes. Used only when
|
|
11266
|
+
* `describedSrc` is absent.
|
|
11267
|
+
*/
|
|
11268
|
+
declare interface VideoPlayerContent {
|
|
11269
|
+
/**
|
|
11270
|
+
* WebVTT URL, or raw WebVTT content, for captions shown during playback.
|
|
11271
|
+
* Localizable — pass a per-locale list to offer captions in several languages.
|
|
11272
|
+
*/
|
|
11273
|
+
captions?: Localized<string>;
|
|
11274
|
+
/**
|
|
11275
|
+
* A pre-produced described media source (description mixed into the audio),
|
|
11276
|
+
* swapped in when audio description is enabled. Takes precedence over
|
|
11277
|
+
* `descriptions`. Should match `src`'s duration so the position carries
|
|
11278
|
+
* across the swap. Localizable.
|
|
11279
|
+
*/
|
|
11280
|
+
describedSrc?: Localized<string>;
|
|
11281
|
+
/**
|
|
11282
|
+
* WebVTT URL, or raw WebVTT content, of a `kind="descriptions"` script.
|
|
11283
|
+
* Delivered at runtime with extended (pausing) audio description when no
|
|
11284
|
+
* `describedSrc` is provided. Localizable.
|
|
11285
|
+
*/
|
|
11286
|
+
descriptions?: Localized<string>;
|
|
11287
|
+
}
|
|
11288
|
+
|
|
11169
11289
|
/**
|
|
11170
11290
|
* @experimental This is an experimental component use it at your own risk
|
|
11171
11291
|
*/
|