@versini/sassysaint 8.118.4 → 8.119.1

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 (87) hide show
  1. package/dist/chunks/{AboutChangelog.Dspi4cmi.js → AboutChangelog.DUUKJ4nJ.js} +2 -2
  2. package/dist/chunks/{AboutEntry.DxWZPlbg.js → AboutEntry.HowTPv8P.js} +7 -7
  3. package/dist/chunks/{App.yIuQGm0t.js → App.YH7VhNjK.js} +647 -646
  4. package/dist/chunks/{BubbleActions.BMYwxyEv.js → BubbleActions.CVas6oiy.js} +3 -3
  5. package/dist/chunks/ButtonIconDelete.DLIImGjj.js +538 -0
  6. package/dist/chunks/{Chart.C1IWoXDe.js → Chart.CgyzOc3_.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.BKlO1McH.js → ChatBubbleAssistant.PmI4ABQt.js} +9 -6
  8. package/dist/chunks/{ChatBubbleUser.CSjDB1B9.js → ChatBubbleUser.YIoXqbVF.js} +4 -4
  9. package/dist/chunks/HistoryDataGrid.Dxc-zHra.js +487 -0
  10. package/dist/chunks/HistoryEntry.fta5Qy7u.js +305 -0
  11. package/dist/chunks/InlineFilter.BV1LITjW.js +123 -0
  12. package/dist/chunks/{LoginEntry.BEPZiizw.js → LoginEntry.s9rmuYKn.js} +4 -4
  13. package/dist/chunks/{LogoEntry.BZFz5IRw.js → LogoEntry.BAI8lPSQ.js} +175 -163
  14. package/dist/chunks/{MemoriesEntry.C40K6l5F.js → MemoriesEntry.z0U8T17Y.js} +234 -206
  15. package/dist/chunks/{ProfileEntry.C0WTyHem.js → ProfileEntry.CbUS7vRG.js} +4 -4
  16. package/dist/chunks/{SettingsEntry.B1WFVdjg.js → SettingsEntry.LEugTL8A.js} +5 -5
  17. package/dist/chunks/{UsageEntry.CPOickJC.js → UsageEntry.DMIbfTUl.js} +5 -5
  18. package/dist/chunks/{_baseUniq.YXUy3_Q9.js → _baseUniq.3SecgKQH.js} +1 -1
  19. package/dist/chunks/{arc.CgPKPJv0.js → arc.BDfa_lp3.js} +1 -1
  20. package/dist/chunks/{architecture-U656AL7Q.D2ZUn_s6.js → architecture-U656AL7Q.HFVQwsOS.js} +1 -1
  21. package/dist/chunks/{architectureDiagram-VXUJARFQ.DbVJLkeI.js → architectureDiagram-VXUJARFQ.BvrTiPQ0.js} +4 -4
  22. package/dist/chunks/{blockDiagram-VD42YOAC.DFlSEVyA.js → blockDiagram-VD42YOAC.DOklLUrl.js} +5 -5
  23. package/dist/chunks/{browser.DtDEL-3A.js → browser.DQk9GqZL.js} +1 -1
  24. package/dist/chunks/{c4Diagram-YG6GDRKO.CiBMNtX8.js → c4Diagram-YG6GDRKO.BFUTTk1Y.js} +2 -2
  25. package/dist/chunks/{channel.DS55bkfq.js → channel.BOFo9Gr-.js} +1 -1
  26. package/dist/chunks/{chunk-4BX2VUAB.t3AfQtrb.js → chunk-4BX2VUAB.CvDkLN8F.js} +1 -1
  27. package/dist/chunks/{chunk-55IACEB6.tlGBBIP8.js → chunk-55IACEB6.B2kRln8j.js} +1 -1
  28. package/dist/chunks/{chunk-B4BG7PRW.DB-Y3GhQ.js → chunk-B4BG7PRW.Corbwbnt.js} +4 -4
  29. package/dist/chunks/{chunk-DI55MBZ5.CkwKVFLI.js → chunk-DI55MBZ5.BT3HHSn0.js} +3 -3
  30. package/dist/chunks/{chunk-FMBD7UC4.CRLAfQmx.js → chunk-FMBD7UC4.5EY27HC-.js} +1 -1
  31. package/dist/chunks/{chunk-QN33PNHL.DF4bWkbp.js → chunk-QN33PNHL.BbRol0tK.js} +1 -1
  32. package/dist/chunks/{chunk-QZHKN3VN.BijmX3ar.js → chunk-QZHKN3VN.BDDo68fx.js} +1 -1
  33. package/dist/chunks/{chunk-TZMSLE5B.BIvqaR0r.js → chunk-TZMSLE5B.DUziio9C.js} +1 -1
  34. package/dist/chunks/{classDiagram-2ON5EDUG.SU5U-1P1.js → classDiagram-2ON5EDUG.CQzgRWsN.js} +2 -2
  35. package/dist/chunks/{classDiagram-v2-WZHVMYZB.SU5U-1P1.js → classDiagram-v2-WZHVMYZB.CQzgRWsN.js} +2 -2
  36. package/dist/chunks/{clone.8clUx6ET.js → clone.BbTV7Hf1.js} +1 -1
  37. package/dist/chunks/{cose-bilkent-S5V4N54A.DnWtIsYd.js → cose-bilkent-S5V4N54A.H-phdC7M.js} +2 -2
  38. package/dist/chunks/{dagre-6UL2VRFP.C8KeFvOQ.js → dagre-6UL2VRFP.x6Rep04B.js} +5 -5
  39. package/dist/chunks/{diagram-PSM6KHXK.DnzHPurw.js → diagram-PSM6KHXK.CSCzs70K.js} +4 -4
  40. package/dist/chunks/{diagram-QEK2KX5R.DCKZbQSh.js → diagram-QEK2KX5R.Dtem9HUK.js} +3 -3
  41. package/dist/chunks/{diagram-S2PKOQOG.lY2nb2ry.js → diagram-S2PKOQOG.zbHWbMaf.js} +3 -3
  42. package/dist/chunks/{erDiagram-Q2GNP2WA.BYtHx1uZ.js → erDiagram-Q2GNP2WA.BtpqAsGU.js} +4 -4
  43. package/dist/chunks/{flowDiagram-NV44I4VS.G-nRLM7M.js → flowDiagram-NV44I4VS.DWAr7BjD.js} +5 -5
  44. package/dist/chunks/{ganttDiagram-JELNMOA3.B7RwC1m-.js → ganttDiagram-JELNMOA3.CMrQ-dz3.js} +2 -2
  45. package/dist/chunks/{gitGraph-F6HP7TQM.Chwk8Igs.js → gitGraph-F6HP7TQM.BpVVMz0e.js} +1 -1
  46. package/dist/chunks/{gitGraphDiagram-NY62KEGX.BQpsCwST.js → gitGraphDiagram-NY62KEGX.Dnudwhw8.js} +4 -4
  47. package/dist/chunks/{graph.toxuN_lw.js → graph.Dchkn011.js} +2 -2
  48. package/dist/chunks/{index.KxPrp_tf.js → index.B-JCLT_X.js} +3 -3
  49. package/dist/chunks/{index.Bt339Jho.js → index.B8WGlS1_.js} +1 -1
  50. package/dist/chunks/{index.petd1VFV.js → index.C1iOYl0L.js} +1 -1
  51. package/dist/chunks/{index.BlDUpXR0.js → index.CFiwZc0d.js} +1 -1
  52. package/dist/chunks/{index.ChIqgESd.js → index.CJdOzh65.js} +1 -1
  53. package/dist/chunks/{index.mDr9FsVI.js → index.CKTPHcKB.js} +1 -1
  54. package/dist/chunks/{index.D_muERB9.js → index.CtIbZ6tf.js} +1 -1
  55. package/dist/chunks/{index.7D5oQmQR.js → index.CxH0cB2j.js} +3 -3
  56. package/dist/chunks/{index.hGvmkGha.js → index.jtqzynwK.js} +2 -2
  57. package/dist/chunks/{info-NVLQJR56.DqwhVDNM.js → info-NVLQJR56.D6y19kSs.js} +1 -1
  58. package/dist/chunks/{infoDiagram-WHAUD3N6.Bz9PwgrD.js → infoDiagram-WHAUD3N6.Df1Bl645.js} +2 -2
  59. package/dist/chunks/{journeyDiagram-XKPGCS4Q.b8ugCUee.js → journeyDiagram-XKPGCS4Q.Ci2alRy7.js} +4 -4
  60. package/dist/chunks/{kanban-definition-3W4ZIXB7.ruPmZWrk.js → kanban-definition-3W4ZIXB7.DfuyRvt8.js} +2 -2
  61. package/dist/chunks/{layout.Bw1IU1i2.js → layout.D90hHM4d.js} +4 -4
  62. package/dist/chunks/{mermaid-parser.core.BgEYW9Yt.js → mermaid-parser.core.DLE_P-x2.js} +10 -10
  63. package/dist/chunks/{min.C98rd9wr.js → min.B0AjWADq.js} +2 -2
  64. package/dist/chunks/{mindmap-definition-VGOIOE7T.VWXpOB6F.js → mindmap-definition-VGOIOE7T.Bu83LzTN.js} +257 -232
  65. package/dist/chunks/{packet-BFZMPI3H.BYL6GQTI.js → packet-BFZMPI3H.DxZoEqgw.js} +1 -1
  66. package/dist/chunks/{pie-7BOR55EZ.BbY5iD1e.js → pie-7BOR55EZ.DWdiSl6K.js} +1 -1
  67. package/dist/chunks/{pieDiagram-ADFJNKIX.CsOtW7r-.js → pieDiagram-ADFJNKIX.BDwKttQ7.js} +4 -4
  68. package/dist/chunks/{quadrantDiagram-AYHSOK5B.7UFNI_vX.js → quadrantDiagram-AYHSOK5B.CRt3S_H1.js} +1 -1
  69. package/dist/chunks/{radar-NHE76QYJ.DvagCir3.js → radar-NHE76QYJ.CoZXKuQy.js} +1 -1
  70. package/dist/chunks/{rehype-mermaid.hM-_EEUn.js → rehype-mermaid.Om4IoSir.js} +33 -33
  71. package/dist/chunks/{requirementDiagram-UZGBJVZJ.CBvrcwfU.js → requirementDiagram-UZGBJVZJ.DlBPAOx9.js} +3 -3
  72. package/dist/chunks/{sankeyDiagram-TZEHDZUN.DwPokg-1.js → sankeyDiagram-TZEHDZUN.BZytE4s9.js} +1 -1
  73. package/dist/chunks/{sequenceDiagram-WL72ISMW.DTlYi-bq.js → sequenceDiagram-WL72ISMW.Bbuw9Hz-.js} +3 -3
  74. package/dist/chunks/{stateDiagram-FKZM4ZOC.B3zjLqs6.js → stateDiagram-FKZM4ZOC.BsnKKwn5.js} +4 -4
  75. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.M0ePKl-7.js → stateDiagram-v2-4FDKWEC3.BsNASJkO.js} +2 -2
  76. package/dist/chunks/{timeline-definition-IT6M3QCI.QqZxgHc2.js → timeline-definition-IT6M3QCI.R8tQley7.js} +2 -2
  77. package/dist/chunks/{treemap-KMMF4GRG.BmCv7l6d.js → treemap-KMMF4GRG.Cs8W98VP.js} +1 -1
  78. package/dist/chunks/{useMarkdown.ZHvHgCd8.js → useMarkdown.Bzgv93hs.js} +8 -8
  79. package/dist/chunks/{xychartDiagram-PRI3JC2R.CPjv7vTS.js → xychartDiagram-PRI3JC2R.SMqCrVMM.js} +1 -1
  80. package/dist/components/SassySaint/SassySaint.js +1 -1
  81. package/dist/index.js +3 -3
  82. package/dist/style.css +1 -1
  83. package/package.json +4 -4
  84. package/dist/chunks/ButtonIconDelete.BMqZFgu1.js +0 -326
  85. package/dist/chunks/ChatHistoryTable.B8dA3To0.js +0 -322
  86. package/dist/chunks/HistoryEntry.Bhv62llk.js +0 -333
  87. package/dist/chunks/useAnimatedHeight.3F4Xj7iE.js +0 -91
