@versini/sassysaint 8.90.3 → 8.92.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 (29) hide show
  1. package/dist/chunks/{AboutChangelog.CPjLntlq.js → AboutChangelog.BOP3BSrk.js} +3 -3
  2. package/dist/chunks/AboutEntry.Bj8HUsU4.js +89 -0
  3. package/dist/chunks/{App.zkb8gvM3.js → App.DAQta2pJ.js} +638 -613
  4. package/dist/chunks/{Chart.DLxNkoZh.js → Chart.4eKSXUC7.js} +1133 -1143
  5. package/dist/chunks/ChatBubbleAssistant.CSgJfGV8.js +71 -0
  6. package/dist/chunks/{ChatBubbleUser.BVHUcko2.js → ChatBubbleUser.K3_2TN_h.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BupKfYV_.js → ChatHistoryTable.BngsfWch.js} +8 -8
  8. package/dist/chunks/{HistoryEntry.B0rPR2OE.js → HistoryEntry.BXEni06v.js} +38 -37
  9. package/dist/chunks/{ProfileEntry.NsztPEkp.js → ProfileEntry.B5H9_Q-0.js} +21 -20
  10. package/dist/chunks/{SettingsEntry.CDOPc6iD.js → SettingsEntry.D5cipDqa.js} +25 -24
  11. package/dist/chunks/UsageEntry.DPue9312.js +211 -0
  12. package/dist/chunks/{UserMemoriesPanel.4Bgcvr6X.js → UserMemoriesPanel.CwAnAj0p.js} +13 -12
  13. package/dist/chunks/{index.ChYRuj2g.js → index.BECvwaM5.js} +764 -736
  14. package/dist/chunks/{index.BAQ69A14.js → index.C5Rg3-rY.js} +1 -1
  15. package/dist/chunks/{index.BqwARS2K.js → index.C9N2vELq.js} +1 -1
  16. package/dist/chunks/{index.D12uAEYv.js → index.CGdw9MqW.js} +2 -2
  17. package/dist/chunks/{index.DIt56Ck2.js → index.CzSTlOsu.js} +3 -3
  18. package/dist/chunks/{index.Bg0DWoXf.js → index.Drx_3ie_.js} +1 -1
  19. package/dist/chunks/{index.DUcwF6lX.js → index.N6iGJtWi.js} +1 -1
  20. package/dist/chunks/{index.wC_fDv6h.js → index.NHQBZNrH.js} +1 -1
  21. package/dist/chunks/{index.BMVDRH6N.js → index.hL9trLAw.js} +1 -1
  22. package/dist/chunks/{useMarkdown.D-AXpwz2.js → useMarkdown.keqTeXmn.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/AboutEntry.D4NbCMmI.js +0 -69
  28. package/dist/chunks/ChatBubbleAssistant.CT-lt9VL.js +0 -82
  29. package/dist/chunks/UsageEntry.Bq3qWoi3.js +0 -152
@@ -0,0 +1,211 @@
1
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
2
+ import { n as j, useUniqueId as w, useUserChatStats as q, TIME_RANGES as r, useChatsUsage as W, USAGE_TITLE as J, Card as L, CARDS as i, L as I, j as E, TIME_RANGE_LABELS as D, MONTHS as N, ButtonIcon as Q, IconChart as X, Button as d, renderDataAsList as Z, pluralize as A } from "./index.BECvwaM5.js";
3
+ import { Panel as $, Menu as x, MenuGroupLabel as ee, MenuItem as P } from "./App.DAQta2pJ.js";
4
+ import { useState as u, Suspense as te, lazy as re } from "react";
5
+ const l = [0, 3, 6, 9], o = {
6
+ TOKEN: "token",
7
+ MODEL: "model"
8
+ }, ne = [
9
+ r.TODAY,
10
+ r.YESTERDAY,
11
+ r.CURRENT_YEAR,
12
+ r.LAST_YEAR
13
+ ], se = re(
14
+ () => import(
15
+ /* webpackChunkName: "chart-highcharts" */
16
+ "./Chart.4eKSXUC7.js"
17
+ )
18
+ ), ie = ({
19
+ open: U,
20
+ onOpenChange: M
21
+ }) => {
22
+ const { getAccessToken: _, user: p } = j(), Y = w(), { data: a, isSuccess: b } = q({
23
+ user: p?.username,
24
+ getAccessToken: _
25
+ }), O = Math.floor((/* @__PURE__ */ new Date()).getMonth() / 3) * 3, [S, C] = u(O), [T, R] = u(o.MODEL), [n, f] = u(
26
+ r.CURRENT_YEAR
27
+ ), [s, k] = u(null), [v, H] = u(
28
+ (/* @__PURE__ */ new Date()).getFullYear()
29
+ ), { data: h, isSuccess: z } = W({
30
+ user: p?.username,
31
+ getAccessToken: _,
32
+ timeRange: n,
33
+ month: n === r.SPECIFIC_MONTH && s !== null ? String(s) : void 0,
34
+ year: n === r.SPECIFIC_MONTH ? String(v) : void 0
35
+ }), B = n === r.CURRENT_YEAR || n === r.LAST_YEAR, F = (t) => {
36
+ t.preventDefault();
37
+ const g = (l.indexOf(S) + 1) % l.length;
38
+ C(l[g]);
39
+ }, G = (t) => {
40
+ t.preventDefault();
41
+ const g = (l.indexOf(S) - 1 + l.length) % l.length;
42
+ C(l[g]);
43
+ }, y = (t) => {
44
+ f(t), t !== r.SPECIFIC_MONTH && k(null), (t === r.CURRENT_YEAR || t === r.LAST_YEAR) && C(O);
45
+ }, K = (t) => {
46
+ k(t), H((/* @__PURE__ */ new Date()).getFullYear()), f(r.SPECIFIC_MONTH);
47
+ }, V = () => n === r.SPECIFIC_MONTH && s !== null ? N[s] : D[n];
48
+ return /* @__PURE__ */ c(
49
+ $,
50
+ {
51
+ open: U,
52
+ onOpenChange: M,
53
+ title: J,
54
+ animation: !0,
55
+ animationType: "fade",
56
+ blurEffect: "large",
57
+ footer: /* @__PURE__ */ e(
58
+ I,
59
+ {
60
+ columnGap: 2,
61
+ alignHorizontal: "flex-end",
62
+ className: "pb-8 sm:pb-0",
63
+ children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(
64
+ d,
65
+ {
66
+ mode: "dark",
67
+ variant: "secondary",
68
+ focusMode: "light",
69
+ noBorder: !0,
70
+ onClick: () => M(!1),
71
+ children: "Dismiss"
72
+ }
73
+ ) })
74
+ }
75
+ ),
76
+ children: [
77
+ /* @__PURE__ */ e(
78
+ L,
79
+ {
80
+ header: i.MAIN_STATISTICS.USAGE,
81
+ className: "prose-dark dark:prose-lighter mb-4 min-h-[555px]",
82
+ noBorder: !0,
83
+ children: z && h ? /* @__PURE__ */ c(te, { fallback: /* @__PURE__ */ e("div", {}), children: [
84
+ /* @__PURE__ */ e(I, { className: "mb-2", alignHorizontal: "center", children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ c(
85
+ x,
86
+ {
87
+ mode: "dark",
88
+ focusMode: "light",
89
+ trigger: /* @__PURE__ */ e(
90
+ Q,
91
+ {
92
+ noBorder: !0,
93
+ variant: "selected",
94
+ size: "small",
95
+ labelRight: V(),
96
+ children: /* @__PURE__ */ e(X, { className: "mr-1" })
97
+ }
98
+ ),
99
+ defaultPlacement: "bottom-start",
100
+ children: [
101
+ /* @__PURE__ */ e(ee, { children: "Date Range" }),
102
+ ne.map((t) => /* @__PURE__ */ e(
103
+ P,
104
+ {
105
+ label: D[t],
106
+ selected: n === t,
107
+ onClick: () => y(t)
108
+ },
109
+ t
110
+ )),
111
+ /* @__PURE__ */ e(x, { label: "Month", children: N.map((t, m) => /* @__PURE__ */ e(
112
+ P,
113
+ {
114
+ label: t,
115
+ selected: n === r.SPECIFIC_MONTH && s === m,
116
+ onClick: () => K(m)
117
+ },
118
+ t
119
+ )) })
120
+ ]
121
+ }
122
+ ) }) }),
123
+ /* @__PURE__ */ e(I, { className: "mb-2", alignHorizontal: "center", columnGap: 2, children: /* @__PURE__ */ c(E, { children: [
124
+ /* @__PURE__ */ e(
125
+ d,
126
+ {
127
+ onClick: () => R(o.MODEL),
128
+ size: "small",
129
+ noBorder: !0,
130
+ mode: T === o.MODEL ? "dark" : "light",
131
+ className: "mr-2",
132
+ children: "Model Usage"
133
+ }
134
+ ),
135
+ /* @__PURE__ */ e(
136
+ d,
137
+ {
138
+ onClick: () => R(o.TOKEN),
139
+ size: "small",
140
+ noBorder: !0,
141
+ mode: T === o.TOKEN ? "dark" : "light",
142
+ children: "Token Usage"
143
+ }
144
+ )
145
+ ] }) }),
146
+ /* @__PURE__ */ e(
147
+ se,
148
+ {
149
+ tokenUsage: T === o.TOKEN ? h.tokenUsage?.series || [] : h.modelUsage?.series || [],
150
+ page: S,
151
+ viewMode: T,
152
+ timeRange: n,
153
+ categories: h.categories,
154
+ chartTitle: n === r.SPECIFIC_MONTH && s !== null ? N[s] : void 0
155
+ }
156
+ ),
157
+ B && /* @__PURE__ */ e(I, { className: "mt-2", alignHorizontal: "center", children: /* @__PURE__ */ c(E, { children: [
158
+ /* @__PURE__ */ e(
159
+ d,
160
+ {
161
+ onClick: G,
162
+ className: "mr-2",
163
+ size: "small",
164
+ noBorder: !0,
165
+ children: "Previous"
166
+ }
167
+ ),
168
+ /* @__PURE__ */ e(
169
+ d,
170
+ {
171
+ onClick: F,
172
+ className: "mr-2",
173
+ size: "small",
174
+ noBorder: !0,
175
+ children: "Next"
176
+ }
177
+ )
178
+ ] }) })
179
+ ] }) : null
180
+ }
181
+ ),
182
+ /* @__PURE__ */ e(
183
+ L,
184
+ {
185
+ header: i.MAIN_STATISTICS.TITLE,
186
+ className: "prose-dark dark:prose-lighter min-h-[170px]",
187
+ noBorder: !0,
188
+ children: b ? Z(
189
+ Y,
190
+ {
191
+ [A(i.MAIN_STATISTICS.TOTAL, a.totalChats)]: a.totalChats,
192
+ [A(
193
+ i.MAIN_STATISTICS.TOTAL_PRIVATE,
194
+ a.privateChats
195
+ )]: a.privateChats,
196
+ [A(
197
+ i.MAIN_STATISTICS.TOTAL_DELETED,
198
+ a.deletedChats
199
+ )]: a.deletedChats
200
+ },
201
+ !0
202
+ ) : null
203
+ }
204
+ )
205
+ ]
206
+ }
207
+ );
208
+ };
209
+ export {
210
+ ie as Usage
211
+ };
@@ -1,10 +1,10 @@
1
1
  import { jsx as e, jsxs as r, Fragment as L } from "react/jsx-runtime";
