@versini/sassysaint 8.120.2 → 8.121.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 (84) hide show
  1. package/dist/chunks/{AboutChangelog.DoiRugZu.js → AboutChangelog.CueW7QKj.js} +2 -2
  2. package/dist/chunks/{AboutEntry.2lb6aCPw.js → AboutEntry.dQ_4JNsz.js} +7 -7
  3. package/dist/chunks/{App.LXYuxuaD.js → App.6iDkXSOb.js} +16 -16
  4. package/dist/chunks/{BubbleActions.BSynTDf9.js → BubbleActions.DB_SDTs9.js} +3 -3
  5. package/dist/chunks/ButtonIconDelete.B3hYKTP6.js +668 -0
  6. package/dist/chunks/{Chart.D4ePChIu.js → Chart.m2plpxTN.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.C1YCh4fN.js → ChatBubbleAssistant.DhP5KHH7.js} +5 -5
  8. package/dist/chunks/{ChatBubbleUser.D7rYXigx.js → ChatBubbleUser.DythvYOo.js} +4 -4
  9. package/dist/chunks/HistoryEntry._G88vZeP.js +721 -0
  10. package/dist/chunks/{LoginEntry.DXYZbzqN.js → LoginEntry.BBF4_rEV.js} +4 -4
  11. package/dist/chunks/{LogoEntry.DfnJLwfC.js → LogoEntry.BtwLANob.js} +82 -116
  12. package/dist/chunks/{MemoriesEntry.CWLD3Ziw.js → MemoriesEntry.r2Wtd8nu.js} +34 -35
  13. package/dist/chunks/{ProfileEntry.CF04C2No.js → ProfileEntry.DwGmWxH2.js} +4 -4
  14. package/dist/chunks/{SettingsEntry.CyITTF2y.js → SettingsEntry.D7b4vTwv.js} +5 -5
  15. package/dist/chunks/{UsageEntry.CYDJzsdG.js → UsageEntry.BB5KalRi.js} +5 -5
  16. package/dist/chunks/{_baseUniq.CSGd2q_x.js → _baseUniq.22z3R--R.js} +1 -1
  17. package/dist/chunks/{arc.BJiHJp13.js → arc.Cg0BJN6o.js} +1 -1
  18. package/dist/chunks/{architecture-U656AL7Q.DsDjCJCZ.js → architecture-U656AL7Q.D7Nmp0uq.js} +1 -1
  19. package/dist/chunks/{architectureDiagram-VXUJARFQ.BY-J8uT9.js → architectureDiagram-VXUJARFQ.D58LaEiy.js} +4 -4
  20. package/dist/chunks/{blockDiagram-VD42YOAC.DK7lHaHz.js → blockDiagram-VD42YOAC.BS_n-q2N.js} +5 -5
  21. package/dist/chunks/{browser.BsROFTmt.js → browser.YA6spcA7.js} +1 -1
  22. package/dist/chunks/{c4Diagram-YG6GDRKO.Qe2wImGt.js → c4Diagram-YG6GDRKO.lVOg2-ZH.js} +2 -2
  23. package/dist/chunks/{channel.DePjU_zU.js → channel.DqxR-oS7.js} +1 -1
  24. package/dist/chunks/{chunk-4BX2VUAB.CpiHY6xd.js → chunk-4BX2VUAB.D5lbe9g-.js} +1 -1
  25. package/dist/chunks/{chunk-55IACEB6.D9v7O2f8.js → chunk-55IACEB6.BlgGY9Q6.js} +1 -1
  26. package/dist/chunks/{chunk-B4BG7PRW.CZiUAwII.js → chunk-B4BG7PRW.Bn-86p3H.js} +4 -4
  27. package/dist/chunks/{chunk-DI55MBZ5.CsrXEMzK.js → chunk-DI55MBZ5.C2fqe7wu.js} +3 -3
  28. package/dist/chunks/{chunk-FMBD7UC4.kvQChVDk.js → chunk-FMBD7UC4.8IJZbT_o.js} +1 -1
  29. package/dist/chunks/{chunk-QN33PNHL.C52xMkBM.js → chunk-QN33PNHL.DOV2bTYS.js} +1 -1
  30. package/dist/chunks/{chunk-QZHKN3VN.DoS3CMXU.js → chunk-QZHKN3VN.CM1K8z3e.js} +1 -1
  31. package/dist/chunks/{chunk-TZMSLE5B.DSg6yj4E.js → chunk-TZMSLE5B.CH_b17FM.js} +1 -1
  32. package/dist/chunks/{classDiagram-2ON5EDUG.sF4InxFe.js → classDiagram-2ON5EDUG.DeWSBBaZ.js} +2 -2
  33. package/dist/chunks/{classDiagram-v2-WZHVMYZB.sF4InxFe.js → classDiagram-v2-WZHVMYZB.DeWSBBaZ.js} +2 -2
  34. package/dist/chunks/{clone.CVPkDcM5.js → clone.B0TtmQHA.js} +1 -1
  35. package/dist/chunks/{cose-bilkent-S5V4N54A.BfP6Pw4_.js → cose-bilkent-S5V4N54A.IzOlhIoo.js} +2 -2
  36. package/dist/chunks/{dagre-6UL2VRFP.CDSC4KTt.js → dagre-6UL2VRFP.COZ3hsXn.js} +5 -5
  37. package/dist/chunks/{diagram-PSM6KHXK.BKu8xN5f.js → diagram-PSM6KHXK.JEnBJXhp.js} +4 -4
  38. package/dist/chunks/{diagram-QEK2KX5R.CV6FCkl1.js → diagram-QEK2KX5R.Bb3EEO2D.js} +3 -3
  39. package/dist/chunks/{diagram-S2PKOQOG.CE2fqmGK.js → diagram-S2PKOQOG.B_aUDr5F.js} +3 -3
  40. package/dist/chunks/{erDiagram-Q2GNP2WA.DvPF0zmB.js → erDiagram-Q2GNP2WA.CYpL6V9w.js} +4 -4
  41. package/dist/chunks/{flowDiagram-NV44I4VS.DuwDLdNV.js → flowDiagram-NV44I4VS.CF9-8TaP.js} +5 -5
  42. package/dist/chunks/{ganttDiagram-JELNMOA3.COhtg4Ox.js → ganttDiagram-JELNMOA3.CdE8GB2s.js} +2 -2
  43. package/dist/chunks/{gitGraph-F6HP7TQM.DlTeaeqU.js → gitGraph-F6HP7TQM.BWmUmcZV.js} +1 -1
  44. package/dist/chunks/{gitGraphDiagram-NY62KEGX.D9HKSUvx.js → gitGraphDiagram-NY62KEGX.Cn0Cu7Ww.js} +4 -4
  45. package/dist/chunks/{graph.CVvFC68c.js → graph.B0nity3n.js} +2 -2
  46. package/dist/chunks/{index.BDAcSpU5.js → index.Biab5cek.js} +1 -1
  47. package/dist/chunks/{index.Bk1zpyWs.js → index.BkSC8d7B.js} +3 -3
  48. package/dist/chunks/{index.DGQNdcmV.js → index.C2WmpF2e.js} +1 -1
  49. package/dist/chunks/{index.B8Hpndux.js → index.CAuXCAe5.js} +1 -1
  50. package/dist/chunks/{index.B0rqfWlE.js → index.CJxTPes-.js} +1 -1
  51. package/dist/chunks/{index.D53DWjsz.js → index.Ci5e_98Z.js} +3 -3
  52. package/dist/chunks/{index.I0YKXWDW.js → index.D3dY6con.js} +1 -1
  53. package/dist/chunks/{index.CPrdgeh7.js → index.D_0HoqM8.js} +1 -1
  54. package/dist/chunks/{index.MdqXJbz5.js → index.Ds4-4dzy.js} +316 -344
  55. package/dist/chunks/{info-NVLQJR56.D3stHz25.js → info-NVLQJR56.DfoQxnaP.js} +1 -1
  56. package/dist/chunks/{infoDiagram-WHAUD3N6.BIvDCJy6.js → infoDiagram-WHAUD3N6.CbDQCj4t.js} +2 -2
  57. package/dist/chunks/{journeyDiagram-XKPGCS4Q.BdAmj6HJ.js → journeyDiagram-XKPGCS4Q.BGwMjBf9.js} +4 -4
  58. package/dist/chunks/{kanban-definition-3W4ZIXB7.CqK6qeLd.js → kanban-definition-3W4ZIXB7.CS-TV1ji.js} +2 -2
  59. package/dist/chunks/{layout.BdufB78T.js → layout.DKjnDekM.js} +4 -4
  60. package/dist/chunks/{mermaid-parser.core.VCpWUlic.js → mermaid-parser.core.CBflstHb.js} +10 -10
  61. package/dist/chunks/{min.DgG7zTox.js → min.eDGqv0vt.js} +2 -2
  62. package/dist/chunks/{mindmap-definition-VGOIOE7T.BW-PNhZD.js → mindmap-definition-VGOIOE7T.GckYx6Fd.js} +3 -3
  63. package/dist/chunks/{packet-BFZMPI3H.BUoS4gNB.js → packet-BFZMPI3H.DzGbdOiU.js} +1 -1
  64. package/dist/chunks/{pie-7BOR55EZ.BlIbPo6j.js → pie-7BOR55EZ.CRxLvxJh.js} +1 -1
  65. package/dist/chunks/{pieDiagram-ADFJNKIX.NE-fVH6e.js → pieDiagram-ADFJNKIX.BuekQ8o8.js} +4 -4
  66. package/dist/chunks/{quadrantDiagram-AYHSOK5B.hstKbyhk.js → quadrantDiagram-AYHSOK5B.Cz1W80fL.js} +1 -1
  67. package/dist/chunks/{radar-NHE76QYJ.BWSNlMTC.js → radar-NHE76QYJ.D_eJ0pAQ.js} +1 -1
  68. package/dist/chunks/{rehype-mermaid.CysVWi5J.js → rehype-mermaid.C6vWaLbm.js} +33 -33
  69. package/dist/chunks/{requirementDiagram-UZGBJVZJ.Chaf_g91.js → requirementDiagram-UZGBJVZJ.D29ENfNv.js} +3 -3
  70. package/dist/chunks/{sankeyDiagram-TZEHDZUN.CK88CAhG.js → sankeyDiagram-TZEHDZUN.BkA8zy0e.js} +1 -1
  71. package/dist/chunks/{sequenceDiagram-WL72ISMW.DaHa-qh1.js → sequenceDiagram-WL72ISMW.CohhptW1.js} +3 -3
  72. package/dist/chunks/{stateDiagram-FKZM4ZOC.CkNLPjIg.js → stateDiagram-FKZM4ZOC.DXcdl9T3.js} +4 -4
  73. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.Dzi34EM6.js → stateDiagram-v2-4FDKWEC3.CyTSxcZ6.js} +2 -2
  74. package/dist/chunks/{timeline-definition-IT6M3QCI.BsHG309-.js → timeline-definition-IT6M3QCI.BvhsFWgy.js} +2 -2
  75. package/dist/chunks/{treemap-KMMF4GRG.CiCns-I1.js → treemap-KMMF4GRG.DdhwEUUj.js} +1 -1
  76. package/dist/chunks/{useMarkdown.CYWo-hGo.js → useMarkdown.CdWXCETb.js} +8 -8
  77. package/dist/chunks/{xychartDiagram-PRI3JC2R.xfQd6NZ0.js → xychartDiagram-PRI3JC2R.vlO9NN_Y.js} +1 -1
  78. package/dist/components/SassySaint/SassySaint.js +1 -1
  79. package/dist/index.js +3 -3
  80. package/package.json +3 -3
  81. package/dist/chunks/ButtonIconDelete.wI-EXJFx.js +0 -550
  82. package/dist/chunks/HistoryDataGrid.B7G6X-Tv.js +0 -467
  83. package/dist/chunks/HistoryEntry.DJE028Vp.js +0 -305
  84. package/dist/chunks/InlineFilter.CdKFyOpD.js +0 -123
