@versini/sassysaint 4.0.5 → 4.1.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,7 +1,7 @@
1
1
  import { jsxs as E, jsx as n, Fragment as ye } from "react/jsx-runtime";
2
- import { O as Be, s as Ve, S as De, f$1 as ze, M as $e, U as Ue, r as Fe, o as Pe, n as fe, l as Ge, a as q, isLastMessageFromRole as he, x as xe, CANCEL as je, CLEAR as We, ACTION_RESET as be, ROLE_ASSISTANT as M, ROLE_INTERNAL as Z, ROLE_USER as K, zr as ee, ROLE_SYSTEM as Ye, ROLE_HIDDEN as qe, MODEL_GPT4 as ke, STATS_SEPARATOR as le, ACTION_MODEL as Ce, ACTION_MESSAGE as V, TYPE_QUESTION as Je, SEND as Qe, ACTION_STREAMING as Te, ERROR_MESSAGE as Xe, getMessageContaintWrapperClass as Ke, MessagesContainerHeader as Ze, ACTION_SEARCH as er, ACTION_SORT as rr, ACTION_RESTORE as tr, ACTION_LOCATION as B, getCurrentGeoLocation as or, c as sr, AppFooter as ar, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as nr, LOCAL_STORAGE_SORT as lr, LOCAL_STORAGE_LOCATION as cr } from "./index.KrqE7k6j.js";
3
- import { g as ve, AppContext as P, restCall as ir, E as Q, serviceCall as ce, SERVICE_TYPES as ie, HistoryContext as dr, k as ur } from "./useLocalStorage.cIA35Dub.js";
4
- import pr, { useState as I, useEffect as S, useRef as x, useLayoutEffect as $, useContext as re, lazy as mr, Suspense as de, useReducer as ue, useCallback as gr } from "react";
2
+ import { O as Be, s as Ve, S as De, f$1 as $e, M as ze, U as Ue, r as Fe, o as Pe, n as fe, l as Ge, a as Y, isLastMessageFromRole as he, x as xe, CANCEL as je, CLEAR as qe, ACTION_RESET as be, ROLE_ASSISTANT as M, ROLE_INTERNAL as Z, ROLE_USER as K, qr as ee, ROLE_SYSTEM as We, ROLE_HIDDEN as Ye, MODEL_GPT4 as ke, STATS_SEPARATOR as le, ACTION_MODEL as Ce, ACTION_MESSAGE as V, TYPE_QUESTION as Je, SEND as Qe, ACTION_STREAMING as Te, ERROR_MESSAGE as Xe, getMessageContaintWrapperClass as Ke, MessagesContainerHeader as Ze, ACTION_SEARCH as er, ACTION_SORT as rr, ACTION_RESTORE as tr, ACTION_LOCATION as B, getCurrentGeoLocation as or, c as sr, AppFooter as ar, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as nr, LOCAL_STORAGE_SORT as lr, LOCAL_STORAGE_LOCATION as cr } from "./index.iWfWxGn2.js";
3
+ import { g as ve, AppContext as P, restCall as ir, E as Q, serviceCall as ce, SERVICE_TYPES as ie, HistoryContext as dr, k as ur } from "./useLocalStorage.ChFZVshd.js";
4
+ import pr, { useState as I, useEffect as S, useRef as x, useLayoutEffect as z, useContext as re, lazy as mr, Suspense as de, useReducer as ue, useCallback as gr } from "react";
5
5
  import g from "clsx";
