@factorialco/f0-react 1.368.0 → 1.369.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,6 +1,6 @@
1
1
  import { jsx as X, jsxs as le } from "react/jsx-runtime";
2
2
  import { useInsertionEffect as Xe, createContext as ke, useContext as $e, useRef as _, useEffect as ne, useState as _e, useCallback as ze, useMemo as Ye } from "react";
3
- import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-3B4UugKL.js";
3
+ import { y as qe, z as We, D as He, G as je, J as Ne, K as Ke, M as Qe, N as Je, Q as Ze, R as et, V as Ce, W as tt, X as rt, Y as nt, Z as it, _ as ot, $ as at, a0 as st, a1 as ie, a2 as ct, a3 as ut, a4 as lt, a5 as ft, a6 as mt, a7 as dt, a8 as fe, a9 as ht } from "./F0AiChat-Dv8ilDMD.js";
4
4
  import { useTrackVolume as pt } from "@livekit/components-react";
5
5
  function vt(t, e, r) {
6
6
  Xe(() => t.on(e, r), [t, e, r]);
@@ -46,21 +46,21 @@ function At(t, e) {
46
46
  function wt(t, e) {
47
47
  return t.at === e.at ? t.value === null ? 1 : e.value === null ? -1 : 0 : t.at - e.at;
48
48
  }
49
- const St = "easeInOut", bt = 20;
50
- function xt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
51
- const f = e.duration || 0.3, h = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), g = {}, x = /* @__PURE__ */ new Map();
52
- let y = 0, T = 0, b = 0;
49
+ const St = "easeInOut", xt = 20;
50
+ function bt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
51
+ const f = e.duration || 0.3, h = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), g = {}, b = /* @__PURE__ */ new Map();
52
+ let y = 0, T = 0, x = 0;
53
53
  for (let c = 0; c < t.length; c++) {
54
54
  const v = t[c];
55
55
  if (typeof v == "string") {
56
- x.set(v, T);
56
+ b.set(v, T);
57
57
  continue;
58
58
  } else if (!Array.isArray(v)) {
59
- x.set(v.name, me(T, v.at, y, x));
59
+ b.set(v.name, me(T, v.at, y, b));
60
60
  continue;
61
61
  }
62
62
  let [N, m, R = {}] = v;
63
- R.at !== void 0 && (T = me(T, R.at, y, x));
63
+ R.at !== void 0 && (T = me(T, R.at, y, b));
64
64
  let L = 0;
65
65
  const C = (w, S, I, F = 0, V = 0) => {
66
66
  const E = Rt(w), { delay: d = 0, times: P = Ke(E), type: W = "keyframes", repeat: k, repeatType: ue, repeatDelay: oe = 0, ...H } = S;
@@ -82,7 +82,7 @@ function xt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
82
82
  P.length === 1 && P[0] === 0 && (P[1] = 1);
83
83
  const ee = P.length - E.length;
84
84
  if (ee > 0 && Je(P, ee), E.length === 1 && E.unshift(null), k) {
85
- Ce(k < bt, "Repeat count too high, must be less than 20"), M = gt(M, k);
85
+ Ce(k < xt, "Repeat count too high, must be less than 20"), M = gt(M, k);
86
86
  const z = [...E], Y = [...P];
87
87
  U = Array.isArray(U) ? [...U] : [U];
88
88
  const j = [...U];
@@ -94,7 +94,7 @@ function xt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
94
94
  At(P, k);
95
95
  }
96
96
  const te = Z + M;
97
- Et(I, E, U, P, Z, te), L = Math.max($ + M, L), b = Math.max(te, b);
97
+ Et(I, E, U, P, Z, te), L = Math.max($ + M, L), x = Math.max(te, x);
98
98
  };
99
99
  if (Ne(N)) {
100
100
  const w = de(N, A);
@@ -117,7 +117,7 @@ function xt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
117
117
  const R = [], L = [], C = [];
118
118
  for (let S = 0; S < m.length; S++) {
119
119
  const { at: I, value: F, easing: V } = m[S];
120
- R.push(F), L.push(tt(0, b, I)), C.push(V || "easeOut");
120
+ R.push(F), L.push(tt(0, x, I)), C.push(V || "easeOut");
121
121
  }
122
122
  L[0] !== 0 && (L.unshift(0), R.unshift(R[0]), C.unshift(St)), L[L.length - 1] !== 1 && (L.push(1), R.push(null)), h.has(v) || h.set(v, {
123
123
  keyframes: {},
@@ -126,7 +126,7 @@ function xt(t, { defaultTransition: e = {}, ...r } = {}, n, l) {
126
126
  const w = h.get(v);
127
127
  w.keyframes[N] = R, w.transition[N] = {
128
128
  ...e,
129
- duration: b,
129
+ duration: x,
130
130
  ease: C,
131
131
  times: L,
132
132
  ...r
@@ -223,8 +223,8 @@ function De(t, e, r, n) {
223
223
  const f = Ue(t, e, n), h = f.length;
224
224
  Ce(!!h, "No valid elements provided.");
225
225
  for (let A = 0; A < h; A++) {
226
- const g = f[A], x = g instanceof Element ? Nt : Ct;
227
- ie.has(g) || x(g);
226
+ const g = f[A], b = g instanceof Element ? Nt : Ct;
227
+ ie.has(g) || b(g);
228
228
  const y = ie.get(g), T = { ...r };
229
229
  "delay" in T && typeof T.delay == "function" && (T.delay = T.delay(A, h)), l.push(...ut(y, { ...e, transition: T }, {}));
230
230
  }
@@ -233,7 +233,7 @@ function De(t, e, r, n) {
233
233
  }
234
234
  function Ot(t, e, r) {
235
235
  const n = [];
236
- return xt(t, e, r, { spring: lt }).forEach(({ keyframes: f, transition: h }, A) => {
236
+ return bt(t, e, r, { spring: lt }).forEach(({ keyframes: f, transition: h }, A) => {
237
237
  n.push(...De(A, f, h));
238
238
  }), n;
239
239
  }
@@ -332,6 +332,7 @@ const Gt = Bt(), mr = ["xs", "sm", "md", "lg"], dr = [
332
332
  defaultInitialMessage: "How can I help you today?",
333
333
  inputPlaceholder: "Ask about time, people, or company info and a lot of other things...",
334
334
  stopAnswerGeneration: "Stop generating",
335
+ responseStopped: "You stopped this response",
335
336
  sendMessage: "Send message",
336
337
  thoughtsGroupTitle: "Reflection",
337
338
  resourcesGroupTitle: "Resources",
@@ -350,6 +351,8 @@ const Gt = Bt(), mr = ["xs", "sm", "md", "lg"], dr = [
350
351
  placeholder: "Share what didn't work"
351
352
  }
352
353
  },
354
+ expandChat: "Expand chat",
355
+ collapseChat: "Collapse chat",
353
356
  ask: "Ask One"
354
357
  }
355
358
  }, Pe = ke(null);
@@ -377,7 +380,7 @@ void main(void){
377
380
  }`, ve = `attribute vec3 aVertexPosition;
378
381
  void main(void) {
379
382
  gl_Position = vec4(aVertexPosition, 1.0);
380
- }`, ge = "iTime", ye = "iTimeDelta", Te = "iDate", Ee = "iFrame", Ae = "iMouse", we = "iResolution", $t = "iChannel", Se = "iChannelResolution", be = "iDeviceOrientation";
383
+ }`, ge = "iTime", ye = "iTimeDelta", Te = "iDate", Ee = "iFrame", Ae = "iMouse", we = "iResolution", $t = "iChannel", Se = "iChannelResolution", xe = "iDeviceOrientation";
381
384
  function zt(t, e) {
382
385
  return t.includes("Matrix") && Array.isArray(e);
383
386
  }
@@ -472,7 +475,7 @@ const Wt = (t, e, r, n) => {
472
475
  default:
473
476
  console.error(G(`The uniform type "${t}" is not valid, please make sure your uniform type is valid`));
474
477
  }
475
- }, se = 9729, xe = 9728, jt = 9987, Re = 33071, Ie = 10497;
478
+ }, se = 9729, be = 9728, jt = 9987, Re = 33071, Ie = 10497;
476
479
  class Kt {
477
480
  gl;
478
481
  url;
@@ -513,8 +516,8 @@ class Kt {
513
516
  const { gl: r } = this, { url: n, wrapS: l, wrapT: f, minFilter: h, magFilter: A, flipY: g = -1 } = e;
514
517
  if (!n)
515
518
  return Promise.reject(new Error(G("Missing url, please make sure to pass the url of your texture { url: ... }")));
516
- const x = /(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.exec(n), y = /(\.mp4|\.3gp|\.webm|\.ogv)$/i.exec(n);
517
- if (x === null && y === null)
519
+ const b = /(\.jpg|\.jpeg|\.png|\.gif|\.bmp)$/i.exec(n), y = /(\.mp4|\.3gp|\.webm|\.ogv)$/i.exec(n);
520
+ if (b === null && y === null)
518
521
  return Promise.reject(new Error(G(`Please upload a video or an image with a valid format (url: ${n})`)));
519
522
  Object.assign(this, {
520
523
  url: n,
@@ -524,8 +527,8 @@ class Kt {
524
527
  magFilter: A,
525
528
  flipY: g
526
529
  });
527
- const T = 0, b = r.RGBA, c = 1, v = 1, N = 0, m = r.RGBA, R = r.UNSIGNED_BYTE, L = new Uint8Array([255, 255, 255, 0]), C = r.createTexture();
528
- if (r.bindTexture(r.TEXTURE_2D, C), r.texImage2D(r.TEXTURE_2D, T, b, c, v, N, m, R, L), y) {
530
+ const T = 0, x = r.RGBA, c = 1, v = 1, N = 0, m = r.RGBA, R = r.UNSIGNED_BYTE, L = new Uint8Array([255, 255, 255, 0]), C = r.createTexture();
531
+ if (r.bindTexture(r.TEXTURE_2D, C), r.texImage2D(r.TEXTURE_2D, T, x, c, v, N, m, R, L), y) {
529
532
  const F = this.setupVideo(n);
530
533
  return r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, r.CLAMP_TO_EDGE), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, r.LINEAR), this._webglTexture = C, this.source = F, this.isVideo = !0, F.play().then(() => this);
531
534
  }
@@ -540,7 +543,7 @@ class Kt {
540
543
  });
541
544
  }
542
545
  let S = await w(), I = (S.width & S.width - 1) === 0 && (S.height & S.height - 1) === 0;
543
- return (e.wrapS !== Re || e.wrapT !== Re || e.minFilter !== xe && e.minFilter !== se) && !I && (S = this.makePowerOf2(S), I = !0), r.bindTexture(r.TEXTURE_2D, C), r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, g), r.texImage2D(r.TEXTURE_2D, T, b, m, R, S), I && e.minFilter !== xe && e.minFilter !== se && r.generateMipmap(r.TEXTURE_2D), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, this.wrapS || Ie), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, this.wrapT || Ie), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, this.minFilter || jt), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, this.magFilter || se), this._webglTexture = C, this.source = S, this.isVideo = !1, this.isLoaded = !0, this.width = S.width || 0, this.height = S.height || 0, this;
546
+ return (e.wrapS !== Re || e.wrapT !== Re || e.minFilter !== be && e.minFilter !== se) && !I && (S = this.makePowerOf2(S), I = !0), r.bindTexture(r.TEXTURE_2D, C), r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL, g), r.texImage2D(r.TEXTURE_2D, T, x, m, R, S), I && e.minFilter !== be && e.minFilter !== se && r.generateMipmap(r.TEXTURE_2D), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_S, this.wrapS || Ie), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_WRAP_T, this.wrapT || Ie), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MIN_FILTER, this.minFilter || jt), r.texParameteri(r.TEXTURE_2D, r.TEXTURE_MAG_FILTER, this.magFilter || se), this._webglTexture = C, this.source = S, this.isVideo = !1, this.isLoaded = !0, this.width = S.width || 0, this.height = S.height || 0, this;
544
547
  };
