@factorialco/f0-react 10.6.1 → 10.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.
Files changed (45) hide show
  1. package/dist/{ChatPostComposerDialog-BeJZv7tT.js → ChatPostComposerDialog-Fz7bdV_-.js} +3 -3
  2. package/dist/{CoachmarkProvider-DVF40v2q.js → CoachmarkProvider-DqNqwEPd.js} +21880 -21945
  3. package/dist/{DocumentToolbar-rCarM1oo.js → DocumentToolbar-B4aCipER.js} +5 -5
  4. package/dist/{ChatDocxThumbnail-DdI_ITWn.js → DocxThumbnail-kHTNnwW0.js} +1 -1
  5. package/dist/{DocxViewer-C1dP05wX.js → DocxViewer-BOdYordL.js} +2 -2
  6. package/dist/{F0AiProcessingOverlay-CrvPHV1G.js → F0AiProcessingOverlay-BTW13lnQ.js} +1682 -2192
  7. package/dist/{F0Box-D0fWIRgc.js → F0Box-CYL5_Zhb.js} +1 -1
  8. package/dist/{F0CanvasPanel-C7vHU_iJ.js → F0CanvasPanel-BcBFycU-.js} +9869 -7037
  9. package/dist/F0DocumentViewer-BqRsz00c.js +3 -0
  10. package/dist/{F0DocumentViewer-BrxSgrT8.js → F0DocumentViewer-CWZNde9w.js} +8 -8
  11. package/dist/{F0Map-DC_Mplnx.js → F0Map-4fqLL5gP.js} +22 -22
  12. package/dist/{F0Select-CovHF33V.js → F0Select-By_QpX1S.js} +2 -2
  13. package/dist/{F0VideoPlayer-NjaAU0Gm.js → F0VideoPlayer-CTsCZ4u5.js} +105 -105
  14. package/dist/F0VideoPlayer-DEpDxvjC.js +1 -0
  15. package/dist/{Map-D6mJxw2a.js → Map-B_fzR9ly.js} +29 -29
  16. package/dist/{ChatPdfThumbnail-adL3N5Xz.js → PdfThumbnail-BLNfQ1EH.js} +2 -2
  17. package/dist/{ChatSheetThumbnail-BKCy7BGq.js → SheetThumbnail-HtGezPp4.js} +1 -1
  18. package/dist/{SheetViewer-8ZWEuOLq.js → SheetViewer-BhZTOpb4.js} +4 -4
  19. package/dist/{ChatTextThumbnail-Ct32PcXO.js → TextThumbnail-X04JgaNI.js} +1 -1
  20. package/dist/{TextViewer-B00Rmqc7.js → TextViewer-B1eR_7q4.js} +2 -2
  21. package/dist/ai.d.ts +4 -4
  22. package/dist/ai.js +5 -5
  23. package/dist/component-status.js +51 -7
  24. package/dist/{dist-7YY6sRd4.js → dist-CUsub1Mu.js} +1 -1
  25. package/dist/dist-Dt-cTb6D.js +43 -0
  26. package/dist/experimental.d.ts +2 -2
  27. package/dist/experimental.js +8554 -10320
  28. package/dist/{exports-B1AxzHkB.d.ts → exports-cU26nMV5.d.ts} +449 -16
  29. package/dist/f0.d.ts +5 -5
  30. package/dist/f0.js +2034 -2034
  31. package/dist/{i18n-provider-defaults-DliS9uYl.js → i18n-provider-defaults-BA2_-hRH.js} +2 -0
  32. package/dist/{i18n-provider-defaults-DiJM3DSg.d.ts → i18n-provider-defaults-m88KkXdP.d.ts} +2 -0
  33. package/dist/i18n-provider-defaults.d.ts +1 -1
  34. package/dist/i18n-provider-defaults.js +1 -1
  35. package/dist/{index-DQo_UZ7M.d.ts → index-BDEEuyti.d.ts} +3 -3
  36. package/dist/{index-CHpMOnlX.d.ts → index-BftFpZQm.d.ts} +95 -4
  37. package/dist/{maplibre-C8TCdToL.js → maplibre-NpfvETJP.js} +1 -1
  38. package/dist/{pdfWorker-8f29nzGo.js → pdfWorker-CA8jPCRh.js} +2 -2
  39. package/dist/{popover-B2hEEubt.js → popover-B7fqB9lu.js} +1 -1
  40. package/dist/styles.css +1 -1
  41. package/dist/{useData-DjJsB0qa.js → useData-CAl9SKtE.js} +1 -1
  42. package/dist/useFullscreen-CNwpzjpz.js +23 -0
  43. package/package.json +1 -1
  44. package/dist/F0DocumentViewer-Crhq3XFQ.js +0 -3
  45. package/dist/F0VideoPlayer-C0kP3yFk.js +0 -1
