@cossistant/react 0.0.30 → 0.0.32

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 (77) hide show
  1. package/README.md +3 -1
  2. package/hooks/private/use-grouped-messages.d.ts.map +1 -1
  3. package/hooks/private/use-grouped-messages.js +41 -12
  4. package/hooks/private/use-grouped-messages.js.map +1 -1
  5. package/hooks/use-conversation-page.js +4 -2
  6. package/hooks/use-conversation-page.js.map +1 -1
  7. package/hooks/use-conversation-preview.d.ts.map +1 -1
  8. package/hooks/use-conversation-preview.js +2 -1
  9. package/hooks/use-conversation-preview.js.map +1 -1
  10. package/hooks/use-send-message.js +1 -1
  11. package/hooks/use-send-message.js.map +1 -1
  12. package/package.json +5 -4
  13. package/packages/types/src/api/conversation.d.ts +13 -3
  14. package/packages/types/src/api/conversation.d.ts.map +1 -1
  15. package/packages/types/src/api/timeline-item.d.ts +2 -0
  16. package/packages/types/src/api/timeline-item.d.ts.map +1 -1
  17. package/packages/types/src/realtime-events.d.ts +29 -4
  18. package/packages/types/src/realtime-events.d.ts.map +1 -1
  19. package/packages/types/src/schemas.d.ts +4 -1
  20. package/packages/types/src/schemas.d.ts.map +1 -1
  21. package/primitives/avatar/image.d.ts +1 -1
  22. package/primitives/multimodal-input.d.ts +2 -2
  23. package/primitives/multimodal-input.d.ts.map +1 -1
  24. package/primitives/timeline-item.d.ts +2 -2
  25. package/primitives/timeline-item.d.ts.map +1 -1
  26. package/primitives/timeline-item.js +30 -9
  27. package/primitives/timeline-item.js.map +1 -1
  28. package/provider.d.ts.map +1 -1
  29. package/provider.js +6 -3
  30. package/provider.js.map +1 -1
  31. package/support/components/avatar-stack.js +1 -1
  32. package/support/components/avatar-stack.js.map +1 -1
  33. package/support/components/avatar.d.ts +1 -2
  34. package/support/components/avatar.d.ts.map +1 -1
  35. package/support/components/avatar.js +9 -7
  36. package/support/components/avatar.js.map +1 -1
  37. package/support/components/button.d.ts +1 -1
  38. package/support/components/conversation-button-link.js +2 -1
  39. package/support/components/conversation-button-link.js.map +1 -1
  40. package/support/components/conversation-event.js +1 -1
  41. package/support/components/conversation-event.js.map +1 -1
  42. package/support/components/conversation-resolved-feedback.d.ts +21 -0
  43. package/support/components/conversation-resolved-feedback.d.ts.map +1 -0
  44. package/support/components/conversation-resolved-feedback.js +102 -0
  45. package/support/components/conversation-resolved-feedback.js.map +1 -0
  46. package/support/components/conversation-timeline-utils.d.ts +5 -0
  47. package/support/components/conversation-timeline-utils.d.ts.map +1 -0
  48. package/support/components/conversation-timeline-utils.js +10 -0
  49. package/support/components/conversation-timeline-utils.js.map +1 -0
  50. package/support/components/conversation-timeline.d.ts.map +1 -1
  51. package/support/components/conversation-timeline.js +2 -1
  52. package/support/components/conversation-timeline.js.map +1 -1
  53. package/support/components/icons.d.ts +1 -1
  54. package/support/components/icons.d.ts.map +1 -1
  55. package/support/components/icons.js +6 -2
  56. package/support/components/icons.js.map +1 -1
  57. package/support/components/index.d.ts +2 -1
  58. package/support/components/index.js +2 -1
  59. package/support/components/typing-indicator.d.ts.map +1 -1
  60. package/support/components/typing-indicator.js +15 -7
  61. package/support/components/typing-indicator.js.map +1 -1
  62. package/support/pages/conversation-history.js +1 -1
  63. package/support/pages/conversation.d.ts.map +1 -1
  64. package/support/pages/conversation.js +36 -8
  65. package/support/pages/conversation.js.map +1 -1
  66. package/support/pages/home.js +1 -1
  67. package/support/text/locales/en.js +12 -0
  68. package/support/text/locales/en.js.map +1 -1
  69. package/support/text/locales/es.js +12 -0
  70. package/support/text/locales/es.js.map +1 -1
  71. package/support/text/locales/fr.js +12 -0
  72. package/support/text/locales/fr.js.map +1 -1
  73. package/support/text/locales/keys.d.ts +20 -0
  74. package/support/text/locales/keys.d.ts.map +1 -1
  75. package/support/text/locales/keys.js +6 -0
  76. package/support/text/locales/keys.js.map +1 -1
  77. package/utils/use-render-element.d.ts.map +1 -1
@@ -4,8 +4,8 @@ import { AvatarFallback } from "../../primitives/avatar/fallback.js";
4
4
  import { AvatarImage } from "../../primitives/avatar/image.js";
5
5
  import { CossistantLogo } from "./cossistant-branding.js";
6
6
  import { OnlineIndicator, getAgentStatus } from "./online-indicator.js";
7
- import { jsx, jsxs } from "react/jsx-runtime";
8
7
  import { Facehash } from "facehash";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
9
 
10
10
  //#region src/support/components/avatar.tsx
11
11
  /**
@@ -20,18 +20,20 @@ const DEFAULT_AVATAR_COLORS = [
20
20
  ];
21
21
  /**
22
22
  * Renders a squared avatar with graceful fallbacks using Facehash when no
23
- * image is available. Features squircle corners when supported by the browser
24
- * and a subtle ring border.
23
+ * image is available. Features rounded corners and a subtle ring border.
25
24
  *
26
25
  * For AI agents without an image, displays the Cossistant logo without
27
26
  * a background.
28
27
  */
