@factorialco/f0-react 1.243.0 → 1.244.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/experimental.d.ts +5 -5
- package/dist/experimental.js +93 -90
- package/dist/f0.d.ts +5 -5
- package/dist/f0.js +168 -168
- package/icons/app/Shield.d.ts +4 -0
- package/icons/app/Shield.d.ts.map +1 -0
- package/icons/app/Shield.js +5 -0
- package/icons/app/index.d.ts +1 -0
- package/icons/app/index.d.ts.map +1 -1
- package/icons/app/index.js +1 -0
- package/package.json +2 -2
package/dist/experimental.d.ts
CHANGED
|
@@ -1937,13 +1937,13 @@ declare const defaultTranslations: {
|
|
|
1937
1937
|
readonly feedbackModal: {
|
|
1938
1938
|
readonly positive: {
|
|
1939
1939
|
readonly title: "What did you like about this response?";
|
|
1940
|
-
readonly
|
|
1941
|
-
readonly
|
|
1940
|
+
readonly label: "Your feedback helps us make Factorial AI better";
|
|
1941
|
+
readonly placeholder: "Share what worked well";
|
|
1942
1942
|
};
|
|
1943
1943
|
readonly negative: {
|
|
1944
|
-
readonly title: "What could have been better
|
|
1945
|
-
readonly
|
|
1946
|
-
readonly
|
|
1944
|
+
readonly title: "What could have been better?";
|
|
1945
|
+
readonly label: "Your feedback helps us improve future answers";
|
|
1946
|
+
readonly placeholder: "Share what didn’t work";
|
|
1947
1947
|
};
|
|
1948
1948
|
};
|
|
1949
1949
|
};
|
package/dist/experimental.js
CHANGED
|
@@ -2,7 +2,7 @@ import { bz as o5, bA as a5, bB as Hg, bC as ll, bD as w_, bE as __, bF as C_, b
|
|
|
2
2
|
import { aA as Ure, e8 as Gre, e9 as Kre, e7 as Jre, aV as Yre, a_ as Zre, e6 as Qre } from "./hooks-DfWgtHhy.js";
|
|
3
3
|
import { jsxs as b, jsx as f, Fragment as Le } from "react/jsx-runtime";
|
|
4
4
|
import * as Z from "react";
|
|
5
|
-
import ee, { forwardRef as q, createContext as zn, useRef as ue, useState as j, useCallback as
|
|
5
|
+
import ee, { forwardRef as q, createContext as zn, useRef as ue, useState as j, useCallback as Ie, useContext as Nn, useMemo as de, useEffect as ce, PureComponent as MS, useId as sr, useTransition as TS, useLayoutEffect as Sf, memo as pl, Fragment as Or, isValidElement as Y5, cloneElement as pm, useDebugValue as Z5, createRef as AS, createElement as OS, version as Zg, useImperativeHandle as Nf, Children as Q5 } from "react";
|
|
6
6
|
import { useCopilotChatInternal as Lf, useCopilotContext as IS, useCopilotAction as DS, CopilotKit as RS } from "@copilotkit/react-core";
|
|
7
7
|
import { Markdown as FS, useChatContext as PS, CopilotSidebar as BS } from "@copilotkit/react-ui";
|
|
8
8
|
import Ef from "react-dom";
|
|
@@ -1279,10 +1279,10 @@ function FL() {
|
|
|
1279
1279
|
}), []), t;
|
|
1280
1280
|
}
|
|
1281
1281
|
function PL() {
|
|
1282
|
-
const t = FL(), [e, n] = j(0), i =
|
|
1282
|
+
const t = FL(), [e, n] = j(0), i = Ie(() => {
|
|
1283
1283
|
t.current && n(e + 1);
|
|
1284
1284
|
}, [e]);
|
|
1285
|
-
return [
|
|
1285
|
+
return [Ie(() => a5.postRender(i), [i]), e];
|
|
1286
1286
|
}
|
|
1287
1287
|
const BL = (t) => !t.isLayoutDirty && t.willUpdate(!1);
|
|
1288
1288
|
function i2() {
|
|
@@ -2665,9 +2665,9 @@ const h2 = [{
|
|
|
2665
2665
|
var x, w;
|
|
2666
2666
|
const s = (i == null ? void 0 : i.content) || "", o = (i == null ? void 0 : i.role) === "assistant" && ((x = i.toolCalls) == null ? void 0 : x.find((k) => k.function.name === "orchestratorThinking")), a = (w = i == null ? void 0 : i.generativeUI) == null ? void 0 : w.call(i, o ? {
|
|
2667
2667
|
status: e ? "executing" : "completed"
|
|
2668
|
-
} : void 0), l = !s && !a, c = We(), { open: d } = E6(), [u, h] = j(null), [p, m] = j(!1), g = ue(), y =
|
|
2668
|
+
} : void 0), l = !s && !a, c = We(), { open: d } = E6(), [u, h] = j(null), [p, m] = j(!1), g = ue(), y = Ie(() => {
|
|
2669
2669
|
g.current && clearTimeout(g.current), !e && !t && !a && m(!0);
|
|
2670
|
-
}, [t, e, a]), v =
|
|
2670
|
+
}, [t, e, a]), v = Ie(() => {
|
|
2671
2671
|
g.current = setTimeout(() => {
|
|
2672
2672
|
m(!1);
|
|
2673
2673
|
}, 150);
|
|
@@ -4049,11 +4049,11 @@ function RM({ children: t }) {
|
|
|
4049
4049
|
}), [l, c] = j(() => {
|
|
4050
4050
|
const v = localStorage.getItem(v2);
|
|
4051
4051
|
return v !== null ? !!v : !0;
|
|
4052
|
-
}), [d, u] = j(!1), [h, p] = j(null), m =
|
|
4052
|
+
}), [d, u] = j(!1), [h, p] = j(null), m = Ie(({ isInvokedByUser: v } = {
|
|
4053
4053
|
isInvokedByUser: !0
|
|
4054
4054
|
}) => {
|
|
4055
4055
|
s(v ?? !0), a && u(!d), c(!l);
|
|
4056
|
-
}, [a, d, l, c, u]), g =
|
|
4056
|
+
}, [a, d, l, c, u]), g = Ie((v) => {
|
|
4057
4057
|
a || (v.clientX < 32 && u(!0), v.clientX > 280 && u(!1));
|
|
4058
4058
|
}, [a, u]), y = de(() => a ? d ? "unlocked" : "hidden" : !l && !d ? "hidden" : !l && d ? "unlocked" : "locked", [a, d, l]);
|
|
4059
4059
|
return ce(() => {
|
|
@@ -4705,7 +4705,7 @@ const ob = ({ className: t, disabled: e }) => {
|
|
|
4705
4705
|
ce(() => {
|
|
4706
4706
|
m(null), h("idle");
|
|
4707
4707
|
}, [t]);
|
|
4708
|
-
const w =
|
|
4708
|
+
const w = Ie(async () => {
|
|
4709
4709
|
try {
|
|
4710
4710
|
h("fetching");
|
|
4711
4711
|
const k = await n();
|
|
@@ -5346,12 +5346,19 @@ ns.Header = iT;
|
|
|
5346
5346
|
ns.Content = NM;
|
|
5347
5347
|
ns.Footer = EM;
|
|
5348
5348
|
const rT = ({ onClose: t, onSubmit: e, reactionType: n, message: i }) => {
|
|
5349
|
-
const [r, s] = j(""), o = We(), { title: a,
|
|
5349
|
+
const [r, s] = j(""), o = We(), { title: a, label: l, placeholder: c } = n === "like" ? o.ai.feedbackModal.positive : o.ai.feedbackModal.negative, d = Ie(() => {
|
|
5350
5350
|
e(i, r);
|
|
5351
|
-
}, u = () => {
|
|
5351
|
+
}, [r, i, e]), u = () => {
|
|
5352
5352
|
t(i);
|
|
5353
5353
|
};
|
|
5354
|
-
return
|
|
5354
|
+
return ce(() => {
|
|
5355
|
+
const h = (p) => {
|
|
5356
|
+
p.key === "Enter" && (p.preventDefault(), d());
|
|
5357
|
+
};
|
|
5358
|
+
return document.addEventListener("keydown", h), () => {
|
|
5359
|
+
document.removeEventListener("keydown", h);
|
|
5360
|
+
};
|
|
5361
|
+
}, [d]), b(ns, {
|
|
5355
5362
|
position: "center",
|
|
5356
5363
|
isOpen: !0,
|
|
5357
5364
|
onClose: u,
|
|
@@ -5359,21 +5366,17 @@ const rT = ({ onClose: t, onSubmit: e, reactionType: n, message: i }) => {
|
|
|
5359
5366
|
children: [f(ns.Header, {
|
|
5360
5367
|
title: a
|
|
5361
5368
|
}), f(ns.Content, {
|
|
5362
|
-
children:
|
|
5369
|
+
children: f("div", {
|
|
5363
5370
|
className: "flex flex-col gap-6 p-4",
|
|
5364
|
-
children:
|
|
5365
|
-
className: "text-balance text-base text-f1-foreground-secondary",
|
|
5366
|
-
children: l
|
|
5367
|
-
}), f(GE, {
|
|
5371
|
+
children: f(GE, {
|
|
5368
5372
|
autoFocus: !0,
|
|
5369
|
-
label:
|
|
5370
|
-
hideLabel: !0,
|
|
5373
|
+
label: l,
|
|
5371
5374
|
placeholder: c,
|
|
5372
5375
|
value: r,
|
|
5373
5376
|
onChange: (h) => s(h.trim()),
|
|
5374
5377
|
size: "md",
|
|
5375
5378
|
type: "text"
|
|
5376
|
-
})
|
|
5379
|
+
})
|
|
5377
5380
|
})
|
|
5378
5381
|
}), f(ns.Footer, {
|
|
5379
5382
|
children: b("div", {
|
|
@@ -5829,7 +5832,7 @@ function yT() {
|
|
|
5829
5832
|
}
|
|
5830
5833
|
const { scrollTop: d, scrollHeight: u, clientHeight: h } = e.current, p = d < u - 3 * h;
|
|
5831
5834
|
s(p);
|
|
5832
|
-
}, c =
|
|
5835
|
+
}, c = Ie(() => {
|
|
5833
5836
|
if (n.current) {
|
|
5834
5837
|
n.current = !1;
|
|
5835
5838
|
return;
|
|
@@ -12686,11 +12689,11 @@ function mF(t) {
|
|
|
12686
12689
|
if (pn) {
|
|
12687
12690
|
let qe = Fe;
|
|
12688
12691
|
for (Rt = void 0; qe--; ) {
|
|
12689
|
-
const
|
|
12690
|
-
if (
|
|
12691
|
-
if (
|
|
12692
|
-
Rt && (H[Rt][1].type = "lineEndingBlank", At = !0),
|
|
12693
|
-
} else if (!(
|
|
12692
|
+
const De = H[qe];
|
|
12693
|
+
if (De[1].type === "lineEnding" || De[1].type === "lineEndingBlank") {
|
|
12694
|
+
if (De[0] === "exit") continue;
|
|
12695
|
+
Rt && (H[Rt][1].type = "lineEndingBlank", At = !0), De[1].type = "lineEnding", Rt = qe;
|
|
12696
|
+
} else if (!(De[1].type === "linePrefix" || De[1].type === "blockQuotePrefix" || De[1].type === "blockQuotePrefixWhitespace" || De[1].type === "blockQuoteMarker" || De[1].type === "listItemIndent")) break;
|
|
12694
12697
|
}
|
|
12695
12698
|
W && (!Rt || W < Rt) && (pn._spread = !0), pn.end = Object.assign({}, Rt ? H[Rt][1].start : be[1].end), H.splice(Rt || Fe, 0, ["exit", pn, be[2]]), Fe++, Ce++;
|
|
12696
12699
|
}
|
|
@@ -15798,7 +15801,7 @@ const ks = ({ items: t, onClick: e, value: n, ...i }) => {
|
|
|
15798
15801
|
const L = ee.useRef(null), I = de(() => t ? e.reduce((z, G) => {
|
|
15799
15802
|
var pe;
|
|
15800
15803
|
return z + (((pe = G.subItems) == null ? void 0 : pe.length) ?? 0);
|
|
15801
|
-
}, 0) : e.length, [e, t]), D =
|
|
15804
|
+
}, 0) : e.length, [e, t]), D = Ie(() => {
|
|
15802
15805
|
setTimeout(() => {
|
|
15803
15806
|
var z;
|
|
15804
15807
|
(z = L.current) == null || z.scrollTo({
|
|
@@ -15808,7 +15811,7 @@ const ks = ({ items: t, onClick: e, value: n, ...i }) => {
|
|
|
15808
15811
|
var G;
|
|
15809
15812
|
(G = Array.from(document.querySelectorAll(gy))[0]) == null || G.focus();
|
|
15810
15813
|
}, my);
|
|
15811
|
-
}, []), P =
|
|
15814
|
+
}, []), P = Ie(() => {
|
|
15812
15815
|
setTimeout(() => {
|
|
15813
15816
|
var z, G;
|
|
15814
15817
|
(G = L.current) == null || G.scrollTo({
|
|
@@ -15819,7 +15822,7 @@ const ks = ({ items: t, onClick: e, value: n, ...i }) => {
|
|
|
15819
15822
|
const z = Array.from(document.querySelectorAll(gy));
|
|
15820
15823
|
(G = z[z.length - 1]) == null || G.focus();
|
|
15821
15824
|
}, my);
|
|
15822
|
-
}, []), $ = de(() => new Map(h.map((z) => [z.id, z])), [h]), U =
|
|
15825
|
+
}, []), $ = de(() => new Map(h.map((z) => [z.id, z])), [h]), U = Ie((z) => {
|
|
15823
15826
|
var Xe;
|
|
15824
15827
|
const G = $.get(z.id);
|
|
15825
15828
|
if (!t)
|
|
@@ -15835,7 +15838,7 @@ const ks = ({ items: t, onClick: e, value: n, ...i }) => {
|
|
|
15835
15838
|
selected: ne,
|
|
15836
15839
|
partialSelected: Be
|
|
15837
15840
|
};
|
|
15838
|
-
}, [t, $]), re =
|
|
15841
|
+
}, [t, $]), re = Ie((z) => {
|
|
15839
15842
|
if (z.index === 0 && _)
|
|
15840
15843
|
return f(hy, {
|
|
15841
15844
|
label: A ?? "",
|
|
@@ -15888,7 +15891,7 @@ const ks = ({ items: t, onClick: e, value: n, ...i }) => {
|
|
|
15888
15891
|
subAvatar: z.avatar,
|
|
15889
15892
|
subSearchKeys: z.searchKeys
|
|
15890
15893
|
}
|
|
15891
|
-
})), [t, e, h]), T =
|
|
15894
|
+
})), [t, e, h]), T = Ie((z) => {
|
|
15892
15895
|
var Xe, Pe;
|
|
15893
15896
|
if (z.index === 0 && _)
|
|
15894
15897
|
return f(hy, {
|
|
@@ -21361,7 +21364,7 @@ function Iz({ firstName: t, lastName: e, src: n, canReact: i, lastEmojiReaction:
|
|
|
21361
21364
|
});
|
|
21362
21365
|
}
|
|
21363
21366
|
function Dz(t) {
|
|
21364
|
-
const e = ue(null), n = ue(), i =
|
|
21367
|
+
const e = ue(null), n = ue(), i = Ie(() => {
|
|
21365
21368
|
const s = e.current;
|
|
21366
21369
|
if (!s) return;
|
|
21367
21370
|
const o = EC.create(s, {
|
|
@@ -21387,7 +21390,7 @@ function Dz(t) {
|
|
|
21387
21390
|
]
|
|
21388
21391
|
});
|
|
21389
21392
|
}, 100);
|
|
21390
|
-
}, [t]), r =
|
|
21393
|
+
}, [t]), r = Ie(() => {
|
|
21391
21394
|
clearInterval(n.current);
|
|
21392
21395
|
}, []);
|
|
21393
21396
|
return { canvasRef: e, handleMouseEnter: i, handleMouseLeave: r };
|
|
@@ -23457,19 +23460,19 @@ function b$({ title: t, items: e, className: n, activeItem: i, collapsible: r =
|
|
|
23457
23460
|
ce(() => {
|
|
23458
23461
|
x(e);
|
|
23459
23462
|
}, [e]);
|
|
23460
|
-
const w = ue(null), k =
|
|
23463
|
+
const w = ue(null), k = Ie((E) => E.map((C) => ({
|
|
23461
23464
|
id: C.id,
|
|
23462
23465
|
...C.children && {
|
|
23463
23466
|
children: k(C.children)
|
|
23464
23467
|
}
|
|
23465
|
-
})), []), S =
|
|
23468
|
+
})), []), S = Ie((E) => {
|
|
23466
23469
|
y((C) => {
|
|
23467
23470
|
const F = new Set(C);
|
|
23468
23471
|
return F.has(E) ? F.delete(E) : F.add(E), F;
|
|
23469
23472
|
});
|
|
23470
|
-
}, [y]), _ =
|
|
23473
|
+
}, [y]), _ = Ie((E) => {
|
|
23471
23474
|
x(E), l && l(k(E));
|
|
23472
|
-
}, [l, k]), A =
|
|
23475
|
+
}, [l, k]), A = Ie((E, C) => {
|
|
23473
23476
|
const F = (I) => I.map((D) => D.id === E ? C : D.children ? {
|
|
23474
23477
|
...D,
|
|
23475
23478
|
children: F(D.children)
|
|
@@ -24061,9 +24064,9 @@ const E$ = ({ item: t, active: e }) => b("div", {
|
|
|
24061
24064
|
}) : p;
|
|
24062
24065
|
};
|
|
24063
24066
|
function are({ tree: t, onCollapse: e, onSort: n, onFavoritesChange: i, favorites: r }) {
|
|
24064
|
-
const s = ue(null), o = t.filter((m) => m.isSortable === !1), [a, l] = j(t.filter((m) => m.isSortable !== !1)), [c, d] = j(0), u =
|
|
24067
|
+
const s = ue(null), o = t.filter((m) => m.isSortable === !1), [a, l] = j(t.filter((m) => m.isSortable !== !1)), [c, d] = j(0), u = Ie((m) => {
|
|
24065
24068
|
l(m);
|
|
24066
|
-
}, []), h =
|
|
24069
|
+
}, []), h = Ie((m) => {
|
|
24067
24070
|
n == null || n(m);
|
|
24068
24071
|
}, [n]), p = N$();
|
|
24069
24072
|
return f(L$, {
|
|
@@ -24091,10 +24094,10 @@ function A$({ nonSortableItems: t, sortableItems: e, setSortableItems: n, contai
|
|
|
24091
24094
|
}, [o]);
|
|
24092
24095
|
const w = (D) => {
|
|
24093
24096
|
v(D);
|
|
24094
|
-
}, k =
|
|
24097
|
+
}, k = Ie((D) => {
|
|
24095
24098
|
const P = y.filter(($) => $.href !== D.href);
|
|
24096
24099
|
v(P), a == null || a(P);
|
|
24097
|
-
}, [y, a]), S =
|
|
24100
|
+
}, [y, a]), S = Ie((D, P) => {
|
|
24098
24101
|
if (P < 0 || P >= y.length) return;
|
|
24099
24102
|
const $ = [...y], [U] = $.splice(D, 1);
|
|
24100
24103
|
$.splice(P, 0, U), v($), a == null || a($);
|
|
@@ -24953,7 +24956,7 @@ const tk = ({ className: t, ...e }) => f("span", {
|
|
|
24953
24956
|
});
|
|
24954
24957
|
tk.displayName = "PaginationEllipsis";
|
|
24955
24958
|
function K$({ totalPages: t, currentPage: e = 1, onPageChange: n, showControls: i = !0, ariaLabel: r = "Page navigation", visibleRange: s = 3, hasNextPage: o = !0, disabled: a = !1 }) {
|
|
24956
|
-
const l = t === 0, c =
|
|
24959
|
+
const l = t === 0, c = Ie((u) => {
|
|
24957
24960
|
n && (l || u >= 1 && u <= t) && n(u);
|
|
24958
24961
|
}, [n, t, l]), d = de(() => {
|
|
24959
24962
|
if (l) return [];
|
|
@@ -25233,7 +25236,7 @@ function X$(t, e = {}) {
|
|
|
25233
25236
|
const { lanes: n } = t;
|
|
25234
25237
|
if (!de(() => n && n.length > 0, [n]))
|
|
25235
25238
|
throw new Error("Lanes has not been configured on data source");
|
|
25236
|
-
const [r, s] = j({}), o =
|
|
25239
|
+
const [r, s] = j({}), o = Ie((y, v) => {
|
|
25237
25240
|
s((x) => ({
|
|
25238
25241
|
...x,
|
|
25239
25242
|
[y]: v
|
|
@@ -25286,7 +25289,7 @@ const ej = (t) => {
|
|
|
25286
25289
|
const [i, r] = j(/* @__PURE__ */ new Map()), [s, o] = j({
|
|
25287
25290
|
selectItemsStatus: /* @__PURE__ */ new Map(),
|
|
25288
25291
|
clearCallback: /* @__PURE__ */ new Map()
|
|
25289
|
-
}), a =
|
|
25292
|
+
}), a = Ie(() => {
|
|
25290
25293
|
s.clearCallback.forEach((c) => c());
|
|
25291
25294
|
}, [s.clearCallback]);
|
|
25292
25295
|
ce(() => {
|
|
@@ -27200,7 +27203,7 @@ function Wj({ children: t }) {
|
|
|
27200
27203
|
const wk = (t, e, n) => {
|
|
27201
27204
|
const i = n ? 52 : 0;
|
|
27202
27205
|
return {
|
|
27203
|
-
getStickyPosition:
|
|
27206
|
+
getStickyPosition: Ie(
|
|
27204
27207
|
(s) => s < t && e.length > 1 ? {
|
|
27205
27208
|
left: e.slice(0, Math.max(0, s)).reduce(
|
|
27206
27209
|
(o, a) => o + (a.width ?? 0),
|
|
@@ -28089,7 +28092,7 @@ const nH = (t) => "date" in t, iH = {
|
|
|
28089
28092
|
const Rt = de(() => {
|
|
28090
28093
|
const Ue = C ? Object.keys(C.groupBy).length + (C.mandatory ? 1 : 0) : 0;
|
|
28091
28094
|
return e && e.length > 1 || Ue > 0 && !(C != null && C.hideSelector) || I && Object.keys(I).length > 0;
|
|
28092
|
-
}, [e, C, I]), W = de(() => V || O || Rt || v && v.enabled, [V, O, Rt, v]), ge = de(() => K ? c ? "top" : "bottom" : !1, [c, K]), be = de(() => g ? W ? "top" : "bottom" : !1, [g, W]), qe = de(() => ge === "top" || be === "top", [ge, be]),
|
|
28095
|
+
}, [e, C, I]), W = de(() => V || O || Rt || v && v.enabled, [V, O, Rt, v]), ge = de(() => K ? c ? "top" : "bottom" : !1, [c, K]), be = de(() => g ? W ? "top" : "bottom" : !1, [g, W]), qe = de(() => ge === "top" || be === "top", [ge, be]), De = de(() => c || W || be === "bottom" || ge === "bottom", [c, W, be, ge]);
|
|
28093
28096
|
return b("div", {
|
|
28094
28097
|
className: M("flex flex-col gap-4", ke === "standard" && "-mx-6", o && "h-full flex-1"),
|
|
28095
28098
|
style: {
|
|
@@ -28108,7 +28111,7 @@ const nH = (t) => "date" in t, iH = {
|
|
|
28108
28111
|
onChangeNavigationFilters: y
|
|
28109
28112
|
})
|
|
28110
28113
|
})]
|
|
28111
|
-
}),
|
|
28114
|
+
}), De && b("div", {
|
|
28112
28115
|
className: M("flex flex-row gap-4 px-4", o && "max-h-full"),
|
|
28113
28116
|
children: [ge === "bottom" && f(w3, {
|
|
28114
28117
|
isReady: !pn,
|
|
@@ -28219,7 +28222,7 @@ const nH = (t) => "date" in t, iH = {
|
|
|
28219
28222
|
setCurrentNavigationFilters: a
|
|
28220
28223
|
};
|
|
28221
28224
|
}, Nk = q(({ header: t, actions: e, open: n, onClose: i }, r) => {
|
|
28222
|
-
const [s, o] = j(!1), a =
|
|
28225
|
+
const [s, o] = j(!1), a = Ie(() => {
|
|
28223
28226
|
o(!0);
|
|
28224
28227
|
const l = setTimeout(() => {
|
|
28225
28228
|
i == null || i(), o(!1);
|
|
@@ -41949,8 +41952,8 @@ function PK(t, e) {
|
|
|
41949
41952
|
W === void 0 && (W = !1), _.style.pointerEvents = k.props.interactive && !W ? "" : "none", _.style.zIndex = "" + k.props.zIndex;
|
|
41950
41953
|
}
|
|
41951
41954
|
function re(W, ge, be) {
|
|
41952
|
-
if (be === void 0 && (be = !0), N.forEach(function(
|
|
41953
|
-
|
|
41955
|
+
if (be === void 0 && (be = !0), N.forEach(function(De) {
|
|
41956
|
+
De[W] && De[W].apply(De, ge);
|
|
41954
41957
|
}), be) {
|
|
41955
41958
|
var qe;
|
|
41956
41959
|
(qe = k.props)[W].apply(qe, ge);
|
|
@@ -41960,13 +41963,13 @@ function PK(t, e) {
|
|
|
41960
41963
|
var W = k.props.aria;
|
|
41961
41964
|
if (W.content) {
|
|
41962
41965
|
var ge = "aria-" + W.content, be = _.id, qe = Us(k.props.triggerTarget || t);
|
|
41963
|
-
qe.forEach(function(
|
|
41964
|
-
var Ue =
|
|
41966
|
+
qe.forEach(function(De) {
|
|
41967
|
+
var Ue = De.getAttribute(ge);
|
|
41965
41968
|
if (k.state.isVisible)
|
|
41966
|
-
|
|
41969
|
+
De.setAttribute(ge, Ue ? Ue + " " + be : be);
|
|
41967
41970
|
else {
|
|
41968
41971
|
var wt = Ue && Ue.replace(be, "").trim();
|
|
41969
|
-
wt ?
|
|
41972
|
+
wt ? De.setAttribute(ge, wt) : De.removeAttribute(ge);
|
|
41970
41973
|
}
|
|
41971
41974
|
});
|
|
41972
41975
|
}
|
|
@@ -42025,8 +42028,8 @@ function PK(t, e) {
|
|
|
42025
42028
|
}
|
|
42026
42029
|
function pe(W, ge) {
|
|
42027
42030
|
var be = P().box;
|
|
42028
|
-
function qe(
|
|
42029
|
-
|
|
42031
|
+
function qe(De) {
|
|
42032
|
+
De.target === be && (O1(be, "remove", qe), ge());
|
|
42030
42033
|
}
|
|
42031
42034
|
if (W === 0)
|
|
42032
42035
|
return ge();
|
|
@@ -42035,9 +42038,9 @@ function PK(t, e) {
|
|
|
42035
42038
|
function ne(W, ge, be) {
|
|
42036
42039
|
be === void 0 && (be = !1);
|
|
42037
42040
|
var qe = Us(k.props.triggerTarget || t);
|
|
42038
|
-
qe.forEach(function(
|
|
42039
|
-
|
|
42040
|
-
node:
|
|
42041
|
+
qe.forEach(function(De) {
|
|
42042
|
+
De.addEventListener(W, ge, be), p.push({
|
|
42043
|
+
node: De,
|
|
42041
42044
|
eventType: W,
|
|
42042
42045
|
handler: ge,
|
|
42043
42046
|
options: be
|
|
@@ -42066,26 +42069,26 @@ function PK(t, e) {
|
|
|
42066
42069
|
}
|
|
42067
42070
|
function Xe() {
|
|
42068
42071
|
p.forEach(function(W) {
|
|
42069
|
-
var ge = W.node, be = W.eventType, qe = W.handler,
|
|
42070
|
-
ge.removeEventListener(be, qe,
|
|
42072
|
+
var ge = W.node, be = W.eventType, qe = W.handler, De = W.options;
|
|
42073
|
+
ge.removeEventListener(be, qe, De);
|
|
42071
42074
|
}), p = [];
|
|
42072
42075
|
}
|
|
42073
42076
|
function Pe(W) {
|
|
42074
42077
|
var ge, be = !1;
|
|
42075
42078
|
if (!(!k.state.isEnabled || mt(W) || a)) {
|
|
42076
42079
|
var qe = ((ge = d) == null ? void 0 : ge.type) === "focus";
|
|
42077
|
-
d = W, g = W.currentTarget, T(), !k.state.isVisible && vK(W) && ic.forEach(function(
|
|
42078
|
-
return
|
|
42080
|
+
d = W, g = W.currentTarget, T(), !k.state.isVisible && vK(W) && ic.forEach(function(De) {
|
|
42081
|
+
return De(W);
|
|
42079
42082
|
}), W.type === "click" && (k.props.trigger.indexOf("mouseenter") < 0 || o) && k.props.hideOnClick !== !1 && k.state.isVisible ? be = !0 : ae(W), W.type === "click" && (o = !be), be && !qe && X(W);
|
|
42080
42083
|
}
|
|
42081
42084
|
}
|
|
42082
42085
|
function $e(W) {
|
|
42083
42086
|
var ge = W.target, be = I().contains(ge) || _.contains(ge);
|
|
42084
42087
|
if (!(W.type === "mousemove" && be)) {
|
|
42085
|
-
var qe = te().concat(_).map(function(
|
|
42086
|
-
var Ue, wt =
|
|
42088
|
+
var qe = te().concat(_).map(function(De) {
|
|
42089
|
+
var Ue, wt = De._tippy, vt = (Ue = wt.popperInstance) == null ? void 0 : Ue.state;
|
|
42087
42090
|
return vt ? {
|
|
42088
|
-
popperRect:
|
|
42091
|
+
popperRect: De.getBoundingClientRect(),
|
|
42089
42092
|
popperState: vt,
|
|
42090
42093
|
props: n
|
|
42091
42094
|
} : null;
|
|
@@ -42111,9 +42114,9 @@ function PK(t, e) {
|
|
|
42111
42114
|
}
|
|
42112
42115
|
function R() {
|
|
42113
42116
|
B();
|
|
42114
|
-
var W = k.props, ge = W.popperOptions, be = W.placement, qe = W.offset,
|
|
42115
|
-
getBoundingClientRect:
|
|
42116
|
-
contextElement:
|
|
42117
|
+
var W = k.props, ge = W.popperOptions, be = W.placement, qe = W.offset, De = W.getReferenceClientRect, Ue = W.moveTransition, wt = L() ? gp(_).arrow : null, vt = De ? {
|
|
42118
|
+
getBoundingClientRect: De,
|
|
42119
|
+
contextElement: De.contextElement || I()
|
|
42117
42120
|
} : t, Ur = {
|
|
42118
42121
|
name: "$$tippy",
|
|
42119
42122
|
enabled: !0,
|
|
@@ -42184,8 +42187,8 @@ function PK(t, e) {
|
|
|
42184
42187
|
}
|
|
42185
42188
|
function ae(W) {
|
|
42186
42189
|
k.clearDelayTimeouts(), W && re("onTrigger", [k, W]), Ae();
|
|
42187
|
-
var ge = $(!0), be = C(), qe = be[0],
|
|
42188
|
-
Si.isTouch && qe === "hold" &&
|
|
42190
|
+
var ge = $(!0), be = C(), qe = be[0], De = be[1];
|
|
42191
|
+
Si.isTouch && qe === "hold" && De && (ge = De), ge ? i = setTimeout(function() {
|
|
42189
42192
|
k.show();
|
|
42190
42193
|
}, ge) : k.show();
|
|
42191
42194
|
}
|
|
@@ -42232,7 +42235,7 @@ function PK(t, e) {
|
|
|
42232
42235
|
}
|
|
42233
42236
|
function Fe() {
|
|
42234
42237
|
process.env.NODE_ENV !== "production" && qi(k.state.isDestroyed, $s("show"));
|
|
42235
|
-
var W = k.state.isVisible, ge = k.state.isDestroyed, be = !k.state.isEnabled, qe = Si.isTouch && !k.props.touch,
|
|
42238
|
+
var W = k.state.isVisible, ge = k.state.isDestroyed, be = !k.state.isEnabled, qe = Si.isTouch && !k.props.touch, De = T1(k.props.duration, 0, Dn.duration);
|
|
42236
42239
|
if (!(W || ge || be || qe) && !I().hasAttribute("disabled") && (re("onShow", [k], !1), k.props.onShow(k) !== !1)) {
|
|
42237
42240
|
if (k.state.isVisible = !0, L() && (_.style.visibility = "visible"), U(), Ae(), k.state.isMounted || (_.style.transition = "none"), L()) {
|
|
42238
42241
|
var Ue = P(), wt = Ue.box, vt = Ue.content;
|
|
@@ -42243,9 +42246,9 @@ function PK(t, e) {
|
|
|
42243
42246
|
if (!(!k.state.isVisible || c)) {
|
|
42244
42247
|
if (c = !0, _.offsetHeight, _.style.transition = k.props.moveTransition, L() && k.props.animation) {
|
|
42245
42248
|
var Gr = P(), Dl = Gr.box, Ds = Gr.content;
|
|
42246
|
-
A1([Dl, Ds],
|
|
42249
|
+
A1([Dl, Ds], De), V4([Dl, Ds], "visible");
|
|
42247
42250
|
}
|
|
42248
|
-
se(), T(), j4(I1, k), (Tn = k.popperInstance) == null || Tn.forceUpdate(), re("onMount", [k]), k.props.animation && L() && G(
|
|
42251
|
+
se(), T(), j4(I1, k), (Tn = k.popperInstance) == null || Tn.forceUpdate(), re("onMount", [k]), k.props.animation && L() && G(De, function() {
|
|
42249
42252
|
k.state.isShown = !0, re("onShown", [k]);
|
|
42250
42253
|
});
|
|
42251
42254
|
}
|
|
@@ -42257,7 +42260,7 @@ function PK(t, e) {
|
|
|
42257
42260
|
var W = !k.state.isVisible, ge = k.state.isDestroyed, be = !k.state.isEnabled, qe = T1(k.props.duration, 1, Dn.duration);
|
|
42258
42261
|
if (!(W || ge || be) && (re("onHide", [k], !1), k.props.onHide(k) !== !1)) {
|
|
42259
42262
|
if (k.state.isVisible = !1, k.state.isShown = !1, c = !1, o = !1, L() && (_.style.visibility = "hidden"), we(), ke(), U(!0), L()) {
|
|
42260
|
-
var
|
|
42263
|
+
var De = P(), Ue = De.box, wt = De.content;
|
|
42261
42264
|
k.props.animation && (A1([Ue, wt], qe), V4([Ue, wt], "hidden"));
|
|
42262
42265
|
}
|
|
42263
42266
|
se(), T(), k.props.animation ? L() && z(qe, k.unmount) : k.unmount();
|
|
@@ -47336,14 +47339,14 @@ const MZ = ({ item: t, selected: e }) => b("div", {
|
|
|
47336
47339
|
children: t.label
|
|
47337
47340
|
})]
|
|
47338
47341
|
}), ow = q(({ items: t, command: e, component: n = MZ }, i) => {
|
|
47339
|
-
const [r, s] = j(0), o =
|
|
47342
|
+
const [r, s] = j(0), o = Ie((d) => {
|
|
47340
47343
|
const u = t[d];
|
|
47341
47344
|
u && e(u);
|
|
47342
|
-
}, [t, e]), a =
|
|
47345
|
+
}, [t, e]), a = Ie(() => {
|
|
47343
47346
|
s((d) => (d + t.length - 1) % t.length);
|
|
47344
|
-
}, [t.length]), l =
|
|
47347
|
+
}, [t.length]), l = Ie(() => {
|
|
47345
47348
|
s((d) => (d + 1) % t.length);
|
|
47346
|
-
}, [t.length]), c =
|
|
47349
|
+
}, [t.length]), c = Ie(() => {
|
|
47347
47350
|
o(r);
|
|
47348
47351
|
}, [r, o]);
|
|
47349
47352
|
return ce(() => {
|
|
@@ -47929,7 +47932,7 @@ const AZ = LZ.extend({
|
|
|
47929
47932
|
currentConfig: l
|
|
47930
47933
|
}), xg, kg(t), bg(t), fw(e, n)];
|
|
47931
47934
|
}, zZ = (t, e, n, i, r) => {
|
|
47932
|
-
const s = de(() => BZ(r.placeholder || "", r.toolbarLabels, r.slashCommandGroupLabels, r.moodTrackerLabels, r.liveCompanionLabels, r.transcriptLabels), [r]), o = ue(null), a =
|
|
47935
|
+
const s = de(() => BZ(r.placeholder || "", r.toolbarLabels, r.slashCommandGroupLabels, r.moodTrackerLabels, r.liveCompanionLabels, r.transcriptLabels), [r]), o = ue(null), a = Ie(({ editor: c }) => {
|
|
47933
47936
|
o.current && clearTimeout(o.current), o.current = setTimeout(() => {
|
|
47934
47937
|
const { from: d, to: u } = c.state.selection, h = c.isEmpty;
|
|
47935
47938
|
h && (t != null && t.selectedAction) && !e ? i({
|
|
@@ -48040,7 +48043,7 @@ const AZ = LZ.extend({
|
|
|
48040
48043
|
});
|
|
48041
48044
|
}
|
|
48042
48045
|
}, [o, a, e]);
|
|
48043
|
-
const m =
|
|
48046
|
+
const m = Ie(async (k) => {
|
|
48044
48047
|
var A;
|
|
48045
48048
|
const S = (A = a.buttons) == null ? void 0 : A.find((N) => N.type === k), _ = {
|
|
48046
48049
|
selectedAction: k,
|
|
@@ -48532,19 +48535,19 @@ const AZ = LZ.extend({
|
|
|
48532
48535
|
const [r, s] = j(0), o = ue(null), a = ue(null), l = e || [{
|
|
48533
48536
|
title: "",
|
|
48534
48537
|
commands: t
|
|
48535
|
-
}], c = l.flatMap((y) => y.commands), d =
|
|
48538
|
+
}], c = l.flatMap((y) => y.commands), d = Ie((y) => {
|
|
48536
48539
|
const v = c[y];
|
|
48537
48540
|
v && n(v);
|
|
48538
|
-
}, [c, n]), u =
|
|
48541
|
+
}, [c, n]), u = Ie((y) => {
|
|
48539
48542
|
const v = o.current;
|
|
48540
48543
|
if (!v) return;
|
|
48541
48544
|
const x = v.getBoundingClientRect(), w = y.getBoundingClientRect();
|
|
48542
48545
|
w.top < x.top ? v.scrollTop += w.top - x.top : w.bottom > x.bottom && (v.scrollTop += w.bottom - x.bottom);
|
|
48543
|
-
}, []), h =
|
|
48546
|
+
}, []), h = Ie(() => {
|
|
48544
48547
|
s((y) => y <= 0 ? c.length - 1 : y - 1);
|
|
48545
|
-
}, [c.length]), p =
|
|
48548
|
+
}, [c.length]), p = Ie(() => {
|
|
48546
48549
|
s((y) => y >= c.length - 1 ? 0 : y + 1);
|
|
48547
|
-
}, [c.length]), m =
|
|
48550
|
+
}, [c.length]), m = Ie(() => {
|
|
48548
48551
|
d(r);
|
|
48549
48552
|
}, [r, d]);
|
|
48550
48553
|
ce(() => {
|
|
@@ -56228,12 +56231,12 @@ const kte = (t) => {
|
|
|
56228
56231
|
}));
|
|
56229
56232
|
const E = de(() => ({
|
|
56230
56233
|
offset: [0, 5]
|
|
56231
|
-
}), []), C =
|
|
56234
|
+
}), []), C = Ie(({ node: L, pos: I }) => {
|
|
56232
56235
|
w.current = L ? {
|
|
56233
56236
|
pos: I,
|
|
56234
56237
|
nodeSize: L.nodeSize
|
|
56235
56238
|
} : null;
|
|
56236
|
-
}, []), F =
|
|
56239
|
+
}, []), F = Ie(() => {
|
|
56237
56240
|
const L = w.current;
|
|
56238
56241
|
if (!L || !N) return;
|
|
56239
56242
|
const { pos: I, nodeSize: D } = L, P = N.state.doc.nodeAt(I);
|
|
@@ -58120,7 +58123,7 @@ function Ene(t, e) {
|
|
|
58120
58123
|
c();
|
|
58121
58124
|
}
|
|
58122
58125
|
});
|
|
58123
|
-
const o =
|
|
58126
|
+
const o = Ie((d, u, h) => u < h - 1 ? d + e : d, [e]), a = Ie(() => {
|
|
58124
58127
|
if (!i.current) return [];
|
|
58125
58128
|
const d = i.current.children, u = [];
|
|
58126
58129
|
for (let h = 0; h < d.length; h++) {
|
|
@@ -58128,7 +58131,7 @@ function Ene(t, e) {
|
|
|
58128
58131
|
u.push(p);
|
|
58129
58132
|
}
|
|
58130
58133
|
return u;
|
|
58131
|
-
}, []), l =
|
|
58134
|
+
}, []), l = Ie((d, u) => {
|
|
58132
58135
|
let h = 0, p = 0;
|
|
58133
58136
|
for (let m = 0; m < d.length; m++) {
|
|
58134
58137
|
const g = p + d[m];
|
|
@@ -58136,7 +58139,7 @@ function Ene(t, e) {
|
|
|
58136
58139
|
p = g, p = o(p, m, d.length), h++;
|
|
58137
58140
|
}
|
|
58138
58141
|
return h;
|
|
58139
|
-
}, [o]), c =
|
|
58142
|
+
}, [o]), c = Ie(() => {
|
|
58140
58143
|
if (!n.current || t.length === 0) return;
|
|
58141
58144
|
const d = n.current.clientHeight, u = a(), h = l(u, d);
|
|
58142
58145
|
s(h === 0 ? {
|
package/dist/f0.d.ts
CHANGED
|
@@ -1364,13 +1364,13 @@ export declare const defaultTranslations: {
|
|
|
1364
1364
|
readonly feedbackModal: {
|
|
1365
1365
|
readonly positive: {
|
|
1366
1366
|
readonly title: "What did you like about this response?";
|
|
1367
|
-
readonly
|
|
1368
|
-
readonly
|
|
1367
|
+
readonly label: "Your feedback helps us make Factorial AI better";
|
|
1368
|
+
readonly placeholder: "Share what worked well";
|
|
1369
1369
|
};
|
|
1370
1370
|
readonly negative: {
|
|
1371
|
-
readonly title: "What could have been better
|
|
1372
|
-
readonly
|
|
1373
|
-
readonly
|
|
1371
|
+
readonly title: "What could have been better?";
|
|
1372
|
+
readonly label: "Your feedback helps us improve future answers";
|
|
1373
|
+
readonly placeholder: "Share what didn’t work";
|
|
1374
1374
|
};
|
|
1375
1375
|
};
|
|
1376
1376
|
};
|