@@ -0,0 +1,305 @@
1
+ import { jsxs as i, jsx as a, Fragment as z } from "react/jsx-runtime";
2
+ import { n as q, LOCAL_STORAGE_PREFIX as d, LOCAL_STORAGE_SORT_TIMESTAMP as X, LOCAL_STORAGE_SORT_TOKEN_USAGE as J, LOCAL_STORAGE_SORT as Z, y as x, LOCAL_STORAGE_CHAT_ID as $, useDeleteChat as ee, useToggleFavoriteChat as te, graphQLRequest as ae, SERVICE_TYPES as re, ACTION_SORT as se, V as oe, LOCAL_STORAGE_SEARCH as ie, LOCAL_STORAGE_FAVORITES_ONLY as ne, LOCAL_STORAGE_KEYWORD_MATCH_ALL as le, useChatsHistory as ce, useUserChatStats as de, ACTION_SEARCH as he } from "./index.jtqzynwK.js";
3
+ import { InlineFilter as Ce, AnimatedWrapper as ue } from "./InlineFilter.BV1LITjW.js";
4
+ import { HistoryContext as Q, ChatContext as me, SortDirections as c, APP_CLASSNAME as Se, TOAST_CHAT_DELETED as ye, HISTORY_TITLE as fe } from "./LogoEntry.BAI8lPSQ.js";
5
+ import { useAiChat as Te, useLocalStorage as h, LazyToastContainerWrapper as pe, v4 as Ae, CHAT_RESET as ge, CHAT_SET_ATTACHMENTS as De, CHAT_SET_STATUS as _e, showErrorToast as Ee, ConfirmationPanel as Oe, Panel as ke, debounce as Le, Toggle as B, ButtonCancel as Re } from "./App.YH7VhNjK.js";
6
+ import { useRef as K, useContext as Y, Suspense as ve, lazy as we, useState as I, useCallback as W, useEffect as He } from "react";
7
+ const be = we(
8
+ () => import(
9
+ /* webpackChunkName: "history-datagrid" */
10
+ "./HistoryDataGrid.Dxc-zHra.js"
11
+ ).then(
12
+ (C) => ({ default: C.HistoryDataGrid })
13
+ )
14
+ ), Ie = ({
15
+ filteredHistory: C,
16
+ onOpenChange: f,
17
+ mutate: T,
18
+ isLoading: D = !1,
19
+ totalHistoryCount: _,
20
+ isFiltered: E = !1,
21
+ isSearchActive: O = !1,
22
+ requestConfirmation: u
23
+ }) => {
24
+ const { user: r, getAccessToken: p } = q(), F = K({
25
+ id: "",
26
+ timestamp: "",
27
+ message: ""
28
+ }), { state: s, dispatch: N } = Y(Q), A = {
29
+ sortDirection: s.sortDirection || c.DESC,
30
+ sortedCell: s.sortedCell || x
31
+ }, {
32
+ setChatId: k,
33
+ setInitialMessages: L,
34
+ dispatch: m
35
+ } = Y(me), { setInput: S } = Te(), [g, R] = h({
36
+ key: d + X,
37
+ initialValue: c.DESC
38
+ }), [v, G] = h({
39
+ key: d + J,
40
+ initialValue: c.ASC
41
+ }), [, M] = h({
42
+ key: d + Z,
43
+ initialValue: x
44
+ }), [n] = h({
45
+ key: d + $,
46
+ initialValue: ""
47
+ }), { mutateAsync: V } = ee({ getAccessToken: p }), { mutateAsync: w } = te({
48
+ getAccessToken: p
49
+ }), H = (t) => {
50
+ const o = s.sortedCell === t;
51
+ let e, y;
52
+ switch (t) {
53
+ case x:
54
+ y = R, e = o ? s.sortDirection : g;
55
+ break;
56
+ case oe:
57
+ y = G, e = o ? s.sortDirection : v;
58
+ break;
59
+ default:
60
+ y = R, e = o ? s.sortDirection : g;
61
+ break;
62
+ }
63
+ const j = e === c.ASC ? c.DESC : c.ASC;
64
+ y(j), M(t), N({
65
+ type: se,
66
+ payload: {
67
+ sortedCell: t,
68
+ sortDirection: j
69
+ }
70
+ });
71
+ }, l = async (t) => {
72
+ try {
73
+ await V({
74
+ userId: r?.username || "",
75
+ id: t
76
+ }), T(""), await Ee(ye, {
77
+ autoClose: 2e3,
78
+ containerId: "history-table"
79
+ });
80
+ } catch {
81
+ }
82
+ }, P = async (t) => {
83
+ try {
84
+ const o = await p(), e = await ae({
85
+ accessToken: o,
86
+ type: re.GET_CHAT,
87
+ params: {
88
+ id: t.id
89
+ }
90
+ });
91
+ m({
92
+ type: _e,
93
+ payload: {
94
+ streaming: !1,
95
+ loading: !1,
96
+ restoring: !0,
97
+ restoredModel: e.data?.model || "",
98
+ restoredTimestamp: e.data?.timestamp || "",
99
+ restoredUsage: e.data?.tokenUsage || 0
100
+ }
101
+ }), S(""), k(t.id), L(e.data.messages), f(!1);
102
+ } catch {
103
+ }
104
+ }, b = (t) => {
105
+ F.current = {
106
+ id: t.id,
107
+ timestamp: t.timestamp,
108
+ message: t.summary
109
+ }, u(
110
+ () => l(t.id),
111
+ /* @__PURE__ */ i(z, { children: [
112
+ /* @__PURE__ */ a("p", { className: "m-0", children: "Are you sure you want to delete the following chat:" }),
113
+ /* @__PURE__ */ i("ul", { className: "m-0", children: [
114
+ /* @__PURE__ */ i("li", { children: [
115
+ "Timestamp: ",
116
+ /* @__PURE__ */ a("span", { className: "text-lg", children: t.timestamp })
117
+ ] }),
118
+ /* @__PURE__ */ i("li", { children: [
119
+ "First message: ",
120
+ /* @__PURE__ */ a("span", { className: "text-lg", children: t.summary })
121
+ ] })
122
+ ] })
123
+ ] })
124
+ ), n === t.id && (k(Ae()), L([]), S(""), m({
125
+ type: ge,
126
+ payload: {
127
+ privateChat: !1,
128
+ reasoningText: !1
129
+ }
130
+ }), m({
131
+ type: De,
132
+ payload: {
133
+ attachments: 0
134
+ }
135
+ }));
136
+ }, U = async (t) => {
137
+ try {
138
+ await w({
139
+ userId: r?.username || "",
140
+ id: t.id
141
+ }), T("");
142
+ } catch {
143
+ }
144
+ };
145
+ return /* @__PURE__ */ i("div", { children: [
146
+ /* @__PURE__ */ a("div", { className: Se, children: /* @__PURE__ */ a(pe, { containerId: "history-table" }) }),
147
+ /* @__PURE__ */ a(ve, { fallback: /* @__PURE__ */ a("div", {}), children: /* @__PURE__ */ a(
148
+ be,
149
+ {
150
+ filteredHistory: C,
151
+ sortDirection: A.sortDirection,
152
+ sortedCell: A.sortedCell,
153
+ onSortChange: H,
154
+ onClickRestore: P,
155
+ onClickDelete: b,
156
+ onClickFavorite: U,
157
+ isLoading: D,
158
+ totalHistoryCount: _,
159
+ isFiltered: E,
160
+ isSearchActive: O,
161
+ activeChatId: n
162
+ }
163
+ ) })
164
+ ] });
165
+ }, Pe = ({
166
+ open: C,
167
+ onOpenChange: f
168
+ }) => {
169
+ const T = K(null), { getAccessToken: D, user: _ } = q(), [E, O] = I([]), u = K(null), { state: r, dispatch: p } = Y(Q), [, F] = h({
170
+ key: d + ie,
171
+ initialValue: r.searchString
172
+ }), [s, N] = h({
173
+ key: d + ne,
174
+ initialValue: !1
175
+ }), [A, k] = h({
176
+ key: d + le,
177
+ initialValue: !0
178
+ }), [L, m] = I(!1), [S, g] = I(null), [R, v] = I(null), G = W(
179
+ (e, y) => {
180
+ g(() => e), v(y), m(!0);
181
+ },
182
+ []
183
+ ), M = W(() => {
184
+ S && S(), g(null), v(null);
185
+ }, [S]), {
186
+ data: n,
187
+ refetch: V,
188
+ isLoading: w,
189
+ isError: H
190
+ } = ce({
191
+ enabled: C,
192
+ user: _?.username || "",
193
+ searchString: r.searchString || "",
194
+ sortDirection: r.sortDirection || c.DESC,
195
+ sortedCell: r.sortedCell || x,
196
+ getAccessToken: D,
197
+ keywordMatchAll: A
198
+ }), { data: l } = de({
199
+ user: _?.username,
200
+ getAccessToken: D
201
+ }), P = l && l.totalChats ? l.totalChats - l.privateChats - l.deletedChats : 0;
202
+ He(() => {
203
+ n && O(
204
+ s ? n.filter((e) => e.favoriteChat === !0) : n
205
+ );
206
+ }, [n, s]);
207
+ const b = async (e) => {
208
+ F(e), p({
209
+ type: he,
210
+ payload: { searchString: e }
211
+ });
212
+ }, U = Le((e) => {
213
+ b(e.target.value.trim());
214
+ }, 800), t = (e) => {
215
+ N(e);
216
+ }, o = (e) => {
217
+ k(e);
218
+ };
219
+ return /* @__PURE__ */ i(z, { children: [
220
+ /* @__PURE__ */ a(
221
+ Oe,
222
+ {
223
+ showConfirmation: L,
224
+ setShowConfirmation: m,
225
+ action: M,
226
+ customStrings: {
227
+ confirmAction: "Delete",
228
+ cancelAction: "Cancel",
229
+ title: "Delete chat"
230
+ },
231
+ children: R
232
+ }
233
+ ),
234
+ /* @__PURE__ */ a(
235
+ ke,
236
+ {
237
+ open: C,
238
+ onOpenChange: f,
239
+ title: fe,
240
+ animation: !0,
241
+ animationType: "fade",
242
+ blurEffect: "large",
243
+ initialFocus: T,
244
+ className: "h-full sm:h-max",
245
+ footer: /* @__PURE__ */ a("div", { className: "flex flex-wrap justify-end gap-x-2 pb-8 sm:pb-0", children: /* @__PURE__ */ a("div", { className: "box-border max-w-full basis-auto", children: /* @__PURE__ */ a(Re, { onOpenChange: f, ref: T }) }) }),
246
+ children: /* @__PURE__ */ i("div", { className: "flex h-full flex-col gap-4", children: [
247
+ /* @__PURE__ */ a(
248
+ Ce,
249
+ {
250
+ header: w && r.searchString ? "Loading..." : r.searchString ? "Filters applied" : "Filters",
251
+ toggles: /* @__PURE__ */ i(z, { children: [
252
+ /* @__PURE__ */ a(
253
+ B,
254
+ {
255
+ name: "favorites-only",
256
+ checked: s,
257
+ onChange: t,
258
+ label: "Show favorites only",
259
+ narrow: !0,
260
+ noBorder: !0
261
+ }
262
+ ),
263
+ /* @__PURE__ */ a(
264
+ B,
265
+ {
266
+ name: "keyword-match-all",
267
+ checked: A,
268
+ onChange: o,
269
+ label: "Match all keywords",
270
+ narrow: !0,
271
+ noBorder: !0
272
+ }
273
+ )
274
+ ] }),
275
+ inputSearchRef: u,
276
+ onSearchChange: U,
277
+ defaultValue: r.searchString,
278
+ resetDisabled: r.searchString === "",
279
+ onResetSearch: () => {
280
+ b(""), u.current?.value && (u.current.value = "", u.current.focus());
281
+ }
282
+ }
283
+ ),
284
+ H && /* @__PURE__ */ a("p", { className: "m-0 text-copy-error-light", children: "Failed to load history." }),
285
+ !H && /* @__PURE__ */ a(ue, { dependency: E?.length ?? 0, children: /* @__PURE__ */ a(
286
+ Ie,
287
+ {
288
+ mutate: V,
289
+ filteredHistory: E,
290
+ onOpenChange: f,
291
+ isLoading: w,
292
+ totalHistoryCount: P,
293
+ isFiltered: !!(r.searchString || s),
294
+ isSearchActive: !!r.searchString,
295
+ requestConfirmation: G
296
+ }
297
+ ) })
298
+ ] })
299
+ }
300
+ )
301
+ ] });
302
+ };
303
+ export {
304
+ Pe as HistoryPanel
305
+ };
@@ -0,0 +1,123 @@
1
+ import { jsx as s, jsxs as g } from "react/jsx-runtime";
2
+ import { useRef as m, useState as A, useLayoutEffect as x } from "react";
3
+ import { IconSearch as N, Button as b } from "./LogoEntry.BAI8lPSQ.js";
4
+ import { Card as S } from "./index.CFiwZc0d.js";
5
+ import { TextInput as v } from "./index.CKTPHcKB.js";
6
+ const F = 300;
7
+ function H(e, c) {
8
+ const { duration: n = F, enabled: i = !0 } = c ?? {}, r = m(null), [t, a] = A({
9
+ height: "auto",
10
+ isAnimating: !1
11
+ }), l = m(0), f = m(e), o = m(0), u = m(null);
12
+ x(() => {
13
+ if (!r.current || !i)
14
+ return;
15
+ if (l.current === 0) {
16
+ l.current = r.current.offsetHeight, f.current = e;
17
+ return;
18
+ }
19
+ if (f.current === e)
20
+ return;
21
+ f.current = e;
22
+ const h = l.current, d = r.current.scrollHeight;
23
+ if (l.current = d, !(h === d || h === 0))
24
+ return u.current && clearTimeout(u.current), o.current && cancelAnimationFrame(o.current), a({
25
+ height: h,
26
+ isAnimating: !0
27
+ }), o.current = requestAnimationFrame(() => {
28
+ o.current = requestAnimationFrame(() => {
29
+ a({
30
+ height: d,
31
+ isAnimating: !0
32
+ }), u.current = setTimeout(() => {
33
+ a({
34
+ height: "auto",
35
+ isAnimating: !1
36
+ });
37
+ }, n);
38
+ });
39
+ }), () => {
40
+ u.current && clearTimeout(u.current), o.current && cancelAnimationFrame(o.current);
41
+ };
42
+ }, [
43
+ e,
44
+ n,
45
+ i
46
+ ]);
47
+ const p = i ? {
48
+ height: t.height === "auto" ? "auto" : `${t.height}px`,
49
+ overflow: t.isAnimating ? "hidden" : void 0,
50
+ transition: t.isAnimating ? `height ${n}ms ease-out` : void 0
51
+ } : {};
52
+ return {
53
+ ref: r,
54
+ style: p,
55
+ isAnimating: t.isAnimating
56
+ };
57
+ }
58
+ const k = ({ children: e, dependency: c, duration: n, enabled: i = !0, className: r }) => {
59
+ const { ref: t, style: a } = H(c, {
60
+ duration: n,
61
+ enabled: i
62
+ });
63
+ return /* @__PURE__ */ s("div", {
64
+ ref: t,
65
+ style: a,
66
+ className: r,
67
+ children: e
68
+ });
69
+ }, w = ({
70
+ header: e,
71
+ toggles: c,
72
+ inputSearchRef: n,
73
+ onSearchChange: i,
74
+ onResetSearch: r,
75
+ defaultValue: t,
76
+ resetDisabled: a = !1
77
+ }) => /* @__PURE__ */ g(
78
+ S,
79
+ {
80
+ header: e,
81
+ className: "prose-dark dark:prose-lighter mb-4",
82
+ noBorder: !0,
83
+ compact: !0,
84
+ children: [
85
+ /* @__PURE__ */ s(
86
+ v,
87
+ {
88
+ placeholder: "Search",
89
+ labelHidden: !0,
90
+ noBorder: !0,
91
+ autoCapitalize: "off",
92
+ autoComplete: "off",
93
+ autoCorrect: "off",
94
+ ref: n,
95
+ defaultValue: t,
96
+ mode: "alt-system",
97
+ name: "Search",
98
+ label: "Search",
99
+ onChange: i,
100
+ className: "my-2",
101
+ rightElement: /* @__PURE__ */ s("div", { className: "dark:text-copy-dark text-copy-light", children: /* @__PURE__ */ s(N, { monotone: !0, size: "size-3" }) })
102
+ }
103
+ ),
104
+ /* @__PURE__ */ g("div", { className: "flex flex-col justify-between sm:flex-row gap-2 sm:mb-0 mb-1", children: [
105
+ /* @__PURE__ */ s("div", { className: "flex flex-col sm:flex-row gap-2 order-1 sm:order-0", children: c }),
106
+ /* @__PURE__ */ s(
107
+ b,
108
+ {
109
+ mode: "light",
110
+ size: "small",
111
+ disabled: a,
112
+ onClick: r,
113
+ children: "Reset Search"
114
+ }
115
+ )
116
+ ] })
117
+ ]
118
+ }
119
+ );
120
+ export {
121
+ k as AnimatedWrapper,
122
+ w as InlineFilter
123
+ };
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as e, Fragment as x } from "react/jsx-runtime";
2
- import { n as N, getLayoutPaddingClass as C, getMessageContaintWrapperClass as v, isTauri as w } from "./index.hGvmkGha.js";
3
- import { Logo as k, PASSWORD_PLACEHOLDER as M, ButtonIcon as u, IconShow as I, IconHide as L, Button as y, LOG_IN as E, LOG_IN_PASSKEY as S, IconPasskey as P } from "./LogoEntry.BZFz5IRw.js";
4
- import { Card as B } from "./index.BlDUpXR0.js";
5
- import { TextInput as O, TextInputMask as T } from "./index.mDr9FsVI.js";
2
+ import { n as N, getLayoutPaddingClass as C, getMessageContaintWrapperClass as v, isTauri as w } from "./index.jtqzynwK.js";
3
+ import { Logo as k, PASSWORD_PLACEHOLDER as M, ButtonIcon as u, IconShow as I, IconHide as L, Button as y, LOG_IN as E, LOG_IN_PASSKEY as S, IconPasskey as P } from "./LogoEntry.BAI8lPSQ.js";
4
+ import { Card as B } from "./index.CFiwZc0d.js";
5
+ import { TextInput as O, TextInputMask as T } from "./index.CKTPHcKB.js";
6
6
  import { useState as r, useEffect as f } from "react";
7
7
  const G = () => {
8
8
  const { login: h, logoutReason: o, loginWithPasskey: g } = N(), [t, l] = r(""), [d, n] = r(""), [m, p] = r(!0), [s, c] = r({