6
6
  const yr = ({
7
7
  className: e,
@@ -207,18 +207,18 @@ const Nr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
207
207
  return "";
208
208
  if (t)
209
209
  return g(
210
- q,
210
+ Y,
211
211
  "absolute px-2 cursor-not-allowed opacity-50 font-medium"
212
212
  );
213
213
  if (!e)
214
- return g(q, "absolute px-2 font-medium", {
214
+ return g(Y, "absolute px-2 font-medium", {
215
215
  "text-copy-medium": o === "dark",
216
216
  "text-copy-dark": o === "light",
217
217
  "text-copy-dark dark:text-copy-medium": o === "system",
218
218
  "text-copy-medium dark:text-copy-dark": o === "alt-system"
219
219
  });
220
220
  if (e)
221
- return g(q, "absolute px-2 font-medium", {
221
+ return g(Y, "absolute px-2 font-medium", {
222
222
  "text-copy-error-light": o === "dark",
223
223
  "text-copy-error-dark": o === "light",
224
224
  "text-copy-error-dark dark:text-copy-error-light": o === "system",
@@ -313,7 +313,7 @@ const Nr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
313
313
  spacing: N,
314
314
  ...D
315
315
  }, m) => {
316
- const A = x(null), Ee = ze([m, A]), z = x(null), G = x(80), oe = x(-25), _ = x(null), se = x(30), j = x(null), H = $e({ id: e, prefix: `${fe}-` }), [Oe, Se] = I(0), [we, ae] = I(
316
+ const A = x(null), Ee = $e([m, A]), $ = x(null), G = x(80), oe = x(-25), _ = x(null), se = x(30), j = x(null), H = ze({ id: e, prefix: `${fe}-` }), [Oe, Se] = I(0), [we, ae] = I(
317
317
  !!(!w && d)
318
318
  ), Le = `${r} error, ${d}`, R = Lr({
319
319
  className: a,
@@ -342,11 +342,11 @@ const Nr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
342
342
  }, _e = (k) => {
343
343
  w && d && !O && ae(!1), L && L(k);
344
344
  };
345
- return $(() => {
346
- !s && T && z.current && z.current.offsetWidth > 0 && Se(z.current.offsetWidth + 18 + 10);
347
- }, [T, s]), $(() => {
345
+ return z(() => {
346
+ !s && T && $.current && $.current.offsetWidth > 0 && Se($.current.offsetWidth + 18 + 10);
347
+ }, [T, s]), z(() => {
348
348
  s || A && A.current && O !== void 0 && (A.current.style.height = "inherit", A.current.style.height = A.current.scrollHeight + "px");
349
- }, [O, s]), $(() => {
349
+ }, [O, s]), z(() => {
350
350
  s || setTimeout(() => {
351
351
  var k;
352
352
  (k = _ == null ? void 0 : _.current) == null || k.style.setProperty(
@@ -354,21 +354,21 @@ const Nr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
354
354
  O ? "none" : "all 0.2s ease-out"
355
355
  );
356
356
  }, 0);
357
- }, [O, s]), $(() => {
357
+ }, [O, s]), z(() => {
358
358
  var k, ne;
359
359
  if (!s && A && A.current && O !== void 0) {
360
- const { labelOffset: W, helperTextOffset: Y, scrollHeight: He } = Rr({
360
+ const { labelOffset: q, helperTextOffset: W, scrollHeight: He } = Rr({
361
361
  scrollHeight: A.current.scrollHeight,
362
362
  currentHeight: G.current,
363
363
  currentLabelOffset: oe.current,
364
364
  currentHelperTextOffset: se.current
365
365
  });
366
- W && (oe.current = W, (k = _ == null ? void 0 : _.current) == null || k.style.setProperty(
366
+ q && (oe.current = q, (k = _ == null ? void 0 : _.current) == null || k.style.setProperty(
367
367
  "--av-text-area-label",
368
- `${W}px`
369
- )), Y && (se.current = Y, (ne = j == null ? void 0 : j.current) == null || ne.style.setProperty(
368
+ `${q}px`
369
+ )), W && (se.current = W, (ne = j == null ? void 0 : j.current) == null || ne.style.setProperty(
370
370
  "--av-text-area-helper-text",
371
- `${Y}px`
371
+ `${W}px`
372
372
  )), G.current = He || G.current;
373
373
  }
374
374
  }, [O, s]), /* @__PURE__ */ E("div", { className: R.wrapper, children: [
@@ -423,7 +423,7 @@ const Nr = () => "rounded-md text-base h-20 min-h-[80px] resize-none overflow-hi
423
423
  T && /* @__PURE__ */ n(
424
424
  "div",
425
425
  {
426
- ref: z,
426
+ ref: $,
427
427
  className: R.rightElement,
428
428
  children: T
429
429
  }
@@ -472,10 +472,10 @@ const Br = () => {
472
472
  onClick: a,
473
473
  mode: "dark",
474
474
  focusMode: "light",
475
- children: r != null && r.streaming ? je : We
475
+ children: r != null && r.streaming ? je : qe
476
476
  }
477
477
  ) }) : null;
478
- }, me = mr(() => import("./LazyMessageAssistant.CP6NuHPb.js").then((e) => e.LazyMessageAssistant)), Vr = () => {
478
+ }, me = mr(() => import("./LazyMessageAssistant.C7EB2M7r.js").then((e) => e.LazyMessageAssistant)), Vr = () => {
479
479
  const { state: e } = re(P);
480
480
  return /* @__PURE__ */ E(ye, { children: [
481
481
  e && e.messages.length > 0 && e.messages.map((r, o) => {
@@ -529,7 +529,7 @@ const Br = () => {
529
529
  return;
530
530
  }
531
531
  const i = e.messages[e.messages.length - 1];
532
- if (!(e.messages.length === 0 || i.message.role === M || i.message.role === Ye || i.message.role === Z || i.message.role === qe))
532
+ if (!(e.messages.length === 0 || i.message.role === M || i.message.role === We || i.message.role === Z || i.message.role === Ye))
533
533
  try {
534
534
  const b = await ir({
535
535
  accessToken: await s(),
@@ -636,7 +636,7 @@ const Br = () => {
636
636
  )
637
637
  }
638
638
  ) });
639
- }, zr = () => {
639
+ }, $r = () => {
640
640
  const { isAuthenticated: e } = ee(), r = Ke(e);
641
641
  return /* @__PURE__ */ E(ye, { children: [
642
642
  /* @__PURE__ */ E("div", { className: r, children: [
@@ -646,7 +646,7 @@ const Br = () => {
646
646
  /* @__PURE__ */ n(Br, {}),
647
647
  /* @__PURE__ */ n(Dr, {})
648
648
  ] });
649
- }, $r = (e, r) => (r == null ? void 0 : r.type) === er ? {
649
+ }, zr = (e, r) => (r == null ? void 0 : r.type) === er ? {
650
650
  searchString: r.payload.searchString,
651
651
  sortedCell: e.sortedCell,
652
652
  sortDirection: e.sortDirection
@@ -763,7 +763,7 @@ function Ae({ isComponent: e = !1 }) {
763
763
  usage: 0,
764
764
  messages: [],
765
765
  isComponent: e
766
- }), [b, v] = ue($r, {
766
+ }), [b, v] = ue(zr, {
767
767
  searchString: l,
768
768
  sortedCell: "timestamp",
769
769
  sortDirection: h
@@ -852,15 +852,15 @@ function Ae({ isComponent: e = !1 }) {
852
852
  dispatch: v
853
853
  },
854
854
  children: [
855
- /* @__PURE__ */ n(sr, { children: /* @__PURE__ */ n(zr, {}) }),
855
+ /* @__PURE__ */ n(sr, { children: /* @__PURE__ */ n($r, {}) }),
856
856
  /* @__PURE__ */ n(ar, { serverStats: d })
857
857
  ]
858
858
  }
859
859
  ) });
860
860
  }
861
861
  Ae.displayName = "App";
862
- const Yr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Ae }, Symbol.toStringTag, { value: "Module" }));
862
+ const Wr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Ae }, Symbol.toStringTag, { value: "Module" }));
863
863
  export {
864
- Yr as App,
864
+ Wr as App,
865
865
  Tr as T
866
866
  };