@versini/sassysaint 8.76.1 → 8.78.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.
Files changed (27) hide show
  1. package/dist/chunks/{AboutChangelog.Bi_-dpeZ.js → AboutChangelog.Oqc6JIA-.js} +3 -3
  2. package/dist/chunks/{AboutEntry.CTwezLPC.js → AboutEntry.SvwVjpEz.js} +5 -5
  3. package/dist/chunks/{App.CV0Bjlae.js → App.DXGdoHmW.js} +145 -145
  4. package/dist/chunks/{Chart.uzxgAiX2.js → Chart.BTyaVE_V.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.BVlp2GoO.js → ChatBubbleAssistant.lqDPohS8.js} +23 -21
  6. package/dist/chunks/{ChatBubbleUser.BrWZttfQ.js → ChatBubbleUser.DVCYqFLp.js} +29 -28
  7. package/dist/chunks/{ChatHistoryTable.uFTyBF2A.js → ChatHistoryTable.CCUGl-Jy.js} +91 -90
  8. package/dist/chunks/HistoryEntry.Ct2lOREI.js +316 -0
  9. package/dist/chunks/{ProfileEntry.CyBWFkHS.js → ProfileEntry.wLJ4_8-_.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.QaYvHkdk.js → SettingsEntry.DoWBoOUU.js} +3 -3
  11. package/dist/chunks/{Table.Ckql2SnG.js → Table.CcIpdr5t.js} +2 -2
  12. package/dist/chunks/{UsageEntry.CDzDYeHf.js → UsageEntry.CQv5nedN.js} +3 -3
  13. package/dist/chunks/{UserMemoriesPanel.B6egCowo.js → UserMemoriesPanel.4oKdwzjk.js} +4 -4
  14. package/dist/chunks/{index.BXdpJpQs.js → index.BkbSbOap.js} +1 -1
  15. package/dist/chunks/{index.C6T0AZQ_.js → index.BqQTG3xS.js} +2 -2
  16. package/dist/chunks/{index.A4p6x5_T.js → index.C8_q0yRq.js} +1 -1
  17. package/dist/chunks/{index.BdPmgM6G.js → index.CEhhP2GE.js} +1 -1
  18. package/dist/chunks/index.DCl9t_FZ.js +153 -0
  19. package/dist/chunks/{index.CgUGA3LA.js → index.GHQv1Sm2.js} +1 -1
  20. package/dist/chunks/{index.rzw7MU5J.js → index.RtpWGHE1.js} +1 -1
  21. package/dist/chunks/{index.C4Rma01G.js → index.ineuZm_t.js} +3 -3
  22. package/dist/chunks/{useMarkdown.B4NWSGJz.js → useMarkdown.a9gbIvtd.js} +1733 -1374
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/package.json +4 -4
  26. package/dist/chunks/HistoryEntry.ThaD-b5r.js +0 -307
  27. package/dist/chunks/index.C3aZ0rB_.js +0 -142
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { SassySaint as a } from "../../chunks/index.rzw7MU5J.js";
2
+ import { SassySaint as a } from "../../chunks/index.RtpWGHE1.js";
3
3
  export {
4
4
  a as SassySaint
5
5
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { SassySaint as r } from "./chunks/index.rzw7MU5J.js";
1
+ import { SassySaint as r } from "./chunks/index.RtpWGHE1.js";
2
2
  /*!
3
- @sassysaint/client v8.76.1
3
+ @sassysaint/client v8.78.0
4
4
  © 2025 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
8
- version: "8.76.1",
9
- buildTime: "11/04/2025 05:29 PM EST",
8
+ version: "8.78.0",
9
+ buildTime: "11/08/2025 02:49 PM EST",
10
10
  license: "MIT"
11
11
  });
12
12
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint",
3
- "version": "8.76.1",
3
+ "version": "8.78.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -33,9 +33,9 @@
33
33
  "react-dom": "^18.3.1 || ^19.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "@sassysaint/client": "8.76.1",
36
+ "@sassysaint/client": "8.78.0",
37
37
  "@tailwindcss/vite": "4.1.16",
38
- "@versini/ui-styles": "6.1.0"
38
+ "@versini/ui-styles": "6.1.1"
39
39
  },
40
40
  "dependencies": {
41
41
  "@versini/ui-hooks": "5.2.0",
@@ -45,5 +45,5 @@
45
45
  "sideEffects": [
46
46
  "**/*.css"
47
47
  ],