@@ -1,5 +1,5 @@
1
- import { $ as AiChatCreditWarning, $i as WithDataTestIdReturnType, Ct as WelcomeScreenSuggestion, Fi as FileDef, J as AiChatComposerAction, Ln as Level, Nr as CanvasEntityDefinition, Oi as F0AvatarTeamProps, Tr as PersonProfile, Wi as ModuleId, Yi as IconType, bt as TranscribeFn, et as AiChatCredits, fn as RelaxedNumericWithFormatter, hr as DataAttributes, ht as F0AiChatWelcomeCard, jr as CanvasContent, ki as F0AvatarPersonProps, lt as AiChatUsageLimits, nt as AiChatEmployeeCredits, oi as DataDownloadDataset, rt as AiChatFileAttachmentConfig, s as F0CardHorizontalProps, tt as AiChatDisclaimer, un as Numeric, vi as AvatarVariant, vt as PendingContext, wt as WelcomeScreenSuggestionItem, xt as UploadedFile, yt as PendingQuote, zi as F0AvatarCompanyProps } from "./index-CHpMOnlX.js";
2
- import { CSSProperties, ComponentProps, ReactNode, RefObject, SVGProps } from "react";
1
+ import { $ as AiChatCreditWarning, Ar as AiChatShowFilesItem, Bi as FileDef, Ci as AvatarVariant, Ct as WelcomeScreenSuggestion, Dr as AiChatFileKind, Er as AiChatFile, Ir as CanvasContent, J as AiChatComposerAction, Ln as Level, Ni as F0AvatarTeamProps, Or as AiChatFilePreviewConfig, Pi as F0AvatarPersonProps, Rr as CanvasEntityDefinition, Tr as PersonProfile, Wi as F0AvatarCompanyProps, Yi as ModuleId, bt as TranscribeFn, di as DataDownloadDataset, ea as IconType, et as AiChatCredits, fn as RelaxedNumericWithFormatter, hr as DataAttributes, ht as F0AiChatWelcomeCard, ia as WithDataTestIdReturnType, lt as AiChatUsageLimits, nt as AiChatEmployeeCredits, rt as AiChatFileAttachmentConfig, s as F0CardHorizontalProps, tt as AiChatDisclaimer, un as Numeric, vt as PendingContext, wt as WelcomeScreenSuggestionItem, xt as UploadedFile, yt as PendingQuote } from "./index-BftFpZQm.js";
2
+ import { CSSProperties, ComponentProps, KeyboardEvent, ReactNode, Ref, RefObject, SVGProps } from "react";
3
3
  import { AgentState, TrackReferenceOrPlaceholder } from "@livekit/components-react";
4
4
  import { VariantProps } from "cva";
5
5
  import { LocalAudioTrack, RemoteAudioTrack } from "livekit-client";
