qt-ui-kit 1.0.65 → 1.0.66

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/dist/index.mjs CHANGED
@@ -16471,6 +16471,9 @@ function EventCard({
16471
16471
  }
16472
16472
 
16473
16473
  // src/components/organisms/message_body/email_body.tsx
16474
+ import DOMPurify from "dompurify";
16475
+ import ReactMarkdown from "react-markdown";
16476
+ import rehypeRaw from "rehype-raw";
16474
16477
  import { jsx as jsx33, jsxs as jsxs23 } from "react/jsx-runtime";
16475
16478
  function EmailBody({
16476
16479
  subjectLine,
@@ -16482,7 +16485,8 @@ function EmailBody({
16482
16485
  attachments,
16483
16486
  body
16484
16487
  }) {
16485
- return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl", children: [
16488
+ const clean = DOMPurify.sanitize(body ?? "");
16489
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4 bg-white p-4 rounded-b-2xl overflow-auto", children: [
16486
16490
  /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-0.5", children: [
16487
16491
  /* @__PURE__ */ jsx33(MetadataRow, { metadata: [`Subject: ${subjectLine}`] }),
16488
16492
  /* @__PURE__ */ jsx33(MetadataRow, { metadata: [`To: ${to}`] }),
@@ -16493,7 +16497,17 @@ function EmailBody({
16493
16497
  /* @__PURE__ */ jsx33(MetadataRow, { metadata: [`Attachments: ${attachments}`] })
16494
16498
  ] }),
16495
16499
  /* @__PURE__ */ jsx33("hr", { className: "text-qtneutral-500" }),
16496
- /* @__PURE__ */ jsx33("div", { className: "body-medium prose break-all", children: body && /* @__PURE__ */ jsx33("pre", { className: "whitespace-pre-wrap", children: body }) })
16500
+ /* @__PURE__ */ jsx33("div", { className: "body-medium prose break-all", children: body && /* @__PURE__ */ jsx33(
16501
+ ReactMarkdown,
16502
+ {
16503
+ children: clean,
16504
+ rehypePlugins: [rehypeRaw],
16505
+ components: {
16506
+ img: ({ node, ...props }) => /* @__PURE__ */ jsx33("img", { style: { maxWidth: "100%" }, ...props })
16507
+ // Apply custom components/styling
16508
+ }
16509
+ }
16510
+ ) })
16497
16511
  ] });
16498
16512
  }
16499
16513
 
@@ -16513,7 +16527,7 @@ function EmojiPill({ emoji, count }) {
16513
16527
 
16514
16528
  // src/util/utilcomponents.tsx
16515
16529
  import clsx8 from "clsx";
16516
- import ReactMarkdown from "react-markdown";
16530
+ import ReactMarkdown2 from "react-markdown";
16517
16531
  import remarkGfm from "remark-gfm";
16518
16532
  import { jsx as jsx35 } from "react/jsx-runtime";
16519
16533
  function MarkdownRenderer({ content, truncated }) {
@@ -16524,7 +16538,7 @@ function MarkdownRenderer({ content, truncated }) {
16524
16538
  "flex flex-col markdown break-all",
16525
16539
  truncated && "line-clamp-3"
16526
16540
  ),
16527
- children: /* @__PURE__ */ jsx35(ReactMarkdown, { remarkPlugins: [remarkGfm], children: content })
16541
+ children: /* @__PURE__ */ jsx35(ReactMarkdown2, { remarkPlugins: [remarkGfm], children: content })
16528
16542
  }
16529
16543
  );
16530
16544
  }