@versini/sassysaint 5.4.7 → 5.4.8

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.
@@ -1,51 +1,49 @@
1
1
  import { jsx as s, jsxs as v, Fragment as O } from "react/jsx-runtime";
2
- import { g as Ie, ACTION_RESTORE as Ne, ACTION_MESSAGE as C, ROLE_ASSISTANT as S, ACTION_RESET as ie, ACTION_MODEL as ne, ACTION_ENGINE as se, ACTION_STREAMING as de, ACTION_SORT as we, ACTION_SEARCH as Se, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, AppContext as U, TagsContext as G, un as $, b as Ee, j as Ce, R as ue, isLastMessageFromRole as me, O as Re, TOOLBOX as Y, ROLE_INTERNAL as j, ROLE_USER as D, ROLE_SYSTEM as Be, ROLE_HIDDEN as Me, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as q, CLIPBOARD_TAG as X, TYPE_QUESTION as Ae, SEND as Le, ERROR_MESSAGE as Oe, getMessageContaintWrapperClass as Ue, MessagesContainerHeader as $e, HistoryContext as Ve, c as ze, AppFooter as Pe, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as De, LOCAL_STORAGE_SORT as Ge } from "./index.VTwhsE7D.js";
3
- import { serviceCall as he, SERVICE_TYPES as pe, m as je, restCall as He, $e as We, E as Q, y as Fe } from "./index.B5TWwDVi.js";
4
- import E, { useContext as R, useState as M, useRef as B, useEffect as T, lazy as Ke, Suspense as Z, useReducer as z } from "react";
5
- import l from "clsx";
2
+ import { g as Ne, ACTION_RESTORE as we, ACTION_MESSAGE as S, ROLE_ASSISTANT as E, ACTION_RESET as ie, ACTION_MODEL as de, ACTION_ENGINE as se, ACTION_STREAMING as ne, ACTION_SORT as Ie, ACTION_SEARCH as Ee, ACTION_SET_TAGS as le, ACTION_RESET_TAGS as ce, ACTION_TOGGLE_TAG as ge, AppContext as U, TagsContext as H, un as z, L as Ce, j as Se, C as ue, isLastMessageFromRole as me, O as Re, TOOLBOX as Y, ROLE_INTERNAL as P, ROLE_USER as G, ROLE_SYSTEM as Be, ROLE_HIDDEN as Me, DEFAULT_AI_ENGINE as A, STATS_SEPARATOR as q, CLIPBOARD_TAG as X, TYPE_QUESTION as Ae, SEND as Le, ERROR_MESSAGE as Oe, getMessageContaintWrapperClass as Ue, MessagesContainerHeader as ze, HistoryContext as Ve, _ as De, AppFooter as $e, LOCAL_STORAGE_PREFIX as J, LOCAL_STORAGE_SEARCH as Ge, LOCAL_STORAGE_SORT as He } from "./index.BNHOCJ2P.js";
3
+ import { serviceCall as he, SERVICE_TYPES as be, h as Pe, restCall as je, Le as We, E as Q, f as Fe } from "./index.B4Bqf6o5.js";
4
+ import C, { useContext as R, useState as M, useRef as B, useEffect as _, lazy as Ke, Suspense as Z, useReducer as D } from "react";
5
+ import d from "clsx";
6
6
  const Ye = ({
7
7
  className: e,
8
8
  viewBox: t,
9
- spacing: r,
10
- title: a,
11
- monotone: i,
9
+ title: r,
10
+ monotone: a,
12
11
  ...o
13
12
  }) => /* @__PURE__ */ s(
14
- Ie,
13
+ Ne,
15
14
  {
16
15
  defaultViewBox: "0 0 384 512",
17
16
  defaultClassName: "size-5",
18
17
  viewBox: t,
19
18
  className: e,
20
- spacing: r,
21
- title: a || "Close",
19
+ title: r || "Close",
22
20
  ...o,
23
21
  children: /* @__PURE__ */ s("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3l105.4 105.3c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256l105.3-105.4z" })
24
22
  }
25
23
  );
26
24
  function qe(e) {
27
- const t = e.toLowerCase().split("+").map((o) => o.trim()), r = {
25
+ const t = e.toLowerCase().split("+").map((i) => i.trim()), r = {
28
26
  alt: t.includes("alt"),
29
27
  ctrl: t.includes("ctrl"),
30
28
  meta: t.includes("meta"),
31
29
  mod: t.includes("mod"),
32
30
  shift: t.includes("shift")
33
- }, a = ["alt", "ctrl", "meta", "shift", "mod"], i = t.find((o) => !a.includes(o));
31
+ }, a = ["alt", "ctrl", "meta", "shift", "mod"], o = t.find((i) => !a.includes(i));
34
32
  return {
35
33
  ...r,
36
- key: i
34
+ key: o
37
35
  };
38
36
  }
39
37
  function Xe(e, t) {
40
- const { alt: r, ctrl: a, meta: i, mod: o, shift: c, key: d } = e, { altKey: m, ctrlKey: g, metaKey: p, shiftKey: u, key: b } = t;
41
- if (r !== m)
38
+ const { alt: r, ctrl: a, meta: o, mod: i, shift: g, key: l } = e, { altKey: u, ctrlKey: m, metaKey: b, shiftKey: h, key: c } = t;
39
+ if (r !== u)
42
40
  return !1;
43
- if (o) {
44
- if (!g && !p)
41
+ if (i) {
42
+ if (!m && !b)
45
43
  return !1;
46
- } else if (a !== g || i !== p)
44
+ } else if (a !== m || o !== b)
47
45
  return !1;
48
- return c !== u ? !1 : !!(d && (b.toLowerCase() === d.toLowerCase() || t.code.replace("Key", "").toLowerCase() === d.toLowerCase()));
46
+ return g !== h ? !1 : !!(l && (c.toLowerCase() === l.toLowerCase() || t.code.replace("Key", "").toLowerCase() === l.toLowerCase()));
49
47
  }
