@factorialco/f0-react 7.35.1 → 7.37.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 (30) hide show
  1. package/dist/{ChatPdfThumbnail-CP8J1TgU.js → ChatPdfThumbnail-J_rUFE-m.js} +1 -1
  2. package/dist/{ChatPostComposerDialog-CW6k7zUO.js → ChatPostComposerDialog-DF0gSTfA.js} +3 -3
  3. package/dist/{DocumentToolbar-DRVoTpae.js → DocumentToolbar-BvjptWbC.js} +2 -2
  4. package/dist/{DocxViewer-gChAIutZ.js → DocxViewer-NVagHR1x.js} +2 -2
  5. package/dist/{F0AiProcessingOverlay-BsKOOcJf.js → F0AiProcessingOverlay-rN9DzM28.js} +2648 -2524
  6. package/dist/{F0CanvasPanel-B8GTWbHT.js → F0CanvasPanel-BlJYT_pW.js} +21530 -21415
  7. package/dist/{F0Map-Cg8XuZ1A.js → F0Map-BqHziZ77.js} +4 -4
  8. package/dist/{F0VideoPlayer-o4yCeeor.js → F0VideoPlayer-7TmDgXTT.js} +2 -2
  9. package/dist/{MapProvider-DVrIr6zm.js → MapProvider-BwPbztrL.js} +8656 -8626
  10. package/dist/{SheetViewer-Bj_g_o7k.js → SheetViewer-Br7dSUQX.js} +2 -2
  11. package/dist/{TextViewer-u0RHT2X8.js → TextViewer-J8flQHdz.js} +2 -2
  12. package/dist/ai.d.ts +149 -7
  13. package/dist/ai.js +2 -2
  14. package/dist/component-status.js +1 -1
  15. package/dist/{experimental-i8ZkeQnG.js → experimental-VOPRyPdY.js} +7 -7
  16. package/dist/experimental.d.ts +74 -17
  17. package/dist/experimental.js +58 -58
  18. package/dist/f0.d.ts +155 -7
  19. package/dist/f0.js +10 -10
  20. package/dist/i18n-provider-defaults.d.ts +2 -0
  21. package/dist/i18n-provider-defaults.js +2 -0
  22. package/dist/index-4d26WVNj.js +4 -0
  23. package/dist/{index-afOc7BBN.js → index-Be-5PLy6.js} +3 -3
  24. package/dist/{index-DBv7E55t.js → index-DaYE-J88.js} +2 -2
  25. package/dist/{index-CoR8O7is.js → index-DlNTBsNK.js} +1 -1
  26. package/dist/{index-Dc6gkOtm.js → index-cmmW6PJw.js} +3 -3
  27. package/dist/{pdfWorker-DhZN-GI-.js → pdfWorker-B-WyhGDu.js} +2 -2
  28. package/dist/styles.css +1 -1
  29. package/package.json +1 -1
  30. package/dist/index-CXEDu0Pr.js +0 -4
@@ -1,8 +1,8 @@
1
1
  import { jsxs as a, jsx as r, Fragment as N } from "react/jsx-runtime";
2
2
  import { useState as i, useEffect as k } from "react";
3
- import { u as v, T as S, h as V, S as R } from "./F0CanvasPanel-B8GTWbHT.js";
3
+ import { u as v, T as S, h as V, S as R } from "./F0CanvasPanel-BlJYT_pW.js";
4
4
  import { f as z, c as E } from "./sheetPreview-Djc-YyVs.js";