@@ -1024,7 +1024,7 @@ type F0AiChatTextAreaProps = {
1024
1024
  /**
1025
1025
  * Optional ReactNode rendered in place of the input. When present the
1026
1026
  * composer enters "clarifying" mode: form submission is blocked, the
1027
- * gradient border activates, and a nav-hint replaces the disclaimer.
1027
+ * border takes a static accent, and a nav-hint replaces the disclaimer.
1028
1028
  * The host owns the panel (typically `F0ClarifyingPanel`) and its
1029
1029
  * state — F0 just renders the slot.
1030
1030
  */
@@ -1144,7 +1144,7 @@ type F0AiChatTextAreaProps = {
1144
1144
  * empty space.
1145
1145
  *
1146
1146
  * - `"inside"` — the row moves INTO the field, at its foot, so the field's own
1147
- * border and AI focus highlight enclose it and the composer reads as a
1147
+ * border encloses it and the composer reads as a
1148
1148
  * single bar about two lines tall. Its popover opens downward, because up is
1149
1149
  * now the text you are about to type.
1150
1150
  *
@@ -1215,13 +1215,12 @@ type F0AiChatTextAreaProps = {
1215
1215
  *
1216
1216
  * - `"default"` — the gutter the chat layouts expect (16px sides, 8px top,
1217
1217
  * 12px bottom). It is what keeps the field off the chat window's edges and
1218
- * leaves room for the focus glow, which bleeds a few pixels outside the
1219
- * field's border box.
1218
+ * leaves room for the surface's shadow.
1220
1219
  *
1221
1220
  * - `"none"` — no inset, for hosts that place the composer inside a container
1222
1221
  * that already owns the spacing (a landing/home hero, a card). The host then
1223
1222
  * owns BOTH sides of that bargain: give the composer some room of your own,
1224
- * and don't clip overflow around it, or the focus glow gets cut at the edge.
1223
+ * and don't clip overflow around it, or the surface's shadow gets cut.
1225
1224
  *
1226
1225
  * Only the outer inset changes; the gap between the composer and the blocks
1227
1226
  * below it (suggestions, cards, footer, disclaimer) is unaffected.
@@ -1240,15 +1239,12 @@ type F0AiChatTextAreaProps = {
1240
1239
  //#endregion
1241
1240
  //#region src/addons/ai/ai/F0AiChatTextArea/F0AiChatTextArea.d.ts
1242
1241
  /**
1243
- * Headless chat composer.
1244
- *
1245
- * Owns local UI state (text, cursor, attached files, mention popover) and
1246
- * emits a structured payload via `onSubmit`. The consumer decides what to
1247
- * do with it (forward to CopilotKit, log it, mock it…). It carries no
1248
- * coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
1249
- * provide the wiring.
1242
+ * The AI chat's composer for the hosts that render it directly (the home bar,
1243
+ * ticket creation, connected chat inputs): the shared chat composer with the
1244
+ * AI chat around it, and the field named `one-ai-input`, which those hosts
1245
+ * query.
1250
1246
  */
1251
- declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, toolbarStart, composerActions, onComposerActionsOpenChange, onTranscribe, searchPersons, mentionSources, onProcessFilesRef, disclaimer, usageLimits, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenSuggestionsPlacement, welcomeScreenSuggestionsCollapsedByDefault, welcomeScreenCards, padding, ref }: F0AiChatTextAreaProps) => import("react").JSX.Element;
1247
+ declare const F0AiChatTextArea: (props: F0AiChatTextAreaProps) => import("react").JSX.Element;
1252
1248
  //#endregion
1253
1249
  //#region src/addons/ai/ai/F0AiChatTextArea/components/DropOverlay.d.ts
1254
1250
  interface DropOverlayProps {
@@ -1274,6 +1270,360 @@ declare function createPersonMentionSource(searchPersons: (query: string) => Pro
1274
1270
  order?: MentionSource["order"];
1275
1271
  }): MentionSource;
1276
1272
  //#endregion
1273
+ //#region src/elements/primitives/_primitives/F0ChatComposer/mentions/types.d.ts
1274
+ /** One row of the mention popover, as a source returns it. */
1275
+ type ComposerMentionItem = {
1276
+ /** What kind of thing it is (`person`, an entity type…). */
1277
+ type: string;
1278
+ id: string;
1279
+ /** Inserted after the `@` and painted as the mention. */
1280
+ label: string;
1281
+ /** Secondary line under the label. */
1282
+ description?: string;
1283
+ /** Leading slot of the row: an avatar, or an icon for entities. */
1284
+ avatar?: AvatarVariant;
1285
+ /** Host data carried through untouched (e.g. a chat user's profile link). */
1286
+ data?: unknown;
1287
+ };
1288
+ /**
1289
+ * A mention in the composer text, anchored where its `@` is.
1290
+ *
1291
+ * The anchor is maintained across edits instead of being re-derived from the
1292
+ * text, so a mention survives whatever follows it (a comma, the end of the
1293
+ * message) and an edit that lands inside it removes the whole token.
1294
+ */
1295
+ type ComposerMention = ComposerMentionItem & {
1296
+ /** Index of the `@` in the composer text. */
1297
+ start: number;
1298
+ /**
1299
+ * Length of the `@label` occurrence as spelled in the text. Recorded rather
1300
+ * than derived from `label.length`: a saved body can spell a name in another
1301
+ * Unicode normal form than the entry does.
1302
+ */
1303
+ length: number;
1304
+ };
1305
+ /** A mention as the search context exposes it: no extent, no host data. */
1306
+ type ComposerMentionRef = {
1307
+ type: string;
1308
+ id: string;
1309
+ label: string;
1310
+ start: number;
1311
+ };
1312
+ /** What a source knows about the message when it is asked to search. */
1313
+ type ComposerMentionSearchContext = {
1314
+ text: string;
1315
+ cursor: number;
1316
+ /** Completed mentions that end before the `@` being typed, in text order. */
1317
+ mentionsBefore: ComposerMentionRef[];
1318
+ };
1319
+ /** A typed source of mention suggestions: one popover group each. */
1320
+ type ComposerMentionSource = {
1321
+ type: string;
1322
+ /** Heading of the group, shown when more than one source is configured. */
1323
+ label: string;
1324
+ search: (query: string, context: ComposerMentionSearchContext) => Promise<ComposerMentionItem[]>;
1325
+ /** Groups sort ascending (`0` when unset); ties keep the array order. */
1326
+ order?: number | ((context: ComposerMentionSearchContext) => number);
1327
+ };
1328
+ /** A source and the rows it returned for the current query. */
1329
+ type ComposerMentionGroup = {
1330
+ source: ComposerMentionSource;
1331
+ items: ComposerMentionItem[];
1332
+ };
1333
+ /**
1334
+ * A row pinned above every group and matched without a search — the chat's
1335
+ * `@here`. It is not a source: it answers synchronously and never dismisses.
1336
+ */
1337
+ type ComposerMentionPinned = {
1338
+ item: ComposerMentionItem;
1339
+ matches: (query: string) => boolean;
1340
+ };
1341
+ type PopoverPosition = {
1342
+ left: number;
1343
+ bottom: number;
1344
+ } | null;
1345
+ //#endregion
1346
+ //#region src/elements/primitives/_primitives/F0ChatComposer/mentions/useComposerMentions.d.ts
1347
+ /** A popover row: the pinned one, or an item from a source's group. */
1348
+ type ComposerMentionRow = {
1349
+ item: ComposerMentionItem;
1350
+ /** The source the row came from; absent for the pinned row. */
1351
+ source?: ComposerMentionSource;
1352
+ };
1353
+ type UseComposerMentionsReturn = {
1354
+ isOpen: boolean;
1355
+ query: string;
1356
+ /** Non-empty groups in display order (the pinned row is not one). */
1357
+ groups: ComposerMentionGroup[];
1358
+ /** Every row in display order: the pinned row first, then the groups'. */
1359
+ rows: ComposerMentionRow[];
1360
+ isLoading: boolean;
1361
+ selectedIndex: number;
1362
+ setSelectedIndex: (index: number) => void;
1363
+ /** Mentions anchored in the current text. */
1364
+ mentions: ComposerMention[];
1365
+ popoverPosition: PopoverPosition;
1366
+ /** Ghost-text completion for the selected row, or null. */
1367
+ inlineCompletion: string | null;
1368
+ /** Handle a keydown — returns true when consumed. */
1369
+ handleKeyDown: (e: React.KeyboardEvent<HTMLTextAreaElement>) => boolean;
1370
+ /** Insert `row` at the active `@`. */
1371
+ selectRow: (row: ComposerMentionRow) => void;
1372
+ /** Replace the anchors from a set of entries found in `forText`. */
1373
+ seedMentions: (entries: ComposerMentionItem[], forText?: string) => void;
1374
+ /** Put back an exact set of anchors for `forText` (undo/redo). */
1375
+ restoreMentions: (anchored: ComposerMention[], forText: string) => void;
1376
+ close: () => void;
1377
+ /** Keep the popover shut for the current `@` until the caret leaves it. */
1378
+ dismissCurrentTrigger: () => void;
1379
+ };
1380
+ //#endregion
1381
+ //#region src/elements/primitives/_primitives/F0ChatComposer/useComposerEditor.d.ts
1382
+ type ComposerEditor = {
1383
+ value: string;
1384
+ setValue: (value: string) => void;
1385
+ cursorPosition: number;
1386
+ setCursorPosition: (position: number) => void;
1387
+ textareaRef: React.RefObject<HTMLTextAreaElement>;
1388
+ highlightRef: React.RefObject<HTMLDivElement>;
1389
+ mentions: UseComposerMentionsReturn;
1390
+ /** Field `onChange`. */
1391
+ handleChange: (next: string, cursorPos: number) => void;
1392
+ updateCursorPosition: () => void;
1393
+ syncHighlightScroll: () => void;
1394
+ /** Put the caret at `caret` once `forText` is committed. */
1395
+ requestSelection: (caret: number, forText: string, focus?: boolean) => void;
1396
+ /** Cmd/Ctrl+Z, Shift+Cmd+Z and Ctrl+Y. Returns true when consumed. */
1397
+ handleUndoRedoKeyDown: (e: KeyboardEvent<HTMLTextAreaElement>) => boolean;
1398
+ /**
1399
+ * Escape on a field with text: the first press arms, a second one within
1400
+ * {@link ESCAPE_CLEAR_WINDOW_MS} clears (undoable). An empty field leaves the
1401
+ * key to the host. Returns true when consumed.
1402
+ */
1403
+ handleClearKeyDown: (e: KeyboardEvent<HTMLTextAreaElement>) => boolean;
1404
+ /** Whether the next Escape clears the text. */
1405
+ escapeArmed: boolean;
1406
+ /** Empty the text and its mentions. Undo can bring it back. */
1407
+ clearText: () => void;
1408
+ /** Load a new draft: undo does not walk back into the previous one. */
1409
+ loadDraft: (draft: {
1410
+ value: string;
1411
+ mentions?: ComposerMentionItem[];
1412
+ }) => void;
1413
+ /** Start the undo stack afresh from the next change (after a send). */
1414
+ breakHistory: () => void;
1415
+ };
1416
+ //#endregion
1417
+ //#region src/elements/primitives/_primitives/F0ChatComposer/voice/types.d.ts
1418
+ /** Options handed to a {@link ComposerTranscribeFn}. */
1419
+ type ComposerTranscribeOptions = {
1420
+ /** Cumulative transcript as it streams in. */
1421
+ onPartial: (text: string) => void;
1422
+ /** Aborted when the user cancels an in-flight transcription. */
1423
+ signal?: AbortSignal;
1424
+ };
1425
+ /** Transcribes a recorded audio blob to text (voice dictation). */
1426
+ type ComposerTranscribeFn = (audio: Blob, options: ComposerTranscribeOptions) => Promise<string>;
1427
+ //#endregion
1428
+ //#region src/elements/primitives/_primitives/F0ChatComposer/voice/useAudioRecorder.d.ts
1429
+ type RecorderStatus = "idle" | "recording" | "transcribing";
1430
+ //#endregion
1431
+ //#region src/elements/primitives/_primitives/F0ChatComposer/types.d.ts
1432
+ /** What the composer hands to `onSend`: the text as typed and its mentions. */
1433
+ type F0ChatComposerDraft = {
1434
+ text: string;
1435
+ mentions: ComposerMention[];
1436
+ };
1437
+ type F0ChatComposerLabels = {
1438
+ /** The field's accessible name, and its placeholder when no `placeholders`. */
1439
+ placeholder: string;
1440
+ /** The placeholder while the microphone is recording. */
1441
+ listening: string;
1442
+ send: string;
1443
+ /** Send, when `sendKind` is `save` (editing a sent message). */
1444
+ save: string;
1445
+ /** Send turned into stop while a response streams (`inProgress`). */
1446
+ stop: string;
1447
+ recordAudio: string;
1448
+ /** The microphone while a voice note uploads (`voice.busy`). */
1449
+ sendingVoice: string;
1450
+ cancelRecording: string;
1451
+ /** The confirm button of a recording: send the note, or transcribe it. */
1452
+ confirmRecording: string;
1453
+ micPermissionDenied: string;
1454
+ micError: string;
1455
+ transcriptionError: string;
1456
+ /** The mention list's accessible name. */
1457
+ mentionSuggestions?: string;
1458
+ /** Second line of the pinned mention row (`@here`). */
1459
+ mentionPinnedDescription?: string;
1460
+ };
1461
+ /** A second autocomplete next to mentions (emoji `:shortcodes:`). */
1462
+ type ComposerAutocomplete = {
1463
+ isOpen: boolean;
1464
+ listboxId: string;
1465
+ activeDescendantId?: string;
1466
+ /** Returns true when it consumed the key. */
1467
+ handleKeyDown: (event: KeyboardEvent<HTMLTextAreaElement>) => boolean;
1468
+ handleFocus?: () => void;
1469
+ handleBlur?: () => void;
1470
+ /** Its list, rendered over the field. */
1471
+ popover: ReactNode;
1472
+ };
1473
+ type ComposerAutocompletePlugin = {
1474
+ /**
1475
+ * Called on every render with the composer's editor, so it must be a hook
1476
+ * with a stable identity: a module-level function, never an inline one.
1477
+ */
1478
+ useAutocomplete: (editor: ComposerEditor) => ComposerAutocomplete;
1479
+ /** Rewrites a change before it lands (a closed `:shortcode:` → emoji). */
1480
+ transformChange?: (next: string, caret: number) => {
1481
+ value: string;
1482
+ cursorPosition: number;
1483
+ } | null;
1484
+ };
1485
+ type F0ChatComposerVoice = {
1486
+ /** Dictation: the recording is transcribed into the field. */
1487
+ onTranscribe?: ComposerTranscribeFn;
1488
+ /** Voice notes: the recording is handed over as audio, text untouched. */
1489
+ onAudio?: (audio: Blob, durationMs: number) => void;
1490
+ /** Shown but not usable (editing a sent message). */
1491
+ disabled?: boolean;
1492
+ /** A recording is still being delivered (a voice note uploading). */
1493
+ busy?: boolean;
1494
+ /** The microphone was pressed — before any permission prompt. */
1495
+ onPress?: () => void;
1496
+ /** Capture actually began. */
1497
+ onStarted?: () => void;
1498
+ /** The reader threw a recording away. */
1499
+ onCancelled?: () => void;
1500
+ };
1501
+ type F0ChatComposerState = {
1502
+ /** No text in the field. */
1503
+ isEmpty: boolean;
1504
+ recorder: RecorderStatus;
1505
+ };
1506
+ type F0ChatComposerHandle = {
1507
+ /** Focus the field, caret at the end. No-op while `replacement` shows. */
1508
+ focus: (options?: {
1509
+ preventScroll?: boolean;
1510
+ }) => void;
1511
+ /** Empty the text and its mentions (undoable). */
1512
+ clear: () => void;
1513
+ /** Replace the draft; undo does not walk back into the previous one. */
1514
+ loadDraft: (draft: {
1515
+ value: string;
1516
+ mentions?: ComposerMentionItem[];
1517
+ }) => void;
1518
+ /** Insert at the caret (or over the selection) and focus. */
1519
+ insertText: (text: string) => void;
1520
+ /** Throw away a recording or transcription in flight. */
1521
+ cancelRecording: () => void;
1522
+ /** Start the undo stack afresh from the next change. */
1523
+ breakHistory: () => void;
1524
+ };
1525
+ type F0ChatComposerProps = {
1526
+ /** Called with the draft on Enter or send. Return (or resolve) `false` to
1527
+ * keep the draft; a rejection keeps it too. An async send clears the field
1528
+ * once it resolves, unless the text changed meanwhile: then the field keeps
1529
+ * all of it, the sent part included, for the reader to edit. */
1530
+ onSend: (draft: F0ChatComposerDraft) => void | boolean | Promise<void | boolean>;
1531
+ /** While true, send turns into stop and calls `onStop`. */
1532
+ inProgress?: boolean;
1533
+ onStop?: () => void;
1534
+ /** `save` while editing a sent message. @default "send" */
1535
+ sendKind?: "send" | "save";
1536
+ /** Attachments ready to go: sendable with no text. */
1537
+ hasAttachments?: boolean;
1538
+ /** Send stays disabled (files still uploading). */
1539
+ sendBlocked?: boolean;
1540
+ /** Longer text is refused on send, with `maxLengthError` shown. */
1541
+ maxLength?: number;
1542
+ maxLengthError?: string;
1543
+ /** The host's error (an upload that failed). */
1544
+ error?: string | null;
1545
+ labels?: Partial<F0ChatComposerLabels>;
1546
+ /** Rotating placeholders painted on one line; without them, the native
1547
+ * placeholder shows `labels.placeholder`. */
1548
+ placeholders?: string[];
1549
+ /** Stop typing the placeholders out (a response streams). */
1550
+ placeholdersPaused?: boolean;
1551
+ /** `combobox` (the chat) or `textbox`. @default "combobox" */
1552
+ role?: "combobox" | "textbox";
1553
+ /** The textarea's `name`. */
1554
+ name?: string;
1555
+ mentions?: {
1556
+ sources: ComposerMentionSource[];
1557
+ pinned?: ComposerMentionPinned;
1558
+ /** Results from another scope (a channel) never land in this one. */
1559
+ scopeKey?: string;
1560
+ onInserted?: (item: ComposerMentionItem, options: {
1561
+ pinned: boolean;
1562
+ }) => void;
1563
+ /** Group headings in the list (more than one source). */
1564
+ showGroupLabels?: boolean;
1565
+ };
1566
+ autocomplete?: ComposerAutocompletePlugin;
1567
+ voice?: F0ChatComposerVoice;
1568
+ /** Every change the reader makes to the text. */
1569
+ onTextChange?: (value: string) => void;
1570
+ /** The double Escape cleared the text. */
1571
+ onCleared?: () => void;
1572
+ /** Escape, before the composer's own layers (recording, clear). Return true
1573
+ * when consumed — dismissing a reply chip. */
1574
+ onEscape?: (event: KeyboardEvent<HTMLTextAreaElement>) => boolean;
1575
+ /** ↑ on an empty field. Return true when consumed (edit the last message). */
1576
+ onArrowUpWhenEmpty?: () => boolean;
1577
+ /** Files pasted into the field. Without it, a paste is always text. */
1578
+ onPasteFiles?: (files: File[]) => void;
1579
+ /** A clipboard with text and an image pastes the text. */
1580
+ pastePreferText?: boolean;
1581
+ onStateChange?: (state: F0ChatComposerState) => void;
1582
+ /** Above the field: reply/edit chips, a quoted fragment. */
1583
+ header?: ReactNode;
1584
+ /** Attachments being sent. */
1585
+ tray?: ReactNode;
1586
+ /** Before the text, on its line. */
1587
+ leading?: ReactNode;
1588
+ /** The action row's start: attach, emoji, host controls. Called with the
1589
+ * recorder status so controls can step aside while it transcribes. */
1590
+ toolbarStart?: ReactNode | ((recorder: RecorderStatus) => ReactNode);
1591
+ /** The action row's middle, taking its slack. */
1592
+ toolbarCenter?: ReactNode;
1593
+ /** The action row can collapse (animated). */
1594
+ collapsible?: boolean;
1595
+ /** Collapsed: no action row; microphone and send trail the text. */
1596
+ collapsed?: boolean;
1597
+ /** Shown instead of the field and its rows (a question the reader answers
1598
+ * first). The draft survives it. */
1599
+ replacement?: ReactNode;
1600
+ /** A static accent border. */
1601
+ accent?: boolean;
1602
+ /** Render the surface as a `<form>`: send/stop submit it. */
1603
+ asForm?: boolean;
1604
+ className?: string;
1605
+ surfaceRef?: Ref<HTMLFormElement & HTMLDivElement>;
1606
+ onSurfaceFocus?: () => void;
1607
+ onSurfaceBlur?: () => void;
1608
+ handleRef?: Ref<F0ChatComposerHandle>;
1609
+ reducedMotion?: boolean;
1610
+ "data-testid"?: string;
1611
+ };
1612
+ //#endregion
1613
+ //#region src/elements/primitives/_primitives/F0ChatComposer/F0ChatComposer.d.ts
1614
+ /**
1615
+ * The chat composer F0Chat and the AI chat share: a floating surface with
1616
+ * the field (anchored `@mentions`, undo/redo, double Escape to clear, IME-safe
1617
+ * Enter), its error line, the attachments tray, the microphone (dictation or
1618
+ * voice notes) and send — which turns into save while editing and into stop
1619
+ * while a response streams.
1620
+ *
1621
+ * It owns the draft and the keyboard. Everything about where a message goes
1622
+ * stays with the host: `onSend` gets the text and its mentions, and the
1623
+ * slots carry the host's chips, tray and controls.
1624
+ */
1625
+ declare const F0ChatComposer: ({ onSend, inProgress, onStop, sendKind, hasAttachments, sendBlocked, maxLength, maxLengthError, error, labels: labelOverrides, placeholders, placeholdersPaused, role, name, mentions: mentionOptions, autocomplete: autocompletePlugin, voice, onTextChange, onCleared, onEscape, onArrowUpWhenEmpty, onPasteFiles, pastePreferText, onStateChange, header, tray, leading, toolbarStart, toolbarCenter, collapsible, collapsed, replacement, accent, asForm, className, surfaceRef, onSurfaceFocus, onSurfaceBlur, handleRef, reducedMotion, "data-testid": testId }: F0ChatComposerProps) => ReactNode;
1626
+ //#endregion
1277
1627
  //#region src/addons/ai/ai/F0AiChatUsageLimits/F0AiChatUsageLimitsButton.d.ts
1278
1628
  /**
1279
1629
  * Headless usage-limits popover with its ring trigger. `F0AiChatTextArea`
@@ -1281,6 +1631,89 @@ declare function createPersonMentionSource(searchPersons: (query: string) => Pro
1281
1631
  */
1282
1632
  declare const F0AiChatUsageLimitsButton: ({ usage, error, onOpenChange, trigger, side }: F0AiChatUsageLimitsButtonProps) => import("react").JSX.Element;
1283
1633
  //#endregion
1634
+ //#region src/addons/ai/ai/F0AiFileAttachments/adapters.d.ts
1635
+ /** An uploaded file as returned by `fileAttachments.onUploadFiles`. */
1636
+ declare const aiChatFileFromUploadedFile: (file: UploadedFile) => AiChatFile;
1637
+ /**
1638
+ * Every file attached to a message, in order and without duplicates (a
1639
+ * restored thread can carry the same image as a vision line and as a part).
1640
+ * Reads the content parts first and falls back to `rawData.uploadedFiles`.
1641
+ */
1642
+ declare const aiChatFilesFromMessage: (message: {
1643
+ content?: unknown;
1644
+ rawData?: unknown;
1645
+ }) => AiChatFile[];
1646
+ /**
1647
+ * The text of a message. A user message shows only its last text part (the
1648
+ * earlier ones are context the host prepends); an assistant message shows all
1649
+ * of them.
1650
+ */
1651
+ declare const aiChatMessageText: (content: unknown, role?: "user" | "assistant") => string | undefined;
1652
+ /**
1653
+ * A file from an agent's `showFiles` tool. Those items carry workspace paths;
1654
+ * `urlFor` turns a path into the URL the host serves it from (it is also used
1655
+ * for the PDF rendering in `preview`).
1656
+ */
1657
+ declare const aiChatFileFromShowFilesItem: (item: AiChatShowFilesItem, { urlFor }?: {
1658
+ urlFor?: (path: string) => string;
1659
+ }) => AiChatFile;
1660
+ //#endregion
1661
+ //#region src/addons/ai/ai/F0AiFileAttachments/F0AiFileAttachments.d.ts
1662
+ type F0AiFileAttachmentsProps = {
1663
+ /** Files to show, in order. Build them with the `aiChatFile*` adapters. */
1664
+ files: AiChatFile[];
1665
+ /**
1666
+ * Which side of the transcript the files sit on: "end" for the person's own
1667
+ * message, "start" for the assistant.
1668
+ * @default "start"
1669
+ */
1670
+ align?: "start" | "end";
1671
+ /**
1672
+ * A file is about to open. Return `false` to handle it yourself (for
1673
+ * example in your own canvas) instead of the built-in viewer.
1674
+ */
1675
+ onOpenFile?: (file: AiChatFile, kind: AiChatFileKind) => void | false;
1676
+ /** A file was downloaded from its chip or full-size card (not from a viewer). */
1677
+ onFileDownloaded?: (file: AiChatFile) => void;
1678
+ /**
1679
+ * "compact" shows small square thumbnails that open the preview on click,
1680
+ * for the files a person sends: they already know what they attached and
1681
+ * only need a glance. "default" lays photos out as an album and documents
1682
+ * as full cards, for files the assistant returns.
1683
+ * @default "default"
1684
+ */
1685
+ size?: "default" | "compact";
1686
+ };
1687
+ /**
1688
+ * Files in an AI chat message, shown the way F0Chat shows them: photos as an
1689
+ * album that opens a lightbox, documents as cards with a snapshot of their
1690
+ * content that open fullscreen, videos inline, anything else as a download
1691
+ * chip.
1692
+ *
1693
+ * Remote files only get previews when the chat can load them (see
1694
+ * `filePreviews` on the AI chat provider); otherwise they stay as chips, which
1695
+ * is what the chat showed before.
1696
+ */
1697
+ declare const F0AiFileAttachmentsComponent: (props: F0AiFileAttachmentsProps) => ReactNode;
1698
+ /**
1699
+ * @experimental This is an experimental component use it at your own risk
1700
+ */
1701
+ declare const F0AiFileAttachments: typeof F0AiFileAttachmentsComponent;
1702
+ //#endregion
1703
+ //#region src/addons/ai/ai/F0AiFileAttachments/F0AiFilePreviewsProvider.d.ts
1704
+ /**
1705
+ * File previews for an AI chat: how file URLs are loaded, and the image
1706
+ * lightbox and document viewer every file in it opens.
1707
+ *
1708
+ * `F0AiChat` mounts one from its `filePreviews` prop. Hosts that render the
1709
+ * transcript on their own (or need a resolver that only exists deeper in their
1710
+ * tree, below their runtime) can mount another one; the innermost wins.
1711
+ */
1712
+ declare const F0AiFilePreviewsProvider: ({ filePreviews, children }: {
1713
+ filePreviews?: AiChatFilePreviewConfig;
1714
+ children: ReactNode;
1715
+ }) => ReactNode;
1716
+ //#endregion
1284
1717
  //#region src/addons/ai/ai/F0AiPong/F0AiPong.d.ts
1285
1718
  interface F0AiPongProps {
1286
1719
  onClose: () => void;
@@ -1354,4 +1787,4 @@ interface F0AiProcessingOverlayProps {
1354
1787
  */
1355
1788
  declare const F0AiProcessingOverlay: import("react").MemoExoticComponent<({ active, label, className, children }: F0AiProcessingOverlayProps) => import("react").JSX.Element>;
1356
1789
  //#endregion
1357
- export { SparklineDataPoint as $, ThreadActionHandlers as A, F0CanvasCardProps as At, F0AiMessageSource as B, usageLimitsPopoverSides as C, ClarifyingQuestionState as Ct, F0AiChatHistory as D, ResolvedStepAnswer as Dt, CollapsibleGroup as E, ClarifyingStepState as Et, F0AiChatHeader as F, F0AiProposalCardBaseProps as G, F0AiMessageSourcesProps as H, F0AiChatHeaderAction as I, F0AiInsightCard as J, F0AiProposalCardHiddenActions as K, F0AiChatHeaderProps as L, ChatThread as M, useChatHistory as N, DateGroup as O, useCanvasEntity as Ot, F0AiChatCreditsButton as P, F0AiInsightCardProps as Q, F0AiTableCard as R, UsageLimitsPopoverSide as S, ClarifyingOption as St, ThreadItem as T, ClarifyingStepData as Tt, F0AiProposalCard as U, F0AiMessageSources as V, F0AiProposalCardActions as W, BalanceConfig as X, AiInsightCardContent as Y, ContentType as Z, MentionItem as _, F0ActionItem as _t, PongBall as a, F0OneIcon as at, TrackedMention as b, actionItemStatuses as bt, createPersonMentionSource as c, oneIconSizes as ct, AiChatTextAreaUsageLimits as d, F0AuraVoiceAnimation as dt, contentTypes as et, AttachedFile as f, F0AuraVoiceAnimationProps as ft, UserTextPart as g, ChatSpinner as gt, UserBinaryPart as h, MaskOptions as ht, F0CanvasPanelProps as i, F0OneSwitchProps as it, ThreadGroup as j, F0AiChatHistoryProps as k, F0CanvasCard as kt, DropOverlay as l, F0HILActionConfirmation as lt, F0AiChatTextAreaSubmitPayload as m, F0AiMask as mt, F0AiProcessingOverlayProps as n, F0AvatarCompany as nt, F0AiPong as o, F0OneIconProps as ot, F0AiChatTextAreaProps as p, CSSRgbString as pt, F0AiProposalCardProps as q, F0CanvasPanel as r, F0OneSwitch as rt, F0AiChatUsageLimitsButton as s, OneIconSize as st, F0AiProcessingOverlay as t, F0AvatarPerson as tt, F0AiChatTextArea as u, F0HILActionConfirmationProps as ut, MentionSearchContext as v, ActionItemStatus as vt, ThreadListSkeleton as w, ClarifyingSelectionMode as wt, F0AiChatUsageLimitsButtonProps as x, F0ClarifyingPanel as xt, MentionSource as y, F0ActionItemProps as yt, F0AiTableCardProps as z };
1790
+ export { DateGroup as $, useCanvasEntity as $t, ComposerMentionRef as A, F0OneIcon as At, UserBinaryPart as B, MaskOptions as Bt, F0ChatComposerVoice as C, F0AiInsightCardProps as Ct, ComposerMention as D, F0AvatarCompany as Dt, ComposerEditor as E, F0AvatarPerson as Et, F0AiChatTextArea as F, F0HILActionConfirmationProps as Ft, TrackedMention as G, actionItemStatuses as Gt, MentionItem as H, F0ActionItem as Ht, AiChatTextAreaUsageLimits as I, F0AuraVoiceAnimation as It, usageLimitsPopoverSides as J, ClarifyingQuestionState as Jt, F0AiChatUsageLimitsButtonProps as K, F0ClarifyingPanel as Kt, AttachedFile as L, F0AuraVoiceAnimationProps as Lt, ComposerMentionSource as M, OneIconSize as Mt, createPersonMentionSource as N, oneIconSizes as Nt, ComposerMentionItem as O, F0OneSwitch as Ot, DropOverlay as P, F0HILActionConfirmation as Pt, F0AiChatHistory as Q, ResolvedStepAnswer as Qt, F0AiChatTextAreaProps as R, CSSRgbString as Rt, F0ChatComposerState as S, ContentType as St, ComposerTranscribeFn as T, contentTypes as Tt, MentionSearchContext as U, ActionItemStatus as Ut, UserTextPart as V, ChatSpinner as Vt, MentionSource as W, F0ActionItemProps as Wt, ThreadItem as X, ClarifyingStepData as Xt, ThreadListSkeleton as Y, ClarifyingSelectionMode as Yt, CollapsibleGroup as Z, ClarifyingStepState as Zt, ComposerAutocompletePlugin as _, F0AiProposalCardHiddenActions as _t, PongBall as a, F0AiChatCreditsButton as at, F0ChatComposerLabels as b, AiInsightCardContent as bt, F0AiFileAttachments as c, F0AiChatHeaderProps as ct, aiChatFileFromUploadedFile as d, F0AiMessageSource as dt, F0CanvasCard as en, F0AiChatHistoryProps as et, aiChatFilesFromMessage as f, F0AiMessageSources as ft, ComposerAutocomplete as g, F0AiProposalCardBaseProps as gt, F0ChatComposer as h, F0AiProposalCardActions as ht, F0CanvasPanelProps as i, useChatHistory as it, ComposerMentionSearchContext as j, F0OneIconProps as jt, ComposerMentionPinned as k, F0OneSwitchProps as kt, F0AiFileAttachmentsProps as l, F0AiTableCard as lt, F0AiChatUsageLimitsButton as m, F0AiProposalCard as mt, F0AiProcessingOverlayProps as n, ThreadGroup as nt, F0AiPong as o, F0AiChatHeader as ot, aiChatMessageText as p, F0AiMessageSourcesProps as pt, UsageLimitsPopoverSide as q, ClarifyingOption as qt, F0CanvasPanel as r, ChatThread as rt, F0AiFilePreviewsProvider as s, F0AiChatHeaderAction as st, F0AiProcessingOverlay as t, F0CanvasCardProps as tn, ThreadActionHandlers as tt, aiChatFileFromShowFilesItem as u, F0AiTableCardProps as ut, F0ChatComposerDraft as v, F0AiProposalCardProps as vt, RecorderStatus as w, SparklineDataPoint as wt, F0ChatComposerProps as x, BalanceConfig as xt, F0ChatComposerHandle as y, F0AiInsightCard as yt, F0AiChatTextAreaSubmitPayload as z, F0AiMask as zt };