qt-ui-kit 1.0.93 → 1.0.95

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.d.mts CHANGED
@@ -131,7 +131,7 @@ type ChatData = {
131
131
  link?: string;
132
132
  outbound?: boolean;
133
133
  summary?: string;
134
- image?: string;
134
+ images?: string[];
135
135
  emojis?: string[];
136
136
  };
137
137
  declare function ChatBody({ messages }: Props$4): react_jsx_runtime.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -131,7 +131,7 @@ type ChatData = {
131
131
  link?: string;
132
132
  outbound?: boolean;
133
133
  summary?: string;
134
- image?: string;
134
+ images?: string[];
135
135
  emojis?: string[];
136
136
  };
137
137
  declare function ChatBody({ messages }: Props$4): react_jsx_runtime.JSX.Element;
package/dist/index.js CHANGED
@@ -15392,7 +15392,7 @@ function ExternalLink({
15392
15392
 
15393
15393
  // src/components/atoms/icons/base_icons/CheckBox.tsx
15394
15394
  var import_jsx_runtime18 = require("react/jsx-runtime");
15395
- function CheckBox({ size = 24, fillColor }) {
15395
+ function CheckBox({ size = 24, color, fillColor }) {
15396
15396
  const getIconData = () => {
15397
15397
  let viewBox2 = "";
15398
15398
  let scale = 1;
@@ -15428,7 +15428,7 @@ function CheckBox({ size = 24, fillColor }) {
15428
15428
  "path",
15429
15429
  {
15430
15430
  d: "M11.25 4.5V6.75H24.75V4.5V2.25H11.25V4.5ZM31.5 11.25H29.25V24.75H31.5H33.75V11.25H31.5ZM24.75 31.5V29.25H11.25V31.5V33.75H24.75V31.5ZM4.5 24.75H6.75V11.25H4.5H2.25V24.75H4.5ZM11.25 31.5V29.25C8.76472 29.25 6.75 27.2353 6.75 24.75H4.5H2.25C2.25 29.7206 6.27944 33.75 11.25 33.75V31.5ZM31.5 24.75H29.25C29.25 27.2353 27.2353 29.25 24.75 29.25V31.5V33.75C29.7206 33.75 33.75 29.7206 33.75 24.75H31.5ZM24.75 4.5V6.75C27.2353 6.75 29.25 8.76472 29.25 11.25H31.5H33.75C33.75 6.27944 29.7206 2.25 24.75 2.25V4.5ZM11.25 4.5V2.25C6.27944 2.25 2.25 6.27944 2.25 11.25H4.5H6.75C6.75 8.76472 8.76472 6.75 11.25 6.75V4.5Z",
15431
- fill: "#1D1D1F",
15431
+ fill: color,
15432
15432
  mask: `url(#${maskId})`
15433
15433
  }
15434
15434
  ),
@@ -15436,7 +15436,7 @@ function CheckBox({ size = 24, fillColor }) {
15436
15436
  "path",
15437
15437
  {
15438
15438
  d: "M13.9502 18L16.6502 20.7L22.0502 15.3",
15439
- stroke: "#1D1D1F",
15439
+ stroke: color,
15440
15440
  strokeWidth: "2.25",
15441
15441
  strokeLinecap: "round",
15442
15442
  strokeLinejoin: "round"
@@ -15535,7 +15535,7 @@ function PreviewCard({
15535
15535
  }
15536
15536
  }
15537
15537
  ) }),
15538
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-2", children: [
15538
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "flex gap-4 place-items-center", children: [
15539
15539
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15540
15540
  "div",
15541
15541
  {
@@ -15546,13 +15546,14 @@ function PreviewCard({
15546
15546
  children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
15547
15547
  CheckBox,
15548
15548
  {
15549
- size: 20,
15550
- fillColor: checked ? "#E8FE99" : void 0
15549
+ size: 24,
15550
+ color: "#82818E",
15551
+ fillColor: checked ? "#82818E" : void 0
15551
15552
  }
15552
15553
  )
15553
15554
  }
15554
15555
  ),
15555
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { onClick: onClickGoToSource, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ExternalLink, { size: 20, color: "#82818E" }) })
15556
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { onClick: onClickGoToSource, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ExternalLink, { size: 24, color: "#82818E" }) })
15556
15557
  ] })
15557
15558
  ] }) })
15558
15559
  ] })
@@ -16342,7 +16343,7 @@ var import_react4 = require("react");
16342
16343
  var import_emoji_dictionary = __toESM(require_lib7());
16343
16344
  var import_jsx_runtime32 = require("react/jsx-runtime");