5
- import { u as _, D as j } from "./DocumentToolbar-DRVoTpae.js";
5
+ import { u as _, D as j } from "./DocumentToolbar-BvjptWbC.js";
6
6
  const g = 1e3, F = 100, G = ({
7
7
  url: n,
8
8
  filename: y,
@@ -1,7 +1,7 @@
1
1
  import { jsxs as b, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as _, useEffect as h } from "react";
3
- import { u as x, S as p, p as w } from "./F0CanvasPanel-B8GTWbHT.js";
4
- import { u as y, D as g } from "./DocumentToolbar-DRVoTpae.js";
3
+ import { u as x, S as p, p as w } from "./F0CanvasPanel-BlJYT_pW.js";
4
+ import { u as y, D as g } from "./DocumentToolbar-BvjptWbC.js";
5
5
  const k = 2 * 1024 * 1024, v = [
6
6
  "[&_h1]:mb-3 [&_h1]:mt-6 [&_h1]:text-2xl [&_h1]:font-semibold",
7
7
  "[&_h2]:mb-2 [&_h2]:mt-5 [&_h2]:text-xl [&_h2]:font-semibold",
package/dist/ai.d.ts CHANGED
@@ -212,6 +212,73 @@ declare const actionVariants: readonly ["default", "outline", "critical", "neutr
212
212
 
213
213
  export declare type AggregationType = "count" | "sum" | "avg" | "min" | "max" | "countDistinct";
214
214
 
215
+ /**
216
+ * An entry in the composer's attachment menu — see `composerActions` on
217
+ * `F0AiChatTextArea`. Attaching a file is NOT one of these: the composer
218
+ * contributes that entry itself from `fileAttachments`, so a host adding
219
+ * "Connectors" doesn't have to rewire the file picker to keep it.
220
+ */
221
+ export declare type AiChatComposerAction = AiChatComposerActionItem | AiChatComposerActionSubmenu | AiChatComposerActionToggle | AiChatComposerActionSeparator;
222
+
223
+ /** What every composer-menu entry shows, whatever choosing it does. */
224
+ declare type AiChatComposerActionBase = {
225
+ /**
226
+ * Host-side bookkeeping — a key for the host's own list, and what it reads
227
+ * back in analytics. The composer neither renders it nor keys the menu by it.
228
+ */
229
+ id: string;
230
+ label: string;
231
+ icon?: IconType;
232
+ /** A partner's logo, where an f0 icon would be wrong — a connector's mark. */
233
+ avatar?: AvatarVariant;
234
+ /** Short trailing tag beside the label, e.g. "New". Not a sentence. */
235
+ tag?: string;
236
+ /** Secondary line under the label. */
237
+ description?: string;
238
+ disabled?: boolean;
239
+ /**
240
+ * Shown on hover while `disabled` — say why the action is unavailable.
241
+ * HOVER-ONLY: a disabled menu entry is not focusable, so this text never
242
+ * reaches the keyboard or a screen reader. Never put anything here that the
243
+ * label alone doesn't already imply.
244
+ */
245
+ disabledTooltip?: string;
246
+ };
247
+
248
+ /** An entry that DOES something and closes the menu. */
249
+ export declare type AiChatComposerActionItem = AiChatComposerActionBase & {
250
+ type?: "action";
251
+ onClick: () => void;
252
+ };
253
+
254
+ /** A rule between groups of entries. Carries no label and nothing to press. */
255
+ export declare type AiChatComposerActionSeparator = {
256
+ type: "separator";
257
+ };
258
+
259
+ /**
260
+ * An entry that opens a menu of its own beside this one. Use it to keep a long
261
+ * or stateful list one step in — the connectors this chat can reach — instead
262
+ * of unrolling it where the file picker lives.
263
+ */
264
+ export declare type AiChatComposerActionSubmenu = AiChatComposerActionBase & {
265
+ type: "submenu";
266
+ actions: AiChatComposerAction[];
267
+ /** Shown inside the submenu while `actions` is empty, so it never opens bare. */
268
+ emptyLabel?: string;
269
+ };
270
+
271
+ /**
272
+ * An entry you flip rather than press: it carries a switch and the menu STAYS
273
+ * OPEN, so several can be set in one visit. The host owns `checked` — the
274
+ * composer renders what it is told and reports back through `onCheckedChange`.
275
+ */
276
+ export declare type AiChatComposerActionToggle = AiChatComposerActionBase & {
277
+ type: "toggle";
278
+ checked: boolean;
279
+ onCheckedChange: (checked: boolean) => void;
280
+ };
281
+
215
282
  /**
216
283
  * Credits configuration for the AI chat.
217
284
  * Groups all credits-related props into a single object.
@@ -952,6 +1019,8 @@ export declare const aiTranslations: {
952
1019
  readonly dismiss: "Dismiss";
953
1020
  };
954
1021
  readonly attachFile: "Attach file";
1022
+ readonly addToConversation: "Add to this conversation";
1023
+ readonly addFilesOrPhotos: "Add files or photos";
955
1024
  readonly recordAudio: "Record audio";
956
1025
  readonly listening: "Listening…";
957
1026
  readonly stopRecording: "Stop and transcribe";
@@ -3071,6 +3140,8 @@ export declare const defaultTranslations: {
3071
3140
  readonly dismiss: "Dismiss";
3072
3141
  };
3073
3142
  readonly attachFile: "Attach file";
3143
+ readonly addToConversation: "Add to this conversation";
3144
+ readonly addFilesOrPhotos: "Add files or photos";
3074
3145
  readonly recordAudio: "Record audio";
3075
3146
  readonly listening: "Listening…";
3076
3147
  readonly stopRecording: "Stop and transcribe";
@@ -3853,20 +3924,16 @@ declare type DetailsItemContent = (ComponentProps<typeof DataList.Item> & {
3853
3924
  */
3854
3925
  declare type DistributiveOmit<T, K extends PropertyKey> = T extends unknown ? Omit<T, K> : never;
3855
3926
 
3856
- declare type DropdownItem = DropdownItemObject | DropdownItemSeparator | DropdownItemLabel;
3927
+ declare type DropdownItem = DropdownItemObject | DropdownItemSeparator | DropdownItemLabel | DropdownItemSubmenu | DropdownItemSwitch;
3857
3928
 
3858
3929
  declare type DropdownItemLabel = {
3859
3930
  type: "label";
3860
3931
  text: string;
3861
3932
  };
3862
3933
 
3863
- declare type DropdownItemObject = Pick<NavigationItem, "label" | "href"> & {
3934
+ declare type DropdownItemObject = Pick<NavigationItem, "label" | "href"> & Omit<DropdownItemVisuals, "label"> & {
3864
3935
  type?: "item";
3865
3936
  onClick?: () => void;
3866
- icon?: IconType;
3867
- description?: string;
3868
- critical?: boolean;
3869
- avatar?: AvatarVariant;
3870
3937
  disabled?: boolean;
3871
3938
  /**
3872
3939
  * Tooltip shown on hover while the item is `disabled` — use it to explain why
@@ -3881,6 +3948,48 @@ declare type DropdownItemSeparator = {
3881
3948
  type: "separator";
3882
3949
  };
3883
3950
 
3951
+ /**
3952
+ * A row that opens a menu of its own beside this one, rather than doing
3953
+ * something. Use it to keep a long list one step in — the connectors a chat can
3954
+ * reach, say — instead of unrolling it into the parent menu.
3955
+ */
3956
+ declare type DropdownItemSubmenu = DropdownItemVisuals & {
3957
+ type: "submenu";
3958
+ items: DropdownItem[];
3959
+ disabled?: boolean;
3960
+ /**
3961
+ * Shown INSIDE the submenu when `items` is empty, so choosing it never opens
3962
+ * an empty panel. Without it an empty submenu renders nothing.
3963
+ */
3964
+ emptyLabel?: string;
3965
+ };
3966
+
3967
+ /**
3968
+ * A row you flip rather than press: it carries a switch, and choosing it keeps
3969
+ * the menu open so several can be set in a row. The item itself is what the
3970
+ * keyboard and the accessibility tree see (`aria-checked`); the switch is drawn
3971
+ * for the eye only.
3972
+ */
3973
+ declare type DropdownItemSwitch = DropdownItemVisuals & {
3974
+ type: "switch";
3975
+ checked: boolean;
3976
+ onCheckedChange: (checked: boolean) => void;
3977
+ disabled?: boolean;
3978
+ /** Tooltip shown on hover while `disabled`, as on `DropdownItemObject`. */
3979
+ disabledTooltip?: string;
3980
+ };
3981
+
3982
+ /** What any row shows, whatever it does when you choose it. */
3983
+ declare type DropdownItemVisuals = {
3984
+ label: string;
3985
+ icon?: IconType;
3986
+ description?: string;
3987
+ avatar?: AvatarVariant;
3988
+ /** Short trailing tag beside the label, e.g. "New". Not a sentence. */
3989
+ tag?: string;
3990
+ critical?: boolean;
3991
+ };
3992
+
3884
3993
  export declare const DropOverlay: ({ visible, onFilesDropped, mode, }: DropOverlayProps) => JSX_2.Element;
3885
3994
 
3886
3995
  declare interface DropOverlayProps {
@@ -4157,7 +4266,7 @@ export declare const F0AiChatProvider: ({ enabled, side, panelContentSide, initi
4157
4266
  * coupling to `useAiChat()` or CopilotKit — wrappers like F0AiChat
4158
4267
  * provide the wiring.
4159
4268
  */
4160
- export declare const F0AiChatTextArea: ({ onSubmit, onStop, inProgress, onBeforeSubmit, placeholders, creditWarning, clarifyingUI, pendingContext, onPendingContextChange, pendingQuote, onPendingQuoteChange, fileAttachments, toolbarStart, onTranscribe, searchPersons, mentionSources, onProcessFilesRef, disclaimer, usageLimits, footer, isWelcomeScreen, fullscreen, welcomeScreenSuggestions, onSuggestionClick, welcomeScreenSuggestionsPlacement, welcomeScreenSuggestionsCollapsedByDefault, welcomeScreenCards, padding, ref, }: F0AiChatTextAreaProps) => JSX_2.Element;
4269
+ export 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) => JSX_2.Element;
4161
4270
 
4162
4271
  export declare type F0AiChatTextAreaProps = {
4163
4272
  ref: RefObject<HTMLDivElement>;
@@ -4195,6 +4304,39 @@ export declare type F0AiChatTextAreaProps = {
4195
4304
  onPendingQuoteChange?: (quote: PendingQuote | null) => void;
4196
4305
  /** File attachment configuration. When omitted, attachments are disabled. */
4197
4306
  fileAttachments?: AiChatFileAttachmentConfig;
4307
+ /**
4308
+ * Extra actions offered where the attachment control sits.
4309
+ *
4310
+ * Omitted or empty — the default — leaves the paperclip exactly as it is: one
4311
+ * button that opens the file picker. With at least one action the paperclip
4312
+ * becomes a `+` that opens a menu, and attaching a file becomes the FIRST
4313
+ * entry in it rather than disappearing. The composer contributes that entry
4314
+ * from `fileAttachments`, so a host adding "Connectors" doesn't have to
4315
+ * rewire the file picker to keep it.
4316
+ *
4317
+ * Without `fileAttachments` the menu holds only these actions and no file
4318
+ * entry, which is how a host offers "add context" on a composer that takes
4319
+ * no uploads.
4320
+ *
4321
+ * Reaching `maxFiles` disables the file entry alone — the host's actions have
4322
+ * nothing to do with the file count and stay live. Transcribing disables the
4323
+ * whole trigger, as it does the paperclip today.
4324
+ */
4325
+ composerActions?: AiChatComposerAction[];
4326
+ /**
4327
+ * Told when the `+` menu opens and when it closes.
4328
+ *
4329
+ * There for hosts whose entries cost something to produce: a list that has to
4330
+ * be fetched can stay unfetched until the menu is actually opened, instead of
4331
+ * loading on every composer that might never be opened at all. Fires only
4332
+ * where there IS a menu — with no `composerActions` the control is the plain
4333
+ * paperclip and there is nothing to open.
4334
+ *
4335
+ * It reports the ROOT menu, not a submenu: on a phone a submenu flattens into
4336
+ * the same sheet, so there is no second moment to report and a host that
4337
+ * loaded on this one has its entries ready either way.
4338
+ */
4339
+ onComposerActionsOpenChange?: (open: boolean) => void;
4198
4340
  /**
4199
4341
  * Host-owned compact controls rendered after the attachment action in the
4200
4342
  * normal action row. Controls render inside the chat form, so buttons must
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-B8GTWbHT.js";
1
+ import { C as e, D as r, c as t, F as i, a as o, f as n, g as F, d as C, e as l, I as A, P as d, b as u, u as m } from "./F0CanvasPanel-BlJYT_pW.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-BsKOOcJf.js";
3
+ import { A as g, C as p, t as v, s as I, v as T, y as S, B as f, l as y, i as x, q as b, E as k, G as B, p as H, r as L, j as M, e as O, g as V, k as w, F as D, T as z, w as E, h as G, a as j, n as q, z as R, m as U, o as J, D as K, b as N, f as Q, x as W, c as X, d as Y, u as Z } from "./F0AiProcessingOverlay-rN9DzM28.js";
4
4
  export {
5
5
  g as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,