@versini/sassysaint 8.83.0 → 8.84.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 (28) hide show
  1. package/dist/chunks/{AboutChangelog.Dnae3ZET.js → AboutChangelog.DZGAHTt1.js} +3 -3
  2. package/dist/chunks/{AboutEntry.DaKcxQlb.js → AboutEntry.attDhr6o.js} +5 -5
  3. package/dist/chunks/{App.CfJzwyx5.js → App.D5dFnMgi.js} +17 -23
  4. package/dist/chunks/{Chart.CmXf5ahL.js → Chart.BorMOymc.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.rQ0E9CSF.js → ChatBubbleAssistant.C8Hj4aUT.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.iSkDnxmM.js → ChatBubbleUser.dsKIG0uQ.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.3HSGoZd4.js → ChatHistoryTable.CZoqrM3Q.js} +3 -3
  8. package/dist/chunks/HistoryEntry.Bwj5sP0d.js +329 -0
  9. package/dist/chunks/ProfileEntry.C7jF-C7h.js +200 -0
  10. package/dist/chunks/{SettingsEntry.SAurNjp0.js → SettingsEntry.YOmhRpCr.js} +3 -3
  11. package/dist/chunks/{UsageEntry.DPp3sbic.js → UsageEntry.CuuhnKaa.js} +3 -3
  12. package/dist/chunks/{UserMemoriesPanel.DiSRjoNR.js → UserMemoriesPanel.DHYQrBf3.js} +7 -5
  13. package/dist/chunks/{index.D4xbtPpm.js → index.B-hcQUrf.js} +3 -3
  14. package/dist/chunks/{index.iKl0E1mP.js → index.B-uWa0B5.js} +1 -1
  15. package/dist/chunks/{index.BQXkk0E7.js → index.CB38V3Ui.js} +1 -1
  16. package/dist/chunks/{index.CoVeibJJ.js → index.CIkuBITJ.js} +1 -1
  17. package/dist/chunks/{index.ZpurL-_2.js → index.CZGr8f9z.js} +1 -1
  18. package/dist/chunks/{index.HO-K8Z3S.js → index.Ch3LqJXc.js} +1 -1
  19. package/dist/chunks/{index.DNDgXAMw.js → index.DYbaR-WD.js} +2 -2
  20. package/dist/chunks/{index.9ZW-D7id.js → index.DtdQADPo.js} +1 -1
  21. package/dist/chunks/{index.B6gxiXab.js → index.xkx1XY3w.js} +1 -1
  22. package/dist/chunks/{useMarkdown.D1WsA7gy.js → useMarkdown.B4zM1uwe.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/HistoryEntry.4IXWZ8qq.js +0 -298
  28. package/dist/chunks/ProfileEntry.Chfyj-dQ.js +0 -181
@@ -1,181 +0,0 @@
1
- import { jsxs as t, Fragment as D, jsx as e } from "react/jsx-runtime";
2
- import { preloadToast as K, showSuccessToast as W, showErrorToast as Y, ConfirmationPanel as H, LazyToastContainerWrapper as $, Panel as V } from "./App.CfJzwyx5.js";
3
- import { n as q, useUniqueId as J, useUserPreferences as Q, useServerCapabilities as X, d as Z, setUserPlan as ee, Card as d, renderDataAsList as ae, CARDS as s, L as P, j as c, Button as se, it as ne, isTauri as re, ButtonIcon as te, IconPasskey as L, PROFILE_TITLE as le } from "./index.BQXkk0E7.js";
4
- import ie from "clsx";
5
- import { useState as m, useMemo as ce, useCallback as f } from "react";
6
- const oe = () => {
7
- const {
8
- isAuthenticated: h,
9
- user: n,
10
- registeringForPasskey: b,
11
- authenticationType: y,
12
- getAccessToken: u
13
- } = q(), [v, N] = m(null), [T, F] = m(!1), [x, C] = m(!1), [l, w] = m(null), U = J(), A = n?.username || "", {
14
- data: p,
15
- isSuccess: _,
16
- refetch: I
17
- } = Q({
18
- user: n?.username,
19
- getAccessToken: u
20
- }), { data: E, isSuccess: S } = X(), R = ce(() => !S || !E?.plans ? [] : E.plans.map((a) => ({
21
- id: a.name,
22
- label: a.label,
23
- description: a.description,
24
- features: a.features,
25
- models: a.allowedModels.map(
26
- (r) => Z[r] || r
27
- )
28
- })), [S, E?.plans]), g = f(() => {
29
- T || (K(), F(!0));
30
- }, [T]), z = f(async () => {
31
- if (!(!l || !n?.username))
32
- try {
33
- N(l.id), await ee({
34
- plan: l.id,
35
- accessToken: await u(),
36
- username: n.username
37
- }), await I(), await W(
38
- `${s.PLANS.SWITCH_SUCCESS} ${l.label}`,
39
- {
40
- containerId: "profile-plan-selection"
41
- }
42
- );
43
- } catch {
44
- await Y(s.PLANS.SWITCH_ERROR, {
45
- containerId: "profile-plan-selection"
46
- });
47
- } finally {
48
- N(null), w(null);
49
- }
50
- }, [u, l, I, n?.username]), B = f(
51
- (a, r) => {
52
- !n?.username || a === p?.plan || (w({ id: a, label: r }), C(!0));
53
- },
54
- [p?.plan, n?.username]
55
- );
56
- return h && A ? /* @__PURE__ */ t(D, { children: [
57
- /* @__PURE__ */ e(
58
- H,
59
- {
60
- showConfirmation: x,
61
- setShowConfirmation: C,
62
- action: z,
63
- customStrings: {
64
- confirmAction: "Switch Plan",
65
- cancelAction: "Cancel",
66
- title: "Switch Plan"
67
- },
68
- children: l && /* @__PURE__ */ t("p", { className: "m-0", children: [
69
- "Are you sure you want to switch to the following plan:",
70
- " ",
71
- /* @__PURE__ */ e("span", { className: "font-semibold", children: l.label })
72
- ] })
73
- }
74
- ),
75
- /* @__PURE__ */ e("div", { className: "av-sassy", children: /* @__PURE__ */ e($, { containerId: "profile-plan-selection" }) }),
76
- /* @__PURE__ */ e(
77
- d,
78
- {
79
- header: s.PREFERENCES.TITLE,
80
- className: "prose-dark dark:prose-lighter",
81
- noBorder: !0,
82
- children: ae(U, {
83
- [s.PREFERENCES.USERNAME]: A,
84
- [s.PREFERENCES.EMAIL]: n?.email || ""
85
- })
86
- }
87
- ),
88
- _ && S && R.length > 0 && /* @__PURE__ */ t(
89
- d,
90
- {
91
- header: s.PLANS.TITLE,
92
- className: "prose-dark dark:prose-lighter mt-4",
93
- noBorder: !0,
94
- children: [
95
- /* @__PURE__ */ e("p", { className: "text-sm", children: s.PLANS.DESCRIPTION }),
96
- /* @__PURE__ */ e(P, { columnGap: 3, rowGap: 3, className: "mt-4", children: R.map(({ id: a, label: r, description: M, features: G, models: O }) => {
97
- const o = p?.plan === a, j = o ? s.PLANS.ACTIVE_BADGE : `Get ${r}`, k = v === a;
98
- return /* @__PURE__ */ e(c, { span: { fallback: 12, md: 4 }, children: /* @__PURE__ */ e(d, { mode: "darker", className: "prose-lighter h-full", children: /* @__PURE__ */ t(P, { direction: "column", children: [
99
- /* @__PURE__ */ t(c, { children: [
100
- /* @__PURE__ */ e("div", { className: "flex items-start justify-between gap-2", children: /* @__PURE__ */ t("div", { children: [
101
- /* @__PURE__ */ e(
102
- "h3",
103
- {
104
- className: ie("m-0", {
105
- "text-emerald-400": o
106
- }),
107
- children: r
108
- }
109
- ),
110
- /* @__PURE__ */ e("p", { className: "mb-0 text-sm opacity-80", children: M })
111
- ] }) }),
112
- /* @__PURE__ */ e("h4", { children: "Features" }),
113
- /* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: G.map((i) => /* @__PURE__ */ e("li", { children: i }, i)) }),
114
- /* @__PURE__ */ e("h4", { children: "Models" }),
115
- /* @__PURE__ */ e("ul", { className: "prose-li:text-sm", children: O.map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
116
- ] }),
117
- /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(
118
- se,
119
- {
120
- mode: "dark",
121
- size: "small",
122
- variant: o ? "selected" : "secondary",
123
- className: "mt-4",
124
- fullWidth: !0,
125
- disabled: o || k,
126
- onClick: () => {
127
- B(a, r);
128
- },
129
- onMouseEnter: g,
130
- onFocus: g,
131
- children: k ? "Updating..." : j
132
- }
133
- ) })
134
- ] }) }) }, a);
135
- }) })
136
- ]
137
- }
138
- ),
139
- y !== ne.PASSKEY && !re() && /* @__PURE__ */ t(
140
- d,
141
- {
142
- className: "prose-dark dark:prose-lighter mt-4",
143
- noBorder: !0,
144
- header: /* @__PURE__ */ e("h2", { className: "m-0", children: /* @__PURE__ */ t(P, { columnGap: 3, alignVertical: "center", children: [
145
- /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e(L, { size: "size-8" }) }),
146
- /* @__PURE__ */ e(c, { children: /* @__PURE__ */ e("div", { children: s.PREFERENCES.PASSKEY_TITLE }) })
147
- ] }) }),
148
- children: [
149
- /* @__PURE__ */ e("p", { children: s.PREFERENCES.PASSKEY_INSTRUCTIONS }),
150
- /* @__PURE__ */ e(
151
- te,
152
- {
153
- variant: "selected",
154
- size: "small",
155
- className: "mt-2",
156
- onClick: b,
157
- labelLeft: s.PREFERENCES.PASSKEY_BUTTON,
158
- children: /* @__PURE__ */ e(L, { size: "size-5", monotone: !0 })
159
- }
160
- )
161
- ]
162
- }
163
- )
164
- ] }) : null;
165
- }, Ee = ({
166
- open: h,
167
- onOpenChange: n
168
- }) => /* @__PURE__ */ e(
169
- V,
170
- {
171
- open: h,
172
- onOpenChange: n,
173
- title: le,
174
- animation: !0,
175
- animationType: "fade",
176
- children: /* @__PURE__ */ e(oe, {})
177
- }
178
- );
179
- export {
180
- Ee as Profile
181
- };