545
548
  }
546
549
  const G = (t) => `react-shaders: ${t}`, Fe = (t) => {
@@ -550,7 +553,7 @@ const G = (t) => `react-shaders: ${t}`, Fe = (t) => {
550
553
  }
551
554
  return [t.clientX, t.clientY];
552
555
  }, Le = (t, e, r) => t * (1 - r) + e * r, Qt = (t, e, r) => r > 0 ? t.substring(0, r) + e + t.substring(r, t.length) : e + t;
553
- function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l = [0, 0, 0, 1], precision: f = "highp", style: h, contextAttributes: A = {}, lerp: g = 1, devicePixelRatio: x = 1, onDoneLoadingTextures: y, onError: T = console.error, onWarning: b = console.warn }) {
556
+ function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l = [0, 0, 0, 1], precision: f = "highp", style: h, contextAttributes: A = {}, lerp: g = 1, devicePixelRatio: b = 1, onDoneLoadingTextures: y, onError: T = console.error, onWarning: x = console.warn }) {
554
557
  const c = _(null), v = _(null), N = _(null), m = _(null), R = _(void 0), L = _(void 0), C = _(!1), w = _(void 0), S = _(0), I = _([0, 0]), F = _([]), V = _(0), E = _(void 0), d = _({
555
558
  [ge]: {
556
559
  type: "float",
@@ -582,7 +585,7 @@ function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l =
582
585
  isNeeded: !1,
583
586
  value: 0
584
587
  },
585
- [be]: {
588
+ [xe]: {
586
589
  type: "vec4",
587
590
  isNeeded: !1,
588
591
  value: [0, 0, 0, 0]
@@ -591,7 +594,7 @@ function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l =
591
594
  const o = "width" in i ? i.width ?? 0 : 0, u = "height" in i ? i.height ?? 0 : 0, s = d.current.iChannelResolution;
592
595
  if (!s) return;
593
596
  const p = Array.isArray(s.value) ? s.value : s.value = [];
594
- p[a * 3] = o * x, p[a * 3 + 1] = u * x, p[a * 3 + 2] = 0;
597
+ p[a * 3] = o * b, p[a * 3 + 1] = u * b, p[a * 3 + 2] = 0;
595
598
  }, k = () => {
596
599
  c.current && (v.current = c.current.getContext("webgl", A) || c.current.getContext("experimental-webgl", A), v.current?.getExtension("OES_standard_derivatives"), v.current?.getExtension("EXT_shader_texture_lod"));
597
600
  }, ue = () => {
@@ -622,7 +625,7 @@ function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l =
622
625
  const i = v.current;
623
626
  if (!i) return;
624
627
  w.current = c.current?.getBoundingClientRect();
625
- const a = x, o = Math.floor((w.current?.width ?? 1) * a), u = Math.floor((w.current?.height ?? 1) * a);
628
+ const a = b, o = Math.floor((w.current?.width ?? 1) * a), u = Math.floor((w.current?.height ?? 1) * a);
626
629
  if (i.canvas.width = o, i.canvas.height = u, d.current.iResolution?.isNeeded && m.current) {
627
630
  const s = i.getUniformLocation(m.current, we);
628
631
  i.uniform2fv(s, [i.canvas.width, i.canvas.height]);
@@ -633,7 +636,7 @@ function Jt({ fs: t, vs: e = ve, textures: r = [], uniforms: n, clearColor: l =
633
636
  const u = o.createShader(i);
634
637
  if (!u) return null;
635
638
  if (o.shaderSource(u, a), o.compileShader(u), !o.getShaderParameter(u, o.COMPILE_STATUS)) {
636
- b?.(G(`Error compiling the shader:
639
+ x?.(G(`Error compiling the shader:
637
640
  ${a}`));
638
641
  const s = o.getShaderInfoLog(u);
639
642
  o.deleteShader(u), T?.(G(`Shader compiler log: ${s}`));
@@ -694,8 +697,8 @@ ${a}`));
694
697
  }, te = (i) => {
695
698
  const a = pe.includes(f ?? "highp"), o = `precision ${a ? f : pe[1]} float;
696
699
  `;
697
- a || b?.(G(`wrong precision type ${f}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`));
698
- let u = o.concat(`#define DPR ${x.toFixed(1)}
700
+ a || x?.(G(`wrong precision type ${f}, please make sure to pass one of a valid precision lowp, mediump, highp, by default you shader precision will be set to highp.`));
701
+ let u = o.concat(`#define DPR ${b.toFixed(1)}
699
702
  `).concat(i.replace(/texture\(/g, "texture2D("));
700
703
  for (const p of Object.keys(d.current))
701
704
  if (i.includes(p)) {
@@ -730,7 +733,7 @@ ${a}`));
730
733
  a.uniform3fv(s, d.current.iChannelResolution.value);
731
734
  }
732
735
  if (d.current.iDeviceOrientation?.isNeeded) {
733
- const s = a.getUniformLocation(m.current, be);
736
+ const s = a.getUniformLocation(m.current, xe);
734
737
  a.uniform4fv(s, d.current.iDeviceOrientation.value);
735
738
  }
736
739
  if (d.current.iTime?.isNeeded) {
@@ -1002,7 +1005,7 @@ function or(t, e) {
1002
1005
  value: l,
1003
1006
  animate: f,
1004
1007
  motionValue: h
1005
- } = re(nr), { value: A, animate: g } = re(tr), { value: x, animate: y } = re(rr), { value: T, animate: b } = re(ir), c = pt(e, {
1008
+ } = re(nr), { value: A, animate: g } = re(tr), { value: b, animate: y } = re(rr), { value: T, animate: x } = re(ir), c = pt(e, {
1006
1009
  fftSize: 512,
1007
1010
  smoothingTimeConstant: 0.55
1008
1011
  });
@@ -1011,19 +1014,19 @@ function or(t, e) {
1011
1014
  case "idle":
1012
1015
  case "failed":
1013
1016
  case "disconnected":
1014
- n(10), f(0.2, D), g(1.2, D), y(0.4, D), b(1, D);
1017
+ n(10), f(0.2, D), g(1.2, D), y(0.4, D), x(1, D);
1015
1018
  return;
1016
1019
  case "listening":
1017
1020
  case "pre-connect-buffering":
1018
- n(20), f(0.3, { type: "spring", duration: 1, bounce: 0.35 }), g(1, D), y(0.7, D), b([1.5, 2], Me);
1021
+ n(20), f(0.3, { type: "spring", duration: 1, bounce: 0.35 }), g(1, D), y(0.7, D), x([1.5, 2], Me);
1019
1022
  return;
1020
1023
  case "thinking":
1021
1024
  case "connecting":
1022
1025
  case "initializing":
1023
- n(30), f(0.3, D), g(0.5, D), y(1, D), b([0.5, 2.5], Me);
1026
+ n(30), f(0.3, D), g(0.5, D), y(1, D), x([0.5, 2.5], Me);
1024
1027
  return;
1025
1028
  case "speaking":
1026
- n(70), f(0.3, D), g(0.75, D), y(1.25, D), b(1.5, D);
1029
+ n(70), f(0.3, D), g(0.75, D), y(1.25, D), x(1.5, D);
1027
1030
  return;
1028
1031
  }
1029
1032
  }, [
@@ -1031,7 +1034,7 @@ function or(t, e) {
1031
1034
  f,
1032
1035
  g,
1033
1036
  y,
1034
- b
1037
+ x
1035
1038
  ]), ne(() => {
1036
1039
  t === "speaking" && c > 0 && !h.isAnimating() && f(0.2 + 0.2 * c, { duration: 0 });
1037
1040
  }, [
@@ -1041,12 +1044,12 @@ function or(t, e) {
1041
1044
  f,
1042
1045
  g,
1043
1046
  y,
1044
- b
1047
+ x
1045
1048
  ]), {
1046
1049
  speed: r,
1047
1050
  scale: l,
1048
1051
  amplitude: A,
1049
- frequency: x,
1052
+ frequency: b,
1050
1053
  brightness: T
1051
1054
  };
1052
1055
  }
@@ -1072,12 +1075,12 @@ function sr(t) {
1072
1075
  return [r, n, l].map((h = "00") => parseInt(h, 16) / 255);
1073
1076
  }
1074
1077
  }
1075
- function Ve({ shape: t = 1, speed: e = 1, amplitude: r = 0.5, frequency: n = 0.5, scale: l = 0.2, blur: f = 1, color: h = "#FF355E", colorShift: A = 1, brightness: g = 1, themeMode: x = typeof window < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", ref: y, className: T, ...b }) {
1078
+ function Ve({ shape: t = 1, speed: e = 1, amplitude: r = 0.5, frequency: n = 0.5, scale: l = 0.2, blur: f = 1, color: h = "#FF355E", colorShift: A = 1, brightness: g = 1, themeMode: b = typeof window < "u" && document.documentElement.classList.contains("dark") ? "dark" : "light", ref: y, className: T, ...x }) {
1076
1079
  const c = Ye(() => sr(h), [h]);
1077
1080
  return X("div", {
1078
1081
  ref: y,
1079
1082
  className: T,
1080
- ...b,
1083
+ ...x,
1081
1084
  children: X(Jt, {
1082
1085
  fs: Zt,
1083
1086
  devicePixelRatio: globalThis.devicePixelRatio ?? 1,
@@ -1132,7 +1135,7 @@ function Ve({ shape: t = 1, speed: e = 1, amplitude: r = 0.5, frequency: n = 0.5
1132
1135
  },
1133
1136
  uMode: {
1134
1137
  type: "1f",
1135
- value: x === "light" ? 1 : 0
1138
+ value: b === "light" ? 1 : 0
1136
1139
  },
1137
1140
  uColor: {
1138
1141
  type: "3fv",
@@ -1154,17 +1157,17 @@ function Ve({ shape: t = 1, speed: e = 1, amplitude: r = 0.5, frequency: n = 0.5
1154
1157
  }
1155
1158
  Ve.displayName = "AuraShader";
1156
1159
  function gr({ size: t = "lg", state: e, color: r, colorShift: n = 0.05, audioTrack: l, themeMode: f, className: h, ref: A, ...g }) {
1157
- const { speed: x, scale: y, amplitude: T, frequency: b, brightness: c } = or(e, l);
1160
+ const { speed: b, scale: y, amplitude: T, frequency: x, brightness: c } = or(e, l);
1158
1161
  return X(Ve, {
1159
1162
  ref: A,
1160
1163
  blur: 0.2,
1161
1164
  color: r,
1162
1165
  colorShift: n,
1163
- speed: x,
1166
+ speed: b,
1164
1167
  scale: y,
1165
1168
  themeMode: f,
1166
1169
  amplitude: T,
1167
- frequency: b,
1170
+ frequency: x,
1168
1171
  brightness: c,
1169
1172
  className: mt(ar({
1170
1173
  size: t
package/dist/ai.d.ts CHANGED
@@ -49,6 +49,21 @@ export declare type AiChatProviderProps = {
49
49
  * When enabled, the chat can be resized between 300px and 50% of the screen width
50
50
  */
51
51
  resizable?: boolean;
52
+ /**
53
+ * The default visualization mode for the chat
54
+ * When set to "fullscreen", the chat starts in fullscreen mode and auto-opens
55
+ * @default "sidepanel"
56
+ */
57
+ defaultVisualizationMode?: VisualizationMode;
58
+ /**
59
+ * When true, prevents switching between visualization modes (hides the expand/collapse button)
60
+ * @default false
61
+ */
62
+ lockVisualizationMode?: boolean;
63
+ /**
64
+ * Optional footer content rendered below the textarea
65
+ */
66
+ footer?: React.ReactNode;
52
67
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
53
68
  threadId: string;
54
69
  feedback: string;
@@ -72,14 +87,6 @@ declare type AiChatProviderReturnValue = {
72
87
  tmp_setAgent: (agent?: string) => void;
73
88
  placeholders: string[];
74
89
  setPlaceholders: React.Dispatch<React.SetStateAction<string[]>>;
75
- /**
76
- * Set the amount of minutes after which the chat will be cleared automatically
77
- * Set `null` to disable auto-clearing
78
- *
79
- * @default 15
80
- */
81
- setAutoClearMinutes: React.Dispatch<React.SetStateAction<number | null>>;
82
- autoClearMinutes: number | null;
83
90
  /**
84
91
  * The initial message to display in the chat
85
92
  */
@@ -115,6 +122,22 @@ declare type AiChatProviderReturnValue = {
115
122
  * Reset the chat width to the default value (360px)
116
123
  */
117
124
  resetChatWidth: () => void;
125
+ /**
126
+ * The current visualization mode of the chat
127
+ */
128
+ visualizationMode: VisualizationMode;
129
+ /**
130
+ * Set the visualization mode
131
+ */
132
+ setVisualizationMode: React.Dispatch<React.SetStateAction<VisualizationMode>>;
133
+ /**
134
+ * When true, prevents switching between visualization modes
135
+ */
136
+ lockVisualizationMode: boolean;
137
+ /**
138
+ * Optional footer content rendered below the textarea
139
+ */
140
+ footer?: React.ReactNode;
118
141
  } & Pick<AiChatState, "greeting" | "agent" | "disclaimer" | "resizable">;
119
142
 
120
143
  /**
@@ -128,6 +151,9 @@ declare interface AiChatState {
128
151
  welcomeScreenSuggestions?: WelcomeScreenSuggestion[];
129
152
  disclaimer?: AiChatDisclaimer;
130
153
  resizable?: boolean;
154
+ defaultVisualizationMode?: VisualizationMode;
155
+ lockVisualizationMode?: boolean;
156
+ footer?: React.ReactNode;
131
157
  placeholders?: string[];
132
158
  setPlaceholders?: React.Dispatch<React.SetStateAction<string[]>>;
133
159
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
@@ -168,6 +194,7 @@ export declare const aiTranslations: {
168
194
  defaultInitialMessage: string;
169
195
  inputPlaceholder: string;
170
196
  stopAnswerGeneration: string;
197
+ responseStopped: string;
171
198
  sendMessage: string;
172
199
  thoughtsGroupTitle: string;
173
200
  resourcesGroupTitle: string;
@@ -186,6 +213,8 @@ export declare const aiTranslations: {
186
213
  placeholder: string;
187
214
  };
188
215
  };
216
+ expandChat: string;
217
+ collapseChat: string;
189
218
  ask: string;
190
219
  };
191
220
  };
@@ -550,6 +579,7 @@ export declare const defaultTranslations: {
550
579
  readonly defaultInitialMessage: "How can I help you today?";
551
580
  readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
552
581
  readonly stopAnswerGeneration: "Stop generating";
582
+ readonly responseStopped: "You stopped this response";
553
583
  readonly sendMessage: "Send message";
554
584
  readonly thoughtsGroupTitle: "Reflection";
555
585
  readonly resourcesGroupTitle: "Resources";
@@ -568,6 +598,8 @@ export declare const defaultTranslations: {
568
598
  readonly placeholder: "Share what didn’t work";
569
599
  };
570
600
  };
601
+ readonly expandChat: "Expand chat";
602
+ readonly collapseChat: "Collapse chat";
571
603
  readonly ask: "Ask One";
572
604
  readonly growth: {
573
605
  readonly demoCard: {
@@ -777,7 +809,7 @@ export declare const F0AiChat: () => JSX_2.Element | null;
777
809
  /**
778
810
  * @experimental This is an experimental component use it at your own risk
779
811
  */
780
- export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
812
+ export declare const F0AiChatProvider: ({ enabled, greeting, initialMessage, welcomeScreenSuggestions, disclaimer, resizable, defaultVisualizationMode, lockVisualizationMode, footer, onThumbsUp, onThumbsDown, children, agent, ...copilotKitProps }: AiChatProviderProps) => JSX_2.Element;
781
813
 
782
814
  export declare const F0AiChatTextArea: ({ submitLabel, inProgress, onSend, onStop, placeholders, defaultPlaceholder, autoFocus, }: F0AiChatTextAreaProps) => JSX_2.Element;
783
815
 
@@ -1100,6 +1132,11 @@ export declare const useMessageSourcesAction: () => void;
1100
1132
  */
1101
1133
  export declare const useOrchestratorThinkingAction: () => void;
1102
1134
 
1135
+ /**
1136
+ * Visualization mode for the AI chat
1137
+ */
1138
+ export declare type VisualizationMode = "sidepanel" | "fullscreen";
1139
+
1103
1140
  /**
1104
1141
  * Welcome screen suggestion item
1105
1142
  */
package/dist/ai.js CHANGED
@@ -1,6 +1,6 @@
1
- import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-3B4UugKL.js";
1
+ import { A as e, B as o, C as t, E as n, h as i, F as r, a as l, x as c, i as A, b as u, s as F, t as h, v as C, w as T, c as d, n as m, o as I, p as f, H as g, I as S, k as p, L as x, O as H, q as P, P as b, S as k, T as O, l as v, m as w, U as M, r as E, j as L, d as q, e as B, u as U, g as j, f as z } from "./F0AiChat-Dv8ilDMD.js";
2
2
  import { defaultTranslations as R } from "./i18n-provider-defaults.js";
3
- import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-CZTSs7VF.js";
3
+ import { A as y, F as G, c as J, b as K, a as N, o as Q, u as W } from "./F0HILActionConfirmation-C2YWjDqH.js";
4
4
  export {
5
5
  e as A,
6
6
  y as AiChatTranslationsProvider,
@@ -408,6 +408,21 @@ declare type AiChatProviderProps = {
408
408
  * When enabled, the chat can be resized between 300px and 50% of the screen width
409
409
  */
410
410
  resizable?: boolean;
411
+ /**
412
+ * The default visualization mode for the chat
413
+ * When set to "fullscreen", the chat starts in fullscreen mode and auto-opens
414
+ * @default "sidepanel"
415
+ */
416
+ defaultVisualizationMode?: VisualizationMode;
417
+ /**
418
+ * When true, prevents switching between visualization modes (hides the expand/collapse button)
419
+ * @default false
420
+ */
421
+ lockVisualizationMode?: boolean;
422
+ /**
423
+ * Optional footer content rendered below the textarea
424
+ */
425
+ footer?: React.ReactNode;
411
426
  onThumbsUp?: (message: AIMessage, { threadId, feedback }: {
412
427
  threadId: string;
413
428
  feedback: string;
@@ -2500,6 +2515,7 @@ declare const defaultTranslations: {
2500
2515
  readonly defaultInitialMessage: "How can I help you today?";
2501
2516
  readonly inputPlaceholder: "Ask about time, people, or company info and a lot of other things...";
2502
2517
  readonly stopAnswerGeneration: "Stop generating";
2518
+ readonly responseStopped: "You stopped this response";
2503
2519
  readonly sendMessage: "Send message";
2504
2520
  readonly thoughtsGroupTitle: "Reflection";
2505
2521
  readonly resourcesGroupTitle: "Resources";
@@ -2518,6 +2534,8 @@ declare const defaultTranslations: {
2518
2534
  readonly placeholder: "Share what didn’t work";
2519
2535
  };
2520
2536
  };
2537
+ readonly expandChat: "Expand chat";
2538
+ readonly collapseChat: "Collapse chat";
2521
2539
  readonly ask: "Ask One";
2522
2540
  readonly growth: {
2523
2541
  readonly demoCard: {
@@ -6421,6 +6439,11 @@ declare type Visualization<R extends RecordType, Filters extends FiltersDefiniti
6421
6439
  }) => JSX.Element;
6422
6440
  };
6423
6441
 
6442
+ /**
6443
+ * Visualization mode for the AI chat
6444
+ */
6445
+ declare type VisualizationMode = "sidepanel" | "fullscreen";
6446
+
6424
6447
  declare type VisualizationSettings = {
6425
6448
  [K in keyof typeof collectionVisualizations]: ExtractVisualizationSettings<(typeof collectionVisualizations)[K]>;
6426
6449
  };