16344
16345
  function EmojiPill({ emoji, count }) {
16345
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex rounded-2xl bg-qtneutral-300 w-min py-0.5 px-4 place-items-center place-content-center gap-1", children: [
16346
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex rounded-2xl bg-qtneutral-300 w-min py-0.5 px-4 place-items-center place-content-center gap-1 select-none", children: [
16346
16347
  emoji && import_emoji_dictionary.default.getUnicode(emoji),
16347
16348
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "label-3-bold text-qtneutral-900", children: count })
16348
16349
  ] });
@@ -16352,18 +16353,34 @@ function EmojiPill({ emoji, count }) {
16352
16353
  var import_clsx8 = __toESM(require("clsx"));
16353
16354
  var import_react_markdown = __toESM(require("react-markdown"));
16354
16355
  var import_remark_gfm = __toESM(require("remark-gfm"));
16356
+ var import_emoji_dictionary2 = __toESM(require_lib7());
16355
16357
  var import_jsx_runtime33 = require("react/jsx-runtime");
16356
- function MarkdownRenderer({ content, truncated }) {
16357
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
16358
- "div",
16359
- {
16360
- className: (0, import_clsx8.default)(
16361
- "flex flex-col markdown break-all",
16362
- truncated && "line-clamp-3"
16363
- ),
16364
- children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], children: content })
16358
+ function MarkdownRenderer({
16359
+ content,
16360
+ truncated,
16361
+ integration = "slack" /* SLACK */
16362
+ }) {
16363
+ const processedContent = integration === "slack" /* SLACK */ ? parseSlackText(content) : content;
16364
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: (0, import_clsx8.default)("markdown", truncated && "line-clamp-3"), children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_markdown.default, { remarkPlugins: [import_remark_gfm.default], children: processedContent }) });
16365
+ }
16366
+ function parseSlackText(text) {
16367
+ text = text.replace(
16368
+ /<@([A-Z0-9]+)(\|([^>]+))?>/g,
16369
+ (_, userId, __, userName) => {
16370
+ return `@${userName || "UserNameNotFound"}`;
16365
16371
  }
16366
16372
  );
16373
+ text = text.replace(/<([^|>]+)\|([^>]+)>/g, (_, url, label) => {
16374
+ return `[${label}](${url})`;
16375
+ });
16376
+ text = text.replace(/<([^|>]+)>/g, (_, url) => {
16377
+ return `<${url}>`;
16378
+ });
16379
+ text = text.replace(/:([a-zA-Z0-9_+-]+):/g, (match2, emojiName) => {
16380
+ const emoji = import_emoji_dictionary2.default.getUnicode(emojiName);
16381
+ return emoji || match2;
16382
+ });
16383
+ return text;
16367
16384
  }
16368
16385
 
16369
16386
  // src/components/organisms/chat_messages/chat_bubble/chat_bubble.tsx