2
- import { L as E, j$1 as f, Button as b, n as ke, useLocalStorage as Q, LOCAL_STORAGE_PREFIX as Z, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, e$1 as l, LOCAL_STORAGE_SORT_MEMORY_COLUMN as Te, useUserMemories as Se, useExpiredMemories as ve, useDeleteMemory as De, useDeleteAllActiveMemories as be, useDeleteAllExpiredMemories as Me, useUpdateMemory as Ee, useRestoreMemory as Re, ButtonIcon as O, IconEdit as Ie, IconDelete as ee, IconRestore as Le } from "./index.ChYRuj2g.js";
3
- import { Panel as se, Toggle as _, ConfirmationPanel as te, Tooltip as z } from "./App.zkb8gvM3.js";
4
- import { W as re, j as ie, G as D, M as s, F as B, H as oe, D as ne } from "./index.wC_fDv6h.js";
2
+ import { L as E, j as f, Button as b, n as ke, useLocalStorage as Q, LOCAL_STORAGE_PREFIX as Z, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, e$1 as l, LOCAL_STORAGE_SORT_MEMORY_COLUMN as Te, useUserMemories as Se, useExpiredMemories as ve, useDeleteMemory as De, useDeleteAllActiveMemories as be, useDeleteAllExpiredMemories as Me, useUpdateMemory as Ee, useRestoreMemory as Re, ButtonIcon as O, IconEdit as Ie, IconDelete as ee, IconRestore as Le } from "./index.BECvwaM5.js";
3
+ import { Panel as se, Toggle as _, ConfirmationPanel as te, Tooltip as z } from "./App.DAQta2pJ.js";
4
+ import { W as re, j as ie, G as D, M as s, F as B, H as oe, D as ne } from "./index.NHQBZNrH.js";
5
5
  import A from "clsx";
