@versini/sassysaint 8.58.2 → 8.59.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.
- package/dist/chunks/{AboutChangelog.BJb6evn9.js → AboutChangelog.VIMWfrJ2.js} +2 -2
- package/dist/chunks/{AboutEntry.CKS9KQYk.js → AboutEntry.HhBVaghX.js} +9 -9
- package/dist/chunks/{App.Bw24TFS-.js → App.DFkumxrG.js} +1798 -1780
- package/dist/chunks/{Chart.Cddg0IXQ.js → Chart.DyiU5Qev.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.6-hK6qAF.js → ChatBubbleAssistant.a1OalMkY.js} +4 -4
- package/dist/chunks/{ChatBubbleUser.DpUR_1HU.js → ChatBubbleUser.DP50erQL.js} +3 -3
- package/dist/chunks/{ChatHistoryTable.BB5ESpr2.js → ChatHistoryTable.9NfCFVTm.js} +3 -3
- package/dist/chunks/{HistoryEntry.BQlLgB9G.js → HistoryEntry.Dz-6Alzn.js} +14 -14
- package/dist/chunks/{ProfileEntry.CuUO01aL.js → ProfileEntry.DJ4q6KoG.js} +2 -2
- package/dist/chunks/SettingsEntry.Cc0vofff.js +430 -0
- package/dist/chunks/{Table.BLNonpLk.js → Table.CGJz3l0P.js} +2 -2
- package/dist/chunks/{UsageEntry.CuWrk617.js → UsageEntry.B6zt1DS_.js} +3 -3
- package/dist/chunks/UserMemoriesPanel.C2262GRv.js +693 -0
- package/dist/chunks/{index.BjpuOtB7.js → index.6QVNoWZY.js} +616 -584
- package/dist/chunks/{index.Dgyiis4p.js → index.BlzmTlvN.js} +2 -2
- package/dist/chunks/{index.YTqgXQdg.js → index.CGcokH1z.js} +3 -3
- package/dist/chunks/{index.Ds-UToar.js → index.CV96FPnP.js} +1 -1
- package/dist/chunks/{index.CQgBz9Dt.js → index.D69nnw0C.js} +1 -1
- package/dist/chunks/{index.Cs8bFhFv.js → index.DXesyWpt.js} +1 -1
- package/dist/chunks/{index.CcOFJwqN.js → index.en8Vui5r.js} +1 -1
- package/dist/chunks/{useMarkdown.CskeXXFn.js → useMarkdown.DRQL-Q_k.js} +6 -6
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +4 -4
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/chunks/SettingsEntry.6T_vvycf.js +0 -781
- package/dist/chunks/UserMemoriesPanel.3ikfhdxH.js +0 -205
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as B, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { n as H, LOCAL_STORAGE_PREFIX as k, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as V, LOCAL_STORAGE_SORT_MEMORY_COLUMN as Y, useUserMemories as X, useDeleteMemory as $, useDeleteAllMemories as J, te as K, L as Q, j as N, C as O } from "./index.BjpuOtB7.js";
|
|
3
|
-
import { E as M, e as s, ConfirmationPanel as T, se as W, st as Z } from "./App.Bw24TFS-.js";
|
|
4
|
-
import h from "clsx";
|
|
5
|
-
import { useState as c, useRef as ee } from "react";
|
|
6
|
-
import { j as te, D as re, G as u, M as n, F as oe, H as ne, l as ie, U as le } from "./Table.BLNonpLk.js";
|
|
7
|
-
const ue = ({
|
|
8
|
-
open: f,
|
|
9
|
-
onOpenChange: A,
|
|
10
|
-
user: a
|
|
11
|
-
}) => {
|
|
12
|
-
const { getAccessToken: d } = H(), [R] = c(void 0), [E, L] = M({
|
|
13
|
-
key: k + V,
|
|
14
|
-
initialValue: s.DESC
|
|
15
|
-
}), [_, b] = M({
|
|
16
|
-
key: k + Y,
|
|
17
|
-
initialValue: "createdAt"
|
|
18
|
-
}), [C, v] = c(E || s.DESC), [I, j] = c(
|
|
19
|
-
_ || "createdAt"
|
|
20
|
-
), { data: i, isLoading: x, isError: D } = X({
|
|
21
|
-
user: a,
|
|
22
|
-
query: R,
|
|
23
|
-
getAccessToken: d,
|
|
24
|
-
enabled: f
|
|
25
|
-
}), y = $({ getAccessToken: d }), p = J({ getAccessToken: d }), [F, g] = c(!1), l = ee(null), [G, S] = c(!1), P = (t, o, m) => {
|
|
26
|
-
l.current = { id: t, text: o, createdAt: m }, g(!0);
|
|
27
|
-
}, U = () => {
|
|
28
|
-
l.current && y.mutate({ user: a, memoryId: l.current.id });
|
|
29
|
-
}, q = () => {
|
|
30
|
-
a && S(!0);
|
|
31
|
-
}, z = () => {
|
|
32
|
-
a && p.mutate({ user: a });
|
|
33
|
-
};
|
|
34
|
-
return /* @__PURE__ */ r(B, { children: [
|
|
35
|
-
/* @__PURE__ */ r(
|
|
36
|
-
T,
|
|
37
|
-
{
|
|
38
|
-
showConfirmation: F,
|
|
39
|
-
setShowConfirmation: g,
|
|
40
|
-
action: U,
|
|
41
|
-
customStrings: {
|
|
42
|
-
title: "Delete memory",
|
|
43
|
-
confirmAction: "Delete",
|
|
44
|
-
cancelAction: "Cancel"
|
|
45
|
-
},
|
|
46
|
-
children: [
|
|
47
|
-
/* @__PURE__ */ e("p", { className: "m-0", children: "Are you sure you want to delete this memory?" }),
|
|
48
|
-
/* @__PURE__ */ r("ul", { className: "m-0 mt-2 list-disc list-inside text-xs opacity-80", children: [
|
|
49
|
-
/* @__PURE__ */ r("li", { children: [
|
|
50
|
-
"Excerpt: ",
|
|
51
|
-
l.current?.text?.slice(0, 80) || ""
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ r("li", { children: [
|
|
54
|
-
"Created:",
|
|
55
|
-
" ",
|
|
56
|
-
l.current?.createdAt ? new Date(l.current.createdAt).toLocaleString() : "-"
|
|
57
|
-
] })
|
|
58
|
-
] })
|
|
59
|
-
]
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
|
-
/* @__PURE__ */ e(
|
|
63
|
-
T,
|
|
64
|
-
{
|
|
65
|
-
showConfirmation: G,
|
|
66
|
-
setShowConfirmation: S,
|
|
67
|
-
action: z,
|
|
68
|
-
customStrings: {
|
|
69
|
-
title: "Delete all memories",
|
|
70
|
-
confirmAction: "Delete all",
|
|
71
|
-
cancelAction: "Cancel"
|
|
72
|
-
},
|
|
73
|
-
children: /* @__PURE__ */ e("p", { className: "m-0", children: "This will permanently delete all memories for this user. This action cannot be undone." })
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ e(
|
|
77
|
-
W,
|
|
78
|
-
{
|
|
79
|
-
open: f,
|
|
80
|
-
onOpenChange: (t) => A(t),
|
|
81
|
-
title: "User Memories",
|
|
82
|
-
animation: !0,
|
|
83
|
-
animationType: "fade",
|
|
84
|
-
footer: /* @__PURE__ */ r(Q, { columnGap: 2, alignHorizontal: "flex-end", children: [
|
|
85
|
-
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
|
|
86
|
-
O,
|
|
87
|
-
{
|
|
88
|
-
mode: "dark",
|
|
89
|
-
variant: "secondary",
|
|
90
|
-
noBorder: !0,
|
|
91
|
-
focusMode: "light",
|
|
92
|
-
onClick: () => A(!1),
|
|
93
|
-
children: "Close"
|
|
94
|
-
}
|
|
95
|
-
) }),
|
|
96
|
-
/* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(
|
|
97
|
-
O,
|
|
98
|
-
{
|
|
99
|
-
mode: "dark",
|
|
100
|
-
focusMode: "light",
|
|
101
|
-
variant: "danger",
|
|
102
|
-
disabled: p.isPending || (i?.total ?? 0) === 0,
|
|
103
|
-
onClick: q,
|
|
104
|
-
children: "Delete All"
|
|
105
|
-
}
|
|
106
|
-
) })
|
|
107
|
-
] }),
|
|
108
|
-
children: /* @__PURE__ */ r("div", { className: "flex flex-col sm:flex-row max-h-[75vh] min-h-[60vh] pt-2", children: [
|
|
109
|
-
x && /* @__PURE__ */ e("p", { className: "m-0", children: "Loading memories..." }),
|
|
110
|
-
D && /* @__PURE__ */ e("p", { className: "m-0 text-red-500", children: "Failed to load memories." }),
|
|
111
|
-
!x && !D && (i && i.items.length > 0 ? /* @__PURE__ */ r(te, { stickyHeader: !0, stickyFooter: !0, compact: !0, mode: "alt-system", children: [
|
|
112
|
-
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r(u, { children: [
|
|
113
|
-
/* @__PURE__ */ e(n, { className: "sr-only", children: "Row" }),
|
|
114
|
-
/* @__PURE__ */ e(n, { children: "Memory" }),
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
oe,
|
|
117
|
-
{
|
|
118
|
-
focusMode: "system",
|
|
119
|
-
buttonClassName: "text-xs sm:text-sm",
|
|
120
|
-
cellId: "createdAt",
|
|
121
|
-
align: "left",
|
|
122
|
-
sortDirection: C,
|
|
123
|
-
sortedCell: I,
|
|
124
|
-
onClick: () => {
|
|
125
|
-
j("createdAt"), b("createdAt"), v((t) => {
|
|
126
|
-
const o = t === s.ASC ? s.DESC : s.ASC;
|
|
127
|
-
return L(o), o;
|
|
128
|
-
});
|
|
129
|
-
},
|
|
130
|
-
children: "Date"
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ e(n, { align: "right", children: "Actions" })
|
|
134
|
-
] }) }),
|
|
135
|
-
/* @__PURE__ */ e(ne, { children: [...i.items].sort((t, o) => {
|
|
136
|
-
const m = t.createdAt ? new Date(t.createdAt).getTime() : 0, w = o.createdAt ? new Date(o.createdAt).getTime() : 0;
|
|
137
|
-
return C === s.ASC ? m - w : w - m;
|
|
138
|
-
}).map((t, o) => /* @__PURE__ */ r(u, { children: [
|
|
139
|
-
/* @__PURE__ */ e(n, { className: h("dark:text-gray-400"), children: o + 1 }),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
141
|
-
n,
|
|
142
|
-
{
|
|
143
|
-
className: h(
|
|
144
|
-
"dark:text-white",
|
|
145
|
-
"max-w-[100px] sm:max-w-full text-xs sm:text-sm"
|
|
146
|
-
),
|
|
147
|
-
style: {
|
|
148
|
-
wordBreak: "break-word"
|
|
149
|
-
},
|
|
150
|
-
children: t.text
|
|
151
|
-
}
|
|
152
|
-
),
|
|
153
|
-
/* @__PURE__ */ e(
|
|
154
|
-
n,
|
|
155
|
-
{
|
|
156
|
-
component: "th",
|
|
157
|
-
scope: "row",
|
|
158
|
-
className: h(
|
|
159
|
-
"dark:text-gray-400",
|
|
160
|
-
"sm:whitespace-nowrap text-xs sm:text-sm max-w-20 sm:max-w-none"
|
|
161
|
-
),
|
|
162
|
-
children: t.createdAt ? new Date(t.createdAt).toLocaleDateString() : "-"
|
|
163
|
-
}
|
|
164
|
-
),
|
|
165
|
-
/* @__PURE__ */ e(n, { className: "align-top", align: "right", children: /* @__PURE__ */ e(
|
|
166
|
-
Z,
|
|
167
|
-
{
|
|
168
|
-
label: "Delete memory",
|
|
169
|
-
mode: "system",
|
|
170
|
-
placement: "top",
|
|
171
|
-
trigger: /* @__PURE__ */ e(
|
|
172
|
-
K,
|
|
173
|
-
{
|
|
174
|
-
focusMode: "system",
|
|
175
|
-
noBorder: !0,
|
|
176
|
-
label: "Delete memory",
|
|
177
|
-
variant: "primary",
|
|
178
|
-
iconClassName: "text-red-700 dark:text-red-500",
|
|
179
|
-
disabled: y.isPending,
|
|
180
|
-
onClick: () => P(
|
|
181
|
-
t.memoryId,
|
|
182
|
-
t.text,
|
|
183
|
-
t.createdAt
|
|
184
|
-
),
|
|
185
|
-
children: /* @__PURE__ */ e(ie, { size: "size-3", monotone: !0 })
|
|
186
|
-
}
|
|
187
|
-
)
|
|
188
|
-
}
|
|
189
|
-
) })
|
|
190
|
-
] }, t.memoryId)) }),
|
|
191
|
-
/* @__PURE__ */ e(le, { children: /* @__PURE__ */ e(u, { children: /* @__PURE__ */ r(n, { colSpan: 4, children: [
|
|
192
|
-
i.total,
|
|
193
|
-
" memor",
|
|
194
|
-
i.total === 1 ? "y" : "ies"
|
|
195
|
-
] }) }) })
|
|
196
|
-
] }) : /* @__PURE__ */ e("p", { className: "m-0 italic opacity-70", children: "No memories stored." }))
|
|
197
|
-
] })
|
|
198
|
-
}
|
|
199
|
-
)
|
|
200
|
-
] });
|
|
201
|
-
};
|
|
202
|
-
export {
|
|
203
|
-
ue as UserMemoriesPanel,
|
|
204
|
-
ue as default
|
|
205
|
-
};
|