@versini/sassysaint 8.75.5 → 8.76.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.
Files changed (34) hide show
  1. package/dist/chunks/{AboutChangelog.74dx3has.js → AboutChangelog.Bi_-dpeZ.js} +10 -9
  2. package/dist/chunks/{AboutEntry.B9IooHpy.js → AboutEntry.CTwezLPC.js} +11 -11
  3. package/dist/chunks/App.CV0Bjlae.js +9011 -0
  4. package/dist/chunks/{Chart.D1WQEJfe.js → Chart.uzxgAiX2.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.TGE3iwln.js → ChatBubbleAssistant.BVlp2GoO.js} +8 -8
  6. package/dist/chunks/ChatBubbleUser.BrWZttfQ.js +130 -0
  7. package/dist/chunks/ChatHistoryTable.uFTyBF2A.js +236 -0
  8. package/dist/chunks/HistoryEntry.ThaD-b5r.js +307 -0
  9. package/dist/chunks/{ProfileEntry.DiMarPYw.js → ProfileEntry.CyBWFkHS.js} +26 -26
  10. package/dist/chunks/{SettingsEntry.7sE9nOGN.js → SettingsEntry.QaYvHkdk.js} +39 -39
  11. package/dist/chunks/Table.Ckql2SnG.js +359 -0
  12. package/dist/chunks/{UsageEntry.CiY4OQtp.js → UsageEntry.CDzDYeHf.js} +19 -19
  13. package/dist/chunks/{UserMemoriesPanel.UDXZvvrL.js → UserMemoriesPanel.B6egCowo.js} +184 -210
  14. package/dist/chunks/{index.CiIBuo5O.js → index.A4p6x5_T.js} +1 -1
  15. package/dist/chunks/index.BXdpJpQs.js +266 -0
  16. package/dist/chunks/{index.C0asS70q.js → index.BdPmgM6G.js} +1 -1
  17. package/dist/chunks/index.C3aZ0rB_.js +142 -0
  18. package/dist/chunks/{index.D4tD4ovC.js → index.C4Rma01G.js} +3 -3
  19. package/dist/chunks/{index.p-Jh4Heo.js → index.C6T0AZQ_.js} +2 -2
  20. package/dist/chunks/{index.Bl8BpeHP.js → index.CgUGA3LA.js} +1 -1
  21. package/dist/chunks/index.rzw7MU5J.js +7894 -0
  22. package/dist/chunks/{useMarkdown.Cno1hTiv.js → useMarkdown.B4NWSGJz.js} +2004 -2130
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +2 -2
  26. package/package.json +5 -5
  27. package/dist/chunks/App.BmFE7_v_.js +0 -10006
  28. package/dist/chunks/ChatBubbleUser.DjSazwPr.js +0 -128
  29. package/dist/chunks/ChatHistoryTable.DKVkQOL_.js +0 -288
  30. package/dist/chunks/HistoryEntry.D-clB2ui.js +0 -333
  31. package/dist/chunks/Table.--YCSSgh.js +0 -456
  32. package/dist/chunks/index.-hzHawd8.js +0 -7203
  33. package/dist/chunks/index.BHHgvfWz.js +0 -357
  34. package/dist/chunks/index.WAJtnhmS.js +0 -249
@@ -1,7 +1,7 @@
1
1
  import { jsx as Ap } from "react/jsx-runtime";
2
- import { getDefaultExportFromCjs as ln } from "./App.BmFE7_v_.js";
2
+ import { getDefaultExportFromCjs as ln } from "./App.CV0Bjlae.js";
3
3
  import Cp, { useState as Pp, useEffect as Op } from "react";
4
- import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.-hzHawd8.js";
4
+ import { TRIMESTERS as rn, TRIMESTERS_SHORT as Lp, isProbablyMobile as Ep } from "./index.rzw7MU5J.js";
5
5
  var ls = { exports: {} }, Ip = ls.exports, on;
