@solostylist/ui-kit 1.0.196 → 1.0.198

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 (108) hide show
  1. package/dist/{ArrowUpward-JWPHrR6I.js → ArrowUpward-D8eqD-si.js} +1 -1
  2. package/dist/{Box-p3bpOtdn.js → Box-BkXoTbe8.js} +3 -3
  3. package/dist/{ButtonBase-PbSTzuUP.js → ButtonBase-D73M0QY5.js} +7 -7
  4. package/dist/{ChevronLeft-BJjuFNNQ.js → ChevronLeft-BmgmPHp9.js} +1 -1
  5. package/dist/{ChevronRight-5ZX3FodP.js → ChevronRight-DbWSr8yz.js} +1 -1
  6. package/dist/{Close-C-pCw-CD.js → Close-lHCUMitI.js} +1 -1
  7. package/dist/{ContentCopy-CNxsEhmq.js → ContentCopy-D4SuJd86.js} +1 -1
  8. package/dist/{DefaultPropsProvider-2MEHB2yv.js → DefaultPropsProvider-DPuuPIbS.js} +2 -2
  9. package/dist/{Download-D97XSAig.js → Download-BoRQUwCf.js} +1 -1
  10. package/dist/{ExpandMore-CTZrSZlF.js → ExpandMore-C7yRQv1-.js} +1 -1
  11. package/dist/{Favorite-Cvjg7GqN.js → Favorite-Bz_HcMgN.js} +1 -1
  12. package/dist/{Menu-_ZW9WiF2.js → Menu-GVFDMHCN.js} +137 -131
  13. package/dist/{MenuItem-DTapLhin.js → MenuItem-2wG8I2HO.js} +5 -5
  14. package/dist/{Paper-5nSdRRBA.js → Paper-CR019bki.js} +6 -6
  15. package/dist/{Select-J5gDqfEk.js → Select-80JhW337.js} +7 -7
  16. package/dist/{Stack-BlwLEm6H.js → Stack-Dfjnuorw.js} +5 -5
  17. package/dist/{Typography-Cum5_Ehu.js → Typography-PcmlIqm1.js} +4 -4
  18. package/dist/assets/s-overlay-scrollbar.css +1 -1
  19. package/dist/{createSvgIcon-DTNHY3_v.js → createSvgIcon-BkbeLOhM.js} +3 -3
  20. package/dist/{createTheme-CIXJrNxb.js → createTheme-DgoJyWM-.js} +874 -871
  21. package/dist/defaultTheme-CulFxfLR.js +5 -0
  22. package/dist/{extendSxProp-CyoueGTe.js → extendSxProp-BJEIxcAx.js} +1 -1
  23. package/dist/{index-8LcCMmwl.js → index-DtGYsHSv.js} +4 -4
  24. package/dist/s-accordion/s-accordion.js +89 -89
  25. package/dist/s-action-overlay/s-action-overlay.js +7 -7
  26. package/dist/s-ai-tool-bar/s-ai-tool-bar.d.ts +44 -0
  27. package/dist/s-ai-tool-bar/s-ai-tool-bar.js +241 -272
  28. package/dist/s-avatar/s-avatar.js +2 -2
  29. package/dist/s-breadcrumbs/s-breadcrumbs.js +1 -1
  30. package/dist/s-carousel/s-carousel.d.ts +4 -4
  31. package/dist/s-carousel/s-carousel.js +4 -4
  32. package/dist/s-chat-input/s-chat-input.js +4 -4
  33. package/dist/s-chat-message/s-chat-message.js +135 -124
  34. package/dist/s-chips/s-chips.js +35 -35
  35. package/dist/s-code-block/s-code-block.js +1 -1
  36. package/dist/s-comment-message/s-comment-message.js +5 -5
  37. package/dist/s-copyable-text/s-copyable-text.js +1 -1
  38. package/dist/s-countdown/s-count-down.d.ts +15 -10
  39. package/dist/s-countdown/s-count-down.js +84 -101
  40. package/dist/s-data-table/s-data-table.js +75 -76
  41. package/dist/s-date-picker/s-date-picker.js +43 -47
  42. package/dist/s-datetime-picker/s-datetime-picker.js +782 -782
  43. package/dist/s-dialog/s-dialog.js +1 -1
  44. package/dist/s-dialog-confirm/s-dialog-confirm.js +2 -2
  45. package/dist/s-dialog-message/s-dialog-message.js +2 -2
  46. package/dist/s-empty/s-empty.js +1 -1
  47. package/dist/s-file-dropzone/s-file-dropzone.js +4 -4
  48. package/dist/s-file-icon/s-file-icon.js +15 -15
  49. package/dist/s-flex-box/s-flex-box.js +1 -1
  50. package/dist/s-gallery/s-gallery.js +1 -1
  51. package/dist/s-gradient-icon/s-gradient-icon.js +5 -5
  52. package/dist/s-image-comparison/s-image-comparison.js +3 -3
  53. package/dist/s-image-modal/s-image-modal.js +7 -7
  54. package/dist/s-label/s-label.d.ts +1 -1
  55. package/dist/s-label/s-label.js +1 -1
  56. package/dist/s-language-switcher/s-language-switcher.js +8 -8
  57. package/dist/s-localization-provider/s-localization-provider.js +1 -1
  58. package/dist/s-moving-border/s-moving-border.d.ts +5 -5
  59. package/dist/s-multi-select/s-multi-select.js +3 -3
  60. package/dist/s-overlay-scrollbar/s-overlay-scrollbar.js +6 -6
  61. package/dist/s-pixel-reveal/s-pixel-reveal.js +76 -71
  62. package/dist/s-radial-pulse-animate/s-radial-pulse-animate.js +2 -2
  63. package/dist/s-review/s-review.d.ts +3 -2
  64. package/dist/s-review/s-review.js +19 -19
  65. package/dist/s-scroll-to-top/s-scroll-to-top.js +5 -5
  66. package/dist/s-scroll-velocity/scroll-velocity-container.d.ts +1 -1
  67. package/dist/s-scroll-velocity/scroll-velocity-row.d.ts +3 -3
  68. package/dist/s-scroll-velocity/scroll-velocity-row.js +2 -2
  69. package/dist/s-select/s-select.d.ts +3 -0
  70. package/dist/s-select/s-select.js +60 -72
  71. package/dist/s-select-list/s-select-list.js +1 -1
  72. package/dist/s-stripe/s-stripe-cvc.d.ts +1 -1
  73. package/dist/s-stripe/s-stripe-expiry.d.ts +1 -1
  74. package/dist/s-stripe/s-stripe-number.d.ts +1 -1
  75. package/dist/s-stripe/stripe-input.d.ts +1 -1
  76. package/dist/s-text-editor/s-text-editor-toolbar.js +64 -60
  77. package/dist/s-text-editor/s-text-editor.js +1 -1
  78. package/dist/s-text-field/s-text-field.js +1 -1
  79. package/dist/s-text-shimmer/s-text-shimmer.js +3 -3
  80. package/dist/s-theme-demo/s-theme-demo.js +2 -2
  81. package/dist/s-theme-provider/s-theme-provider.d.ts +1 -1
  82. package/dist/s-theme-switch/s-theme-switch.js +1 -1
  83. package/dist/s-tip/s-tip.js +3 -3
  84. package/dist/{styled-BR6UL29H.js → styled-8Y5KoVix.js} +2 -2
  85. package/dist/theme/components/avatar.js +1 -1
  86. package/dist/theme/components/button.d.ts +2 -2
  87. package/dist/theme/components/button.js +1 -1
  88. package/dist/theme/components/chip.d.ts +2 -2
  89. package/dist/theme/components/chip.js +1 -1
  90. package/dist/theme/components/icon-button.d.ts +2 -2
  91. package/dist/theme/components/popover.js +2 -2
  92. package/dist/theme/components/skeleton.js +1 -1
  93. package/dist/theme/components/tooltip.js +5 -5
  94. package/dist/theme/customizations/data-display.js +12 -12
  95. package/dist/theme/customizations/feedback.js +2 -2
  96. package/dist/theme/customizations/inputs.js +12 -12
  97. package/dist/theme/customizations/navigation.js +28 -28
  98. package/dist/theme/customizations/surfaces.js +11 -11
  99. package/dist/theme/theme-primitives.js +1 -1
  100. package/dist/{useMobilePicker-C0pYjskU.js → useMobilePicker-DVnEuXv1.js} +3936 -3653
  101. package/dist/{useTheme-DSvhq4Np.js → useTheme-CWPkv7g3.js} +1 -1
  102. package/dist/{useThemeProps-C-oV4Fbz.js → useThemeProps-XYgXGzjS.js} +1 -1
  103. package/dist/utils/logger.d.ts +1 -1
  104. package/dist/utils-CHdpkEZx.js +33 -0
  105. package/dist/{warning-BZ61Y8gI.js → warning-Ba-7BBAN.js} +3 -3
  106. package/package.json +59 -59
  107. package/dist/defaultTheme-DLue8Fr1.js +0 -5
  108. package/dist/utils-DJIrqgo5.js +0 -18
