@factorialco/f0-react 4.56.4 → 4.57.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.
@@ -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-CNdEi4a2.js";
3
+ import { u as v, T as S, h as V, S as R } from "./F0CanvasPanel-B7F3sn6X.js";
4
4
  import { f as z, c as E } from "./sheetPreview-5qeAOp0W.js";
5
- import { u as _, D as j } from "./DocumentToolbar-5ygy0a8R.js";
5
+ import { u as _, D as j } from "./DocumentToolbar-ChFQdyuf.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-CNdEi4a2.js";
4
- import { u as y, D as g } from "./DocumentToolbar-5ygy0a8R.js";
3
+ import { u as x, S as p, p as w } from "./F0CanvasPanel-B7F3sn6X.js";
4
+ import { u as y, D as g } from "./DocumentToolbar-ChFQdyuf.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
@@ -402,6 +402,13 @@ export declare type AiChatProviderProps = {
402
402
  chatHeader?: React.ReactNode;
403
403
  chatMessages?: React.ReactNode;
404
404
  chatInput?: React.ReactNode;
405
+ /**
406
+ * Optional host-provided content rendered above the complete chat surface.
407
+ * The chat owns the scoped backdrop and disables its header, messages, and
408
+ * input while this content is mounted; the host owns the overlay content and
409
+ * its dismissal behavior.
410
+ */
411
+ chatOverlay?: React.ReactNode;
405
412
  /** Children rendered inside the provider. */
406
413
  children?: React.ReactNode;
407
414
  };