6
6
  function Dp() {
7
7
  return on || (on = 1, (function(we, he) {
@@ -1,19 +1,19 @@
1
1
  import { jsx as g } from "react/jsx-runtime";
2
- import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.-hzHawd8.js";
3
- import { BUBBLE_FOOTER_EMPTY as B } from "./index.WAJtnhmS.js";
2
+ import { n as P, useUserPreferences as R, convertCamelCaseToReadable as y, numberFormatter as L, pluralize as _, J as v } from "./index.rzw7MU5J.js";
3
+ import { BUBBLE_FOOTER_EMPTY as B } from "./index.C3aZ0rB_.js";
4
4
  import U from "clsx";
5
5
  import G, { useState as M, useRef as E, useEffect as F, useContext as S } from "react";
6
- import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.BmFE7_v_.js";
7
- import { useMarkdown as q } from "./useMarkdown.Cno1hTiv.js";
8
- const I = 2, W = I * 1e3, b = "", $ = (e) => e * (2 - e);
9
- function V(e, n = !0) {
6
+ import { ChatContext as D, AppContext as j, AsyncBubble as k } from "./App.CV0Bjlae.js";
7
+ import { useMarkdown as q } from "./useMarkdown.B4NWSGJz.js";
8
+ const I = 2, W = I * 1e3, b = "", V = (e) => e * (2 - e);
9
+ function Y(e, n = !0) {
10
10
  const [a, d] = M(0), [c, p] = M(0), [t, C] = M(e), r = E(0), s = E(0);
11
11
  return t !== e && (C(e), p(e.startsWith(t) ? a : 0)), F(() => {
12
12
  if (!n)
13
13
  return;
14
14
  const T = e.split(b).length, i = (o) => {
15
15
  s.current || (s.current = o);
16
- const u = o - s.current, l = Math.min(u / W, 1), h = $(l), x = c + (T - c) * h;
16
+ const u = o - s.current, l = Math.min(u / W, 1), h = V(l), x = c + (T - c) * h;
17
17
  d(Math.floor(x)), l < 1 && (r.current = requestAnimationFrame(i));
18
18
  };
19
19
  return s.current = 0, r.current = requestAnimationFrame(i), () => {
@@ -34,7 +34,7 @@ const f = {
34
34
  smooth: c = !1,
35
35
  isLastAssistantMessage: p = !1
36
36
  }) => {
37
- const t = V(e, c), {
37
+ const t = Y(e, c), {
38
38
  state: { streaming: C, restoredModel: r, tokenUsage: s }
39
39
  } = S(D), {
40
40
  state: { fullScreen: T }
@@ -0,0 +1,130 @@
1
+ import { jsx as a, Fragment as S, jsxs as h } from "react/jsx-runtime";
2
+ import { Button as C } from "./index.rzw7MU5J.js";
3
+ import { useState as _, useMemo as m, isValidElement as T, useEffect as b } from "react";
4
+ import { AsyncBubble as w } from "./App.CV0Bjlae.js";
5
+ import { useMarkdown as x } from "./useMarkdown.B4NWSGJz.js";
6
+ /*!
7
+ @versini/ui-truncate v5.2.0
8
+ © 2025 gizmette.com
9
+ */
10
+ try {
11
+ window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
12
+ version: "5.2.0",
13
+ buildTime: "11/04/2025 03:45 PM EST",
14
+ homepage: "https://github.com/aversini/ui-components",
15
+ license: "MIT"
16
+ });
17
+ } catch {
18
+ }
19
+ const M = 200, k = ({ string: e, idealLength: r = M }) => {
20
+ if (e.length <= r)
21
+ return {
22
+ string: e,
23
+ isTruncated: !1
24
+ };
25
+ if (e.charAt(r) === " ")
26
+ return {
27
+ string: e.slice(0, r),
28
+ isTruncated: !0
29
+ };
30
+ const s = e.slice(r).search(" ");
31
+ return {
32
+ string: e.slice(0, r + s),
33
+ isTruncated: !0
34
+ };
35
+ }, l = (e) => e == null || typeof e == "boolean" ? "" : typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(l).join("") : /* @__PURE__ */ T(e) ? l(e.props.children) : "", B = /* @__PURE__ */ new Set([
36
+ "P",
37
+ "DIV",
38
+ "UL",
39
+ "OL",
40
+ "LI",
41
+ "SECTION",
42
+ "ARTICLE",
43
+ "HEADER",
44
+ "FOOTER",
45
+ "MAIN",
46
+ "ASIDE",
47
+ "TABLE",
48
+ "THEAD",
49
+ "TBODY",
50
+ "TFOOT",
51
+ "TR",
52
+ "TD",
53
+ "TH",
54
+ "BLOCKQUOTE",
55
+ "PRE",
56
+ "H1",
57
+ "H2",
58
+ "H3",
59
+ "H4",
60
+ "H5",
61
+ "H6"
62
+ ]), u = (e) => {
63
+ if (e == null || typeof e == "boolean" || typeof e == "string" || typeof e == "number")
64
+ return !1;
65
+ if (Array.isArray(e))
66
+ return e.some(u);
67
+ if (/* @__PURE__ */ T(e)) {
68
+ const r = e;
69
+ return typeof r.type == "string" && B.has(r.type.toUpperCase()) ? !0 : u(r.props.children);
70
+ }
71
+ return !1;
72
+ }, H = ({ children: e, length: r = 200, mode: n = "system", focusMode: c = "system", enableRichTruncation: s = !1 }) => {
73
+ const [t, y] = _(!1), d = typeof e != "string" && !s, p = m(() => typeof e == "string" ? e : l(e), [
74
+ e
75
+ ]), { string: f, isTruncated: i } = m(() => k({
76
+ string: p,
77
+ idealLength: r
78
+ }), [
79
+ p,
80
+ r
81
+ ]), g = s && i && !t, E = (I) => {
82
+ I.preventDefault(), y(!t);
83
+ };
84
+ if (d)
85
+ return /* @__PURE__ */ a(S, {
86
+ children: e
87
+ });
88
+ let o;
89
+ i ? t ? o = e : o = f : o = e;
90
+ const A = s ? u(e) : !1;
91
+ return /* @__PURE__ */ h("span", {
92
+ style: {
93
+ wordBreak: "break-word"
94
+ },
95
+ "data-testid": "truncate-root",
96
+ "aria-expanded": i ? t : void 0,
97
+ children: [
98
+ o,
99
+ i && /* @__PURE__ */ a(C, {
100
+ mode: n,
101
+ focusMode: c,
102
+ className: !(s && t && A) ? "ml-2" : void 0,
103
+ size: "small",
104
+ onClick: E,
105
+ "aria-label": t ? "Show less" : "Show more",
106
+ children: t ? "less..." : "more..."
107
+ })
108
+ ]
109
+ });
110
+ }, F = ({ content: e }) => {
111
+ const [r, n] = x();
112
+ return b(() => {
113
+ e && n(e);
114
+ }, [e, n]), /* @__PURE__ */ a(
115
+ w,
116
+ {
117
+ tail: !0,
118
+ copyToClipboardMode: "dark",
119
+ copyToClipboardFocusMode: "light",
120
+ copyToClipboard: e,
121
+ kind: "right",
122
+ className: "mt-3",
123
+ contentClassName: "prose prose-lighter prose-p:only:my-0",
124
+ children: /* @__PURE__ */ a(H, { mode: "light", focusMode: "light", enableRichTruncation: !0, children: r })
125
+ }
126
+ );
127
+ };
128
+ export {
129
+ F as default
130
+ };
@@ -0,0 +1,236 @@
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { f as p, h as u, INFINITE_SCROLL_THRESHOLD as v, CARDS as k, pluralize as w, ButtonIcon as h, IconRestore as b, IconStarInCircle as D, IconStarInCircleLight as y, IconDelete as U, numberFormatter as z, k as P, IconGoogleGemini as L, IconOpenAI as _, IconAnthropic as G, isProbablyMobile as B, z as W, Z as Y, E as F } from "./index.rzw7MU5J.js";
3
+ import { Tooltip as x } from "./App.CV0Bjlae.js";
4
+ import c from "clsx";
5
+ import { Fragment as K } from "react";
6
+ import { W as H, j as V, G as i, H as $, M as n, D as j, F as R } from "./Table.Ckql2SnG.js";
7
+ const Z = {
8
+ [F]: G,
9
+ [Y]: _,
10
+ [W]: L
11
+ }, r = {
12
+ ROW: "row",
13
+ TIMESTAMP: p,
14
+ SUMMARY: "summary",
15
+ PROVIDER: "provider",
16
+ TOKEN_USAGE: u,
17
+ ACTIONS: "actions"
18
+ }, q = [
19
+ r.ROW,
20
+ r.TIMESTAMP,
21
+ r.SUMMARY,
22
+ r.ACTIONS
23
+ ], J = [
24
+ r.ROW,
25
+ r.SUMMARY,
26
+ r.TIMESTAMP,
27
+ r.TOKEN_USAGE,
28
+ r.PROVIDER,
29
+ r.ACTIONS
30
+ ], ae = ({
31
+ filteredHistory: o,
32
+ historyState: l,
33
+ lastEntryToLoad: g,
34
+ onClickSort: C,
35
+ onClickRestore: S,
36
+ onClickDelete: O,
37
+ onClickFavorite: T,
38
+ infinityScrollMarkerRef: f,
39
+ isLoading: A = !1
40
+ }) => {
41
+ const M = B() ? q : J, I = (t) => {
42
+ switch (t) {
43
+ case r.ROW:
44
+ return /* @__PURE__ */ e(n, { className: "sr-only", children: "Row" }, t);
45
+ case r.TIMESTAMP:
46
+ return /* @__PURE__ */ e(
47
+ R,
48
+ {
49
+ focusMode: "system",
50
+ buttonClassName: "text-xs sm:text-sm",
51
+ cellId: p,
52
+ align: "left",
53
+ sortDirection: l.sortDirection,
54
+ sortedCell: l.sortedCell,
55
+ onClick: () => {
56
+ C(p);
57
+ },
58
+ children: "Date"
59
+ },
60
+ t
61
+ );
62
+ case r.SUMMARY:
63
+ return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Summary" }, t);
64
+ case r.PROVIDER:
65
+ return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm", children: "Provider" }, t);
66
+ case r.TOKEN_USAGE:
67
+ return /* @__PURE__ */ e(
68
+ R,
69
+ {
70
+ focusMode: "system",
71
+ buttonClassName: "text-xs sm:text-sm",
72
+ cellId: u,
73
+ align: "right",
74
+ sortDirection: l.sortDirection,
75
+ sortedCell: l.sortedCell,
76
+ onClick: () => {
77
+ C(u);
78
+ },
79
+ children: "Tokens"
80
+ },
81
+ t
82
+ );
83
+ case r.ACTIONS:
84
+ return /* @__PURE__ */ e(n, { className: "text-xs sm:text-sm text-right", children: "Actions" }, t);
85
+ default:
86
+ return null;
87
+ }
88
+ }, E = (t, s, m) => {
89
+ switch (t) {
90
+ case r.ROW:
91
+ return /* @__PURE__ */ e(n, { children: m + 1 }, t);
92
+ case r.TIMESTAMP:
93
+ return /* @__PURE__ */ e(
94
+ n,
95
+ {
96
+ component: "th",
97
+ scope: "row",
98
+ className: c(
99
+ "dark:text-gray-400",
100
+ "sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
101
+ ),
102
+ children: s.timestamp.split(",")[0]
103
+ },
104
+ t
105
+ );
106
+ case r.SUMMARY: {
107
+ const a = s.summary || (s.messages.length > 0 ? s.messages[0]?.content : "");
108
+ return /* @__PURE__ */ e(
109
+ n,
110
+ {
111
+ className: c(
112
+ "dark:text-white",
113
+ "max-w-[100px] sm:max-w-full text-xs sm:text-sm"
114
+ ),
115
+ style: {
116
+ wordBreak: "break-word"
117
+ },
118
+ children: a
119
+ },
120
+ t
121
+ );
122
+ }
123
+ case r.PROVIDER: {
124
+ const a = s.model ? P(s.model) : null, N = a ? Z[a] : null;
125
+ return /* @__PURE__ */ e(
126
+ n,
127
+ {
128
+ component: "th",
129
+ scope: "row",
130
+ className: c("dark:text-gray-400"),
131
+ align: "center",
132
+ children: N ? /* @__PURE__ */ e(
133
+ N,
134
+ {
135
+ size: "size-4 sm:size-5",
136
+ semantic: !0,
137
+ title: s.model || a
138
+ }
139
+ ) : null
140
+ },
141
+ t
142
+ );
143
+ }
144
+ case r.TOKEN_USAGE:
145
+ return /* @__PURE__ */ e(
146
+ n,
147
+ {
148
+ className: c("dark:text-gray-400", "text-xs sm:text-sm"),
149
+ align: "right",
150
+ children: s.tokenUsage ? z.format(s.tokenUsage) : "0"
151
+ },
152
+ t
153
+ );
154
+ case r.ACTIONS:
155
+ return /* @__PURE__ */ e(n, { children: /* @__PURE__ */ d("div", { className: "flex flex-col items-end sm:flex-row gap-2", children: [
156
+ /* @__PURE__ */ e(
157
+ x,
158
+ {
159
+ label: "Restore chat",
160
+ placement: "top",
161
+ trigger: /* @__PURE__ */ e(
162
+ h,
163
+ {
164
+ noBorder: !0,
165
+ label: "Restore chat",
166
+ variant: "primary",
167
+ iconClassName: "text-green-800 dark:text-green-500",
168
+ onClick: async () => {
169
+ await S(s);
170
+ },
171
+ children: /* @__PURE__ */ e(b, { size: "size-3", monotone: !0 })
172
+ }
173
+ )
174
+ }
175
+ ),
176
+ /* @__PURE__ */ e(
177
+ x,
178
+ {
179
+ label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
180
+ placement: "top",
181
+ trigger: /* @__PURE__ */ e(
182
+ h,
183
+ {
184
+ noBorder: !0,
185
+ label: s.favoriteChat ? "Remove from favorites" : "Add to favorites",
186
+ variant: "primary",
187
+ onClick: async () => {
188
+ await T(s);
189
+ },
190
+ children: s.favoriteChat ? /* @__PURE__ */ e(D, { size: "size-4", monotone: !0 }) : /* @__PURE__ */ e(y, { size: "size-4", monotone: !0 })
191
+ }
192
+ )
193
+ }
194
+ ),
195
+ /* @__PURE__ */ e(
196
+ x,
197
+ {
198
+ label: "Delete chat",
199
+ placement: "top",
200
+ trigger: /* @__PURE__ */ e(
201
+ h,
202
+ {
203
+ noBorder: !0,
204
+ label: "Delete chat",
205
+ variant: "primary",
206
+ iconClassName: "text-red-700 dark:text-red-500",
207
+ onClick: () => {
208
+ O(s);
209
+ },
210
+ children: /* @__PURE__ */ e(U, { size: "size-3", monotone: !0 })
211
+ }
212
+ )
213
+ }
214
+ )
215
+ ] }) }, t);
216
+ default:
217
+ return null;
218
+ }
219
+ };
220
+ return /* @__PURE__ */ d(H, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
221
+ /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(i, { children: M.map((t) => I(t)) }) }),
222
+ /* @__PURE__ */ e($, { children: A && o.length === 0 ? /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: "Loading..." }) }) }) : o.slice(0, g).map((t, s) => t?.messages?.length > 0 ? /* @__PURE__ */ d(K, { children: [
223
+ s === g - v && /* @__PURE__ */ e("tr", { ref: f }),
224
+ /* @__PURE__ */ e(i, { children: M.map(
225
+ (m) => E(m, t, s)
226
+ ) })
227
+ ] }, `${k.HISTORY.TITLE}-${t.id}-${s}`) : null) }),
228
+ /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(n, { colSpan: 1e3, children: /* @__PURE__ */ e("div", { children: w(
229
+ `${o.length} chat`,
230
+ o.length
231
+ ) }) }) }) })
232
+ ] });
233
+ };
234
+ export {
235
+ ae as ChatHistoryTable
236
+ };