29
28
  function Avatar({ className, image, name, isAI = false, showBackground = true, colorClasses = DEFAULT_AVATAR_COLORS, lastSeenAt, indicatorSize = 6 }) {
30
29
  const agentStatus = isAI ? "offline" : getAgentStatus(lastSeenAt);
31
- if (isAI && !image) return /* @__PURE__ */ jsx("div", {
32
- className: cn("flex items-center justify-center rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500", className),
33
- children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-1/2 w-1/2" })
34
- });
30
+ if (isAI && !image) {
31
+ if (showBackground) return /* @__PURE__ */ jsx("div", {
32
+ className: cn("flex items-center justify-center rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500", className),
33
+ children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-1/2 w-1/2" })
34
+ });
35
+ return /* @__PURE__ */ jsx(CossistantLogo, { className: cn("h-full w-full", className) });
36
+ }
35
37
  if (isAI && image) return /* @__PURE__ */ jsxs(Avatar$1, {
36
38
  className: cn("flex size-9 items-center justify-center overflow-clip rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500", className),
37
39
  children: [/* @__PURE__ */ jsx(AvatarImage, {
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":["AvatarPrimitive"],"sources":["../../../src/support/components/avatar.tsx"],"sourcesContent":["import { Facehash } from \"facehash\";\nimport type { ReactElement } from \"react\";\n\nimport {\n\tAvatarFallback,\n\tAvatarImage,\n\tAvatar as AvatarPrimitive,\n} from \"../../primitives/avatar\";\nimport { cn } from \"../utils\";\nimport { CossistantLogo } from \"./cossistant-branding\";\nimport { getAgentStatus, OnlineIndicator } from \"./online-indicator\";\n\n/**\n * Default Cossistant theme colors for avatar fallbacks.\n * These use the Tailwind classes defined in support.css.\n */\nconst DEFAULT_AVATAR_COLORS = [\n\t\"bg-co-pink\",\n\t\"bg-co-blue\",\n\t\"bg-co-yellow\",\n\t\"bg-co-orange\",\n];\n\ntype AvatarProps = {\n\tclassName?: string;\n\timage?: string | null;\n\tname: string;\n\t/** Whether this avatar is for an AI agent */\n\tisAI?: boolean;\n\t/** Whether to show the background circle (default: true) */\n\tshowBackground?: boolean;\n\t/**\n\t * Tailwind class array for Facehash background colors.\n\t * Defaults to Cossistant theme colors (pink, blue, yellow, orange).\n\t * @example [\"bg-pink-500\", \"bg-blue-500\", \"bg-green-500\"]\n\t */\n\tcolorClasses?: string[];\n\t/**\n\t * Last seen timestamp for the agent. When provided, shows a status indicator:\n\t * - Green (online): seen within last 15 minutes\n\t * - Orange (away): seen within last hour\n\t * Only shown for non-AI agents.\n\t */\n\tlastSeenAt?: string | null;\n\t/**\n\t * Size of the online indicator in pixels.\n\t * Defaults to 6px.\n\t */\n\tindicatorSize?: number;\n};\n\n/**\n * Renders a squared avatar with graceful fallbacks using Facehash when no\n * image is available. Features squircle corners when supported by the browser\n * and a subtle ring border.\n *\n * For AI agents without an image, displays the Cossistant logo without\n * a background.\n */\nexport function Avatar({\n\tclassName,\n\timage,\n\tname,\n\tisAI = false,\n\tshowBackground = true,\n\tcolorClasses = DEFAULT_AVATAR_COLORS,\n\tlastSeenAt,\n\tindicatorSize = 6,\n}: AvatarProps): ReactElement {\n\tconst agentStatus = isAI ? \"offline\" : getAgentStatus(lastSeenAt);\n\n\t// AI agent without image: show logo in avatar box (only in avatar-stack context)\n\t// or at full size when used standalone\n\tif (isAI && !image) {\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex items-center justify-center rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<CossistantLogo className=\"h-1/2 w-1/2\" />\n\t\t\t</div>\n\t\t);\n\t}\n\n\t// AI agent with image: show image in a square\n\tif (isAI && image) {\n\t\treturn (\n\t\t\t<AvatarPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex size-9 items-center justify-center overflow-clip rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<AvatarImage alt={name} src={image} />\n\t\t\t\t<AvatarFallback className=\"size-full\">\n\t\t\t\t\t<Facehash\n\t\t\t\t\t\tclassName=\"size-full\"\n\t\t\t\t\t\tcolorClasses={colorClasses}\n\t\t\t\t\t\tinteractive={false}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tshowInitial={false}\n\t\t\t\t\t\tsize=\"100%\"\n\t\t\t\t\t/>\n\t\t\t\t</AvatarFallback>\n\t\t\t</AvatarPrimitive>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className={cn(\"relative\", className)}>\n\t\t\t<AvatarPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex size-full items-center justify-center overflow-clip rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\"\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{image && <AvatarImage alt={name} src={image} />}\n\t\t\t\t<AvatarFallback className=\"size-full\">\n\t\t\t\t\t<Facehash\n\t\t\t\t\t\tclassName=\"size-full\"\n\t\t\t\t\t\tcolorClasses={colorClasses}\n\t\t\t\t\t\tinteractive={false}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tshowInitial={false}\n\t\t\t\t\t\tsize=\"100%\"\n\t\t\t\t\t/>\n\t\t\t\t</AvatarFallback>\n\t\t\t</AvatarPrimitive>\n\t\t\t<OnlineIndicator\n\t\t\t\tclassName=\"-bottom-0.5 -right-0.5 z-10\"\n\t\t\t\tsize={indicatorSize}\n\t\t\t\tstatus={agentStatus}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAM,wBAAwB;CAC7B;CACA;CACA;CACA;CACA;;;;;;;;;AAsCD,SAAgB,OAAO,EACtB,WACA,OACA,MACA,OAAO,OACP,iBAAiB,MACjB,eAAe,uBACf,YACA,gBAAgB,KACa;CAC7B,MAAM,cAAc,OAAO,YAAY,eAAe,WAAW;AAIjE,KAAI,QAAQ,CAAC,MACZ,QACC,oBAAC;EACA,WAAW,GACV,oHACA,UACA;YAED,oBAAC,kBAAe,WAAU,gBAAgB;GACrC;AAKR,KAAI,QAAQ,MACX,QACC,qBAACA;EACA,WAAW,GACV,yIACA,UACA;aAED,oBAAC;GAAY,KAAK;GAAM,KAAK;IAAS,EACtC,oBAAC;GAAe,WAAU;aACzB,oBAAC;IACA,WAAU;IACI;IACd,aAAa;IACP;IACN,aAAa;IACb,MAAK;KACJ;IACc;GACA;AAIpB,QACC,qBAAC;EAAI,WAAW,GAAG,YAAY,UAAU;aACxC,qBAACA;GACA,WAAW,GACV,2IACA;cAEA,SAAS,oBAAC;IAAY,KAAK;IAAM,KAAK;KAAS,EAChD,oBAAC;IAAe,WAAU;cACzB,oBAAC;KACA,WAAU;KACI;KACd,aAAa;KACP;KACN,aAAa;KACb,MAAK;MACJ;KACc;IACA,EAClB,oBAAC;GACA,WAAU;GACV,MAAM;GACN,QAAQ;IACP;GACG"}
1
+ {"version":3,"file":"avatar.js","names":["AvatarPrimitive"],"sources":["../../../src/support/components/avatar.tsx"],"sourcesContent":["import { Facehash } from \"facehash\";\nimport type { ReactElement } from \"react\";\n\nimport {\n\tAvatarFallback,\n\tAvatarImage,\n\tAvatar as AvatarPrimitive,\n} from \"../../primitives/avatar\";\nimport { cn } from \"../utils\";\nimport { CossistantLogo } from \"./cossistant-branding\";\nimport { getAgentStatus, OnlineIndicator } from \"./online-indicator\";\n\n/**\n * Default Cossistant theme colors for avatar fallbacks.\n * These use the Tailwind classes defined in support.css.\n */\nconst DEFAULT_AVATAR_COLORS = [\n\t\"bg-co-pink\",\n\t\"bg-co-blue\",\n\t\"bg-co-yellow\",\n\t\"bg-co-orange\",\n];\n\ntype AvatarProps = {\n\tclassName?: string;\n\timage?: string | null;\n\tname: string;\n\t/** Whether this avatar is for an AI agent */\n\tisAI?: boolean;\n\t/** Whether to show the background circle (default: true) */\n\tshowBackground?: boolean;\n\t/**\n\t * Tailwind class array for Facehash background colors.\n\t * Defaults to Cossistant theme colors (pink, blue, yellow, orange).\n\t * @example [\"bg-pink-500\", \"bg-blue-500\", \"bg-green-500\"]\n\t */\n\tcolorClasses?: string[];\n\t/**\n\t * Last seen timestamp for the agent. When provided, shows a status indicator:\n\t * - Green (online): seen within last 15 minutes\n\t * - Orange (away): seen within last hour\n\t * Only shown for non-AI agents.\n\t */\n\tlastSeenAt?: string | null;\n\t/**\n\t * Size of the online indicator in pixels.\n\t * Defaults to 6px.\n\t */\n\tindicatorSize?: number;\n};\n\n/**\n * Renders a squared avatar with graceful fallbacks using Facehash when no\n * image is available. Features rounded corners and a subtle ring border.\n *\n * For AI agents without an image, displays the Cossistant logo without\n * a background.\n */\nexport function Avatar({\n\tclassName,\n\timage,\n\tname,\n\tisAI = false,\n\tshowBackground = true,\n\tcolorClasses = DEFAULT_AVATAR_COLORS,\n\tlastSeenAt,\n\tindicatorSize = 6,\n}: AvatarProps): ReactElement {\n\tconst agentStatus = isAI ? \"offline\" : getAgentStatus(lastSeenAt);\n\n\t// AI agent without image: show just the logo (no avatar wrapper)\n\t// Unless showBackground is true (e.g. in avatar stack), then wrap in a box\n\tif (isAI && !image) {\n\t\tif (showBackground) {\n\t\t\treturn (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex items-center justify-center rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\",\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<CossistantLogo className=\"h-1/2 w-1/2\" />\n\t\t\t\t</div>\n\t\t\t);\n\t\t}\n\t\treturn <CossistantLogo className={cn(\"h-full w-full\", className)} />;\n\t}\n\n\t// AI agent with image: show image in a square\n\tif (isAI && image) {\n\t\treturn (\n\t\t\t<AvatarPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex size-9 items-center justify-center overflow-clip rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<AvatarImage alt={name} src={image} />\n\t\t\t\t<AvatarFallback className=\"size-full\">\n\t\t\t\t\t<Facehash\n\t\t\t\t\t\tclassName=\"size-full\"\n\t\t\t\t\t\tcolorClasses={colorClasses}\n\t\t\t\t\t\tinteractive={false}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tshowInitial={false}\n\t\t\t\t\t\tsize=\"100%\"\n\t\t\t\t\t/>\n\t\t\t\t</AvatarFallback>\n\t\t\t</AvatarPrimitive>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div className={cn(\"relative\", className)}>\n\t\t\t<AvatarPrimitive\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"flex size-full items-center justify-center overflow-clip rounded bg-co-background-200 ring-1 ring-co-border/30 dark:bg-co-background-500\"\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t{image && <AvatarImage alt={name} src={image} />}\n\t\t\t\t<AvatarFallback className=\"size-full\">\n\t\t\t\t\t<Facehash\n\t\t\t\t\t\tclassName=\"size-full\"\n\t\t\t\t\t\tcolorClasses={colorClasses}\n\t\t\t\t\t\tinteractive={false}\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tshowInitial={false}\n\t\t\t\t\t\tsize=\"100%\"\n\t\t\t\t\t/>\n\t\t\t\t</AvatarFallback>\n\t\t\t</AvatarPrimitive>\n\t\t\t<OnlineIndicator\n\t\t\t\tclassName=\"-bottom-0.5 -right-0.5 z-10\"\n\t\t\t\tsize={indicatorSize}\n\t\t\t\tstatus={agentStatus}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAM,wBAAwB;CAC7B;CACA;CACA;CACA;CACA;;;;;;;;AAqCD,SAAgB,OAAO,EACtB,WACA,OACA,MACA,OAAO,OACP,iBAAiB,MACjB,eAAe,uBACf,YACA,gBAAgB,KACa;CAC7B,MAAM,cAAc,OAAO,YAAY,eAAe,WAAW;AAIjE,KAAI,QAAQ,CAAC,OAAO;AACnB,MAAI,eACH,QACC,oBAAC;GACA,WAAW,GACV,oHACA,UACA;aAED,oBAAC,kBAAe,WAAU,gBAAgB;IACrC;AAGR,SAAO,oBAAC,kBAAe,WAAW,GAAG,iBAAiB,UAAU,GAAI;;AAIrE,KAAI,QAAQ,MACX,QACC,qBAACA;EACA,WAAW,GACV,yIACA,UACA;aAED,oBAAC;GAAY,KAAK;GAAM,KAAK;IAAS,EACtC,oBAAC;GAAe,WAAU;aACzB,oBAAC;IACA,WAAU;IACI;IACd,aAAa;IACP;IACN,aAAa;IACb,MAAK;KACJ;IACc;GACA;AAIpB,QACC,qBAAC;EAAI,WAAW,GAAG,YAAY,UAAU;aACxC,qBAACA;GACA,WAAW,GACV,2IACA;cAEA,SAAS,oBAAC;IAAY,KAAK;IAAM,KAAK;KAAS,EAChD,oBAAC;IAAe,WAAU;cACzB,oBAAC;KACA,WAAU;KACI;KACd,aAAa;KACP;KACN,aAAa;KACb,MAAK;MACJ;KACc;IACA,EAClB,oBAAC;GACA,WAAU;GACV,MAAM;GACN,QAAQ;IACP;GACG"}
@@ -4,7 +4,7 @@ import * as class_variance_authority_dist_types0 from "class-variance-authority/
4
4
 
5
5
  //#region src/support/components/button.d.ts
6
6
  declare const coButtonVariants: (props?: ({
7
- variant?: "tab" | "default" | "secondary" | "ghost" | "outline" | "tab-selected" | null | undefined;
7
+ variant?: "default" | "tab" | "secondary" | "ghost" | "outline" | "tab-selected" | null | undefined;
8
8
  size?: "default" | "large" | "icon" | null | undefined;
9
9
  } & class_variance_authority_dist_types0.ClassProp) | undefined) => string;
10
10
  type CossistantButtonProps = React$1.ComponentProps<"button"> & {
@@ -45,7 +45,8 @@ function ConversationButtonLink({ conversation, onClick, className }) {
45
45
  image: assignedAgent?.image,
46
46
  isAI: assignedAgent?.type === "ai",
47
47
  lastSeenAt: assignedAgent?.lastSeenAt,
48
- name: assignedAgent?.name ?? text("common.fallbacks.supportTeam")
48
+ name: assignedAgent?.name ?? text("common.fallbacks.supportTeam"),
49
+ showBackground: true
49
50
  }),
50
51
  /* @__PURE__ */ jsxs("div", {
51
52
  className: "mr-6 ml-1 flex min-w-0 flex-1 flex-col gap-0.5",
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-button-link.js","names":["STATUS_BADGE_CLASSNAMES: Record<ConversationStatus, string>","STATUS_TEXT_KEYS: Record<ConversationStatus, SupportTextKey>","Icon"],"sources":["../../../src/support/components/conversation-button-link.tsx"],"sourcesContent":["import { type Conversation, ConversationStatus } from \"@cossistant/types\";\nimport type React from \"react\";\nimport { useConversationPreview } from \"../../hooks/use-conversation-preview\";\nimport { type SupportTextKey, useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./avatar\";\nimport { coButtonVariants } from \"./button\";\nimport Icon from \"./icons\";\nimport { BouncingDots } from \"./typing-indicator\";\n\nexport type ConversationButtonLinkProps = {\n\tconversation: Conversation;\n\tonClick?: () => void;\n\tclassName?: string;\n};\n\nconst STATUS_BADGE_CLASSNAMES: Record<ConversationStatus, string> = {\n\t[ConversationStatus.OPEN]: \"bg-co-success/20 text-co-success-foreground\",\n\t[ConversationStatus.RESOLVED]: \"bg-co-neutral/20 text-co-neutral-foreground\",\n\t[ConversationStatus.SPAM]: \"bg-co-warning/20 text-co-warning-foreground\",\n};\n\nconst DEFAULT_STATUS_BADGE_CLASSNAME =\n\t\"bg-co-neutral/20 text-co-neutral-foreground\";\n\nconst STATUS_TEXT_KEYS: Record<ConversationStatus, SupportTextKey> = {\n\t[ConversationStatus.OPEN]: \"component.conversationButtonLink.status.open\",\n\t[ConversationStatus.RESOLVED]:\n\t\t\"component.conversationButtonLink.status.resolved\",\n\t[ConversationStatus.SPAM]: \"component.conversationButtonLink.status.spam\",\n};\n\n/**\n * Renders a navigable preview card for a conversation including assigned agent\n * details, last message snippets and typing indicators.\n */\nexport function ConversationButtonLink({\n\tconversation,\n\tonClick,\n\tclassName,\n}: ConversationButtonLinkProps): React.ReactElement | null {\n\tconst preview = useConversationPreview({ conversation });\n\tconst text = useSupportText();\n\tconst { lastMessage, assignedAgent, typing } = preview;\n\n\tconst statusBadgeClassName = conversation.deletedAt\n\t\t? STATUS_BADGE_CLASSNAMES[ConversationStatus.RESOLVED]\n\t\t: (STATUS_BADGE_CLASSNAMES[conversation.status] ??\n\t\t\tDEFAULT_STATUS_BADGE_CLASSNAME);\n\n\tconst statusTextKey = conversation.deletedAt\n\t\t? STATUS_TEXT_KEYS[ConversationStatus.RESOLVED]\n\t\t: STATUS_TEXT_KEYS[conversation.status];\n\n\tconst statusText = conversation.deletedAt\n\t\t? text(\"component.conversationButtonLink.status.closed\")\n\t\t: statusTextKey\n\t\t\t? text(statusTextKey)\n\t\t\t: text(\"common.fallbacks.unknown\");\n\n\t// Show the actual title if it exists, otherwise use the preview title (which may fallback to message)\n\tconst displayTitle = conversation.title || preview.title;\n\n\t// Show the truncated message content as secondary text\n\tconst messagePreview = lastMessage?.content || null;\n\n\treturn (\n\t\t<button\n\t\t\tclassName={cn(\n\t\t\t\tcoButtonVariants({\n\t\t\t\t\tvariant: \"secondary\",\n\t\t\t\t\tsize: \"large\",\n\t\t\t\t}),\n\t\t\t\t\"group/btn relative gap-2 border-0 border-co-border/50 border-b pr-3 pl-3 text-left transition-colors first-of-type:rounded-t last-of-type:rounded-b last-of-type:border-b-0 has-[>svg]:pl-3\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tonClick={onClick}\n\t\t\ttype=\"button\"\n\t\t>\n\t\t\t<Avatar\n\t\t\t\tclassName=\"size-8 flex-shrink-0\"\n\t\t\t\timage={assignedAgent?.image}\n\t\t\t\tisAI={assignedAgent?.type === \"ai\"}\n\t\t\t\tlastSeenAt={assignedAgent?.lastSeenAt}\n\t\t\t\tname={assignedAgent?.name ?? text(\"common.fallbacks.supportTeam\")}\n\t\t\t/>\n\n\t\t\t<div className=\"mr-6 ml-1 flex min-w-0 flex-1 flex-col gap-0.5\">\n\t\t\t\t<div className=\"flex max-w-[90%] items-center justify-between gap-2\">\n\t\t\t\t\t<h3 className=\"truncate font-medium text-co-primary text-sm\">\n\t\t\t\t\t\t{displayTitle}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t{typing.isTyping ? (\n\t\t\t\t\t<BouncingDots />\n\t\t\t\t) : messagePreview ? (\n\t\t\t\t\t<p className=\"truncate text-co-primary/60 text-sm\">\n\t\t\t\t\t\t{messagePreview}\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t</div>\n\n\t\t\t{/* <div\n className={cn(\n \"mr-6 inline-flex items-center rounded px-2 py-0.5 font-medium text-[9px] uppercase\",\n statusBadgeClassName,\n )}\n >\n {statusText}\n </div> */}\n\n\t\t\t<Icon\n\t\t\t\tclassName=\"-translate-y-1/2 absolute top-1/2 right-4 size-3 text-co-primary/60 transition-transform duration-200 group-hover/btn:translate-x-0.5 group-hover/btn:text-co-primary\"\n\t\t\t\tname=\"arrow-right\"\n\t\t\t\tvariant=\"default\"\n\t\t\t/>\n\t\t</button>\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAgBA,MAAMA,0BAA8D;EAClE,mBAAmB,OAAO;EAC1B,mBAAmB,WAAW;EAC9B,mBAAmB,OAAO;CAC3B;AAKD,MAAMC,mBAA+D;EACnE,mBAAmB,OAAO;EAC1B,mBAAmB,WACnB;EACA,mBAAmB,OAAO;CAC3B;;;;;AAMD,SAAgB,uBAAuB,EACtC,cACA,SACA,aAC0D;CAC1D,MAAM,UAAU,uBAAuB,EAAE,cAAc,CAAC;CACxD,MAAM,OAAO,gBAAgB;CAC7B,MAAM,EAAE,aAAa,eAAe,WAAW;AAElB,cAAa,YACvC,wBAAwB,mBAAmB,YAC1C,wBAAwB,aAAa;CAGzC,MAAM,gBAAgB,aAAa,YAChC,iBAAiB,mBAAmB,YACpC,iBAAiB,aAAa;AAEd,cAAa,YAC7B,KAAK,iDAAiD,GACtD,gBACC,KAAK,cAAc,GACnB,KAAK,2BAA2B;CAGpC,MAAM,eAAe,aAAa,SAAS,QAAQ;CAGnD,MAAM,iBAAiB,aAAa,WAAW;AAE/C,QACC,qBAAC;EACA,WAAW,GACV,iBAAiB;GAChB,SAAS;GACT,MAAM;GACN,CAAC,EACF,+LACA,UACA;EACQ;EACT,MAAK;;GAEL,oBAAC;IACA,WAAU;IACV,OAAO,eAAe;IACtB,MAAM,eAAe,SAAS;IAC9B,YAAY,eAAe;IAC3B,MAAM,eAAe,QAAQ,KAAK,+BAA+B;KAChE;GAEF,qBAAC;IAAI,WAAU;eACd,oBAAC;KAAI,WAAU;eACd,oBAAC;MAAG,WAAU;gBACZ;OACG;MACA,EACL,OAAO,WACP,oBAAC,iBAAe,GACb,iBACH,oBAAC;KAAE,WAAU;eACX;MACE,GACD;KACC;GAWN,oBAACC;IACA,WAAU;IACV,MAAK;IACL,SAAQ;KACP;;GACM"}
1
+ {"version":3,"file":"conversation-button-link.js","names":["STATUS_BADGE_CLASSNAMES: Record<ConversationStatus, string>","STATUS_TEXT_KEYS: Record<ConversationStatus, SupportTextKey>","Icon"],"sources":["../../../src/support/components/conversation-button-link.tsx"],"sourcesContent":["import { type Conversation, ConversationStatus } from \"@cossistant/types\";\nimport type React from \"react\";\nimport { useConversationPreview } from \"../../hooks/use-conversation-preview\";\nimport { type SupportTextKey, useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./avatar\";\nimport { coButtonVariants } from \"./button\";\nimport Icon from \"./icons\";\nimport { BouncingDots } from \"./typing-indicator\";\n\nexport type ConversationButtonLinkProps = {\n\tconversation: Conversation;\n\tonClick?: () => void;\n\tclassName?: string;\n};\n\nconst STATUS_BADGE_CLASSNAMES: Record<ConversationStatus, string> = {\n\t[ConversationStatus.OPEN]: \"bg-co-success/20 text-co-success-foreground\",\n\t[ConversationStatus.RESOLVED]: \"bg-co-neutral/20 text-co-neutral-foreground\",\n\t[ConversationStatus.SPAM]: \"bg-co-warning/20 text-co-warning-foreground\",\n};\n\nconst DEFAULT_STATUS_BADGE_CLASSNAME =\n\t\"bg-co-neutral/20 text-co-neutral-foreground\";\n\nconst STATUS_TEXT_KEYS: Record<ConversationStatus, SupportTextKey> = {\n\t[ConversationStatus.OPEN]: \"component.conversationButtonLink.status.open\",\n\t[ConversationStatus.RESOLVED]:\n\t\t\"component.conversationButtonLink.status.resolved\",\n\t[ConversationStatus.SPAM]: \"component.conversationButtonLink.status.spam\",\n};\n\n/**\n * Renders a navigable preview card for a conversation including assigned agent\n * details, last message snippets and typing indicators.\n */\nexport function ConversationButtonLink({\n\tconversation,\n\tonClick,\n\tclassName,\n}: ConversationButtonLinkProps): React.ReactElement | null {\n\tconst preview = useConversationPreview({ conversation });\n\tconst text = useSupportText();\n\tconst { lastMessage, assignedAgent, typing } = preview;\n\n\tconst statusBadgeClassName = conversation.deletedAt\n\t\t? STATUS_BADGE_CLASSNAMES[ConversationStatus.RESOLVED]\n\t\t: (STATUS_BADGE_CLASSNAMES[conversation.status] ??\n\t\t\tDEFAULT_STATUS_BADGE_CLASSNAME);\n\n\tconst statusTextKey = conversation.deletedAt\n\t\t? STATUS_TEXT_KEYS[ConversationStatus.RESOLVED]\n\t\t: STATUS_TEXT_KEYS[conversation.status];\n\n\tconst statusText = conversation.deletedAt\n\t\t? text(\"component.conversationButtonLink.status.closed\")\n\t\t: statusTextKey\n\t\t\t? text(statusTextKey)\n\t\t\t: text(\"common.fallbacks.unknown\");\n\n\t// Show the actual title if it exists, otherwise use the preview title (which may fallback to message)\n\tconst displayTitle = conversation.title || preview.title;\n\n\t// Show the truncated message content as secondary text\n\tconst messagePreview = lastMessage?.content || null;\n\n\treturn (\n\t\t<button\n\t\t\tclassName={cn(\n\t\t\t\tcoButtonVariants({\n\t\t\t\t\tvariant: \"secondary\",\n\t\t\t\t\tsize: \"large\",\n\t\t\t\t}),\n\t\t\t\t\"group/btn relative gap-2 border-0 border-co-border/50 border-b pr-3 pl-3 text-left transition-colors first-of-type:rounded-t last-of-type:rounded-b last-of-type:border-b-0 has-[>svg]:pl-3\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tonClick={onClick}\n\t\t\ttype=\"button\"\n\t\t>\n\t\t\t<Avatar\n\t\t\t\tclassName=\"size-8 flex-shrink-0\"\n\t\t\t\timage={assignedAgent?.image}\n\t\t\t\tisAI={assignedAgent?.type === \"ai\"}\n\t\t\t\tlastSeenAt={assignedAgent?.lastSeenAt}\n\t\t\t\tname={assignedAgent?.name ?? text(\"common.fallbacks.supportTeam\")}\n\t\t\t\tshowBackground\n\t\t\t/>\n\n\t\t\t<div className=\"mr-6 ml-1 flex min-w-0 flex-1 flex-col gap-0.5\">\n\t\t\t\t<div className=\"flex max-w-[90%] items-center justify-between gap-2\">\n\t\t\t\t\t<h3 className=\"truncate font-medium text-co-primary text-sm\">\n\t\t\t\t\t\t{displayTitle}\n\t\t\t\t\t</h3>\n\t\t\t\t</div>\n\t\t\t\t{typing.isTyping ? (\n\t\t\t\t\t<BouncingDots />\n\t\t\t\t) : messagePreview ? (\n\t\t\t\t\t<p className=\"truncate text-co-primary/60 text-sm\">\n\t\t\t\t\t\t{messagePreview}\n\t\t\t\t\t</p>\n\t\t\t\t) : null}\n\t\t\t</div>\n\n\t\t\t{/* <div\n className={cn(\n \"mr-6 inline-flex items-center rounded px-2 py-0.5 font-medium text-[9px] uppercase\",\n statusBadgeClassName,\n )}\n >\n {statusText}\n </div> */}\n\n\t\t\t<Icon\n\t\t\t\tclassName=\"-translate-y-1/2 absolute top-1/2 right-4 size-3 text-co-primary/60 transition-transform duration-200 group-hover/btn:translate-x-0.5 group-hover/btn:text-co-primary\"\n\t\t\t\tname=\"arrow-right\"\n\t\t\t\tvariant=\"default\"\n\t\t\t/>\n\t\t</button>\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAgBA,MAAMA,0BAA8D;EAClE,mBAAmB,OAAO;EAC1B,mBAAmB,WAAW;EAC9B,mBAAmB,OAAO;CAC3B;AAKD,MAAMC,mBAA+D;EACnE,mBAAmB,OAAO;EAC1B,mBAAmB,WACnB;EACA,mBAAmB,OAAO;CAC3B;;;;;AAMD,SAAgB,uBAAuB,EACtC,cACA,SACA,aAC0D;CAC1D,MAAM,UAAU,uBAAuB,EAAE,cAAc,CAAC;CACxD,MAAM,OAAO,gBAAgB;CAC7B,MAAM,EAAE,aAAa,eAAe,WAAW;AAElB,cAAa,YACvC,wBAAwB,mBAAmB,YAC1C,wBAAwB,aAAa;CAGzC,MAAM,gBAAgB,aAAa,YAChC,iBAAiB,mBAAmB,YACpC,iBAAiB,aAAa;AAEd,cAAa,YAC7B,KAAK,iDAAiD,GACtD,gBACC,KAAK,cAAc,GACnB,KAAK,2BAA2B;CAGpC,MAAM,eAAe,aAAa,SAAS,QAAQ;CAGnD,MAAM,iBAAiB,aAAa,WAAW;AAE/C,QACC,qBAAC;EACA,WAAW,GACV,iBAAiB;GAChB,SAAS;GACT,MAAM;GACN,CAAC,EACF,+LACA,UACA;EACQ;EACT,MAAK;;GAEL,oBAAC;IACA,WAAU;IACV,OAAO,eAAe;IACtB,MAAM,eAAe,SAAS;IAC9B,YAAY,eAAe;IAC3B,MAAM,eAAe,QAAQ,KAAK,+BAA+B;IACjE;KACC;GAEF,qBAAC;IAAI,WAAU;eACd,oBAAC;KAAI,WAAU;eACd,oBAAC;MAAG,WAAU;gBACZ;OACG;MACA,EACL,OAAO,WACP,oBAAC,iBAAe,GACb,iBACH,oBAAC;KAAE,WAAU;eACX;MACE,GACD;KACC;GAWN,oBAACC;IACA,WAAU;IACV,MAAK;IACL,SAAQ;KACP;;GACM"}
@@ -55,7 +55,7 @@ const ConversationEvent = ({ event, availableAIAgents, createdAt, availableHuman
55
55
  name: aiAgent?.name || text("common.fallbacks.cossistant"),
56
56
  showBackground: !!aiAgent?.image
57
57
  }) : /* @__PURE__ */ jsx(Avatar, {
58
- className: "size-5 flex-shrink-0 overflow-clip rounded-lg",
58
+ className: "size-5 flex-shrink-0",
59
59
  image: humanAgent?.image,
60
60
  name: humanAgent?.name || text("common.fallbacks.someone")
61
61
  })
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-event.js","names":["ConversationEvent: React.FC<ConversationEventProps>"],"sources":["../../../src/support/components/conversation-event.tsx"],"sourcesContent":["import type {\n\tAvailableAIAgent,\n\tAvailableHumanAgent,\n\tTimelinePartEvent,\n} from \"@cossistant/types\";\nimport { motion } from \"motion/react\";\nimport type React from \"react\";\nimport { useSupportText } from \"../text\";\nimport { Avatar } from \"./avatar\";\n\nexport type ConversationEventProps = {\n\tevent: TimelinePartEvent;\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcreatedAt?: string;\n};\n\nexport const ConversationEvent: React.FC<ConversationEventProps> = ({\n\tevent,\n\tavailableAIAgents,\n\tcreatedAt,\n\tavailableHumanAgents,\n}) => {\n\tconst text = useSupportText();\n\tconst isAI = event.actorAiAgentId !== null;\n\tconst humanAgent = availableHumanAgents.find(\n\t\t(agent) => agent.id === event.actorUserId\n\t);\n\tconst aiAgent = availableAIAgents.find(\n\t\t(agent) => agent.id === event.actorAiAgentId\n\t);\n\n\t// Get the actor name\n\tconst actorName = isAI\n\t\t? aiAgent?.name || text(\"common.fallbacks.cossistant\")\n\t\t: humanAgent?.name || text(\"common.fallbacks.someone\");\n\n\t// Convert event type to plain English\n\tconst getEventText = () => {\n\t\tswitch (event.eventType) {\n\t\t\tcase \"assigned\":\n\t\t\t\treturn text(\"component.conversationEvent.assigned\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"unassigned\":\n\t\t\t\treturn text(\"component.conversationEvent.unassigned\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_requested\":\n\t\t\t\treturn text(\"component.conversationEvent.participantRequested\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_joined\":\n\t\t\t\treturn text(\"component.conversationEvent.participantJoined\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_left\":\n\t\t\t\treturn text(\"component.conversationEvent.participantLeft\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"status_changed\":\n\t\t\t\treturn text(\"component.conversationEvent.statusChanged\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"priority_changed\":\n\t\t\t\treturn text(\"component.conversationEvent.priorityChanged\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"tag_added\":\n\t\t\t\treturn text(\"component.conversationEvent.tagAdded\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"tag_removed\":\n\t\t\t\treturn text(\"component.conversationEvent.tagRemoved\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"resolved\":\n\t\t\t\treturn text(\"component.conversationEvent.resolved\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"reopened\":\n\t\t\t\treturn text(\"component.conversationEvent.reopened\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_blocked\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorBlocked\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_unblocked\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorUnblocked\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_identified\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorIdentified\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tdefault:\n\t\t\t\treturn text(\"component.conversationEvent.default\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={{ opacity: 1, scale: 1 }}\n\t\t\tclassName=\"flex items-center justify-center pt-4 pb-8\"\n\t\t\tinitial={{ opacity: 0, scale: 0.95 }}\n\t\t\ttransition={{ duration: 0.3, ease: \"easeOut\" }}\n\t\t>\n\t\t\t<div className=\"flex items-center gap-2 text-co-muted-foreground text-xs\">\n\t\t\t\t<div className=\"flex flex-col justify-end\">\n\t\t\t\t\t{isAI ? (\n\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\tclassName=\"size-5 flex-shrink-0\"\n\t\t\t\t\t\t\timage={aiAgent?.image}\n\t\t\t\t\t\t\tisAI\n\t\t\t\t\t\t\tname={aiAgent?.name || text(\"common.fallbacks.cossistant\")}\n\t\t\t\t\t\t\tshowBackground={!!aiAgent?.image}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\tclassName=\"size-5 flex-shrink-0 overflow-clip rounded-lg\"\n\t\t\t\t\t\t\timage={humanAgent?.image}\n\t\t\t\t\t\t\tname={humanAgent?.name || text(\"common.fallbacks.someone\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<span className=\"px-2\">{getEventText()}</span>\n\t\t\t\t{createdAt && (\n\t\t\t\t\t<time className=\"text-[10px]\">\n\t\t\t\t\t\t{new Date(createdAt).toLocaleTimeString([], {\n\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t})}\n\t\t\t\t\t</time>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</motion.div>\n\t);\n};\n\nConversationEvent.displayName = \"ConversationEvent\";\n"],"mappings":";;;;;;AAiBA,MAAaA,qBAAuD,EACnE,OACA,mBACA,WACA,2BACK;CACL,MAAM,OAAO,gBAAgB;CAC7B,MAAM,OAAO,MAAM,mBAAmB;CACtC,MAAM,aAAa,qBAAqB,MACtC,UAAU,MAAM,OAAO,MAAM,YAC9B;CACD,MAAM,UAAU,kBAAkB,MAChC,UAAU,MAAM,OAAO,MAAM,eAC9B;CAGD,MAAM,YAAY,OACf,SAAS,QAAQ,KAAK,8BAA8B,GACpD,YAAY,QAAQ,KAAK,2BAA2B;CAGvD,MAAM,qBAAqB;AAC1B,UAAQ,MAAM,WAAd;GACC,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,aACJ,QAAO,KAAK,0CAA0C,EACrD,WACA,CAAC;GACH,KAAK,wBACJ,QAAO,KAAK,oDAAoD,EAC/D,WACA,CAAC;GACH,KAAK,qBACJ,QAAO,KAAK,iDAAiD,EAC5D,WACA,CAAC;GACH,KAAK,mBACJ,QAAO,KAAK,+CAA+C,EAC1D,WACA,CAAC;GACH,KAAK,iBACJ,QAAO,KAAK,6CAA6C,EACxD,WACA,CAAC;GACH,KAAK,mBACJ,QAAO,KAAK,+CAA+C,EAC1D,WACA,CAAC;GACH,KAAK,YACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,cACJ,QAAO,KAAK,0CAA0C,EACrD,WACA,CAAC;GACH,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,kBACJ,QAAO,KAAK,8CAA8C,EACzD,WACA,CAAC;GACH,KAAK,oBACJ,QAAO,KAAK,gDAAgD,EAC3D,WACA,CAAC;GACH,KAAK,qBACJ,QAAO,KAAK,iDAAiD,EAC5D,WACA,CAAC;GACH,QACC,QAAO,KAAK,uCAAuC,EAClD,WACA,CAAC;;;AAIL,QACC,oBAAC,OAAO;EACP,SAAS;GAAE,SAAS;GAAG,OAAO;GAAG;EACjC,WAAU;EACV,SAAS;GAAE,SAAS;GAAG,OAAO;GAAM;EACpC,YAAY;GAAE,UAAU;GAAK,MAAM;GAAW;YAE9C,qBAAC;GAAI,WAAU;;IACd,oBAAC;KAAI,WAAU;eACb,OACA,oBAAC;MACA,WAAU;MACV,OAAO,SAAS;MAChB;MACA,MAAM,SAAS,QAAQ,KAAK,8BAA8B;MAC1D,gBAAgB,CAAC,CAAC,SAAS;OAC1B,GAEF,oBAAC;MACA,WAAU;MACV,OAAO,YAAY;MACnB,MAAM,YAAY,QAAQ,KAAK,2BAA2B;OACzD;MAEE;IACN,oBAAC;KAAK,WAAU;eAAQ,cAAc;MAAQ;IAC7C,aACA,oBAAC;KAAK,WAAU;eACd,IAAI,KAAK,UAAU,CAAC,mBAAmB,EAAE,EAAE;MAC3C,MAAM;MACN,QAAQ;MACR,CAAC;MACI;;IAEH;GACM;;AAIf,kBAAkB,cAAc"}
1
+ {"version":3,"file":"conversation-event.js","names":["ConversationEvent: React.FC<ConversationEventProps>"],"sources":["../../../src/support/components/conversation-event.tsx"],"sourcesContent":["import type {\n\tAvailableAIAgent,\n\tAvailableHumanAgent,\n\tTimelinePartEvent,\n} from \"@cossistant/types\";\nimport { motion } from \"motion/react\";\nimport type React from \"react\";\nimport { useSupportText } from \"../text\";\nimport { Avatar } from \"./avatar\";\n\nexport type ConversationEventProps = {\n\tevent: TimelinePartEvent;\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcreatedAt?: string;\n};\n\nexport const ConversationEvent: React.FC<ConversationEventProps> = ({\n\tevent,\n\tavailableAIAgents,\n\tcreatedAt,\n\tavailableHumanAgents,\n}) => {\n\tconst text = useSupportText();\n\tconst isAI = event.actorAiAgentId !== null;\n\tconst humanAgent = availableHumanAgents.find(\n\t\t(agent) => agent.id === event.actorUserId\n\t);\n\tconst aiAgent = availableAIAgents.find(\n\t\t(agent) => agent.id === event.actorAiAgentId\n\t);\n\n\t// Get the actor name\n\tconst actorName = isAI\n\t\t? aiAgent?.name || text(\"common.fallbacks.cossistant\")\n\t\t: humanAgent?.name || text(\"common.fallbacks.someone\");\n\n\t// Convert event type to plain English\n\tconst getEventText = () => {\n\t\tswitch (event.eventType) {\n\t\t\tcase \"assigned\":\n\t\t\t\treturn text(\"component.conversationEvent.assigned\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"unassigned\":\n\t\t\t\treturn text(\"component.conversationEvent.unassigned\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_requested\":\n\t\t\t\treturn text(\"component.conversationEvent.participantRequested\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_joined\":\n\t\t\t\treturn text(\"component.conversationEvent.participantJoined\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"participant_left\":\n\t\t\t\treturn text(\"component.conversationEvent.participantLeft\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"status_changed\":\n\t\t\t\treturn text(\"component.conversationEvent.statusChanged\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"priority_changed\":\n\t\t\t\treturn text(\"component.conversationEvent.priorityChanged\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"tag_added\":\n\t\t\t\treturn text(\"component.conversationEvent.tagAdded\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"tag_removed\":\n\t\t\t\treturn text(\"component.conversationEvent.tagRemoved\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"resolved\":\n\t\t\t\treturn text(\"component.conversationEvent.resolved\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"reopened\":\n\t\t\t\treturn text(\"component.conversationEvent.reopened\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_blocked\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorBlocked\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_unblocked\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorUnblocked\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tcase \"visitor_identified\":\n\t\t\t\treturn text(\"component.conversationEvent.visitorIdentified\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t\tdefault:\n\t\t\t\treturn text(\"component.conversationEvent.default\", {\n\t\t\t\t\tactorName,\n\t\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<motion.div\n\t\t\tanimate={{ opacity: 1, scale: 1 }}\n\t\t\tclassName=\"flex items-center justify-center pt-4 pb-8\"\n\t\t\tinitial={{ opacity: 0, scale: 0.95 }}\n\t\t\ttransition={{ duration: 0.3, ease: \"easeOut\" }}\n\t\t>\n\t\t\t<div className=\"flex items-center gap-2 text-co-muted-foreground text-xs\">\n\t\t\t\t<div className=\"flex flex-col justify-end\">\n\t\t\t\t\t{isAI ? (\n\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\tclassName=\"size-5 flex-shrink-0\"\n\t\t\t\t\t\t\timage={aiAgent?.image}\n\t\t\t\t\t\t\tisAI\n\t\t\t\t\t\t\tname={aiAgent?.name || text(\"common.fallbacks.cossistant\")}\n\t\t\t\t\t\t\tshowBackground={!!aiAgent?.image}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Avatar\n\t\t\t\t\t\t\tclassName=\"size-5 flex-shrink-0\"\n\t\t\t\t\t\t\timage={humanAgent?.image}\n\t\t\t\t\t\t\tname={humanAgent?.name || text(\"common.fallbacks.someone\")}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<span className=\"px-2\">{getEventText()}</span>\n\t\t\t\t{createdAt && (\n\t\t\t\t\t<time className=\"text-[10px]\">\n\t\t\t\t\t\t{new Date(createdAt).toLocaleTimeString([], {\n\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t})}\n\t\t\t\t\t</time>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</motion.div>\n\t);\n};\n\nConversationEvent.displayName = \"ConversationEvent\";\n"],"mappings":";;;;;;AAiBA,MAAaA,qBAAuD,EACnE,OACA,mBACA,WACA,2BACK;CACL,MAAM,OAAO,gBAAgB;CAC7B,MAAM,OAAO,MAAM,mBAAmB;CACtC,MAAM,aAAa,qBAAqB,MACtC,UAAU,MAAM,OAAO,MAAM,YAC9B;CACD,MAAM,UAAU,kBAAkB,MAChC,UAAU,MAAM,OAAO,MAAM,eAC9B;CAGD,MAAM,YAAY,OACf,SAAS,QAAQ,KAAK,8BAA8B,GACpD,YAAY,QAAQ,KAAK,2BAA2B;CAGvD,MAAM,qBAAqB;AAC1B,UAAQ,MAAM,WAAd;GACC,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,aACJ,QAAO,KAAK,0CAA0C,EACrD,WACA,CAAC;GACH,KAAK,wBACJ,QAAO,KAAK,oDAAoD,EAC/D,WACA,CAAC;GACH,KAAK,qBACJ,QAAO,KAAK,iDAAiD,EAC5D,WACA,CAAC;GACH,KAAK,mBACJ,QAAO,KAAK,+CAA+C,EAC1D,WACA,CAAC;GACH,KAAK,iBACJ,QAAO,KAAK,6CAA6C,EACxD,WACA,CAAC;GACH,KAAK,mBACJ,QAAO,KAAK,+CAA+C,EAC1D,WACA,CAAC;GACH,KAAK,YACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,cACJ,QAAO,KAAK,0CAA0C,EACrD,WACA,CAAC;GACH,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,WACJ,QAAO,KAAK,wCAAwC,EACnD,WACA,CAAC;GACH,KAAK,kBACJ,QAAO,KAAK,8CAA8C,EACzD,WACA,CAAC;GACH,KAAK,oBACJ,QAAO,KAAK,gDAAgD,EAC3D,WACA,CAAC;GACH,KAAK,qBACJ,QAAO,KAAK,iDAAiD,EAC5D,WACA,CAAC;GACH,QACC,QAAO,KAAK,uCAAuC,EAClD,WACA,CAAC;;;AAIL,QACC,oBAAC,OAAO;EACP,SAAS;GAAE,SAAS;GAAG,OAAO;GAAG;EACjC,WAAU;EACV,SAAS;GAAE,SAAS;GAAG,OAAO;GAAM;EACpC,YAAY;GAAE,UAAU;GAAK,MAAM;GAAW;YAE9C,qBAAC;GAAI,WAAU;;IACd,oBAAC;KAAI,WAAU;eACb,OACA,oBAAC;MACA,WAAU;MACV,OAAO,SAAS;MAChB;MACA,MAAM,SAAS,QAAQ,KAAK,8BAA8B;MAC1D,gBAAgB,CAAC,CAAC,SAAS;OAC1B,GAEF,oBAAC;MACA,WAAU;MACV,OAAO,YAAY;MACnB,MAAM,YAAY,QAAQ,KAAK,2BAA2B;OACzD;MAEE;IACN,oBAAC;KAAK,WAAU;eAAQ,cAAc;MAAQ;IAC7C,aACA,oBAAC;KAAK,WAAU;eACd,IAAI,KAAK,UAAU,CAAC,mBAAmB,EAAE,EAAE;MAC3C,MAAM;MACN,QAAQ;MACR,CAAC;MACI;;IAEH;GACM;;AAIf,kBAAkB,cAAc"}
@@ -0,0 +1,21 @@
1
+ import { ConversationStatus } from "@cossistant/types";
2
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
3
+
4
+ //#region src/support/components/conversation-resolved-feedback.d.ts
5
+ type ConversationResolvedFeedbackProps = {
6
+ status: ConversationStatus | null;
7
+ rating: number | null;
8
+ onRate?: (rating: number, comment?: string) => void;
9
+ isSubmitting?: boolean;
10
+ className?: string;
11
+ };
12
+ declare function ConversationResolvedFeedback({
13
+ status,
14
+ rating,
15
+ onRate,
16
+ isSubmitting,
17
+ className
18
+ }: ConversationResolvedFeedbackProps): react_jsx_runtime0.JSX.Element;
19
+ //#endregion
20
+ export { ConversationResolvedFeedback };
21
+ //# sourceMappingURL=conversation-resolved-feedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-resolved-feedback.d.ts","names":[],"sources":["../../../src/support/components/conversation-resolved-feedback.tsx"],"sourcesContent":[],"mappings":";;;;KAMK,iCAAA;UACI;;EADJ,MAAA,CAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAiC,CAAjC,EAAiC,MAAA,EAAA,GAAA,IAC7B;EASO,YAAA,CAAA,EAAA,OAAA;EACf,SAAA,CAAA,EAAA,MAAA;CACA;AACA,iBAHe,4BAAA,CAGf;EAAA,MAAA;EAAA,MAAA;EAAA,MAAA;EAAA,YAAA;EAAA;AAAA,CAAA,EAGE,iCAHF,CAAA,EAGmC,kBAAA,CAAA,GAAA,CAAA,OAHnC"}
@@ -0,0 +1,102 @@
1
+ import { cn } from "../utils/index.js";
2
+ import icons_default from "./icons.js";
3
+ import { Text, useSupportText } from "../text/index.js";
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { ConversationStatus } from "@cossistant/types";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+
8
+ //#region src/support/components/conversation-resolved-feedback.tsx
9
+ const STAR_COUNT = 5;
10
+ function ConversationResolvedFeedback({ status, rating, onRate, isSubmitting = false, className }) {
11
+ const text = useSupportText();
12
+ const isResolved = status === ConversationStatus.RESOLVED;
13
+ const isRated = rating != null;
14
+ const [selectedRating, setSelectedRating] = useState(null);
15
+ const [hoveredRating, setHoveredRating] = useState(null);
16
+ const [comment, setComment] = useState("");
17
+ const [hasSubmitted, setHasSubmitted] = useState(false);
18
+ const textareaRef = useRef(null);
19
+ const displayRating = hoveredRating ?? (isRated ? rating : selectedRating);
20
+ const showCommentField = selectedRating != null && !isRated && !hasSubmitted;
21
+ const isInteractive = Boolean(onRate) && !isSubmitting && !isRated && !hasSubmitted;
22
+ useEffect(() => {
23
+ if (showCommentField) textareaRef.current?.focus();
24
+ }, [showCommentField]);
25
+ const handleRatingSelect = (value) => {
26
+ if (!isInteractive) return;
27
+ setSelectedRating(value);
28
+ };
29
+ const handleSubmit = () => {
30
+ if (!(selectedRating && onRate)) return;
31
+ setHasSubmitted(true);
32
+ onRate(selectedRating, comment.trim() || void 0);
33
+ };
34
+ if (!isResolved) {
35
+ const closedTextKey = status === ConversationStatus.SPAM ? "component.conversationPage.spamMessage" : "component.conversationPage.closedMessage";
36
+ return /* @__PURE__ */ jsx("div", {
37
+ className: cn("m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-co-muted-foreground text-sm", className),
38
+ children: /* @__PURE__ */ jsx(Text, {
39
+ as: "p",
40
+ textKey: closedTextKey
41
+ })
42
+ });
43
+ }
44
+ return /* @__PURE__ */ jsxs("div", {
45
+ className: cn("m-4 rounded-md border border-co-border/60 bg-co-background-100 px-4 py-3 text-center text-sm shadow-sm", className),
46
+ children: [
47
+ /* @__PURE__ */ jsx(Text, {
48
+ as: "p",
49
+ className: "font-medium text-co-foreground",
50
+ textKey: isRated || hasSubmitted ? "component.conversationPage.ratingThanks" : "component.conversationPage.ratingPrompt"
51
+ }),
52
+ /* @__PURE__ */ jsx("div", {
53
+ className: "mt-2 flex items-center justify-center gap-1",
54
+ children: Array.from({ length: STAR_COUNT }).map((_, index) => {
55
+ const value = index + 1;
56
+ const isFilled = displayRating ? value <= displayRating : false;
57
+ return /* @__PURE__ */ jsx("button", {
58
+ "aria-label": text("component.conversationPage.ratingLabel", { rating: value }),
59
+ className: cn("group inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors", isInteractive ? "hover:bg-co-muted" : "cursor-default opacity-70"),
60
+ disabled: !isInteractive,
61
+ onClick: () => handleRatingSelect(value),
62
+ onMouseEnter: () => isInteractive && setHoveredRating(value),
63
+ onMouseLeave: () => isInteractive && setHoveredRating(null),
64
+ type: "button",
65
+ children: /* @__PURE__ */ jsx(icons_default, {
66
+ className: cn("h-4 w-4 transition-transform", isFilled ? "text-co-primary" : "text-co-muted-foreground/40", isInteractive && hoveredRating && value <= hoveredRating && "scale-110"),
67
+ name: "star",
68
+ variant: isFilled ? "filled" : "default"
69
+ })
70
+ }, value);
71
+ })
72
+ }),
73
+ showCommentField && /* @__PURE__ */ jsxs("div", {
74
+ className: "mt-3 space-y-2",
75
+ children: [/* @__PURE__ */ jsx("textarea", {
76
+ className: "w-full resize-none rounded-md border border-co-border bg-co-background px-3 py-2 text-co-foreground text-sm placeholder:text-co-muted-foreground focus:border-co-primary focus:outline-none focus:ring-1 focus:ring-co-primary",
77
+ disabled: isSubmitting,
78
+ onChange: (e) => setComment(e.target.value),
79
+ placeholder: text("component.conversationPage.commentPlaceholder"),
80
+ ref: textareaRef,
81
+ rows: 3,
82
+ value: comment
83
+ }), /* @__PURE__ */ jsx("button", {
84
+ className: cn("w-full rounded-md bg-co-primary px-4 py-2 font-medium text-co-primary-foreground text-sm transition-colors", isSubmitting ? "cursor-not-allowed opacity-50" : "hover:bg-co-primary/90"),
85
+ disabled: isSubmitting,
86
+ onClick: handleSubmit,
87
+ type: "button",
88
+ children: text("component.conversationPage.submitFeedback")
89
+ })]
90
+ }),
91
+ (isRated || hasSubmitted || !showCommentField) && /* @__PURE__ */ jsx(Text, {
92
+ as: "p",
93
+ className: "mt-2 text-co-muted-foreground text-xs",
94
+ textKey: "component.conversationPage.closedMessage"
95
+ })
96
+ ]
97
+ });
98
+ }
99
+
100
+ //#endregion
101
+ export { ConversationResolvedFeedback };
102
+ //# sourceMappingURL=conversation-resolved-feedback.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-resolved-feedback.js","names":["Icon"],"sources":["../../../src/support/components/conversation-resolved-feedback.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { Text, useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\n\ntype ConversationResolvedFeedbackProps = {\n\tstatus: ConversationStatus | null;\n\trating: number | null;\n\tonRate?: (rating: number, comment?: string) => void;\n\tisSubmitting?: boolean;\n\tclassName?: string;\n};\n\nconst STAR_COUNT = 5;\n\nexport function ConversationResolvedFeedback({\n\tstatus,\n\trating,\n\tonRate,\n\tisSubmitting = false,\n\tclassName,\n}: ConversationResolvedFeedbackProps) {\n\tconst text = useSupportText();\n\tconst isResolved = status === ConversationStatus.RESOLVED;\n\tconst isRated = rating != null;\n\n\t// Local state for the rating flow\n\tconst [selectedRating, setSelectedRating] = useState<number | null>(null);\n\tconst [hoveredRating, setHoveredRating] = useState<number | null>(null);\n\tconst [comment, setComment] = useState(\"\");\n\tconst [hasSubmitted, setHasSubmitted] = useState(false);\n\tconst textareaRef = useRef<HTMLTextAreaElement>(null);\n\n\t// Show the rating that was submitted if available, otherwise use local selection\n\tconst displayRating = hoveredRating ?? (isRated ? rating : selectedRating);\n\tconst showCommentField = selectedRating != null && !isRated && !hasSubmitted;\n\tconst isInteractive =\n\t\tBoolean(onRate) && !isSubmitting && !isRated && !hasSubmitted;\n\n\tuseEffect(() => {\n\t\tif (showCommentField) {\n\t\t\ttextareaRef.current?.focus();\n\t\t}\n\t}, [showCommentField]);\n\n\tconst handleRatingSelect = (value: number) => {\n\t\tif (!isInteractive) {\n\t\t\treturn;\n\t\t}\n\t\tsetSelectedRating(value);\n\t};\n\n\tconst handleSubmit = () => {\n\t\tif (!(selectedRating && onRate)) {\n\t\t\treturn;\n\t\t}\n\t\tsetHasSubmitted(true);\n\t\tonRate(selectedRating, comment.trim() || undefined);\n\t};\n\n\tif (!isResolved) {\n\t\tconst closedTextKey =\n\t\t\tstatus === ConversationStatus.SPAM\n\t\t\t\t? \"component.conversationPage.spamMessage\"\n\t\t\t\t: \"component.conversationPage.closedMessage\";\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-co-muted-foreground text-sm\",\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<Text as=\"p\" textKey={closedTextKey} />\n\t\t\t</div>\n\t\t);\n\t}\n\n\treturn (\n\t\t<div\n\t\t\tclassName={cn(\n\t\t\t\t\"m-4 rounded-md border border-co-border/60 bg-co-background-100 px-4 py-3 text-center text-sm shadow-sm\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t<Text\n\t\t\t\tas=\"p\"\n\t\t\t\tclassName=\"font-medium text-co-foreground\"\n\t\t\t\ttextKey={\n\t\t\t\t\tisRated || hasSubmitted\n\t\t\t\t\t\t? \"component.conversationPage.ratingThanks\"\n\t\t\t\t\t\t: \"component.conversationPage.ratingPrompt\"\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<div className=\"mt-2 flex items-center justify-center gap-1\">\n\t\t\t\t{Array.from({ length: STAR_COUNT }).map((_, index) => {\n\t\t\t\t\tconst value = index + 1;\n\t\t\t\t\tconst isFilled = displayRating ? value <= displayRating : false;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\taria-label={text(\"component.conversationPage.ratingLabel\", {\n\t\t\t\t\t\t\t\trating: value,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"group inline-flex h-8 w-8 items-center justify-center rounded-md transition-colors\",\n\t\t\t\t\t\t\t\tisInteractive\n\t\t\t\t\t\t\t\t\t? \"hover:bg-co-muted\"\n\t\t\t\t\t\t\t\t\t: \"cursor-default opacity-70\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tdisabled={!isInteractive}\n\t\t\t\t\t\t\tkey={value}\n\t\t\t\t\t\t\tonClick={() => handleRatingSelect(value)}\n\t\t\t\t\t\t\tonMouseEnter={() => isInteractive && setHoveredRating(value)}\n\t\t\t\t\t\t\tonMouseLeave={() => isInteractive && setHoveredRating(null)}\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"h-4 w-4 transition-transform\",\n\t\t\t\t\t\t\t\t\tisFilled ? \"text-co-primary\" : \"text-co-muted-foreground/40\",\n\t\t\t\t\t\t\t\t\tisInteractive &&\n\t\t\t\t\t\t\t\t\t\thoveredRating &&\n\t\t\t\t\t\t\t\t\t\tvalue <= hoveredRating &&\n\t\t\t\t\t\t\t\t\t\t\"scale-110\"\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tname=\"star\"\n\t\t\t\t\t\t\t\tvariant={isFilled ? \"filled\" : \"default\"}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t</div>\n\n\t\t\t{showCommentField && (\n\t\t\t\t<div className=\"mt-3 space-y-2\">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclassName=\"w-full resize-none rounded-md border border-co-border bg-co-background px-3 py-2 text-co-foreground text-sm placeholder:text-co-muted-foreground focus:border-co-primary focus:outline-none focus:ring-1 focus:ring-co-primary\"\n\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\tonChange={(e) => setComment(e.target.value)}\n\t\t\t\t\t\tplaceholder={text(\"component.conversationPage.commentPlaceholder\")}\n\t\t\t\t\t\tref={textareaRef}\n\t\t\t\t\t\trows={3}\n\t\t\t\t\t\tvalue={comment}\n\t\t\t\t\t/>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"w-full rounded-md bg-co-primary px-4 py-2 font-medium text-co-primary-foreground text-sm transition-colors\",\n\t\t\t\t\t\t\tisSubmitting\n\t\t\t\t\t\t\t\t? \"cursor-not-allowed opacity-50\"\n\t\t\t\t\t\t\t\t: \"hover:bg-co-primary/90\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\tonClick={handleSubmit}\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{text(\"component.conversationPage.submitFeedback\")}\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{(isRated || hasSubmitted || !showCommentField) && (\n\t\t\t\t<Text\n\t\t\t\t\tas=\"p\"\n\t\t\t\t\tclassName=\"mt-2 text-co-muted-foreground text-xs\"\n\t\t\t\t\ttextKey=\"component.conversationPage.closedMessage\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;AAcA,MAAM,aAAa;AAEnB,SAAgB,6BAA6B,EAC5C,QACA,QACA,QACA,eAAe,OACf,aACqC;CACrC,MAAM,OAAO,gBAAgB;CAC7B,MAAM,aAAa,WAAW,mBAAmB;CACjD,MAAM,UAAU,UAAU;CAG1B,MAAM,CAAC,gBAAgB,qBAAqB,SAAwB,KAAK;CACzE,MAAM,CAAC,eAAe,oBAAoB,SAAwB,KAAK;CACvE,MAAM,CAAC,SAAS,cAAc,SAAS,GAAG;CAC1C,MAAM,CAAC,cAAc,mBAAmB,SAAS,MAAM;CACvD,MAAM,cAAc,OAA4B,KAAK;CAGrD,MAAM,gBAAgB,kBAAkB,UAAU,SAAS;CAC3D,MAAM,mBAAmB,kBAAkB,QAAQ,CAAC,WAAW,CAAC;CAChE,MAAM,gBACL,QAAQ,OAAO,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC;AAElD,iBAAgB;AACf,MAAI,iBACH,aAAY,SAAS,OAAO;IAE3B,CAAC,iBAAiB,CAAC;CAEtB,MAAM,sBAAsB,UAAkB;AAC7C,MAAI,CAAC,cACJ;AAED,oBAAkB,MAAM;;CAGzB,MAAM,qBAAqB;AAC1B,MAAI,EAAE,kBAAkB,QACvB;AAED,kBAAgB,KAAK;AACrB,SAAO,gBAAgB,QAAQ,MAAM,IAAI,OAAU;;AAGpD,KAAI,CAAC,YAAY;EAChB,MAAM,gBACL,WAAW,mBAAmB,OAC3B,2CACA;AAEJ,SACC,oBAAC;GACA,WAAW,GACV,wHACA,UACA;aAED,oBAAC;IAAK,IAAG;IAAI,SAAS;KAAiB;IAClC;;AAIR,QACC,qBAAC;EACA,WAAW,GACV,0GACA,UACA;;GAED,oBAAC;IACA,IAAG;IACH,WAAU;IACV,SACC,WAAW,eACR,4CACA;KAEH;GACF,oBAAC;IAAI,WAAU;cACb,MAAM,KAAK,EAAE,QAAQ,YAAY,CAAC,CAAC,KAAK,GAAG,UAAU;KACrD,MAAM,QAAQ,QAAQ;KACtB,MAAM,WAAW,gBAAgB,SAAS,gBAAgB;AAE1D,YACC,oBAAC;MACA,cAAY,KAAK,0CAA0C,EAC1D,QAAQ,OACR,CAAC;MACF,WAAW,GACV,sFACA,gBACG,sBACA,4BACH;MACD,UAAU,CAAC;MAEX,eAAe,mBAAmB,MAAM;MACxC,oBAAoB,iBAAiB,iBAAiB,MAAM;MAC5D,oBAAoB,iBAAiB,iBAAiB,KAAK;MAC3D,MAAK;gBAEL,oBAACA;OACA,WAAW,GACV,gCACA,WAAW,oBAAoB,+BAC/B,iBACC,iBACA,SAAS,iBACT,YACD;OACD,MAAK;OACL,SAAS,WAAW,WAAW;QAC9B;QAjBG,MAkBG;MAET;KACG;GAEL,oBACA,qBAAC;IAAI,WAAU;eACd,oBAAC;KACA,WAAU;KACV,UAAU;KACV,WAAW,MAAM,WAAW,EAAE,OAAO,MAAM;KAC3C,aAAa,KAAK,gDAAgD;KAClE,KAAK;KACL,MAAM;KACN,OAAO;MACN,EACF,oBAAC;KACA,WAAW,GACV,8GACA,eACG,kCACA,yBACH;KACD,UAAU;KACV,SAAS;KACT,MAAK;eAEJ,KAAK,4CAA4C;MAC1C;KACJ;IAGL,WAAW,gBAAgB,CAAC,qBAC7B,oBAAC;IACA,IAAG;IACH,WAAU;IACV,SAAQ;KACP;;GAEE"}
@@ -0,0 +1,5 @@
1
+ //#region src/support/components/conversation-timeline-utils.d.ts
2
+ declare function filterSeenByIdsForViewer(seenByIds: readonly string[], viewerId?: string): readonly string[];
3
+ //#endregion
4
+ export { filterSeenByIdsForViewer };
5
+ //# sourceMappingURL=conversation-timeline-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-timeline-utils.d.ts","names":[],"sources":["../../../src/support/components/conversation-timeline-utils.ts"],"sourcesContent":[],"mappings":";iBAAgB,wBAAA"}
@@ -0,0 +1,10 @@
1
+ //#region src/support/components/conversation-timeline-utils.ts
2
+ function filterSeenByIdsForViewer(seenByIds, viewerId) {
3
+ if (!viewerId || seenByIds.length === 0) return seenByIds;
4
+ if (!seenByIds.includes(viewerId)) return seenByIds;
5
+ return seenByIds.filter((id) => id !== viewerId);
6
+ }
7
+
8
+ //#endregion
9
+ export { filterSeenByIdsForViewer };
10
+ //# sourceMappingURL=conversation-timeline-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversation-timeline-utils.js","names":[],"sources":["../../../src/support/components/conversation-timeline-utils.ts"],"sourcesContent":["export function filterSeenByIdsForViewer(\n\tseenByIds: readonly string[],\n\tviewerId?: string\n): readonly string[] {\n\tif (!viewerId || seenByIds.length === 0) {\n\t\treturn seenByIds;\n\t}\n\n\tif (!seenByIds.includes(viewerId)) {\n\t\treturn seenByIds;\n\t}\n\n\treturn seenByIds.filter((id) => id !== viewerId);\n}\n"],"mappings":";AAAA,SAAgB,yBACf,WACA,UACoB;AACpB,KAAI,CAAC,YAAY,UAAU,WAAW,EACrC,QAAO;AAGR,KAAI,CAAC,UAAU,SAAS,SAAS,CAChC,QAAO;AAGR,QAAO,UAAU,QAAQ,OAAO,OAAO,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-timeline.d.ts","names":[],"sources":["../../../src/support/components/conversation-timeline.tsx"],"sourcesContent":[],"mappings":";;;;;;KAyCY,6BAAA;QACL;EADK,cAAA,EAAA,MAAA;AAKZ,CAAA;AAIY,KAJA,kCAAA,GAMX;EAGW,SAAA,EARA,KAAA,CAAM,aAQmB,CARL,6BAQK,CAAA;CAE7B;AAEY,KATR,yBAAA,GAA4B,MASpB,CAAA,MAAA,EAPnB,kCAOmB,CAAA;AACG,KALX,yBAAA,GAKW;EAEd,cAAA,EAAA,MAAA;EAED,KAAA,EAPA,YAOA,EAAA;EACa,SAAA,CAAA,EAAA,MAAA;EACd,iBAAM,EAPO,gBAOP,EAAA;EAAS,oBAAA,EANC,mBAMD,EAAA;EAGT,gBAAA,CAAA,EAAA,MAAA;UAPJ;;UAED;uBACa;QACd,KAAA,CAAM;;cAGA,0BAA0B,KAAA,CAAM,GAAG"}
1
+ {"version":3,"file":"conversation-timeline.d.ts","names":[],"sources":["../../../src/support/components/conversation-timeline.tsx"],"sourcesContent":[],"mappings":";;;;;;KA0CY,6BAAA;QACL;EADK,cAAA,EAAA,MAAA;AAKZ,CAAA;AAIY,KAJA,kCAAA,GAMX;EAGW,SAAA,EARA,KAAA,CAAM,aAQmB,CARL,6BAQK,CAAA;CAE7B;AAEY,KATR,yBAAA,GAA4B,MASpB,CAAA,MAAA,EAPnB,kCAOmB,CAAA;AACG,KALX,yBAAA,GAKW;EAEd,cAAA,EAAA,MAAA;EAED,KAAA,EAPA,YAOA,EAAA;EACa,SAAA,CAAA,EAAA,MAAA;EACd,iBAAM,EAPO,gBAOP,EAAA;EAAS,oBAAA,EANC,mBAMD,EAAA;EAGT,gBAAA,CAAA,EAAA,MAAA;UAPJ;;UAED;uBACa;QACd,KAAA,CAAM;;cAGA,0BAA0B,KAAA,CAAM,GAAG"}
@@ -5,6 +5,7 @@ import { DaySeparator, DaySeparatorLabel, DaySeparatorLine, defaultFormatDate }
5
5
  import { useTypingSound } from "../../hooks/use-typing-sound.js";
6
6
  import { useConversationTimeline } from "../../hooks/use-conversation-timeline.js";
7
7
  import { ConversationEvent } from "./conversation-event.js";
8
+ import { filterSeenByIdsForViewer } from "./conversation-timeline-utils.js";
8
9
  import { TimelineMessageGroup } from "./timeline-message-group.js";
9
10
  import { useCallback, useMemo } from "react";
10
11
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -97,7 +98,7 @@ const ConversationTimelineList = ({ conversationId, items: timelineItems, classN
97
98
  item: item.item
98
99
  }, toolKey);
99
100
  }
100
- const seenByIds = index === timeline.lastVisitorMessageGroupIndex && item.lastMessageId ? timeline.groupedMessages.getMessageSeenBy(item.lastMessageId) : EMPTY_SEEN_BY_IDS;
101
+ const seenByIds = filterSeenByIdsForViewer(index === timeline.lastVisitorMessageGroupIndex && item.lastMessageId ? timeline.groupedMessages.getMessageSeenBy(item.lastMessageId) : EMPTY_SEEN_BY_IDS, currentVisitorId);
101
102
  const seenByNames = seenByIds.length > 0 ? getSeenByNames(seenByIds) : EMPTY_SEEN_BY_NAMES;
102
103
  const groupKey = item.lastMessageId ?? item.items?.[0]?.id ?? `group-${item.items?.[0]?.createdAt ?? index}`;
103
104
  return /* @__PURE__ */ jsx(TimelineMessageGroup, {
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-timeline.js","names":["EMPTY_SEEN_BY_IDS: readonly string[]","EMPTY_SEEN_BY_NAMES: readonly string[]","ConversationTimelineList: React.FC<ConversationTimelineProps>","names: string[]","PrimitiveConversationTimeline"],"sources":["../../../src/support/components/conversation-timeline.tsx"],"sourcesContent":["import type { AvailableAIAgent, AvailableHumanAgent } from \"@cossistant/types\";\nimport type {\n\tTimelineItem,\n\tTimelinePartEvent,\n} from \"@cossistant/types/api/timeline-item\";\nimport type React from \"react\";\nimport { useCallback, useMemo } from \"react\";\nimport type { DaySeparatorItem } from \"../../hooks/private/use-grouped-messages\";\nimport { useConversationTimeline } from \"../../hooks/use-conversation-timeline\";\nimport { useTypingSound } from \"../../hooks/use-typing-sound\";\nimport {\n\tConversationTimelineContainer,\n\tConversationTimeline as PrimitiveConversationTimeline,\n} from \"../../primitives/conversation-timeline\";\nimport {\n\tDaySeparator,\n\tDaySeparatorLabel,\n\tDaySeparatorLine,\n\tdefaultFormatDate,\n} from \"../../primitives/day-separator\";\nimport { cn } from \"../utils\";\nimport { ConversationEvent } from \"./conversation-event\";\nimport { TimelineMessageGroup } from \"./timeline-message-group\";\nimport { TypingIndicator, type TypingParticipant } from \"./typing-indicator\";\n\n// Helper to extract event part from timeline item\nfunction extractEventPart(item: TimelineItem): TimelinePartEvent | null {\n\tif (item.type !== \"event\") {\n\t\treturn null;\n\t}\n\n\tconst eventPart = item.parts.find(\n\t\t(part): part is TimelinePartEvent => part.type === \"event\"\n\t);\n\n\treturn eventPart || null;\n}\n\nconst EMPTY_SEEN_BY_IDS: readonly string[] = Object.freeze([]);\nconst EMPTY_SEEN_BY_NAMES: readonly string[] = Object.freeze([]);\n\nexport type ConversationTimelineToolProps = {\n\titem: TimelineItem;\n\tconversationId: string;\n};\n\nexport type ConversationTimelineToolDefinition = {\n\tcomponent: React.ComponentType<ConversationTimelineToolProps>;\n};\n\nexport type ConversationTimelineTools = Record<\n\tstring,\n\tConversationTimelineToolDefinition\n>;\n\nexport type ConversationTimelineProps = {\n\tconversationId: string;\n\titems: TimelineItem[];\n\tclassName?: string;\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcurrentVisitorId?: string;\n\ttools?: ConversationTimelineTools;\n\trenderDaySeparator?: (props: {\n\t\titem: DaySeparatorItem;\n\t\tformatDate: (date: Date) => string;\n\t}) => React.ReactNode;\n};\n\nexport const ConversationTimelineList: React.FC<ConversationTimelineProps> = ({\n\tconversationId,\n\titems: timelineItems,\n\tclassName,\n\tavailableAIAgents = [],\n\tavailableHumanAgents = [],\n\tcurrentVisitorId,\n\ttools,\n\trenderDaySeparator,\n}) => {\n\tconst timeline = useConversationTimeline({\n\t\tconversationId,\n\t\titems: timelineItems,\n\t\tcurrentVisitorId,\n\t});\n\n\tconst typingIndicatorParticipants = useMemo(\n\t\t() =>\n\t\t\ttimeline.typingParticipants.map<TypingParticipant>((participant) => ({\n\t\t\t\tid: participant.id,\n\t\t\t\ttype: participant.type,\n\t\t\t})),\n\t\t[timeline.typingParticipants]\n\t);\n\n\t// Play typing sound when someone is typing\n\tuseTypingSound(typingIndicatorParticipants.length > 0, {\n\t\tvolume: 1,\n\t\tplaybackRate: 1.3,\n\t});\n\n\tconst seenNameLookup = useMemo(() => {\n\t\tconst map = new Map<string, string>();\n\n\t\tfor (const agent of availableHumanAgents) {\n\t\t\tif (agent.name) {\n\t\t\t\tmap.set(agent.id, agent.name);\n\t\t\t}\n\t\t}\n\n\t\tfor (const agent of availableAIAgents) {\n\t\t\tif (agent.name) {\n\t\t\t\tmap.set(agent.id, agent.name);\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}, [availableHumanAgents, availableAIAgents]);\n\n\tconst getSeenByNames = useCallback(\n\t\t(ids: readonly string[] = EMPTY_SEEN_BY_IDS): readonly string[] => {\n\t\t\tif (ids.length === 0 || seenNameLookup.size === 0) {\n\t\t\t\treturn EMPTY_SEEN_BY_NAMES;\n\t\t\t}\n\n\t\t\tconst uniqueNames = new Set<string>();\n\t\t\tconst names: string[] = [];\n\n\t\t\tfor (const id of ids) {\n\t\t\t\tconst name = seenNameLookup.get(id);\n\t\t\t\tif (!name || uniqueNames.has(name)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tuniqueNames.add(name);\n\t\t\t\tnames.push(name);\n\t\t\t}\n\n\t\t\tif (names.length === 0) {\n\t\t\t\treturn EMPTY_SEEN_BY_NAMES;\n\t\t\t}\n\n\t\t\treturn Object.freeze(names);\n\t\t},\n\t\t[seenNameLookup]\n\t);\n\n\treturn (\n\t\t<PrimitiveConversationTimeline\n\t\t\tautoScroll={true}\n\t\t\tclassName={cn(\n\t\t\t\t\"overflow-y-scroll px-3 py-6\",\n\t\t\t\t\"co-scrollbar-thin\",\n\t\t\t\t\"h-full w-full\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tid=\"conversation-timeline\"\n\t\t\titems={timelineItems}\n\t\t>\n\t\t\t<ConversationTimelineContainer className=\"flex min-h-full w-full flex-col gap-5\">\n\t\t\t\t{timeline.groupedMessages.items.map((item, index) => {\n\t\t\t\t\tif (item.type === \"day_separator\") {\n\t\t\t\t\t\t// Render day separator - allow custom rendering via prop\n\t\t\t\t\t\tif (renderDaySeparator) {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div key={`day-separator-${item.dateString}`}>\n\t\t\t\t\t\t\t\t\t{renderDaySeparator({\n\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\tformatDate: defaultFormatDate,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Default day separator using the primitive\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<DaySeparator\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-center py-2\"\n\t\t\t\t\t\t\t\tdate={item.date}\n\t\t\t\t\t\t\t\tdateString={item.dateString}\n\t\t\t\t\t\t\t\tkey={`day-separator-${item.dateString}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{({ formattedDate }) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLine className=\"flex-1 border-gray-300/20 border-t dark:border-gray-600/20\" />\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLabel\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-3 text-gray-400/50 text-xs dark:text-gray-500/50\"\n\t\t\t\t\t\t\t\t\t\t\tformattedDate={formattedDate}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLine className=\"flex-1 border-gray-300/20 border-t dark:border-gray-600/20\" />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</DaySeparator>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (item.type === \"timeline_event\") {\n\t\t\t\t\t\t// Extract event data from parts\n\t\t\t\t\t\tconst eventPart = extractEventPart(item.item);\n\n\t\t\t\t\t\t// Only render if we have valid event data\n\t\t\t\t\t\tif (!eventPart) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ConversationEvent\n\t\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\t\tcreatedAt={item.item.createdAt}\n\t\t\t\t\t\t\t\tevent={eventPart}\n\t\t\t\t\t\t\t\tkey={item.item.id ?? `timeline-event-${item.item.createdAt}`}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (item.type === \"timeline_tool\") {\n\t\t\t\t\t\tconst toolName = item.tool ?? item.item.tool ?? item.item.type;\n\t\t\t\t\t\tconst toolDefinition = toolName ? tools?.[toolName] : undefined;\n\n\t\t\t\t\t\tif (!toolDefinition) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst ToolComponent = toolDefinition.component;\n\n\t\t\t\t\t\tconst toolKey =\n\t\t\t\t\t\t\titem.item.id ?? `${toolName}-${item.item.createdAt}-${index}`;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ToolComponent\n\t\t\t\t\t\t\t\tconversationId={conversationId}\n\t\t\t\t\t\t\t\titem={item.item}\n\t\t\t\t\t\t\t\tkey={toolKey}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only show seen indicator on the LAST message group sent by the visitor\n\t\t\t\t\tconst isLastVisitorGroup =\n\t\t\t\t\t\tindex === timeline.lastVisitorMessageGroupIndex;\n\t\t\t\t\tconst seenByIds =\n\t\t\t\t\t\tisLastVisitorGroup && item.lastMessageId\n\t\t\t\t\t\t\t? timeline.groupedMessages.getMessageSeenBy(item.lastMessageId)\n\t\t\t\t\t\t\t: EMPTY_SEEN_BY_IDS;\n\t\t\t\t\tconst seenByNames =\n\t\t\t\t\t\tseenByIds.length > 0\n\t\t\t\t\t\t\t? getSeenByNames(seenByIds)\n\t\t\t\t\t\t\t: EMPTY_SEEN_BY_NAMES;\n\n\t\t\t\t\t// Use first timeline item ID as stable key\n\t\t\t\t\tconst groupKey =\n\t\t\t\t\t\titem.lastMessageId ??\n\t\t\t\t\t\titem.items?.[0]?.id ??\n\t\t\t\t\t\t`group-${item.items?.[0]?.createdAt ?? index}`;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<TimelineMessageGroup\n\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tcurrentVisitorId={currentVisitorId}\n\t\t\t\t\t\t\titems={item.items || []}\n\t\t\t\t\t\t\tkey={groupKey}\n\t\t\t\t\t\t\tseenByIds={seenByIds}\n\t\t\t\t\t\t\tseenByNames={seenByNames}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t<div className=\"h-6 w-full\">\n\t\t\t\t\t{typingIndicatorParticipants.length > 0 ? (\n\t\t\t\t\t\t<TypingIndicator\n\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\t\t\tparticipants={typingIndicatorParticipants}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</ConversationTimelineContainer>\n\t\t</PrimitiveConversationTimeline>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;AA0BA,SAAS,iBAAiB,MAA8C;AACvE,KAAI,KAAK,SAAS,QACjB,QAAO;AAOR,QAJkB,KAAK,MAAM,MAC3B,SAAoC,KAAK,SAAS,QACnD,IAEmB;;AAGrB,MAAMA,oBAAuC,OAAO,OAAO,EAAE,CAAC;AAC9D,MAAMC,sBAAyC,OAAO,OAAO,EAAE,CAAC;AA8BhE,MAAaC,4BAAiE,EAC7E,gBACA,OAAO,eACP,WACA,oBAAoB,EAAE,EACtB,uBAAuB,EAAE,EACzB,kBACA,OACA,yBACK;CACL,MAAM,WAAW,wBAAwB;EACxC;EACA,OAAO;EACP;EACA,CAAC;CAEF,MAAM,8BAA8B,cAElC,SAAS,mBAAmB,KAAwB,iBAAiB;EACpE,IAAI,YAAY;EAChB,MAAM,YAAY;EAClB,EAAE,EACJ,CAAC,SAAS,mBAAmB,CAC7B;AAGD,gBAAe,4BAA4B,SAAS,GAAG;EACtD,QAAQ;EACR,cAAc;EACd,CAAC;CAEF,MAAM,iBAAiB,cAAc;EACpC,MAAM,sBAAM,IAAI,KAAqB;AAErC,OAAK,MAAM,SAAS,qBACnB,KAAI,MAAM,KACT,KAAI,IAAI,MAAM,IAAI,MAAM,KAAK;AAI/B,OAAK,MAAM,SAAS,kBACnB,KAAI,MAAM,KACT,KAAI,IAAI,MAAM,IAAI,MAAM,KAAK;AAI/B,SAAO;IACL,CAAC,sBAAsB,kBAAkB,CAAC;CAE7C,MAAM,iBAAiB,aACrB,MAAyB,sBAAyC;AAClE,MAAI,IAAI,WAAW,KAAK,eAAe,SAAS,EAC/C,QAAO;EAGR,MAAM,8BAAc,IAAI,KAAa;EACrC,MAAMC,QAAkB,EAAE;AAE1B,OAAK,MAAM,MAAM,KAAK;GACrB,MAAM,OAAO,eAAe,IAAI,GAAG;AACnC,OAAI,CAAC,QAAQ,YAAY,IAAI,KAAK,CACjC;AAGD,eAAY,IAAI,KAAK;AACrB,SAAM,KAAK,KAAK;;AAGjB,MAAI,MAAM,WAAW,EACpB,QAAO;AAGR,SAAO,OAAO,OAAO,MAAM;IAE5B,CAAC,eAAe,CAChB;AAED,QACC,oBAACC;EACA,YAAY;EACZ,WAAW,GACV,+BACA,qBACA,iBACA,UACA;EACD,IAAG;EACH,OAAO;YAEP,qBAAC;GAA8B,WAAU;cACvC,SAAS,gBAAgB,MAAM,KAAK,MAAM,UAAU;AACpD,QAAI,KAAK,SAAS,iBAAiB;AAElC,SAAI,mBACH,QACC,oBAAC,mBACC,mBAAmB;MACnB;MACA,YAAY;MACZ,CAAC,IAJO,iBAAiB,KAAK,aAK1B;AAKR,YACC,oBAAC;MACA,WAAU;MACV,MAAM,KAAK;MACX,YAAY,KAAK;iBAGf,EAAE,oBACH;OACC,oBAAC,oBAAiB,WAAU,+DAA+D;OAC3F,oBAAC;QACA,WAAU;QACK;SACd;OACF,oBAAC,oBAAiB,WAAU,+DAA+D;UACzF;QAVC,iBAAiB,KAAK,aAYb;;AAIjB,QAAI,KAAK,SAAS,kBAAkB;KAEnC,MAAM,YAAY,iBAAiB,KAAK,KAAK;AAG7C,SAAI,CAAC,UACJ,QAAO;AAGR,YACC,oBAAC;MACmB;MACG;MACtB,WAAW,KAAK,KAAK;MACrB,OAAO;QACF,KAAK,KAAK,MAAM,kBAAkB,KAAK,KAAK,YAChD;;AAIJ,QAAI,KAAK,SAAS,iBAAiB;KAClC,MAAM,WAAW,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAK;KAC1D,MAAM,iBAAiB,WAAW,QAAQ,YAAY;AAEtD,SAAI,CAAC,eACJ,QAAO;KAGR,MAAM,gBAAgB,eAAe;KAErC,MAAM,UACL,KAAK,KAAK,MAAM,GAAG,SAAS,GAAG,KAAK,KAAK,UAAU,GAAG;AAEvD,YACC,oBAAC;MACgB;MAChB,MAAM,KAAK;QACN,QACJ;;IAOJ,MAAM,YADL,UAAU,SAAS,gCAEG,KAAK,gBACxB,SAAS,gBAAgB,iBAAiB,KAAK,cAAc,GAC7D;IACJ,MAAM,cACL,UAAU,SAAS,IAChB,eAAe,UAAU,GACzB;IAGJ,MAAM,WACL,KAAK,iBACL,KAAK,QAAQ,IAAI,MACjB,SAAS,KAAK,QAAQ,IAAI,aAAa;AAExC,WACC,oBAAC;KACmB;KACG;KACJ;KAClB,OAAO,KAAK,SAAS,EAAE;KAEZ;KACE;OAFR,SAGJ;KAEF,EACF,oBAAC;IAAI,WAAU;cACb,4BAA4B,SAAS,IACrC,oBAAC;KACmB;KACG;KACtB,WAAU;KACV,cAAc;MACb,GACC;KACC;IACyB;GACD"}
1
+ {"version":3,"file":"conversation-timeline.js","names":["EMPTY_SEEN_BY_IDS: readonly string[]","EMPTY_SEEN_BY_NAMES: readonly string[]","ConversationTimelineList: React.FC<ConversationTimelineProps>","names: string[]","PrimitiveConversationTimeline"],"sources":["../../../src/support/components/conversation-timeline.tsx"],"sourcesContent":["import type { AvailableAIAgent, AvailableHumanAgent } from \"@cossistant/types\";\nimport type {\n\tTimelineItem,\n\tTimelinePartEvent,\n} from \"@cossistant/types/api/timeline-item\";\nimport type React from \"react\";\nimport { useCallback, useMemo } from \"react\";\nimport type { DaySeparatorItem } from \"../../hooks/private/use-grouped-messages\";\nimport { useConversationTimeline } from \"../../hooks/use-conversation-timeline\";\nimport { useTypingSound } from \"../../hooks/use-typing-sound\";\nimport {\n\tConversationTimelineContainer,\n\tConversationTimeline as PrimitiveConversationTimeline,\n} from \"../../primitives/conversation-timeline\";\nimport {\n\tDaySeparator,\n\tDaySeparatorLabel,\n\tDaySeparatorLine,\n\tdefaultFormatDate,\n} from \"../../primitives/day-separator\";\nimport { cn } from \"../utils\";\nimport { ConversationEvent } from \"./conversation-event\";\nimport { filterSeenByIdsForViewer } from \"./conversation-timeline-utils\";\nimport { TimelineMessageGroup } from \"./timeline-message-group\";\nimport { TypingIndicator, type TypingParticipant } from \"./typing-indicator\";\n\n// Helper to extract event part from timeline item\nfunction extractEventPart(item: TimelineItem): TimelinePartEvent | null {\n\tif (item.type !== \"event\") {\n\t\treturn null;\n\t}\n\n\tconst eventPart = item.parts.find(\n\t\t(part): part is TimelinePartEvent => part.type === \"event\"\n\t);\n\n\treturn eventPart || null;\n}\n\nconst EMPTY_SEEN_BY_IDS: readonly string[] = Object.freeze([]);\nconst EMPTY_SEEN_BY_NAMES: readonly string[] = Object.freeze([]);\n\nexport type ConversationTimelineToolProps = {\n\titem: TimelineItem;\n\tconversationId: string;\n};\n\nexport type ConversationTimelineToolDefinition = {\n\tcomponent: React.ComponentType<ConversationTimelineToolProps>;\n};\n\nexport type ConversationTimelineTools = Record<\n\tstring,\n\tConversationTimelineToolDefinition\n>;\n\nexport type ConversationTimelineProps = {\n\tconversationId: string;\n\titems: TimelineItem[];\n\tclassName?: string;\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcurrentVisitorId?: string;\n\ttools?: ConversationTimelineTools;\n\trenderDaySeparator?: (props: {\n\t\titem: DaySeparatorItem;\n\t\tformatDate: (date: Date) => string;\n\t}) => React.ReactNode;\n};\n\nexport const ConversationTimelineList: React.FC<ConversationTimelineProps> = ({\n\tconversationId,\n\titems: timelineItems,\n\tclassName,\n\tavailableAIAgents = [],\n\tavailableHumanAgents = [],\n\tcurrentVisitorId,\n\ttools,\n\trenderDaySeparator,\n}) => {\n\tconst timeline = useConversationTimeline({\n\t\tconversationId,\n\t\titems: timelineItems,\n\t\tcurrentVisitorId,\n\t});\n\n\tconst typingIndicatorParticipants = useMemo(\n\t\t() =>\n\t\t\ttimeline.typingParticipants.map<TypingParticipant>((participant) => ({\n\t\t\t\tid: participant.id,\n\t\t\t\ttype: participant.type,\n\t\t\t})),\n\t\t[timeline.typingParticipants]\n\t);\n\n\t// Play typing sound when someone is typing\n\tuseTypingSound(typingIndicatorParticipants.length > 0, {\n\t\tvolume: 1,\n\t\tplaybackRate: 1.3,\n\t});\n\n\tconst seenNameLookup = useMemo(() => {\n\t\tconst map = new Map<string, string>();\n\n\t\tfor (const agent of availableHumanAgents) {\n\t\t\tif (agent.name) {\n\t\t\t\tmap.set(agent.id, agent.name);\n\t\t\t}\n\t\t}\n\n\t\tfor (const agent of availableAIAgents) {\n\t\t\tif (agent.name) {\n\t\t\t\tmap.set(agent.id, agent.name);\n\t\t\t}\n\t\t}\n\n\t\treturn map;\n\t}, [availableHumanAgents, availableAIAgents]);\n\n\tconst getSeenByNames = useCallback(\n\t\t(ids: readonly string[] = EMPTY_SEEN_BY_IDS): readonly string[] => {\n\t\t\tif (ids.length === 0 || seenNameLookup.size === 0) {\n\t\t\t\treturn EMPTY_SEEN_BY_NAMES;\n\t\t\t}\n\n\t\t\tconst uniqueNames = new Set<string>();\n\t\t\tconst names: string[] = [];\n\n\t\t\tfor (const id of ids) {\n\t\t\t\tconst name = seenNameLookup.get(id);\n\t\t\t\tif (!name || uniqueNames.has(name)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tuniqueNames.add(name);\n\t\t\t\tnames.push(name);\n\t\t\t}\n\n\t\t\tif (names.length === 0) {\n\t\t\t\treturn EMPTY_SEEN_BY_NAMES;\n\t\t\t}\n\n\t\t\treturn Object.freeze(names);\n\t\t},\n\t\t[seenNameLookup]\n\t);\n\n\treturn (\n\t\t<PrimitiveConversationTimeline\n\t\t\tautoScroll={true}\n\t\t\tclassName={cn(\n\t\t\t\t\"overflow-y-scroll px-3 py-6\",\n\t\t\t\t\"co-scrollbar-thin\",\n\t\t\t\t\"h-full w-full\",\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tid=\"conversation-timeline\"\n\t\t\titems={timelineItems}\n\t\t>\n\t\t\t<ConversationTimelineContainer className=\"flex min-h-full w-full flex-col gap-5\">\n\t\t\t\t{timeline.groupedMessages.items.map((item, index) => {\n\t\t\t\t\tif (item.type === \"day_separator\") {\n\t\t\t\t\t\t// Render day separator - allow custom rendering via prop\n\t\t\t\t\t\tif (renderDaySeparator) {\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<div key={`day-separator-${item.dateString}`}>\n\t\t\t\t\t\t\t\t\t{renderDaySeparator({\n\t\t\t\t\t\t\t\t\t\titem,\n\t\t\t\t\t\t\t\t\t\tformatDate: defaultFormatDate,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Default day separator using the primitive\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<DaySeparator\n\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-center py-2\"\n\t\t\t\t\t\t\t\tdate={item.date}\n\t\t\t\t\t\t\t\tdateString={item.dateString}\n\t\t\t\t\t\t\t\tkey={`day-separator-${item.dateString}`}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{({ formattedDate }) => (\n\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLine className=\"flex-1 border-gray-300/20 border-t dark:border-gray-600/20\" />\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLabel\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-3 text-gray-400/50 text-xs dark:text-gray-500/50\"\n\t\t\t\t\t\t\t\t\t\t\tformattedDate={formattedDate}\n\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t<DaySeparatorLine className=\"flex-1 border-gray-300/20 border-t dark:border-gray-600/20\" />\n\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t</DaySeparator>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (item.type === \"timeline_event\") {\n\t\t\t\t\t\t// Extract event data from parts\n\t\t\t\t\t\tconst eventPart = extractEventPart(item.item);\n\n\t\t\t\t\t\t// Only render if we have valid event data\n\t\t\t\t\t\tif (!eventPart) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ConversationEvent\n\t\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\t\tcreatedAt={item.item.createdAt}\n\t\t\t\t\t\t\t\tevent={eventPart}\n\t\t\t\t\t\t\t\tkey={item.item.id ?? `timeline-event-${item.item.createdAt}`}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (item.type === \"timeline_tool\") {\n\t\t\t\t\t\tconst toolName = item.tool ?? item.item.tool ?? item.item.type;\n\t\t\t\t\t\tconst toolDefinition = toolName ? tools?.[toolName] : undefined;\n\n\t\t\t\t\t\tif (!toolDefinition) {\n\t\t\t\t\t\t\treturn null;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tconst ToolComponent = toolDefinition.component;\n\n\t\t\t\t\t\tconst toolKey =\n\t\t\t\t\t\t\titem.item.id ?? `${toolName}-${item.item.createdAt}-${index}`;\n\n\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t<ToolComponent\n\t\t\t\t\t\t\t\tconversationId={conversationId}\n\t\t\t\t\t\t\t\titem={item.item}\n\t\t\t\t\t\t\t\tkey={toolKey}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t// Only show seen indicator on the LAST message group sent by the visitor\n\t\t\t\t\tconst isLastVisitorGroup =\n\t\t\t\t\t\tindex === timeline.lastVisitorMessageGroupIndex;\n\t\t\t\t\tconst rawSeenByIds =\n\t\t\t\t\t\tisLastVisitorGroup && item.lastMessageId\n\t\t\t\t\t\t\t? timeline.groupedMessages.getMessageSeenBy(item.lastMessageId)\n\t\t\t\t\t\t\t: EMPTY_SEEN_BY_IDS;\n\t\t\t\t\tconst seenByIds = filterSeenByIdsForViewer(\n\t\t\t\t\t\trawSeenByIds,\n\t\t\t\t\t\tcurrentVisitorId\n\t\t\t\t\t);\n\t\t\t\t\tconst seenByNames =\n\t\t\t\t\t\tseenByIds.length > 0\n\t\t\t\t\t\t\t? getSeenByNames(seenByIds)\n\t\t\t\t\t\t\t: EMPTY_SEEN_BY_NAMES;\n\n\t\t\t\t\t// Use first timeline item ID as stable key\n\t\t\t\t\tconst groupKey =\n\t\t\t\t\t\titem.lastMessageId ??\n\t\t\t\t\t\titem.items?.[0]?.id ??\n\t\t\t\t\t\t`group-${item.items?.[0]?.createdAt ?? index}`;\n\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<TimelineMessageGroup\n\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tcurrentVisitorId={currentVisitorId}\n\t\t\t\t\t\t\titems={item.items || []}\n\t\t\t\t\t\t\tkey={groupKey}\n\t\t\t\t\t\t\tseenByIds={seenByIds}\n\t\t\t\t\t\t\tseenByNames={seenByNames}\n\t\t\t\t\t\t/>\n\t\t\t\t\t);\n\t\t\t\t})}\n\t\t\t\t<div className=\"h-6 w-full\">\n\t\t\t\t\t{typingIndicatorParticipants.length > 0 ? (\n\t\t\t\t\t\t<TypingIndicator\n\t\t\t\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tclassName=\"mt-2\"\n\t\t\t\t\t\t\tparticipants={typingIndicatorParticipants}\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t</ConversationTimelineContainer>\n\t\t</PrimitiveConversationTimeline>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;AA2BA,SAAS,iBAAiB,MAA8C;AACvE,KAAI,KAAK,SAAS,QACjB,QAAO;AAOR,QAJkB,KAAK,MAAM,MAC3B,SAAoC,KAAK,SAAS,QACnD,IAEmB;;AAGrB,MAAMA,oBAAuC,OAAO,OAAO,EAAE,CAAC;AAC9D,MAAMC,sBAAyC,OAAO,OAAO,EAAE,CAAC;AA8BhE,MAAaC,4BAAiE,EAC7E,gBACA,OAAO,eACP,WACA,oBAAoB,EAAE,EACtB,uBAAuB,EAAE,EACzB,kBACA,OACA,yBACK;CACL,MAAM,WAAW,wBAAwB;EACxC;EACA,OAAO;EACP;EACA,CAAC;CAEF,MAAM,8BAA8B,cAElC,SAAS,mBAAmB,KAAwB,iBAAiB;EACpE,IAAI,YAAY;EAChB,MAAM,YAAY;EAClB,EAAE,EACJ,CAAC,SAAS,mBAAmB,CAC7B;AAGD,gBAAe,4BAA4B,SAAS,GAAG;EACtD,QAAQ;EACR,cAAc;EACd,CAAC;CAEF,MAAM,iBAAiB,cAAc;EACpC,MAAM,sBAAM,IAAI,KAAqB;AAErC,OAAK,MAAM,SAAS,qBACnB,KAAI,MAAM,KACT,KAAI,IAAI,MAAM,IAAI,MAAM,KAAK;AAI/B,OAAK,MAAM,SAAS,kBACnB,KAAI,MAAM,KACT,KAAI,IAAI,MAAM,IAAI,MAAM,KAAK;AAI/B,SAAO;IACL,CAAC,sBAAsB,kBAAkB,CAAC;CAE7C,MAAM,iBAAiB,aACrB,MAAyB,sBAAyC;AAClE,MAAI,IAAI,WAAW,KAAK,eAAe,SAAS,EAC/C,QAAO;EAGR,MAAM,8BAAc,IAAI,KAAa;EACrC,MAAMC,QAAkB,EAAE;AAE1B,OAAK,MAAM,MAAM,KAAK;GACrB,MAAM,OAAO,eAAe,IAAI,GAAG;AACnC,OAAI,CAAC,QAAQ,YAAY,IAAI,KAAK,CACjC;AAGD,eAAY,IAAI,KAAK;AACrB,SAAM,KAAK,KAAK;;AAGjB,MAAI,MAAM,WAAW,EACpB,QAAO;AAGR,SAAO,OAAO,OAAO,MAAM;IAE5B,CAAC,eAAe,CAChB;AAED,QACC,oBAACC;EACA,YAAY;EACZ,WAAW,GACV,+BACA,qBACA,iBACA,UACA;EACD,IAAG;EACH,OAAO;YAEP,qBAAC;GAA8B,WAAU;cACvC,SAAS,gBAAgB,MAAM,KAAK,MAAM,UAAU;AACpD,QAAI,KAAK,SAAS,iBAAiB;AAElC,SAAI,mBACH,QACC,oBAAC,mBACC,mBAAmB;MACnB;MACA,YAAY;MACZ,CAAC,IAJO,iBAAiB,KAAK,aAK1B;AAKR,YACC,oBAAC;MACA,WAAU;MACV,MAAM,KAAK;MACX,YAAY,KAAK;iBAGf,EAAE,oBACH;OACC,oBAAC,oBAAiB,WAAU,+DAA+D;OAC3F,oBAAC;QACA,WAAU;QACK;SACd;OACF,oBAAC,oBAAiB,WAAU,+DAA+D;UACzF;QAVC,iBAAiB,KAAK,aAYb;;AAIjB,QAAI,KAAK,SAAS,kBAAkB;KAEnC,MAAM,YAAY,iBAAiB,KAAK,KAAK;AAG7C,SAAI,CAAC,UACJ,QAAO;AAGR,YACC,oBAAC;MACmB;MACG;MACtB,WAAW,KAAK,KAAK;MACrB,OAAO;QACF,KAAK,KAAK,MAAM,kBAAkB,KAAK,KAAK,YAChD;;AAIJ,QAAI,KAAK,SAAS,iBAAiB;KAClC,MAAM,WAAW,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAK;KAC1D,MAAM,iBAAiB,WAAW,QAAQ,YAAY;AAEtD,SAAI,CAAC,eACJ,QAAO;KAGR,MAAM,gBAAgB,eAAe;KAErC,MAAM,UACL,KAAK,KAAK,MAAM,GAAG,SAAS,GAAG,KAAK,KAAK,UAAU,GAAG;AAEvD,YACC,oBAAC;MACgB;MAChB,MAAM,KAAK;QACN,QACJ;;IAWJ,MAAM,YAAY,yBALjB,UAAU,SAAS,gCAEG,KAAK,gBACxB,SAAS,gBAAgB,iBAAiB,KAAK,cAAc,GAC7D,mBAGH,iBACA;IACD,MAAM,cACL,UAAU,SAAS,IAChB,eAAe,UAAU,GACzB;IAGJ,MAAM,WACL,KAAK,iBACL,KAAK,QAAQ,IAAI,MACjB,SAAS,KAAK,QAAQ,IAAI,aAAa;AAExC,WACC,oBAAC;KACmB;KACG;KACJ;KAClB,OAAO,KAAK,SAAS,EAAE;KAEZ;KACE;OAFR,SAGJ;KAEF,EACF,oBAAC;IAAI,WAAU;cACb,4BAA4B,SAAS,IACrC,oBAAC;KACmB;KACG;KACtB,WAAU;KACV,cAAc;MACb,GACC;KACC;IACyB;GACD"}
@@ -2,7 +2,7 @@ import React from "react";
2
2
 
3
3
  //#region src/support/components/icons.d.ts
4
4
  type IconVariant = "default" | "filled";
5
- type IconName = "sidebar" | "check" | "x" | "clipboard" | "send" | "chevron-down" | "arrow-left" | "arrow-right" | "arrow-up-right" | "attachment" | "file" | "close" | "home" | "articles" | "chat";
5
+ type IconName = "sidebar" | "check" | "x" | "clipboard" | "send" | "chevron-down" | "arrow-left" | "arrow-right" | "arrow-up-right" | "attachment" | "file" | "close" | "home" | "articles" | "chat" | "star";
6
6
  type IconProps = {
7
7
  name: IconName;
8
8
  variant?: IconVariant;
@@ -1 +1 @@
1
- {"version":3,"file":"icons.d.ts","names":[],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":[],"mappings":";;;KAGY,WAAA;KAEA,QAAA;AAFA,KAmBA,SAAA,GAnBW;EAEX,IAAA,EAkBL,QAlBa;EAiBR,OAAA,CAAA,EAED,WAFU;EA+FR,SAmGZ,CAAA,EAAA,MAAA;EAEW,aAAA,CAAA,EAAA,OAAkB;;cArGjB,MAAM,KAAA,CAAM,GAAG;KAqGhB,kBAAA"}
1
+ {"version":3,"file":"icons.d.ts","names":[],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":[],"mappings":";;;KAGY,WAAA;KAEA,QAAA;AAFA,KAoBA,SAAA,GApBW;EAEX,IAAA,EAmBL,QAnBa;EAkBR,OAAA,CAAA,EAED,WAFU;EAqGR,SAmGZ,CAAA,EAAA,MAAA;EAEW,aAAA,CAAA,EAAA,OAAkB;;cArGjB,MAAM,KAAA,CAAM,GAAG;KAqGhB,kBAAA"}
@@ -15,6 +15,10 @@ const iconRegistry = {
15
15
  default: "M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z",
16
16
  filled: "M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z"
17
17
  },
18
+ star: {
19
+ default: "M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z",
20
+ filled: "M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z"
21
+ },
18
22
  check: {
19
23
  default: "M4 13L9 18L20 6",
20
24
  filled: "M4 13L9 18L20 6"
@@ -86,7 +90,7 @@ const Icon = ({ name, variant = "default", className, filledOnHover }) => {
86
90
  stroke: "currentColor",
87
91
  strokeLinecap: "round",
88
92
  strokeLinejoin: "round",
89
- strokeWidth: "1.5"
93
+ strokeWidth: "2"
90
94
  })]
91
95
  }), /* @__PURE__ */ jsxs("svg", {
92
96
  className: cn("absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100", { "opacity-100": variant === "filled" }, className),
@@ -120,7 +124,7 @@ const Icon = ({ name, variant = "default", className, filledOnHover }) => {
120
124
  stroke: "currentColor",
121
125
  strokeLinecap: "round",
122
126
  strokeLinejoin: "round",
123
- strokeWidth: "1.5"
127
+ strokeWidth: "2"
124
128
  })]
125
129
  });
126
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","names":["iconRegistry: Record<IconName, Record<IconVariant, string>>","Icon: React.FC<IconProps>"],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"../utils\";\n\nexport type IconVariant = \"default\" | \"filled\";\n\nexport type IconName =\n\t| \"sidebar\"\n\t| \"check\"\n\t| \"x\"\n\t| \"clipboard\"\n\t| \"send\"\n\t| \"chevron-down\"\n\t| \"arrow-left\"\n\t| \"arrow-right\"\n\t| \"arrow-up-right\"\n\t| \"attachment\"\n\t| \"file\"\n\t| \"close\"\n\t| \"home\"\n\t| \"articles\"\n\t| \"chat\";\n\nexport type IconProps = {\n\tname: IconName;\n\tvariant?: IconVariant;\n\tclassName?: string;\n\tfilledOnHover?: boolean;\n};\n\n// Thanks to Aaon for the icons\nconst iconRegistry: Record<IconName, Record<IconVariant, string>> = {\n\tsidebar: {\n\t\tdefault:\n\t\t\t\"M9 2L9 22M10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V10C22 7.19974 22 5.79961 21.455 4.73005C20.9757 3.78924 20.2108 3.02433 19.27 2.54497C18.2004 2 16.8003 2 14 2H10C7.19974 2 5.79961 2 4.73005 2.54497C3.78924 3.02433 3.02433 3.78924 2.54497 4.73005C2 5.79961 2 7.19974 2 10V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22Z\",\n\t\tfilled:\n\t\t\t\"M9.25 2.58333C9.25 2.27334 9.25 2.11835 9.21593 1.99118C9.12346 1.64609 8.85391 1.37654 8.50882 1.28407C8.38165 1.25 8.22666 1.25 7.91667 1.25C6.36671 1.25 5.59174 1.25 4.9559 1.42037C3.23044 1.88271 1.88271 3.23044 1.42037 4.9559C1.25 5.59174 1.25 6.36671 1.25 7.91667V16.0833C1.25 17.6333 1.25 18.4083 1.42037 19.0441C1.88271 20.7696 3.23044 22.1173 4.9559 22.5796C5.59174 22.75 6.36671 22.75 7.91667 22.75C8.22666 22.75 8.38165 22.75 8.50882 22.7159C8.85391 22.6235 9.12346 22.3539 9.21593 22.0088C9.25 21.8817 9.25 21.7267 9.25 21.4167L9.25 2.58333ZM10.75 21.15C10.75 21.7101 10.75 21.9901 10.859 22.204C10.9549 22.3922 11.1078 22.5451 11.296 22.641C11.5099 22.75 11.7899 22.75 12.35 22.75H14.75C17.5503 22.75 18.9504 22.75 20.02 22.205C20.9608 21.7257 21.7257 20.9608 22.205 20.02C22.75 18.9504 22.75 17.5503 22.75 14.75V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H12.35C11.7899 1.25 11.5099 1.25 11.296 1.35899C11.1078 1.45487 10.9549 1.60785 10.859 1.79601C10.75 2.00992 10.75 2.28995 10.75 2.85L10.75 21.15Z\",\n\t},\n\n\tclipboard: {\n\t\tdefault:\n\t\t\t\"M15.9999 3V3C18.209 3 19.9999 4.79086 19.9999 7V14C19.9999 16.8003 19.9999 18.2004 19.4549 19.27C18.9755 20.2108 18.2106 20.9757 17.2698 21.455C16.2003 22 14.8001 22 11.9999 22V22C9.19962 22 7.79948 22 6.72993 21.455C5.78911 20.9757 5.02421 20.2108 4.54485 19.27C3.99988 18.2004 3.99988 16.8003 3.99988 14V7C3.99988 4.79086 5.79074 3 7.99988 3V3M15.9999 3V3C15.9999 1.89543 15.1044 1 13.9999 1H9.99988C8.89531 1 7.99988 1.89543 7.99988 3V3M15.9999 3V3C15.9999 4.10457 15.1044 5 13.9999 5H9.99988C8.89531 5 7.99988 4.10457 7.99988 3V3\",\n\t\tfilled:\n\t\t\t\"M10.136 0.25C8.85118 0.25 7.70111 1.04698 7.24994 2.25C5.0407 2.25 3.24976 4.04094 3.24976 6.25018V14.75C3.24976 17.5503 3.24976 18.9504 3.79472 20.02C4.27409 20.9608 5.03899 21.7257 5.9798 22.205C7.04936 22.75 8.44949 22.75 11.2498 22.75H12.7498C15.55 22.75 16.9501 22.75 18.0197 22.205C18.9605 21.7257 19.7254 20.9608 20.2048 20.02C20.7498 18.9504 20.7498 17.5503 20.7498 14.75V6.24982C20.7498 4.04078 18.959 2.25 16.7499 2.25C16.2988 1.04699 15.1488 0.25 13.864 0.25H10.136ZM9.99994 4.25C9.30958 4.25 8.74994 3.69036 8.74994 3C8.74994 2.30964 9.30958 1.75 9.99994 1.75H13.9999C14.6903 1.75 15.2499 2.30964 15.2499 3C15.2499 3.69036 14.6903 4.25 13.9999 4.25H9.99994Z\",\n\t},\n\tchat: {\n\t\tdefault:\n\t\t\t\"M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z\",\n\t\tfilled:\n\t\t\t\"M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z\",\n\t},\n\tcheck: {\n\t\tdefault: \"M4 13L9 18L20 6\",\n\t\tfilled: \"M4 13L9 18L20 6\",\n\t},\n\tx: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\t\"chevron-down\": {\n\t\tdefault: \"M6 9L12 15L18 9\",\n\t\tfilled:\n\t\t\t\"M10.8686 14.8686L7.73137 11.7314C6.87462 10.8746 6.44624 10.4462 6.4173 10.0785C6.39218 9.75934 6.52136 9.44749 6.76477 9.23959C7.04529 9 7.65111 9 8.86274 9H15.1373C16.3489 9 16.9547 9 17.2352 9.23959C17.4786 9.44749 17.6078 9.75934 17.5827 10.0785C17.5538 10.4462 17.1254 10.8746 16.2686 11.7314L13.1314 14.8686C12.7354 15.2646 12.5373 15.4627 12.309 15.5368C12.1082 15.6021 11.8918 15.6021 11.691 15.5368C11.4627 15.4627 11.2646 15.2646 10.8686 14.8686Z\",\n\t},\n\t\"arrow-left\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\t\"arrow-right\": {\n\t\tdefault: \"M9 5l7 7-7 7\",\n\t\tfilled: \"M9 5l7 7-7 7\",\n\t},\n\t\"arrow-up-right\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\tsend: {\n\t\tdefault:\n\t\t\t\"M11 13L12.5345 16.9899C13.5893 19.7326 14.1168 21.1039 14.825 21.4489C15.4375 21.7472 16.1598 21.7132 16.7415 21.3586C17.4142 20.9486 17.8104 19.5338 18.6027 16.7041L21.466 6.47824C21.9677 4.68672 22.2185 3.79096 21.9857 3.17628C21.7827 2.64035 21.3596 2.21724 20.8237 2.01427C20.209 1.78147 19.3133 2.03228 17.5217 2.53391L7.29584 5.39716C4.46617 6.18947 3.05133 6.58563 2.64136 7.25828C2.28678 7.84005 2.25275 8.56231 2.55106 9.17484C2.89597 9.88306 4.26729 10.4105 7.00993 11.4654L11 13ZM11 13L13.5 10.5\",\n\t\tfilled:\n\t\t\t\"M6.88154 12.2191C3.45325 10.9005 1.7391 10.2412 1.30796 9.35595C0.935078 8.59028 0.977616 7.68746 1.42084 6.96024C1.93331 6.11943 3.70185 5.62424 7.23894 4.63385L17.234 1.83523C19.4734 1.2082 20.5931 0.894684 21.3615 1.18568C22.0314 1.43939 22.5603 1.96829 22.814 2.63819C23.1049 3.40654 22.7914 4.52624 22.1644 6.76565L19.3657 16.7606C18.3753 20.2977 17.88 22.0663 17.0392 22.5788C16.312 23.022 15.4092 23.0645 14.6435 22.6916C13.7582 22.2605 13.099 20.5463 11.7804 17.1179L11.0877 15.3166C10.9525 14.9653 10.885 14.7897 10.8813 14.6151C10.878 14.4608 10.9104 14.3078 10.9761 14.1681C11.0504 14.0101 11.1835 13.877 11.4496 13.6109L13.9999 11.0606C14.2928 10.7677 14.2928 10.2928 13.9999 9.99995C13.7071 9.70705 13.2322 9.70705 12.9393 9.99995L10.3891 12.5501C10.123 12.8163 9.98991 12.9493 9.83189 13.0236C9.69221 13.0893 9.53921 13.1218 9.38489 13.1185C9.2103 13.1148 9.03466 13.0472 8.68338 12.9121L6.88154 12.2191Z\",\n\t},\n\tattachment: {\n\t\tdefault:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t\tfilled:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t},\n\tfile: {\n\t\tdefault:\n\t\t\t\"M14 2.5V4.80003C14 5.92013 14 6.48019 14.218 6.90801C14.4097 7.28433 14.7157 7.5903 15.092 7.78204C15.5198 8.00003 16.0799 8.00003 17.2 8.00003H19.5M20 10.3137V14C20 16.8003 20 18.2004 19.455 19.27C18.9757 20.2108 18.2108 20.9757 17.27 21.455C16.2004 22 14.8003 22 12 22V22C9.19974 22 7.79961 22 6.73005 21.455C5.78924 20.9757 5.02433 20.2108 4.54497 19.27C4 18.2004 4 16.8003 4 14V9.77817C4 7.18697 4 5.89136 4.46859 4.88663C4.96536 3.82147 5.82147 2.96536 6.88663 2.46859C7.89136 2 9.18697 2 11.7782 2V2C12.9105 2 13.4766 2 14.0113 2.11855C14.5806 2.24479 15.1235 2.46965 15.6153 2.78296C16.0772 3.07721 16.4775 3.47753 17.2782 4.27817L17.6569 4.65685C18.5216 5.52161 18.954 5.95399 19.2632 6.45858C19.5373 6.90594 19.7394 7.39366 19.8618 7.90384C20 8.47928 20 9.09076 20 10.3137Z\",\n\t\tfilled:\n\t\t\t\"M13.25 1.26002C12.9109 1.24999 12.5071 1.24999 11.997 1.24999H11.25C8.44974 1.24999 7.04961 1.24999 5.98005 1.79495C5.03924 2.27432 4.27433 3.03922 3.79497 3.98003C3.25 5.04959 3.25 6.44972 3.25 9.24999V14.75C3.25 17.5502 3.25 18.9504 3.79497 20.0199C4.27433 20.9608 5.03924 21.7257 5.98005 22.205C7.04961 22.75 8.44974 22.75 11.25 22.75H12.75C15.5503 22.75 16.9504 22.75 18.02 22.205C18.9608 21.7257 19.7257 20.9608 20.205 20.0199C20.75 18.9504 20.75 17.5503 20.75 14.75V10.003C20.75 9.49287 20.75 9.08912 20.74 8.75H17.2H17.1695H17.1695C16.6354 8.75001 16.1896 8.75002 15.8253 8.72026C15.4454 8.68922 15.0888 8.62211 14.7515 8.45027C14.2341 8.18662 13.8134 7.76592 13.5497 7.24847C13.3779 6.91121 13.3108 6.55455 13.2797 6.17467C13.25 5.81044 13.25 5.36459 13.25 4.83043V4.8V1.26002ZM20.5164 7.25C20.3941 6.86401 20.2252 6.49389 20.0132 6.1479C19.704 5.64332 19.2716 5.21094 18.4069 4.3462L18.4069 4.34618L17.6538 3.59313L17.6538 3.59313C16.789 2.72837 16.3567 2.29599 15.8521 1.98679C15.5061 1.77477 15.136 1.60589 14.75 1.48358V4.8C14.75 5.37243 14.7506 5.75664 14.7748 6.05252C14.7982 6.33965 14.8401 6.47693 14.8862 6.56749C15.0061 6.80269 15.1973 6.99392 15.4325 7.11376C15.5231 7.1599 15.6604 7.20178 15.9475 7.22524C16.2434 7.24942 16.6276 7.25 17.2 7.25H20.5164Z\",\n\t},\n\tclose: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\thome: {\n\t\tdefault:\n\t\t\t\"M15 22V15C15 14.0681 15 13.6022 14.8478 13.2346C14.6448 12.7446 14.2554 12.3552 13.7654 12.1522C13.3978 12 12.9319 12 12 12V12C11.0681 12 10.6022 12 10.2346 12.1522C9.74458 12.3552 9.35523 12.7446 9.15224 13.2346C9 13.6022 9 14.0681 9 15V22M7.00244 3.99805L5.00244 5.59805C3.89986 6.48011 3.34857 6.92115 2.95174 7.46857C2.6002 7.95353 2.33865 8.49771 2.17957 9.07517C2 9.72701 2 10.433 2 11.845V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V11.845C22 10.433 22 9.72701 21.8204 9.07517C21.6613 8.49771 21.3998 7.95353 21.0483 7.46857C20.6514 6.92115 20.1001 6.48011 18.9976 5.59805L16.9976 3.99805C15.214 2.57118 14.3222 1.85774 13.3332 1.58413C12.4608 1.34279 11.5392 1.34279 10.6668 1.58413C9.67783 1.85774 8.78603 2.57118 7.00244 3.99805Z\",\n\t\tfilled:\n\t\t\t\"M17.9971 3.83672C15.8568 2.12447 14.7866 1.26835 13.5998 0.94002C12.5529 0.650409 11.4471 0.650409 10.4002 0.94002C9.21339 1.26835 8.14324 2.12447 6.00293 3.83672L4.85293 4.75672C3.52983 5.8152 2.86828 6.34444 2.39209 7.00134C1.97024 7.58329 1.65638 8.23631 1.46548 8.92927C1.25 9.71147 1.25 10.5587 1.25 12.2531V13.1495C1.25 16.5098 1.25 18.19 1.90396 19.4735C2.4792 20.6024 3.39708 21.5203 4.52606 22.0956C5.80953 22.7495 7.48969 22.7495 10.85 22.7495H13.15C16.5103 22.7495 18.1905 22.7495 19.4739 22.0956C20.6029 21.5203 21.5208 20.6024 22.096 19.4735C22.75 18.19 22.75 16.5098 22.75 13.1495V12.2531C22.75 10.5587 22.75 9.71147 22.5345 8.92927C22.3436 8.23631 22.0298 7.58329 21.6079 7.00134C21.1317 6.34444 20.4702 5.8152 19.1471 4.75672L17.9971 3.83672ZM13.4 21C13.9601 21 14.2401 21 14.454 20.891C14.6422 20.7951 14.7951 20.6422 14.891 20.454C15 20.2401 15 19.9601 15 19.4V14C15 13.0681 15 12.6022 14.8478 12.2346C14.6448 11.7446 14.2554 11.3552 13.7654 11.1522C13.3978 11 12.9319 11 12 11C11.0681 11 10.6022 11 10.2346 11.1522C9.74458 11.3552 9.35523 11.7446 9.15224 12.2346C9 12.6022 9 13.0681 9 14V19.4C9 19.9601 9 20.2401 9.10899 20.454C9.20487 20.6422 9.35785 20.7951 9.54601 20.891C9.75992 21 10.0399 21 10.6 21H13.4Z\",\n\t},\n\tarticles: {\n\t\tdefault:\n\t\t\t\"M12 18C14.4268 16.4399 16.2646 16.0156 18.7998 15.9002C19.9707 15.8469 20.5562 15.8203 20.9643 15.5957C21.3343 15.3921 21.6076 15.106 21.7942 14.7271C22 14.3093 22 13.7586 22 12.6571V2C17.5556 2 15.3333 2 12 4.14286M12 18C9.57324 16.4399 7.7354 16.0156 5.20023 15.9002C4.02927 15.8469 3.44379 15.8203 3.03575 15.5957C2.66572 15.3921 2.39236 15.106 2.20576 14.7271C2 14.3093 2 13.7586 2 12.6571V2C6.44444 2 8.66667 2 12 4.14286M12 18V4.14286M21 19.5C17 19.5 15 20 12 22C9 20 7 19.5 3 19.5\",\n\t\tfilled:\n\t\t\t\"M22.2065 1.35502C21.9935 1.24571 21.7123 1.24458 21.15 1.24232C19.5779 1.236 18 1.25792 16.4538 1.52901C16.0981 1.59138 15.7497 1.66744 15.4043 1.75978C14.7337 1.9391 14.3983 2.02876 13.9246 2.392C13.5814 2.65517 13.1441 3.22469 12.9785 3.62425C12.75 4.17575 12.75 4.68234 12.75 5.69552V9.99989C12.75 10.4141 12.4142 10.7499 12 10.7499C11.5858 10.7499 11.25 10.4141 11.25 9.99989V5.69552C11.25 4.68234 11.25 4.17575 11.0215 3.62425C10.8559 3.22469 10.4186 2.65517 10.0754 2.392C9.60165 2.02876 9.26632 1.9391 8.59568 1.75978C8.25035 1.66744 7.90193 1.59138 7.54618 1.52901C5.99997 1.25792 4.42208 1.236 2.84998 1.24232C2.28768 1.24458 2.00654 1.24571 1.7935 1.35502C1.60561 1.45142 1.45409 1.60355 1.35845 1.79183C1.25 2.0053 1.25 2.28683 1.25 2.84989V11.807C1.25 13.3974 1.25 14.1926 1.5397 14.803C1.81132 15.3754 2.17112 15.7706 2.71551 16.0947C3.29615 16.4403 4.2131 16.5266 6.04701 16.6992C6.46239 16.7383 6.87605 16.7915 7.28715 16.8636C8.70571 17.1123 10.0018 17.6069 11.5944 18.6308L12 18.8915L12.4056 18.6308C13.9982 17.6069 15.2943 17.1123 16.7129 16.8636C17.1239 16.7915 17.5376 16.7383 17.953 16.6992C19.7869 16.5266 20.7039 16.4403 21.2845 16.0947C21.8289 15.7706 22.1887 15.3754 22.4603 14.803C22.75 14.1926 22.75 13.3974 22.75 11.807V2.84989C22.75 2.28683 22.75 2.0053 22.6416 1.79183C22.5459 1.60355 22.3944 1.45142 22.2065 1.35502ZM3 18.7499C2.58578 18.7499 2.25 19.0857 2.25 19.4999C2.25 19.9141 2.58578 20.2499 3 20.2499C4.97376 20.2499 6.39687 20.3742 7.67766 20.7235C8.95055 21.0706 10.1262 21.6521 11.584 22.6239C11.8359 22.7919 12.1641 22.7919 12.416 22.6239C13.8738 21.6521 15.0494 21.0706 16.3223 20.7235C17.6031 20.3742 19.0262 20.2499 21 20.2499C21.4142 20.2499 21.75 19.9141 21.75 19.4999C21.75 19.0857 21.4142 18.7499 21 18.7499C18.9738 18.7499 17.3969 18.8756 15.9277 19.2763C14.585 19.6425 13.3686 20.2282 12 21.1039C10.6314 20.2282 9.41498 19.6425 8.07234 19.2763C6.60313 18.8756 5.02623 18.7499 3 18.7499Z\",\n\t},\n};\n\nconst getIconPath = (name: IconName, variant: IconVariant): string =>\n\ticonRegistry[name]?.[variant] || iconRegistry[name]?.default || \"\";\n\nconst getIconType = (variant: IconVariant) =>\n\tvariant === \"filled\" ? \"filled\" : \"stroked\";\n\nexport const Icon: React.FC<IconProps> = ({\n\tname,\n\tvariant = \"default\",\n\tclassName,\n\tfilledOnHover,\n}) => {\n\tconst defaultPath = getIconPath(name, \"default\");\n\tconst filledPath = getIconPath(name, \"filled\");\n\tconst currentPath = getIconPath(name, variant);\n\tconst iconType = getIconType(variant);\n\n\tif (!currentPath) {\n\t\treturn null;\n\t}\n\n\t// If filledOnHover is true, render both variants with CSS-only hover\n\tif (filledOnHover && defaultPath && filledPath) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName={`relative inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-100 transition-opacity duration-200 group-hover/btn:opacity-0\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-0\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\td={defaultPath}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-100\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\t\td={filledPath}\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t);\n\t}\n\n\t// Standard rendering for non-hover variants\n\treturn (\n\t\t<svg\n\t\t\tclassName={`inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\tfill=\"none\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\twidth=\"24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<title>{name}</title>\n\t\t\t{iconType === \"filled\" ? (\n\t\t\t\t<path\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<path\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth=\"1.5\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t);\n};\n\nexport type AddNewIconTemplate = {\n\t[key: string]: {\n\t\tdefault: string;\n\t\tfilled: string;\n\t};\n};\n\nexport default Icon;\n"],"mappings":";;;;AA8BA,MAAMA,eAA8D;CACnE,SAAS;EACR,SACC;EACD,QACC;EACD;CAED,WAAW;EACV,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,GAAG;EACF,SAAS;EACT,QAAQ;EACR;CACD,gBAAgB;EACf,SAAS;EACT,QACC;EACD;CACD,cAAc;EACb,SAAS;EACT,QAAQ;EACR;CACD,eAAe;EACd,SAAS;EACT,QAAQ;EACR;CACD,kBAAkB;EACjB,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,YAAY;EACX,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,UAAU;EACT,SACC;EACD,QACC;EACD;CACD;AAED,MAAM,eAAe,MAAgB,YACpC,aAAa,QAAQ,YAAY,aAAa,OAAO,WAAW;AAEjE,MAAM,eAAe,YACpB,YAAY,WAAW,WAAW;AAEnC,MAAaC,QAA6B,EACzC,MACA,UAAU,WACV,WACA,oBACK;CACL,MAAM,cAAc,YAAY,MAAM,UAAU;CAChD,MAAM,aAAa,YAAY,MAAM,SAAS;CAC9C,MAAM,cAAc,YAAY,MAAM,QAAQ;CAC9C,MAAM,WAAW,YAAY,QAAQ;AAErC,KAAI,CAAC,YACJ,QAAO;AAIR,KAAI,iBAAiB,eAAe,WACnC,QACC,qBAAC;EACA,WAAW,kCAAkC,aAAa;aAE1D,qBAAC;GACA,WAAW,GACV,wGACA,EACC,aAAa,YAAY,UACzB,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,GAAG;IACH,QAAO;IACP,eAAc;IACd,gBAAe;IACf,aAAY;KACX;IACG,EACN,qBAAC;GACA,WAAW,GACV,wGACA,EACC,eAAe,YAAY,UAC3B,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,UAAS;IACT,GAAG;IACH,MAAK;IACL,UAAS;KACR;IACG;GACA;AAKT,QACC,qBAAC;EACA,WAAW,yBAAyB,aAAa;EACjD,MAAK;EACL,QAAO;EACP,SAAQ;EACR,OAAM;EACN,OAAM;aAEN,oBAAC,qBAAO,OAAa,EACpB,aAAa,WACb,oBAAC;GACA,UAAS;GACT,GAAG;GACH,MAAK;GACL,UAAS;IACR,GAEF,oBAAC;GACA,GAAG;GACH,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;IACX;GAEE;;AAWR,oBAAe"}
1
+ {"version":3,"file":"icons.js","names":["iconRegistry: Record<IconName, Record<IconVariant, string>>","Icon: React.FC<IconProps>"],"sources":["../../../src/support/components/icons.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"../utils\";\n\nexport type IconVariant = \"default\" | \"filled\";\n\nexport type IconName =\n\t| \"sidebar\"\n\t| \"check\"\n\t| \"x\"\n\t| \"clipboard\"\n\t| \"send\"\n\t| \"chevron-down\"\n\t| \"arrow-left\"\n\t| \"arrow-right\"\n\t| \"arrow-up-right\"\n\t| \"attachment\"\n\t| \"file\"\n\t| \"close\"\n\t| \"home\"\n\t| \"articles\"\n\t| \"chat\"\n\t| \"star\";\n\nexport type IconProps = {\n\tname: IconName;\n\tvariant?: IconVariant;\n\tclassName?: string;\n\tfilledOnHover?: boolean;\n};\n\n// Thanks to Aaon for the icons\nconst iconRegistry: Record<IconName, Record<IconVariant, string>> = {\n\tsidebar: {\n\t\tdefault:\n\t\t\t\"M9 2L9 22M10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V10C22 7.19974 22 5.79961 21.455 4.73005C20.9757 3.78924 20.2108 3.02433 19.27 2.54497C18.2004 2 16.8003 2 14 2H10C7.19974 2 5.79961 2 4.73005 2.54497C3.78924 3.02433 3.02433 3.78924 2.54497 4.73005C2 5.79961 2 7.19974 2 10V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22Z\",\n\t\tfilled:\n\t\t\t\"M9.25 2.58333C9.25 2.27334 9.25 2.11835 9.21593 1.99118C9.12346 1.64609 8.85391 1.37654 8.50882 1.28407C8.38165 1.25 8.22666 1.25 7.91667 1.25C6.36671 1.25 5.59174 1.25 4.9559 1.42037C3.23044 1.88271 1.88271 3.23044 1.42037 4.9559C1.25 5.59174 1.25 6.36671 1.25 7.91667V16.0833C1.25 17.6333 1.25 18.4083 1.42037 19.0441C1.88271 20.7696 3.23044 22.1173 4.9559 22.5796C5.59174 22.75 6.36671 22.75 7.91667 22.75C8.22666 22.75 8.38165 22.75 8.50882 22.7159C8.85391 22.6235 9.12346 22.3539 9.21593 22.0088C9.25 21.8817 9.25 21.7267 9.25 21.4167L9.25 2.58333ZM10.75 21.15C10.75 21.7101 10.75 21.9901 10.859 22.204C10.9549 22.3922 11.1078 22.5451 11.296 22.641C11.5099 22.75 11.7899 22.75 12.35 22.75H14.75C17.5503 22.75 18.9504 22.75 20.02 22.205C20.9608 21.7257 21.7257 20.9608 22.205 20.02C22.75 18.9504 22.75 17.5503 22.75 14.75V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H12.35C11.7899 1.25 11.5099 1.25 11.296 1.35899C11.1078 1.45487 10.9549 1.60785 10.859 1.79601C10.75 2.00992 10.75 2.28995 10.75 2.85L10.75 21.15Z\",\n\t},\n\n\tclipboard: {\n\t\tdefault:\n\t\t\t\"M15.9999 3V3C18.209 3 19.9999 4.79086 19.9999 7V14C19.9999 16.8003 19.9999 18.2004 19.4549 19.27C18.9755 20.2108 18.2106 20.9757 17.2698 21.455C16.2003 22 14.8001 22 11.9999 22V22C9.19962 22 7.79948 22 6.72993 21.455C5.78911 20.9757 5.02421 20.2108 4.54485 19.27C3.99988 18.2004 3.99988 16.8003 3.99988 14V7C3.99988 4.79086 5.79074 3 7.99988 3V3M15.9999 3V3C15.9999 1.89543 15.1044 1 13.9999 1H9.99988C8.89531 1 7.99988 1.89543 7.99988 3V3M15.9999 3V3C15.9999 4.10457 15.1044 5 13.9999 5H9.99988C8.89531 5 7.99988 4.10457 7.99988 3V3\",\n\t\tfilled:\n\t\t\t\"M10.136 0.25C8.85118 0.25 7.70111 1.04698 7.24994 2.25C5.0407 2.25 3.24976 4.04094 3.24976 6.25018V14.75C3.24976 17.5503 3.24976 18.9504 3.79472 20.02C4.27409 20.9608 5.03899 21.7257 5.9798 22.205C7.04936 22.75 8.44949 22.75 11.2498 22.75H12.7498C15.55 22.75 16.9501 22.75 18.0197 22.205C18.9605 21.7257 19.7254 20.9608 20.2048 20.02C20.7498 18.9504 20.7498 17.5503 20.7498 14.75V6.24982C20.7498 4.04078 18.959 2.25 16.7499 2.25C16.2988 1.04699 15.1488 0.25 13.864 0.25H10.136ZM9.99994 4.25C9.30958 4.25 8.74994 3.69036 8.74994 3C8.74994 2.30964 9.30958 1.75 9.99994 1.75H13.9999C14.6903 1.75 15.2499 2.30964 15.2499 3C15.2499 3.69036 14.6903 4.25 13.9999 4.25H9.99994Z\",\n\t},\n\tchat: {\n\t\tdefault:\n\t\t\t\"M2 10C2 7.19974 2 5.79961 2.54497 4.73005C3.02433 3.78924 3.78924 3.02433 4.73005 2.54497C5.79961 2 7.19974 2 10 2H14C16.8003 2 18.2004 2 19.27 2.54497C20.2108 3.02433 20.9757 3.78924 21.455 4.73005C22 5.79961 22 7.19974 22 10V19.1708C22 20.1969 22 20.71 21.8373 21.0302C21.5642 21.5676 20.996 21.8893 20.3947 21.847C20.0363 21.8218 19.5964 21.5578 18.7165 21.0299V21.0299C18.1917 20.715 17.9293 20.5576 17.6542 20.4347C17.1972 20.2306 16.7122 20.0962 16.2154 20.0362C15.9163 20 15.6103 20 14.9983 20H10C7.19974 20 5.79961 20 4.73005 19.455C3.78924 18.9757 3.02433 18.2108 2.54497 17.27C2 16.2004 2 14.8003 2 12V10Z\",\n\t\tfilled:\n\t\t\t\"M9.25 1.25C6.44974 1.25 5.04961 1.25 3.98005 1.79497C3.03924 2.27433 2.27433 3.03924 1.79497 3.98005C1.25 5.04961 1.25 6.44974 1.25 9.25V12.75C1.25 15.5503 1.25 16.9504 1.79497 18.02C2.27433 18.9608 3.03924 19.7257 3.98005 20.205C5.04961 20.75 6.44974 20.75 9.25 20.75H14.5764C15.4012 20.75 15.8135 20.75 16.2144 20.8156C16.5703 20.8738 16.9189 20.9703 17.254 21.1035C17.6315 21.2535 17.9851 21.4657 18.6924 21.8901L19.1152 22.1438C20.3049 22.8576 20.8998 23.2145 21.3892 23.1689C21.816 23.1291 22.2054 22.9086 22.4591 22.5631C22.75 22.1669 22.75 21.4732 22.75 20.0858V9.25C22.75 6.44974 22.75 5.04961 22.205 3.98005C21.7257 3.03924 20.9608 2.27433 20.02 1.79497C18.9504 1.25 17.5503 1.25 14.75 1.25H9.25Z\",\n\t},\n\tstar: {\n\t\tdefault:\n\t\t\t\"M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z\",\n\t\tfilled:\n\t\t\t\"M12 2L14.618 8.472L21.5 9.09L16.25 13.77L17.804 20.5L12 17.1L6.196 20.5L7.75 13.77L2.5 9.09L9.382 8.472L12 2Z\",\n\t},\n\tcheck: {\n\t\tdefault: \"M4 13L9 18L20 6\",\n\t\tfilled: \"M4 13L9 18L20 6\",\n\t},\n\tx: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\t\"chevron-down\": {\n\t\tdefault: \"M6 9L12 15L18 9\",\n\t\tfilled:\n\t\t\t\"M10.8686 14.8686L7.73137 11.7314C6.87462 10.8746 6.44624 10.4462 6.4173 10.0785C6.39218 9.75934 6.52136 9.44749 6.76477 9.23959C7.04529 9 7.65111 9 8.86274 9H15.1373C16.3489 9 16.9547 9 17.2352 9.23959C17.4786 9.44749 17.6078 9.75934 17.5827 10.0785C17.5538 10.4462 17.1254 10.8746 16.2686 11.7314L13.1314 14.8686C12.7354 15.2646 12.5373 15.4627 12.309 15.5368C12.1082 15.6021 11.8918 15.6021 11.691 15.5368C11.4627 15.4627 11.2646 15.2646 10.8686 14.8686Z\",\n\t},\n\t\"arrow-left\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\t\"arrow-right\": {\n\t\tdefault: \"M9 5l7 7-7 7\",\n\t\tfilled: \"M9 5l7 7-7 7\",\n\t},\n\t\"arrow-up-right\": {\n\t\tdefault: \"M15 19l-7-7 7-7\",\n\t\tfilled: \"M15 19l-7-7 7-7\",\n\t},\n\tsend: {\n\t\tdefault:\n\t\t\t\"M11 13L12.5345 16.9899C13.5893 19.7326 14.1168 21.1039 14.825 21.4489C15.4375 21.7472 16.1598 21.7132 16.7415 21.3586C17.4142 20.9486 17.8104 19.5338 18.6027 16.7041L21.466 6.47824C21.9677 4.68672 22.2185 3.79096 21.9857 3.17628C21.7827 2.64035 21.3596 2.21724 20.8237 2.01427C20.209 1.78147 19.3133 2.03228 17.5217 2.53391L7.29584 5.39716C4.46617 6.18947 3.05133 6.58563 2.64136 7.25828C2.28678 7.84005 2.25275 8.56231 2.55106 9.17484C2.89597 9.88306 4.26729 10.4105 7.00993 11.4654L11 13ZM11 13L13.5 10.5\",\n\t\tfilled:\n\t\t\t\"M6.88154 12.2191C3.45325 10.9005 1.7391 10.2412 1.30796 9.35595C0.935078 8.59028 0.977616 7.68746 1.42084 6.96024C1.93331 6.11943 3.70185 5.62424 7.23894 4.63385L17.234 1.83523C19.4734 1.2082 20.5931 0.894684 21.3615 1.18568C22.0314 1.43939 22.5603 1.96829 22.814 2.63819C23.1049 3.40654 22.7914 4.52624 22.1644 6.76565L19.3657 16.7606C18.3753 20.2977 17.88 22.0663 17.0392 22.5788C16.312 23.022 15.4092 23.0645 14.6435 22.6916C13.7582 22.2605 13.099 20.5463 11.7804 17.1179L11.0877 15.3166C10.9525 14.9653 10.885 14.7897 10.8813 14.6151C10.878 14.4608 10.9104 14.3078 10.9761 14.1681C11.0504 14.0101 11.1835 13.877 11.4496 13.6109L13.9999 11.0606C14.2928 10.7677 14.2928 10.2928 13.9999 9.99995C13.7071 9.70705 13.2322 9.70705 12.9393 9.99995L10.3891 12.5501C10.123 12.8163 9.98991 12.9493 9.83189 13.0236C9.69221 13.0893 9.53921 13.1218 9.38489 13.1185C9.2103 13.1148 9.03466 13.0472 8.68338 12.9121L6.88154 12.2191Z\",\n\t},\n\tattachment: {\n\t\tdefault:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t\tfilled:\n\t\t\t\"M22 12L15.25 18.75C12.3505 21.6495 7.64949 21.6495 4.75 18.75V18.75C1.85051 15.8505 1.8505 11.1495 4.75 8.25L9.5 3.5C11.433 1.56701 14.567 1.567 16.5 3.5V3.5C18.433 5.433 18.433 8.567 16.5 10.5L11.75 15.25C10.7835 16.2165 9.2165 16.2165 8.25 15.25V15.25C7.2835 14.2835 7.2835 12.7165 8.25 11.75L13 7\",\n\t},\n\tfile: {\n\t\tdefault:\n\t\t\t\"M14 2.5V4.80003C14 5.92013 14 6.48019 14.218 6.90801C14.4097 7.28433 14.7157 7.5903 15.092 7.78204C15.5198 8.00003 16.0799 8.00003 17.2 8.00003H19.5M20 10.3137V14C20 16.8003 20 18.2004 19.455 19.27C18.9757 20.2108 18.2108 20.9757 17.27 21.455C16.2004 22 14.8003 22 12 22V22C9.19974 22 7.79961 22 6.73005 21.455C5.78924 20.9757 5.02433 20.2108 4.54497 19.27C4 18.2004 4 16.8003 4 14V9.77817C4 7.18697 4 5.89136 4.46859 4.88663C4.96536 3.82147 5.82147 2.96536 6.88663 2.46859C7.89136 2 9.18697 2 11.7782 2V2C12.9105 2 13.4766 2 14.0113 2.11855C14.5806 2.24479 15.1235 2.46965 15.6153 2.78296C16.0772 3.07721 16.4775 3.47753 17.2782 4.27817L17.6569 4.65685C18.5216 5.52161 18.954 5.95399 19.2632 6.45858C19.5373 6.90594 19.7394 7.39366 19.8618 7.90384C20 8.47928 20 9.09076 20 10.3137Z\",\n\t\tfilled:\n\t\t\t\"M13.25 1.26002C12.9109 1.24999 12.5071 1.24999 11.997 1.24999H11.25C8.44974 1.24999 7.04961 1.24999 5.98005 1.79495C5.03924 2.27432 4.27433 3.03922 3.79497 3.98003C3.25 5.04959 3.25 6.44972 3.25 9.24999V14.75C3.25 17.5502 3.25 18.9504 3.79497 20.0199C4.27433 20.9608 5.03924 21.7257 5.98005 22.205C7.04961 22.75 8.44974 22.75 11.25 22.75H12.75C15.5503 22.75 16.9504 22.75 18.02 22.205C18.9608 21.7257 19.7257 20.9608 20.205 20.0199C20.75 18.9504 20.75 17.5503 20.75 14.75V10.003C20.75 9.49287 20.75 9.08912 20.74 8.75H17.2H17.1695H17.1695C16.6354 8.75001 16.1896 8.75002 15.8253 8.72026C15.4454 8.68922 15.0888 8.62211 14.7515 8.45027C14.2341 8.18662 13.8134 7.76592 13.5497 7.24847C13.3779 6.91121 13.3108 6.55455 13.2797 6.17467C13.25 5.81044 13.25 5.36459 13.25 4.83043V4.8V1.26002ZM20.5164 7.25C20.3941 6.86401 20.2252 6.49389 20.0132 6.1479C19.704 5.64332 19.2716 5.21094 18.4069 4.3462L18.4069 4.34618L17.6538 3.59313L17.6538 3.59313C16.789 2.72837 16.3567 2.29599 15.8521 1.98679C15.5061 1.77477 15.136 1.60589 14.75 1.48358V4.8C14.75 5.37243 14.7506 5.75664 14.7748 6.05252C14.7982 6.33965 14.8401 6.47693 14.8862 6.56749C15.0061 6.80269 15.1973 6.99392 15.4325 7.11376C15.5231 7.1599 15.6604 7.20178 15.9475 7.22524C16.2434 7.24942 16.6276 7.25 17.2 7.25H20.5164Z\",\n\t},\n\tclose: {\n\t\tdefault: \"M6 18L18 6M6 6L18 18\",\n\t\tfilled: \"M6 18L18 6M6 6L18 18\",\n\t},\n\thome: {\n\t\tdefault:\n\t\t\t\"M15 22V15C15 14.0681 15 13.6022 14.8478 13.2346C14.6448 12.7446 14.2554 12.3552 13.7654 12.1522C13.3978 12 12.9319 12 12 12V12C11.0681 12 10.6022 12 10.2346 12.1522C9.74458 12.3552 9.35523 12.7446 9.15224 13.2346C9 13.6022 9 14.0681 9 15V22M7.00244 3.99805L5.00244 5.59805C3.89986 6.48011 3.34857 6.92115 2.95174 7.46857C2.6002 7.95353 2.33865 8.49771 2.17957 9.07517C2 9.72701 2 10.433 2 11.845V14C2 16.8003 2 18.2004 2.54497 19.27C3.02433 20.2108 3.78924 20.9757 4.73005 21.455C5.79961 22 7.19974 22 10 22H14C16.8003 22 18.2004 22 19.27 21.455C20.2108 20.9757 20.9757 20.2108 21.455 19.27C22 18.2004 22 16.8003 22 14V11.845C22 10.433 22 9.72701 21.8204 9.07517C21.6613 8.49771 21.3998 7.95353 21.0483 7.46857C20.6514 6.92115 20.1001 6.48011 18.9976 5.59805L16.9976 3.99805C15.214 2.57118 14.3222 1.85774 13.3332 1.58413C12.4608 1.34279 11.5392 1.34279 10.6668 1.58413C9.67783 1.85774 8.78603 2.57118 7.00244 3.99805Z\",\n\t\tfilled:\n\t\t\t\"M17.9971 3.83672C15.8568 2.12447 14.7866 1.26835 13.5998 0.94002C12.5529 0.650409 11.4471 0.650409 10.4002 0.94002C9.21339 1.26835 8.14324 2.12447 6.00293 3.83672L4.85293 4.75672C3.52983 5.8152 2.86828 6.34444 2.39209 7.00134C1.97024 7.58329 1.65638 8.23631 1.46548 8.92927C1.25 9.71147 1.25 10.5587 1.25 12.2531V13.1495C1.25 16.5098 1.25 18.19 1.90396 19.4735C2.4792 20.6024 3.39708 21.5203 4.52606 22.0956C5.80953 22.7495 7.48969 22.7495 10.85 22.7495H13.15C16.5103 22.7495 18.1905 22.7495 19.4739 22.0956C20.6029 21.5203 21.5208 20.6024 22.096 19.4735C22.75 18.19 22.75 16.5098 22.75 13.1495V12.2531C22.75 10.5587 22.75 9.71147 22.5345 8.92927C22.3436 8.23631 22.0298 7.58329 21.6079 7.00134C21.1317 6.34444 20.4702 5.8152 19.1471 4.75672L17.9971 3.83672ZM13.4 21C13.9601 21 14.2401 21 14.454 20.891C14.6422 20.7951 14.7951 20.6422 14.891 20.454C15 20.2401 15 19.9601 15 19.4V14C15 13.0681 15 12.6022 14.8478 12.2346C14.6448 11.7446 14.2554 11.3552 13.7654 11.1522C13.3978 11 12.9319 11 12 11C11.0681 11 10.6022 11 10.2346 11.1522C9.74458 11.3552 9.35523 11.7446 9.15224 12.2346C9 12.6022 9 13.0681 9 14V19.4C9 19.9601 9 20.2401 9.10899 20.454C9.20487 20.6422 9.35785 20.7951 9.54601 20.891C9.75992 21 10.0399 21 10.6 21H13.4Z\",\n\t},\n\tarticles: {\n\t\tdefault:\n\t\t\t\"M12 18C14.4268 16.4399 16.2646 16.0156 18.7998 15.9002C19.9707 15.8469 20.5562 15.8203 20.9643 15.5957C21.3343 15.3921 21.6076 15.106 21.7942 14.7271C22 14.3093 22 13.7586 22 12.6571V2C17.5556 2 15.3333 2 12 4.14286M12 18C9.57324 16.4399 7.7354 16.0156 5.20023 15.9002C4.02927 15.8469 3.44379 15.8203 3.03575 15.5957C2.66572 15.3921 2.39236 15.106 2.20576 14.7271C2 14.3093 2 13.7586 2 12.6571V2C6.44444 2 8.66667 2 12 4.14286M12 18V4.14286M21 19.5C17 19.5 15 20 12 22C9 20 7 19.5 3 19.5\",\n\t\tfilled:\n\t\t\t\"M22.2065 1.35502C21.9935 1.24571 21.7123 1.24458 21.15 1.24232C19.5779 1.236 18 1.25792 16.4538 1.52901C16.0981 1.59138 15.7497 1.66744 15.4043 1.75978C14.7337 1.9391 14.3983 2.02876 13.9246 2.392C13.5814 2.65517 13.1441 3.22469 12.9785 3.62425C12.75 4.17575 12.75 4.68234 12.75 5.69552V9.99989C12.75 10.4141 12.4142 10.7499 12 10.7499C11.5858 10.7499 11.25 10.4141 11.25 9.99989V5.69552C11.25 4.68234 11.25 4.17575 11.0215 3.62425C10.8559 3.22469 10.4186 2.65517 10.0754 2.392C9.60165 2.02876 9.26632 1.9391 8.59568 1.75978C8.25035 1.66744 7.90193 1.59138 7.54618 1.52901C5.99997 1.25792 4.42208 1.236 2.84998 1.24232C2.28768 1.24458 2.00654 1.24571 1.7935 1.35502C1.60561 1.45142 1.45409 1.60355 1.35845 1.79183C1.25 2.0053 1.25 2.28683 1.25 2.84989V11.807C1.25 13.3974 1.25 14.1926 1.5397 14.803C1.81132 15.3754 2.17112 15.7706 2.71551 16.0947C3.29615 16.4403 4.2131 16.5266 6.04701 16.6992C6.46239 16.7383 6.87605 16.7915 7.28715 16.8636C8.70571 17.1123 10.0018 17.6069 11.5944 18.6308L12 18.8915L12.4056 18.6308C13.9982 17.6069 15.2943 17.1123 16.7129 16.8636C17.1239 16.7915 17.5376 16.7383 17.953 16.6992C19.7869 16.5266 20.7039 16.4403 21.2845 16.0947C21.8289 15.7706 22.1887 15.3754 22.4603 14.803C22.75 14.1926 22.75 13.3974 22.75 11.807V2.84989C22.75 2.28683 22.75 2.0053 22.6416 1.79183C22.5459 1.60355 22.3944 1.45142 22.2065 1.35502ZM3 18.7499C2.58578 18.7499 2.25 19.0857 2.25 19.4999C2.25 19.9141 2.58578 20.2499 3 20.2499C4.97376 20.2499 6.39687 20.3742 7.67766 20.7235C8.95055 21.0706 10.1262 21.6521 11.584 22.6239C11.8359 22.7919 12.1641 22.7919 12.416 22.6239C13.8738 21.6521 15.0494 21.0706 16.3223 20.7235C17.6031 20.3742 19.0262 20.2499 21 20.2499C21.4142 20.2499 21.75 19.9141 21.75 19.4999C21.75 19.0857 21.4142 18.7499 21 18.7499C18.9738 18.7499 17.3969 18.8756 15.9277 19.2763C14.585 19.6425 13.3686 20.2282 12 21.1039C10.6314 20.2282 9.41498 19.6425 8.07234 19.2763C6.60313 18.8756 5.02623 18.7499 3 18.7499Z\",\n\t},\n};\n\nconst getIconPath = (name: IconName, variant: IconVariant): string =>\n\ticonRegistry[name]?.[variant] || iconRegistry[name]?.default || \"\";\n\nconst getIconType = (variant: IconVariant) =>\n\tvariant === \"filled\" ? \"filled\" : \"stroked\";\n\nexport const Icon: React.FC<IconProps> = ({\n\tname,\n\tvariant = \"default\",\n\tclassName,\n\tfilledOnHover,\n}) => {\n\tconst defaultPath = getIconPath(name, \"default\");\n\tconst filledPath = getIconPath(name, \"filled\");\n\tconst currentPath = getIconPath(name, variant);\n\tconst iconType = getIconType(variant);\n\n\tif (!currentPath) {\n\t\treturn null;\n\t}\n\n\t// If filledOnHover is true, render both variants with CSS-only hover\n\tif (filledOnHover && defaultPath && filledPath) {\n\t\treturn (\n\t\t\t<span\n\t\t\t\tclassName={`relative inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\t>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-100 transition-opacity duration-200 group-hover/btn:opacity-0\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-0\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\td={defaultPath}\n\t\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t\t<svg\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"absolute inset-0 h-full w-full opacity-0 transition-opacity duration-200 group-hover/btn:opacity-100\",\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\"opacity-100\": variant === \"filled\",\n\t\t\t\t\t\t},\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tfill=\"none\"\n\t\t\t\t\theight=\"24\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\twidth=\"24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<title>{name}</title>\n\t\t\t\t\t<path\n\t\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\t\td={filledPath}\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</span>\n\t\t);\n\t}\n\n\t// Standard rendering for non-hover variants\n\treturn (\n\t\t<svg\n\t\t\tclassName={`inline-block shrink-0 ${className || \"h-4 w-4\"}`}\n\t\t\tfill=\"none\"\n\t\t\theight=\"24\"\n\t\t\tviewBox=\"0 0 24 24\"\n\t\t\twidth=\"24\"\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t>\n\t\t\t<title>{name}</title>\n\t\t\t{iconType === \"filled\" ? (\n\t\t\t\t<path\n\t\t\t\t\tclipRule=\"evenodd\"\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<path\n\t\t\t\t\td={currentPath}\n\t\t\t\t\tstroke=\"currentColor\"\n\t\t\t\t\tstrokeLinecap=\"round\"\n\t\t\t\t\tstrokeLinejoin=\"round\"\n\t\t\t\t\tstrokeWidth=\"2\"\n\t\t\t\t/>\n\t\t\t)}\n\t\t</svg>\n\t);\n};\n\nexport type AddNewIconTemplate = {\n\t[key: string]: {\n\t\tdefault: string;\n\t\tfilled: string;\n\t};\n};\n\nexport default Icon;\n"],"mappings":";;;;AA+BA,MAAMA,eAA8D;CACnE,SAAS;EACR,SACC;EACD,QACC;EACD;CAED,WAAW;EACV,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,GAAG;EACF,SAAS;EACT,QAAQ;EACR;CACD,gBAAgB;EACf,SAAS;EACT,QACC;EACD;CACD,cAAc;EACb,SAAS;EACT,QAAQ;EACR;CACD,eAAe;EACd,SAAS;EACT,QAAQ;EACR;CACD,kBAAkB;EACjB,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,YAAY;EACX,SACC;EACD,QACC;EACD;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,OAAO;EACN,SAAS;EACT,QAAQ;EACR;CACD,MAAM;EACL,SACC;EACD,QACC;EACD;CACD,UAAU;EACT,SACC;EACD,QACC;EACD;CACD;AAED,MAAM,eAAe,MAAgB,YACpC,aAAa,QAAQ,YAAY,aAAa,OAAO,WAAW;AAEjE,MAAM,eAAe,YACpB,YAAY,WAAW,WAAW;AAEnC,MAAaC,QAA6B,EACzC,MACA,UAAU,WACV,WACA,oBACK;CACL,MAAM,cAAc,YAAY,MAAM,UAAU;CAChD,MAAM,aAAa,YAAY,MAAM,SAAS;CAC9C,MAAM,cAAc,YAAY,MAAM,QAAQ;CAC9C,MAAM,WAAW,YAAY,QAAQ;AAErC,KAAI,CAAC,YACJ,QAAO;AAIR,KAAI,iBAAiB,eAAe,WACnC,QACC,qBAAC;EACA,WAAW,kCAAkC,aAAa;aAE1D,qBAAC;GACA,WAAW,GACV,wGACA,EACC,aAAa,YAAY,UACzB,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,GAAG;IACH,QAAO;IACP,eAAc;IACd,gBAAe;IACf,aAAY;KACX;IACG,EACN,qBAAC;GACA,WAAW,GACV,wGACA,EACC,eAAe,YAAY,UAC3B,EACD,UACA;GACD,MAAK;GACL,QAAO;GACP,SAAQ;GACR,OAAM;GACN,OAAM;cAEN,oBAAC,qBAAO,OAAa,EACrB,oBAAC;IACA,UAAS;IACT,GAAG;IACH,MAAK;IACL,UAAS;KACR;IACG;GACA;AAKT,QACC,qBAAC;EACA,WAAW,yBAAyB,aAAa;EACjD,MAAK;EACL,QAAO;EACP,SAAQ;EACR,OAAM;EACN,OAAM;aAEN,oBAAC,qBAAO,OAAa,EACpB,aAAa,WACb,oBAAC;GACA,UAAS;GACT,GAAG;GACH,MAAK;GACL,UAAS;IACR,GAEF,oBAAC;GACA,GAAG;GACH,QAAO;GACP,eAAc;GACd,gBAAe;GACf,aAAY;IACX;GAEE;;AAWR,oBAAe"}
@@ -2,6 +2,7 @@ import { TypingIndicator, TypingIndicatorProps, TypingParticipant, TypingPartici
2
2
  import { ContentProps } from "../types.js";
3
3
  import { Content } from "./content.js";
4
4
  import { ConversationEvent, ConversationEventProps } from "./conversation-event.js";
5
+ import { ConversationResolvedFeedback } from "./conversation-resolved-feedback.js";
5
6
  import { ConversationTimelineList, ConversationTimelineProps } from "./conversation-timeline.js";
6
7
  import { Icon, IconName, IconProps, IconVariant } from "./icons.js";
7
8
  import { SendButton } from "./multimodal-input.js";
@@ -9,4 +10,4 @@ import { Root, RootProps } from "./root.js";
9
10
  import { TimelineMessageGroup, TimelineMessageGroupProps } from "./timeline-message-group.js";
10
11
  import { TimelineMessageItem, TimelineMessageItemProps } from "./timeline-message-item.js";
11
12
  import { DefaultTrigger, DefaultTriggerProps } from "./trigger.js";
12
- export { Content, type ContentProps, ConversationEvent, type ConversationEventProps, ConversationTimelineList, type ConversationTimelineProps, DefaultTrigger, type DefaultTriggerProps, Icon, type IconName, type IconProps, type IconVariant, Root, type RootProps, SendButton, TimelineMessageGroup, type TimelineMessageGroupProps, TimelineMessageItem, type TimelineMessageItemProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType };
13
+ export { Content, type ContentProps, ConversationEvent, type ConversationEventProps, ConversationResolvedFeedback, ConversationTimelineList, type ConversationTimelineProps, DefaultTrigger, type DefaultTriggerProps, Icon, type IconName, type IconProps, type IconVariant, Root, type RootProps, SendButton, TimelineMessageGroup, type TimelineMessageGroupProps, TimelineMessageItem, type TimelineMessageItemProps, TypingIndicator, type TypingIndicatorProps, type TypingParticipant, type TypingParticipantType };