@@ -555,7 +562,7 @@ declare type AiChatProviderReturnValue = {
555
562
  panelContentSide: "left" | "right";
556
563
  /** Set which edge hosted panel content docks to. */
557
564
  setPanelContentSide: React.Dispatch<React.SetStateAction<"left" | "right">>;
558
- } & Pick<AiChatState, "agent" | "chatHeader" | "chatMessages" | "chatInput" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "credits" | "employeeCredits" | "creditWarning" | "fileAttachments" | "onTranscribe"> & {
565
+ } & Pick<AiChatState, "agent" | "chatHeader" | "chatMessages" | "chatInput" | "chatOverlay" | "disclaimer" | "resizable" | "entityRefs" | "canvasActions" | "canvasEntities" | "credits" | "employeeCredits" | "creditWarning" | "fileAttachments" | "onTranscribe"> & {
559
566
  /** The current canvas content, or null when canvas is closed */
560
567
  canvasContent: CanvasContent | null;
561
568
  /** Open the canvas panel with the given content */
@@ -586,6 +593,7 @@ declare interface AiChatState {
586
593
  chatHeader?: React.ReactNode;
587
594
  chatMessages?: React.ReactNode;
588
595
  chatInput?: React.ReactNode;
596
+ chatOverlay?: React.ReactNode;
589
597
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
590
598
  welcomeScreenCards?: F0AiChatWelcomeCard[];
591
599
  disclaimer?: AiChatDisclaimer;
@@ -2930,7 +2938,7 @@ export declare interface F0ActionItemProps {
2930
2938
  /**
2931
2939
  * @experimental This is an experimental component use it at your own risk
2932
2940
  */
2933
- export declare const F0AiChat: ({ header: headerProp, messages: messagesProp, input: inputProp, }: F0AiChatProps) => JSX_2.Element | null;
2941
+ export declare const F0AiChat: ({ header: headerProp, messages: messagesProp, input: inputProp, overlay: overlayProp, }: F0AiChatProps) => JSX_2.Element | null;
2934
2942
 
2935
2943
  /**
2936
2944
  * The AI chat credits / settings popover button, on its own. Use it to surface
@@ -3063,12 +3071,17 @@ export declare interface F0AiChatProps {
3063
3071
  messages?: ReactNode;
3064
3072
  /** Input slot rendered at the bottom (textarea + suggestions + disclaimer). */
3065
3073
  input?: ReactNode;
3074
+ /**
3075
+ * Host-provided content rendered above the complete chat surface. F0
3076
+ * supplies the scoped backdrop and makes the chat beneath it inert.
3077
+ */
3078
+ overlay?: ReactNode;
3066
3079
  }
3067
3080
 
3068
3081
  /**
3069
3082
  * @experimental This is an experimental component use it at your own risk
3070
3083
  */
3071
- export declare const F0AiChatProvider: ({ enabled, side, panelContentSide, initialMessage, chatHeader, chatMessages, chatInput, welcomeScreenSuggestions, welcomeScreenCards, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
3084
+ export declare const F0AiChatProvider: ({ enabled, side, panelContentSide, initialMessage, chatHeader, chatMessages, chatInput, chatOverlay, welcomeScreenSuggestions, welcomeScreenCards, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, historyEnabled, footer, VoiceMode, entityRefs, canvasActions, canvasEntities, credits, employeeCredits, creditWarning, fileAttachments, onTranscribe, onThumbsUp, onThumbsDown, children, agent, tracking, }: AiChatProviderProps) => JSX_2.Element;
3072
3085
 
3073
3086
  /**
3074
3087
  * Headless chat composer.
@@ -5187,11 +5200,9 @@ declare namespace Calendar {
5187
5200
 
5188
5201
  declare module "@tiptap/core" {
5189
5202
  interface Commands<ReturnType> {
5190
- enhanceHighlight: {
5191
- setEnhanceHighlight: (from: number, to: number, options?: {
5192
- placeholder?: string;
5193
- }) => ReturnType;
5194
- clearEnhanceHighlight: () => ReturnType;
5203
+ aiBlock: {
5204
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
5205
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
5195
5206
  };
5196
5207
  }
5197
5208
  }
@@ -5199,9 +5210,11 @@ declare module "@tiptap/core" {
5199
5210
 
5200
5211
  declare module "@tiptap/core" {
5201
5212
  interface Commands<ReturnType> {
5202
- aiBlock: {
5203
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
5204
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
5213
+ enhanceHighlight: {
5214
+ setEnhanceHighlight: (from: number, to: number, options?: {
5215
+ placeholder?: string;
5216
+ }) => ReturnType;
5217
+ clearEnhanceHighlight: () => ReturnType;
5205
5218
  };
5206
5219
  }
5207
5220
  }
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 h } from "./F0CanvasPanel-CNdEi4a2.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 h } from "./F0CanvasPanel-B7F3sn6X.js";
2
2
  import { defaultTranslations as c } from "./i18n-provider-defaults.js";
3
- import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay-BoxHwlCh.js";
3
+ import { A as P, C as T, t as p, s as v, v as g, y as f, l as y, i as S, q as x, z as b, B as k, p as H, r as O, j as V, e as w, g as B, k as M, F as z, T as D, w as L, h as j, a as q, n as E, m as G, o as R, b as J, f as K, x as N, c as Q, d as U, u as W } from "./F0AiProcessingOverlay-oR419tUE.js";
4
4
  export {
5
5
  P as AiChatTranslationsProvider,
6
6
  e as ChatSpinner,
@@ -283,11 +283,9 @@ declare namespace Calendar {
283
283
 
284
284
  declare module "@tiptap/core" {
285
285
  interface Commands<ReturnType> {
286
- enhanceHighlight: {
287
- setEnhanceHighlight: (from: number, to: number, options?: {
288
- placeholder?: string;
289
- }) => ReturnType;
290
- clearEnhanceHighlight: () => ReturnType;
286
+ aiBlock: {
287
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
288
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
291
289
  };
292
290
  }
293
291
  }
@@ -295,9 +293,11 @@ declare module "@tiptap/core" {
295
293
 
296
294
  declare module "@tiptap/core" {
297
295
  interface Commands<ReturnType> {
298
- aiBlock: {
299
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
300
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
296
+ enhanceHighlight: {
297
+ setEnhanceHighlight: (from: number, to: number, options?: {
298
+ placeholder?: string;
299
+ }) => ReturnType;
300
+ clearEnhanceHighlight: () => ReturnType;
301
301
  };
302
302
  }
303
303
  }