@factorialco/f0-react 16.31.1 → 16.32.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/{ArchiveThumbnail-snnCL51c.js → ArchiveThumbnail-BuNA4UrO.js} +4 -4
- package/dist/{ArchiveViewer-qrPGzl45.js → ArchiveViewer-W103xRky.js} +6 -6
- package/dist/{ChatPostComposerDialog-C7FQ5zej.js → ChatPostComposerDialog-BCXfHgyD.js} +3 -3
- package/dist/{Check-B2Oii9hT.js → Check-DSKdy4lh.js} +1 -1
- package/dist/{CoachmarkProvider-CqkPfWAF.js → CoachmarkProvider-CXRAZo57.js} +9455 -9455
- package/dist/{CodeThumbnail-jrNjbGFK.js → CodeThumbnail-CrMWds9n.js} +1 -1
- package/dist/{CodeViewer-rskCF-XU.js → CodeViewer-BYY3y3VG.js} +6 -6
- package/dist/{DocumentToolbar-C7f4MplQ.js → DocumentToolbar-CipRq68O.js} +5 -5
- package/dist/{DocxViewer-Md9lijeE.js → DocxViewer-8dEvcQjH.js} +3 -3
- package/dist/{Ellipsis-C36nOldJ.js → Ellipsis-D5UwpzSY.js} +1 -1
- package/dist/{ExternalLink-oako7DEE.js → ExternalLink-DOVErzVl.js} +1 -1
- package/dist/{F0AiProcessingOverlay-Bz5bf3ZA.js → F0AiProcessingOverlay-CelAhVN1.js} +147 -147
- package/dist/{F0Alert-Ctib1gD6.js → F0Alert-CjoArzBk.js} +5 -5
- package/dist/F0AudioPlayer-_zrcaPAA.js +2 -0
- package/dist/{F0Button-DVbQTicD.js → F0Button-B9tE57M3.js} +4 -4
- package/dist/{F0CanvasPanel-CZKTFPP7.js → F0CanvasPanel-B7AXL0XT.js} +10076 -10085
- package/dist/{F0DocumentViewer-BgIPKW21.js → F0DocumentViewer-DVByu4vb.js} +1 -1
- package/dist/{F0DocumentViewer-D9HXGXr_.js → F0DocumentViewer-DcNc-yXR.js} +4 -4
- package/dist/{F0Map-C4p4mly7.js → F0Map-BN8BQzMZ.js} +34 -34
- package/dist/{F0Select-D6mxgb1s.js → F0Select-CtRlKRnL.js} +212 -212
- package/dist/{F0Text-CcpTiEit.js → F0Text-BDmNaecR.js} +2 -2
- package/dist/F0VideoPlayer-CB52ikkB.js +1 -0
- package/dist/{F0VideoPlayer-D6cgKhcQ.js → F0VideoPlayer-THvSQSCu.js} +8 -8
- package/dist/{HtmlThumbnail-fMq9VsQi.js → HtmlThumbnail-BakLalKI.js} +1 -1
- package/dist/{HtmlViewer-BVitdvD6.js → HtmlViewer-ClgjG-H_.js} +9 -9
- package/dist/{LayoutGroup-FkYOcIJ1.js → LayoutGroup-CuWgJO_W.js} +14 -14
- package/dist/{LockLocked-B3KX44wv.js → LockLocked-FmZAbVxB.js} +1 -1
- package/dist/{Map-ZXcjPt4S.js → Map-CdRcz8MV.js} +10 -10
- package/dist/{PdfThumbnail-CwkqbqHx.js → PdfThumbnail-CXYyO2sc.js} +1 -1
- package/dist/{PdfViewer-Cytnm1Ks.js → PdfViewer-BNPz0po0.js} +8 -8
- package/dist/{SandboxedHtmlFrame-BT6LThaT.js → SandboxedHtmlFrame-SKujax-U.js} +3 -3
- package/dist/{SheetViewer-DFLeOh69.js → SheetViewer-BV4RjCqC.js} +5 -5
- package/dist/{TextViewer-C9Ds2dE7.js → TextViewer-B-a77tb9.js} +4 -4
- package/dist/ai.d.ts +3 -3
- package/dist/ai.js +4 -4
- package/dist/component-status.js +1 -1
- package/dist/{createIcon-B-z7hPQg.js → createIcon-l_kbsdJi.js} +1 -1
- package/dist/{dist-C691Abhf.js → dist-BjlY6-o5.js} +4 -4
- package/dist/{dist-BwlC-i6M.js → dist-C1RZo6kP.js} +2 -2
- package/dist/{dist-_ts6SUAW.js → dist-CiU6Cp6n.js} +1 -1
- package/dist/{dist-CiC2ZqiK.js → dist-D0tUIJ0v.js} +2 -2
- package/dist/{dist-DN0nDQy0.js → dist-MPgX6tx_.js} +1 -1
- package/dist/experimental.d.ts +5 -3
- package/dist/experimental.js +5677 -5651
- package/dist/{exports-D-3BWR9h.d.ts → exports-DxWkQJMl.d.ts} +1 -1
- package/dist/f0.d.ts +4 -4
- package/dist/f0.js +47 -51
- package/dist/{highlight-CT0Gl0kj.js → highlight-B3C1rkLK.js} +1 -1
- package/dist/{i18n-provider-kdMqj3iD.js → i18n-provider-DEmElb7u.js} +1 -1
- package/dist/{i18n-provider-defaults-BRl6Z_VM.js → i18n-provider-defaults-CTH1Ugiz.js} +2 -1
- package/dist/{i18n-provider-defaults-BuHela-5.d.ts → i18n-provider-defaults-SQ7US7M7.d.ts} +2 -0
- package/dist/i18n-provider-defaults.d.ts +1 -1
- package/dist/i18n-provider-defaults.js +1 -1
- package/dist/{index-BACLk6eB.d.ts → index-CZ-TTSgT.d.ts} +2 -2
- package/dist/{index-BYvzhQWm.d.ts → index-MQOQkW-2.d.ts} +8 -2
- package/dist/{localized-D19oXKkk.js → localized-D86_eL7B.js} +1 -1
- package/dist/{maplibre-B3l6Byv4.js → maplibre-D5u_EpGf.js} +1 -1
- package/dist/{pdfWorker-BwmWYP-K.js → pdfWorker-allMZ4J8.js} +1 -1
- package/dist/{popover-BgQJIZoe.js → popover-B7-MjlA_.js} +1 -1
- package/dist/{skeleton-9cd4VWq0.js → skeleton-cJaQYsv6.js} +1 -1
- package/dist/styles.css +1 -1
- package/dist/{toolbarStyles-CusTVVsH.js → toolbarStyles-DKWFaPuE.js} +1 -1
- package/dist/{useData-XExWuz7o.js → useData-Clrt5l2P.js} +8 -8
- package/package.json +1 -1
- package/dist/F0AudioPlayer-B4YvRRgo.js +0 -2
- package/dist/F0VideoPlayer-DV84zT9b.js +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { a as e, r as t } from "./i18n-provider-
|
|
2
|
-
import { n, t as r } from "./skeleton-
|
|
1
|
+
import { a as e, r as t } from "./i18n-provider-DEmElb7u.js";
|
|
2
|
+
import { n, t as r } from "./skeleton-cJaQYsv6.js";
|
|
3
3
|
import { L as i, R as a } from "./tooltip-NXXT56H4.js";
|
|
4
|
-
import {
|
|
5
|
-
import { $ as v, $n as y, Al as b, As as x, At as S, B as C, Bn as w, Bo as T, Ca as E, Cn as D, D as O, Da as ee, Dn as te, Dt as ne, E as k, Fn as A, Go as j, Gs as M, Gt as re, Hl as N, Hn as ie, Ht as ae, I as oe, In as se, J as ce, Jn as le, Js as ue, Kt as P, L as de, Ln as F, Ml as I, Ms as fe, Mt as pe, N as me, Nt as he, O as ge, Oi as _e, On as ve, Ot as ye, P as L, Pn as be, Pt as xe, Q as Se, R as Ce, Sa as we, Sn as Te, St as Ee, T as De, Ta as Oe, Un as ke, Ut as R, Vl as Ae, Vn as je, Vo as Me, Vt as z, Wt as Ne, X as B, Xn as Pe, Xs as Fe, Xt as Ie, Y as Le, Yn as Re, Z as ze, Zi as V, Zs as H, _c as Be, _l as Ve, _t as He, a as Ue, ac as We, as as Ge, at as Ke, b as qe, bn as Je, bt as Ye, c as Xe, ca as Ze, cl as Qe, ct as $e, dt as et, et as tt, fc as nt, fn as rt, fo as it, ft as at, gt as ot, hc as st, hi as ct, hn as lt, ht as ut, in as dt, jl as ft, jn as pt, js as mt, ki as ht, ks as gt, kt as _t, la as vt, li as yt, ln as bt, nt as xt, ot as St, pn as Ct, r as wt, rl as Tt, rn as Et, s as Dt, sa as Ot, sl as kt, tt as At, u as jt, un as Mt, ut as Nt, vn as Pt, vs as Ft, vt as It, w as Lt, wc as Rt, wn as zt, x as Bt, xc as Vt, xt as Ht, y as Ut, yc as Wt, yi as Gt, yt as Kt, z as qt } from "./F0CanvasPanel-
|
|
6
|
-
import { a as U, u as Jt } from "./createIcon-
|
|
7
|
-
import { t as Yt } from "./i18n-provider-defaults-
|
|
8
|
-
import { A as Xt, L as Zt, P as W, U as Qt, W as $t, _ as en, g as tn, u as nn, v as rn, w as an, x as on } from "./useData-
|
|
9
|
-
import { Bn as sn, Bt as cn, Ir as ln, Lr as un, Rr as dn, St as fn, Vr as pn, bn as mn, bt as hn, dt as gn, qt as _n, xt as vn, zn as yn } from "./F0Select-
|
|
10
|
-
import { t as bn } from "./Check-
|
|
11
|
-
import { t as xn } from "./Ellipsis-
|
|
12
|
-
import { t as Sn } from "./ExternalLink-
|
|
13
|
-
import { $ as Cn, a as wn, i as Tn, n as En, t as Dn } from "./popover-
|
|
14
|
-
import { t as On } from "./F0Text-
|
|
4
|
+
import { H as o, O as s, X as c, b as l, h as u, j as d, n as f, q as p, r as m, t as h, v as g, z as _ } from "./F0Button-B9tE57M3.js";
|
|
5
|
+
import { $ as v, $n as y, Al as b, As as x, At as S, B as C, Bn as w, Bo as T, Ca as E, Cn as D, D as O, Da as ee, Dn as te, Dt as ne, E as k, Fn as A, Go as j, Gs as M, Gt as re, Hl as N, Hn as ie, Ht as ae, I as oe, In as se, J as ce, Jn as le, Js as ue, Kt as P, L as de, Ln as F, Ml as I, Ms as fe, Mt as pe, N as me, Nt as he, O as ge, Oi as _e, On as ve, Ot as ye, P as L, Pn as be, Pt as xe, Q as Se, R as Ce, Sa as we, Sn as Te, St as Ee, T as De, Ta as Oe, Un as ke, Ut as R, Vl as Ae, Vn as je, Vo as Me, Vt as z, Wt as Ne, X as B, Xn as Pe, Xs as Fe, Xt as Ie, Y as Le, Yn as Re, Z as ze, Zi as V, Zs as H, _c as Be, _l as Ve, _t as He, a as Ue, ac as We, as as Ge, at as Ke, b as qe, bn as Je, bt as Ye, c as Xe, ca as Ze, cl as Qe, ct as $e, dt as et, et as tt, fc as nt, fn as rt, fo as it, ft as at, gt as ot, hc as st, hi as ct, hn as lt, ht as ut, in as dt, jl as ft, jn as pt, js as mt, ki as ht, ks as gt, kt as _t, la as vt, li as yt, ln as bt, nt as xt, ot as St, pn as Ct, r as wt, rl as Tt, rn as Et, s as Dt, sa as Ot, sl as kt, tt as At, u as jt, un as Mt, ut as Nt, vn as Pt, vs as Ft, vt as It, w as Lt, wc as Rt, wn as zt, x as Bt, xc as Vt, xt as Ht, y as Ut, yc as Wt, yi as Gt, yt as Kt, z as qt } from "./F0CanvasPanel-B7AXL0XT.js";
|
|
6
|
+
import { a as U, u as Jt } from "./createIcon-l_kbsdJi.js";
|
|
7
|
+
import { t as Yt } from "./i18n-provider-defaults-CTH1Ugiz.js";
|
|
8
|
+
import { A as Xt, L as Zt, P as W, U as Qt, W as $t, _ as en, g as tn, u as nn, v as rn, w as an, x as on } from "./useData-Clrt5l2P.js";
|
|
9
|
+
import { Bn as sn, Bt as cn, Ir as ln, Lr as un, Rr as dn, St as fn, Vr as pn, bn as mn, bt as hn, dt as gn, qt as _n, xt as vn, zn as yn } from "./F0Select-CtRlKRnL.js";
|
|
10
|
+
import { t as bn } from "./Check-DSKdy4lh.js";
|
|
11
|
+
import { t as xn } from "./Ellipsis-D5UwpzSY.js";
|
|
12
|
+
import { t as Sn } from "./ExternalLink-DOVErzVl.js";
|
|
13
|
+
import { $ as Cn, a as wn, i as Tn, n as En, t as Dn } from "./popover-B7-MjlA_.js";
|
|
14
|
+
import { t as On } from "./F0Text-BDmNaecR.js";
|
|
15
15
|
import { a as kn } from "./dist-DMTFO2gF.js";
|
|
16
16
|
import { Children as An, Fragment as jn, createContext as Mn, createElement as Nn, forwardRef as Pn, isValidElement as Fn, memo as In, useCallback as G, useContext as Ln, useEffect as K, useId as Rn, useImperativeHandle as zn, useInsertionEffect as Bn, useLayoutEffect as Vn, useMemo as q, useRef as J, useState as Y } from "react";
|
|
17
17
|
import { Fragment as Hn, jsx as X, jsxs as Z } from "react/jsx-runtime";
|
|
@@ -36,8 +36,8 @@ var Kn = [
|
|
|
36
36
|
"sm",
|
|
37
37
|
"md",
|
|
38
38
|
"lg"
|
|
39
|
-
], Jn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow transition-colors focus-within:border-f1-border", Yn = [], Xn = () => null, Zn = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: s, maxLengthError: l, error: u = null, labels:
|
|
40
|
-
let F = Kt(
|
|
39
|
+
], Jn = "relative flex flex-col rounded-lg border border-solid border-f1-border-secondary bg-f1-background/95 shadow transition-colors focus-within:border-f1-border", Yn = [], Xn = () => null, Zn = ({ onSend: e, inProgress: t = !1, onStop: n, sendKind: r = "send", hasAttachments: a = !1, sendBlocked: o = !1, maxLength: s, maxLengthError: l, error: u = null, labels: d, placeholders: m, placeholdersPaused: h, placeholderPreview: g, placeholderPreviewOneLine: _ = !1, role: v = "combobox", name: y, mentions: b, autocomplete: x, voice: S, onTextChange: C, onCleared: w, onEscape: T, onArrowUpWhenEmpty: E, onPasteFiles: D, pastePreferText: O = !1, onStateChange: ee, header: te, tray: k, leading: A, toolbarStart: j, toolbarCenter: M, collapsible: re = !1, collapsed: N = !1, replacement: ie, asForm: ae = !1, className: oe, surfaceRef: se, onSurfaceFocus: ce, onSurfaceBlur: le, handleRef: ue, reducedMotion: P = !1, "data-testid": de }) => {
|
|
40
|
+
let F = Kt(d, S), I = ie != null, { error: fe, show: pe, clear: me } = It(), he = J(() => {}), ge = J(() => {}), _e = J(""), ve = G((e) => {
|
|
41
41
|
let t = _e.current, n = t && !/\s$/.test(t) ? " " : "";
|
|
42
42
|
he.current(`${t}${n}${e}`);
|
|
43
43
|
}, []), ye = {
|
|
@@ -196,7 +196,7 @@ var Kn = [
|
|
|
196
196
|
enabled: !!D && !I,
|
|
197
197
|
onFiles: D ?? (() => {}),
|
|
198
198
|
preferText: O
|
|
199
|
-
}), Ct = Rn(), wt = Rn(), Tt = `chat-composer-mentions-${Ct.replace(/:/g, "")}`, Et = B.isOpen && !H && !I && (B.isLoading || B.rows.length > 0), Dt = B.rows[B.selectedIndex] ?? B.rows[0], Ot = Et && Dt ? He(Tt, Dt.item) : void 0, kt = (e) => we ? /* @__PURE__ */ X(
|
|
199
|
+
}), Ct = Rn(), wt = Rn(), Tt = `chat-composer-mentions-${Ct.replace(/:/g, "")}`, Et = B.isOpen && !H && !I && (B.isLoading || B.rows.length > 0), Dt = B.rows[B.selectedIndex] ?? B.rows[0], Ot = Et && Dt ? He(Tt, Dt.item) : void 0, kt = (e) => we ? /* @__PURE__ */ X(f, {
|
|
200
200
|
type: "button",
|
|
201
201
|
variant: "ghost",
|
|
202
202
|
size: e,
|
|
@@ -222,9 +222,9 @@ var Kn = [
|
|
|
222
222
|
}
|
|
223
223
|
}), Mt = { duration: P ? 0 : .15 }, Pt = typeof j == "function" ? j(L.status) : j, Ft = /* @__PURE__ */ X("div", {
|
|
224
224
|
className: "grid",
|
|
225
|
-
children: /* @__PURE__ */ X(
|
|
225
|
+
children: /* @__PURE__ */ X(c, {
|
|
226
226
|
initial: !1,
|
|
227
|
-
children: Se ? /* @__PURE__ */ Z(
|
|
227
|
+
children: Se ? /* @__PURE__ */ Z(p.div, {
|
|
228
228
|
className: "flex items-center gap-3 pb-2 pl-3 pr-2 [grid-area:1/1]",
|
|
229
229
|
initial: { opacity: 0 },
|
|
230
230
|
animate: { opacity: 1 },
|
|
@@ -235,7 +235,7 @@ var Kn = [
|
|
|
235
235
|
className: "min-w-0 flex-1"
|
|
236
236
|
}), /* @__PURE__ */ Z("div", {
|
|
237
237
|
className: "flex shrink-0 items-center gap-2",
|
|
238
|
-
children: [/* @__PURE__ */ X(
|
|
238
|
+
children: [/* @__PURE__ */ X(f, {
|
|
239
239
|
type: "button",
|
|
240
240
|
variant: "outline",
|
|
241
241
|
size: "md",
|
|
@@ -243,7 +243,7 @@ var Kn = [
|
|
|
243
243
|
label: F.cancelRecording,
|
|
244
244
|
icon: Qe,
|
|
245
245
|
onClick: pt
|
|
246
|
-
}), /* @__PURE__ */ X(
|
|
246
|
+
}), /* @__PURE__ */ X(f, {
|
|
247
247
|
type: "button",
|
|
248
248
|
variant: "default",
|
|
249
249
|
size: "md",
|
|
@@ -253,7 +253,7 @@ var Kn = [
|
|
|
253
253
|
onClick: L.stop
|
|
254
254
|
})]
|
|
255
255
|
})]
|
|
256
|
-
}, "recording-row") : /* @__PURE__ */ Z(
|
|
256
|
+
}, "recording-row") : /* @__PURE__ */ Z(p.div, {
|
|
257
257
|
className: "flex items-center gap-2 pb-2 pl-1 pr-2 [grid-area:1/1]",
|
|
258
258
|
initial: { opacity: 0 },
|
|
259
259
|
animate: { opacity: 1 },
|
|
@@ -303,9 +303,9 @@ var Kn = [
|
|
|
303
303
|
role: v,
|
|
304
304
|
name: y,
|
|
305
305
|
ariaLabel: F.placeholder,
|
|
306
|
-
placeholder:
|
|
306
|
+
placeholder: m ? {
|
|
307
307
|
mode: "overlay",
|
|
308
|
-
texts: Se ? [F.listening] :
|
|
308
|
+
texts: Se ? [F.listening] : m,
|
|
309
309
|
fallback: Se ? F.listening : F.placeholder,
|
|
310
310
|
paused: h,
|
|
311
311
|
preview: Se ? void 0 : g,
|
|
@@ -336,9 +336,9 @@ var Kn = [
|
|
|
336
336
|
}) : null
|
|
337
337
|
]
|
|
338
338
|
}),
|
|
339
|
-
re ? /* @__PURE__ */ X(
|
|
339
|
+
re ? /* @__PURE__ */ X(c, {
|
|
340
340
|
initial: !1,
|
|
341
|
-
children: N ? null : /* @__PURE__ */ X(
|
|
341
|
+
children: N ? null : /* @__PURE__ */ X(p.div, {
|
|
342
342
|
className: "overflow-hidden",
|
|
343
343
|
initial: {
|
|
344
344
|
opacity: 0,
|
|
@@ -371,9 +371,9 @@ var Kn = [
|
|
|
371
371
|
onSelect: B.selectRow,
|
|
372
372
|
pinnedDescription: F.mentionPinnedDescription
|
|
373
373
|
}),
|
|
374
|
-
ie === void 0 ? Rt : /* @__PURE__ */ X(
|
|
374
|
+
ie === void 0 ? Rt : /* @__PURE__ */ X(c, {
|
|
375
375
|
initial: !1,
|
|
376
|
-
children: I ? /* @__PURE__ */ X(
|
|
376
|
+
children: I ? /* @__PURE__ */ X(p.div, {
|
|
377
377
|
className: "overflow-hidden",
|
|
378
378
|
initial: {
|
|
379
379
|
height: 0,
|
|
@@ -406,7 +406,7 @@ var Kn = [
|
|
|
406
406
|
]
|
|
407
407
|
},
|
|
408
408
|
children: ie
|
|
409
|
-
}, "replacement") : /* @__PURE__ */ X(
|
|
409
|
+
}, "replacement") : /* @__PURE__ */ X(p.div, {
|
|
410
410
|
className: "overflow-hidden",
|
|
411
411
|
initial: {
|
|
412
412
|
height: 0,
|
|
@@ -468,8 +468,8 @@ var Kn = [
|
|
|
468
468
|
//#endregion
|
|
469
469
|
//#region src/addons/ai/F0AiChat/hooks/useRevealOnChange.ts
|
|
470
470
|
function Qn(e, t, n = .2) {
|
|
471
|
-
let r =
|
|
472
|
-
return
|
|
471
|
+
let r = u(), [i, a] = Y(!0), o = J(e);
|
|
472
|
+
return l(() => {
|
|
473
473
|
if (o.current === e) return;
|
|
474
474
|
let n = o.current;
|
|
475
475
|
if (o.current = e, r) return;
|
|
@@ -564,7 +564,7 @@ var $n = (e) => {
|
|
|
564
564
|
}, nr = ({ actions: e, showAttachEntry: n, onAttachClick: r, attachDisabled: i, attachDisabledTooltip: a, disabled: o, onOpenChange: s }) => {
|
|
565
565
|
let c = t(), [l, u] = Y(!1), d = (e) => {
|
|
566
566
|
u(e), s?.(e);
|
|
567
|
-
},
|
|
567
|
+
}, p = [...n ? [{
|
|
568
568
|
label: c.ai.addFilesOrPhotos,
|
|
569
569
|
icon: We,
|
|
570
570
|
onClick: r,
|
|
@@ -574,13 +574,13 @@ var $n = (e) => {
|
|
|
574
574
|
return /* @__PURE__ */ X("div", {
|
|
575
575
|
onClick: (e) => e.stopPropagation(),
|
|
576
576
|
children: /* @__PURE__ */ X(j, {
|
|
577
|
-
items:
|
|
577
|
+
items: p,
|
|
578
578
|
align: "start",
|
|
579
579
|
disabled: o,
|
|
580
580
|
open: l,
|
|
581
581
|
onOpenChange: d,
|
|
582
582
|
modal: !1,
|
|
583
|
-
children: /* @__PURE__ */ X(
|
|
583
|
+
children: /* @__PURE__ */ X(f, {
|
|
584
584
|
label: c.ai.addToConversation,
|
|
585
585
|
hideLabel: !0,
|
|
586
586
|
type: "button",
|
|
@@ -593,16 +593,16 @@ var $n = (e) => {
|
|
|
593
593
|
})
|
|
594
594
|
});
|
|
595
595
|
}, rr = ({ onUploadFiles: e, composerActions: n, isAtMaxFiles: r, maxFiles: i, acceptValue: a, fileInputRef: o, handleFileSelect: s, recordingStatus: c, onComposerActionsOpenChange: l }) => {
|
|
596
|
-
let u = t(), d = c === "transcribing",
|
|
597
|
-
return !e && !
|
|
598
|
-
actions:
|
|
596
|
+
let u = t(), d = c === "transcribing", p = () => o.current?.click(), m = n?.length ? n : null;
|
|
597
|
+
return !e && !m ? null : /* @__PURE__ */ Z(Hn, { children: [m ? /* @__PURE__ */ X(nr, {
|
|
598
|
+
actions: m,
|
|
599
599
|
showAttachEntry: !!e,
|
|
600
|
-
onAttachClick:
|
|
600
|
+
onAttachClick: p,
|
|
601
601
|
attachDisabled: r,
|
|
602
602
|
attachDisabledTooltip: i === void 0 ? void 0 : u.ai.tooManyFilesError.replace("{{maxFiles}}", String(i)),
|
|
603
603
|
disabled: d,
|
|
604
604
|
onOpenChange: l
|
|
605
|
-
}) : /* @__PURE__ */ X(
|
|
605
|
+
}) : /* @__PURE__ */ X(f, {
|
|
606
606
|
label: u.ai.attachFile,
|
|
607
607
|
hideLabel: !0,
|
|
608
608
|
type: "button",
|
|
@@ -611,7 +611,7 @@ var $n = (e) => {
|
|
|
611
611
|
size: "md",
|
|
612
612
|
disabled: r || d,
|
|
613
613
|
onClick: (e) => {
|
|
614
|
-
e.preventDefault(),
|
|
614
|
+
e.preventDefault(), p();
|
|
615
615
|
}
|
|
616
616
|
}), e ? /* @__PURE__ */ X("input", {
|
|
617
617
|
ref: o,
|
|
@@ -673,7 +673,7 @@ var $n = (e) => {
|
|
|
673
673
|
//#endregion
|
|
674
674
|
//#region src/addons/ai/F0AiChatUsageLimits/components/RingTrigger.tsx
|
|
675
675
|
function lr({ open: e, percentage: t, tone: n, label: r }) {
|
|
676
|
-
return /* @__PURE__ */ X(
|
|
676
|
+
return /* @__PURE__ */ X(_, {
|
|
677
677
|
description: e ? "" : r,
|
|
678
678
|
children: /* @__PURE__ */ X(wn, {
|
|
679
679
|
asChild: !0,
|
|
@@ -839,12 +839,12 @@ var mr = (e, t) => e || t ? {
|
|
|
839
839
|
color: "default"
|
|
840
840
|
})
|
|
841
841
|
}),
|
|
842
|
-
/* @__PURE__ */ X(
|
|
842
|
+
/* @__PURE__ */ X(m, {
|
|
843
843
|
className: "h-full flex-1 py-0.5 text-[12px] font-medium text-f1-foreground-secondary",
|
|
844
844
|
lines: 1,
|
|
845
845
|
children: e.text
|
|
846
846
|
}),
|
|
847
|
-
/* @__PURE__ */ X(
|
|
847
|
+
/* @__PURE__ */ X(f, {
|
|
848
848
|
type: "button",
|
|
849
849
|
variant: "ghost",
|
|
850
850
|
label: r.ai.removeQuote,
|
|
@@ -1002,17 +1002,17 @@ function Sr(e) {
|
|
|
1002
1002
|
//#endregion
|
|
1003
1003
|
//#region src/addons/ai/F0AiChatTextArea/AiChatComposer.tsx
|
|
1004
1004
|
var Cr = "w-full max-w-content px-1";
|
|
1005
|
-
function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: s, clarifyingUI: l, pendingContext:
|
|
1006
|
-
let N = t(), ae = !!
|
|
1005
|
+
function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placeholders: o, creditWarning: s, clarifyingUI: l, pendingContext: d = null, onPendingContextChange: f, pendingQuote: m = null, onPendingQuoteChange: h, fileAttachments: g, toolbarStart: _, composerActions: v, onComposerActionsOpenChange: y, onTranscribe: b, searchPersons: x, mentionSources: S, onProcessFilesRef: C, disclaimer: w, usageLimits: T, footer: E, isWelcomeScreen: D = !1, fullscreen: O = !1, welcomeScreenSuggestions: ee, onSuggestionClick: te, welcomeScreenSuggestionsPlacement: ne = "above", welcomeScreenSuggestionsCollapsedByDefault: k = !1, welcomeScreenCards: A, padding: j = "default", name: M }) {
|
|
1006
|
+
let N = t(), ae = !!u(), oe = J(null), [se, ce] = Y(!1), [le, ue] = Y({
|
|
1007
1007
|
isEmpty: !0,
|
|
1008
1008
|
recorder: "idle"
|
|
1009
1009
|
}), de = J(null), F = J(null);
|
|
1010
1010
|
K(() => () => {
|
|
1011
1011
|
F.current && clearTimeout(F.current);
|
|
1012
1012
|
}, []);
|
|
1013
|
-
let I = l != null, fe = J(
|
|
1013
|
+
let I = l != null, fe = J(d), pe = J(m);
|
|
1014
1014
|
Vn(() => {
|
|
1015
|
-
fe.current =
|
|
1015
|
+
fe.current = d, pe.current = m;
|
|
1016
1016
|
});
|
|
1017
1017
|
let { tracking: me, setFocusChatInputFunction: ge } = P(), { attachedFiles: _e, fileInputRef: ve, onUploadFiles: L, acceptValue: be, isAtMaxFiles: xe, maxFiles: Se, processFiles: Ce, handleFileSelect: we, handleRemoveFile: Te, transientError: Ee, showTransientError: De } = Sr(g), Oe = vr({
|
|
1018
1018
|
searchPersons: x,
|
|
@@ -1035,7 +1035,7 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
|
|
|
1035
1035
|
let ke = G((e) => void Ce(e), [Ce]), R = _e.filter((e) => e.status === "uploaded"), Ae = _e.some((e) => e.status === "uploading"), je = _e.some((e) => e.status === "error"), Me = !le.isEmpty || R.length > 0, z = async ({ text: t, mentions: n }) => {
|
|
1036
1036
|
if (je) return De(N.ai.fileUploadBlockedSubmit), !1;
|
|
1037
1037
|
if (a && await a() === !1) return !1;
|
|
1038
|
-
let r = R, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o =
|
|
1038
|
+
let r = R, i = r.flatMap((e) => e.uploadedFile ? [e.uploadedFile] : []), o = d, s = m;
|
|
1039
1039
|
o && f?.(null), s && h?.(null);
|
|
1040
1040
|
try {
|
|
1041
1041
|
await e({
|
|
@@ -1075,7 +1075,7 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
|
|
|
1075
1075
|
1
|
|
1076
1076
|
]
|
|
1077
1077
|
}, Ue = D && O && !!A && A.length > 0, We = O && D, Ge = We || !Pe?.inBar, Ke = We ? null : mr(w, T), qe = I || !!(Ke?.text || Ke?.trailing), { motionProps: Je } = Qn(D, 160, .5);
|
|
1078
|
-
return /* @__PURE__ */ Z(
|
|
1078
|
+
return /* @__PURE__ */ Z(p.div, {
|
|
1079
1079
|
"data-composer-layout": We ? "welcome" : "docked",
|
|
1080
1080
|
className: i("flex flex-col items-center", j === "default" && "px-4 pb-3 pt-2", We && "min-h-0 flex-1 justify-start"),
|
|
1081
1081
|
...O ? Je : {},
|
|
@@ -1084,9 +1084,9 @@ function wr({ onSubmit: e, onStop: n, inProgress: r, onBeforeSubmit: a, placehol
|
|
|
1084
1084
|
className: i("flex flex-col gap-2", Cr),
|
|
1085
1085
|
children: [
|
|
1086
1086
|
E && !O ? E : null,
|
|
1087
|
-
Ie && !B ? /* @__PURE__ */ X("div", { children: k ? /* @__PURE__ */ X(
|
|
1087
|
+
Ie && !B ? /* @__PURE__ */ X("div", { children: k ? /* @__PURE__ */ X(c, {
|
|
1088
1088
|
initial: !1,
|
|
1089
|
-
children: Le ? /* @__PURE__ */ X(
|
|
1089
|
+
children: Le ? /* @__PURE__ */ X(p.div, {
|
|
1090
1090
|
className: "overflow-hidden",
|
|
1091
1091
|
initial: {
|
|
1092
1092
|
opacity: 0,
|
|
@@ -1331,7 +1331,7 @@ function Hr({ src: e, alt: n, ...r }) {
|
|
|
1331
1331
|
className: "text-f1-foreground-secondary",
|
|
1332
1332
|
children: n
|
|
1333
1333
|
}) : null;
|
|
1334
|
-
let
|
|
1334
|
+
let g = l.status === "ready" ? /* @__PURE__ */ X(pt, {
|
|
1335
1335
|
...r,
|
|
1336
1336
|
src: l.url,
|
|
1337
1337
|
alt: n,
|
|
@@ -1352,10 +1352,10 @@ function Hr({ src: e, alt: n, ...r }) {
|
|
|
1352
1352
|
url: e,
|
|
1353
1353
|
name: n || m
|
|
1354
1354
|
}], 0),
|
|
1355
|
-
children:
|
|
1356
|
-
}) :
|
|
1355
|
+
children: g
|
|
1356
|
+
}) : g, /* @__PURE__ */ X("span", {
|
|
1357
1357
|
className: "absolute right-2 top-2 rounded",
|
|
1358
|
-
children: /* @__PURE__ */ X(
|
|
1358
|
+
children: /* @__PURE__ */ X(h, {
|
|
1359
1359
|
variant: "neutral",
|
|
1360
1360
|
label: o.chat.download,
|
|
1361
1361
|
hideLabel: !0,
|
|
@@ -1369,11 +1369,11 @@ function Hr({ src: e, alt: n, ...r }) {
|
|
|
1369
1369
|
//#region src/addons/ai/markdown/Link.tsx
|
|
1370
1370
|
function Ur({ children: e, className: n, target: r, ...s }) {
|
|
1371
1371
|
let c = t(), l = r === "_blank";
|
|
1372
|
-
return /* @__PURE__ */ Z(
|
|
1372
|
+
return /* @__PURE__ */ Z(o, {
|
|
1373
1373
|
...s,
|
|
1374
1374
|
target: r,
|
|
1375
1375
|
rel: l ? "noopener noreferrer" : s.rel,
|
|
1376
|
-
className: i(
|
|
1376
|
+
className: i(d(), "font-medium text-f1-foreground visited:text-f1-foreground", a(), n),
|
|
1377
1377
|
children: [e, l ? /* @__PURE__ */ Z(Hn, { children: [/* @__PURE__ */ X("span", {
|
|
1378
1378
|
className: "ml-1 inline-block align-[-3px]",
|
|
1379
1379
|
children: /* @__PURE__ */ X(U, {
|
|
@@ -1508,7 +1508,7 @@ var oi = (e, t, n) => e ? {
|
|
|
1508
1508
|
"aria-label": t || n
|
|
1509
1509
|
} : {};
|
|
1510
1510
|
function si({ children: e, title: n, ...r }) {
|
|
1511
|
-
let o = t(), s = J(null), c = $r(s), l = c.left || c.right,
|
|
1511
|
+
let o = t(), s = J(null), c = $r(s), l = c.left || c.right, d = u(), p = oe(), m = (t) => {
|
|
1512
1512
|
let r = n?.replace(/\s+/g, "_").toLowerCase() || "table";
|
|
1513
1513
|
ai(ii(e), t, r);
|
|
1514
1514
|
}, h = /* @__PURE__ */ Z("div", {
|
|
@@ -1517,20 +1517,20 @@ function si({ children: e, title: n, ...r }) {
|
|
|
1517
1517
|
items: [{
|
|
1518
1518
|
label: o.t("ai.dataDownload.download", { format: "Excel" }),
|
|
1519
1519
|
icon: Tt,
|
|
1520
|
-
onClick: () =>
|
|
1520
|
+
onClick: () => m("xlsx")
|
|
1521
1521
|
}, {
|
|
1522
1522
|
label: o.t("ai.dataDownload.download", { format: "CSV" }),
|
|
1523
1523
|
icon: Tt,
|
|
1524
|
-
onClick: () =>
|
|
1524
|
+
onClick: () => m("csv")
|
|
1525
1525
|
}],
|
|
1526
|
-
children: /* @__PURE__ */ X(
|
|
1526
|
+
children: /* @__PURE__ */ X(f, {
|
|
1527
1527
|
variant: "ghost",
|
|
1528
1528
|
size: "sm",
|
|
1529
1529
|
icon: Tt,
|
|
1530
1530
|
label: o.ai.dataDownload.title,
|
|
1531
1531
|
className: "text-f1-foreground-secondary hover:text-f1-foreground"
|
|
1532
1532
|
})
|
|
1533
|
-
}), l && (c.after > 0 || c.left) ? /* @__PURE__ */ X(
|
|
1533
|
+
}), l && (c.after > 0 || c.left) ? /* @__PURE__ */ X(f, {
|
|
1534
1534
|
variant: "ghost",
|
|
1535
1535
|
size: "sm",
|
|
1536
1536
|
icon: c.after > 0 ? b : pn,
|
|
@@ -1540,7 +1540,7 @@ function si({ children: e, title: n, ...r }) {
|
|
|
1540
1540
|
onClick: () => {
|
|
1541
1541
|
s.current?.scrollTo({
|
|
1542
1542
|
left: c.after > 0 ? ei(s.current) : 0,
|
|
1543
|
-
behavior:
|
|
1543
|
+
behavior: d ? "auto" : "smooth"
|
|
1544
1544
|
});
|
|
1545
1545
|
}
|
|
1546
1546
|
}) : null]
|
|
@@ -1553,10 +1553,10 @@ function si({ children: e, title: n, ...r }) {
|
|
|
1553
1553
|
className: i("isolate overflow-x-auto scrollbar-visible", l && a("focus-visible:rounded-xs"), c.after > 0 && "[mask-image:linear-gradient(to_left,transparent,black_24px)] focus-visible:[mask-image:none]"),
|
|
1554
1554
|
children: /* @__PURE__ */ X("table", {
|
|
1555
1555
|
...r,
|
|
1556
|
-
className: i("w-fit border-separate border-spacing-0 tabular-nums [&_tbody_tr:last-child_td]:border-b-0", Dr, c.left && !
|
|
1556
|
+
className: i("w-fit border-separate border-spacing-0 tabular-nums [&_tbody_tr:last-child_td]:border-b-0", Dr, c.left && !p && "[&_tr>:first-child]:shadow-[inset_-1px_0_0_hsl(var(--neutral-20))]", r.className),
|
|
1557
1557
|
children: e
|
|
1558
1558
|
})
|
|
1559
|
-
}),
|
|
1559
|
+
}), p ? null : h]
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
var ci = "border-0 border-b border-solid pr-4 text-left text-sm leading-4.5 @[560px]:pr-6 last:pr-0", li = "first:sticky first:left-0 first:z-10 first:bg-f1-special-page-surface", ui = (e) => ({
|
|
@@ -2367,12 +2367,12 @@ var wa = ({ avatar: e }) => e?.type === "module" ? /* @__PURE__ */ X(Xt, {
|
|
|
2367
2367
|
size: "md"
|
|
2368
2368
|
}) : null, Ta = ({ action: e, isActive: n }) => {
|
|
2369
2369
|
let r = t();
|
|
2370
|
-
return e.type === "open" && e.showButton !== !1 ? /* @__PURE__ */ X(
|
|
2370
|
+
return e.type === "open" && e.showButton !== !1 ? /* @__PURE__ */ X(h, {
|
|
2371
2371
|
variant: "outline",
|
|
2372
2372
|
size: "md",
|
|
2373
2373
|
label: n ? r.actions.close : r.ai.reportCard.openButton,
|
|
2374
2374
|
onClick: n ? e.onClose : e.onOpen
|
|
2375
|
-
}) : e.type === "custom" ? /* @__PURE__ */ X(
|
|
2375
|
+
}) : e.type === "custom" ? /* @__PURE__ */ X(h, {
|
|
2376
2376
|
variant: "outline",
|
|
2377
2377
|
size: "md",
|
|
2378
2378
|
icon: e.icon,
|
|
@@ -2392,10 +2392,10 @@ function Ea({ avatar: e, title: t, description: n, isActive: r = !1, action: a,
|
|
|
2392
2392
|
/* @__PURE__ */ X(wa, { avatar: e }),
|
|
2393
2393
|
/* @__PURE__ */ Z("div", {
|
|
2394
2394
|
className: "flex min-w-0 flex-1 flex-col",
|
|
2395
|
-
children: [/* @__PURE__ */ X(
|
|
2395
|
+
children: [/* @__PURE__ */ X(m, {
|
|
2396
2396
|
className: "text-base font-semibold text-f1-foreground",
|
|
2397
2397
|
children: t
|
|
2398
|
-
}), n ? /* @__PURE__ */ X(
|
|
2398
|
+
}), n ? /* @__PURE__ */ X(m, {
|
|
2399
2399
|
className: "text-base text-f1-foreground-secondary",
|
|
2400
2400
|
children: n
|
|
2401
2401
|
}) : null]
|
|
@@ -2962,7 +2962,7 @@ function mo({ anchor: e, onReply: n }) {
|
|
|
2962
2962
|
visibility: o ? "visible" : "hidden"
|
|
2963
2963
|
},
|
|
2964
2964
|
className: i("z-50 rounded-md bg-f1-background p-1 border border-solid border-f1-border-secondary", "drop-shadow"),
|
|
2965
|
-
children: /* @__PURE__ */ X(
|
|
2965
|
+
children: /* @__PURE__ */ X(f, {
|
|
2966
2966
|
ref: a,
|
|
2967
2967
|
type: "button",
|
|
2968
2968
|
variant: "ghost",
|
|
@@ -3190,7 +3190,7 @@ function xo() {
|
|
|
3190
3190
|
//#endregion
|
|
3191
3191
|
//#region src/addons/ai/F0AiMessagesContainer/components/rail.ts
|
|
3192
3192
|
var So = "-ml-1 flex w-5 shrink-0 flex-col items-center", Co = "w-px shrink-0 bg-f1-border-secondary", wo = ({ icon: e, title: t, children: n, open: r, onOpenChange: a, disabled: o = !1 }) => {
|
|
3193
|
-
let s =
|
|
3193
|
+
let s = u();
|
|
3194
3194
|
return /* @__PURE__ */ Z(Ot, {
|
|
3195
3195
|
className: "mb-1 w-full",
|
|
3196
3196
|
open: r,
|
|
@@ -3215,7 +3215,7 @@ var So = "-ml-1 flex w-5 shrink-0 flex-col items-center", Co = "w-px shrink-0 bg
|
|
|
3215
3215
|
}), /* @__PURE__ */ X(Ze, {
|
|
3216
3216
|
forceMount: !0,
|
|
3217
3217
|
className: "data-[state=open]:mt-1.5",
|
|
3218
|
-
children: /* @__PURE__ */ X(
|
|
3218
|
+
children: /* @__PURE__ */ X(p.div, {
|
|
3219
3219
|
initial: !1,
|
|
3220
3220
|
animate: {
|
|
3221
3221
|
height: r ? "auto" : 0,
|
|
@@ -3595,7 +3595,7 @@ var Qo = () => {
|
|
|
3595
3595
|
return () => t(null);
|
|
3596
3596
|
}, [e, t]);
|
|
3597
3597
|
}, es = ({ onItemClick: e, onItemHover: t }) => {
|
|
3598
|
-
let { preview: n, pick: r } = re({ onItemClick: e }), i =
|
|
3598
|
+
let { preview: n, pick: r } = re({ onItemClick: e }), i = g((e) => t?.(e));
|
|
3599
3599
|
return {
|
|
3600
3600
|
preview: G((e) => {
|
|
3601
3601
|
n(e), i(e);
|
|
@@ -3675,13 +3675,13 @@ function cs({ prompts: { suggestions: e, onItemClick: t, onItemHover: n }, round
|
|
|
3675
3675
|
//#endregion
|
|
3676
3676
|
//#region src/addons/ai/F0AiMessagesContainer/components/WelcomePromptsBlock.tsx
|
|
3677
3677
|
function ls({ prompts: e }) {
|
|
3678
|
-
let t =
|
|
3678
|
+
let t = u(), n = Qo();
|
|
3679
3679
|
return /* @__PURE__ */ Z("div", {
|
|
3680
3680
|
className: "flex min-h-[calc(3*1.75rem+2*0.5rem)] flex-col",
|
|
3681
3681
|
"aria-busy": e.status === "loading" || void 0,
|
|
3682
|
-
children: [/* @__PURE__ */ X(
|
|
3682
|
+
children: [/* @__PURE__ */ X(c, {
|
|
3683
3683
|
initial: !1,
|
|
3684
|
-
children: e.status === "ready" ? /* @__PURE__ */ X(
|
|
3684
|
+
children: e.status === "ready" ? /* @__PURE__ */ X(p.div, {
|
|
3685
3685
|
initial: { opacity: 0 },
|
|
3686
3686
|
animate: { opacity: 1 },
|
|
3687
3687
|
transition: {
|
|
@@ -3732,7 +3732,7 @@ var ds = {
|
|
|
3732
3732
|
onThumbsUp: () => {},
|
|
3733
3733
|
onThumbsDown: () => {}
|
|
3734
3734
|
}, fs = (e) => e?.status === "working" || e?.status === "answering";
|
|
3735
|
-
function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: s, onWelcomeClick: l, welcomePrompts: u, renderToolCall:
|
|
3735
|
+
function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a, initialMessageCaption: o, initialMessageSubtitle: s, onWelcomeClick: l, welcomePrompts: u, renderToolCall: d, onReplyQuote: f, onAssistantMessageRendered: m, autoScrollUserIntoView: h = !0, renderMarkdown: g, feedback: _, freezeLayout: v = !1, noShadows: y = !1, children: b, AssistantMessage: x, UserMessage: S, onRegenerate: C, onCopy: w }) {
|
|
3736
3736
|
let { modal: T, handleSubmit: E, handleClose: D } = Bi(_ ?? ds), O = t(), ee = x ?? vo, te = S ?? Xo, ne = a ?? O.ai.defaultInitialMessage, k = !n && e.length === 0 && ne !== "", A = J(null), j = J(null), M = J(null), re = J(null), { showScrollBtn: N, scrolledFromTop: ie, turnMinHeight: ae, scrollToBottom: oe } = Ca({
|
|
3737
3737
|
viewportRef: A,
|
|
3738
3738
|
contentRef: j,
|
|
@@ -3748,8 +3748,8 @@ function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
|
|
|
3748
3748
|
});
|
|
3749
3749
|
let se = e[e.length - 1], ce = se?.status === "working", le = fa(ce), ue = se?.status === "asking" ? O.ai.askingQuestions : ce ? se.thinking?.titles.at(-1) ?? O.ai.thinkingNow : "", P = na(e.flatMap((e) => e.assistantMessages.flatMap((e) => e.id ? [e.id] : [])), n), de = (t, n) => {
|
|
3750
3750
|
let r = n === e.length - 1, i = fs(t), a = r && ce, o = t.thinking ?? (a ? { titles: [] } : null), s = t.assistantMessages.some(ms), c = {
|
|
3751
|
-
renderToolCall:
|
|
3752
|
-
onReplyQuote:
|
|
3751
|
+
renderToolCall: d,
|
|
3752
|
+
onReplyQuote: f,
|
|
3753
3753
|
onRendered: m,
|
|
3754
3754
|
autoScrollIntoView: h,
|
|
3755
3755
|
renderMarkdown: g
|
|
@@ -3860,7 +3860,7 @@ function ps({ turns: e, isLoadingThread: n = !1, interrupt: r, initialMessage: a
|
|
|
3860
3860
|
]
|
|
3861
3861
|
})
|
|
3862
3862
|
}),
|
|
3863
|
-
/* @__PURE__ */ X(
|
|
3863
|
+
/* @__PURE__ */ X(c, { children: N ? /* @__PURE__ */ X(p.div, {
|
|
3864
3864
|
className: "pointer-events-none absolute inset-x-0 bottom-[calc(var(--f0-ai-composer-overlap,0px)+1rem)] z-20 flex justify-center",
|
|
3865
3865
|
initial: {
|
|
3866
3866
|
opacity: 0,
|
|
@@ -3933,14 +3933,14 @@ var Ss = ({ canProceed: e, submitDisabled: n, label: r, onConfirm: i, onSkip: a,
|
|
|
3933
3933
|
className: "flex items-center justify-end gap-3 p-3",
|
|
3934
3934
|
children: [/* @__PURE__ */ X("div", {
|
|
3935
3935
|
className: "flex items-center",
|
|
3936
|
-
children: o && a ? /* @__PURE__ */ X(
|
|
3936
|
+
children: o && a ? /* @__PURE__ */ X(h, {
|
|
3937
3937
|
variant: "outline",
|
|
3938
3938
|
type: "button",
|
|
3939
3939
|
label: s.ai.clarifyingQuestion.skip,
|
|
3940
3940
|
onClick: a,
|
|
3941
3941
|
disabled: n
|
|
3942
3942
|
}) : null
|
|
3943
|
-
}), /* @__PURE__ */ X(
|
|
3943
|
+
}), /* @__PURE__ */ X(h, {
|
|
3944
3944
|
disabled: !e || n,
|
|
3945
3945
|
variant: "default",
|
|
3946
3946
|
type: "button",
|
|
@@ -4031,8 +4031,8 @@ var Ds = [
|
|
|
4031
4031
|
"ArrowLeft",
|
|
4032
4032
|
"Home",
|
|
4033
4033
|
"End"
|
|
4034
|
-
]), Ms = ({ mode: e, question: t, options: n, selectedOptionIds: r, allowCustomAnswer: i, hasSelection: a, hasCustomText: o, customAnswerText: s, isCustomAnswerActive:
|
|
4035
|
-
let v =
|
|
4034
|
+
]), Ms = ({ mode: e, question: t, options: n, selectedOptionIds: r, allowCustomAnswer: i, hasSelection: a, hasCustomText: o, customAnswerText: s, isCustomAnswerActive: c, canProceed: l, customInputRef: d, onToggleOption: f, onActivateCustom: m, onChangeCustomText: h, onToggleCustomActive: g, onConfirm: _ }) => {
|
|
4035
|
+
let v = u(), y = (() => {
|
|
4036
4036
|
if (e !== "single") return 0;
|
|
4037
4037
|
let t = n.findIndex((e) => r.includes(e.id));
|
|
4038
4038
|
return t >= 0 ? t : 0;
|
|
@@ -4088,7 +4088,7 @@ var Ds = [
|
|
|
4088
4088
|
"aria-label": t,
|
|
4089
4089
|
tabIndex: -1,
|
|
4090
4090
|
onKeyDown: w,
|
|
4091
|
-
children: [n.map((t, n) => /* @__PURE__ */ X(
|
|
4091
|
+
children: [n.map((t, n) => /* @__PURE__ */ X(p.div, {
|
|
4092
4092
|
...E(n),
|
|
4093
4093
|
children: /* @__PURE__ */ X(Es, {
|
|
4094
4094
|
ref: (e) => {
|
|
@@ -4101,15 +4101,15 @@ var Ds = [
|
|
|
4101
4101
|
onToggle: f,
|
|
4102
4102
|
onKeyNavigate: T
|
|
4103
4103
|
})
|
|
4104
|
-
}, t.id)), i ? /* @__PURE__ */ X(
|
|
4104
|
+
}, t.id)), i ? /* @__PURE__ */ X(p.div, {
|
|
4105
4105
|
...E(n.length),
|
|
4106
4106
|
children: /* @__PURE__ */ X(Ts, {
|
|
4107
4107
|
mode: e,
|
|
4108
4108
|
hasSelection: a,
|
|
4109
4109
|
hasCustomText: o,
|
|
4110
4110
|
customAnswerText: s,
|
|
4111
|
-
isCustomAnswerActive:
|
|
4112
|
-
canProceed:
|
|
4111
|
+
isCustomAnswerActive: c,
|
|
4112
|
+
canProceed: l,
|
|
4113
4113
|
inputRef: d,
|
|
4114
4114
|
onActivate: m,
|
|
4115
4115
|
onChangeText: h,
|
|
@@ -4123,7 +4123,7 @@ var Ds = [
|
|
|
4123
4123
|
return /* @__PURE__ */ Z("div", {
|
|
4124
4124
|
className: "flex items-start gap-0.5 pl-4 pr-3",
|
|
4125
4125
|
children: [
|
|
4126
|
-
/* @__PURE__ */ X(
|
|
4126
|
+
/* @__PURE__ */ X(m, {
|
|
4127
4127
|
className: "mt-0.5 min-w-0 flex-1 pr-3 text-base font-medium text-f1-foreground",
|
|
4128
4128
|
lines: 3,
|
|
4129
4129
|
children: e
|
|
@@ -4131,7 +4131,7 @@ var Ds = [
|
|
|
4131
4131
|
n ? /* @__PURE__ */ Z("div", {
|
|
4132
4132
|
className: "flex shrink-0 items-center gap-0.5",
|
|
4133
4133
|
children: [
|
|
4134
|
-
/* @__PURE__ */ X(
|
|
4134
|
+
/* @__PURE__ */ X(h, {
|
|
4135
4135
|
variant: "ghost",
|
|
4136
4136
|
size: "sm",
|
|
4137
4137
|
type: "button",
|
|
@@ -4145,7 +4145,7 @@ var Ds = [
|
|
|
4145
4145
|
className: "translate-y-px text-sm font-semibold text-f1-foreground-tertiary",
|
|
4146
4146
|
children: n
|
|
4147
4147
|
}),
|
|
4148
|
-
/* @__PURE__ */ X(
|
|
4148
|
+
/* @__PURE__ */ X(h, {
|
|
4149
4149
|
variant: "ghost",
|
|
4150
4150
|
size: "sm",
|
|
4151
4151
|
type: "button",
|
|
@@ -4157,7 +4157,7 @@ var Ds = [
|
|
|
4157
4157
|
})
|
|
4158
4158
|
]
|
|
4159
4159
|
}) : null,
|
|
4160
|
-
/* @__PURE__ */ X(
|
|
4160
|
+
/* @__PURE__ */ X(h, {
|
|
4161
4161
|
variant: "ghost",
|
|
4162
4162
|
size: "sm",
|
|
4163
4163
|
type: "button",
|
|
@@ -4172,16 +4172,16 @@ var Ds = [
|
|
|
4172
4172
|
clarifyingQuestion: e,
|
|
4173
4173
|
isSubmitDisabled: t
|
|
4174
4174
|
}), Rs = ({ clarifyingQuestion: e, isSubmitDisabled: n }) => {
|
|
4175
|
-
let r = t(), i =
|
|
4175
|
+
let r = t(), i = u(), { currentStep: a, currentStepIndex: o, totalSteps: s, toggleOption: l, confirm: d, skip: f, cancel: m, back: h, setCustomAnswerText: g, setCustomAnswerActive: _, activateCustomAnswer: v } = e, { question: y, options: b, selectedOptionIds: x, selectionMode: S, optional: C, allowCustomAnswer: w, customAnswerText: T, isCustomAnswerActive: E } = a, D = J(null), O = S ?? "single", ee = s > 1, te = o === 0, ne = o === s - 1, k = ee ? r.t("ai.clarifyingQuestion.stepOf", {
|
|
4176
4176
|
current: String(o + 1),
|
|
4177
4177
|
total: String(s)
|
|
4178
4178
|
}) : void 0, A = x.length > 0, j = (T ?? "").trim().length > 0, M = A || E && j || C === !0, re = n === !0 && ne, N = () => {
|
|
4179
|
-
re ||
|
|
4179
|
+
re || d();
|
|
4180
4180
|
}, ie = () => {
|
|
4181
4181
|
re || f();
|
|
4182
4182
|
}, ae = (e) => {
|
|
4183
4183
|
let t = O === "single" && x.includes(e);
|
|
4184
|
-
l(e), O === "single" && !ne && !t && Promise.resolve().then(
|
|
4184
|
+
l(e), O === "single" && !ne && !t && Promise.resolve().then(d);
|
|
4185
4185
|
}, oe = ne ? r.ai.clarifyingQuestion.submit : r.ai.clarifyingQuestion.next, se = C === !0 && !A && !(E && j), ce = () => {
|
|
4186
4186
|
v(), requestAnimationFrame(() => {
|
|
4187
4187
|
D.current?.focus();
|
|
@@ -4194,10 +4194,10 @@ var Ds = [
|
|
|
4194
4194
|
onKeyDown: le,
|
|
4195
4195
|
children: [/* @__PURE__ */ X("div", {
|
|
4196
4196
|
className: "flex flex-col gap-3 pt-3",
|
|
4197
|
-
children: /* @__PURE__ */ X(
|
|
4197
|
+
children: /* @__PURE__ */ X(c, {
|
|
4198
4198
|
mode: "wait",
|
|
4199
4199
|
initial: !1,
|
|
4200
|
-
children: /* @__PURE__ */ Z(
|
|
4200
|
+
children: /* @__PURE__ */ Z(p.div, {
|
|
4201
4201
|
className: "flex flex-col gap-2",
|
|
4202
4202
|
initial: { opacity: 0 },
|
|
4203
4203
|
animate: {
|
|
@@ -4221,7 +4221,7 @@ var Ds = [
|
|
|
4221
4221
|
isFinalStep: ne,
|
|
4222
4222
|
canProceed: M,
|
|
4223
4223
|
onBack: h,
|
|
4224
|
-
onNext:
|
|
4224
|
+
onNext: d,
|
|
4225
4225
|
onCancel: m
|
|
4226
4226
|
}), /* @__PURE__ */ X(Ms, {
|
|
4227
4227
|
mode: O,
|
|
@@ -5218,11 +5218,11 @@ var Ic = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
|
|
|
5218
5218
|
} },
|
|
5219
5219
|
defaultVariants: { selected: !1 }
|
|
5220
5220
|
}), Rc = Jt({ base: "text-lg font-semibold text-f1-foreground line-clamp-3" }), zc = Jt({ base: "text-sm text-f1-foreground-secondary leading-normal" }), Bc = Jt({ base: "text-sm font-medium text-f1-foreground leading-normal" }), Vc = ({ description: e, isRevealed: n, onAskOne: r }) => {
|
|
5221
|
-
let a = t(), o =
|
|
5221
|
+
let a = t(), o = u();
|
|
5222
5222
|
return /* @__PURE__ */ Z(Hn, { children: [e ? /* @__PURE__ */ X("span", {
|
|
5223
5223
|
className: i(zc(), "truncate"),
|
|
5224
5224
|
children: e
|
|
5225
|
-
}) : null, /* @__PURE__ */ X(
|
|
5225
|
+
}) : null, /* @__PURE__ */ X(c, { children: r && n ? /* @__PURE__ */ X(p.div, {
|
|
5226
5226
|
className: "absolute bottom-4 left-4 z-10",
|
|
5227
5227
|
initial: { opacity: 0 },
|
|
5228
5228
|
animate: { opacity: 1 },
|
|
@@ -5236,7 +5236,7 @@ var Ic = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
|
|
|
5236
5236
|
1
|
|
5237
5237
|
]
|
|
5238
5238
|
},
|
|
5239
|
-
children: /* @__PURE__ */ X(
|
|
5239
|
+
children: /* @__PURE__ */ X(h, {
|
|
5240
5240
|
variant: "outline",
|
|
5241
5241
|
size: "md",
|
|
5242
5242
|
label: a.ai.ask,
|
|
@@ -5305,13 +5305,13 @@ var Ic = ({ text: e, description: t, avatar: n, confirmationText: r, onConfirm:
|
|
|
5305
5305
|
className: i(Rc()),
|
|
5306
5306
|
children: t
|
|
5307
5307
|
}),
|
|
5308
|
-
/* @__PURE__ */ X(
|
|
5308
|
+
/* @__PURE__ */ X(p.div, {
|
|
5309
5309
|
className: "flex flex-1 flex-col justify-end gap-2",
|
|
5310
5310
|
animate: { opacity: +!a },
|
|
5311
5311
|
transition: o,
|
|
5312
5312
|
children: /* @__PURE__ */ X(Gc, { ...e })
|
|
5313
5313
|
}),
|
|
5314
|
-
n && !Hc.has(r) ? /* @__PURE__ */ X(
|
|
5314
|
+
n && !Hc.has(r) ? /* @__PURE__ */ X(p.span, {
|
|
5315
5315
|
className: i(Bc()),
|
|
5316
5316
|
animate: { opacity: +!a },
|
|
5317
5317
|
transition: o,
|
|
@@ -5422,7 +5422,7 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
5422
5422
|
})
|
|
5423
5423
|
});
|
|
5424
5424
|
}, Qc = Pn((e, t) => {
|
|
5425
|
-
let { description: n, heading: r, label: o, selected: s = !1, onClick:
|
|
5425
|
+
let { description: n, heading: r, label: o, selected: s = !1, onClick: c, onAskOne: l, ...d } = e, [f, m] = Y(!1), [h, g] = Y(!1), _ = f || h, v = u(), y = _ && !!l, b = {
|
|
5426
5426
|
duration: v ? 0 : .2,
|
|
5427
5427
|
ease: [
|
|
5428
5428
|
.33,
|
|
@@ -5431,9 +5431,9 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
5431
5431
|
1
|
|
5432
5432
|
]
|
|
5433
5433
|
}, x = () => {
|
|
5434
|
-
|
|
5434
|
+
c?.();
|
|
5435
5435
|
}, S = (e) => {
|
|
5436
|
-
e.currentTarget === e.target && (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
5436
|
+
e.currentTarget === e.target && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), c?.());
|
|
5437
5437
|
}, C = f ? "[animation:rotate-gradient_2s_linear_infinite_running]" : "[animation:rotate-gradient_2s_linear_infinite_paused]";
|
|
5438
5438
|
return /* @__PURE__ */ Z("div", {
|
|
5439
5439
|
className: "relative",
|
|
@@ -5445,11 +5445,11 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
5445
5445
|
className: i("pointer-events-none absolute -inset-px rounded-2xl", "[--gradient-angle:0deg]", "bg-[conic-gradient(from_var(--gradient-angle),hsla(229,57%,76%,0.7),hsla(348,80%,50%,0.7),hsla(348,80%,50%,0.7),hsla(18,80%,50%,0.7),hsla(229,57%,76%,0.7),hsla(229,57%,76%,0.7))]", C, "opacity-80 blur-sm")
|
|
5446
5446
|
})] }) : null, /* @__PURE__ */ Z("div", {
|
|
5447
5447
|
ref: t,
|
|
5448
|
-
role:
|
|
5449
|
-
tabIndex:
|
|
5450
|
-
className: i(Lc({ selected: s }), s && "relative border-transparent",
|
|
5451
|
-
onClick:
|
|
5452
|
-
onKeyDown:
|
|
5448
|
+
role: c ? "button" : void 0,
|
|
5449
|
+
tabIndex: c ? 0 : void 0,
|
|
5450
|
+
className: i(Lc({ selected: s }), s && "relative border-transparent", c && "cursor-pointer select-none", c && a()),
|
|
5451
|
+
onClick: c ? x : void 0,
|
|
5452
|
+
onKeyDown: c ? S : void 0,
|
|
5453
5453
|
onMouseEnter: () => m(!0),
|
|
5454
5454
|
onMouseLeave: () => m(!1),
|
|
5455
5455
|
onFocus: () => g(!0),
|
|
@@ -5457,13 +5457,13 @@ var Yc = ({ cx: e, cy: t, index: n, dataLength: r, color: i }) => n !== r - 1 ||
|
|
|
5457
5457
|
children: [/* @__PURE__ */ X(Vc, {
|
|
5458
5458
|
description: n,
|
|
5459
5459
|
isRevealed: _,
|
|
5460
|
-
onAskOne:
|
|
5460
|
+
onAskOne: l
|
|
5461
5461
|
}), d.content === "sparkline" ? /* @__PURE__ */ Z("div", {
|
|
5462
5462
|
className: "flex flex-1 flex-col gap-2",
|
|
5463
5463
|
children: [/* @__PURE__ */ X("span", {
|
|
5464
5464
|
className: i(Rc()),
|
|
5465
5465
|
children: r
|
|
5466
|
-
}), /* @__PURE__ */ X(
|
|
5466
|
+
}), /* @__PURE__ */ X(p.div, {
|
|
5467
5467
|
className: "-ml-4 flex flex-1 flex-col",
|
|
5468
5468
|
animate: { opacity: +!y },
|
|
5469
5469
|
transition: b,
|
|
@@ -5509,7 +5509,7 @@ var $c = e(Ge(Qc, () => /* @__PURE__ */ Z("div", {
|
|
|
5509
5509
|
"sparkline"
|
|
5510
5510
|
], tl = 180, nl = (e) => Number.isFinite(e) ? Math.max(0, Math.floor(e)) : tl, rl = (e, t) => e.length <= t ? e : `${e.slice(0, t).trimEnd()}...`, il = (e) => e.showActions !== !1, al = (e) => Object.fromEntries(Object.entries(e).filter(([e]) => e.startsWith("data-")));
|
|
5511
5511
|
function ol(e) {
|
|
5512
|
-
let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = tl } = e, [u, d] = Y(!1), f = Rn(), p = J(null), m = nl(l),
|
|
5512
|
+
let { module: t, heading: n, title: r, subtitle: o, description: s, seeMoreLabel: c, maxCollapsedDescriptionLength: l = tl } = e, [u, d] = Y(!1), f = Rn(), p = J(null), m = nl(l), g = s.length > m, _ = u ? s : rl(s, m), v = il(e) ? e : null, y = al(e);
|
|
5513
5513
|
return K(() => {
|
|
5514
5514
|
u && p.current?.focus();
|
|
5515
5515
|
}, [u]), /* @__PURE__ */ Z("section", {
|
|
@@ -5542,7 +5542,7 @@ function ol(e) {
|
|
|
5542
5542
|
ref: p,
|
|
5543
5543
|
tabIndex: u ? -1 : void 0,
|
|
5544
5544
|
className: i("text-base text-f1-foreground whitespace-pre-wrap break-words", u && a(), !u && "inline"),
|
|
5545
|
-
children: [_,
|
|
5545
|
+
children: [_, g && !u ? /* @__PURE__ */ Z(Hn, { children: [" ", /* @__PURE__ */ X("button", {
|
|
5546
5546
|
type: "button",
|
|
5547
5547
|
className: i("inline cursor-pointer rounded-none border-0 bg-transparent p-0 text-base text-f1-foreground underline underline-offset-2 hover:text-f1-foreground-secondary", a()),
|
|
5548
5548
|
"aria-controls": f,
|
|
@@ -5554,7 +5554,7 @@ function ol(e) {
|
|
|
5554
5554
|
}),
|
|
5555
5555
|
v ? /* @__PURE__ */ X("div", {
|
|
5556
5556
|
className: "flex items-center justify-end gap-3 border-0 border-t border-solid border-f1-border-secondary px-4 py-3",
|
|
5557
|
-
children: /* @__PURE__ */ X(
|
|
5557
|
+
children: /* @__PURE__ */ X(h, {
|
|
5558
5558
|
type: "button",
|
|
5559
5559
|
label: v.primaryActionLabel,
|
|
5560
5560
|
icon: v.primaryActionIcon,
|
|
@@ -5568,7 +5568,7 @@ ol.displayName = "F0AiProposalCard";
|
|
|
5568
5568
|
//#endregion
|
|
5569
5569
|
//#region src/blocks/ai/F0AiMessageSources/components/CollapsibleMessage.tsx
|
|
5570
5570
|
var sl = ({ icon: e, title: t, children: n }) => {
|
|
5571
|
-
let [r, i] = Y(!1), a =
|
|
5571
|
+
let [r, i] = Y(!1), a = u();
|
|
5572
5572
|
return /* @__PURE__ */ Z(Ot, {
|
|
5573
5573
|
className: "mb-1 w-full",
|
|
5574
5574
|
open: r,
|
|
@@ -5595,7 +5595,7 @@ var sl = ({ icon: e, title: t, children: n }) => {
|
|
|
5595
5595
|
}), /* @__PURE__ */ X(Ze, {
|
|
5596
5596
|
forceMount: !0,
|
|
5597
5597
|
className: "data-[state=open]:mt-3",
|
|
5598
|
-
children: /* @__PURE__ */ X(
|
|
5598
|
+
children: /* @__PURE__ */ X(p.div, {
|
|
5599
5599
|
initial: !1,
|
|
5600
5600
|
animate: {
|
|
5601
5601
|
height: r ? "auto" : 0,
|
|
@@ -5699,7 +5699,7 @@ function ml({ indicator: e }) {
|
|
|
5699
5699
|
children: [
|
|
5700
5700
|
/* @__PURE__ */ X(wn, {
|
|
5701
5701
|
asChild: !0,
|
|
5702
|
-
children: /* @__PURE__ */ X(
|
|
5702
|
+
children: /* @__PURE__ */ X(f, {
|
|
5703
5703
|
variant: "ghost",
|
|
5704
5704
|
hideLabel: !0,
|
|
5705
5705
|
label: n.ai.conversations,
|
|
@@ -5745,12 +5745,12 @@ var hl = (e) => {
|
|
|
5745
5745
|
md: "pl-3"
|
|
5746
5746
|
};
|
|
5747
5747
|
function _l({ title: e, inset: t }) {
|
|
5748
|
-
let { textRef: n, tooltip: r } = hl(e), a =
|
|
5749
|
-
return /* @__PURE__ */ X(
|
|
5748
|
+
let { textRef: n, tooltip: r } = hl(e), a = u(), [o] = Y(e);
|
|
5749
|
+
return /* @__PURE__ */ X(_, {
|
|
5750
5750
|
description: r,
|
|
5751
5751
|
children: /* @__PURE__ */ X("span", {
|
|
5752
5752
|
className: i("relative flex min-w-0 flex-1 text-base font-medium text-f1-foreground", gl[t]),
|
|
5753
|
-
children: /* @__PURE__ */ X(
|
|
5753
|
+
children: /* @__PURE__ */ X(p.span, {
|
|
5754
5754
|
ref: n,
|
|
5755
5755
|
className: "min-w-0 truncate text-left",
|
|
5756
5756
|
initial: e !== o && { opacity: 0 },
|
|
@@ -5767,16 +5767,16 @@ function _l({ title: e, inset: t }) {
|
|
|
5767
5767
|
//#endregion
|
|
5768
5768
|
//#region src/addons/ai/F0AiChatHeader/components/NewChatButton.tsx
|
|
5769
5769
|
function vl({ label: e, onClick: t }) {
|
|
5770
|
-
let n =
|
|
5771
|
-
return /* @__PURE__ */ X(
|
|
5770
|
+
let n = u();
|
|
5771
|
+
return /* @__PURE__ */ X(c, {
|
|
5772
5772
|
initial: !1,
|
|
5773
|
-
children: t ? /* @__PURE__ */ X(
|
|
5773
|
+
children: t ? /* @__PURE__ */ X(p.span, {
|
|
5774
5774
|
className: "flex",
|
|
5775
5775
|
initial: { opacity: 0 },
|
|
5776
5776
|
animate: { opacity: 1 },
|
|
5777
5777
|
exit: { opacity: 0 },
|
|
5778
5778
|
transition: { duration: n ? 0 : .15 },
|
|
5779
|
-
children: /* @__PURE__ */ X(
|
|
5779
|
+
children: /* @__PURE__ */ X(f, {
|
|
5780
5780
|
variant: "ghost",
|
|
5781
5781
|
hideLabel: !0,
|
|
5782
5782
|
label: e,
|
|
@@ -5805,10 +5805,10 @@ var yl = 500, bl = () => {
|
|
|
5805
5805
|
function xl(e) {
|
|
5806
5806
|
e.detail !== 0 && (e.preventDefault(), e.stopPropagation());
|
|
5807
5807
|
}
|
|
5808
|
-
var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode: r, onClose: a, onNewChat: o, history: s, historyIndicator:
|
|
5809
|
-
let
|
|
5808
|
+
var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode: r, onClose: a, onNewChat: o, history: s, historyIndicator: c, historyOpen: l, onHistoryOpenChange: d }) => {
|
|
5809
|
+
let m = t(), h = u(), g = e?.trim() ?? "", { panelOverlays: _ } = P(), [v, y] = Y(null), b = bl();
|
|
5810
5810
|
return /* @__PURE__ */ Z(Dn, {
|
|
5811
|
-
open:
|
|
5811
|
+
open: l,
|
|
5812
5812
|
onOpenChange: d,
|
|
5813
5813
|
children: [/* @__PURE__ */ X(En, {
|
|
5814
5814
|
asChild: !0,
|
|
@@ -5817,12 +5817,12 @@ var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
|
|
|
5817
5817
|
onClickCapture: b ? xl : void 0,
|
|
5818
5818
|
className: "relative flex w-full items-center justify-between gap-1 overflow-hidden py-3 pl-2.5 pr-3",
|
|
5819
5819
|
children: [
|
|
5820
|
-
s ? /* @__PURE__ */ X(ml, { indicator:
|
|
5820
|
+
s ? /* @__PURE__ */ X(ml, { indicator: c }) : null,
|
|
5821
5821
|
/* @__PURE__ */ X(_l, {
|
|
5822
5822
|
title: g,
|
|
5823
5823
|
inset: s ? "xs" : "md"
|
|
5824
5824
|
}),
|
|
5825
|
-
/* @__PURE__ */ Z(
|
|
5825
|
+
/* @__PURE__ */ Z(p.div, {
|
|
5826
5826
|
className: "flex shrink-0 items-center",
|
|
5827
5827
|
initial: { opacity: 0 },
|
|
5828
5828
|
animate: { opacity: 1 },
|
|
@@ -5832,20 +5832,20 @@ var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
|
|
|
5832
5832
|
},
|
|
5833
5833
|
children: [
|
|
5834
5834
|
/* @__PURE__ */ X(vl, {
|
|
5835
|
-
label:
|
|
5835
|
+
label: m.ai.startNewChat,
|
|
5836
5836
|
onClick: o
|
|
5837
5837
|
}),
|
|
5838
|
-
_ ? null : /* @__PURE__ */ X(
|
|
5838
|
+
_ ? null : /* @__PURE__ */ X(f, {
|
|
5839
5839
|
variant: "ghost",
|
|
5840
5840
|
hideLabel: !0,
|
|
5841
|
-
label: n ?
|
|
5841
|
+
label: n ? m.ai.collapseChat : m.ai.expandChat,
|
|
5842
5842
|
icon: n ? Be : Rt,
|
|
5843
5843
|
onClick: r
|
|
5844
5844
|
}),
|
|
5845
|
-
/* @__PURE__ */ X(
|
|
5845
|
+
/* @__PURE__ */ X(f, {
|
|
5846
5846
|
variant: "ghost",
|
|
5847
5847
|
hideLabel: !0,
|
|
5848
|
-
label:
|
|
5848
|
+
label: m.ai.closeChat,
|
|
5849
5849
|
icon: Qe,
|
|
5850
5850
|
onClick: a
|
|
5851
5851
|
})
|
|
@@ -5860,7 +5860,7 @@ var Sl = ({ currentThreadTitle: e, fullscreen: n = !1, onToggleVisualizationMode
|
|
|
5860
5860
|
sideOffset: 0,
|
|
5861
5861
|
alignOffset: 8,
|
|
5862
5862
|
avoidCollisions: !1,
|
|
5863
|
-
"aria-label":
|
|
5863
|
+
"aria-label": m.ai.conversations,
|
|
5864
5864
|
className: i("flex w-[min(26rem,calc(var(--radix-popper-anchor-width)-1rem))] max-h-[min(32rem,calc(var(--radix-popper-available-height)-1rem))] flex-col overflow-hidden p-0", "rounded-lg border-solid border-f1-border-secondary shadow-xl", "motion-reduce:data-[state=open]:animate-none motion-reduce:data-[state=closed]:animate-none"),
|
|
5865
5865
|
children: s
|
|
5866
5866
|
}) : null]
|
|
@@ -5874,7 +5874,7 @@ function Cl({ items: e }) {
|
|
|
5874
5874
|
className: i("hidden shrink-0 items-center", "group-hover:flex group-focus-within:flex", "has-[[aria-expanded=true]]:flex", "[@media(hover:none)]:flex [@media(pointer:coarse)]:flex"),
|
|
5875
5875
|
children: /* @__PURE__ */ X(j, {
|
|
5876
5876
|
items: e,
|
|
5877
|
-
children: /* @__PURE__ */ X(
|
|
5877
|
+
children: /* @__PURE__ */ X(f, {
|
|
5878
5878
|
icon: xn,
|
|
5879
5879
|
variant: "ghost",
|
|
5880
5880
|
size: "sm",
|
|
@@ -5939,7 +5939,7 @@ function Tl({ items: e, status: n, statusId: r, isPending: a }) {
|
|
|
5939
5939
|
//#endregion
|
|
5940
5940
|
//#region src/addons/ai/F0AiChatHistory/components/ThreadItem.tsx
|
|
5941
5941
|
function El({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSelect: o, onPin: c, onUnpin: l, onDelete: u, threadActions: d, className: f }) {
|
|
5942
|
-
let p = t(),
|
|
5942
|
+
let p = t(), h = Rn(), g = wt() === "two-level", _ = q(() => [
|
|
5943
5943
|
{
|
|
5944
5944
|
label: n ? p.ai.unpinChat : p.ai.pinChat,
|
|
5945
5945
|
icon: n ? Fe : H,
|
|
@@ -5970,7 +5970,7 @@ function El({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
|
|
|
5970
5970
|
type: "button",
|
|
5971
5971
|
variant: "unstyled",
|
|
5972
5972
|
"aria-label": e.title,
|
|
5973
|
-
"aria-describedby": e.status && !a ?
|
|
5973
|
+
"aria-describedby": e.status && !a ? h : void 0,
|
|
5974
5974
|
"aria-current": r ? "true" : void 0,
|
|
5975
5975
|
className: "flex min-w-0 flex-1 cursor-pointer self-stretch text-f1-foreground",
|
|
5976
5976
|
onClick: () => o(e.id, e.title),
|
|
@@ -5981,7 +5981,7 @@ function El({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
|
|
|
5981
5981
|
size: "sm",
|
|
5982
5982
|
className: "mr-1 shrink-0 text-f1-icon",
|
|
5983
5983
|
"aria-hidden": !0
|
|
5984
|
-
}) : null, /* @__PURE__ */ X(
|
|
5984
|
+
}) : null, /* @__PURE__ */ X(m, {
|
|
5985
5985
|
lines: 1,
|
|
5986
5986
|
className: "py-0.5 text-left font-medium",
|
|
5987
5987
|
children: e.title
|
|
@@ -5995,7 +5995,7 @@ function El({ thread: e, isPinned: n, isActive: r = !1, isPending: a = !1, onSel
|
|
|
5995
5995
|
/* @__PURE__ */ X(Tl, {
|
|
5996
5996
|
items: _,
|
|
5997
5997
|
status: e.status,
|
|
5998
|
-
statusId:
|
|
5998
|
+
statusId: h,
|
|
5999
5999
|
isPending: a
|
|
6000
6000
|
})
|
|
6001
6001
|
]
|
|
@@ -6098,7 +6098,7 @@ function Ml({ icon: e, label: t, onClick: n }) {
|
|
|
6098
6098
|
icon: e,
|
|
6099
6099
|
color: "default",
|
|
6100
6100
|
size: "md"
|
|
6101
|
-
}), /* @__PURE__ */ X(
|
|
6101
|
+
}), /* @__PURE__ */ X(m, {
|
|
6102
6102
|
lines: 1,
|
|
6103
6103
|
className: "text-left",
|
|
6104
6104
|
children: t
|
|
@@ -6126,7 +6126,7 @@ function Nl({ value: e, onChange: n }) {
|
|
|
6126
6126
|
"aria-label": r.ai.searchChats,
|
|
6127
6127
|
className: "min-w-0 flex-1 border-none bg-transparent text-base text-f1-foreground caret-f1-foreground outline-none placeholder:text-f1-foreground-secondary [&::-webkit-search-cancel-button]:hidden"
|
|
6128
6128
|
}),
|
|
6129
|
-
e ? /* @__PURE__ */ X(
|
|
6129
|
+
e ? /* @__PURE__ */ X(f, {
|
|
6130
6130
|
variant: "ghost",
|
|
6131
6131
|
size: "sm",
|
|
6132
6132
|
hideLabel: !0,
|
|
@@ -6384,7 +6384,7 @@ function Gl({ enabled: e = !1, fetchThreads: t, deleteThread: n, pinThread: r, u
|
|
|
6384
6384
|
}
|
|
6385
6385
|
//#endregion
|
|
6386
6386
|
//#region src/addons/ai/F0AiChatHeader/types.ts
|
|
6387
|
-
var Kl = ["attention"], ql = ["top", "bottom"], Jl =
|
|
6387
|
+
var Kl = ["attention"], ql = ["top", "bottom"], Jl = p.create(ie), Yl = ({ label: e, reduceMotion: t }) => /* @__PURE__ */ Z("div", {
|
|
6388
6388
|
role: "status",
|
|
6389
6389
|
"aria-live": "polite",
|
|
6390
6390
|
className: "flex flex-row items-center gap-1 rounded-full border border-solid border-f1-border-secondary bg-f1-background px-2 py-1.5 pr-2.5 shadow-md",
|
|
@@ -6438,14 +6438,14 @@ var Kl = ["attention"], ql = ["top", "bottom"], Jl = c.create(ie), Yl = ({ label
|
|
|
6438
6438
|
children: e
|
|
6439
6439
|
})]
|
|
6440
6440
|
}), Xl = In(function({ active: e, label: n, className: r, children: a }) {
|
|
6441
|
-
let { t: o } = t(), s =
|
|
6441
|
+
let { t: o } = t(), s = u(), l = n ?? o("ai.applyingChanges");
|
|
6442
6442
|
return K(() => {
|
|
6443
6443
|
if (!e) return;
|
|
6444
6444
|
let t = document.activeElement;
|
|
6445
6445
|
t && t.getAttribute("name") !== "one-ai-input" && t.blur();
|
|
6446
6446
|
}, [e]), /* @__PURE__ */ Z("div", {
|
|
6447
6447
|
className: i("relative flex flex-1 flex-col", r),
|
|
6448
|
-
children: [/* @__PURE__ */ X(
|
|
6448
|
+
children: [/* @__PURE__ */ X(c, { children: e ? /* @__PURE__ */ X(p.div, {
|
|
6449
6449
|
className: "pointer-events-none sticky top-0 z-50 flex h-0 w-full items-start justify-center overflow-visible",
|
|
6450
6450
|
initial: {
|
|
6451
6451
|
opacity: 0,
|
|
@@ -6466,7 +6466,7 @@ var Kl = ["attention"], ql = ["top", "bottom"], Jl = c.create(ie), Yl = ({ label
|
|
|
6466
6466
|
reduceMotion: s
|
|
6467
6467
|
})
|
|
6468
6468
|
})
|
|
6469
|
-
}) : null }), /* @__PURE__ */ X(
|
|
6469
|
+
}) : null }), /* @__PURE__ */ X(p.div, {
|
|
6470
6470
|
className: i("flex flex-1 flex-col", e && "pointer-events-none"),
|
|
6471
6471
|
initial: { filter: "blur(0px)" },
|
|
6472
6472
|
animate: { filter: e ? "blur(2px)" : "blur(0px)" },
|