6
6
  import { useState as y, useEffect as Oe, useRef as le } from "react";
7
- import { TextArea as _e } from "./index.BqwARS2K.js";
7
+ import { TextArea as _e } from "./index.C9N2vELq.js";
8
8
  const ze = ({
9
9
  open: C,
10
10
  onOpenChange: M,
@@ -189,7 +189,7 @@ const ze = ({
189
189
  ] })
190
190
  }
191
191
  );
192
- }, He = ({
192
+ }, $e = ({
193
193
  open: C,
194
194
  onOpenChange: M,
195
195
  user: c
@@ -209,8 +209,8 @@ const ze = ({
209
209
  enabled: C && m === "active"
210
210
  }), {
211
211
  data: g,
212
- isLoading: $,
213
- isError: H
212
+ isLoading: H,
213
+ isError: $
214
214
  } = ve({
215
215
  user: c,
216
216
  query: R,
@@ -326,6 +326,7 @@ const ze = ({
326
326
  title: "User Memories",
327
327
  animation: !0,
328
328
  animationType: "fade",
329
+ blurEffect: "large",
329
330
  footer: /* @__PURE__ */ r(E, { columnGap: 2, alignHorizontal: "flex-end", children: [
330
331
  /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(
331
332
  b,
@@ -564,9 +565,9 @@ const ze = ({
564
565
  }
565
566
  ) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
566
567
  ] }) : /* @__PURE__ */ r(L, { children: [
567
- $ && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
568
- H && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load expired memories." }),
569
- !$ && !H && (g && g.items.length > 0 ? /* @__PURE__ */ r(re, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
568
+ H && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading expired memories..." }),
569
+ $ && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load expired memories." }),
570
+ !H && !$ && (g && g.items.length > 0 ? /* @__PURE__ */ r(re, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
570
571
  /* @__PURE__ */ e(ie, { children: /* @__PURE__ */ r(D, { children: [
571
572
  /* @__PURE__ */ e(s, { className: "sr-only", children: "Row" }),
572
573
  /* @__PURE__ */ e(s, { children: "Memory" }),
@@ -751,6 +752,6 @@ const ze = ({
751
752
  ] });
752
753
  };
753
754
  export {
754
- He as UserMemoriesPanel,
755
- He as default
755
+ $e as UserMemoriesPanel,
756
+ $e as default
756
757
  };