@wealthx/shadcn 1.5.39 → 1.5.40
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.
- package/.turbo/turbo-build.log +112 -112
- package/CHANGELOG.md +6 -0
- package/dist/{chunk-R7M657QL.mjs → chunk-STN5QIWN.mjs} +36 -1
- package/dist/components/ui/support-agent/index.js +31 -1
- package/dist/components/ui/support-agent/index.mjs +1 -1
- package/dist/index.js +31 -1
- package/dist/index.mjs +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/ui/support-agent/support-agent-panel.tsx +46 -2
- package/src/styles/styles-css.ts +1 -1
|
@@ -17,6 +17,11 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
cn
|
|
19
19
|
} from "./chunk-AFML43VJ.mjs";
|
|
20
|
+
import {
|
|
21
|
+
__objRest,
|
|
22
|
+
__spreadProps,
|
|
23
|
+
__spreadValues
|
|
24
|
+
} from "./chunk-WNQUEZJF.mjs";
|
|
20
25
|
|
|
21
26
|
// src/components/ui/support-agent/support-agent-primitives.tsx
|
|
22
27
|
import * as React from "react";
|
|
@@ -285,6 +290,9 @@ function SupportAgentFAB({
|
|
|
285
290
|
|
|
286
291
|
// src/components/ui/support-agent/support-agent-panel.tsx
|
|
287
292
|
import * as React2 from "react";
|
|
293
|
+
import ReactMarkdown from "react-markdown";
|
|
294
|
+
import rehypeRaw from "rehype-raw";
|
|
295
|
+
import rehypeSanitize, { defaultSchema } from "rehype-sanitize";
|
|
288
296
|
import { Bot, ChevronLeft, ChevronRight, SquarePen, X as X2 } from "lucide-react";
|
|
289
297
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
290
298
|
function SupportTypingIndicator() {
|
|
@@ -306,6 +314,21 @@ function SupportTypingIndicator() {
|
|
|
306
314
|
}
|
|
307
315
|
);
|
|
308
316
|
}
|
|
317
|
+
function StreamingStatus({ label }) {
|
|
318
|
+
if (!label) return /* @__PURE__ */ jsx3(SupportTypingIndicator, {});
|
|
319
|
+
return /* @__PURE__ */ jsxs3(
|
|
320
|
+
"span",
|
|
321
|
+
{
|
|
322
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
323
|
+
role: "status",
|
|
324
|
+
"aria-label": `${label}\u2026`,
|
|
325
|
+
children: [
|
|
326
|
+
/* @__PURE__ */ jsx3("span", { children: label }),
|
|
327
|
+
/* @__PURE__ */ jsx3(SupportTypingIndicator, {})
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
}
|
|
309
332
|
function MessageBubble({ message }) {
|
|
310
333
|
const isUser = message.role === "user";
|
|
311
334
|
const isEmpty = !message.content.trim();
|
|
@@ -328,7 +351,19 @@ function MessageBubble({ message }) {
|
|
|
328
351
|
"data-slot": "support-message-bubble",
|
|
329
352
|
"data-role": message.role,
|
|
330
353
|
children: [
|
|
331
|
-
isEmpty && message.isStreaming ? /* @__PURE__ */ jsx3(
|
|
354
|
+
isEmpty && message.isStreaming ? /* @__PURE__ */ jsx3(StreamingStatus, { label: message.streamingLabel }) : isUser ? /* @__PURE__ */ jsx3("span", { className: "whitespace-pre-wrap break-words leading-relaxed", children: message.content }) : /* @__PURE__ */ jsx3("div", { className: "break-words text-sm leading-relaxed [&_a]:text-primary [&_a]:underline [&_p]:m-0 [&_p:not(:last-child)]:mb-2 [&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5", children: /* @__PURE__ */ jsx3(
|
|
355
|
+
ReactMarkdown,
|
|
356
|
+
{
|
|
357
|
+
rehypePlugins: [rehypeRaw, [rehypeSanitize, defaultSchema]],
|
|
358
|
+
components: {
|
|
359
|
+
a: (_a) => {
|
|
360
|
+
var _b = _a, { node } = _b, props = __objRest(_b, ["node"]);
|
|
361
|
+
return /* @__PURE__ */ jsx3("a", __spreadProps(__spreadValues({}, props), { target: "_blank", rel: "noopener noreferrer" }));
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
children: message.content
|
|
365
|
+
}
|
|
366
|
+
) }),
|
|
332
367
|
message.isErrored && /* @__PURE__ */ jsx3("p", { className: "mt-1 text-xs opacity-70", children: "Failed to send. Please try again." })
|
|
333
368
|
]
|
|
334
369
|
}
|
|
@@ -508,6 +508,9 @@ function SupportAgentFAB({
|
|
|
508
508
|
|
|
509
509
|
// src/components/ui/support-agent/support-agent-panel.tsx
|
|
510
510
|
var React5 = __toESM(require("react"));
|
|
511
|
+
var import_react_markdown = __toESM(require("react-markdown"));
|
|
512
|
+
var import_rehype_raw = __toESM(require("rehype-raw"));
|
|
513
|
+
var import_rehype_sanitize = __toESM(require("rehype-sanitize"));
|
|
511
514
|
var import_lucide_react7 = require("lucide-react");
|
|
512
515
|
|
|
513
516
|
// src/components/ui/sheet.tsx
|
|
@@ -850,6 +853,21 @@ function SupportTypingIndicator() {
|
|
|
850
853
|
}
|
|
851
854
|
);
|
|
852
855
|
}
|
|
856
|
+
function StreamingStatus({ label }) {
|
|
857
|
+
if (!label) return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportTypingIndicator, {});
|
|
858
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
859
|
+
"span",
|
|
860
|
+
{
|
|
861
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
862
|
+
role: "status",
|
|
863
|
+
"aria-label": `${label}\u2026`,
|
|
864
|
+
children: [
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: label }),
|
|
866
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(SupportTypingIndicator, {})
|
|
867
|
+
]
|
|
868
|
+
}
|
|
869
|
+
);
|
|
870
|
+
}
|
|
853
871
|
function MessageBubble({ message }) {
|
|
854
872
|
const isUser = message.role === "user";
|
|
855
873
|
const isEmpty = !message.content.trim();
|
|
@@ -872,7 +890,19 @@ function MessageBubble({ message }) {
|
|
|
872
890
|
"data-slot": "support-message-bubble",
|
|
873
891
|
"data-role": message.role,
|
|
874
892
|
children: [
|
|
875
|
-
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
893
|
+
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(StreamingStatus, { label: message.streamingLabel }) : isUser ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "whitespace-pre-wrap break-words leading-relaxed", children: message.content }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "break-words text-sm leading-relaxed [&_a]:text-primary [&_a]:underline [&_p]:m-0 [&_p:not(:last-child)]:mb-2 [&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
894
|
+
import_react_markdown.default,
|
|
895
|
+
{
|
|
896
|
+
rehypePlugins: [import_rehype_raw.default, [import_rehype_sanitize.default, import_rehype_sanitize.defaultSchema]],
|
|
897
|
+
components: {
|
|
898
|
+
a: (_a) => {
|
|
899
|
+
var _b = _a, { node } = _b, props = __objRest(_b, ["node"]);
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", __spreadProps(__spreadValues({}, props), { target: "_blank", rel: "noopener noreferrer" }));
|
|
901
|
+
}
|
|
902
|
+
},
|
|
903
|
+
children: message.content
|
|
904
|
+
}
|
|
905
|
+
) }),
|
|
876
906
|
message.isErrored && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "mt-1 text-xs opacity-70", children: "Failed to send. Please try again." })
|
|
877
907
|
]
|
|
878
908
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
SupportContextChip,
|
|
6
6
|
SupportStepGuideCard,
|
|
7
7
|
SupportSuggestedQuestion
|
|
8
|
-
} from "../../../chunk-
|
|
8
|
+
} from "../../../chunk-STN5QIWN.mjs";
|
|
9
9
|
import "../../../chunk-GTAVSBDO.mjs";
|
|
10
10
|
import "../../../chunk-EFHPSKVF.mjs";
|
|
11
11
|
import "../../../chunk-H3PTREG6.mjs";
|
package/dist/index.js
CHANGED
|
@@ -7092,6 +7092,9 @@ function SupportAgentFAB({
|
|
|
7092
7092
|
|
|
7093
7093
|
// src/components/ui/support-agent/support-agent-panel.tsx
|
|
7094
7094
|
var React18 = __toESM(require("react"));
|
|
7095
|
+
var import_react_markdown2 = __toESM(require("react-markdown"));
|
|
7096
|
+
var import_rehype_raw2 = __toESM(require("rehype-raw"));
|
|
7097
|
+
var import_rehype_sanitize2 = __toESM(require("rehype-sanitize"));
|
|
7095
7098
|
var import_lucide_react29 = require("lucide-react");
|
|
7096
7099
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
7097
7100
|
function SupportTypingIndicator() {
|
|
@@ -7113,6 +7116,21 @@ function SupportTypingIndicator() {
|
|
|
7113
7116
|
}
|
|
7114
7117
|
);
|
|
7115
7118
|
}
|
|
7119
|
+
function StreamingStatus({ label }) {
|
|
7120
|
+
if (!label) return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SupportTypingIndicator, {});
|
|
7121
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
|
|
7122
|
+
"span",
|
|
7123
|
+
{
|
|
7124
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
7125
|
+
role: "status",
|
|
7126
|
+
"aria-label": `${label}\u2026`,
|
|
7127
|
+
children: [
|
|
7128
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { children: label }),
|
|
7129
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(SupportTypingIndicator, {})
|
|
7130
|
+
]
|
|
7131
|
+
}
|
|
7132
|
+
);
|
|
7133
|
+
}
|
|
7116
7134
|
function MessageBubble({ message }) {
|
|
7117
7135
|
const isUser = message.role === "user";
|
|
7118
7136
|
const isEmpty = !message.content.trim();
|
|
@@ -7135,7 +7153,19 @@ function MessageBubble({ message }) {
|
|
|
7135
7153
|
"data-slot": "support-message-bubble",
|
|
7136
7154
|
"data-role": message.role,
|
|
7137
7155
|
children: [
|
|
7138
|
-
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7156
|
+
isEmpty && message.isStreaming ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StreamingStatus, { label: message.streamingLabel }) : isUser ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "whitespace-pre-wrap break-words leading-relaxed", children: message.content }) : /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "break-words text-sm leading-relaxed [&_a]:text-primary [&_a]:underline [&_p]:m-0 [&_p:not(:last-child)]:mb-2 [&_ul]:my-1 [&_ul]:list-disc [&_ul]:pl-4 [&_ol]:my-1 [&_ol]:list-decimal [&_ol]:pl-4 [&_li]:mb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7157
|
+
import_react_markdown2.default,
|
|
7158
|
+
{
|
|
7159
|
+
rehypePlugins: [import_rehype_raw2.default, [import_rehype_sanitize2.default, import_rehype_sanitize2.defaultSchema]],
|
|
7160
|
+
components: {
|
|
7161
|
+
a: (_a2) => {
|
|
7162
|
+
var _b = _a2, { node } = _b, props = __objRest(_b, ["node"]);
|
|
7163
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("a", __spreadProps(__spreadValues({}, props), { target: "_blank", rel: "noopener noreferrer" }));
|
|
7164
|
+
}
|
|
7165
|
+
},
|
|
7166
|
+
children: message.content
|
|
7167
|
+
}
|
|
7168
|
+
) }),
|
|
7139
7169
|
message.isErrored && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("p", { className: "mt-1 text-xs opacity-70", children: "Failed to send. Please try again." })
|
|
7140
7170
|
]
|
|
7141
7171
|
}
|
package/dist/index.mjs
CHANGED