50
48
  function Je(e) {
51
49
  return (t) => Xe(qe(e), t);
@@ -53,8 +51,8 @@ function Je(e) {
53
51
  function Qe(e) {
54
52
  return (t) => {
55
53
  const r = "nativeEvent" in t ? t.nativeEvent : t;
56
- e.forEach(([a, i, o = { preventDefault: !0 }]) => {
57
- Je(a)(r) && (o.preventDefault && t.preventDefault(), i(r));
54
+ e.forEach(([a, o, i = { preventDefault: !0 }]) => {
55
+ Je(a)(r) && (i.preventDefault && t.preventDefault(), o(r));
58
56
  });
59
57
  };
60
58
  }
@@ -64,18 +62,18 @@ for (let e = 0; e < 256; ++e)
64
62
  function Ze(e, t = 0) {
65
63
  return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
66
64
  }
67
- let P;
65
+ let $;
68
66
  const et = new Uint8Array(16);
69
67
  function tt() {
70
- if (!P) {
68
+ if (!$) {
71
69
  if (typeof crypto > "u" || !crypto.getRandomValues)
72
70
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
73
- P = crypto.getRandomValues.bind(crypto);
71
+ $ = crypto.getRandomValues.bind(crypto);
74
72
  }
75
- return P(et);
73
+ return $(et);
76
74
  }
77
75
  const rt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ee = { randomUUID: rt };
78
- function H(e, t, r) {
76
+ function j(e, t, r) {
79
77
  if (ee.randomUUID && !t && !e)
80
78
  return ee.randomUUID();
81
79
  e = e || {};
@@ -83,7 +81,7 @@ function H(e, t, r) {
83
81
  return a[6] = a[6] & 15 | 64, a[8] = a[8] & 63 | 128, Ze(a);
84
82
  }
85
83
  const at = (e, t) => {
86
- if ((t == null ? void 0 : t.type) === Ne) {
84
+ if ((t == null ? void 0 : t.type) === we) {
87
85
  const r = t.payload.messages.map((a) => ({
88
86
  message: {
89
87
  role: a.role,
@@ -102,35 +100,35 @@ const at = (e, t) => {
102
100
  tags: e.tags
103
101
  };
104
102
  }
105
- if ((t == null ? void 0 : t.type) === C) {
106
- const r = t.payload.message.role, a = t.payload.message.content, i = t.payload.message.name, o = t.payload.message.processingTime, c = t.payload.message.messageId;
103
+ if ((t == null ? void 0 : t.type) === S) {
104
+ const r = t.payload.message.role, a = t.payload.message.content, o = t.payload.message.name, i = t.payload.message.processingTime, g = t.payload.message.messageId;
107
105
  if (r !== "") {
108
- const d = {
106
+ const l = {
109
107
  role: r,
110
108
  content: a,
111
- name: i,
112
- processingTime: o,
113
- messageId: c
109
+ name: o,
110
+ processingTime: i,
111
+ messageId: g
114
112
  };
115
- if (r === S) {
116
- const m = e.messages.findIndex(
117
- (g) => g.message.messageId === c
113
+ if (r === E) {
114
+ const u = e.messages.findIndex(
115
+ (m) => m.message.messageId === g
118
116
  );
119
- if (m !== -1) {
120
- const g = e.messages.map((p, u) => u === m ? {
117
+ if (u !== -1) {
118
+ const m = e.messages.map((b, h) => h === u ? {
121
119
  message: {
122
- ...p.message,
123
- content: `${p.message.content}${a}`,
124
- processingTime: o,
125
- name: i
120
+ ...b.message,
121
+ content: `${b.message.content}${a}`,
122
+ processingTime: i,
123
+ name: o
126
124
  }
127
- } : p);
125
+ } : b);
128
126
  return {
129
127
  id: e.id,
130
128
  model: e.model,
131
129
  usage: e.usage,
132
130
  isComponent: e.isComponent,
133
- messages: g,
131
+ messages: m,
134
132
  engine: e.engine,
135
133
  tags: e.tags
136
134
  };
@@ -146,21 +144,21 @@ const at = (e, t) => {
146
144
  messages: [
147
145
  ...e.messages,
148
146
  {
149
- message: d
147
+ message: l
150
148
  }
151
149
  ]
152
150
  };
153
151
  }
154
152
  }
155
153
  return (t == null ? void 0 : t.type) === ie ? {
156
- id: H(),
154
+ id: j(),
157
155
  model: e.model,
158
156
  engine: e.engine,
159
157
  usage: 0,
160
158
  messages: [],
161
159
  isComponent: e.isComponent,
162
160
  tags: e.tags
163
- } : (t == null ? void 0 : t.type) === ne ? {
161
+ } : (t == null ? void 0 : t.type) === de ? {
164
162
  id: e.id,
165
163
  model: t.payload.model,
166
164
  engine: e.engine,
@@ -171,19 +169,19 @@ const at = (e, t) => {
171
169
  } : (t == null ? void 0 : t.type) === se ? {
172
170
  ...e,
173
171
  engine: t.payload.engine
174
- } : (t == null ? void 0 : t.type) === de ? {
172
+ } : (t == null ? void 0 : t.type) === ne ? {
175
173
  ...e,
176
174
  streaming: t.payload.streaming
177
175
  } : e;
178
176
  }, ot = (e, t) => {
179
177
  switch (t == null ? void 0 : t.type) {
180
- case Se:
178
+ case Ee:
181
179
  return {
182
180
  searchString: t.payload.searchString,
183
181
  sortedCell: e.sortedCell,
184
182
  sortDirection: e.sortDirection
185
183
  };
186
- case we:
184
+ case Ie:
187
185
  return {
188
186
  searchString: e.searchString,
189
187
  sortedCell: t.payload.sortedCell,
@@ -212,40 +210,40 @@ const at = (e, t) => {
212
210
  default:
213
211
  return e;
214
212
  }
215
- }, nt = () => {
216
- const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(G), { getAccessToken: i, user: o } = $(), [c, d] = M({
213
+ }, dt = () => {
214
+ const { dispatch: e, state: t } = R(U), { dispatch: r, state: a } = R(H), { getAccessToken: o, user: i } = z(), [g, l] = M({
217
215
  loaded: !1
218
- }), m = "mt-2 flex justify-center rounded-md", g = B(null), p = B(!1), u = (n) => {
216
+ }), u = "mt-2 flex justify-center rounded-md", m = B(null), b = B(!1), h = (n) => {
219
217
  n.preventDefault(), e({
220
218
  type: ie
221
219
  });
222
220
  };
223
- T(() => {
221
+ _(() => {
224
222
  var n;
225
- (t == null ? void 0 : t.streaming) === !0 && !p.current && g.current && (p.current = !0, g.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (p.current = !1, (n = g.current) == null || n.blur());
223
+ (t == null ? void 0 : t.streaming) === !0 && !b.current && m.current && (b.current = !0, m.current.focus()), (t == null ? void 0 : t.streaming) === !1 && (b.current = !1, (n = m.current) == null || n.blur());
226
224
  }, [t]);
227
- const b = (n, h) => {
225
+ const c = (n, p) => {
228
226
  n.preventDefault(), r({
229
227
  type: ge,
230
228
  payload: {
231
- tag: h
229
+ tag: p
232
230
  }
233
231
  });
234
232
  };
235
- return T(() => {
236
- if (!o) {
237
- d({
233
+ return _(() => {
234
+ if (!i) {
235
+ l({
238
236
  loaded: !1
239
237
  });
240
238
  return;
241
239
  }
242
- c.loaded || (async () => {
240
+ g.loaded || (async () => {
243
241
  try {
244
242
  const n = await he({
245
- accessToken: await i(),
246
- type: pe.GET_USER_PREFERENCES,
243
+ accessToken: await o(),
244
+ type: be.GET_USER_PREFERENCES,
247
245
  params: {
248
- user: o.username
246
+ user: i.username
249
247
  }
250
248
  });
251
249
  n.status === 200 && (r({
@@ -253,100 +251,77 @@ const at = (e, t) => {
253
251
  payload: {
254
252
  tags: n.data.tags || []
255
253
  }
256
- }), d({
254
+ }), l({
257
255
  loaded: !0
258
256
  }));
259
257
  } catch {
260
258
  }
261
259
  })();
262
- }, [o]), /* @__PURE__ */ v(O, { children: [
263
- /* @__PURE__ */ s(Ee, { alignHorizontal: "center", columnGap: 2, children: c && c.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(Ce, { children: /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
260
+ }, [i]), /* @__PURE__ */ v(O, { children: [
261
+ /* @__PURE__ */ s(Ce, { alignHorizontal: "center", columnGap: 2, children: g && g.loaded && a.tags && a.tags.map((n) => n.enabled && n.label && n.content && /* @__PURE__ */ s(Se, { children: /* @__PURE__ */ s("div", { className: u, children: /* @__PURE__ */ s(
264
262
  ue,
265
263
  {
266
264
  noBorder: !0,
267
265
  mode: "dark",
268
266
  focusMode: "light",
269
267
  size: "small",
270
- onClick: (h) => b(h, n.content),
268
+ onClick: (p) => c(p, n.content),
271
269
  children: n.label
272
270
  }
273
271
  ) }) }, `tag-button-${n.slot}`)) }),
274
- me(S, t) && /* @__PURE__ */ s("div", { className: m, children: /* @__PURE__ */ s(
272
+ me(E, t) && /* @__PURE__ */ s("div", { className: u, children: /* @__PURE__ */ s(
275
273
  Re,
276
274
  {
277
275
  noBorder: !0,
278
276
  mode: "dark",
279
277
  focusMode: "light",
280
- ref: g,
281
- onClick: u,
278
+ ref: m,
279
+ onClick: h,
282
280
  labelRight: t != null && t.streaming ? Y.ACTION_WHILE_STREAMING.content : Y.ACTION_WHILE_NOT_STREAMING.content,
283
- children: t != null && t.streaming ? /* @__PURE__ */ s(Ye, { className: "size-4" }) : /* @__PURE__ */ s(je, { className: "size-4" })
281
+ children: t != null && t.streaming ? /* @__PURE__ */ s(Ye, { className: "size-4" }) : /* @__PURE__ */ s(Pe, { className: "size-4" })
284
282
  }
285
283
  ) })
286
284
  ] });
287
285
  };
288
286
  /*!
289
- @versini/ui-bubble v1.4.0
287
+ @versini/ui-bubble v2.0.0
290
288
  © 2024 gizmette.com
291
289
  */
292
290
  try {
293
291
  window.__VERSINI_UI_BUBBLE__ || (window.__VERSINI_UI_BUBBLE__ = {
294
- version: "1.4.0",
295
- buildTime: "12/26/2024 06:06 PM EST",
292
+ version: "2.0.0",
293
+ buildTime: "12/29/2024 04:16 PM EST",
296
294
  homepage: "https://github.com/aversini/ui-components",
297
295
  license: "MIT"
298
296
  });
299
297
  } catch {
300
298
  }
301
- const st = "av-bubble", te = "av-button";
302
- /*!
303
- @versini/ui-spacing v1.1.0
304
- © 2024 gizmette.com
305
- */
306
- try {
307
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
308
- version: "1.1.0",
309
- buildTime: "12/26/2024 06:05 PM EST",
310
- homepage: "https://github.com/aversini/ui-components",
311
- license: "MIT"
312
- });
313
- } catch {
314
- }
315
- const dt = (e) => {
316
- let t = "";
317
- if (typeof e == "number" || typeof e == "string")
318
- t = "m-" + e;
319
- else {
320
- const r = [];
321
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
322
- }
323
- return t;
324
- }, W = "icon", lt = "button", ct = "link", gt = ({
299
+ const st = "av-bubble", te = "av-button", W = "icon", nt = "button", lt = "link", ct = ({
325
300
  type: e,
326
301
  size: t,
327
302
  labelRight: r,
328
303
  labelLeft: a,
329
- align: i
304
+ align: o
330
305
  }) => {
331
- const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
306
+ const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
332
307
  switch (e) {
333
- case lt:
334
- return l("px-4", {
335
- [o]: t === "small",
336
- [c]: t === "medium",
337
- [d]: t === "large"
308
+ case nt:
309
+ return d("px-4", {
310
+ [i]: t === "small",
311
+ [g]: t === "medium",
312
+ [l]: t === "large"
338
313
  });
339
- case ct:
340
- return l("px-4 text-center", {
341
- [o]: t === "small",
342
- [c]: t === "medium",
343
- [d]: t === "large"
314
+ case lt:
315
+ return d("px-4 text-center", {
316
+ [i]: t === "small",
317
+ [g]: t === "medium",
318
+ [l]: t === "large"
344
319
  });
345
320
  case W:
346
- return l("inline-flex items-center", {
347
- "justify-center": i === "center",
348
- "justify-start": i === "left",
349
- "justify-end": i === "right",
321
+ return d("inline-flex items-center", {
322
+ "justify-center": o === "center",
323
+ "justify-start": o === "left",
324
+ "justify-end": o === "right",
350
325
  "h-6 w-6 p-0": t === "small" && !(r || a),
351
326
  "h-6 px-4 text-sm font-medium": t === "small" && (r || a),
352
327
  "h-8 w-8 p-1": t === "medium" && !(r || a),
@@ -355,16 +330,24 @@ const dt = (e) => {
355
330
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
356
331
  });
357
332
  }
358
- }, ut = ({
333
+ }, gt = ({
359
334
  mode: e,
360
335
  noBackground: t,
361
336
  noTruncate: r,
362
- variant: a
337
+ variant: a,
338
+ radius: o
363
339
  }) => {
364
340
  if (t)
365
- return "not-prose rounded-full";
341
+ return d("not-prose", {
342
+ "rounded-full": o === "large",
343
+ "rounded-md": o === "medium",
344
+ "rounded-sm": o === "small"
345
+ });
366
346
  if (a === "primary")
367
- return l("not-prose rounded-full", {
347
+ return d("not-prose", {
348
+ "rounded-full": o === "large",
349
+ "rounded-md": o === "medium",
350
+ "rounded-sm": o === "small",
368
351
  truncate: !r,
369
352
  "bg-action-dark text-copy-light": e === "dark",
370
353
  "bg-action-light text-copy-lighter": e === "light",
@@ -372,7 +355,10 @@ const dt = (e) => {
372
355
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
373
356
  });
374
357
  if (a === "secondary")
375
- return l("not-prose rounded-full", {
358
+ return d("not-prose", {
359
+ "rounded-full": o === "large",
360
+ "rounded-md": o === "medium",
361
+ "rounded-sm": o === "small",
376
362
  truncate: !r,
377
363
  "bg-action-dark text-copy-light": e === "light",
378
364
  "bg-action-light text-copy-lighter": e === "dark",
@@ -380,14 +366,28 @@ const dt = (e) => {
380
366
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
381
367
  });
382
368
  if (a === "danger")
383
- return l("not-prose rounded-full", {
369
+ return d("not-prose", {
370
+ "rounded-full": o === "large",
371
+ "rounded-md": o === "medium",
372
+ "rounded-sm": o === "small",
384
373
  truncate: !r,
385
374
  "bg-action-danger-dark text-copy-light": e === "dark",
386
375
  "bg-action-danger-light text-copy-lighter": e === "light",
387
376
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
388
377
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
389
378
  });
390
- }, mt = ({
379
+ if (a === "selected")
380
+ return d("not-prose", {
381
+ "rounded-full": o === "large",
382
+ "rounded-md": o === "medium",
383
+ "rounded-sm": o === "small",
384
+ truncate: !r,
385
+ "bg-action-selected-dark text-copy-light": e === "dark",
386
+ "bg-action-selected-light text-copy-lighter": e === "light",
387
+ "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
388
+ "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
389
+ });
390
+ }, ut = ({
391
391
  mode: e,
392
392
  disabled: t,
393
393
  variant: r
@@ -395,27 +395,34 @@ const dt = (e) => {
395
395
  if (t)
396
396
  return "";
397
397
  if (r === "primary")
398
- return l("hover:text-copy-light-hover", {
398
+ return d("hover:text-copy-light-hover", {
399
399
  "hover:bg-action-dark-hover": e === "dark",
400
400
  "hover:bg-action-light-hover": e === "light",
401
401
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
402
402
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
403
403
  });
404
404
  if (r === "secondary")
405
- return l("hover:text-copy-light-hover", {
405
+ return d("hover:text-copy-light-hover", {
406
406
  "hover:bg-action-dark-hover": e === "light",
407
407
  "hover:bg-action-light-hover": e === "dark",
408
408
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
409
409
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
410
410
  });
411
411
  if (r === "danger")
412
- return l("hover:text-copy-light-hover", {
412
+ return d("hover:text-copy-light-hover", {
413
413
  "hover:bg-action-danger-dark-hover": e === "dark",
414
414
  "hover:bg-action-danger-light-hover": e === "light",
415
415
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
416
416
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
417
417
  });
418
- }, ht = ({
418
+ if (r === "selected")
419
+ return d("hover:text-copy-light-hover", {
420
+ "hover:bg-action-selected-dark-hover": e === "dark",
421
+ "hover:bg-action-selected-light-hover": e === "light",
422
+ "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
423
+ "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
424
+ });
425
+ }, mt = ({
419
426
  mode: e,
420
427
  disabled: t,
421
428
  variant: r
@@ -423,27 +430,34 @@ const dt = (e) => {
423
430
  if (t)
424
431
  return "";
425
432
  if (r === "primary")
426
- return l("active:text-copy-light-active", {
433
+ return d("active:text-copy-light-active", {
427
434
  "active:bg-action-dark-active": e === "dark",
428
435
  "active:bg-action-light-active": e === "light",
429
436
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
430
437
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
431
438
  });
432
439
  if (r === "secondary")
433
- return l("active:text-copy-light-active", {
440
+ return d("active:text-copy-light-active", {
434
441
  "active:bg-action-dark-active": e === "light",
435
442
  "active:bg-action-light-active": e === "dark",
436
443
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
437
444
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
438
445
  });
439
446
  if (r === "danger")
440
- return l("active:text-copy-lighter-active", {
447
+ return d("active:text-copy-lighter-active", {
441
448
  "active:bg-action-danger-dark-active": e === "dark",
442
449
  "active:bg-action-danger-light-active": e === "light",
443
450
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
444
451
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
445
452
  });
446
- }, pt = ({
453
+ if (r === "selected")
454
+ return d("active:text-copy-lighter-active", {
455
+ "active:bg-action-selected-dark-active": e === "dark",
456
+ "active:bg-action-selected-light-active": e === "light",
457
+ "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
458
+ "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
459
+ });
460
+ }, ht = ({
447
461
  mode: e,
448
462
  noBorder: t,
449
463
  variant: r
@@ -451,134 +465,148 @@ const dt = (e) => {
451
465
  if (t)
452
466
  return "border border-transparent";
453
467
  if (r === "primary")
454
- return l("border", {
468
+ return d("border", {
455
469
  "border-border-dark": e === "dark",
456
470
  "border-border-accent": e === "light",
457
471
  "border-border-dark dark:border-border-accent": e === "system",
458
472
  "border-border-accent dark:border-border-dark": e === "alt-system"
459
473
  });
460
474
  if (r === "secondary")
461
- return l("border", {
475
+ return d("border", {
462
476
  "border-border-dark": e === "light",
463
477
  "border-border-accent": e === "dark",
464
478
  "border-border-dark dark:border-border-accent": e === "alt-system",
465
479
  "border-border-accent dark:border-border-dark": e === "system"
466
480
  });
467
481
  if (r === "danger")
468
- return l("border", {
482
+ return d("border", {
469
483
  "border-border-danger-dark": e === "dark",
470
484
  "border-border-danger-medium": e === "light",
471
485
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
472
486
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
473
487
  });
474
- }, bt = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
488
+ if (r === "selected")
489
+ return d("border", {
490
+ "border-border-selected-dark": e === "dark",
491
+ "border-border-selected-medium": e === "light",
492
+ "border-border-selected-dark dark:border-border-selected-medium": e === "system",
493
+ "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
494
+ });
495
+ }, bt = ({
496
+ focusMode: e
497
+ }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
475
498
  "focus:outline-focus-dark": e === "dark",
476
499
  "focus:outline-focus-light": e === "light",
477
500
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
478
501
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
479
- }), be = ({
502
+ }), pe = ({
480
503
  type: e,
481
504
  className: t,
482
505
  raw: r,
483
506
  mode: a,
484
- focusMode: i,
485
- disabled: o,
486
- fullWidth: c,
487
- size: d,
488
- noBorder: m,
489
- labelRight: g,
490
- labelLeft: p,
491
- spacing: u,
492
- noBackground: b,
493
- variant: n,
494
- noTruncate: h,
495
- align: f
496
- }) => (n || (n = "primary"), r ? l(te, t) : l(
507
+ focusMode: o,
508
+ disabled: i,
509
+ fullWidth: g,
510
+ size: l,
511
+ noBorder: u,
512
+ labelRight: m,
513
+ labelLeft: b,
514
+ noBackground: h,
515
+ variant: c,
516
+ noTruncate: n,
517
+ align: p,
518
+ radius: f
519
+ }) => (c || (c = "primary"), r ? d(te, t) : d(
497
520
  te,
498
- t,
499
- dt(u),
500
- ut({ mode: a, variant: n, noBackground: b, noTruncate: h }),
501
- gt({ type: e, size: d, labelRight: g, labelLeft: p, align: f }),
502
- pt({ mode: a, variant: n, noBorder: m }),
503
- bt({ focusMode: i }),
504
- mt({ mode: a, variant: n, disabled: o }),
505
- ht({ mode: a, variant: n, disabled: o }),
521
+ gt({
522
+ mode: a,
523
+ variant: c,
524
+ noBackground: h,
525
+ noTruncate: n,
526
+ radius: f
527
+ }),
528
+ ct({ type: e, size: l, labelRight: m, labelLeft: b, align: p }),
529
+ ht({ mode: a, variant: c, noBorder: u }),
530
+ bt({ focusMode: o }),
531
+ ut({ mode: a, variant: c, disabled: i }),
532
+ mt({ mode: a, variant: c, disabled: i }),
506
533
  {
507
- "w-full": c,
508
- "disabled:cursor-not-allowed disabled:opacity-50": o
509
- }
510
- )), yt = (e, t, r) => {
534
+ "w-full": g,
535
+ "disabled:cursor-not-allowed disabled:opacity-50": i
536
+ },
537
+ t
538
+ )), pt = (e, t, r) => {
511
539
  var a;
512
540
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
513
- }, F = E.forwardRef((e, t) => {
514
- const { onClick: r, noInternalClick: a = !1, ...i } = e;
541
+ }, F = C.forwardRef((e, t) => {
542
+ const { onClick: r, noInternalClick: a = !1, ...o } = e;
515
543
  return /* @__PURE__ */ s(
516
544
  "button",
517
545
  {
518
546
  ref: t,
519
- onClick: (o) => {
520
- yt(o, a, r);
547
+ onClick: (i) => {
548
+ pt(i, a, r);
521
549
  },
522
- ...i
550
+ ...o
523
551
  }
524
552
  );
525
553
  });
526
554
  F.displayName = "BaseButton";
527
- const ye = E.forwardRef(
555
+ const ye = C.forwardRef(
528
556
  ({
529
557
  children: e,
530
558
  disabled: t = !1,
531
559
  mode: r = "system",
532
560
  focusMode: a = "system",
533
- fullWidth: i = !1,
534
- className: o,
535
- type: c = "button",
536
- raw: d = !1,
537
- noBorder: m = !1,
538
- "aria-label": g,
539
- label: p,
540
- size: u = "medium",
541
- labelRight: b,
561
+ fullWidth: o = !1,
562
+ className: i,
563
+ type: g = "button",
564
+ raw: l = !1,
565
+ noBorder: u = !1,
566
+ "aria-label": m,
567
+ label: b,
568
+ size: h = "medium",
569
+ labelRight: c,
542
570
  labelLeft: n,
543
- spacing: h,
544
- noBackground: f = !1,
545
- align: I = "center",
546
- ...N
571
+ noBackground: p = !1,
572
+ align: f = "center",
573
+ radius: N = "large",
574
+ ...w
547
575
  }, k) => {
548
- const _ = be({
576
+ const x = pe({
549
577
  type: W,
550
578
  mode: r,
551
579
  focusMode: a,
552
- fullWidth: i,
580
+ fullWidth: o,
553
581
  disabled: t,
554
- raw: d,
555
- className: o,
556
- noBorder: m,
557
- size: u,
558
- labelRight: b,
582
+ raw: l,
583
+ className: i,
584
+ noBorder: u,
585
+ size: h,
586
+ labelRight: c,
559
587
  labelLeft: n,
560
- spacing: h,
561
- noBackground: f,
562
- align: I
563
- }), w = l({
564
- "text-copy-accent-dark": r === "light" && !d,
565
- "text-copy-light": r === "dark" && !d,
566
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
567
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
588
+ noBackground: p,
589
+ align: f,
590
+ radius: N
591
+ }), I = d({
592
+ "text-copy-accent-dark": r === "light" && !l,
593
+ "text-copy-light": r === "dark" && !l,
594
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
595
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
568
596
  });
569
597
  return /* @__PURE__ */ v(
570
598
  F,
571
599
  {
572
600
  ref: k,
573
- className: _,
601
+ className: x,
574
602
  disabled: t,
575
- type: c,
576
- "aria-label": g || p,
577
- ...N,
603
+ type: g,
604
+ "aria-label": m || b,
605
+ ...w,
578
606
  children: [
579
607
  n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
580
- /* @__PURE__ */ s("div", { className: w, children: e }),
581
- b && /* @__PURE__ */ s("span", { className: "pl-2", children: b })
608
+ /* @__PURE__ */ s("div", { className: I, children: e }),
609
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
582
610
  ]
583
611
  }
584
612
  );
@@ -586,61 +614,61 @@ const ye = E.forwardRef(
586
614
  );
587
615
  ye.displayName = "ButtonIcon";
588
616
  /*!
589
- @versini/ui-button v1.6.0
617
+ @versini/ui-button v2.0.0
590
618
  © 2024 gizmette.com
591
619
  */
592
620
  try {
593
621
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
594
- version: "1.6.0",
595
- buildTime: "12/26/2024 06:05 PM EST",
622
+ version: "2.0.0",
623
+ buildTime: "12/29/2024 04:16 PM EST",
596
624
  homepage: "https://github.com/aversini/ui-components",
597
625
  license: "MIT"
598
626
  });
599
627
  } catch {
600
628
  }
601
- const ft = E.forwardRef(
629
+ const yt = C.forwardRef(
602
630
  ({
603
631
  children: e,
604
632
  disabled: t = !1,
605
633
  mode: r = "system",
606
634
  focusMode: a = "system",
607
- fullWidth: i = !1,
608
- className: o,
609
- type: c = "button",
610
- raw: d = !1,
611
- noBorder: m = !1,
612
- "aria-label": g,
613
- label: p,
614
- size: u = "medium",
615
- labelRight: b,
635
+ fullWidth: o = !1,
636
+ className: i,
637
+ type: g = "button",
638
+ raw: l = !1,
639
+ noBorder: u = !1,
640
+ "aria-label": m,
641
+ label: b,
642
+ size: h = "medium",
643
+ labelRight: c,
616
644
  labelLeft: n,
617
- spacing: h,
618
- noBackground: f = !1,
619
- align: I = "center",
645
+ noBackground: p = !1,
646
+ align: f = "center",
620
647
  active: N = !1,
648
+ radius: w = "large",
621
649
  ...k
622
- }, _) => {
623
- const w = be({
650
+ }, x) => {
651
+ const I = pe({
624
652
  type: W,
625
653
  mode: r,
626
654
  focusMode: a,
627
- fullWidth: i,
655
+ fullWidth: o,
628
656
  disabled: t,
629
- raw: d,
630
- className: o,
631
- noBorder: m,
632
- size: u,
633
- labelRight: b,
657
+ raw: l,
658
+ className: i,
659
+ noBorder: u,
660
+ size: h,
661
+ labelRight: c,
634
662
  labelLeft: n,
635
- spacing: h,
636
- noBackground: f,
637
- align: I
638
- }), x = l({
639
- "text-copy-accent-dark": r === "light" && !d,
640
- "text-copy-light": r === "dark" && !d,
641
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
642
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
643
- }), V = N ? l(
663
+ noBackground: p,
664
+ align: f,
665
+ radius: w
666
+ }), T = d({
667
+ "text-copy-accent-dark": r === "light" && !l,
668
+ "text-copy-light": r === "dark" && !l,
669
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
670
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
671
+ }), V = N ? d(
644
672
  "relative",
645
673
  "focus-within:static",
646
674
  "focus-within:after:border-transparent",
@@ -660,97 +688,70 @@ const ft = E.forwardRef(
660
688
  return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
661
689
  F,
662
690
  {
663
- ref: _,
664
- className: w,
691
+ ref: x,
692
+ className: I,
665
693
  disabled: t,
666
- type: c,
667
- "aria-label": g || p,
694
+ type: g,
695
+ "aria-label": m || b,
668
696
  ...k,
669
697
  children: [
670
698
  n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
671
- /* @__PURE__ */ s("div", { className: x, children: e }),
672
- b && /* @__PURE__ */ s("span", { className: "pl-2", children: b })
699
+ /* @__PURE__ */ s("div", { className: T, children: e }),
700
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
673
701
  ]
674
702
  }
675
703
  ) });
676
704
  }
677
705
  );
678
- ft.displayName = "ButtonSort";
679
- /*!
680
- @versini/ui-spacing v1.1.0
681
- © 2024 gizmette.com
682
- */
683
- try {
684
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
685
- version: "1.1.0",
686
- buildTime: "12/26/2024 06:05 PM EST",
687
- homepage: "https://github.com/aversini/ui-components",
688
- license: "MIT"
689
- });
690
- } catch {
691
- }
692
- const vt = (e) => {
693
- let t = "";
694
- if (typeof e == "number" || typeof e == "string")
695
- t = "m-" + e;
696
- else {
697
- const r = [];
698
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
699
- }
700
- return t;
701
- }, fe = ({
706
+ yt.displayName = "ButtonSort";
707
+ const fe = ({
702
708
  children: e,
703
709
  fill: t,
704
710
  viewBox: r,
705
711
  className: a,
706
- defaultViewBox: i,
707
- defaultClassName: o,
708
- spacing: c,
709
- title: d,
710
- semantic: m = !1,
711
- ...g
712
+ defaultViewBox: o,
713
+ defaultClassName: i,
714
+ title: g,
715
+ semantic: l = !1,
716
+ ...u
712
717
  }) => {
713
- const p = vt(c), u = l(
714
- p,
715
- a || o
716
- );
718
+ const m = d(a || i);
717
719
  return /* @__PURE__ */ v(O, { children: [
718
720
  /* @__PURE__ */ s(
719
721
  "svg",
720
722
  {
721
723
  xmlns: "http://www.w3.org/2000/svg",
722
- className: u,
723
- viewBox: r || i,
724
+ className: m,
725
+ viewBox: r || o,
724
726
  fill: t || "currentColor",
725
727
  role: "img",
726
- "aria-hidden": !m,
728
+ "aria-hidden": !l,
727
729
  focusable: !1,
728
- ...g,
730
+ ...u,
729
731
  children: e
730
732
  }
731
733
  ),
732
- d && m && /* @__PURE__ */ s("span", { className: "sr-only", children: d })
734
+ g && l && /* @__PURE__ */ s("span", { className: "sr-only", children: g })
733
735
  ] });
734
736
  };
735
737
  /*!
736
- @versini/ui-svgicon v1.1.0
738
+ @versini/ui-svgicon v2.0.0
737
739
  © 2024 gizmette.com
738
740
  */
739
741
  try {
740
742
  window.__VERSINI_UI_SVGICON__ || (window.__VERSINI_UI_SVGICON__ = {
741
- version: "1.1.0",
742
- buildTime: "12/26/2024 06:05 PM EST",
743
+ version: "2.0.0",
744
+ buildTime: "12/29/2024 04:16 PM EST",
743
745
  homepage: "https://github.com/aversini/ui-components",
744
746
  license: "MIT"
745
747
  });
746
748
  } catch {
747
749
  }
748
- const kt = ({
750
+ const ft = ({
749
751
  className: e,
750
752
  viewBox: t,
751
- spacing: r,
752
- title: a,
753
- monotone: i,
753
+ title: r,
754
+ monotone: a,
754
755
  ...o
755
756
  }) => /* @__PURE__ */ v(
756
757
  fe,
@@ -759,8 +760,7 @@ const kt = ({
759
760
  defaultClassName: "size-5",
760
761
  viewBox: t,
761
762
  className: e,
762
- spacing: r,
763
- title: a || "Copied",
763
+ title: r || "Copied",
764
764
  ...o,
765
765
  children: [
766
766
  /* @__PURE__ */ s(
@@ -773,12 +773,11 @@ const kt = ({
773
773
  /* @__PURE__ */ s("path", { d: "M337 175c9.4 9.4 9.4 24.6 0 33.9L209 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L303 175c9.4-9.4 24.6-9.4 33.9 0z" })
774
774
  ]
775
775
  }
776
- ), _t = ({
776
+ ), vt = ({
777
777
  className: e,
778
778
  viewBox: t,
779
- spacing: r,
780
- title: a,
781
- monotone: i,
779
+ title: r,
780
+ monotone: a,
782
781
  ...o
783
782
  }) => /* @__PURE__ */ s(
784
783
  fe,
@@ -787,182 +786,133 @@ const kt = ({
787
786
  defaultClassName: "size-5",
788
787
  viewBox: t,
789
788
  className: e,
790
- spacing: r,
791
- title: a || "Copy",
789
+ title: r || "Copy",
792
790
  ...o,
793
791
  children: /* @__PURE__ */ s("path", { d: "M64 464H288c8.8 0 16-7.2 16-16V384h48v64c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V224c0-35.3 28.7-64 64-64h64v48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM224 304H448c8.8 0 16-7.2 16-16V64c0-8.8-7.2-16-16-16H224c-8.8 0-16 7.2-16 16V288c0 8.8 7.2 16 16 16zm-64-16V64c0-35.3 28.7-64 64-64H448c35.3 0 64 28.7 64 64V288c0 35.3-28.7 64-64 64H224c-35.3 0-64-28.7-64-64z" })
794
792
  }
795
793
  );
796
794
  /*!
797
- @versini/ui-icons v1.19.0
795
+ @versini/ui-icons v2.0.0
798
796
  © 2024 gizmette.com
799
797
  */
800
798
  try {
801
799
  window.__VERSINI_UI_ICONS__ || (window.__VERSINI_UI_ICONS__ = {
802
- version: "1.19.0",
803
- buildTime: "12/26/2024 06:05 PM EST",
804
- homepage: "https://github.com/aversini/ui-components",
805
- license: "MIT"
806
- });
807
- } catch {
808
- }
809
- /*!
810
- @versini/ui-spacing v1.1.0
811
- © 2024 gizmette.com
812
- */
813
- try {
814
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
815
- version: "1.1.0",
816
- buildTime: "12/26/2024 06:05 PM EST",
800
+ version: "2.0.0",
801
+ buildTime: "12/29/2024 04:16 PM EST",
817
802
  homepage: "https://github.com/aversini/ui-components",
818
803
  license: "MIT"
819
804
  });
820
805
  } catch {
821
806
  }
822
- const xt = (e) => {
823
- let t = "";
824
- if (typeof e == "number" || typeof e == "string")
825
- t = "m-" + e;
826
- else {
827
- const r = [];
828
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
829
- }
830
- return t;
831
- }, Tt = () => "p-4 sm:max-w-md md:max-w-2xl", It = ({ kind: e }) => l({
807
+ const kt = () => "p-4 sm:max-w-md md:max-w-2xl", xt = ({ kind: e }) => d({
832
808
  "bg-surface-lighter dark:bg-surface-dark": e === "left",
833
809
  "bg-surface-accent": e === "right"
834
- }), Nt = ({ kind: e }) => l(
810
+ }), Tt = ({ kind: e }) => d(
835
811
  "prose prose-dark dark:prose-lighter prose-p:my-3 prose-blockquote:my-3 prose-ol:my-3 prose-ul:my-3 prose-ul:prose-li:marker:text-black",
836
812
  {
837
813
  "text-copy-lighter": e === "right"
838
814
  }
839
- ), wt = ({ kind: e }) => l("rounded-b-xl", {
815
+ ), _t = ({ kind: e }) => d("rounded-b-xl", {
840
816
  "rounded-tr-xl": e === "left",
841
817
  "rounded-tl-xl": e === "right"
842
- }), St = ({
818
+ }), Nt = ({
843
819
  kind: e,
844
- className: t,
845
- spacing: r
820
+ className: t
846
821
  }) => {
847
- const a = l(
848
- t,
822
+ const r = d(
849
823
  st,
850
824
  "flex items-start",
851
- xt(r),
852
825
  {
853
826
  "flex-row-reverse": e === "right"
854
- }
855
- ), i = l(
827
+ },
828
+ t
829
+ ), a = d(
856
830
  "flex flex-col empty:hidden",
857
- Tt(),
858
- Nt({ kind: e }),
859
- It({ kind: e }),
860
- wt({ kind: e })
861
- ), o = "pr-2 pt-1 text-end text-xs text-copy-light", c = l("flex flex-col-reverse gap-2 sm:flex-row", {
831
+ kt(),
832
+ Tt({ kind: e }),
833
+ xt({ kind: e }),
834
+ _t({ kind: e })
835
+ ), o = "pr-2 pt-1 text-end text-xs text-copy-light", i = d("flex flex-col-reverse gap-2 sm:flex-row", {
862
836
  "ml-2": e === "left",
863
837
  "mr-2": e === "right"
864
838
  });
865
839
  return {
866
- wrapper: a,
867
- main: i,
840
+ wrapper: r,
841
+ main: a,
868
842
  footer: o,
869
- copyButton: c
843
+ copyButton: i
870
844
  };
871
- }, Et = ({
845
+ }, wt = ({
872
846
  children: e,
873
847
  kind: t = "left",
874
848
  className: r,
875
849
  footer: a,
876
- rawFooter: i,
877
- copyToClipboard: o,
878
- copyToClipboardFocusMode: c = "system",
879
- copyToClipboardMode: d = "system",
880
- spacing: m
850
+ rawFooter: o,
851
+ copyToClipboard: i,
852
+ copyToClipboardFocusMode: g = "system",
853
+ copyToClipboardMode: l = "system"
881
854
  }) => {
882
- const [g, p] = M(!1), u = St({ kind: t, className: r, spacing: m }), b = !!o && (typeof o == "function" || typeof o == "string" || typeof e == "string"), n = () => {
883
- p(!0), typeof o == "function" ? o(e) : typeof o == "string" ? navigator.clipboard.writeText(o) : typeof e == "string" && navigator.clipboard.writeText(e);
855
+ const [u, m] = M(!1), b = Nt({ kind: t, className: r }), h = !!i && (typeof i == "function" || typeof i == "string" || typeof e == "string"), c = () => {
856
+ m(!0), typeof i == "function" ? i(e) : typeof i == "string" ? navigator.clipboard.writeText(i) : typeof e == "string" && navigator.clipboard.writeText(e);
884
857
  };
885
- return T(() => {
886
- let h;
887
- return g && (h = window.setTimeout(() => {
888
- p(!1);
858
+ return _(() => {
859
+ let n;
860
+ return u && (n = window.setTimeout(() => {
861
+ m(!1);
889
862
  }, 3e3)), () => {
890
- clearTimeout(h);
863
+ clearTimeout(n);
891
864
  };
892
- }, [g]), /* @__PURE__ */ v("div", { className: u.wrapper, children: [
865
+ }, [u]), /* @__PURE__ */ v("div", { className: b.wrapper, children: [
893
866
  /* @__PURE__ */ v("div", { children: [
894
- /* @__PURE__ */ s("div", { className: u.main, children: e }),
895
- a && Object.keys(a).map((h) => a[h] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: u.footer, children: [
896
- h,
867
+ /* @__PURE__ */ s("div", { className: b.main, children: e }),
868
+ a && Object.keys(a).map((n) => a[n] ? /* @__PURE__ */ s("div", { className: "prose-p:m-0", children: /* @__PURE__ */ v("p", { className: b.footer, children: [
869
+ n,
897
870
  ": ",
898
- a[h]
899
- ] }) }, `-${h}`) : null),
900
- i && i
871
+ a[n]
872
+ ] }) }, `-${n}`) : null),
873
+ o && o
901
874
  ] }),
902
- b && /* @__PURE__ */ s("div", { className: u.copyButton, children: /* @__PURE__ */ s(
875
+ h && /* @__PURE__ */ s("div", { className: b.copyButton, children: /* @__PURE__ */ s(
903
876
  ye,
904
877
  {
905
878
  noBorder: !0,
906
879
  noBackground: !0,
907
880
  size: "small",
908
- mode: d,
909
- focusMode: c,
910
- label: g ? "Copied to clipboard" : "Copy to clipboard",
911
- onClick: n,
912
- disabled: g,
913
- children: g ? /* @__PURE__ */ s(kt, { className: "size-3" }) : /* @__PURE__ */ s(_t, { className: "size-3" })
881
+ mode: l,
882
+ focusMode: g,
883
+ label: u ? "Copied to clipboard" : "Copy to clipboard",
884
+ onClick: c,
885
+ disabled: u,
886
+ children: u ? /* @__PURE__ */ s(ft, { className: "size-3" }) : /* @__PURE__ */ s(vt, { className: "size-3" })
914
887
  }
915
888
  ) })
916
889
  ] });
917
- }, re = "av-button";
918
- /*!
919
- @versini/ui-spacing v1.1.0
920
- © 2024 gizmette.com
921
- */
922
- try {
923
- window.__VERSINI_UI_SPACING__ || (window.__VERSINI_UI_SPACING__ = {
924
- version: "1.1.0",
925
- buildTime: "12/26/2024 06:05 PM EST",
926
- homepage: "https://github.com/aversini/ui-components",
927
- license: "MIT"
928
- });
929
- } catch {
930
- }
931
- const Ct = (e) => {
932
- let t = "";
933
- if (typeof e == "number" || typeof e == "string")
934
- t = "m-" + e;
935
- else {
936
- const r = [];
937
- (e == null ? void 0 : e.t) !== void 0 && r.push(`mt-${e.t}`), (e == null ? void 0 : e.r) !== void 0 && r.push(`mr-${e.r}`), (e == null ? void 0 : e.b) !== void 0 && r.push(`mb-${e.b}`), (e == null ? void 0 : e.l) !== void 0 && r.push(`ml-${e.l}`), t = r.join(" ");
938
- }
939
- return t;
940
- }, ve = "icon", ke = "button", Rt = "link", Bt = ({
890
+ }, re = "av-button", ve = "icon", ke = "button", It = "link", Et = ({
941
891
  type: e,
942
892
  size: t,
943
893
  labelRight: r,
944
894
  labelLeft: a,
945
- align: i
895
+ align: o
946
896
  }) => {
947
- const o = "text-sm font-medium max-h-8 py-0", c = "text-base font-medium max-h-9 py-1", d = "text-lg font-medium max-h-12 py-2";
897
+ const i = "text-sm font-medium max-h-8 py-0", g = "text-base font-medium max-h-9 py-1", l = "text-lg font-medium max-h-12 py-2";
948
898
  switch (e) {
949
899
  case ke:
950
- return l("px-4", {
951
- [o]: t === "small",
952
- [c]: t === "medium",
953
- [d]: t === "large"
900
+ return d("px-4", {
901
+ [i]: t === "small",
902
+ [g]: t === "medium",
903
+ [l]: t === "large"
954
904
  });
955
- case Rt:
956
- return l("px-4 text-center", {
957
- [o]: t === "small",
958
- [c]: t === "medium",
959
- [d]: t === "large"
905
+ case It:
906
+ return d("px-4 text-center", {
907
+ [i]: t === "small",
908
+ [g]: t === "medium",
909
+ [l]: t === "large"
960
910
  });
961
911
  case ve:
962
- return l("inline-flex items-center", {
963
- "justify-center": i === "center",
964
- "justify-start": i === "left",
965
- "justify-end": i === "right",
912
+ return d("inline-flex items-center", {
913
+ "justify-center": o === "center",
914
+ "justify-start": o === "left",
915
+ "justify-end": o === "right",
966
916
  "h-6 w-6 p-0": t === "small" && !(r || a),
967
917
  "h-6 px-4 text-sm font-medium": t === "small" && (r || a),
968
918
  "h-8 w-8 p-1": t === "medium" && !(r || a),
@@ -971,16 +921,24 @@ const Ct = (e) => {
971
921
  "h-12 px-4 text-lg font-medium": t === "large" && (r || a)
972
922
  });
973
923
  }
974
- }, Mt = ({
924
+ }, Ct = ({
975
925
  mode: e,
976
926
  noBackground: t,
977
927
  noTruncate: r,
978
- variant: a
928
+ variant: a,
929
+ radius: o
979
930
  }) => {
980
931
  if (t)
981
- return "not-prose rounded-full";
932
+ return d("not-prose", {
933
+ "rounded-full": o === "large",
934
+ "rounded-md": o === "medium",
935
+ "rounded-sm": o === "small"
936
+ });
982
937
  if (a === "primary")
983
- return l("not-prose rounded-full", {
938
+ return d("not-prose", {
939
+ "rounded-full": o === "large",
940
+ "rounded-md": o === "medium",
941
+ "rounded-sm": o === "small",
984
942
  truncate: !r,
985
943
  "bg-action-dark text-copy-light": e === "dark",
986
944
  "bg-action-light text-copy-lighter": e === "light",
@@ -988,7 +946,10 @@ const Ct = (e) => {
988
946
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "alt-system"
989
947
  });
990
948
  if (a === "secondary")
991
- return l("not-prose rounded-full", {
949
+ return d("not-prose", {
950
+ "rounded-full": o === "large",
951
+ "rounded-md": o === "medium",
952
+ "rounded-sm": o === "small",
992
953
  truncate: !r,
993
954
  "bg-action-dark text-copy-light": e === "light",
994
955
  "bg-action-light text-copy-lighter": e === "dark",
@@ -996,14 +957,28 @@ const Ct = (e) => {
996
957
  "bg-action-light text-copy-lighter dark:bg-action-dark dark:text-copy-light": e === "system"
997
958
  });
998
959
  if (a === "danger")
999
- return l("not-prose rounded-full", {
960
+ return d("not-prose", {
961
+ "rounded-full": o === "large",
962
+ "rounded-md": o === "medium",
963
+ "rounded-sm": o === "small",
1000
964
  truncate: !r,
1001
965
  "bg-action-danger-dark text-copy-light": e === "dark",
1002
966
  "bg-action-danger-light text-copy-lighter": e === "light",
1003
967
  "bg-action-danger-dark text-copy-light dark:bg-action-danger-light dark:text-copy-lighter": e === "system",
1004
968
  "bg-action-danger-light text-copy-lighter dark:bg-action-danger-dark dark:text-copy-light": e === "alt-system"
1005
969
  });
1006
- }, At = ({
970
+ if (a === "selected")
971
+ return d("not-prose", {
972
+ "rounded-full": o === "large",
973
+ "rounded-md": o === "medium",
974
+ "rounded-sm": o === "small",
975
+ truncate: !r,
976
+ "bg-action-selected-dark text-copy-light": e === "dark",
977
+ "bg-action-selected-light text-copy-lighter": e === "light",
978
+ "bg-action-selected-dark text-copy-light dark:bg-action-selected-light dark:text-copy-lighter": e === "system",
979
+ "bg-action-selected-light text-copy-lighter dark:bg-action-selected-dark dark:text-copy-light": e === "alt-system"
980
+ });
981
+ }, St = ({
1007
982
  mode: e,
1008
983
  disabled: t,
1009
984
  variant: r
@@ -1011,27 +986,34 @@ const Ct = (e) => {
1011
986
  if (t)
1012
987
  return "";
1013
988
  if (r === "primary")
1014
- return l("hover:text-copy-light-hover", {
989
+ return d("hover:text-copy-light-hover", {
1015
990
  "hover:bg-action-dark-hover": e === "dark",
1016
991
  "hover:bg-action-light-hover": e === "light",
1017
992
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "system",
1018
993
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "alt-system"
1019
994
  });
1020
995
  if (r === "secondary")
1021
- return l("hover:text-copy-light-hover", {
996
+ return d("hover:text-copy-light-hover", {
1022
997
  "hover:bg-action-dark-hover": e === "light",
1023
998
  "hover:bg-action-light-hover": e === "dark",
1024
999
  "hover:bg-action-dark-hover dark:hover:bg-action-light-hover": e === "alt-system",
1025
1000
  "hover:bg-action-light-hover dark:hover:bg-action-dark-hover": e === "system"
1026
1001
  });
1027
1002
  if (r === "danger")
1028
- return l("hover:text-copy-light-hover", {
1003
+ return d("hover:text-copy-light-hover", {
1029
1004
  "hover:bg-action-danger-dark-hover": e === "dark",
1030
1005
  "hover:bg-action-danger-light-hover": e === "light",
1031
1006
  "hover:bg-action-danger-dark-hover dark:hover:bg-action-danger-light-hover": e === "system",
1032
1007
  "hover:bg-action-danger-light-hover dark:hover:bg-action-danger-dark-hover": e === "alt-system"
1033
1008
  });
1034
- }, Lt = ({
1009
+ if (r === "selected")
1010
+ return d("hover:text-copy-light-hover", {
1011
+ "hover:bg-action-selected-dark-hover": e === "dark",
1012
+ "hover:bg-action-selected-light-hover": e === "light",
1013
+ "hover:bg-action-selected-dark-hover dark:hover:bg-action-selected-light-hover": e === "system",
1014
+ "hover:bg-action-selected-light-hover dark:hover:bg-action-selected-dark-hover": e === "alt-system"
1015
+ });
1016
+ }, Rt = ({
1035
1017
  mode: e,
1036
1018
  disabled: t,
1037
1019
  variant: r
@@ -1039,27 +1021,34 @@ const Ct = (e) => {
1039
1021
  if (t)
1040
1022
  return "";
1041
1023
  if (r === "primary")
1042
- return l("active:text-copy-light-active", {
1024
+ return d("active:text-copy-light-active", {
1043
1025
  "active:bg-action-dark-active": e === "dark",
1044
1026
  "active:bg-action-light-active": e === "light",
1045
1027
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "system",
1046
1028
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "alt-system"
1047
1029
  });
1048
1030
  if (r === "secondary")
1049
- return l("active:text-copy-light-active", {
1031
+ return d("active:text-copy-light-active", {
1050
1032
  "active:bg-action-dark-active": e === "light",
1051
1033
  "active:bg-action-light-active": e === "dark",
1052
1034
  "active:bg-action-dark-active dark:active:bg-action-light-active": e === "alt-system",
1053
1035
  "active:bg-action-light-active dark:active:bg-action-dark-active": e === "system"
1054
1036
  });
1055
1037
  if (r === "danger")
1056
- return l("active:text-copy-lighter-active", {
1038
+ return d("active:text-copy-lighter-active", {
1057
1039
  "active:bg-action-danger-dark-active": e === "dark",
1058
1040
  "active:bg-action-danger-light-active": e === "light",
1059
1041
  "active:bg-action-danger-dark-active dark:active:bg-action-danger-light-active": e === "system",
1060
1042
  "active:bg-action-danger-light-active dark:active:bg-action-danger-dark-active": e === "alt-system"
1061
1043
  });
1062
- }, Ot = ({
1044
+ if (r === "selected")
1045
+ return d("active:text-copy-lighter-active", {
1046
+ "active:bg-action-selected-dark-active": e === "dark",
1047
+ "active:bg-action-selected-light-active": e === "light",
1048
+ "active:bg-action-selected-dark-active dark:active:bg-action-selected-light-active": e === "system",
1049
+ "active:bg-action-selected-light-active dark:active:bg-action-selected-dark-active": e === "alt-system"
1050
+ });
1051
+ }, Bt = ({
1063
1052
  mode: e,
1064
1053
  noBorder: t,
1065
1054
  variant: r
@@ -1067,178 +1056,192 @@ const Ct = (e) => {
1067
1056
  if (t)
1068
1057
  return "border border-transparent";
1069
1058
  if (r === "primary")
1070
- return l("border", {
1059
+ return d("border", {
1071
1060
  "border-border-dark": e === "dark",
1072
1061
  "border-border-accent": e === "light",
1073
1062
  "border-border-dark dark:border-border-accent": e === "system",
1074
1063
  "border-border-accent dark:border-border-dark": e === "alt-system"
1075
1064
  });
1076
1065
  if (r === "secondary")
1077
- return l("border", {
1066
+ return d("border", {
1078
1067
  "border-border-dark": e === "light",
1079
1068
  "border-border-accent": e === "dark",
1080
1069
  "border-border-dark dark:border-border-accent": e === "alt-system",
1081
1070
  "border-border-accent dark:border-border-dark": e === "system"
1082
1071
  });
1083
1072
  if (r === "danger")
1084
- return l("border", {
1073
+ return d("border", {
1085
1074
  "border-border-danger-dark": e === "dark",
1086
1075
  "border-border-danger-medium": e === "light",
1087
1076
  "border-border-danger-dark dark:border-border-danger-medium": e === "system",
1088
1077
  "border-border-danger-medium dark:border-border-danger-dark": e === "alt-system"
1089
1078
  });
1090
- }, Ut = ({ focusMode: e }) => l("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1079
+ if (r === "selected")
1080
+ return d("border", {
1081
+ "border-border-selected-dark": e === "dark",
1082
+ "border-border-selected-medium": e === "light",
1083
+ "border-border-selected-dark dark:border-border-selected-medium": e === "system",
1084
+ "border-border-selected-medium dark:border-border-selected-dark": e === "alt-system"
1085
+ });
1086
+ }, Mt = ({
1087
+ focusMode: e
1088
+ }) => d("focus:outline", "focus:outline-2", "focus:outline-offset-2", {
1091
1089
  "focus:outline-focus-dark": e === "dark",
1092
1090
  "focus:outline-focus-light": e === "light",
1093
1091
  "focus:outline-focus-light dark:focus:outline-focus-dark": e === "alt-system",
1094
1092
  "focus:outline-focus-dark dark:focus:outline-focus-light": e === "system"
1095
- }), _e = ({
1093
+ }), xe = ({
1096
1094
  type: e,
1097
1095
  className: t,
1098
1096
  raw: r,
1099
1097
  mode: a,
1100
- focusMode: i,
1101
- disabled: o,
1102
- fullWidth: c,
1103
- size: d,
1104
- noBorder: m,
1105
- labelRight: g,
1106
- labelLeft: p,
1107
- spacing: u,
1108
- noBackground: b,
1109
- variant: n,
1110
- noTruncate: h,
1111
- align: f
1112
- }) => (n || (n = "primary"), r ? l(re, t) : l(
1098
+ focusMode: o,
1099
+ disabled: i,
1100
+ fullWidth: g,
1101
+ size: l,
1102
+ noBorder: u,
1103
+ labelRight: m,
1104
+ labelLeft: b,
1105
+ noBackground: h,
1106
+ variant: c,
1107
+ noTruncate: n,
1108
+ align: p,
1109
+ radius: f
1110
+ }) => (c || (c = "primary"), r ? d(re, t) : d(
1113
1111
  re,
1114
- t,
1115
- Ct(u),
1116
- Mt({ mode: a, variant: n, noBackground: b, noTruncate: h }),
1117
- Bt({ type: e, size: d, labelRight: g, labelLeft: p, align: f }),
1118
- Ot({ mode: a, variant: n, noBorder: m }),
1119
- Ut({ focusMode: i }),
1120
- At({ mode: a, variant: n, disabled: o }),
1121
- Lt({ mode: a, variant: n, disabled: o }),
1112
+ Ct({
1113
+ mode: a,
1114
+ variant: c,
1115
+ noBackground: h,
1116
+ noTruncate: n,
1117
+ radius: f
1118
+ }),
1119
+ Et({ type: e, size: l, labelRight: m, labelLeft: b, align: p }),
1120
+ Bt({ mode: a, variant: c, noBorder: u }),
1121
+ Mt({ focusMode: o }),
1122
+ St({ mode: a, variant: c, disabled: i }),
1123
+ Rt({ mode: a, variant: c, disabled: i }),
1122
1124
  {
1123
- "w-full": c,
1124
- "disabled:cursor-not-allowed disabled:opacity-50": o
1125
- }
1126
- )), $t = (e, t, r) => {
1125
+ "w-full": g,
1126
+ "disabled:cursor-not-allowed disabled:opacity-50": i
1127
+ },
1128
+ t
1129
+ )), At = (e, t, r) => {
1127
1130
  var a;
1128
1131
  !t && (!document.activeElement || document.activeElement !== e.currentTarget) && typeof ((a = e == null ? void 0 : e.currentTarget) == null ? void 0 : a.focus) == "function" && e.currentTarget.focus(), typeof r == "function" && r(e);
1129
- }, K = E.forwardRef((e, t) => {
1130
- const { onClick: r, noInternalClick: a = !1, ...i } = e;
1132
+ }, K = C.forwardRef((e, t) => {
1133
+ const { onClick: r, noInternalClick: a = !1, ...o } = e;
1131
1134
  return /* @__PURE__ */ s(
1132
1135
  "button",
1133
1136
  {
1134
1137
  ref: t,
1135
- onClick: (o) => {
1136
- $t(o, a, r);
1138
+ onClick: (i) => {
1139
+ At(i, a, r);
1137
1140
  },
1138
- ...i
1141
+ ...o
1139
1142
  }
1140
1143
  );
1141
1144
  });
1142
1145
  K.displayName = "BaseButton";
1143
- const xe = E.forwardRef(
1146
+ const Te = C.forwardRef(
1144
1147
  ({
1145
1148
  children: e,
1146
1149
  disabled: t = !1,
1147
1150
  mode: r = "system",
1148
1151
  focusMode: a = "system",
1149
- fullWidth: i = !1,
1150
- className: o,
1151
- size: c = "medium",
1152
- raw: d = !1,
1153
- noBorder: m = !1,
1154
- spacing: g,
1155
- variant: p = "primary",
1156
- noTruncate: u = !1,
1157
- ...b
1152
+ fullWidth: o = !1,
1153
+ className: i,
1154
+ size: g = "medium",
1155
+ raw: l = !1,
1156
+ noBorder: u = !1,
1157
+ variant: m = "primary",
1158
+ noTruncate: b = !1,
1159
+ radius: h = "large",
1160
+ ...c
1158
1161
  }, n) => {
1159
- const h = _e({
1162
+ const p = xe({
1160
1163
  type: ke,
1161
1164
  mode: r,
1162
1165
  focusMode: a,
1163
- fullWidth: i,
1166
+ fullWidth: o,
1164
1167
  disabled: t,
1165
- raw: d,
1166
- className: o,
1167
- size: c,
1168
- noBorder: m,
1169
- spacing: g,
1170
- variant: p,
1171
- noTruncate: u
1168
+ raw: l,
1169
+ className: i,
1170
+ size: g,
1171
+ noBorder: u,
1172
+ variant: m,
1173
+ noTruncate: b,
1174
+ radius: h
1172
1175
  });
1173
1176
  return /* @__PURE__ */ s(
1174
1177
  K,
1175
1178
  {
1176
1179
  ref: n,
1177
- className: h,
1180
+ className: p,
1178
1181
  disabled: t,
1179
- ...b,
1182
+ ...c,
1180
1183
  children: e
1181
1184
  }
1182
1185
  );
1183
1186
  }
1184
1187
  );
1185
- xe.displayName = "Button";
1188
+ Te.displayName = "Button";
1186
1189
  /*!
1187
- @versini/ui-button v1.6.0
1190
+ @versini/ui-button v2.0.0
1188
1191
  © 2024 gizmette.com
1189
1192
  */
1190
1193
  try {
1191
1194
  window.__VERSINI_UI_BUTTON__ || (window.__VERSINI_UI_BUTTON__ = {
1192
- version: "1.6.0",
1193
- buildTime: "12/26/2024 06:05 PM EST",
1195
+ version: "2.0.0",
1196
+ buildTime: "12/29/2024 04:16 PM EST",
1194
1197
  homepage: "https://github.com/aversini/ui-components",
1195
1198
  license: "MIT"
1196
1199
  });
1197
1200
  } catch {
1198
1201
  }
1199
- const Vt = E.forwardRef(
1202
+ const Lt = C.forwardRef(
1200
1203
  ({
1201
1204
  children: e,
1202
1205
  disabled: t = !1,
1203
1206
  mode: r = "system",
1204
1207
  focusMode: a = "system",
1205
- fullWidth: i = !1,
1206
- className: o,
1207
- type: c = "button",
1208
- raw: d = !1,
1209
- noBorder: m = !1,
1210
- "aria-label": g,
1211
- label: p,
1212
- size: u = "medium",
1213
- labelRight: b,
1208
+ fullWidth: o = !1,
1209
+ className: i,
1210
+ type: g = "button",
1211
+ raw: l = !1,
1212
+ noBorder: u = !1,
1213
+ "aria-label": m,
1214
+ label: b,
1215
+ size: h = "medium",
1216
+ labelRight: c,
1214
1217
  labelLeft: n,
1215
- spacing: h,
1216
- noBackground: f = !1,
1217
- align: I = "center",
1218
+ noBackground: p = !1,
1219
+ align: f = "center",
1218
1220
  active: N = !1,
1221
+ radius: w = "large",
1219
1222
  ...k
1220
- }, _) => {
1221
- const w = _e({
1223
+ }, x) => {
1224
+ const I = xe({
1222
1225
  type: ve,
1223
1226
  mode: r,
1224
1227
  focusMode: a,
1225
- fullWidth: i,
1228
+ fullWidth: o,
1226
1229
  disabled: t,
1227
- raw: d,
1228
- className: o,
1229
- noBorder: m,
1230
- size: u,
1231
- labelRight: b,
1230
+ raw: l,
1231
+ className: i,
1232
+ noBorder: u,
1233
+ size: h,
1234
+ labelRight: c,
1232
1235
  labelLeft: n,
1233
- spacing: h,
1234
- noBackground: f,
1235
- align: I
1236
- }), x = l({
1237
- "text-copy-accent-dark": r === "light" && !d,
1238
- "text-copy-light": r === "dark" && !d,
1239
- "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !d,
1240
- "text-copy-light dark:text-copy-accent-dark": r === "system" && !d
1241
- }), V = N ? l(
1236
+ noBackground: p,
1237
+ align: f,
1238
+ radius: w
1239
+ }), T = d({
1240
+ "text-copy-accent-dark": r === "light" && !l,
1241
+ "text-copy-light": r === "dark" && !l,
1242
+ "text-copy-accent-dark dark:text-copy-light": r === "alt-system" && !l,
1243
+ "text-copy-light dark:text-copy-accent-dark": r === "system" && !l
1244
+ }), V = N ? d(
1242
1245
  "relative",
1243
1246
  "focus-within:static",
1244
1247
  "focus-within:after:border-transparent",
@@ -1258,25 +1261,25 @@ const Vt = E.forwardRef(
1258
1261
  return /* @__PURE__ */ s("div", { className: V, children: /* @__PURE__ */ v(
1259
1262
  K,
1260
1263
  {
1261
- ref: _,
1262
- className: w,
1264
+ ref: x,
1265
+ className: I,
1263
1266
  disabled: t,
1264
- type: c,
1265
- "aria-label": g || p,
1267
+ type: g,
1268
+ "aria-label": m || b,
1266
1269
  ...k,
1267
1270
  children: [
1268
1271
  n && /* @__PURE__ */ s("span", { className: "pr-2", children: n }),
1269
- /* @__PURE__ */ s("div", { className: x, children: e }),
1270
- b && /* @__PURE__ */ s("span", { className: "pl-2", children: b })
1272
+ /* @__PURE__ */ s("div", { className: T, children: e }),
1273
+ c && /* @__PURE__ */ s("span", { className: "pl-2", children: c })
1271
1274
  ]
1272
1275
  }
1273
1276
  ) });
1274
1277
  }
1275
1278
  );
1276
- Vt.displayName = "ButtonSort";
1277
- const zt = 200, Pt = ({
1279
+ Lt.displayName = "ButtonSort";
1280
+ const Ot = 200, Ut = ({
1278
1281
  string: e,
1279
- idealLength: t = zt
1282
+ idealLength: t = Ot
1280
1283
  }) => {
1281
1284
  if (e.length <= t)
1282
1285
  return { string: e, isTruncated: !1 };
@@ -1287,44 +1290,44 @@ const zt = 200, Pt = ({
1287
1290
  string: e.slice(0, t + r),
1288
1291
  isTruncated: !0
1289
1292
  };
1290
- }, Dt = ({
1293
+ }, zt = ({
1291
1294
  children: e,
1292
1295
  length: t = 200,
1293
1296
  mode: r = "system",
1294
1297
  focusMode: a = "system"
1295
1298
  }) => {
1296
- const [i, o] = M(!1);
1299
+ const [o, i] = M(!1);
1297
1300
  if (typeof e != "string")
1298
1301
  return e;
1299
- const { string: c, isTruncated: d } = Pt({
1302
+ const { string: g, isTruncated: l } = Ut({
1300
1303
  string: e,
1301
1304
  idealLength: t
1302
1305
  });
1303
1306
  return /* @__PURE__ */ v("span", { style: { wordBreak: "break-word" }, children: [
1304
- i ? e : c,
1305
- d && /* @__PURE__ */ s(
1306
- xe,
1307
+ o ? e : g,
1308
+ l && /* @__PURE__ */ s(
1309
+ Te,
1307
1310
  {
1308
1311
  mode: r,
1309
1312
  focusMode: a,
1310
- spacing: { l: 2 },
1313
+ className: "ml-2",
1311
1314
  size: "small",
1312
- onClick: (m) => {
1313
- m.preventDefault(), o(!i);
1315
+ onClick: (u) => {
1316
+ u.preventDefault(), i(!o);
1314
1317
  },
1315
- children: i ? "less..." : "more..."
1318
+ children: o ? "less..." : "more..."
1316
1319
  }
1317
1320
  )
1318
1321
  ] });
1319
1322
  };
1320
1323
  /*!
1321
- @versini/ui-truncate v1.1.7
1324
+ @versini/ui-truncate v2.0.0
1322
1325
  © 2024 gizmette.com
1323
1326
  */
1324
1327
  try {
1325
1328
  window.__VERSINI_UI_TRUNCATE__ || (window.__VERSINI_UI_TRUNCATE__ = {
1326
- version: "1.1.7",
1327
- buildTime: "12/26/2024 06:06 PM EST",
1329
+ version: "2.0.0",
1330
+ buildTime: "12/29/2024 04:16 PM EST",
1328
1331
  homepage: "https://github.com/aversini/ui-components",
1329
1332
  license: "MIT"
1330
1333
  });
@@ -1333,118 +1336,118 @@ try {
1333
1336
  const ae = Ke(
1334
1337
  () => import(
1335
1338
  /* webpackChunkName: "LazyMessageAssistant" */
1336
- "./LazyMessageAssistant.B3ooGdCs.js"
1339
+ "./LazyMessageAssistant.CXukpCSr.js"
1337
1340
  ).then((e) => e.LazyMessageAssistant)
1338
- ), Gt = () => {
1341
+ ), Vt = () => {
1339
1342
  const { state: e } = R(U);
1340
1343
  return /* @__PURE__ */ v(O, { children: [
1341
1344
  e && e.messages.length > 0 && e.messages.map((t, r) => {
1342
- const { role: a, content: i, name: o, processingTime: c } = t.message;
1343
- return (a === S || a === j) && i ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1345
+ const { role: a, content: o, name: i, processingTime: g } = t.message;
1346
+ return (a === E || a === P) && o ? /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(
1344
1347
  ae,
1345
1348
  {
1346
- name: o,
1347
- processingTime: c,
1348
- children: i
1349
+ name: i,
1350
+ processingTime: g,
1351
+ children: o
1349
1352
  }
1350
- ) }, `${r}-${a}`) : a === D && i ? /* @__PURE__ */ s(
1351
- Et,
1353
+ ) }, `${r}-${a}`) : a === G && o ? /* @__PURE__ */ s(
1354
+ wt,
1352
1355
  {
1353
1356
  kind: "right",
1354
- copyToClipboard: i,
1357
+ copyToClipboard: o,
1355
1358
  copyToClipboardFocusMode: "light",
1356
- children: /* @__PURE__ */ s(Dt, { mode: "light", focusMode: "light", children: i })
1359
+ children: /* @__PURE__ */ s(zt, { mode: "light", focusMode: "light", children: o })
1357
1360
  },
1358
1361
  `${r}-${a}`
1359
1362
  ) : null;
1360
1363
  }),
1361
- me(D, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
1364
+ me(G, e) && /* @__PURE__ */ s(Z, { fallback: /* @__PURE__ */ s("span", {}), children: /* @__PURE__ */ s(ae, { loading: !0 }) })
1362
1365
  ] });
1363
1366
  }, L = (e, t) => {
1364
1367
  e({
1365
- type: de,
1368
+ type: ne,
1366
1369
  payload: {
1367
1370
  streaming: t
1368
1371
  }
1369
1372
  });
1370
1373
  }, oe = (e) => {
1371
1374
  L(e, !1), e({
1372
- type: C,
1375
+ type: S,
1373
1376
  payload: {
1374
1377
  message: {
1375
- role: j,
1378
+ role: P,
1376
1379
  content: Oe
1377
1380
  }
1378
1381
  }
1379
1382
  });
1380
- }, jt = () => {
1381
- const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(G), [i, o] = M(""), { getAccessToken: c, user: d } = $(), m = B(null), g = B(
1383
+ }, Dt = () => {
1384
+ const { state: e, dispatch: t } = R(U), { state: r, dispatch: a } = R(H), [o, i] = M(""), { getAccessToken: g, user: l } = z(), u = B(null), m = B(
1382
1385
  null
1383
1386
  );
1384
- T(() => {
1387
+ _(() => {
1385
1388
  (async () => {
1386
- var b;
1389
+ var c;
1387
1390
  if (!e || e.messages.length === 0) {
1388
- (b = g == null ? void 0 : g.current) == null || b.cancel();
1391
+ (c = m == null ? void 0 : m.current) == null || c.cancel();
1389
1392
  return;
1390
1393
  }
1391
- const u = e.messages[e.messages.length - 1];
1392
- if (!(e.messages.length === 0 || u.message.role === S || u.message.role === Be || u.message.role === j || u.message.role === Me))
1394
+ const h = e.messages[e.messages.length - 1];
1395
+ if (!(e.messages.length === 0 || h.message.role === E || h.message.role === Be || h.message.role === P || h.message.role === Me))
1393
1396
  try {
1394
- const n = await He({
1395
- accessToken: await c(),
1397
+ const n = await je({
1398
+ accessToken: await g(),
1396
1399
  name: "generate",
1397
1400
  data: {
1398
1401
  messages: e.messages,
1399
1402
  model: e.engine || A,
1400
- user: (d == null ? void 0 : d.username) || "",
1403
+ user: (l == null ? void 0 : l.username) || "",
1401
1404
  id: e.id,
1402
1405
  usage: e.usage
1403
1406
  }
1404
1407
  });
1405
1408
  if (n && n.ok) {
1406
- const h = H();
1407
- g.current = n.body.getReader();
1409
+ const p = j();
1410
+ m.current = n.body.getReader();
1408
1411
  const f = new TextDecoder();
1409
1412
  for (; ; ) {
1410
1413
  L(t, !0);
1411
- const { done: I, value: N } = await g.current.read();
1412
- if (I) {
1414
+ const { done: N, value: w } = await m.current.read();
1415
+ if (N) {
1413
1416
  L(t, !1);
1414
1417
  break;
1415
1418
  }
1416
- const k = f.decode(N, { stream: !0 }), _ = k.indexOf(q);
1417
- if (_ !== -1) {
1418
- const w = k.substring(0, _), x = JSON.parse(
1419
- k.substring(_ + q.length)
1419
+ const k = f.decode(w, { stream: !0 }), x = k.indexOf(q);
1420
+ if (x !== -1) {
1421
+ const I = k.substring(0, x), T = JSON.parse(
1422
+ k.substring(x + q.length)
1420
1423
  );
1421
1424
  t({
1422
- type: ne,
1425
+ type: de,
1423
1426
  payload: {
1424
- model: x.model,
1425
- usage: x.usage
1427
+ model: T.model,
1428
+ usage: T.usage
1426
1429
  }
1427
1430
  }), t({
1428
- type: C,
1431
+ type: S,
1429
1432
  payload: {
1430
1433
  message: {
1431
- content: w,
1432
- role: S,
1433
- messageId: h,
1434
- processingTime: x.processingTime,
1435
- name: x.name
1434
+ content: I,
1435
+ role: E,
1436
+ messageId: p,
1437
+ processingTime: T.processingTime,
1438
+ name: T.name
1436
1439
  }
1437
1440
  }
1438
1441
  }), L(t, !1);
1439
1442
  break;
1440
1443
  } else
1441
1444
  t({
1442
- type: C,
1445
+ type: S,
1443
1446
  payload: {
1444
1447
  message: {
1445
1448
  content: k,
1446
- role: S,
1447
- messageId: h
1449
+ role: E,
1450
+ messageId: p
1448
1451
  }
1449
1452
  }
1450
1453
  });
@@ -1456,42 +1459,42 @@ const ae = Ke(
1456
1459
  }
1457
1460
  })();
1458
1461
  }, [e == null ? void 0 : e.messages]);
1459
- const p = async (u) => {
1460
- u.preventDefault(), t({
1461
- type: C,
1462
+ const b = async (h) => {
1463
+ h.preventDefault(), t({
1464
+ type: S,
1462
1465
  payload: {
1463
1466
  message: {
1464
- role: D,
1465
- content: i
1467
+ role: G,
1468
+ content: o
1466
1469
  }
1467
1470
  }
1468
- }), o("");
1471
+ }), i("");
1469
1472
  };
1470
- return T(() => {
1473
+ return _(() => {
1471
1474
  if (r.tag !== "") {
1472
- const u = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1473
- u.indexOf(X) !== -1 ? navigator.clipboard.readText().then((n) => {
1474
- o(u.replace(X, n));
1475
- }) : o(u), m.current && m.current.focus(), a({
1475
+ const h = r.tag.endsWith(":") && !r.tag.endsWith(": ") ? r.tag + " " : r.tag;
1476
+ h.indexOf(X) !== -1 ? navigator.clipboard.readText().then((n) => {
1477
+ i(h.replace(X, n));
1478
+ }) : i(h), u.current && u.current.focus(), a({
1476
1479
  type: ce
1477
1480
  });
1478
1481
  }
1479
- }, [r, a]), T(() => {
1480
- e && e.usage === 0 && e.messages.length === 0 && m.current && m.current.focus();
1481
- }, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: p, children: /* @__PURE__ */ s(
1482
+ }, [r, a]), _(() => {
1483
+ e && e.usage === 0 && e.messages.length === 0 && u.current && u.current.focus();
1484
+ }, [e]), /* @__PURE__ */ s("form", { className: "mt-2", onSubmit: b, children: /* @__PURE__ */ s(
1482
1485
  We,
1483
1486
  {
1484
1487
  mode: "dark",
1485
1488
  focusMode: "light",
1486
- ref: m,
1489
+ ref: u,
1487
1490
  name: "chat-input",
1488
1491
  label: Ae,
1489
1492
  helperText: "Press ENTER to add a new line",
1490
1493
  helperTextOnFocus: !0,
1491
1494
  required: !0,
1492
- value: i,
1493
- onChange: (u) => o(u.target.value),
1494
- onKeyDown: Qe([["mod+Enter", p]]),
1495
+ value: o,
1496
+ onChange: (h) => i(h.target.value),
1497
+ onKeyDown: Qe([["mod+Enter", b]]),
1495
1498
  rightElement: /* @__PURE__ */ s(
1496
1499
  ue,
1497
1500
  {
@@ -1505,95 +1508,95 @@ const ae = Ke(
1505
1508
  )
1506
1509
  }
1507
1510
  ) });
1508
- }, Ht = () => {
1509
- const { isAuthenticated: e } = $(), t = Ue(e);
1511
+ }, $t = () => {
1512
+ const { isAuthenticated: e } = z(), t = Ue(e);
1510
1513
  return /* @__PURE__ */ v(O, { children: [
1511
1514
  /* @__PURE__ */ v("div", { className: t, children: [
1512
- /* @__PURE__ */ s($e, {}),
1513
- /* @__PURE__ */ s(Gt, {})
1515
+ /* @__PURE__ */ s(ze, {}),
1516
+ /* @__PURE__ */ s(Vt, {})
1514
1517
  ] }),
1515
- /* @__PURE__ */ s(nt, {}),
1516
- /* @__PURE__ */ s(jt, {})
1518
+ /* @__PURE__ */ s(dt, {}),
1519
+ /* @__PURE__ */ s(Dt, {})
1517
1520
  ] });
1518
1521
  };
1519
- function Te({ isComponent: e = !1 }) {
1520
- const t = B(!1), { getAccessToken: r, user: a } = $(), [i] = Q({
1521
- key: J + De,
1522
- initialValue: ""
1523
- }), [o] = Q({
1522
+ function _e({ isComponent: e = !1 }) {
1523
+ const t = B(!1), { getAccessToken: r, user: a } = z(), [o] = Q({
1524
1524
  key: J + Ge,
1525
+ initialValue: ""
1526
+ }), [i] = Q({
1527
+ key: J + He,
1525
1528
  initialValue: Fe.ASC
1526
- }), [c, d] = z(at, {
1527
- id: H(),
1529
+ }), [g, l] = D(at, {
1530
+ id: j(),
1528
1531
  model: A,
1529
1532
  engine: A,
1530
1533
  usage: 0,
1531
1534
  messages: [],
1532
1535
  tags: [],
1533
1536
  isComponent: e
1534
- }), [m, g] = z(ot, {
1535
- searchString: i,
1537
+ }), [u, m] = D(ot, {
1538
+ searchString: o,
1536
1539
  sortedCell: "timestamp",
1537
- sortDirection: o
1538
- }), [p, u] = z(it, {
1540
+ sortDirection: i
1541
+ }), [b, h] = D(it, {
1539
1542
  tag: "",
1540
1543
  tags: []
1541
- }), [b, n] = M({
1544
+ }), [c, n] = M({
1542
1545
  version: "",
1543
1546
  models: [],
1544
1547
  plugins: [],
1545
1548
  engine: A,
1546
1549
  engines: []
1547
1550
  });
1548
- return T(() => {
1549
- b.version !== "" || t.current || (async () => {
1551
+ return _(() => {
1552
+ c.version !== "" || t.current || (async () => {
1550
1553
  try {
1551
1554
  t.current = !0;
1552
- const h = await he({
1555
+ const p = await he({
1553
1556
  accessToken: await r(),
1554
- type: pe.ABOUT,
1557
+ type: be.ABOUT,
1555
1558
  params: {
1556
1559
  user: a == null ? void 0 : a.username
1557
1560
  }
1558
1561
  });
1559
- t.current = !1, h.status === 200 && (n(h.data), d({
1562
+ t.current = !1, p.status === 200 && (n(p.data), l({
1560
1563
  type: se,
1561
1564
  payload: {
1562
- engine: h.data.engine
1565
+ engine: p.data.engine
1563
1566
  }
1564
1567
  }));
1565
1568
  } catch {
1566
1569
  }
1567
1570
  })();
1568
- }, [b, r, a]), T(() => {
1569
- var h;
1570
- (h = document.getElementById("logo")) == null || h.classList.add("fadeOut"), setTimeout(() => {
1571
+ }, [c, r, a]), _(() => {
1572
+ var p;
1573
+ (p = document.getElementById("logo")) == null || p.classList.add("fadeOut"), setTimeout(() => {
1571
1574
  var f;
1572
1575
  (f = document.getElementById("root")) == null || f.classList.replace("app-hidden", "fadeIn");
1573
1576
  }, 500);
1574
- }), /* @__PURE__ */ s(U.Provider, { value: { state: c, dispatch: d, serverStats: b }, children: /* @__PURE__ */ s(
1577
+ }), /* @__PURE__ */ s(U.Provider, { value: { state: g, dispatch: l, serverStats: c }, children: /* @__PURE__ */ s(
1575
1578
  Ve.Provider,
1576
1579
  {
1577
1580
  value: {
1578
- state: m,
1579
- dispatch: g
1581
+ state: u,
1582
+ dispatch: m
1580
1583
  },
1581
1584
  children: /* @__PURE__ */ v(
1582
- G.Provider,
1585
+ H.Provider,
1583
1586
  {
1584
- value: { state: p, dispatch: u },
1587
+ value: { state: b, dispatch: h },
1585
1588
  children: [
1586
- /* @__PURE__ */ s(ze, { children: /* @__PURE__ */ s(Ht, {}) }),
1587
- /* @__PURE__ */ s(Pe, { serverStats: b })
1589
+ /* @__PURE__ */ s(De, { children: /* @__PURE__ */ s($t, {}) }),
1590
+ /* @__PURE__ */ s($e, { serverStats: c })
1588
1591
  ]
1589
1592
  }
1590
1593
  )
1591
1594
  }
1592
1595
  ) });
1593
1596
  }
1594
- Te.displayName = "App";
1595
- const Xt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Te }, Symbol.toStringTag, { value: "Module" }));
1597
+ _e.displayName = "App";
1598
+ const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: _e }, Symbol.toStringTag, { value: "Module" }));
1596
1599
  export {
1597
- Xt as LazyApp,
1598
- Et as le
1600
+ Ft as LazyApp,
1601
+ wt as ae
1599
1602
  };