@@ -1,305 +0,0 @@
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.MdqXJbz5.js";
3
- import { InlineFilter as Ce, AnimatedWrapper as ue } from "./InlineFilter.CdKFyOpD.js";
4
- import { useAiChat as me, useLocalStorage as h, LazyToastContainerWrapper as Se, v4 as ye, CHAT_RESET as fe, CHAT_SET_ATTACHMENTS as Te, CHAT_SET_STATUS as pe, showErrorToast as Ae, ConfirmationPanel as ge, Panel as De, debounce as _e, Toggle as B, ButtonCancel as Ee } from "./App.LXYuxuaD.js";
5
- import { useRef as K, useContext as Y, Suspense as Oe, lazy as ke, useState as I, useCallback as W, useEffect as Le } from "react";
6
- import { HistoryContext as Q, ChatContext as Re, SortDirections as c, APP_CLASSNAME as ve, TOAST_CHAT_DELETED as we, HISTORY_TITLE as He } from "./LogoEntry.DfnJLwfC.js";
7
- const be = ke(
8
- () => import(
9
- /* webpackChunkName: "history-datagrid" */
10
- "./HistoryDataGrid.B7G6X-Tv.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(Re), { setInput: S } = me(), [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 Ae(we, {
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: pe,
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(ye()), L([]), S(""), m({
125
- type: fe,
126
- payload: {
127
- privateChat: !1,
128
- reasoningText: !1
129
- }
130
- }), m({
131
- type: Te,
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: ve, children: /* @__PURE__ */ a(Se, { containerId: "history-table" }) }),
147
- /* @__PURE__ */ a(Oe, { 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
- Le(() => {
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 = _e((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
- ge,
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
- De,
236
- {
237
- open: C,
238
- onOpenChange: f,
239
- title: He,
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(Ee, { 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
- };
@@ -1,123 +0,0 @@
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.DfnJLwfC.js";
4
- import { Card as S } from "./index.B8Hpndux.js";
5
- import { TextInput as v } from "./index.CPrdgeh7.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
- };