@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
@@ -0,0 +1,316 @@
1
+ import { jsxs as l, Fragment as re, jsx as r } from "react/jsx-runtime";
2
+ import { n as M, INFINITE_SCROLL_LIMIT as G, INFINITE_SCROLL_THRESHOLD as ae, useLocalStorage as p, LOCAL_STORAGE_PREFIX as y, LOCAL_STORAGE_SORT_TIMESTAMP as se, LOCAL_STORAGE_SORT_TOKEN_USAGE as oe, LOCAL_STORAGE_SORT as ne, f as R, useUserPreferences as ie, useDeleteChat as ce, useToggleFavoriteChat as le, APP_CLASSNAME as de, TOAST_CHAT_DELETED as he, graphQLRequest as ue, SERVICE_TYPES as me, setNewProvider as Ce, ACTION_SORT as Se, h as fe, TOAST_PROVIDER_CHANGED as pe, useChatsHistory as ye, useUserChatStats as Te, LOCAL_STORAGE_SEARCH as ge, LOCAL_STORAGE_FAVORITES_ONLY as Ae, HISTORY_TITLE as Ee, Card as ve, TextInput as _e, debounce as De, IconSearch as Oe, Button as Re, ACTION_SEARCH as Ie } from "./index.RtpWGHE1.js";
3
+ import { HistoryContext as U, ChatContext as B, useAiChat as Le, e as h, ConfirmationPanel as ke, LazyToastContainerWrapper as be, showErrorToast as Ne, CHAT_SET_PROVIDER as we, showSuccessToast as xe, CHAT_SET_STATUS as He, Panel as Fe, Toggle as Pe } from "./App.DXGdoHmW.js";
4
+ import { useRef as H, useState as F, useContext as I, useCallback as z, Suspense as Ve, lazy as Ge, useEffect as ze } from "react";
5
+ const Me = Ge(
6
+ () => import(
7
+ /* webpackChunkName: "history-table" */
8
+ "./ChatHistoryTable.CCUGl-Jy.js"
9
+ ).then((u) => ({ default: u.ChatHistoryTable }))
10
+ ), Ue = ({
11
+ filteredHistory: u,
12
+ dispatch: C,
13
+ onOpenChange: T,
14
+ mutate: S,
15
+ isLoading: L = !1,
16
+ totalHistoryCount: k,
17
+ isFiltered: g = !1
18
+ }) => {
19
+ const { user: i, getAccessToken: a } = M(), f = H(null), n = H({
20
+ id: "",
21
+ timestamp: "",
22
+ message: ""
23
+ }), [A, E] = F(!1), [v, d] = F(
24
+ G + ae
25
+ ), { state: c, dispatch: b } = I(U), m = {
26
+ searchString: c.searchString || "",
27
+ sortDirection: c.sortDirection || h.DESC,
28
+ sortedCell: c.sortedCell || R
29
+ }, {
30
+ state: { provider: N },
31
+ setChatId: _,
32
+ setInitialMessages: w
33
+ } = I(B), { setInput: x } = Le(), [D, s] = p({
34
+ key: y + se,
35
+ initialValue: h.DESC
36
+ }), [j, Y] = p({
37
+ key: y + oe,
38
+ initialValue: h.ASC
39
+ }), [, $] = p({
40
+ key: y + ne,
41
+ initialValue: R
42
+ }), { refetch: q } = ie({
43
+ user: i?.username,
44
+ getAccessToken: a
45
+ }), { mutateAsync: K } = ce({ getAccessToken: a }), { mutateAsync: Q } = le({
46
+ getAccessToken: a
47
+ }), W = (e) => {
48
+ const o = c.sortedCell === e;
49
+ let t, O;
50
+ switch (e) {
51
+ case R:
52
+ O = s, t = o ? c.sortDirection : D;
53
+ break;
54
+ case fe:
55
+ O = Y, t = o ? c.sortDirection : j;
56
+ break;
57
+ default:
58
+ O = s, t = o ? c.sortDirection : D;
59
+ break;
60
+ }
61
+ const V = t === h.ASC ? h.DESC : h.ASC;
62
+ O(V), $(e), b({
63
+ type: Se,
64
+ payload: {
65
+ sortedCell: e,
66
+ sortDirection: V
67
+ }
68
+ });
69
+ }, X = async () => {
70
+ const e = n.current;
71
+ try {
72
+ await K({
73
+ userId: i?.username || "",
74
+ id: e.id
75
+ }), S(""), await Ne(he, {
76
+ autoClose: 2e3,
77
+ containerId: "history-table"
78
+ });
79
+ } catch {
80
+ }
81
+ }, J = async (e) => {
82
+ try {
83
+ const o = await a(), t = await ue({
84
+ accessToken: o,
85
+ type: me.GET_CHAT,
86
+ params: {
87
+ id: e.id
88
+ }
89
+ });
90
+ t.data.provider !== N && (await Ce({
91
+ provider: t.data.provider,
92
+ model: t.data.model,
93
+ accessToken: o,
94
+ username: i?.username || ""
95
+ }), C({
96
+ type: we,
97
+ payload: {
98
+ provider: t.data.provider
99
+ }
100
+ }), q(), await xe(
101
+ `${pe} ${t.data.provider}`,
102
+ {
103
+ containerId: "toggle-provider"
104
+ }
105
+ )), C({
106
+ type: He,
107
+ payload: {
108
+ restoring: !0,
109
+ restoredModel: t.data?.model || "",
110
+ restoredUsage: t.data?.tokenUsage || 0
111
+ }
112
+ }), x(""), _(e.id), w(t.data.messages), T(!1);
113
+ } catch {
114
+ }
115
+ }, Z = (e) => {
116
+ n.current = {
117
+ id: e.id,
118
+ timestamp: e.timestamp,
119
+ message: e.messages.length > 0 ? e.messages[0]?.content : ""
120
+ }, E(!A);
121
+ }, ee = async (e) => {
122
+ try {
123
+ await Q({
124
+ userId: i?.username || "",
125
+ id: e.id
126
+ }), S("");
127
+ } catch {
128
+ }
129
+ }, P = z((e) => {
130
+ e[0].isIntersecting && d((t) => t + G);
131
+ }, []), te = z(
132
+ (e) => {
133
+ if (f.current && f.current.disconnect(), e) {
134
+ const o = {
135
+ rootMargin: "20px"
136
+ }, t = new IntersectionObserver(P, o);
137
+ t.observe(e), f.current = t;
138
+ }
139
+ },
140
+ [P]
141
+ );
142
+ return /* @__PURE__ */ l(re, { children: [
143
+ /* @__PURE__ */ l(
144
+ ke,
145
+ {
146
+ showConfirmation: A,
147
+ setShowConfirmation: E,
148
+ action: X,
149
+ customStrings: {
150
+ confirmAction: "Delete",
151
+ cancelAction: "Cancel",
152
+ title: "Delete chat"
153
+ },
154
+ children: [
155
+ /* @__PURE__ */ r("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
156
+ /* @__PURE__ */ l("ul", { className: "m-0", children: [
157
+ /* @__PURE__ */ l("li", { children: [
158
+ "Timestamp:",
159
+ " ",
160
+ /* @__PURE__ */ r("span", { className: "text-lg", children: n.current && n.current.timestamp })
161
+ ] }),
162
+ /* @__PURE__ */ l("li", { children: [
163
+ "First message:",
164
+ " ",
165
+ /* @__PURE__ */ r("span", { className: "text-lg", children: n.current?.message })
166
+ ] })
167
+ ] })
168
+ ]
169
+ }
170
+ ),
171
+ /* @__PURE__ */ r("div", { className: de, children: /* @__PURE__ */ r(be, { containerId: "history-table" }) }),
172
+ /* @__PURE__ */ r(Ve, { fallback: /* @__PURE__ */ r("div", {}), children: /* @__PURE__ */ r(
173
+ Me,
174
+ {
175
+ filteredHistory: u,
176
+ historyState: m,
177
+ lastEntryToLoad: v,
178
+ onClickSort: W,
179
+ onClickRestore: J,
180
+ onClickDelete: Z,
181
+ onClickFavorite: ee,
182
+ infinityScrollMarkerRef: te,
183
+ isLoading: L,
184
+ totalHistoryCount: k,
185
+ isFiltered: g
186
+ }
187
+ ) })
188
+ ] });
189
+ }, qe = ({
190
+ open: u,
191
+ onOpenChange: C
192
+ }) => {
193
+ const { getAccessToken: T, user: S } = M(), { dispatch: L } = I(B), [k, g] = F([]), i = H(null), { state: a, dispatch: f } = I(U), {
194
+ data: n,
195
+ refetch: A,
196
+ isLoading: E,
197
+ isError: v
198
+ } = ye({
199
+ enabled: u,
200
+ user: S?.username || "",
201
+ searchString: a.searchString || "",
202
+ sortDirection: a.sortDirection || h.DESC,
203
+ sortedCell: a.sortedCell || R,
204
+ getAccessToken: T
205
+ }), { data: d } = Te({
206
+ user: S?.username,
207
+ getAccessToken: T
208
+ }), c = d && d.totalChats ? d.totalChats - d.privateChats - d.deletedChats : 0, [, b] = p({
209
+ key: y + ge,
210
+ initialValue: a.searchString
211
+ }), [m, N] = p({
212
+ key: y + Ae,
213
+ initialValue: !1
214
+ });
215
+ ze(() => {
216
+ n && g(
217
+ m ? n.filter((s) => s.favoriteChat === !0) : n
218
+ );
219
+ }, [n, m]);
220
+ const _ = async (s) => {
221
+ b(s), f({
222
+ type: Ie,
223
+ payload: { searchString: s }
224
+ });
225
+ }, w = De((s) => {
226
+ _(s.target.value.trim());
227
+ }, 500), x = async (s) => {
228
+ s.preventDefault();
229
+ }, D = (s) => {
230
+ N(s);
231
+ };
232
+ return /* @__PURE__ */ l(
233
+ Fe,
234
+ {
235
+ open: u,
236
+ onOpenChange: C,
237
+ title: Ee,
238
+ animation: !0,
239
+ animationType: "fade",
240
+ children: [
241
+ /* @__PURE__ */ r(
242
+ ve,
243
+ {
244
+ header: a.searchString ? "Filters applied" : "Filters",
245
+ className: "prose-dark dark:prose-lighter mb-4",
246
+ noBorder: !0,
247
+ compact: !0,
248
+ children: /* @__PURE__ */ l("form", { autoComplete: "off", onSubmit: x, children: [
249
+ /* @__PURE__ */ r(
250
+ _e,
251
+ {
252
+ placeholder: "Search",
253
+ labelHidden: !0,
254
+ noBorder: !0,
255
+ autoCapitalize: "off",
256
+ autoComplete: "off",
257
+ autoCorrect: "off",
258
+ ref: i,
259
+ defaultValue: a.searchString,
260
+ mode: "alt-system",
261
+ name: "Search",
262
+ label: "Search",
263
+ onChange: w,
264
+ className: "my-2",
265
+ rightElement: /* @__PURE__ */ r("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ r(Oe, { monotone: !0, size: "size-3" }) })
266
+ }
267
+ ),
268
+ /* @__PURE__ */ l("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
269
+ /* @__PURE__ */ r("div", { className: "order-1 sm:order-0", children: /* @__PURE__ */ r(
270
+ Pe,
271
+ {
272
+ name: "favorites-only",
273
+ checked: m,
274
+ onChange: D,
275
+ label: "Show favorites only",
276
+ narrow: !0,
277
+ noBorder: !0
278
+ }
279
+ ) }),
280
+ /* @__PURE__ */ r(
281
+ Re,
282
+ {
283
+ size: "small",
284
+ disabled: a.searchString === "",
285
+ onClick: () => {
286
+ _(""), i.current?.value && (i.current.value = "", i.current.focus());
287
+ },
288
+ children: "Reset Search"
289
+ }
290
+ )
291
+ ] })
292
+ ] })
293
+ }
294
+ ),
295
+ /* @__PURE__ */ l("div", { className: "flex flex-col sm:flex-row max-h-[65vh] sm:max-h-[75vh] min-h-[60vh]", children: [
296
+ v && /* @__PURE__ */ r("p", { className: "m-0 text-red-500", children: "Failed to load history." }),
297
+ !v && /* @__PURE__ */ r(
298
+ Ue,
299
+ {
300
+ mutate: A,
301
+ filteredHistory: k,
302
+ dispatch: L,
303
+ onOpenChange: C,
304
+ isLoading: E,
305
+ totalHistoryCount: c,
306
+ isFiltered: !!(a.searchString || m)
307
+ }
308
+ )
309
+ ] })
310
+ ]
311
+ }
312
+ );
313
+ };
314
+ export {
315
+ qe as HistoryPanel
316
+ };
@@ -1,6 +1,6 @@
1
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.CV0Bjlae.js";
3
- import { n as q, useUniqueId as J, useUserPreferences as Q, useServerCapabilities as X, N 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.rzw7MU5J.js";
2
+ import { preloadToast as K, showSuccessToast as W, showErrorToast as Y, ConfirmationPanel as H, LazyToastContainerWrapper as $, Panel as V } from "./App.DXGdoHmW.js";
3
+ import { n as q, useUniqueId as J, useUserPreferences as Q, useServerCapabilities as X, N 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.RtpWGHE1.js";
4
4
  import ie from "clsx";
5
5
  import { useState as m, useMemo as ce, useCallback as f } from "react";
6
6
  const oe = () => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as s, jsx as t, Fragment as A } from "react/jsx-runtime";
2
- import { n as Pe, useEntitlements as Be, useUserPreferences as Ue, C as ce, useLocalStorage as ie, LOCAL_STORAGE_OLED_MODE as Ge, LOCAL_STORAGE_FULL_SCREEN as Fe, canEvaluateModels as Ve, H as We, getCacheInfo as $e, isServiceWorkerEnabled as ze, SETTINGS_TITLE as He, Card as p, CARDS as r, b as je, Button as x, PROMPTS_DESCRIPTION as Ye, L as qe, j as de, applyOledMode as me, getCurrentGeoLocation as Ke, graphQLRequest as ue, handleServiceWorkerToggle as Qe, SERVICE_TYPES as he } from "./index.rzw7MU5J.js";
3
- import { AppContext as Je, useCapability as pe, Panel as Xe, Toggle as l, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./App.CV0Bjlae.js";
4
- import { TextArea as Ne } from "./index.BXdpJpQs.js";
2
+ import { n as Pe, useEntitlements as Be, useUserPreferences as Ue, C as ce, useLocalStorage as ie, LOCAL_STORAGE_OLED_MODE as Ge, LOCAL_STORAGE_FULL_SCREEN as Fe, canEvaluateModels as Ve, H as We, getCacheInfo as $e, isServiceWorkerEnabled as ze, SETTINGS_TITLE as He, Card as p, CARDS as r, b as je, Button as x, PROMPTS_DESCRIPTION as Ye, L as qe, j as de, applyOledMode as me, getCurrentGeoLocation as Ke, graphQLRequest as ue, handleServiceWorkerToggle as Qe, SERVICE_TYPES as he } from "./index.RtpWGHE1.js";
3
+ import { AppContext as Je, useCapability as pe, Panel as Xe, Toggle as l, APP_SET_OLED_MODE as Ee, APP_SET_FULL_SCREEN as Se } from "./App.DXGdoHmW.js";
4
+ import { TextArea as Ne } from "./index.BkbSbOap.js";
5
5
  import { useContext as Ze, useState as n, useMemo as et, useCallback as tt, useEffect as ge } from "react";
6
6
  const lt = ({
7
7
  open: fe,
@@ -1,8 +1,8 @@
1
1
  import { jsx as l, jsxs as y } from "react/jsx-runtime";
2
- import { ButtonSort_private as f } from "./index.rzw7MU5J.js";
2
+ import { ButtonSort_private as f } from "./index.RtpWGHE1.js";
3
3
  import o from "clsx";
4
4
  import v, { useContext as b } from "react";
5
- import { e as k } from "./App.CV0Bjlae.js";
5
+ import { e as k } from "./App.DXGdoHmW.js";
6
6
  /*!
7
7
  @versini/ui-icons v4.15.1
8
8
  © 2025 gizmette.com
@@ -1,13 +1,13 @@
1
1
  import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { n as f, useUniqueId as v, useUserChatStats as _, useChatsUsage as z, USAGE_TITLE as B, Card as g, renderDataAsList as P, CARDS as a, L as p, j as A, Button as i, pluralize as m } from "./index.rzw7MU5J.js";
3
- import { Panel as H } from "./App.CV0Bjlae.js";
2
+ import { n as f, useUniqueId as v, useUserChatStats as _, useChatsUsage as z, USAGE_TITLE as B, Card as g, renderDataAsList as P, CARDS as a, L as p, j as A, Button as i, pluralize as m } from "./index.RtpWGHE1.js";
3
+ import { Panel as H } from "./App.DXGdoHmW.js";
4
4
  import { useState as C, Suspense as K, lazy as j } from "react";
5
5
  const s = [0, 3, 6, 9], n = {
6
6
  TOKEN: "token",
7
7
  MODEL: "model"
8
8
  }, w = j(() => import(
9
9
  /* webpackChunkName: "LazyChart" */
10
- "./Chart.uzxgAiX2.js"
10
+ "./Chart.BTyaVE_V.js"
11
11
  )), R = ({
12
12
  open: k,
13
13
  onOpenChange: E
@@ -1,10 +1,10 @@
1
1
  import { jsx as e, jsxs as r, Fragment as b } from "react/jsx-runtime";
2
- import { L as R, j as A, Button as M, n as Ne, useLocalStorage as K, LOCAL_STORAGE_PREFIX as Q, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ke, useUserMemories as Se, useExpiredMemories as Te, useDeleteMemory as ve, useDeleteAllActiveMemories as De, useDeleteAllExpiredMemories as Me, useUpdateMemory as Ee, useRestoreMemory as be, ButtonIcon as O, IconEdit as Re, IconDelete as Z, IconRestore as Ie } from "./index.rzw7MU5J.js";
3
- import { Panel as le, Toggle as _, e as l, ConfirmationPanel as ee, Tooltip as z } from "./App.CV0Bjlae.js";
2
+ import { L as R, j as A, Button as M, n as Ne, useLocalStorage as K, LOCAL_STORAGE_PREFIX as Q, LOCAL_STORAGE_SORT_MEMORY_DIRECTION as we, LOCAL_STORAGE_SORT_MEMORY_COLUMN as ke, useUserMemories as Se, useExpiredMemories as Te, useDeleteMemory as ve, useDeleteAllActiveMemories as De, useDeleteAllExpiredMemories as Me, useUpdateMemory as Ee, useRestoreMemory as be, ButtonIcon as O, IconEdit as Re, IconDelete as Z, IconRestore as Ie } from "./index.RtpWGHE1.js";
3
+ import { Panel as le, Toggle as _, e as l, ConfirmationPanel as ee, Tooltip as z } from "./App.DXGdoHmW.js";
4
4
  import y from "clsx";
5
5
  import { useState as C, useEffect as Le, useRef as te } from "react";
6
- import { TextArea as Oe } from "./index.BXdpJpQs.js";
7
- import { W as re, j as ie, G as D, M as s, F as B, H as ne, D as oe } from "./Table.Ckql2SnG.js";
6
+ import { TextArea as Oe } from "./index.BkbSbOap.js";
7
+ import { W as re, j as ie, G as D, M as s, F as B, H as ne, D as oe } from "./Table.CcIpdr5t.js";
8
8
  const _e = ({
9
9
  open: N,
10
10
  onOpenChange: E,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as oe, jsx as h } from "react/jsx-runtime";
2
- import { useMergeRefs as ce, useResizeObserver as W, useUniqueId as ne, useUncontrolled as le, LiveRegion as ie } from "./index.rzw7MU5J.js";
2
+ import { useMergeRefs as ce, useResizeObserver as W, useUniqueId as ne, useUncontrolled as le, LiveRegion as ie } from "./index.RtpWGHE1.js";
3
3
  import ue, { useRef as k, useState as I, useLayoutEffect as R } from "react";
4
4
  import o from "clsx";
5
5
  /*!
@@ -1,5 +1,5 @@
1
- import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.B4NWSGJz.js";
2
- import { toText as Ca } from "./index.BdPmgM6G.js";
1
+ import { find as Aa, parse as Ft, parse$1 as Ht, normalize as Pt, html as Ta, svg as Ba, visitParents as Na, SKIP as Da } from "./useMarkdown.a9gbIvtd.js";
2
+ import { toText as Ca } from "./index.CEhhP2GE.js";
3
3
  const Gt = /[#.]/g;
4
4
  function qa(r, e) {
5
5
  const t = r || "", a = {};
@@ -1,4 +1,4 @@
1
- import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.B4NWSGJz.js";
1
+ import { factorySpace as M, markdownLineEnding as g } from "./useMarkdown.a9gbIvtd.js";
2
2
  import { longestStreak as q } from "./index.Cyw5OC0t.js";
3
3
  function b() {
4
4
  return {
@@ -1,4 +1,4 @@
1
- import { convert as E, convertElement as u } from "./useMarkdown.B4NWSGJz.js";
1
+ import { convert as E, convertElement as u } from "./useMarkdown.a9gbIvtd.js";
2
2
  const f = (
3
3
  // Note: overloads like this are needed to support optional generics.
4
4
  /**
@@ -0,0 +1,153 @@
1
+ import { jsxs as h, jsx as l } from "react/jsx-runtime";
2
+ import { ButtonIcon as E, IconCopied as C, IconCopy as I } from "./index.RtpWGHE1.js";
3
+ import { useState as N, useEffect as $ } from "react";
4
+ import t from "clsx";
5
+ /*!
6
+ @versini/ui-bubble v6.4.0
7
+ © 2025 gizmette.com
8
+ */
9
+ try {
10
+ window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
11
+ version: "6.4.0",
12
+ buildTime: "11/05/2025 08:07 PM EST",
13
+ homepage: "https://github.com/aversini/ui-components",
14
+ license: "MIT"
15
+ });
16
+ } catch {
17
+ }
18
+ const u = "av-bubble", T = ({ kind: e, noMaxWidth: r }) => t("px-4 py-2", {
19
+ "max-w-xs sm:max-w-md md:max-w-2xl": !r,
20
+ "lg:max-w-3xl": e === "left" && !r
21
+ }), S = ({ kind: e, gradient: r }) => r ? r === "light" ? t({
22
+ "bg-gradient-to-b from-surface-light/80 to-surface-light dark:from-surface-dark/80 dark:to-surface-dark": e === "left",
23
+ "bg-gradient-to-b from-surface-accent/80 to-surface-accent": e === "right"
24
+ }) : r === "medium" ? t({
25
+ "bg-gradient-to-b from-surface-light/65 to-surface-light dark:from-surface-dark/65 dark:to-surface-dark": e === "left",
26
+ "bg-gradient-to-b from-surface-accent/65 to-surface-accent": e === "right"
27
+ }) : t({
28
+ "bg-gradient-to-b from-surface-light/50 to-surface-light dark:from-surface-dark/50 dark:to-surface-dark": e === "left",
29
+ "bg-gradient-to-b from-surface-accent/50 to-surface-accent": e === "right"
30
+ }) : t({
31
+ "bg-surface-light dark:bg-surface-dark": e === "left",
32
+ "bg-surface-accent": e === "right"
33
+ }), z = ({ kind: e }) => t("prose prose-dark dark:prose-lighter", "prose-blockquote:my-1", "prose-ol:my-1 prose-ul:my-1", {
34
+ "text-copy-lighter": e === "right"
35
+ }), U = ({ kind: e, tail: r }) => {
36
+ if (r)
37
+ return t(`${u}-${e}-tail`, "rounded-3xl", "relative", "before:content-['']", "before:w-3", "before:h-2", "before:absolute", "before:bottom-0", {
38
+ "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",
39
+ "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"
40
+ });
41
+ if (!r)
42
+ return t("rounded-b-xl", {
43
+ "rounded-tr-xl": e === "left",
44
+ "rounded-tl-xl": e === "right"
45
+ });
46
+ }, L = ({ kind: e, className: r, contentClassName: i, noMaxWidth: n, tail: o, gradient: b }) => {
47
+ const s = t(u, `${u}-${e}`, "flex items-start", {
48
+ "flex-row-reverse": e === "right"
49
+ }, r), m = t(`${u}-content`, "flex flex-col empty:hidden", T({
50
+ kind: e,
51
+ noMaxWidth: n
52
+ }), z({
53
+ kind: e
54
+ }), S({
55
+ kind: e,
56
+ gradient: b
57
+ }), U({
58
+ kind: e,
59
+ tail: o
60
+ }), i), g = "pr-2 pt-1 text-end text-xs text-copy-light", d = t("flex flex-col-reverse sm:flex-row", {
61
+ "ml-2": e === "left" && !o,
62
+ "mr-2": e === "right" && !o,
63
+ "ml-1": e === "left" && o,
64
+ "mr-1": e === "right" && o
65
+ });
66
+ return {
67
+ wrapper: s,
68
+ main: m,
69
+ footer: g,
70
+ copyButton: d
71
+ };
72
+ }, M = "FOOTER_EMPTY", V = ({ children: e, kind: r = "left", className: i, contentClassName: n, footer: o, rawFooter: b, copyToClipboard: s, copyToClipboardFocusMode: m = "system", copyToClipboardMode: g = "system", noMaxWidth: d = !1, tail: w = !1, gradient: y }) => {
73
+ const [f, x] = N(!1), c = L({
74
+ kind: r,
75
+ className: i,
76
+ contentClassName: n,
77
+ noMaxWidth: d,
78
+ tail: w,
79
+ gradient: y
80
+ }), _ = !!s && (typeof s == "function" || typeof s == "string" || typeof e == "string"), v = () => {
81
+ x(!0), typeof s == "function" ? s(e) : typeof s == "string" ? navigator.clipboard.writeText(s) : typeof e == "string" && navigator.clipboard.writeText(e);
82
+ };
83
+ return $(() => {
84
+ let a;
85
+ return f && (a = window.setTimeout(() => {
86
+ x(!1);
87
+ }, 3e3)), () => {
88
+ clearTimeout(a);
89
+ };
90
+ }, [
91
+ f
92
+ ]), /* @__PURE__ */ h("div", {
93
+ className: c.wrapper,
94
+ children: [
95
+ /* @__PURE__ */ h("div", {
96
+ children: [
97
+ /* @__PURE__ */ l("div", {
98
+ className: c.main,
99
+ children: e
100
+ }),
101
+ o && Object.keys(o).map((a, B) => {
102
+ const p = o[a];
103
+ return p === M ? /* @__PURE__ */ l("div", {
104
+ className: "prose-p:m-0",
105
+ children: /* @__PURE__ */ l("p", {
106
+ className: c.footer,
107
+ "aria-hidden": "true",
108
+ children: /* @__PURE__ */ l("span", {
109
+ className: "invisible",
110
+ children: " "
111
+ })
112
+ })
113
+ }, `${a}-${B}`) : p ? /* @__PURE__ */ l("div", {
114
+ className: "prose-p:m-0",
115
+ children: /* @__PURE__ */ h("p", {
116
+ className: c.footer,
117
+ children: [
118
+ a,
119
+ ": ",
120
+ p
121
+ ]
122
+ })
123
+ }, `${a}-${B}`) : null;
124
+ }),
125
+ b && b
126
+ ]
127
+ }),
128
+ _ && /* @__PURE__ */ l("div", {
129
+ className: c.copyButton,
130
+ children: /* @__PURE__ */ l(E, {
131
+ noBorder: !0,
132
+ noBackground: !0,
133
+ size: "small",
134
+ mode: g,
135
+ focusMode: m,
136
+ label: f ? "Copied to clipboard" : "Copy to clipboard",
137
+ onClick: v,
138
+ disabled: f,
139
+ children: f ? /* @__PURE__ */ l(C, {
140
+ size: "size-3"
141
+ }) : /* @__PURE__ */ l(I, {
142
+ size: "size-3"
143
+ })
144
+ })
145
+ })
146
+ ]
147
+ });
148
+ };
149
+ export {
150
+ u as BUBBLE_CLASSNAME,
151
+ M as BUBBLE_FOOTER_EMPTY,
152
+ V as Bubble
153
+ };
@@ -1,4 +1,4 @@
1
- import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.B4NWSGJz.js";
1
+ import { convert as se, visitParents as Me, unicodeWhitespace as I, unicodePunctuation as N, normalizeIdentifier as _, classifyCharacter as W, visit as _e, toString as ce, EXIT as Oe, asciiAlphanumeric as Z, asciiAlpha as P, markdownLineEndingOrSpace as A, asciiControl as je, blankLine as Be, factorySpace as S, splice as q, resolveAll as We, markdownLineEnding as R, markdownSpace as T, combineExtensions as $e } from "./useMarkdown.a9gbIvtd.js";
2
2
  import { longestStreak as qe } from "./index.Cyw5OC0t.js";
3
3
  function ne(e, n) {
4
4
  const t = String(e);
@@ -7673,7 +7673,7 @@ Press Ctrl+Enter to send it or Enter for new line.`, ku = "{{clipboard}}", D = "
7673
7673
  ] });
7674
7674
  }, oc = new URL(document.location.href).searchParams, Ur = !!oc.get("debug") || !1, cc = rn(() => import(
7675
7675
  /* webpackChunkName: "LazyApp" */
7676
- "./App.CV0Bjlae.js"
7676
+ "./App.DXGdoHmW.js"
7677
7677
  ).then((e) => e.App)), lc = new An(), Hr = ({
7678
7678
  isComponent: e,
7679
7679
  headerHeight: t
@@ -1,6 +1,6 @@
1
- import { getDefaultExportFromCjs as kn } from "./App.CV0Bjlae.js";
2
- import { visit as In } from "./useMarkdown.B4NWSGJz.js";
3
- import { toText as Cn } from "./index.BdPmgM6G.js";
1
+ import { getDefaultExportFromCjs as kn } from "./App.DXGdoHmW.js";
2
+ import { visit as In } from "./useMarkdown.a9gbIvtd.js";
3
+ import { toText as Cn } from "./index.CEhhP2GE.js";
4
4
  function xn(e) {
5
5
  const t = e.regex, i = e.COMMENT("//", "$", { contains: [{ begin: /\\\n/ }] }), a = "decltype\\(auto\\)", r = "[a-zA-Z_]\\w*::", d = "(?!struct)(" + a + "|" + t.optional(r) + "[a-zA-Z_]\\w*" + t.optional("<[^<>]+>") + ")", c = {
6
6
  className: "type",