48
- "gitHead": "da8c24c2a566cc0d979f97845880d299a98f51b9"
48
+ "gitHead": "671e38e1e7342458e5cf96a1fb48d6325828fd41"
49
49
  }
@@ -1,307 +0,0 @@
1
- import { jsxs as i, Fragment as ee, jsx as r } from "react/jsx-runtime";
2
- import { n as G, INFINITE_SCROLL_LIMIT as P, INFINITE_SCROLL_THRESHOLD as te, useLocalStorage as f, LOCAL_STORAGE_PREFIX as p, LOCAL_STORAGE_SORT_TIMESTAMP as re, LOCAL_STORAGE_SORT_TOKEN_USAGE as ae, LOCAL_STORAGE_SORT as se, f as v, useUserPreferences as oe, useDeleteChat as ne, useToggleFavoriteChat as ie, APP_CLASSNAME as ce, TOAST_CHAT_DELETED as le, graphQLRequest as de, SERVICE_TYPES as he, setNewProvider as me, ACTION_SORT as ue, h as Ce, TOAST_PROVIDER_CHANGED as Se, useChatsHistory as fe, LOCAL_STORAGE_SEARCH as pe, LOCAL_STORAGE_FAVORITES_ONLY as Te, HISTORY_TITLE as ye, Card as ge, TextInput as Ae, debounce as Ee, IconSearch as ve, Button as _e, ACTION_SEARCH as De } from "./index.rzw7MU5J.js";
3
- import { HistoryContext as z, ChatContext as M, useAiChat as Oe, e as h, ConfirmationPanel as Re, LazyToastContainerWrapper as Ie, showErrorToast as Le, CHAT_SET_PROVIDER as ke, showSuccessToast as be, CHAT_SET_STATUS as Ne, Panel as we, Toggle as xe } from "./App.CV0Bjlae.js";
4
- import { useRef as w, useState as x, useContext as _, useCallback as V, Suspense as He, lazy as Fe, useEffect as Pe } from "react";
5
- const Ve = Fe(
6
- () => import(
7
- /* webpackChunkName: "history-table" */
8
- "./ChatHistoryTable.uFTyBF2A.js"
9
- ).then((m) => ({ default: m.ChatHistoryTable }))
10
- ), Ge = ({
11
- filteredHistory: m,
12
- dispatch: C,
13
- onOpenChange: D,
14
- mutate: T,
15
- isLoading: O = !1
16
- }) => {
17
- const { user: u, getAccessToken: l } = G(), c = w(null), s = w({
18
- id: "",
19
- timestamp: "",
20
- message: ""
21
- }), [y, d] = x(!1), [R, I] = x(
22
- P + te
23
- ), { state: n, dispatch: L } = _(z), S = {
24
- searchString: n.searchString || "",
25
- sortDirection: n.sortDirection || h.DESC,
26
- sortedCell: n.sortedCell || v
27
- }, {
28
- state: { provider: k },
29
- setChatId: g,
30
- setInitialMessages: b
31
- } = _(M), { setInput: N } = Oe(), [A, a] = f({
32
- key: p + re,
33
- initialValue: h.DESC
34
- }), [U, B] = f({
35
- key: p + ae,
36
- initialValue: h.ASC
37
- }), [, j] = f({
38
- key: p + se,
39
- initialValue: v
40
- }), { refetch: Y } = oe({
41
- user: u?.username,
42
- getAccessToken: l
43
- }), { mutateAsync: $ } = ne({ getAccessToken: l }), { mutateAsync: q } = ie({
44
- getAccessToken: l
45
- }), K = (e) => {
46
- const o = n.sortedCell === e;
47
- let t, E;
48
- switch (e) {
49
- case v:
50
- E = a, t = o ? n.sortDirection : A;
51
- break;
52
- case Ce:
53
- E = B, t = o ? n.sortDirection : U;
54
- break;
55
- default:
56
- E = a, t = o ? n.sortDirection : A;
57
- break;
58
- }
59
- const F = t === h.ASC ? h.DESC : h.ASC;
60
- E(F), j(e), L({
61
- type: ue,
62
- payload: {
63
- sortedCell: e,
64
- sortDirection: F
65
- }
66
- });
67
- }, Q = async () => {
68
- const e = s.current;
69
- try {
70
- await $({
71
- userId: u?.username || "",
72
- id: e.id
73
- }), T(""), await Le(le, {
74
- autoClose: 2e3,
75
- containerId: "history-table"
76
- });
77
- } catch {
78
- }
79
- }, W = async (e) => {
80
- try {
81
- const o = await l(), t = await de({
82
- accessToken: o,
83
- type: he.GET_CHAT,
84
- params: {
85
- id: e.id
86
- }
87
- });
88
- t.data.provider !== k && (await me({
89
- provider: t.data.provider,
90
- model: t.data.model,
91
- accessToken: o,
92
- username: u?.username || ""
93
- }), C({
94
- type: ke,
95
- payload: {
96
- provider: t.data.provider
97
- }
98
- }), Y(), await be(
99
- `${Se} ${t.data.provider}`,
100
- {
101
- containerId: "toggle-provider"
102
- }
103
- )), C({
104
- type: Ne,
105
- payload: {
106
- restoring: !0,
107
- restoredModel: t.data?.model || "",
108
- restoredUsage: t.data?.tokenUsage || 0
109
- }
110
- }), N(""), g(e.id), b(t.data.messages), D(!1);
111
- } catch {
112
- }
113
- }, X = (e) => {
114
- s.current = {
115
- id: e.id,
116
- timestamp: e.timestamp,
117
- message: e.messages.length > 0 ? e.messages[0]?.content : ""
118
- }, d(!y);
119
- }, J = async (e) => {
120
- try {
121
- await q({
122
- userId: u?.username || "",
123
- id: e.id
124
- }), T("");
125
- } catch {
126
- }
127
- }, H = V((e) => {
128
- e[0].isIntersecting && I((t) => t + P);
129
- }, []), Z = V(
130
- (e) => {
131
- if (c.current && c.current.disconnect(), e) {
132
- const o = {
133
- rootMargin: "20px"
134
- }, t = new IntersectionObserver(H, o);
135
- t.observe(e), c.current = t;
136
- }
137
- },
138
- [H]
139
- );
140
- return /* @__PURE__ */ i(ee, { children: [
141
- /* @__PURE__ */ i(
142
- Re,
143
- {
144
- showConfirmation: y,
145
- setShowConfirmation: d,
146
- action: Q,
147
- customStrings: {
148
- confirmAction: "Delete",
149
- cancelAction: "Cancel",
150
- title: "Delete chat"
151
- },
152
- children: [
153
- /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
154
- /* @__PURE__ */ i("ul", { className: "m-0", children: [
155
- /* @__PURE__ */ i("li", { children: [
156
- "Timestamp:",
157
- " ",
158
- /* @__PURE__ */ r("span", { className: "text-lg", children: s.current && s.current.timestamp })
159
- ] }),
160
- /* @__PURE__ */ i("li", { children: [
161
- "First message:",
162
- " ",
163
- /* @__PURE__ */ r("span", { className: "text-lg", children: s.current?.message })
164
- ] })
165
- ] })
166
- ]
167
- }
168
- ),
169
- /* @__PURE__ */ r("div", { className: ce, children: /* @__PURE__ */ r(Ie, { containerId: "history-table" }) }),
170
- /* @__PURE__ */ r(He, { fallback: /* @__PURE__ */ r("div", {}), children: /* @__PURE__ */ r(
171
- Ve,
172
- {
173
- filteredHistory: m,
174
- historyState: S,
175
- lastEntryToLoad: R,
176
- onClickSort: K,
177
- onClickRestore: W,
178
- onClickDelete: X,
179
- onClickFavorite: J,
180
- infinityScrollMarkerRef: Z,
181
- isLoading: O
182
- }
183
- ) })
184
- ] });
185
- }, je = ({
186
- open: m,
187
- onOpenChange: C
188
- }) => {
189
- const { getAccessToken: D, user: T } = G(), { dispatch: O } = _(M), [u, l] = x([]), c = w(null), { state: s, dispatch: y } = _(z), {
190
- data: d,
191
- refetch: R,
192
- isLoading: I,
193
- isError: n
194
- } = fe({
195
- enabled: m,
196
- user: T?.username || "",
197
- searchString: s.searchString || "",
198
- sortDirection: s.sortDirection || h.DESC,
199
- sortedCell: s.sortedCell || v,
200
- getAccessToken: D
201
- }), [, L] = f({
202
- key: p + pe,
203
- initialValue: s.searchString
204
- }), [S, k] = f({
205
- key: p + Te,
206
- initialValue: !1
207
- });
208
- Pe(() => {
209
- d && l(
210
- S ? d.filter((a) => a.favoriteChat === !0) : d
211
- );
212
- }, [d, S]);
213
- const g = async (a) => {
214
- L(a), y({
215
- type: De,
216
- payload: { searchString: a }
217
- });
218
- }, b = Ee((a) => {
219
- g(a.target.value.trim());
220
- }, 500), N = async (a) => {
221
- a.preventDefault();
222
- }, A = (a) => {
223
- k(a);
224
- };
225
- return /* @__PURE__ */ i(
226
- we,
227
- {
228
- open: m,
229
- onOpenChange: C,
230
- title: ye,
231
- animation: !0,
232
- animationType: "fade",
233
- children: [
234
- /* @__PURE__ */ r(
235
- ge,
236
- {
237
- header: "Filters",
238
- className: "prose-dark dark:prose-lighter mb-4",
239
- noBorder: !0,
240
- compact: !0,
241
- children: /* @__PURE__ */ i("form", { autoComplete: "off", onSubmit: N, children: [
242
- /* @__PURE__ */ r(
243
- Ae,
244
- {
245
- placeholder: "Search",
246
- labelHidden: !0,
247
- noBorder: !0,
248
- autoCapitalize: "off",
249
- autoComplete: "off",
250
- autoCorrect: "off",
251
- ref: c,
252
- defaultValue: s.searchString,
253
- mode: "alt-system",
254
- name: "Search",
255
- label: "Search",
256
- onChange: b,
257
- className: "my-2",
258
- rightElement: /* @__PURE__ */ r("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ r(ve, { monotone: !0, size: "size-3" }) })
259
- }
260
- ),
261
- /* @__PURE__ */ i("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
262
- /* @__PURE__ */ r("div", { className: "order-1 sm:order-0", children: /* @__PURE__ */ r(
263
- xe,
264
- {
265
- name: "favorites-only",
266
- checked: S,
267
- onChange: A,
268
- label: "Show favorites only",
269
- narrow: !0,
270
- noBorder: !0
271
- }
272
- ) }),
273
- /* @__PURE__ */ r(
274
- _e,
275
- {
276
- size: "small",
277
- disabled: s.searchString === "",
278
- onClick: () => {
279
- g(""), c.current?.value && (c.current.value = "", c.current.focus());
280
- },
281
- children: "Reset Search"
282
- }
283
- )
284
- ] })
285
- ] })
286
- }
287
- ),
288
- /* @__PURE__ */ i("div", { className: "flex flex-col sm:flex-row max-h-[65vh] sm:max-h-[75vh] min-h-[60vh]", children: [
289
- n && /* @__PURE__ */ r("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
290
- !n && /* @__PURE__ */ r(
291
- Ge,
292
- {
293
- mutate: R,
294
- filteredHistory: u,
295
- dispatch: O,
296
- onOpenChange: C,
297
- isLoading: I
298
- }
299
- )
300
- ] })
301
- ]
302
- }
303
- );
304
- };
305
- export {
306
- je as HistoryPanel
307
- };
@@ -1,142 +0,0 @@
1
- import { jsxs as g, jsx as o } from "react/jsx-runtime";
2
- import { ButtonIcon as v, IconCopied as E, IconCopy as C } from "./index.rzw7MU5J.js";
3
- import { useState as I, useEffect as N } from "react";
4
- import l from "clsx";
5
- /*!
6
- @versini/ui-bubble v6.3.2
7
- © 2025 gizmette.com
8
- */
9
- try {
10
- window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
11
- version: "6.3.2",
12
- buildTime: "11/04/2025 03:45 PM EST",
13
- homepage: "https://github.com/aversini/ui-components",
14
- license: "MIT"
15
- });
16
- } catch {
17
- }
18
- const i = "av-bubble", $ = ({ kind: e, noMaxWidth: t }) => l("px-4 py-2", {
19
- "max-w-xs sm:max-w-md md:max-w-2xl": !t,
20
- "lg:max-w-3xl": e === "left" && !t
21
- }), T = ({ kind: e }) => l({
22
- "bg-surface-light dark:bg-surface-dark": e === "left",
23
- "bg-surface-accent": e === "right"
24
- }), S = ({ kind: e }) => l("prose prose-dark dark:prose-lighter", "prose-blockquote:my-1", "prose-ol:my-1 prose-ul:my-1", {
25
- "text-copy-lighter": e === "right"
26
- }), z = ({ kind: e, tail: t }) => {
27
- if (t)
28
- return l(`${i}-${e}-tail`, "rounded-3xl", "relative", "before:content-['']", "before:w-3", "before:h-2", "before:absolute", "before:bottom-0", {
29
- "last-bubble-right:before:right-[2px] last-bubble-right:before:border-l-[8px] last-bubble-right:before:border-l-surface-accent last-bubble-right:before:rounded-bl-[100%]": e === "right",
30
- "last-bubble-left:before:left-[2px] last-bubble-left:before:border-r-[8px] last-bubble-left:before:border-r-surface-light last-bubble-left:dark:before:border-r-surface-dark last-bubble-left:before:rounded-br-[100%]": e === "left"
31
- });
32
- if (!t)
33
- return l("rounded-b-xl", {
34
- "rounded-tr-xl": e === "left",
35
- "rounded-tl-xl": e === "right"
36
- });
37
- }, U = ({ kind: e, className: t, contentClassName: c, noMaxWidth: u, tail: r }) => {
38
- const n = l(i, `${i}-${e}`, "flex items-start", {
39
- "flex-row-reverse": e === "right"
40
- }, t), s = l(`${i}-content`, "flex flex-col empty:hidden", $({
41
- kind: e,
42
- noMaxWidth: u
43
- }), S({
44
- kind: e
45
- }), T({
46
- kind: e
47
- }), z({
48
- kind: e,
49
- tail: r
50
- }), c), m = "pr-2 pt-1 text-end text-xs text-copy-light", p = l("flex flex-col-reverse sm:flex-row", {
51
- "ml-2": e === "left" && !r,
52
- "mr-2": e === "right" && !r,
53
- "ml-1": e === "left" && r,
54
- "mr-1": e === "right" && r
55
- });
56
- return {
57
- wrapper: n,
58
- main: s,
59
- footer: m,
60
- copyButton: p
61
- };
62
- }, L = "FOOTER_EMPTY", P = ({ children: e, kind: t = "left", className: c, contentClassName: u, footer: r, rawFooter: n, copyToClipboard: s, copyToClipboardFocusMode: m = "system", copyToClipboardMode: p = "system", noMaxWidth: B = !1, tail: w = !1 }) => {
63
- const [a, x] = I(!1), f = U({
64
- kind: t,
65
- className: c,
66
- contentClassName: u,
67
- noMaxWidth: B,
68
- tail: w
69
- }), y = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), _ = () => {
70
- x(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
71
- };
72
- return N(() => {
73
- let b;
74
- return a && (b = window.setTimeout(() => {
75
- x(!1);
76
- }, 3e3)), () => {
77
- clearTimeout(b);
78
- };
79
- }, [
80
- a
81
- ]), /* @__PURE__ */ g("div", {
82
- className: f.wrapper,
83
- children: [
84
- /* @__PURE__ */ g("div", {
85
- children: [
86
- /* @__PURE__ */ o("div", {
87
- className: f.main,
88
- children: e
89
- }),
90
- r && Object.keys(r).map((b, h) => {
91
- const d = r[b];
92
- return d === L ? /* @__PURE__ */ o("div", {
93
- className: "prose-p:m-0",
94
- children: /* @__PURE__ */ o("p", {
95
- className: f.footer,
96
- "aria-hidden": "true",
97
- children: /* @__PURE__ */ o("span", {
98
- className: "invisible",
99
- children: " "
100
- })
101
- })
102
- }, `${b}-${h}`) : d ? /* @__PURE__ */ o("div", {
103
- className: "prose-p:m-0",
104
- children: /* @__PURE__ */ g("p", {
105
- className: f.footer,
106
- children: [
107
- b,
108
- ": ",
109
- d
110
- ]
111
- })
112
- }, `${b}-${h}`) : null;
113
- }),
114
- n && n
115
- ]
116
- }),
117
- y && /* @__PURE__ */ o("div", {
118
- className: f.copyButton,
119
- children: /* @__PURE__ */ o(v, {
120
- noBorder: !0,
121
- noBackground: !0,
122
- size: "small",
123
- mode: p,
124
- focusMode: m,
125
- label: a ? "Copied to clipboard" : "Copy to clipboard",
126
- onClick: _,
127
- disabled: a,
128
- children: a ? /* @__PURE__ */ o(E, {
129
- size: "size-3"
130
- }) : /* @__PURE__ */ o(C, {
131
- size: "size-3"
132
- })
133
- })
134
- })
135
- ]
136
- });
137
- };
138
- export {
139
- i as BUBBLE_CLASSNAME,
140
- L as BUBBLE_FOOTER_EMPTY,
141
- P as Bubble
142
- };