@@ -6,13 +6,13 @@ const n = ({ avatar: i, name: a, showName: e = !1, size: r = 40, avatarProps: o
6
6
  h,
7
7
  {
8
8
  src: i,
9
- alt: a || "Avatar",
9
+ alt: a ?? "Avatar",
10
10
  width: r,
11
11
  height: r,
12
12
  variant: "circular",
13
13
  style: { borderRadius: "50%" }
14
14
  }
15
- ) : a?.[0] || "A" }),
15
+ ) : a?.[0] ?? "A" }),
16
16
  e && /* @__PURE__ */ t.jsx(d, { variant: "body1", fontSize: 20, children: a })
17
17
  ] });
18
18
  n.displayName = "SAvatar";
@@ -1,6 +1,6 @@
1
1
  import { j as o } from "../jsx-runtime-tc70JA_2.js";
2
2
  import { forwardRef as f } from "react";
3
- import { C as i } from "../ChevronRight-5ZX3FodP.js";
3
+ import { C as i } from "../ChevronRight-DbWSr8yz.js";
4
4
  import { Breadcrumbs as $, Typography as t, Link as e } from "@mui/material";
5
5
  const j = f(
6
6
  ({
@@ -6,13 +6,13 @@ import { default as Slider, Settings } from 'react-slick';
6
6
  */
7
7
  export interface SCarouselProps extends PropsWithChildren, Settings {
8
8
  /** Custom color for the navigation dots */
9
- dotColor?: string;
9
+ readonly dotColor?: string;
10
10
  /** Space between slides in pixels */
11
- spaceBetween?: number;
11
+ readonly spaceBetween?: number;
12
12
  /** Custom styles for the dots container */
13
- dotStyles?: SxProps<Theme>;
13
+ readonly dotStyles?: SxProps<Theme>;
14
14
  /** Custom styles for the arrow buttons */
15
- arrowStyles?: SxProps<Theme>;
15
+ readonly arrowStyles?: SxProps<Theme>;
16
16
  }
17
17
  /**
18
18
  * A carousel component built on react-slick with smooth sliding functionality and customizable navigation.
@@ -3,7 +3,7 @@ import ue, { forwardRef as nt } from "react";
3
3
  import { styled as Me, useTheme as it } from "@mui/material";
4
4
  import { c as be, a as ot, g as at } from "../_commonjsHelpers-ByX85dGu.js";
5
5
  import { SIconButton as Ue } from "../s-icon-button/s-icon-button.js";
6
- import { c as Ve } from "../createSvgIcon-DTNHY3_v.js";
6
+ import { c as Ve } from "../createSvgIcon-BkbeLOhM.js";
7
7
  import '../assets/s-carousel.css';const lt = Ve(/* @__PURE__ */ oe.jsx("path", {
8
8
  d: "M17.77 3.77 16 2 6 12l10 10 1.77-1.77L9.54 12z"
9
9
  }), "ArrowBackIosNew"), st = Ve(/* @__PURE__ */ oe.jsx("path", {
@@ -2374,7 +2374,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
2374
2374
  display: "flex",
2375
2375
  alignItems: "center",
2376
2376
  justifyContent: "center",
2377
- color: (i.vars || i).palette.primary.main,
2377
+ color: (i.vars ?? i).palette.primary.main,
2378
2378
  "& li": {
2379
2379
  width: 13,
2380
2380
  height: 7,
@@ -2384,7 +2384,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
2384
2384
  alignItems: "center",
2385
2385
  justifyContent: "center",
2386
2386
  transition: "all 0.4s",
2387
- "&.slick-active span": { backgroundColor: (i.vars || i).palette.primary.main },
2387
+ "&.slick-active span": { backgroundColor: (i.vars ?? i).palette.primary.main },
2388
2388
  "&.slick-active": { width: 18 }
2389
2389
  }
2390
2390
  })), Bt = Me("span", {
@@ -2395,7 +2395,7 @@ const Wt = /* @__PURE__ */ at(At), qt = Me("div", {
2395
2395
  borderRadius: 12,
2396
2396
  cursor: "pointer",
2397
2397
  position: "relative",
2398
- backgroundColor: i || (c.vars || c).palette.divider
2398
+ backgroundColor: i ?? (c.vars ?? c).palette.divider
2399
2399
  }));
2400
2400
  function Xt({ onClick: i, sx: c, className: h }) {
2401
2401
  const O = h?.split(" ").filter((y) => y !== "slick-next").join(" ");
@@ -5,9 +5,9 @@ import q from "emoji-picker-react";
5
5
  import { SFileIcon as G } from "../s-file-icon/s-file-icon.js";
6
6
  import { SIconButton as d } from "../s-icon-button/s-icon-button.js";
7
7
  import { STextField as J } from "../s-text-field/s-text-field.js";
8
- import { C as Q } from "../Close-C-pCw-CD.js";
9
- import { c as R } from "../createSvgIcon-DTNHY3_v.js";
10
- import { A as X } from "../ArrowUpward-JWPHrR6I.js";
8
+ import { C as Q } from "../Close-lHCUMitI.js";
9
+ import { c as R } from "../createSvgIcon-BkbeLOhM.js";
10
+ import { A as X } from "../ArrowUpward-D8eqD-si.js";
11
11
  const Y = R(/* @__PURE__ */ r.jsx("path", {
12
12
  d: "M16.5 6v11.5c0 2.21-1.79 4-4 4s-4-1.79-4-4V5c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5v10.5c0 .55-.45 1-1 1s-1-.45-1-1V6H10v9.5c0 1.38 1.12 2.5 2.5 2.5s2.5-1.12 2.5-2.5V5c0-2.21-1.79-4-4-4S7 2.79 7 5v12.5c0 3.04 2.46 5.5 5.5 5.5s5.5-2.46 5.5-5.5V6z"
13
13
  }), "AttachFile"), Z = R(/* @__PURE__ */ r.jsx("path", {
@@ -32,7 +32,7 @@ const Y = R(/* @__PURE__ */ r.jsx("path", {
32
32
  }, k = () => {
33
33
  a || p.trim().length === 0 && l.length === 0 || (I?.(p, l), u(""), i.forEach((e) => URL.revokeObjectURL(e)), h(/* @__PURE__ */ new Map()), m([]));
34
34
  }, z = (e) => {
35
- const n = Array.from(e.target.files || []).filter((t) => !(j && t.size > j));
35
+ const n = Array.from(e.target.files ?? []).filter((t) => !(j && t.size > j));
36
36
  m((t) => [...t, ...n]), E?.(n), e.target.value = "";
37
37
  }, K = (e) => {
38
38
  const o = l[e];
@@ -1,121 +1,132 @@
1
1
  import { j as e } from "../jsx-runtime-tc70JA_2.js";
2
- import { useState as C } from "react";
3
- import { Box as r, Typography as t, Paper as V, IconButton as k } from "@mui/material";
4
- import { SAvatar as M } from "../s-avatar/s-avatar.js";
2
+ import { useState as k } from "react";
3
+ import { Box as s, Typography as n, Paper as V, IconButton as M } from "@mui/material";
4
+ import { SAvatar as F } from "../s-avatar/s-avatar.js";
5
5
  import { SImageModal as P } from "../s-image-modal/s-image-modal.js";
6
6
  import U from "../s-lazy-image/s-lazy-image.js";
7
- import { SSkeleton as l } from "../s-skeleton/s-skeleton.js";
8
- import { c as h } from "../createSvgIcon-DTNHY3_v.js";
9
- import { f as H, a as q } from "../utils-DJIrqgo5.js";
10
- import { D as E } from "../Download-D97XSAig.js";
11
- const G = h(/* @__PURE__ */ e.jsx("path", {
7
+ import { SSkeleton as t } from "../s-skeleton/s-skeleton.js";
8
+ import { c as v } from "../createSvgIcon-BkbeLOhM.js";
9
+ import { f as H, a as q } from "../utils-CHdpkEZx.js";
10
+ import { D as E } from "../Download-BoRQUwCf.js";
11
+ const G = v(/* @__PURE__ */ e.jsx("path", {
12
12
  d: "M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2M12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8"
13
- }), "ErrorOutline"), J = h(/* @__PURE__ */ e.jsx("path", {
13
+ }), "ErrorOutline"), J = v(/* @__PURE__ */ e.jsx("path", {
14
14
  d: "M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm7 7V3.5L18.5 9z"
15
- }), "InsertDriveFile"), K = h(/* @__PURE__ */ e.jsx("path", {
15
+ }), "InsertDriveFile"), K = v(/* @__PURE__ */ e.jsx("path", {
16
16
  d: "M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4z"
17
- }), "Refresh"), Q = ({
18
- message: m,
19
- variant: F = "received",
20
- timestamp: g,
21
- avatar: j,
22
- senderName: o,
23
- showAvatar: n = !0,
24
- showTimestamp: u = !1,
25
- maxWidth: v = "70%",
26
- attachments: f = [],
27
- onAttachmentClick: a,
28
- onDownload: d,
29
- hasError: x = !1,
17
+ }), "Refresh"), Q = ({ isSent: r, showAvatar: d, showTimestamp: x, senderName: p, maxWidth: l, sx: a, ...c }) => /* @__PURE__ */ e.jsxs(
18
+ s,
19
+ {
20
+ display: "flex",
21
+ flexDirection: r ? "row-reverse" : "row",
22
+ alignItems: "flex-start",
23
+ gap: 1,
24
+ mb: 1,
25
+ sx: {
26
+ maxWidth: l,
27
+ alignSelf: r ? "flex-end" : "flex-start",
28
+ ...a
29
+ },
30
+ ...c,
31
+ children: [
32
+ d && !r && /* @__PURE__ */ e.jsx(t, { component: "rounded-avatar", width: 36, height: 36 }),
33
+ /* @__PURE__ */ e.jsxs(
34
+ s,
35
+ {
36
+ display: "flex",
37
+ flexDirection: "column",
38
+ alignItems: r ? "flex-end" : "flex-start",
39
+ gap: 0.5,
40
+ sx: { minWidth: 0 },
41
+ children: [
42
+ p && !r && /* @__PURE__ */ e.jsx(t, { variant: "text", width: 100, height: 12, sx: { ml: 0.5 } }),
43
+ /* @__PURE__ */ e.jsxs(
44
+ s,
45
+ {
46
+ sx: {
47
+ display: "inline-block",
48
+ width: "20rem",
49
+ maxWidth: "100%",
50
+ overflow: "hidden",
51
+ ml: 0.5
52
+ },
53
+ children: [
54
+ /* @__PURE__ */ e.jsx(t, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
55
+ /* @__PURE__ */ e.jsx(t, { variant: "text", width: "85%", height: 16, sx: { mb: 0.5 } }),
56
+ /* @__PURE__ */ e.jsx(t, { variant: "text", width: "70%", height: 16 })
57
+ ]
58
+ }
59
+ ),
60
+ x && /* @__PURE__ */ e.jsx(t, { variant: "text", width: 60, height: 10, sx: { ml: r ? 0 : 0.5, mr: r ? 0.5 : 0 } })
61
+ ]
62
+ }
63
+ ),
64
+ d && r && /* @__PURE__ */ e.jsx(t, { component: "rounded-avatar", width: 36, height: 36 })
65
+ ]
66
+ }
67
+ ), X = ({
68
+ message: r,
69
+ variant: d = "received",
70
+ timestamp: x,
71
+ avatar: p,
72
+ senderName: l,
73
+ showAvatar: a = !0,
74
+ showTimestamp: c = !1,
75
+ maxWidth: I = "70%",
76
+ attachments: u = [],
77
+ onAttachmentClick: f,
78
+ onDownload: h,
79
+ hasError: m = !1,
30
80
  errorMessage: W = "Failed to send message",
31
- onRetry: I,
81
+ onRetry: y,
32
82
  loading: D = !1,
33
- sx: y,
34
- ...S
83
+ sx: w,
84
+ ...b
35
85
  }) => {
36
- const [p, w] = C(null), [O, b] = C(!1), s = F === "sent", L = (i) => {
37
- a ? a(i) : (w(i), b(!0));
86
+ const [g, z] = k(null), [O, S] = k(!1), o = d === "sent", L = (i) => {
87
+ f ? f(i) : (z(i), S(!0));
38
88
  }, R = (i) => {
39
- a ? a(i) : d && d(i);
40
- }, c = f.filter((i) => i.type === "image"), z = f.filter((i) => i.type === "file");
41
- return D ? /* @__PURE__ */ e.jsxs(
42
- r,
89
+ f ? f(i) : h && h(i);
90
+ }, j = u.filter((i) => i.type === "image"), C = u.filter((i) => i.type === "file");
91
+ return D ? /* @__PURE__ */ e.jsx(
92
+ Q,
43
93
  {
44
- display: "flex",
45
- flexDirection: s ? "row-reverse" : "row",
46
- alignItems: "flex-start",
47
- gap: 1,
48
- mb: 1,
49
- sx: {
50
- maxWidth: v,
51
- alignSelf: s ? "flex-end" : "flex-start",
52
- ...y
53
- },
54
- ...S,
55
- children: [
56
- n && !s && /* @__PURE__ */ e.jsx(l, { component: "rounded-avatar", width: 36, height: 36 }),
57
- /* @__PURE__ */ e.jsxs(
58
- r,
59
- {
60
- display: "flex",
61
- flexDirection: "column",
62
- alignItems: s ? "flex-end" : "flex-start",
63
- gap: 0.5,
64
- sx: { minWidth: 0 },
65
- children: [
66
- o && !s && /* @__PURE__ */ e.jsx(l, { variant: "text", width: 100, height: 12, sx: { ml: 0.5 } }),
67
- /* @__PURE__ */ e.jsxs(
68
- r,
69
- {
70
- sx: {
71
- display: "inline-block",
72
- width: "20rem",
73
- maxWidth: "100%",
74
- overflow: "hidden",
75
- ml: 0.5
76
- },
77
- children: [
78
- /* @__PURE__ */ e.jsx(l, { variant: "text", width: "100%", height: 16, sx: { mb: 0.5 } }),
79
- /* @__PURE__ */ e.jsx(l, { variant: "text", width: "85%", height: 16, sx: { mb: 0.5 } }),
80
- /* @__PURE__ */ e.jsx(l, { variant: "text", width: "70%", height: 16 })
81
- ]
82
- }
83
- ),
84
- u && /* @__PURE__ */ e.jsx(l, { variant: "text", width: 60, height: 10, sx: { ml: s ? 0 : 0.5, mr: s ? 0.5 : 0 } })
85
- ]
86
- }
87
- ),
88
- n && s && /* @__PURE__ */ e.jsx(l, { component: "rounded-avatar", width: 36, height: 36 })
89
- ]
94
+ isSent: o,
95
+ showAvatar: a,
96
+ showTimestamp: c,
97
+ senderName: l,
98
+ maxWidth: I,
99
+ sx: w,
100
+ ...b
90
101
  }
91
102
  ) : /* @__PURE__ */ e.jsxs(
92
- r,
103
+ s,
93
104
  {
94
105
  display: "flex",
95
- flexDirection: s ? "row-reverse" : "row",
106
+ flexDirection: o ? "row-reverse" : "row",
96
107
  alignItems: "flex-start",
97
108
  gap: 1,
98
109
  mb: 1,
99
110
  sx: {
100
- maxWidth: v,
101
- alignSelf: s ? "flex-end" : "flex-start",
102
- ...y
111
+ maxWidth: I,
112
+ alignSelf: o ? "flex-end" : "flex-start",
113
+ ...w
103
114
  },
104
- ...S,
115
+ ...b,
105
116
  children: [
106
- n && !s && /* @__PURE__ */ e.jsx(M, { avatar: j, name: o, size: 36 }),
117
+ a && !o && /* @__PURE__ */ e.jsx(F, { avatar: p, name: l, size: 36 }),
107
118
  /* @__PURE__ */ e.jsxs(
108
- r,
119
+ s,
109
120
  {
110
121
  display: "flex",
111
122
  flexDirection: "column",
112
- alignItems: s ? "flex-end" : "flex-start",
123
+ alignItems: o ? "flex-end" : "flex-start",
113
124
  gap: 0.5,
114
125
  sx: { minWidth: 0 },
115
126
  children: [
116
- o && !s && /* @__PURE__ */ e.jsx(t, { children: o }),
127
+ l && !o && /* @__PURE__ */ e.jsx(n, { children: l }),
117
128
  /* @__PURE__ */ e.jsxs(
118
- r,
129
+ s,
119
130
  {
120
131
  sx: {
121
132
  display: "inline-block",
@@ -123,29 +134,29 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
123
134
  wordBreak: "break-word",
124
135
  maxWidth: "100%",
125
136
  border: "1px solid",
126
- borderColor: x ? "error.main" : "divider",
127
- ...x && {
137
+ borderColor: m ? "error.main" : "divider",
138
+ ...m && {
128
139
  opacity: 0.7
129
140
  },
130
141
  overflow: "hidden"
131
142
  },
132
143
  children: [
133
- c.length > 0 && /* @__PURE__ */ e.jsx(
134
- r,
144
+ j.length > 0 && /* @__PURE__ */ e.jsx(
145
+ s,
135
146
  {
136
147
  sx: {
137
148
  display: "grid",
138
- gridTemplateColumns: c.length === 1 ? "1fr" : "repeat(2, 1fr)",
149
+ gridTemplateColumns: j.length === 1 ? "1fr" : "repeat(2, 1fr)",
139
150
  gap: 0.5,
140
151
  p: 0.5
141
152
  },
142
153
  minWidth: 200,
143
- children: c.map((i) => /* @__PURE__ */ e.jsx(
144
- r,
154
+ children: j.map((i) => /* @__PURE__ */ e.jsx(
155
+ s,
145
156
  {
146
157
  sx: {
147
158
  position: "relative",
148
- paddingTop: c.length === 1 ? "66.67%" : "100%",
159
+ paddingTop: j.length === 1 ? "66.67%" : "100%",
149
160
  cursor: "pointer",
150
161
  borderRadius: 1.5,
151
162
  overflow: "hidden",
@@ -157,8 +168,8 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
157
168
  children: /* @__PURE__ */ e.jsx(
158
169
  U,
159
170
  {
160
- src: i.thumbnailUrl || i.url,
161
- alt: i.name || "Image",
171
+ src: i.thumbnailUrl ?? i.url,
172
+ alt: i.name ?? "Image",
162
173
  width: "100%",
163
174
  height: "100%",
164
175
  style: {
@@ -174,7 +185,7 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
174
185
  ))
175
186
  }
176
187
  ),
177
- z.length > 0 && /* @__PURE__ */ e.jsx(r, { sx: { p: 1.5 }, children: z.map((i, T) => /* @__PURE__ */ e.jsxs(
188
+ C.length > 0 && /* @__PURE__ */ e.jsx(s, { sx: { p: 1.5 }, children: C.map((i, T) => /* @__PURE__ */ e.jsxs(
178
189
  V,
179
190
  {
180
191
  variant: "outlined",
@@ -189,9 +200,9 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
189
200
  onClick: () => R(i),
190
201
  children: [
191
202
  /* @__PURE__ */ e.jsx(J, { sx: { fontSize: 32 } }),
192
- /* @__PURE__ */ e.jsxs(r, { sx: { flex: 1, minWidth: 0 }, children: [
203
+ /* @__PURE__ */ e.jsxs(s, { sx: { flex: 1, minWidth: 0 }, children: [
193
204
  /* @__PURE__ */ e.jsx(
194
- t,
205
+ n,
195
206
  {
196
207
  variant: "body2",
197
208
  sx: {
@@ -201,16 +212,16 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
201
212
  textOverflow: "ellipsis",
202
213
  whiteSpace: "nowrap"
203
214
  },
204
- children: i.name || "Unnamed File"
215
+ children: i.name ?? "Unnamed File"
205
216
  }
206
217
  ),
207
- i.size && /* @__PURE__ */ e.jsx(t, { variant: "caption", children: H(i.size) })
218
+ i.size && /* @__PURE__ */ e.jsx(n, { variant: "caption", children: H(i.size) })
208
219
  ] }),
209
- d && /* @__PURE__ */ e.jsx(
210
- k,
220
+ h && /* @__PURE__ */ e.jsx(
221
+ M,
211
222
  {
212
223
  onClick: (B) => {
213
- B.stopPropagation(), d(i);
224
+ B.stopPropagation(), h(i);
214
225
  },
215
226
  children: /* @__PURE__ */ e.jsx(E, {})
216
227
  }
@@ -219,43 +230,43 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
219
230
  },
220
231
  i.id
221
232
  )) }),
222
- m && /* @__PURE__ */ e.jsx(r, { sx: { px: 2, py: 1.5, pt: f.length > 0 ? 0 : 1.5 }, children: /* @__PURE__ */ e.jsx(
223
- t,
233
+ r && /* @__PURE__ */ e.jsx(s, { sx: { px: 2, py: 1.5, pt: u.length > 0 ? 0 : 1.5 }, children: /* @__PURE__ */ e.jsx(
234
+ n,
224
235
  {
225
236
  variant: "body2",
226
237
  sx: {
227
238
  fontSize: "0.875rem",
228
239
  whiteSpace: "pre-wrap",
229
- color: x ? "error.main" : "inherit"
240
+ color: m ? "error.main" : "inherit"
230
241
  },
231
- children: m
242
+ children: r
232
243
  }
233
244
  ) })
234
245
  ]
235
246
  }
236
247
  ),
237
- u && g && /* @__PURE__ */ e.jsx(t, { variant: "caption", children: q(g) }),
238
- x && /* @__PURE__ */ e.jsxs(r, { display: "flex", alignItems: "center", gap: 0.5, color: "error.main", children: [
248
+ c && x && /* @__PURE__ */ e.jsx(n, { variant: "caption", children: q(x) }),
249
+ m && /* @__PURE__ */ e.jsxs(s, { display: "flex", alignItems: "center", gap: 0.5, color: "error.main", children: [
239
250
  /* @__PURE__ */ e.jsx(G, { sx: { fontSize: "1rem" } }),
240
- /* @__PURE__ */ e.jsx(t, { color: "inherit", children: W }),
241
- I && /* @__PURE__ */ e.jsx(k, { onClick: I, children: /* @__PURE__ */ e.jsx(K, {}) })
251
+ /* @__PURE__ */ e.jsx(n, { color: "inherit", children: W }),
252
+ y && /* @__PURE__ */ e.jsx(M, { onClick: y, children: /* @__PURE__ */ e.jsx(K, {}) })
242
253
  ] })
243
254
  ]
244
255
  }
245
256
  ),
246
- n && s && /* @__PURE__ */ e.jsx(M, { avatar: j, name: o, size: 36 }),
247
- p && /* @__PURE__ */ e.jsx(
257
+ a && o && /* @__PURE__ */ e.jsx(F, { avatar: p, name: l, size: 36 }),
258
+ g && /* @__PURE__ */ e.jsx(
248
259
  P,
249
260
  {
250
261
  isOpen: O,
251
262
  onClose: () => {
252
- b(!1), w(null);
263
+ S(!1), z(null);
253
264
  },
254
265
  selectedItem: {
255
- id: p.id,
266
+ id: g.id,
256
267
  type: "image",
257
- url: p.url,
258
- title: p.name
268
+ url: g.url,
269
+ title: g.name
259
270
  },
260
271
  showNavigation: !1,
261
272
  showThumbnailDock: !1
@@ -265,8 +276,8 @@ const G = h(/* @__PURE__ */ e.jsx("path", {
265
276
  }
266
277
  );
267
278
  };
268
- Q.displayName = "SChatMessage";
279
+ X.displayName = "SChatMessage";
269
280
  export {
270
- Q as SChatMessage,
271
- Q as default
281
+ X as SChatMessage,
282
+ X as default
272
283
  };
@@ -1,52 +1,52 @@
1
1
  import { j as s } from "../jsx-runtime-tc70JA_2.js";
2
- import { useRef as S, useState as m, useCallback as C, useEffect as E } from "react";
3
- import { Box as p, Chip as c, Tooltip as R } from "@mui/material";
2
+ import { useRef as g, useState as m, useCallback as C, useEffect as E } from "react";
3
+ import { Box as a, Chip as c, Tooltip as R } from "@mui/material";
4
4
  const v = ({
5
- chips: t,
6
- overflow: r = !0,
5
+ chips: n,
6
+ overflow: o = !0,
7
7
  onClick: h,
8
- overflowText: d = "keywords"
8
+ overflowText: p = "keywords"
9
9
  }) => {
10
- const u = S(null), [b, w] = m([]), [y, W] = m([]), [x, j] = m(0), l = C((i) => {
10
+ const u = g(null), [b, w] = m([]), [y, W] = m([]), [x, j] = m(0), r = C((t) => {
11
11
  const e = document.createElement("span");
12
- e.style.visibility = "hidden", e.style.position = "absolute", e.style.whiteSpace = "nowrap", e.textContent = i.trim(), document.body.appendChild(e);
13
- const n = e.offsetWidth;
14
- return document.body.removeChild(e), n + 16;
15
- }, []), a = C(() => {
16
- const i = u.current?.offsetWidth || 0;
17
- let e = 0, n = 0;
18
- for (let o = 0; o < t.length; o++) {
19
- const f = l(t[o]);
20
- if (e + f <= i)
21
- e += f, n++;
12
+ e.style.visibility = "hidden", e.style.position = "absolute", e.style.whiteSpace = "nowrap", e.textContent = t.trim(), document.body.appendChild(e);
13
+ const i = e.offsetWidth;
14
+ return document.body.removeChild(e), i + 16;
15
+ }, []), l = C(() => {
16
+ const t = u.current?.offsetWidth ?? 0;
17
+ let e = 0, i = 0;
18
+ for (const d of n) {
19
+ const f = r(d);
20
+ if (e + f <= t)
21
+ e += f, i++;
22
22
  else
23
23
  break;
24
24
  }
25
- if (n < t.length) {
26
- const o = l(`+${t.length - n} ${d}`);
27
- for (; e + o > i && n > 0; )
28
- n--, e -= l(t[n]);
25
+ if (i < n.length) {
26
+ const d = r(`+${n.length - i} ${p}`);
27
+ for (; e + d > t && i > 0; )
28
+ i--, e -= r(n[i]);
29
29
  }
30
- w(t.slice(0, n)), W(t.slice(n)), j(t.length - n);
31
- }, [t, d, l]), g = r ? { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" } : {};
30
+ w(n.slice(0, i)), W(n.slice(i)), j(n.length - i);
31
+ }, [n, p, r]), S = o ? { textOverflow: "ellipsis", whiteSpace: "nowrap", overflow: "hidden" } : {};
32
32
  return E(() => {
33
- if (r)
34
- return a(), window.addEventListener("resize", a), () => {
35
- window.removeEventListener("resize", a);
33
+ if (o)
34
+ return l(), window.addEventListener("resize", l), () => {
35
+ window.removeEventListener("resize", l);
36
36
  };
37
- }, [t, r, a]), /* @__PURE__ */ s.jsxs(p, { ref: u, display: "flex", maxWidth: "100%", flexWrap: r ? "nowrap" : "wrap", ...g, children: [
38
- (r ? b : t).map((i) => /* @__PURE__ */ s.jsx(
39
- p,
37
+ }, [n, o, l]), /* @__PURE__ */ s.jsxs(a, { ref: u, display: "flex", maxWidth: "100%", flexWrap: o ? "nowrap" : "wrap", ...S, children: [
38
+ (o ? b : n).map((t) => /* @__PURE__ */ s.jsx(
39
+ a,
40
40
  {
41
41
  component: "span",
42
42
  textTransform: "lowercase",
43
43
  onClick: () => {
44
- h?.(i);
44
+ h?.(t);
45
45
  },
46
46
  children: /* @__PURE__ */ s.jsx(
47
47
  c,
48
48
  {
49
- label: i.trim(),
49
+ label: t.trim(),
50
50
  sx: {
51
51
  mr: 1,
52
52
  mb: 1,
@@ -56,9 +56,9 @@ const v = ({
56
56
  }
57
57
  )
58
58
  },
59
- i
59
+ t
60
60
  )),
61
- r && x > 0 && /* @__PURE__ */ s.jsx(
61
+ o && x > 0 && /* @__PURE__ */ s.jsx(
62
62
  R,
63
63
  {
64
64
  slotProps: {
@@ -66,11 +66,11 @@ const v = ({
66
66
  },
67
67
  arrow: !0,
68
68
  placement: "top",
69
- title: /* @__PURE__ */ s.jsx(p, { display: "flex", gap: 1, maxWidth: "240px", flexWrap: "wrap", children: y.map((i) => /* @__PURE__ */ s.jsx(c, { label: i.trim() }, i)) }),
70
- children: /* @__PURE__ */ s.jsx(p, { component: "span", textTransform: "lowercase", children: /* @__PURE__ */ s.jsx(
69
+ title: /* @__PURE__ */ s.jsx(a, { display: "flex", gap: 1, maxWidth: "240px", flexWrap: "wrap", children: y.map((t) => /* @__PURE__ */ s.jsx(c, { label: t.trim() }, t)) }),
70
+ children: /* @__PURE__ */ s.jsx(a, { component: "span", textTransform: "lowercase", children: /* @__PURE__ */ s.jsx(
71
71
  c,
72
72
  {
73
- label: `+${x} ${d}`,
73
+ label: `+${x} ${p}`,
74
74
  variant: "outlined",
75
75
  color: "info",
76
76
  sx: { mr: 1, mb: 1, userSelect: "none", cursor: "pointer" }
@@ -2,7 +2,7 @@ import { j as o } from "../jsx-runtime-tc70JA_2.js";
2
2
  import { useState as g } from "react";
3
3
  import { useColorScheme as p, Box as k, IconButton as u } from "@mui/material";
4
4
  import { Prism as b } from "react-syntax-highlighter";
5
- import { C as m, a as f } from "../ContentCopy-CNxsEhmq.js";
5
+ import { C as m, a as f } from "../ContentCopy-D4SuJd86.js";
6
6
  const w = {
7
7
  'code[class*="language-"]': {
8
8
  background: "hsl(220, 13%, 18%)",
@@ -3,10 +3,10 @@ import { useId as N, useState as v, useEffect as R } from "react";
3
3
  import { Box as i, Stack as n, Typography as a, IconButton as O, Button as k, Collapse as Q } from "@mui/material";
4
4
  import { SAvatar as U } from "../s-avatar/s-avatar.js";
5
5
  import { SSkeleton as e } from "../s-skeleton/s-skeleton.js";
6
- import { g as X } from "../utils-DJIrqgo5.js";
7
- import { F as Y } from "../Favorite-Cvjg7GqN.js";
8
- import { c as I } from "../createSvgIcon-DTNHY3_v.js";
9
- import { E as Z } from "../ExpandMore-CTZrSZlF.js";
6
+ import { g as X } from "../utils-CHdpkEZx.js";
7
+ import { F as Y } from "../Favorite-Bz_HcMgN.js";
8
+ import { c as I } from "../createSvgIcon-BkbeLOhM.js";
9
+ import { E as Z } from "../ExpandMore-C7yRQv1-.js";
10
10
  const _ = I(/* @__PURE__ */ t.jsx("path", {
11
11
  d: "m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"
12
12
  }), "ExpandLess"), tt = I(/* @__PURE__ */ t.jsx("path", {
@@ -112,7 +112,7 @@ const _ = I(/* @__PURE__ */ t.jsx("path", {
112
112
  showReplies: d,
113
113
  avatarSize: Math.max(32, r - 8)
114
114
  },
115
- s.id || `reply-${K}`
115
+ s.id ?? `reply-${K}`
116
116
  )) }) })
117
117
  ] });
118
118
  };
@@ -1,7 +1,7 @@
1
1
  import { j as o } from "../jsx-runtime-tc70JA_2.js";
2
2
  import { useState as l } from "react";
3
3
  import { Paper as p, Box as d, IconButton as x, Typography as m } from "@mui/material";
4
- import { C as u, a as h } from "../ContentCopy-CNxsEhmq.js";
4
+ import { C as u, a as h } from "../ContentCopy-D4SuJd86.js";
5
5
  const f = ({ text: r, typographyProps: e, onCopied: a, paperProps: i }) => {
6
6
  const [t, s] = l(!1), n = async () => {
7
7
  if (r)