@@ -16373,7 +16390,7 @@ function ChatBubble({
16373
16390
  text,
16374
16391
  outbound,
16375
16392
  name,
16376
- image,
16393
+ images,
16377
16394
  timestamp,
16378
16395
  emojis,
16379
16396
  onExternal
@@ -16446,7 +16463,7 @@ function ChatBubble({
16446
16463
  children: `${!expanded ? "Show" : "Hide"} full message`
16447
16464
  }
16448
16465
  ),
16449
- image && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: image, alt: "", className: "rounded-xl" }),
16466
+ images && images.length > 0 && images.map((img) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("img", { src: img, alt: "", className: "rounded-xl" })),
16450
16467
  /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "flex gap-2", children: [
16451
16468
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
16452
16469
  "div",
@@ -16475,7 +16492,7 @@ function ChatBody({ messages }) {
16475
16492
  summary: msg.summary,
16476
16493
  text: msg.body,
16477
16494
  outbound: msg.outbound,
16478
- image: msg.image,
16495
+ images: msg.images,
16479
16496
  name: msg.name,
16480
16497
  timestamp: msg.timeStamp,
16481
16498
  emojis: msg.emojis,
@@ -17254,7 +17271,7 @@ var fakeMessages = [
17254
17271
  id: "123",
17255
17272
  name: "Sr. Issac Newton",
17256
17273
  timeStamp: "Today @ 11:45 AM",
17257
- body: "Hey team, just a reminder that the client pitch deck needs final review today. I\u2019ve updated the numbers from Q1 and added two new slides with competitor insights. Hey team, just a reminder that the client pitch deck needs final review today. I\u2019ve updated the numbers from Q1 and added two new slides with competitor insights. Hey team, just a reminder that the client pitch deck needs final review today. I\u2019ve updated the numbers from Q1 and added two new slides with competitor insights.",
17274
+ body: " Sorry gang I was deep in a task I didn\u2019t see this ! Hope it went well :slightly_smiling_face: I\u2019m sure details can be relayed <@U052ZRJD9V1|Vera Worri> Please help me check that the click-through agreement is working appropriately in production. The goal is to have each new user click-through to agree to our Cloud Services Agreement one time. Ivan tells me that <https://qtaloservices.com> will ask you 2x times to review our Privacy Policy and TOS. I tried logging out and back in, but didn't get prompted to agree to anything.",
17258
17275
  summary: "Client pitch deck needs final review today.",
17259
17276
  emojis: ["fire", "fire", "grinning", "fish"],
17260
17277
  outbound: true
@@ -17266,7 +17283,7 @@ var fakeMessages = [
17266
17283
  body: "I\u2019ve confirmed the offsite meeting with the engineering leads. It will be held at the downtown conference center and lunch will be provided. Let me know if you have dietary needs. I\u2019ve confirmed the offsite meeting with the engineering leads. It will be held at the downtown conference center and lunch will be provided. Let me know if you have dietary needs. I\u2019ve confirmed the offsite meeting with the engineering leads. It will be held at the downtown conference center and lunch will be provided. Let me know if you have dietary needs. I\u2019ve confirmed the offsite meeting with the engineering leads. It will be held at the downtown conference center and lunch will be provided. Let me know if you have dietary needs. I\u2019ve confirmed the offsite meeting with the engineering leads. It will be held at the downtown conference center and lunch will be provided. Let me know if you have dietary needs.",
17267
17284
  summary: "Offsite meeting confirmed for engineering leads.",
17268
17285
  emojis: ["fire", "+1", "canada", "canada", "fish"],
17269
- image: "https://placehold.co/600x400",
17286
+ images: ["https://placehold.co/600x400", "https://placehold.co/600x400"],
17270
17287
  outbound: true
17271
17288
  },
17272
17289
  {
@@ -17293,7 +17310,7 @@ This is a *markdown* **example**.
17293
17310
  timeStamp: "Monday, 19th May @ 9:30 AM",
17294
17311
  body: "The supplier in Shenzhen confirmed they can expedite our next shipment. They'll need final approval by Thursday to ensure arrival before the end of the month.",
17295
17312
  summary: "Supplier can expedite shipment if approved by Thursday.",
17296
- image: "https://placehold.co/600x400",
17313
+ images: ["https://placehold.co/600x400"],
17297
17314
  outbound: false
17298
17315
  },
17299
17316
  {
@@ -17310,7 +17327,7 @@ This is a *markdown* **example**.
17310
17327
  timeStamp: "Today @ 10:00 AM",
17311
17328
  body: "Just wrapped up the investor Q&A session. Feedback was positive, especially on the projected growth numbers. A few asked about regulatory concerns\u2014I'll send a memo tomorrow.",
17312
17329
  summary: "Investors responded positively, with a few concerns.",
17313
- image: "https://placehold.co/600x400",
17330
+ images: ["https://placehold.co/600x400"],
17314
17331
  emojis: ["fire", "+1", "canada", "canada", "fish"],
17315
17332
  outbound: false
17316
17333
  },
@@ -17320,7 +17337,7 @@ This is a *markdown* **example**.
17320
17337
  timeStamp: "Thursday @ 6:15 PM",
17321
17338
  body: "Legal has flagged a few clauses in the new vendor agreement that may conflict with our IP policy. Recommend we pause signing until we clarify points 4 and 7.",
17322
17339
  summary: "Legal review suggests pausing vendor agreement.",
17323
- image: "https://placehold.co/600x400",
17340
+ images: ["https://placehold.co/600x400"],
17324
17341
  outbound: true
17325
17342
  },
17326
17343
  {
@@ -17337,7 +17354,7 @@ This is a *markdown* **example**.
17337
17354
  timeStamp: "Monday, 26th May @ 1:45 PM",
17338
17355
  body: "Reminder that the quarterly town hall is scheduled for the last Monday of the month. We'll cover performance metrics, upcoming hires, and the office reopening plan.",
17339
17356
  summary: "Quarterly town hall to discuss performance and reopening.",
17340
- image: "https://placehold.co/600x400",
17357
+ images: ["https://placehold.co/600x400"],
17341
17358
  outbound: true
17342
17359
  },
17343
17360
  {