@cossistant/react 0.0.11 → 0.0.13

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 (32) hide show
  1. package/package.json +3 -3
  2. package/realtime-events.d.ts +1 -1
  3. package/support/components/bubble.js +1 -1
  4. package/support/components/bubble.js.map +1 -1
  5. package/support/components/button.d.ts +3 -3
  6. package/support/components/button.d.ts.map +1 -1
  7. package/support/components/button.js +4 -4
  8. package/support/components/button.js.map +1 -1
  9. package/support/components/conversation-event.js +3 -3
  10. package/support/components/conversation-event.js.map +1 -1
  11. package/support/components/header.js +3 -3
  12. package/support/components/header.js.map +1 -1
  13. package/support/components/multimodal-input.js +1 -1
  14. package/support/components/multimodal-input.js.map +1 -1
  15. package/support/components/navigation-tab.js +3 -3
  16. package/support/components/navigation-tab.js.map +1 -1
  17. package/support/components/timeline-identification-tool.js +6 -6
  18. package/support/components/timeline-identification-tool.js.map +1 -1
  19. package/support/components/timeline-message-group.js +4 -4
  20. package/support/components/timeline-message-group.js.map +1 -1
  21. package/support/components/timeline-message-item.js +3 -3
  22. package/support/components/timeline-message-item.js.map +1 -1
  23. package/support/components/typing-indicator.d.ts.map +1 -1
  24. package/support/pages/articles.js +6 -6
  25. package/support/pages/articles.js.map +1 -1
  26. package/support/pages/conversation-history.js +3 -3
  27. package/support/pages/conversation-history.js.map +1 -1
  28. package/support/pages/conversation.js +2 -2
  29. package/support/pages/conversation.js.map +1 -1
  30. package/support/pages/home.js +4 -4
  31. package/support/pages/home.js.map +1 -1
  32. package/utils/use-render-element.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cossistant/react",
3
3
  "type": "module",
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "private": false,
6
6
  "author": "Cossistant team",
7
7
  "description": "Headless React SDK for building AI-powered support/chat widgets. Hooks + primitives, WS-driven, TypeScript-first. Next.js-ready, Tailwind optional.",
@@ -88,8 +88,8 @@
88
88
  "*.css"
89
89
  ],
90
90
  "dependencies": {
91
- "@cossistant/core": "0.0.11",
92
- "@cossistant/types": "0.0.11",
91
+ "@cossistant/core": "0.0.13",
92
+ "@cossistant/types": "0.0.13",
93
93
  "class-variance-authority": "^0.7.1",
94
94
  "clsx": "^2.1.1",
95
95
  "nanoid": "^5.1.5",
@@ -187,9 +187,9 @@ declare const realtimeSchema: {
187
187
  spam: "spam";
188
188
  }>;
189
189
  priority: ZodEnum<{
190
+ normal: "normal";
190
191
  high: "high";
191
192
  low: "low";
192
- normal: "normal";
193
193
  urgent: "urgent";
194
194
  }>;
195
195
  organizationId: ZodString;
@@ -51,7 +51,7 @@ const Bubble = ({ className }) => /* @__PURE__ */ jsx(SupportBubble, {
51
51
  ease: "easeOut"
52
52
  }
53
53
  },
54
- className: "pointer-events-none flex items-center rounded-full text-primary",
54
+ className: "pointer-events-none flex items-center rounded-full text-co-primary",
55
55
  exit: {
56
56
  opacity: 0,
57
57
  scale: .9,
@@ -1 +1 @@
1
- {"version":3,"file":"bubble.js","names":["Bubble: React.FC<BubbleProps>","Primitive.Bubble","Icon"],"sources":["../../../src/support/components/bubble.tsx"],"sourcesContent":["\"use client\";\n\nimport { AnimatePresence, motion } from \"motion/react\";\nimport type React from \"react\";\nimport * as Primitive from \"../../primitives\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\nimport { BouncingDots } from \"./typing-indicator\";\n\nexport type BubbleProps = {\n\tclassName?: string;\n};\n\nexport const Bubble: React.FC<BubbleProps> = ({ className }) => (\n\t<Primitive.Bubble\n\t\tclassName={cn(\n\t\t\t\"relative flex size-12 cursor-pointer items-center justify-center rounded-full bg-co-primary text-co-primary-foreground transition-colors hover:bg-co-primary/90 data-[open=true]:bg-co-primary/90\",\n\t\t\tclassName\n\t\t)}\n\t>\n\t\t{({ isOpen, unreadCount, isTyping }) => (\n\t\t\t<>\n\t\t\t\t<AnimatePresence mode=\"wait\">\n\t\t\t\t\t{isOpen ? (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\trotate: -45,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: 45, opacity: 0 }}\n\t\t\t\t\t\t\tkey=\"chevron\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-5 w-5\" name=\"chevron-down\" />\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t) : isTyping ? (\n\t\t\t\t\t\t<motion.span\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\tduration: 0.2,\n\t\t\t\t\t\t\t\t\tease: \"easeOut\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"pointer-events-none flex items-center rounded-full text-primary\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\t\t\tease: \"easeIn\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ opacity: 0, scale: 0.9 }}\n\t\t\t\t\t\t\tkey=\"typing-indicator\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BouncingDots className=\"bg-co-primary-foreground\" />\n\t\t\t\t\t\t</motion.span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\trotate: 45,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: -45, opacity: 0 }}\n\t\t\t\t\t\t\tkey=\"chat\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-6 w-6\" name=\"chat\" variant=\"filled\" />\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</AnimatePresence>\n\n\t\t\t\t{unreadCount > 0 && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate={{ scale: 1, opacity: 1 }}\n\t\t\t\t\t\tclassName=\"-top-0 -right-0 absolute flex h-3 w-3 items-center justify-center rounded-full bg-co-destructive font-medium text-[10px] text-co-destructive-foreground text-white text-xs\"\n\t\t\t\t\t\texit={{ scale: 0, opacity: 0 }}\n\t\t\t\t\t\tinitial={{ scale: 0, opacity: 0 }}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t)}\n\t</Primitive.Bubble>\n);\n"],"mappings":";;;;;;;;;;;AAaA,MAAaA,UAAiC,EAAE,gBAC/C,oBAACC;CACA,WAAW,GACV,qM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js","names":["Bubble: React.FC<BubbleProps>","Primitive.Bubble","Icon"],"sources":["../../../src/support/components/bubble.tsx"],"sourcesContent":["\"use client\";\n\nimport { AnimatePresence, motion } from \"motion/react\";\nimport type React from \"react\";\nimport * as Primitive from \"../../primitives\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\nimport { BouncingDots } from \"./typing-indicator\";\n\nexport type BubbleProps = {\n\tclassName?: string;\n};\n\nexport const Bubble: React.FC<BubbleProps> = ({ className }) => (\n\t<Primitive.Bubble\n\t\tclassName={cn(\n\t\t\t\"relative flex size-12 cursor-pointer items-center justify-center rounded-full bg-co-primary text-co-primary-foreground transition-colors hover:bg-co-primary/90 data-[open=true]:bg-co-primary/90\",\n\t\t\tclassName\n\t\t)}\n\t>\n\t\t{({ isOpen, unreadCount, isTyping }) => (\n\t\t\t<>\n\t\t\t\t<AnimatePresence mode=\"wait\">\n\t\t\t\t\t{isOpen ? (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\trotate: -45,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: 45, opacity: 0 }}\n\t\t\t\t\t\t\tkey=\"chevron\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-5 w-5\" name=\"chevron-down\" />\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t) : isTyping ? (\n\t\t\t\t\t\t<motion.span\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\tduration: 0.2,\n\t\t\t\t\t\t\t\t\tease: \"easeOut\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"pointer-events-none flex items-center rounded-full text-co-primary\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\ttransition: {\n\t\t\t\t\t\t\t\t\tduration: 0.1,\n\t\t\t\t\t\t\t\t\tease: \"easeIn\",\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ opacity: 0, scale: 0.9 }}\n\t\t\t\t\t\t\tkey=\"typing-indicator\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<BouncingDots className=\"bg-co-primary-foreground\" />\n\t\t\t\t\t\t</motion.span>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate={{\n\t\t\t\t\t\t\t\tscale: 1,\n\t\t\t\t\t\t\t\trotate: 0,\n\t\t\t\t\t\t\t\topacity: 1,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.2, ease: \"easeOut\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tclassName=\"flex items-center justify-center\"\n\t\t\t\t\t\t\texit={{\n\t\t\t\t\t\t\t\tscale: 0.9,\n\t\t\t\t\t\t\t\trotate: 45,\n\t\t\t\t\t\t\t\topacity: 0,\n\t\t\t\t\t\t\t\ttransition: { duration: 0.1, ease: \"easeIn\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tinitial={{ scale: 0.9, rotate: -45, opacity: 0 }}\n\t\t\t\t\t\t\tkey=\"chat\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-6 w-6\" name=\"chat\" variant=\"filled\" />\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</AnimatePresence>\n\n\t\t\t\t{unreadCount > 0 && (\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate={{ scale: 1, opacity: 1 }}\n\t\t\t\t\t\tclassName=\"-top-0 -right-0 absolute flex h-3 w-3 items-center justify-center rounded-full bg-co-destructive font-medium text-[10px] text-co-destructive-foreground text-white text-xs\"\n\t\t\t\t\t\texit={{ scale: 0, opacity: 0 }}\n\t\t\t\t\t\tinitial={{ scale: 0, opacity: 0 }}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</>\n\t\t)}\n\t</Primitive.Bubble>\n);\n"],"mappings":";;;;;;;;;;;AAaA,MAAaA,UAAiC,EAAE,gBAC/C,oBAACC;CACA,WAAW,GACV,qMACA,UACA;YAEC,EAAE,QAAQ,aAAa,eACxB,4CACC,oBAAC;EAAgB,MAAK;YACpB,SACA,oBAAC,OAAO;GACP,SAAS;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,YAAY;KAAE,UAAU;KAAK,MAAM;KAAW;IAC9C;GACD,WAAU;GACV,MAAM;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,YAAY;KAAE,UAAU;KAAK,MAAM;KAAU;IAC7C;GACD,SAAS;IAAE,OAAO;IAAK,QAAQ;IAAI,SAAS;IAAG;aAG/C,oBAACC;IAAK,WAAU;IAAU,MAAK;KAAiB;KAF5C,UAGQ,GACV,WACH,oBAAC,OAAO;GACP,SAAS;IACR,SAAS;IACT,OAAO;IACP,YAAY;KACX,UAAU;KACV,MAAM;KACN;IACD;GACD,WAAU;GACV,MAAM;IACL,SAAS;IACT,OAAO;IACP,YAAY;KACX,UAAU;KACV,MAAM;KACN;IACD;GACD,SAAS;IAAE,SAAS;IAAG,OAAO;IAAK;aAGnC,oBAAC,gBAAa,WAAU,6BAA6B;KAFjD,mBAGS,GAEd,oBAAC,OAAO;GACP,SAAS;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,YAAY;KAAE,UAAU;KAAK,MAAM;KAAW;IAC9C;GACD,WAAU;GACV,MAAM;IACL,OAAO;IACP,QAAQ;IACR,SAAS;IACT,YAAY;KAAE,UAAU;KAAK,MAAM;KAAU;IAC7C;GACD,SAAS;IAAE,OAAO;IAAK,QAAQ;IAAK,SAAS;IAAG;aAGhD,oBAACA;IAAK,WAAU;IAAU,MAAK;IAAO,SAAQ;KAAW;KAFrD,OAGQ;GAEG,EAEjB,cAAc,KACd,oBAAC,OAAO;EACP,SAAS;GAAE,OAAO;GAAG,SAAS;GAAG;EACjC,WAAU;EACV,MAAM;GAAE,OAAO;GAAG,SAAS;GAAG;EAC9B,SAAS;GAAE,OAAO;GAAG,SAAS;GAAG;GAChC,IAED;EAEc"}
@@ -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"> & VariantProps<typeof coButtonVariants>;
@@ -12,12 +12,12 @@ type CossistantButtonProps = React$1.ComponentProps<"button"> & VariantProps<typ
12
12
  * Styled button primitive that forwards variant and size props to the shared
13
13
  * design tokens.
14
14
  */
15
- declare function Button({
15
+ declare function CoButton({
16
16
  className,
17
17
  variant,
18
18
  size,
19
19
  ...props
20
20
  }: CossistantButtonProps): React$1.ReactElement;
21
21
  //#endregion
22
- export { Button, CossistantButtonProps, coButtonVariants };
22
+ export { CoButton, CossistantButtonProps, coButtonVariants };
23
23
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.d.ts","names":[],"sources":["../../../src/support/components/button.tsx"],"sourcesContent":[],"mappings":";;;;;cAKa,wBA4BZ;;;AA5BD,CAAA,GA4BC,oCAAA,CAAA,SAAA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;AAEW,KAAA,qBAAA,GAAwB,OAAA,CAAM,cAAT,CAAA,QAAA,CAAA,GAChC,YADgC,CAAA,OACZ,gBADY,CAAA;;;;;AAOjB,iBAAA,MAAA,CAAM;EAAA,SAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAKnB,qBALmB,CAAA,EAKK,OAAA,CAAM,YALX"}
1
+ {"version":3,"file":"button.d.ts","names":[],"sources":["../../../src/support/components/button.tsx"],"sourcesContent":[],"mappings":";;;;;cAKa,wBA4BZ;;;AA5BD,CAAA,GA4BC,oCAAA,CAAA,SAAA,CAAA,GAAA,SAAA,EAAA,GAAA,MAAA;AAEW,KAAA,qBAAA,GAAwB,OAAA,CAAM,cAAT,CAAA,QAAA,CAAA,GAChC,YADgC,CAAA,OACZ,gBADY,CAAA;;;;;AAOjB,iBAAA,QAAA,CAAQ;EAAA,SAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAKrB,qBALqB,CAAA,EAKG,OAAA,CAAM,YALT"}
@@ -1,5 +1,5 @@
1
1
  import { cn } from "../utils/index.js";
2
- import { Button as Button$1 } from "../../primitives/button.js";
2
+ import { Button } from "../../primitives/button.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { cva } from "class-variance-authority";
5
5
 
@@ -29,8 +29,8 @@ const coButtonVariants = cva("group/btn inline-flex shrink-0 items-center justif
29
29
  * Styled button primitive that forwards variant and size props to the shared
30
30
  * design tokens.
31
31
  */
32
- function Button({ className, variant, size,...props }) {
33
- return /* @__PURE__ */ jsx(Button$1, {
32
+ function CoButton({ className, variant, size,...props }) {
33
+ return /* @__PURE__ */ jsx(Button, {
34
34
  className: cn(coButtonVariants({
35
35
  variant,
36
36
  size,
@@ -41,5 +41,5 @@ function Button({ className, variant, size,...props }) {
41
41
  }
42
42
 
43
43
  //#endregion
44
- export { Button, coButtonVariants };
44
+ export { CoButton, coButtonVariants };
45
45
  //# sourceMappingURL=button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["ButtonPrimitive"],"sources":["../../../src/support/components/button.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { Button as ButtonPrimitive } from \"../../primitives/button\";\nimport { cn } from \"../utils\";\n\nexport const coButtonVariants = cva(\n\t\"group/btn inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-all hover:cursor-pointer focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-co-primary text-co-primary-foreground hover:bg-co-primary/90\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-co-border/50 bg-co-background-50 hover:bg-co-background-100 hover:text-co-foreground dark:bg-co-background-300 dark:hover:bg-co-background-400\",\n\t\t\t\tghost:\n\t\t\t\t\t\"border-transparent hover:bg-co-background-200 hover:text-co-foreground dark:hover:bg-co-background-300\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-co-border bg-co-background hover:bg-co-background-100 dark:bg-co-background-200 dark:hover:bg-co-background-300\",\n\t\t\t\ttab: \"opacity-40 hover:bg-co-background-100 hover:text-co-foreground hover:opacity-90 dark:hover:bg-co-background-200\",\n\t\t\t\t\"tab-selected\":\n\t\t\t\t\t\"hover:bg-co-background-100 hover:text-co-foreground dark:hover:bg-co-background-200\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-8 px-4 py-2 has-[>svg]:px-3\",\n\t\t\t\tlarge: \"h-14 px-6 has-[>svg]:px-4\",\n\t\t\t\ticon: \"size-6\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t}\n);\n\nexport type CossistantButtonProps = React.ComponentProps<\"button\"> &\n\tVariantProps<typeof coButtonVariants>;\n\n/**\n * Styled button primitive that forwards variant and size props to the shared\n * design tokens.\n */\nexport function Button({\n\tclassName,\n\tvariant,\n\tsize,\n\t...props\n}: CossistantButtonProps): React.ReactElement {\n\treturn (\n\t\t<ButtonPrimitive\n\t\t\tclassName={cn(coButtonVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,IAC/B,qeACA;CACC,UAAU;EACT,SAAS;GACR,SACC;GACD,WACC;GACD,OACC;GACD,SACC;GACD,KAAK;GACL,gBACC;GACD;EACD,MAAM;GACL,SAAS;GACT,OAAO;GACP,MAAM;GACN;EACD;CACD,iBAAiB;EAChB,SAAS;EACT,MAAM;EACN;CACD,CACD;;;;;AASD,SAAgB,OAAO,EACtB,WACA,SACA,KACA,GAAG,SAC0C;AAC7C,QACC,oBAACA;EACA,WAAW,GAAG,iBAAiB;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC7D,GAAI;GACH"}
1
+ {"version":3,"file":"button.js","names":["ButtonPrimitive"],"sources":["../../../src/support/components/button.tsx"],"sourcesContent":["import { cva, type VariantProps } from \"class-variance-authority\";\nimport type * as React from \"react\";\nimport { Button as ButtonPrimitive } from \"../../primitives/button\";\nimport { cn } from \"../utils\";\n\nexport const coButtonVariants = cva(\n\t\"group/btn inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md border font-medium text-sm outline-none transition-all hover:cursor-pointer focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-co-primary text-co-primary-foreground hover:bg-co-primary/90\",\n\t\t\t\tsecondary:\n\t\t\t\t\t\"border-co-border/50 bg-co-background-50 hover:bg-co-background-100 hover:text-co-foreground dark:bg-co-background-300 dark:hover:bg-co-background-400\",\n\t\t\t\tghost:\n\t\t\t\t\t\"border-transparent hover:bg-co-background-200 hover:text-co-foreground dark:hover:bg-co-background-300\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-co-border bg-co-background hover:bg-co-background-100 dark:bg-co-background-200 dark:hover:bg-co-background-300\",\n\t\t\t\ttab: \"opacity-40 hover:bg-co-background-100 hover:text-co-foreground hover:opacity-90 dark:hover:bg-co-background-200\",\n\t\t\t\t\"tab-selected\":\n\t\t\t\t\t\"hover:bg-co-background-100 hover:text-co-foreground dark:hover:bg-co-background-200\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"h-8 px-4 py-2 has-[>svg]:px-3\",\n\t\t\t\tlarge: \"h-14 px-6 has-[>svg]:px-4\",\n\t\t\t\ticon: \"size-6\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: \"default\",\n\t\t\tsize: \"default\",\n\t\t},\n\t}\n);\n\nexport type CossistantButtonProps = React.ComponentProps<\"button\"> &\n\tVariantProps<typeof coButtonVariants>;\n\n/**\n * Styled button primitive that forwards variant and size props to the shared\n * design tokens.\n */\nexport function CoButton({\n\tclassName,\n\tvariant,\n\tsize,\n\t...props\n}: CossistantButtonProps): React.ReactElement {\n\treturn (\n\t\t<ButtonPrimitive\n\t\t\tclassName={cn(coButtonVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n"],"mappings":";;;;;;AAKA,MAAa,mBAAmB,IAC/B,qeACA;CACC,UAAU;EACT,SAAS;GACR,SACC;GACD,WACC;GACD,OACC;GACD,SACC;GACD,KAAK;GACL,gBACC;GACD;EACD,MAAM;GACL,SAAS;GACT,OAAO;GACP,MAAM;GACN;EACD;CACD,iBAAiB;EAChB,SAAS;EACT,MAAM;EACN;CACD,CACD;;;;;AASD,SAAgB,SAAS,EACxB,WACA,SACA,KACA,GAAG,SAC0C;AAC7C,QACC,oBAACA;EACA,WAAW,GAAG,iBAAiB;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC7D,GAAI;GACH"}
@@ -45,13 +45,13 @@ const ConversationEvent = ({ event, availableAIAgents, createdAt, availableHuman
45
45
  ease: "easeOut"
46
46
  },
47
47
  children: /* @__PURE__ */ jsxs("div", {
48
- className: "flex items-center gap-2 text-muted-foreground text-xs",
48
+ className: "flex items-center gap-2 text-co-muted-foreground text-xs",
49
49
  children: [
50
50
  /* @__PURE__ */ jsx("div", {
51
51
  className: "flex flex-col justify-end",
52
52
  children: isAI ? /* @__PURE__ */ jsx("div", {
53
- className: "flex size-5 items-center justify-center rounded-full bg-primary/10",
54
- children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-3 w-3 text-primary" })
53
+ className: "flex size-5 items-center justify-center rounded-full bg-co-primary/10",
54
+ children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-3 w-3 text-co-primary" })
55
55
  }) : /* @__PURE__ */ jsx(Avatar, {
56
56
  className: "size-5 flex-shrink-0 overflow-clip rounded-full",
57
57
  image: humanAgent?.image,
@@ -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\";\nimport { CossistantLogo } from \"./cossistant-branding\";\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 py-4\"\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-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<div className=\"flex size-5 items-center justify-center rounded-full bg-primary/10\">\n\t\t\t\t\t\t\t<CossistantLogo className=\"h-3 w-3 text-primary\" />\n\t\t\t\t\t\t</div>\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-full\"\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":";;;;;;;AAkBA,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;MAAI,WAAU;gBACd,oBAAC,kBAAe,WAAU,yBAAyB;OAC9C,GAEN,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\";\nimport { CossistantLogo } from \"./cossistant-branding\";\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 py-4\"\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<div className=\"flex size-5 items-center justify-center rounded-full bg-co-primary/10\">\n\t\t\t\t\t\t\t<CossistantLogo className=\"h-3 w-3 text-co-primary\" />\n\t\t\t\t\t\t</div>\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-full\"\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":";;;;;;;AAkBA,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/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kBAAkB,cAAc"}
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../utils/index.js";
2
2
  import { useSupportConfig } from "../store/support-store.js";
3
- import { Button } from "./button.js";
3
+ import { CoButton } from "./button.js";
4
4
  import icons_default from "./icons.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
6
 
@@ -14,7 +14,7 @@ const Header = ({ className, children, actions, onGoBack }) => {
14
14
  children: [
15
15
  /* @__PURE__ */ jsxs("div", {
16
16
  className: "flex flex-1 items-center gap-3",
17
- children: [onGoBack && /* @__PURE__ */ jsx(Button, {
17
+ children: [onGoBack && /* @__PURE__ */ jsx(CoButton, {
18
18
  onClick: onGoBack,
19
19
  size: "icon",
20
20
  type: "button",
@@ -26,7 +26,7 @@ const Header = ({ className, children, actions, onGoBack }) => {
26
26
  className: "flex items-center gap-2",
27
27
  children: actions
28
28
  }),
29
- /* @__PURE__ */ jsx(Button, {
29
+ /* @__PURE__ */ jsx(CoButton, {
30
30
  onClick: close,
31
31
  size: "icon",
32
32
  type: "button",
@@ -1 +1 @@
1
- {"version":3,"file":"header.js","names":["Header: React.FC<HeaderProps>","Icon"],"sources":["../../../src/support/components/header.tsx"],"sourcesContent":["import { useSupportConfig } from \"../store\";\nimport { cn } from \"../utils\";\nimport { Button } from \"./button\";\nimport Icon from \"./icons\";\n\nexport type HeaderProps = {\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tactions?: React.ReactNode;\n\tonGoBack?: () => void;\n};\n\nexport const Header: React.FC<HeaderProps> = ({\n\tclassName,\n\tchildren,\n\tactions,\n\tonGoBack,\n}) => {\n\tconst { close } = useSupportConfig();\n\n\treturn (\n\t\t<div className={cn(\"absolute inset-x-0 top-0 z-10 h-18\", className)}>\n\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-between gap-3 px-4\">\n\t\t\t\t<div className=\"flex flex-1 items-center gap-3\">\n\t\t\t\t\t{onGoBack && (\n\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\tonClick={onGoBack}\n\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon name=\"arrow-left\" />\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t)}\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t{actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n\t\t\t\t<Button onClick={close} size=\"icon\" type=\"button\" variant=\"ghost\">\n\t\t\t\t\t<Icon name=\"close\" />\n\t\t\t\t</Button>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;AAYA,MAAaA,UAAiC,EAC7C,WACA,UACA,SACA,eACK;CACL,MAAM,EAAE,UAAU,kBAAkB;AAEpC,QACC,oBAAC;EAAI,WAAW,GAAG,sCAAsC,UAAU;YAClE,qBAAC;GAAI,WAAU;;IACd,qBAAC;KAAI,WAAU;gBACb,YACA,oBAAC;MACA,SAAS;MACT,MAAK;MACL,MAAK;MACL,SAAQ;gBAER,oBAACC,iBAAK,MAAK,eAAe;OAClB,EAET;MACI;IACL,WAAW,oBAAC;KAAI,WAAU;eAA2B;MAAc;IACpE,oBAAC;KAAO,SAAS;KAAO,MAAK;KAAO,MAAK;KAAS,SAAQ;eACzD,oBAACA,iBAAK,MAAK,UAAU;MACb;;IACJ;GACD"}
1
+ {"version":3,"file":"header.js","names":["Header: React.FC<HeaderProps>","Icon"],"sources":["../../../src/support/components/header.tsx"],"sourcesContent":["import { useSupportConfig } from \"../store\";\nimport { cn } from \"../utils\";\nimport { CoButton } from \"./button\";\nimport Icon from \"./icons\";\n\nexport type HeaderProps = {\n\tclassName?: string;\n\tchildren?: React.ReactNode;\n\tactions?: React.ReactNode;\n\tonGoBack?: () => void;\n};\n\nexport const Header: React.FC<HeaderProps> = ({\n\tclassName,\n\tchildren,\n\tactions,\n\tonGoBack,\n}) => {\n\tconst { close } = useSupportConfig();\n\n\treturn (\n\t\t<div className={cn(\"absolute inset-x-0 top-0 z-10 h-18\", className)}>\n\t\t\t<div className=\"absolute inset-0 z-10 flex items-center justify-between gap-3 px-4\">\n\t\t\t\t<div className=\"flex flex-1 items-center gap-3\">\n\t\t\t\t\t{onGoBack && (\n\t\t\t\t\t\t<CoButton\n\t\t\t\t\t\t\tonClick={onGoBack}\n\t\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon name=\"arrow-left\" />\n\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t)}\n\t\t\t\t\t{children}\n\t\t\t\t</div>\n\t\t\t\t{actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n\t\t\t\t<CoButton onClick={close} size=\"icon\" type=\"button\" variant=\"ghost\">\n\t\t\t\t\t<Icon name=\"close\" />\n\t\t\t\t</CoButton>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;AAYA,MAAaA,UAAiC,EAC7C,WACA,UACA,SACA,eACK;CACL,MAAM,EAAE,UAAU,kBAAkB;AAEpC,QACC,oBAAC;EAAI,WAAW,GAAG,sCAAsC,UAAU;YAClE,qBAAC;GAAI,WAAU;;IACd,qBAAC;KAAI,WAAU;gBACb,YACA,oBAAC;MACA,SAAS;MACT,MAAK;MACL,MAAK;MACL,SAAQ;gBAER,oBAACC,iBAAK,MAAK,eAAe;OAChB,EAEX;MACI;IACL,WAAW,oBAAC;KAAI,WAAU;eAA2B;MAAc;IACpE,oBAAC;KAAS,SAAS;KAAO,MAAK;KAAO,MAAK;KAAS,SAAQ;eAC3D,oBAACA,iBAAK,MAAK,UAAU;MACX;;IACN;GACD"}
@@ -83,7 +83,7 @@ const MultimodalInput = ({ className, value, onChange, onSubmit, onFileSelect, p
83
83
  /* @__PURE__ */ jsxs("div", {
84
84
  className: "flex flex-col rounded border border-co-border/50 bg-co-background-100 dark:bg-co-background-200",
85
85
  children: [/* @__PURE__ */ jsx(MultimodalInput$1, {
86
- className: cn("flex-1 resize-none overflow-hidden p-3 text-co-foreground text-sm placeholder:text-primary/40 focus-visible:outline-none", className),
86
+ className: cn("flex-1 resize-none overflow-hidden p-3 text-co-foreground text-sm placeholder:text-co-primary/40 focus-visible:outline-none", className),
87
87
  disabled: disabled || isSubmitting,
88
88
  error,
89
89
  onChange,
@@ -1 +1 @@
1
- {"version":3,"file":"multimodal-input.js","names":["MultimodalInput: React.FC<MultimodalInputProps>","Icon","Primitive.MultimodalInput","SendButton: React.FC<SendButtonProps>","Primitive.Button"],"sources":["../../../src/support/components/multimodal-input.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { useRef } from \"react\";\nimport { useComposerRefocus } from \"../../hooks/use-composer-refocus\";\nimport * as Primitive from \"../../primitives\";\nimport { useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\nimport { Watermark } from \"./watermark\";\n\nexport type MultimodalInputProps = {\n\tclassName?: string;\n\tvalue: string;\n\tonChange: (value: string) => void;\n\tonSubmit: () => void;\n\tonFileSelect?: (files: File[]) => void;\n\tplaceholder?: string;\n\tdisabled?: boolean;\n\tisSubmitting?: boolean;\n\terror?: Error | null;\n\tfiles?: File[];\n\tonRemoveFile?: (index: number) => void;\n\tmaxFiles?: number;\n\tmaxFileSize?: number;\n\tallowedFileTypes?: string[];\n};\n\nexport const MultimodalInput: React.FC<MultimodalInputProps> = ({\n\tclassName,\n\tvalue,\n\tonChange,\n\tonSubmit,\n\tonFileSelect,\n\tplaceholder,\n\tdisabled = false,\n\tisSubmitting = false,\n\terror,\n\tfiles = [],\n\tonRemoveFile,\n\tmaxFiles = 5,\n\tmaxFileSize = 10 * 1024 * 1024, // 10MB\n\tallowedFileTypes = [\"image/*\", \"application/pdf\", \"text/*\"],\n}) => {\n\tconst fileInputRef = useRef<HTMLInputElement>(null);\n\tconst hasContent = value.trim().length > 0 || files.length > 0;\n\tconst { focusComposer, inputRef } = useComposerRefocus({\n\t\tdisabled,\n\t\thasContent,\n\t\tisSubmitting,\n\t});\n\tconst canSubmit = !(disabled || isSubmitting) && hasContent;\n\tconst text = useSupportText();\n\tconst resolvedPlaceholder =\n\t\tplaceholder ?? text(\"component.multimodalInput.placeholder\");\n\n\tconst handleSubmit = () => {\n\t\tif (!canSubmit) {\n\t\t\treturn;\n\t\t}\n\n\t\tonSubmit();\n\t\tfocusComposer();\n\t};\n\n\tconst handleFormSubmit = (e: React.FormEvent) => {\n\t\te.preventDefault();\n\t\thandleSubmit();\n\t};\n\n\tconst handleAttachClick = () => {\n\t\tif (files.length < maxFiles) {\n\t\t\tfileInputRef.current?.click();\n\t\t}\n\t};\n\n\tconst formatFileSize = (bytes: number) => {\n\t\tif (bytes < 1024) {\n\t\t\treturn `${bytes} B`;\n\t\t}\n\t\tif (bytes < 1024 * 1024) {\n\t\t\treturn `${(bytes / 1024).toFixed(1)} KB`;\n\t\t}\n\t\treturn `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n\t};\n\n\treturn (\n\t\t<form className=\"flex flex-col gap-2\" onSubmit={handleFormSubmit}>\n\t\t\t{/* Error message */}\n\t\t\t{error && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"rounded-md bg-co-destructive-muted p-2 text-co-destructive text-xs\"\n\t\t\t\t\tid=\"multimodal-input-error\"\n\t\t\t\t>\n\t\t\t\t\t{error.message}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* File attachments */}\n\t\t\t{files.length > 0 && (\n\t\t\t\t<div className=\"flex flex-wrap gap-2 p-2\">\n\t\t\t\t\t{files.map((file, index) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 rounded-md bg-co-muted px-2 py-1 text-xs\"\n\t\t\t\t\t\t\tkey={`${file.name}-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-3 w-3\" name=\"attachment\" />\n\t\t\t\t\t\t\t<span className=\"max-w-[150px] truncate\">{file.name}</span>\n\t\t\t\t\t\t\t<span className=\"text-co-muted-foreground\">\n\t\t\t\t\t\t\t\t{formatFileSize(file.size)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{onRemoveFile && (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\taria-label={text(\"common.actions.removeFile\", {\n\t\t\t\t\t\t\t\t\t\tfileName: file.name,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\tclassName=\"ml-1 hover:text-co-destructive\"\n\t\t\t\t\t\t\t\t\tonClick={() => onRemoveFile(index)}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon className=\"h-3 w-3\" name=\"close\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Input area */}\n\t\t\t<div className=\"flex flex-col rounded border border-co-border/50 bg-co-background-100 dark:bg-co-background-200\">\n\t\t\t\t<Primitive.MultimodalInput\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex-1 resize-none overflow-hidden p-3 text-co-foreground text-sm placeholder:text-primary/40 focus-visible:outline-none\",\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={disabled || isSubmitting}\n\t\t\t\t\terror={error}\n\t\t\t\t\tonChange={onChange}\n\t\t\t\t\tonFileSelect={onFileSelect}\n\t\t\t\t\tonSubmit={handleSubmit}\n\t\t\t\t\tplaceholder={resolvedPlaceholder}\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tvalue={value}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex items-center justify-between py-1 pr-1 pl-3\">\n\t\t\t\t\t<Watermark />\n\n\t\t\t\t\t<div className=\"flex items-center gap-0.5\">\n\t\t\t\t\t\t{/* File attachment button */}\n\t\t\t\t\t\t{/* {onFileSelect && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\taria-label={text(\"common.actions.attachFiles\")}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"group flex h-8 w-8 items-center justify-center rounded-md text-co-muted-foreground hover:bg-co-muted hover:text-co-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\t\t\t\t\tfiles.length >= maxFiles && \"opacity-50\"\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\tdisabled || isSubmitting || files.length >= maxFiles\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={handleAttachClick}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon className=\"h-4 w-4\" name=\"attachment\" />\n\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t<Primitive.FileInput\n\t\t\t\t\t\t\t\t\taccept={allowedFileTypes.join(\",\")}\n\t\t\t\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\tdisabled || isSubmitting || files.length >= maxFiles\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonFileSelect={onFileSelect}\n\t\t\t\t\t\t\t\t\tref={fileInputRef}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)} */}\n\n\t\t\t\t\t\t{/* Send button */}\n\t\t\t\t\t\t<SendButton disabled={!canSubmit} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>\n\t);\n};\n\nexport type SendButtonProps = {\n\tclassName?: string;\n\tdisabled?: boolean;\n};\n\nexport const SendButton: React.FC<SendButtonProps> = ({\n\tclassName,\n\tdisabled = false,\n}) => (\n\t<Primitive.Button\n\t\tclassName={cn(\n\t\t\t\"group flex h-8 w-8 items-center justify-center rounded-md text-co-primary hover:bg-co-muted disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\tclassName\n\t\t)}\n\t\tdisabled={disabled}\n\t\ttype=\"submit\"\n\t>\n\t\t<Icon className=\"h-4 w-4\" filledOnHover name=\"send\" />\n\t</Primitive.Button>\n);\n"],"mappings":";;;;;;;;;;;;;;AA4BA,MAAaA,mBAAmD,EAC/D,WACA,OACA,UACA,UACA,cACA,aACA,WAAW,OACX,eAAe,OACf,OACA,QAAQ,EAAE,EACV,cACA,WAAW,GACX,cAAc,KAAK,OAAO,MAC1B,mBAAmB;CAAC;CAAW;CAAmB;CAAS,OACtD;AACgB,QAAyB,KAAK;CACnD,MAAM,aAAa,MAAM,MAAM,CAAC,SAAS,KAAK,MAAM,SAAS;CAC7D,MAAM,EAAE,eAAe,aAAa,mBAAmB;EACtD;EACA;EACA;EACA,CAAC;CACF,MAAM,YAAY,EAAE,YAAY,iBAAiB;CACjD,MAAM,OAAO,gBAAgB;CAC7B,MAAM,sBACL,eAAe,KAAK,wCAAwC;CAE7D,MAAM,qBAAqB;AAC1B,MAAI,CAAC,UACJ;AAGD,YAAU;AACV,iBAAe;;CAGhB,MAAM,oBAAoB,MAAuB;AAChD,IAAE,gBAAgB;AAClB,gBAAc;;CASf,MAAM,kBAAkB,UAAkB;AACzC,MAAI,QAAQ,KACX,QAAO,GAAG,MAAM;AAEjB,MAAI,QAAQ,OAAO,KAClB,QAAO,IAAI,QAAQ,MAAM,QAAQ,EAAE,CAAC;AAErC,SAAO,IAAI,SAAS,OAAO,OAAO,QAAQ,EAAE,CAAC;;AAG9C,QACC,qBAAC;EAAK,WAAU;EAAsB,UAAU;;GAE9C,SACA,oBAAC;IACA,WAAU;IACV,IAAG;cAEF,MAAM;KACF;GAIN,MAAM,SAAS,KACf,oBAAC;IAAI,WAAU;cACb,MAAM,KAAK,MAAM,UACjB,qBAAC;KACA,WAAU;;MAGV,oBAACC;OAAK,WAAU;OAAU,MAAK;QAAe;MAC9C,oBAAC;OAAK,WAAU;iBAA0B,KAAK;QAAY;MAC3D,oBAAC;OAAK,WAAU;iBACd,eAAe,KAAK,KAAK;QACpB;MACN,gBACA,oBAAC;OACA,cAAY,KAAK,6BAA6B,EAC7C,UAAU,KAAK,MACf,CAAC;OACF,WAAU;OACV,eAAe,aAAa,MAAM;OAClC,MAAK;iBAEL,oBAACA;QAAK,WAAU;QAAU,MAAK;SAAU;QACjC;;OAjBL,GAAG,KAAK,KAAK,GAAG,QAmBhB,CACL;KACG;GAIP,qBAAC;IAAI,WAAU;eACd,oBAACC;KACA,WAAW,GACV,4HACA,UACA;KACD,UAAU,YAAY;KACf;KACG;KACI;KACd,UAAU;KACV,aAAa;KACb,KAAK;KACE;MACN,EAEF,qBAAC;KAAI,WAAU;gBACd,oBAAC,cAAY,EAEb,oBAAC;MAAI,WAAU;gBAgCd,oBAAC,cAAW,UAAU,CAAC,YAAa;OAC/B;MACD;KACD;;GACA;;AAST,MAAaC,cAAyC,EACrD,WACA,WAAW,YAEX,oBAACC;CACA,WAAW,GACV,+IACA,UACA;CACS;CACV,MAAK;WAEL,oBAACH;EAAK,WAAU;EAAU;EAAc,MAAK;GAAS;EACpC"}
1
+ {"version":3,"file":"multimodal-input.js","names":["MultimodalInput: React.FC<MultimodalInputProps>","Icon","Primitive.MultimodalInput","SendButton: React.FC<SendButtonProps>","Primitive.Button"],"sources":["../../../src/support/components/multimodal-input.tsx"],"sourcesContent":["\"use client\";\n\nimport type React from \"react\";\nimport { useRef } from \"react\";\nimport { useComposerRefocus } from \"../../hooks/use-composer-refocus\";\nimport * as Primitive from \"../../primitives\";\nimport { useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\nimport Icon from \"./icons\";\nimport { Watermark } from \"./watermark\";\n\nexport type MultimodalInputProps = {\n\tclassName?: string;\n\tvalue: string;\n\tonChange: (value: string) => void;\n\tonSubmit: () => void;\n\tonFileSelect?: (files: File[]) => void;\n\tplaceholder?: string;\n\tdisabled?: boolean;\n\tisSubmitting?: boolean;\n\terror?: Error | null;\n\tfiles?: File[];\n\tonRemoveFile?: (index: number) => void;\n\tmaxFiles?: number;\n\tmaxFileSize?: number;\n\tallowedFileTypes?: string[];\n};\n\nexport const MultimodalInput: React.FC<MultimodalInputProps> = ({\n\tclassName,\n\tvalue,\n\tonChange,\n\tonSubmit,\n\tonFileSelect,\n\tplaceholder,\n\tdisabled = false,\n\tisSubmitting = false,\n\terror,\n\tfiles = [],\n\tonRemoveFile,\n\tmaxFiles = 5,\n\tmaxFileSize = 10 * 1024 * 1024, // 10MB\n\tallowedFileTypes = [\"image/*\", \"application/pdf\", \"text/*\"],\n}) => {\n\tconst fileInputRef = useRef<HTMLInputElement>(null);\n\tconst hasContent = value.trim().length > 0 || files.length > 0;\n\tconst { focusComposer, inputRef } = useComposerRefocus({\n\t\tdisabled,\n\t\thasContent,\n\t\tisSubmitting,\n\t});\n\tconst canSubmit = !(disabled || isSubmitting) && hasContent;\n\tconst text = useSupportText();\n\tconst resolvedPlaceholder =\n\t\tplaceholder ?? text(\"component.multimodalInput.placeholder\");\n\n\tconst handleSubmit = () => {\n\t\tif (!canSubmit) {\n\t\t\treturn;\n\t\t}\n\n\t\tonSubmit();\n\t\tfocusComposer();\n\t};\n\n\tconst handleFormSubmit = (e: React.FormEvent) => {\n\t\te.preventDefault();\n\t\thandleSubmit();\n\t};\n\n\tconst handleAttachClick = () => {\n\t\tif (files.length < maxFiles) {\n\t\t\tfileInputRef.current?.click();\n\t\t}\n\t};\n\n\tconst formatFileSize = (bytes: number) => {\n\t\tif (bytes < 1024) {\n\t\t\treturn `${bytes} B`;\n\t\t}\n\t\tif (bytes < 1024 * 1024) {\n\t\t\treturn `${(bytes / 1024).toFixed(1)} KB`;\n\t\t}\n\t\treturn `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n\t};\n\n\treturn (\n\t\t<form className=\"flex flex-col gap-2\" onSubmit={handleFormSubmit}>\n\t\t\t{/* Error message */}\n\t\t\t{error && (\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"rounded-md bg-co-destructive-muted p-2 text-co-destructive text-xs\"\n\t\t\t\t\tid=\"multimodal-input-error\"\n\t\t\t\t>\n\t\t\t\t\t{error.message}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* File attachments */}\n\t\t\t{files.length > 0 && (\n\t\t\t\t<div className=\"flex flex-wrap gap-2 p-2\">\n\t\t\t\t\t{files.map((file, index) => (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"flex items-center gap-2 rounded-md bg-co-muted px-2 py-1 text-xs\"\n\t\t\t\t\t\t\tkey={`${file.name}-${index}`}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<Icon className=\"h-3 w-3\" name=\"attachment\" />\n\t\t\t\t\t\t\t<span className=\"max-w-[150px] truncate\">{file.name}</span>\n\t\t\t\t\t\t\t<span className=\"text-co-muted-foreground\">\n\t\t\t\t\t\t\t\t{formatFileSize(file.size)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{onRemoveFile && (\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\taria-label={text(\"common.actions.removeFile\", {\n\t\t\t\t\t\t\t\t\t\tfileName: file.name,\n\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\tclassName=\"ml-1 hover:text-co-destructive\"\n\t\t\t\t\t\t\t\t\tonClick={() => onRemoveFile(index)}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon className=\"h-3 w-3\" name=\"close\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t))}\n\t\t\t\t</div>\n\t\t\t)}\n\n\t\t\t{/* Input area */}\n\t\t\t<div className=\"flex flex-col rounded border border-co-border/50 bg-co-background-100 dark:bg-co-background-200\">\n\t\t\t\t<Primitive.MultimodalInput\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex-1 resize-none overflow-hidden p-3 text-co-foreground text-sm placeholder:text-co-primary/40 focus-visible:outline-none\",\n\t\t\t\t\t\tclassName\n\t\t\t\t\t)}\n\t\t\t\t\tdisabled={disabled || isSubmitting}\n\t\t\t\t\terror={error}\n\t\t\t\t\tonChange={onChange}\n\t\t\t\t\tonFileSelect={onFileSelect}\n\t\t\t\t\tonSubmit={handleSubmit}\n\t\t\t\t\tplaceholder={resolvedPlaceholder}\n\t\t\t\t\tref={inputRef}\n\t\t\t\t\tvalue={value}\n\t\t\t\t/>\n\n\t\t\t\t<div className=\"flex items-center justify-between py-1 pr-1 pl-3\">\n\t\t\t\t\t<Watermark />\n\n\t\t\t\t\t<div className=\"flex items-center gap-0.5\">\n\t\t\t\t\t\t{/* File attachment button */}\n\t\t\t\t\t\t{/* {onFileSelect && (\n\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\taria-label={text(\"common.actions.attachFiles\")}\n\t\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\t\"group flex h-8 w-8 items-center justify-center rounded-md text-co-muted-foreground hover:bg-co-muted hover:text-co-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\t\t\t\t\t\t\tfiles.length >= maxFiles && \"opacity-50\"\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\tdisabled || isSubmitting || files.length >= maxFiles\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonClick={handleAttachClick}\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon className=\"h-4 w-4\" name=\"attachment\" />\n\t\t\t\t\t\t\t\t</button>\n\n\t\t\t\t\t\t\t\t<Primitive.FileInput\n\t\t\t\t\t\t\t\t\taccept={allowedFileTypes.join(\",\")}\n\t\t\t\t\t\t\t\t\tclassName=\"hidden\"\n\t\t\t\t\t\t\t\t\tdisabled={\n\t\t\t\t\t\t\t\t\t\tdisabled || isSubmitting || files.length >= maxFiles\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tonFileSelect={onFileSelect}\n\t\t\t\t\t\t\t\t\tref={fileInputRef}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t)} */}\n\n\t\t\t\t\t\t{/* Send button */}\n\t\t\t\t\t\t<SendButton disabled={!canSubmit} />\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>\n\t);\n};\n\nexport type SendButtonProps = {\n\tclassName?: string;\n\tdisabled?: boolean;\n};\n\nexport const SendButton: React.FC<SendButtonProps> = ({\n\tclassName,\n\tdisabled = false,\n}) => (\n\t<Primitive.Button\n\t\tclassName={cn(\n\t\t\t\"group flex h-8 w-8 items-center justify-center rounded-md text-co-primary hover:bg-co-muted disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\tclassName\n\t\t)}\n\t\tdisabled={disabled}\n\t\ttype=\"submit\"\n\t>\n\t\t<Icon className=\"h-4 w-4\" filledOnHover name=\"send\" />\n\t</Primitive.Button>\n);\n"],"mappings":";;;;;;;;;;;;;;AA4BA,MAAaA,mBAAmD,EAC/D,WACA,OACA,UACA,UACA,cACA,aACA,WAAW,OACX,eAAe,OACf,OACA,QAAQ,EAAE,EACV,cACA,WAAW,GACX,cAAc,KAAK,OAAO,MAC1B,mBAAmB;CAAC;CAAW;CAAmB;CAAS,OACtD;AACgB,QAAyB,KAAK;CACnD,MAAM,aAAa,MAAM,MAAM,CAAC,SAAS,KAAK,MAAM,SAAS;CAC7D,MAA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,cAAY,EAEb,oBAAC;MAAI,WAAU;gBAgCd,oBAAC,cAAW,UAAU,CAAC,YAAa;OAC/B;MACD;KACD;;GACA;;AAST,MAAaC,cAAyC,EACrD,WACA,WAAW,YAEX,oBAACC;CACA,WAAW,GACV,+IACA,UACA;CACS;CACV,MAAK;WAEL,oBAACH;EAAK,WAAU;EAAU;EAAc,MAAK;GAAS;EACpC"}
@@ -1,5 +1,5 @@
1
1
  import { useSupportNavigation } from "../store/support-store.js";
2
- import { Button } from "./button.js";
2
+ import { CoButton } from "./button.js";
3
3
  import icons_default from "./icons.js";
4
4
  import { Text } from "../text/index.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -13,7 +13,7 @@ function NavigationTab() {
13
13
  const { current, navigate } = useSupportNavigation();
14
14
  return /* @__PURE__ */ jsxs("div", {
15
15
  className: "flex w-full items-center justify-center gap-2",
16
- children: [/* @__PURE__ */ jsxs(Button, {
16
+ children: [/* @__PURE__ */ jsxs(CoButton, {
17
17
  onClick: () => navigate({ page: "HOME" }),
18
18
  variant: current.page === "HOME" ? "tab-selected" : "tab",
19
19
  children: [/* @__PURE__ */ jsx(icons_default, {
@@ -24,7 +24,7 @@ function NavigationTab() {
24
24
  as: "span",
25
25
  textKey: "component.navigation.home"
26
26
  })]
27
- }), /* @__PURE__ */ jsxs(Button, {
27
+ }), /* @__PURE__ */ jsxs(CoButton, {
28
28
  onClick: () => navigate({ page: "ARTICLES" }),
29
29
  variant: current.page === "ARTICLES" ? "tab-selected" : "tab",
30
30
  children: [/* @__PURE__ */ jsx(icons_default, {
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-tab.js","names":["Icon"],"sources":["../../../src/support/components/navigation-tab.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\n\nimport { useSupportNavigation } from \"../store\";\nimport { Text } from \"../text\";\nimport { Button } from \"./button\";\nimport Icon from \"./icons\";\n\n/**\n * Tab bar used inside the widget header to switch between home and knowledge\n * base views.\n */\nexport function NavigationTab(): ReactElement {\n\tconst { current, navigate } = useSupportNavigation();\n\n\treturn (\n\t\t<div className=\"flex w-full items-center justify-center gap-2\">\n\t\t\t<Button\n\t\t\t\tonClick={() => navigate({ page: \"HOME\" })}\n\t\t\t\tvariant={current.page === \"HOME\" ? \"tab-selected\" : \"tab\"}\n\t\t\t>\n\t\t\t\t<Icon\n\t\t\t\t\tfilledOnHover\n\t\t\t\t\tname=\"home\"\n\t\t\t\t\tvariant={current.page === \"HOME\" ? \"filled\" : \"default\"}\n\t\t\t\t/>\n\t\t\t\t<Text as=\"span\" textKey=\"component.navigation.home\" />\n\t\t\t</Button>\n\t\t\t<Button\n\t\t\t\tonClick={() => navigate({ page: \"ARTICLES\" })}\n\t\t\t\tvariant={current.page === \"ARTICLES\" ? \"tab-selected\" : \"tab\"}\n\t\t\t>\n\t\t\t\t<Icon\n\t\t\t\t\tfilledOnHover\n\t\t\t\t\tname=\"articles\"\n\t\t\t\t\tvariant={current.page === \"ARTICLES\" ? \"filled\" : \"default\"}\n\t\t\t\t/>\n\t\t\t\t<Text as=\"span\" textKey=\"component.navigation.articles\" />\n\t\t\t</Button>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,gBAA8B;CAC7C,MAAM,EAAE,SAAS,aAAa,sBAAsB;AAEpD,QACC,qBAAC;EAAI,WAAU;aACd,qBAAC;GACA,eAAe,SAAS,EAAE,MAAM,QAAQ,CAAC;GACzC,SAAS,QAAQ,SAAS,SAAS,iBAAiB;cAEpD,oBAACA;IACA;IACA,MAAK;IACL,SAAS,QAAQ,SAAS,SAAS,WAAW;KAC7C,EACF,oBAAC;IAAK,IAAG;IAAO,SAAQ;KAA8B;IAC9C,EACT,qBAAC;GACA,eAAe,SAAS,EAAE,MAAM,YAAY,CAAC;GAC7C,SAAS,QAAQ,SAAS,aAAa,iBAAiB;cAExD,oBAACA;IACA;IACA,MAAK;IACL,SAAS,QAAQ,SAAS,aAAa,WAAW;KACjD,EACF,oBAAC;IAAK,IAAG;IAAO,SAAQ;KAAkC;IAClD;GACJ"}
1
+ {"version":3,"file":"navigation-tab.js","names":["Icon"],"sources":["../../../src/support/components/navigation-tab.tsx"],"sourcesContent":["import type { ReactElement } from \"react\";\n\nimport { useSupportNavigation } from \"../store\";\nimport { Text } from \"../text\";\nimport { CoButton } from \"./button\";\nimport Icon from \"./icons\";\n\n/**\n * Tab bar used inside the widget header to switch between home and knowledge\n * base views.\n */\nexport function NavigationTab(): ReactElement {\n\tconst { current, navigate } = useSupportNavigation();\n\n\treturn (\n\t\t<div className=\"flex w-full items-center justify-center gap-2\">\n\t\t\t<CoButton\n\t\t\t\tonClick={() => navigate({ page: \"HOME\" })}\n\t\t\t\tvariant={current.page === \"HOME\" ? \"tab-selected\" : \"tab\"}\n\t\t\t>\n\t\t\t\t<Icon\n\t\t\t\t\tfilledOnHover\n\t\t\t\t\tname=\"home\"\n\t\t\t\t\tvariant={current.page === \"HOME\" ? \"filled\" : \"default\"}\n\t\t\t\t/>\n\t\t\t\t<Text as=\"span\" textKey=\"component.navigation.home\" />\n\t\t\t</CoButton>\n\t\t\t<CoButton\n\t\t\t\tonClick={() => navigate({ page: \"ARTICLES\" })}\n\t\t\t\tvariant={current.page === \"ARTICLES\" ? \"tab-selected\" : \"tab\"}\n\t\t\t>\n\t\t\t\t<Icon\n\t\t\t\t\tfilledOnHover\n\t\t\t\t\tname=\"articles\"\n\t\t\t\t\tvariant={current.page === \"ARTICLES\" ? \"filled\" : \"default\"}\n\t\t\t\t/>\n\t\t\t\t<Text as=\"span\" textKey=\"component.navigation.articles\" />\n\t\t\t</CoButton>\n\t\t</div>\n\t);\n}\n"],"mappings":";;;;;;;;;;;AAWA,SAAgB,gBAA8B;CAC7C,MAAM,EAAE,SAAS,aAAa,sBAAsB;AAEpD,QACC,qBAAC;EAAI,WAAU;aACd,qBAAC;GACA,eAAe,SAAS,EAAE,MAAM,QAAQ,CAAC;GACzC,SAAS,QAAQ,SAAS,SAAS,iBAAiB;cAEpD,oBAACA;IACA;IACA,MAAK;IACL,SAAS,QAAQ,SAAS,SAAS,WAAW;KAC7C,EACF,oBAAC;IAAK,IAAG;IAAO,SAAQ;KAA8B;IAC5C,EACX,qBAAC;GACA,eAAe,SAAS,EAAE,MAAM,YAAY,CAAC;GAC7C,SAAS,QAAQ,SAAS,aAAa,iBAAiB;cAExD,oBAACA;IACA;IACA,MAAK;IACL,SAAS,QAAQ,SAAS,aAAa,WAAW;KACjD,EACF,oBAAC;IAAK,IAAG;IAAO,SAAQ;KAAkC;IAChD;GACN"}
@@ -1,4 +1,4 @@
1
- import { Button } from "./button.js";
1
+ import { CoButton } from "./button.js";
2
2
  import { useSupportText } from "../text/index.js";
3
3
  import { useVisitor } from "../../hooks/use-visitor.js";
4
4
  import { useSupport } from "../../provider.js";
@@ -75,12 +75,12 @@ const IdentificationTimelineTool = ({ conversationId }) => {
75
75
  ]);
76
76
  const helperMessage = useMemo(() => {
77
77
  if (errorMessage) return /* @__PURE__ */ jsx("p", {
78
- className: "text-destructive text-xs",
78
+ className: "text-co-destructive text-xs",
79
79
  role: "alert",
80
80
  children: errorMessage
81
81
  });
82
82
  if (hasSucceeded) return /* @__PURE__ */ jsx("p", {
83
- className: "text-primary text-xs",
83
+ className: "text-co-primary text-xs",
84
84
  children: successLabel
85
85
  });
86
86
  return null;
@@ -99,11 +99,11 @@ const IdentificationTimelineTool = ({ conversationId }) => {
99
99
  className: "font-semibold text-sm",
100
100
  children: title
101
101
  }), /* @__PURE__ */ jsx("p", {
102
- className: "text-muted-foreground text-xs",
102
+ className: "text-co-muted-foreground text-xs",
103
103
  children: description
104
104
  })]
105
105
  }), hasSucceeded ? /* @__PURE__ */ jsx("div", {
106
- className: "rounded-md bg-co-primary/10 px-3 py-2 text-primary text-sm",
106
+ className: "rounded-md bg-co-primary/10 px-3 py-2 text-co-primary text-sm",
107
107
  children: successLabel
108
108
  }) : /* @__PURE__ */ jsxs("form", {
109
109
  className: "flex gap-2",
@@ -121,7 +121,7 @@ const IdentificationTimelineTool = ({ conversationId }) => {
121
121
  value: email
122
122
  }),
123
123
  helperMessage,
124
- /* @__PURE__ */ jsx(Button, {
124
+ /* @__PURE__ */ jsx(CoButton, {
125
125
  className: "h-10",
126
126
  disabled: submitDisabled,
127
127
  type: "submit",
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-identification-tool.js","names":["IdentificationTimelineTool: React.FC<\n\tConversationTimelineToolProps\n>","payload: SendTimelineItemRequest"],"sources":["../../../src/support/components/timeline-identification-tool.tsx"],"sourcesContent":["import type { SendTimelineItemRequest } from \"@cossistant/types/api/timeline-item\";\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"@cossistant/types/enums\";\nimport { type FormEventHandler, useCallback, useMemo, useState } from \"react\";\n\nimport { useVisitor } from \"../../hooks/use-visitor\";\nimport { useSupport } from \"../../provider\";\nimport { useSupportText } from \"../text\";\nimport { Button } from \"./button\";\nimport type { ConversationTimelineToolProps } from \"./conversation-timeline\";\n\nexport const IdentificationTimelineTool: React.FC<\n\tConversationTimelineToolProps\n> = ({ conversationId }) => {\n\tconst text = useSupportText();\n\tconst { identify, visitor } = useVisitor();\n\tconst { client } = useSupport();\n\tconst [email, setEmail] = useState(\"\");\n\tconst [status, setStatus] = useState<\n\t\t\"idle\" | \"submitting\" | \"success\" | \"error\"\n\t>(\"idle\");\n\tconst [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n\tconst isAlreadyIdentified = Boolean(visitor?.contact);\n\tconst hasSucceeded = status === \"success\" || isAlreadyIdentified;\n\n\tconst ctaLabel = text(\"component.identificationTool.cta\");\n\tconst successLabel = text(\"component.identificationTool.success\");\n\tconst description = text(\"component.identificationTool.description\");\n\tconst title = text(\"component.identificationTool.title\");\n\n\tconst submitDisabled = hasSucceeded || status === \"submitting\";\n\n\tconst handleSubmit = useCallback<FormEventHandler<HTMLFormElement>>(\n\t\tasync (event) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tif (submitDisabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedEmail = email.trim();\n\t\t\tif (!trimmedEmail) {\n\t\t\t\tsetErrorMessage(text(\"component.identificationTool.validation\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetStatus(\"submitting\");\n\t\t\tsetErrorMessage(null);\n\n\t\t\ttry {\n\t\t\t\tconst identifyResult = await identify({ email: trimmedEmail });\n\n\t\t\t\tif (!identifyResult) {\n\t\t\t\t\tsetStatus(\"error\");\n\t\t\t\t\tsetErrorMessage(text(\"component.identificationTool.error\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst payload: SendTimelineItemRequest = {\n\t\t\t\t\tconversationId,\n\t\t\t\t\titem: {\n\t\t\t\t\t\ttype: ConversationTimelineType.EVENT,\n\t\t\t\t\t\ttext: text(\"component.identificationTool.eventLog\"),\n\t\t\t\t\t\ttool: null,\n\t\t\t\t\t\tparts: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"event\" as const,\n\t\t\t\t\t\t\t\teventType: ConversationEventType.VISITOR_IDENTIFIED,\n\t\t\t\t\t\t\t\tactorUserId: null,\n\t\t\t\t\t\t\t\tactorAiAgentId: null,\n\t\t\t\t\t\t\t\ttargetUserId: null,\n\t\t\t\t\t\t\t\ttargetAiAgentId: null,\n\t\t\t\t\t\t\t\tmessage: text(\"component.identificationTool.eventLog\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tvisitorId: identifyResult.visitorId,\n\t\t\t\t\t\tvisibility: TimelineItemVisibility.PUBLIC,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait client.sendMessage(payload);\n\n\t\t\t\tsetStatus(\"success\");\n\t\t\t\tsetEmail(\"\");\n\n\t\t\t\tvoid client.fetchWebsite({ force: true }).catch(() => {});\n\t\t\t} catch {\n\t\t\t\tsetStatus(\"error\");\n\t\t\t\tsetErrorMessage(text(\"component.identificationTool.error\"));\n\t\t\t}\n\t\t},\n\t\t[conversationId, email, identify, client, submitDisabled, text]\n\t);\n\n\tconst helperMessage = useMemo(() => {\n\t\tif (errorMessage) {\n\t\t\treturn (\n\t\t\t\t<p className=\"text-destructive text-xs\" role=\"alert\">\n\t\t\t\t\t{errorMessage}\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\n\t\tif (hasSucceeded) {\n\t\t\treturn <p className=\"text-primary text-xs\">{successLabel}</p>;\n\t\t}\n\n\t\treturn null;\n\t}, [errorMessage, hasSucceeded, successLabel]);\n\n\treturn (\n\t\t<div className=\"rounded border border-co-border/60 bg-co-background-100 p-4 shadow-sm\">\n\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<h3 className=\"font-semibold text-sm\">{title}</h3>\n\t\t\t\t\t<p className=\"text-muted-foreground text-xs\">{description}</p>\n\t\t\t\t</div>\n\t\t\t\t{hasSucceeded ? (\n\t\t\t\t\t<div className=\"rounded-md bg-co-primary/10 px-3 py-2 text-primary text-sm\">\n\t\t\t\t\t\t{successLabel}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<form className=\"flex gap-2\" onSubmit={handleSubmit}>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\taria-label={text(\"component.identificationTool.inputLabel\")}\n\t\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\t\tclassName=\"h-10 w-full rounded border border-co-border/60 bg-transparent px-3 py-2 text-sm outline-none focus:border-co-primary focus:ring-2 focus:ring-co-primary/20\"\n\t\t\t\t\t\t\tdisabled={submitDisabled}\n\t\t\t\t\t\t\tinputMode=\"email\"\n\t\t\t\t\t\t\tonChange={(event) => setEmail(event.target.value)}\n\t\t\t\t\t\t\tplaceholder={text(\n\t\t\t\t\t\t\t\t\"component.identificationTool.inputPlaceholder\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tvalue={email}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{helperMessage}\n\t\t\t\t\t\t<Button className=\"h-10\" disabled={submitDisabled} type=\"submit\">\n\t\t\t\t\t\t\t{status === \"submitting\"\n\t\t\t\t\t\t\t\t? text(\"component.identificationTool.loading\")\n\t\t\t\t\t\t\t\t: ctaLabel}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nIdentificationTimelineTool.displayName = \"IdentificationTimelineTool\";\n"],"mappings":";;;;;;;;;AAcA,MAAaA,8BAER,EAAE,qBAAqB;CAC3B,MAAM,OAAO,gBAAgB;CAC7B,MAAM,EAAE,UAAU,YAAY,YAAY;CAC1C,MAAM,EAAE,WAAW,YAAY;CAC/B,MAAM,CAAC,OAAO,YAAY,SAAS,GAAG;CACtC,MAAM,CAAC,QAAQ,aAAa,SAE1B,OAAO;CACT,MAAM,CAAC,cAAc,mBAAmB,SAAwB,KAAK;CAErE,MAAM,sBAAsB,QAAQ,SAAS,QAAQ;CACrD,MAAM,eAAe,WAAW,aAAa;CAE7C,MAAM,WAAW,KAAK,mCAAmC;CACzD,MAAM,eAAe,KAAK,uCAAuC;CACjE,MAAM,cAAc,KAAK,2CAA2C;CACpE,MAAM,QAAQ,KAAK,qCAAqC;CAExD,MAAM,iBAAiB,gBAAgB,WAAW;CAElD,MAAM,eAAe,YACpB,OAAO,UAAU;AAChB,QAAM,gBAAgB;AAEtB,MAAI,eACH;EAGD,MAAM,eAAe,MAAM,MAAM;AACjC,MAAI,CAAC,cAAc;AAClB,mBAAgB,KAAK,0CAA0C,CAAC;AAChE;;AAGD,YAAU,aAAa;AACvB,kBAAgB,KAAK;AAErB,MAAI;GACH,MAAM,iBAAiB,MAAM,SAAS,EAAE,OAAO,cAAc,CAAC;AAE9D,OAAI,CAAC,gBAAgB;AACpB,cAAU,QAAQ;AAClB,oBAAgB,KAAK,qCAAqC,CAAC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,uCAAuC,GAC5C;OACK;;KACH;IAEH;GACD;;AAIR,2BAA2B,cAAc"}
1
+ {"version":3,"file":"timeline-identification-tool.js","names":["IdentificationTimelineTool: React.FC<\n\tConversationTimelineToolProps\n>","payload: SendTimelineItemRequest"],"sources":["../../../src/support/components/timeline-identification-tool.tsx"],"sourcesContent":["import type { SendTimelineItemRequest } from \"@cossistant/types/api/timeline-item\";\nimport {\n\tConversationEventType,\n\tConversationTimelineType,\n\tTimelineItemVisibility,\n} from \"@cossistant/types/enums\";\nimport { type FormEventHandler, useCallback, useMemo, useState } from \"react\";\n\nimport { useVisitor } from \"../../hooks/use-visitor\";\nimport { useSupport } from \"../../provider\";\nimport { useSupportText } from \"../text\";\nimport { CoButton } from \"./button\";\nimport type { ConversationTimelineToolProps } from \"./conversation-timeline\";\n\nexport const IdentificationTimelineTool: React.FC<\n\tConversationTimelineToolProps\n> = ({ conversationId }) => {\n\tconst text = useSupportText();\n\tconst { identify, visitor } = useVisitor();\n\tconst { client } = useSupport();\n\tconst [email, setEmail] = useState(\"\");\n\tconst [status, setStatus] = useState<\n\t\t\"idle\" | \"submitting\" | \"success\" | \"error\"\n\t>(\"idle\");\n\tconst [errorMessage, setErrorMessage] = useState<string | null>(null);\n\n\tconst isAlreadyIdentified = Boolean(visitor?.contact);\n\tconst hasSucceeded = status === \"success\" || isAlreadyIdentified;\n\n\tconst ctaLabel = text(\"component.identificationTool.cta\");\n\tconst successLabel = text(\"component.identificationTool.success\");\n\tconst description = text(\"component.identificationTool.description\");\n\tconst title = text(\"component.identificationTool.title\");\n\n\tconst submitDisabled = hasSucceeded || status === \"submitting\";\n\n\tconst handleSubmit = useCallback<FormEventHandler<HTMLFormElement>>(\n\t\tasync (event) => {\n\t\t\tevent.preventDefault();\n\n\t\t\tif (submitDisabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst trimmedEmail = email.trim();\n\t\t\tif (!trimmedEmail) {\n\t\t\t\tsetErrorMessage(text(\"component.identificationTool.validation\"));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tsetStatus(\"submitting\");\n\t\t\tsetErrorMessage(null);\n\n\t\t\ttry {\n\t\t\t\tconst identifyResult = await identify({ email: trimmedEmail });\n\n\t\t\t\tif (!identifyResult) {\n\t\t\t\t\tsetStatus(\"error\");\n\t\t\t\t\tsetErrorMessage(text(\"component.identificationTool.error\"));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst payload: SendTimelineItemRequest = {\n\t\t\t\t\tconversationId,\n\t\t\t\t\titem: {\n\t\t\t\t\t\ttype: ConversationTimelineType.EVENT,\n\t\t\t\t\t\ttext: text(\"component.identificationTool.eventLog\"),\n\t\t\t\t\t\ttool: null,\n\t\t\t\t\t\tparts: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"event\" as const,\n\t\t\t\t\t\t\t\teventType: ConversationEventType.VISITOR_IDENTIFIED,\n\t\t\t\t\t\t\t\tactorUserId: null,\n\t\t\t\t\t\t\t\tactorAiAgentId: null,\n\t\t\t\t\t\t\t\ttargetUserId: null,\n\t\t\t\t\t\t\t\ttargetAiAgentId: null,\n\t\t\t\t\t\t\t\tmessage: text(\"component.identificationTool.eventLog\"),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tvisitorId: identifyResult.visitorId,\n\t\t\t\t\t\tvisibility: TimelineItemVisibility.PUBLIC,\n\t\t\t\t\t},\n\t\t\t\t};\n\n\t\t\t\tawait client.sendMessage(payload);\n\n\t\t\t\tsetStatus(\"success\");\n\t\t\t\tsetEmail(\"\");\n\n\t\t\t\tvoid client.fetchWebsite({ force: true }).catch(() => {});\n\t\t\t} catch {\n\t\t\t\tsetStatus(\"error\");\n\t\t\t\tsetErrorMessage(text(\"component.identificationTool.error\"));\n\t\t\t}\n\t\t},\n\t\t[conversationId, email, identify, client, submitDisabled, text]\n\t);\n\n\tconst helperMessage = useMemo(() => {\n\t\tif (errorMessage) {\n\t\t\treturn (\n\t\t\t\t<p className=\"text-co-destructive text-xs\" role=\"alert\">\n\t\t\t\t\t{errorMessage}\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\n\t\tif (hasSucceeded) {\n\t\t\treturn <p className=\"text-co-primary text-xs\">{successLabel}</p>;\n\t\t}\n\n\t\treturn null;\n\t}, [errorMessage, hasSucceeded, successLabel]);\n\n\treturn (\n\t\t<div className=\"rounded border border-co-border/60 bg-co-background-100 p-4 shadow-sm\">\n\t\t\t<div className=\"flex flex-col gap-3\">\n\t\t\t\t<div className=\"flex flex-col gap-1\">\n\t\t\t\t\t<h3 className=\"font-semibold text-sm\">{title}</h3>\n\t\t\t\t\t<p className=\"text-co-muted-foreground text-xs\">{description}</p>\n\t\t\t\t</div>\n\t\t\t\t{hasSucceeded ? (\n\t\t\t\t\t<div className=\"rounded-md bg-co-primary/10 px-3 py-2 text-co-primary text-sm\">\n\t\t\t\t\t\t{successLabel}\n\t\t\t\t\t</div>\n\t\t\t\t) : (\n\t\t\t\t\t<form className=\"flex gap-2\" onSubmit={handleSubmit}>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\taria-label={text(\"component.identificationTool.inputLabel\")}\n\t\t\t\t\t\t\tautoComplete=\"email\"\n\t\t\t\t\t\t\tclassName=\"h-10 w-full rounded border border-co-border/60 bg-transparent px-3 py-2 text-sm outline-none focus:border-co-primary focus:ring-2 focus:ring-co-primary/20\"\n\t\t\t\t\t\t\tdisabled={submitDisabled}\n\t\t\t\t\t\t\tinputMode=\"email\"\n\t\t\t\t\t\t\tonChange={(event) => setEmail(event.target.value)}\n\t\t\t\t\t\t\tplaceholder={text(\n\t\t\t\t\t\t\t\t\"component.identificationTool.inputPlaceholder\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\ttype=\"email\"\n\t\t\t\t\t\t\tvalue={email}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{helperMessage}\n\t\t\t\t\t\t<CoButton className=\"h-10\" disabled={submitDisabled} type=\"submit\">\n\t\t\t\t\t\t\t{status === \"submitting\"\n\t\t\t\t\t\t\t\t? text(\"component.identificationTool.loading\")\n\t\t\t\t\t\t\t\t: ctaLabel}\n\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t</form>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n\nIdentificationTimelineTool.displayName = \"IdentificationTimelineTool\";\n"],"mappings":";;;;;;;;;AAcA,MAAaA,8BAER,EAAE,qBAAqB;CAC3B,MAAM,OAAO,gBAAgB;CAC7B,MAAM,EAAE,UAAU,YAAY,YAAY;CAC1C,MAAM,EAAE,WAAW,YAAY;CAC/B,MAAM,CAAC,OAAO,YAAY,SAAS,GAAG;CACtC,MAAM,CAAC,QAAQ,aAAa,SAE1B,OAAO;CACT,MAAM,CAAC,cAAc,mBAAmB,SAAwB,KAAK;CAErE,MAAM,sBAAsB,QAAQ,SAAS,QAAQ;CACrD,MAAM,eAAe,WAAW,aAAa;CAE7C,MAAM,WAAW,KAAK,mCAAmC;CACzD,MAAM,eAAe,KAAK,uCAAuC;CACjE,MAAM,cAAc,KAAK,2CAA2C;CACpE,MAAM,QAAQ,KAAK,qCAAqC;CAExD,MAAM,iBAAiB,gBAAgB,WAAW;CAElD,MAAM,eAAe,YACpB,OAAO,UAAU;AAChB,QAAM,gBAAgB;AAEtB,MAAI,eACH;EAGD,MAAM,eAAe,MAAM,MAAM;AACjC,MAAI,CAAC,cAAc;AAClB,mBAAgB,KAAK,0CAA0C,CAAC;AAChE;;AAGD,YAAU,aAAa;AACvB,kBAAgB,KAAK;AAErB,MAAI;GACH,MAAM,iBAAiB,MAAM,SAAS,EAAE,OAAO,cAAc,CAAC;AAE9D,OAAI,CAAC,gBAAgB;AACpB,cAAU,QAAQ;AAClB,oBAAgB,KAAK,qCAAqC,CAAC;AAC3D;;GAGD,MAAMC,UAAmC;IACxC;IACA,MAAM;KACL,MAAM,yBAAyB;KAC/B,MAAM,KAAK,wCAAwC;KACnD,MAAM;KACN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gents, availableHumanAgents,
54
54
  children: [isReceivedByViewer && /* @__PURE__ */ jsx(TimelineItemGroupAvatar, {
55
55
  className: "flex flex-shrink-0 flex-col justify-end",
56
56
  children: isAI ? /* @__PURE__ */ jsx("div", {
57
- className: "flex size-6 items-center justify-center rounded-full bg-primary/10",
58
- children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-4 w-4 text-primary" })
57
+ className: "flex size-6 items-center justify-center rounded-full bg-co-primary/10",
58
+ children: /* @__PURE__ */ jsx(CossistantLogo, { className: "h-4 w-4 text-co-primary" })
59
59
  }) : /* @__PURE__ */ jsx(Avatar, {
60
60
  className: "size-6",
61
61
  image: humanAgent?.image,
@@ -65,7 +65,7 @@ const TimelineMessageGroup = ({ items, availableAIAgents, availableHumanAgents,
65
65
  className: cn("flex flex-col gap-1", isSentByViewer && "items-end"),
66
66
  children: [
67
67
  isReceivedByViewer && /* @__PURE__ */ jsx(TimelineItemGroupHeader, {
68
- className: "px-1 text-muted-foreground text-xs",
68
+ className: "px-1 text-co-muted-foreground text-xs",
69
69
  children: isAI ? aiAgent?.name || "AI Assistant" : humanAgent?.name || "Support"
70
70
  }),
71
71
  items.map((item, index) => /* @__PURE__ */ jsx(motion.div, {
@@ -83,7 +83,7 @@ const TimelineMessageGroup = ({ items, availableAIAgents, availableHumanAgents,
83
83
  children: hasSeenIndicator && /* @__PURE__ */ jsx(motion.div, {
84
84
  ...SEEN_ANIMATION,
85
85
  children: /* @__PURE__ */ jsx(TimelineItemGroupSeenIndicator, {
86
- className: "px-1 text-muted-foreground text-xs",
86
+ className: "px-1 text-co-muted-foreground text-xs",
87
87
  seenByIds,
88
88
  children: () => `Seen by ${seenByNames.join(", ")}`
89
89
  })
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-message-group.js","names":["EMPTY_SEEN_BY_IDS: readonly string[]","EMPTY_SEEN_BY_NAMES: readonly string[]","TimelineMessageGroup: React.FC<TimelineMessageGroupProps>","PrimitiveTimelineItemGroup"],"sources":["../../../src/support/components/timeline-message-group.tsx"],"sourcesContent":["import type { AvailableAIAgent, AvailableHumanAgent } from \"@cossistant/types\";\nimport { SenderType } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { motion } from \"motion/react\";\nimport type React from \"react\";\nimport {\n\tTimelineItemGroup as PrimitiveTimelineItemGroup,\n\tTimelineItemGroupAvatar,\n\tTimelineItemGroupContent,\n\tTimelineItemGroupHeader,\n\tTimelineItemGroupSeenIndicator,\n} from \"../../primitives/timeline-item-group\";\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./avatar\";\nimport { CossistantLogo } from \"./cossistant-branding\";\nimport { TimelineMessageItem } from \"./timeline-message-item\";\n\nconst MESSAGE_ANIMATION = {\n\tinitial: { opacity: 0, y: 6 },\n\tanimate: { opacity: 1, y: 0 },\n\texit: { opacity: 0 },\n\ttransition: {\n\t\tduration: 0.1,\n\t\tease: [0.25, 0.46, 0.45, 0.94] as const, // easeOutCubic\n\t},\n} as const;\n\nconst SEEN_ANIMATION = {\n\tinitial: { opacity: 0 },\n\tanimate: { opacity: 1 },\n\ttransition: {\n\t\tduration: 0.1,\n\t\tease: \"easeOut\" as const,\n\t},\n} as const;\n\nexport type TimelineMessageGroupProps = {\n\titems: TimelineItem[];\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcurrentVisitorId?: string;\n\tseenByIds?: readonly string[];\n\tseenByNames?: readonly string[];\n};\n\nconst EMPTY_SEEN_BY_IDS: readonly string[] = Object.freeze([]);\nconst EMPTY_SEEN_BY_NAMES: readonly string[] = Object.freeze([]);\n\nexport const TimelineMessageGroup: React.FC<TimelineMessageGroupProps> = ({\n\titems,\n\tavailableAIAgents,\n\tavailableHumanAgents,\n\tcurrentVisitorId,\n\tseenByIds = EMPTY_SEEN_BY_IDS,\n\tseenByNames = EMPTY_SEEN_BY_NAMES,\n}) => {\n\t// Get agent info for the sender\n\tconst firstItem = items[0];\n\tconst humanAgent = availableHumanAgents.find(\n\t\t(agent) => agent.id === firstItem?.userId\n\t);\n\tconst aiAgent = availableAIAgents.find(\n\t\t(agent) => agent.id === firstItem?.aiAgentId\n\t);\n\n\tif (items.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst hasSeenIndicator = seenByIds.length > 0 && seenByNames.length > 0;\n\n\treturn (\n\t\t<PrimitiveTimelineItemGroup\n\t\t\titems={items}\n\t\t\tseenByIds={seenByIds}\n\t\t\tviewerId={currentVisitorId}\n\t\t\tviewerType={SenderType.VISITOR}\n\t\t>\n\t\t\t{({\n\t\t\t\tisSentByViewer,\n\t\t\t\tisReceivedByViewer,\n\t\t\t\tisVisitor,\n\t\t\t\tisAI,\n\t\t\t\tisTeamMember,\n\t\t\t}) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex w-full gap-2\",\n\t\t\t\t\t\t// Support widget POV: visitor messages are sent (right side)\n\t\t\t\t\t\t// Agent messages are received (left side)\n\t\t\t\t\t\tisSentByViewer && \"flex-row-reverse\",\n\t\t\t\t\t\tisReceivedByViewer && \"flex-row\"\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{/* Avatar - only show for received messages (agents) */}\n\t\t\t\t\t{isReceivedByViewer && (\n\t\t\t\t\t\t<TimelineItemGroupAvatar className=\"flex flex-shrink-0 flex-col justify-end\">\n\t\t\t\t\t\t\t{isAI ? (\n\t\t\t\t\t\t\t\t<div className=\"flex size-6 items-center justify-center rounded-full bg-primary/10\">\n\t\t\t\t\t\t\t\t\t<CossistantLogo className=\"h-4 w-4 text-primary\" />\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\t\t<Avatar\n\t\t\t\t\t\t\t\t\tclassName=\"size-6\"\n\t\t\t\t\t\t\t\t\timage={humanAgent?.image}\n\t\t\t\t\t\t\t\t\tname={humanAgent?.name || \"Support\"}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</TimelineItemGroupAvatar>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<TimelineItemGroupContent\n\t\t\t\t\t\tclassName={cn(\"flex flex-col gap-1\", isSentByViewer && \"items-end\")}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* Header - show sender name for received messages (agents) */}\n\t\t\t\t\t\t{isReceivedByViewer && (\n\t\t\t\t\t\t\t<TimelineItemGroupHeader className=\"px-1 text-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t{isAI\n\t\t\t\t\t\t\t\t\t? aiAgent?.name || \"AI Assistant\"\n\t\t\t\t\t\t\t\t\t: humanAgent?.name || \"Support\"}\n\t\t\t\t\t\t\t</TimelineItemGroupHeader>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{items.map((item, index) => (\n\t\t\t\t\t\t\t<motion.div key={item.id} {...MESSAGE_ANIMATION}>\n\t\t\t\t\t\t\t\t<TimelineMessageItem\n\t\t\t\t\t\t\t\t\tisLast={index === items.length - 1}\n\t\t\t\t\t\t\t\t\tisSentByViewer={isSentByViewer}\n\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{isSentByViewer && (\n\t\t\t\t\t\t\t<div className={cn(\"\", hasSeenIndicator && \"mt-2\")}>\n\t\t\t\t\t\t\t\t<div className=\"min-h-[1.25rem]\">\n\t\t\t\t\t\t\t\t\t{hasSeenIndicator && (\n\t\t\t\t\t\t\t\t\t\t<motion.div key=\"seen-indicator\" {...SEEN_ANIMATION}>\n\t\t\t\t\t\t\t\t\t\t\t<TimelineItemGroupSeenIndicator\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-1 text-muted-foreground text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\tseenByIds={seenByIds}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{() => `Seen by ${seenByNames.join(\", \")}`}\n\t\t\t\t\t\t\t\t\t\t\t</TimelineItemGroupSeenIndicator>\n\t\t\t\t\t\t\t\t\t\t</motion.div>\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</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TimelineItemGroupContent>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</PrimitiveTimelineItemGroup>\n\t);\n};\n\nTimelineMessageGroup.displayName = \"TimelineMessageGroup\";\n"],"mappings":";;;;;;;;;;AAiBA,MAAM,oBAAoB;CACzB,SAAS;EAAE,SAAS;EAAG,GAAG;EAAG;CAC7B,SAAS;EAAE,SAAS;EAAG,GAAG;EAAG;CAC7B,MAAM,EAAE,SAAS,GAAG;CACpB,YAAY;EACX,UAAU;EACV,MAAM;GAAC;GAAM;GAAM;GAAM;GAAK;EAC9B;CACD;AAED,MAAM,iBAAiB;CACtB,SAAS,EAAE,SAAS,GAAG;CACvB,SAAS,EAAE,SAAS,GAAG;CACvB,YAAY;EACX,UAAU;EACV,MAAM;EACN;CACD;AAWD,MAAMA,oBAAuC,OAAO,OAAO,EAAE,CAAC;AAC9D,MAAMC,sBAAyC,OAAO,OAAO,EAAE,CAAC;AAEhE,MAAaC,wBAA6D,EACzE,OACA,mBACA,sBACA,kBACA,YAAY,mBACZ,cAAc,0BACT;CAEL,MAAM,YAAY,MAAM;CACxB,MAAM,aAAa,qBAAqB,MACtC,UAAU,MAAM,OAAO,WAAW,OACnC;CACD,MAAM,UAAU,kBAAkB,MAChC,UAAU,MAAM,OAAO,WAAW,UACnC;AAED,KAAI,MAAM,WAAW,EACpB,QAAO;CAGR,MAAM,mBAAmB,UAAU,SAAS,KAAK,YAAY,SAAS;AAEtE,QACC,oBAACC;EACO;EACI;EACX,UAAU;EACV,YAAY,WAAW;aAErB,EACD,gBACA,oBACA,WACA,MACA,mBAEA,qBAAC;GACA,WAAW,GACV,qBAGA,kBAAkB,oBAClB,sBAAsB,WACtB;cAGA,sBACA,oBAAC;IAAwB,WAAU;cACjC,OACA,oBAAC;KAAI,WAAU;eACd,oBAAC,kBAAe,WAAU,yBAAyB;MAC9C,GAEN,oBAAC;KACA,WAAU;KACV,OAAO,YAAY;KACnB,MAAM,YAAY,QAAQ;MACzB;KAEsB,EAG3B,qBAAC;IACA,WAAW,GAAG,uBAAuB,kBAAkB,YAAY;;KAGlE,sBACA,oBAAC;MAAwB,WAAU;gBACjC,OACE,SAAS,QAAQ,iBACjB,YAAY,QAAQ;OACE;KAG1B,MAAM,KAAK,MAAM,UACjB,oBAAC,OAAO;MAAkB,GAAI;gBAC7B,oBAAC;OACA,QAAQ,UAAU,MAAM,SAAS;OACjB;OACV;QACL;QALc,KAAK,GAMT,CACZ;KAED,kBACA,oBAAC;MAAI,WAAW,GAAG,IAAI,oBAAoB,OAAO;gBACjD,oBAAC;OAAI,WAAU;iBACb,oBACA,oBAAC,OAAO;QAAyB,GAAI;kBACpC,oBAAC;SACA,WAAU;SACC;yBAEJ,WAAW,YAAY,KAAK,KAAK;UACR;UANlB,iBAOH;QAET;OACD;;KAEmB;IACtB;GAEqB;;AAI/B,qBAAqB,cAAc"}
1
+ {"version":3,"file":"timeline-message-group.js","names":["EMPTY_SEEN_BY_IDS: readonly string[]","EMPTY_SEEN_BY_NAMES: readonly string[]","TimelineMessageGroup: React.FC<TimelineMessageGroupProps>","PrimitiveTimelineItemGroup"],"sources":["../../../src/support/components/timeline-message-group.tsx"],"sourcesContent":["import type { AvailableAIAgent, AvailableHumanAgent } from \"@cossistant/types\";\nimport { SenderType } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { motion } from \"motion/react\";\nimport type React from \"react\";\nimport {\n\tTimelineItemGroup as PrimitiveTimelineItemGroup,\n\tTimelineItemGroupAvatar,\n\tTimelineItemGroupContent,\n\tTimelineItemGroupHeader,\n\tTimelineItemGroupSeenIndicator,\n} from \"../../primitives/timeline-item-group\";\nimport { cn } from \"../utils\";\nimport { Avatar } from \"./avatar\";\nimport { CossistantLogo } from \"./cossistant-branding\";\nimport { TimelineMessageItem } from \"./timeline-message-item\";\n\nconst MESSAGE_ANIMATION = {\n\tinitial: { opacity: 0, y: 6 },\n\tanimate: { opacity: 1, y: 0 },\n\texit: { opacity: 0 },\n\ttransition: {\n\t\tduration: 0.1,\n\t\tease: [0.25, 0.46, 0.45, 0.94] as const, // easeOutCubic\n\t},\n} as const;\n\nconst SEEN_ANIMATION = {\n\tinitial: { opacity: 0 },\n\tanimate: { opacity: 1 },\n\ttransition: {\n\t\tduration: 0.1,\n\t\tease: \"easeOut\" as const,\n\t},\n} as const;\n\nexport type TimelineMessageGroupProps = {\n\titems: TimelineItem[];\n\tavailableAIAgents: AvailableAIAgent[];\n\tavailableHumanAgents: AvailableHumanAgent[];\n\tcurrentVisitorId?: string;\n\tseenByIds?: readonly string[];\n\tseenByNames?: readonly string[];\n};\n\nconst EMPTY_SEEN_BY_IDS: readonly string[] = Object.freeze([]);\nconst EMPTY_SEEN_BY_NAMES: readonly string[] = Object.freeze([]);\n\nexport const TimelineMessageGroup: React.FC<TimelineMessageGroupProps> = ({\n\titems,\n\tavailableAIAgents,\n\tavailableHumanAgents,\n\tcurrentVisitorId,\n\tseenByIds = EMPTY_SEEN_BY_IDS,\n\tseenByNames = EMPTY_SEEN_BY_NAMES,\n}) => {\n\t// Get agent info for the sender\n\tconst firstItem = items[0];\n\tconst humanAgent = availableHumanAgents.find(\n\t\t(agent) => agent.id === firstItem?.userId\n\t);\n\tconst aiAgent = availableAIAgents.find(\n\t\t(agent) => agent.id === firstItem?.aiAgentId\n\t);\n\n\tif (items.length === 0) {\n\t\treturn null;\n\t}\n\n\tconst hasSeenIndicator = seenByIds.length > 0 && seenByNames.length > 0;\n\n\treturn (\n\t\t<PrimitiveTimelineItemGroup\n\t\t\titems={items}\n\t\t\tseenByIds={seenByIds}\n\t\t\tviewerId={currentVisitorId}\n\t\t\tviewerType={SenderType.VISITOR}\n\t\t>\n\t\t\t{({\n\t\t\t\tisSentByViewer,\n\t\t\t\tisReceivedByViewer,\n\t\t\t\tisVisitor,\n\t\t\t\tisAI,\n\t\t\t\tisTeamMember,\n\t\t\t}) => (\n\t\t\t\t<div\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\"flex w-full gap-2\",\n\t\t\t\t\t\t// Support widget POV: visitor messages are sent (right side)\n\t\t\t\t\t\t// Agent messages are received (left side)\n\t\t\t\t\t\tisSentByViewer && \"flex-row-reverse\",\n\t\t\t\t\t\tisReceivedByViewer && \"flex-row\"\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{/* Avatar - only show for received messages (agents) */}\n\t\t\t\t\t{isReceivedByViewer && (\n\t\t\t\t\t\t<TimelineItemGroupAvatar className=\"flex flex-shrink-0 flex-col justify-end\">\n\t\t\t\t\t\t\t{isAI ? (\n\t\t\t\t\t\t\t\t<div className=\"flex size-6 items-center justify-center rounded-full bg-co-primary/10\">\n\t\t\t\t\t\t\t\t\t<CossistantLogo className=\"h-4 w-4 text-co-primary\" />\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\t\t<Avatar\n\t\t\t\t\t\t\t\t\tclassName=\"size-6\"\n\t\t\t\t\t\t\t\t\timage={humanAgent?.image}\n\t\t\t\t\t\t\t\t\tname={humanAgent?.name || \"Support\"}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</TimelineItemGroupAvatar>\n\t\t\t\t\t)}\n\n\t\t\t\t\t<TimelineItemGroupContent\n\t\t\t\t\t\tclassName={cn(\"flex flex-col gap-1\", isSentByViewer && \"items-end\")}\n\t\t\t\t\t>\n\t\t\t\t\t\t{/* Header - show sender name for received messages (agents) */}\n\t\t\t\t\t\t{isReceivedByViewer && (\n\t\t\t\t\t\t\t<TimelineItemGroupHeader className=\"px-1 text-co-muted-foreground text-xs\">\n\t\t\t\t\t\t\t\t{isAI\n\t\t\t\t\t\t\t\t\t? aiAgent?.name || \"AI Assistant\"\n\t\t\t\t\t\t\t\t\t: humanAgent?.name || \"Support\"}\n\t\t\t\t\t\t\t</TimelineItemGroupHeader>\n\t\t\t\t\t\t)}\n\n\t\t\t\t\t\t{items.map((item, index) => (\n\t\t\t\t\t\t\t<motion.div key={item.id} {...MESSAGE_ANIMATION}>\n\t\t\t\t\t\t\t\t<TimelineMessageItem\n\t\t\t\t\t\t\t\t\tisLast={index === items.length - 1}\n\t\t\t\t\t\t\t\t\tisSentByViewer={isSentByViewer}\n\t\t\t\t\t\t\t\t\titem={item}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t\t))}\n\n\t\t\t\t\t\t{isSentByViewer && (\n\t\t\t\t\t\t\t<div className={cn(\"\", hasSeenIndicator && \"mt-2\")}>\n\t\t\t\t\t\t\t\t<div className=\"min-h-[1.25rem]\">\n\t\t\t\t\t\t\t\t\t{hasSeenIndicator && (\n\t\t\t\t\t\t\t\t\t\t<motion.div key=\"seen-indicator\" {...SEEN_ANIMATION}>\n\t\t\t\t\t\t\t\t\t\t\t<TimelineItemGroupSeenIndicator\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"px-1 text-co-muted-foreground text-xs\"\n\t\t\t\t\t\t\t\t\t\t\t\tseenByIds={seenByIds}\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{() => `Seen by ${seenByNames.join(\", \")}`}\n\t\t\t\t\t\t\t\t\t\t\t</TimelineItemGroupSeenIndicator>\n\t\t\t\t\t\t\t\t\t\t</motion.div>\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</div>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</TimelineItemGroupContent>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</PrimitiveTimelineItemGroup>\n\t);\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gBACjC,OACE,SAAS,QAAQ,iBACjB,YAAY,QAAQ;OACE;KAG1B,MAAM,KAAK,MAAM,UACjB,oBAAC,OAAO;MAAkB,GAAI;gBAC7B,oBAAC;OACA,QAAQ,UAAU,MAAM,SAAS;OACjB;OACV;QACL;QALc,KAAK,GAMT,CACZ;KAED,kBACA,oBAAC;MAAI,WAAW,GAAG,IAAI,oBAAoB,OAAO;gBACjD,oBAAC;OAAI,WAAU;iBACb,oBACA,oBAAC,OAAO;QAAyB,GAAI;kBACpC,oBAAC;SACA,WAAU;SACC;yBAEJ,WAAW,YAAY,KAAK,KAAK;UACR;UANlB,iBAOH;QAET;OACD;;KAEmB;IACtB;GAEqB;;AAI/B,qBAAqB,cAAc"}
@@ -20,15 +20,15 @@ function TimelineMessageItem({ item, isLast = false, isSentByViewer = false }) {
20
20
  className: cn("flex w-full flex-1 flex-col gap-1", isSentByViewerFinal && "items-end"),
21
21
  children: [/* @__PURE__ */ jsx(TimelineItemContent, {
22
22
  className: cn("block w-max max-w-[300px] rounded-lg px-3.5 py-2.5 text-sm", {
23
- "bg-background-300 text-foreground dark:bg-background-600": !isSentByViewerFinal,
24
- "bg-primary text-primary-foreground": isSentByViewerFinal,
23
+ "bg-co-background-300 text-co-foreground dark:bg-co-background-600": !isSentByViewerFinal,
24
+ "bg-co-primary text-co-primary-foreground": isSentByViewerFinal,
25
25
  "rounded-br-sm": isLast && isSentByViewerFinal,
26
26
  "rounded-bl-sm": isLast && !isSentByViewerFinal
27
27
  }),
28
28
  renderMarkdown: true,
29
29
  text: item.text
30
30
  }), isLast && /* @__PURE__ */ jsx(TimelineItemTimestamp, {
31
- className: "px-1 text-muted-foreground text-xs",
31
+ className: "px-1 text-co-muted-foreground text-xs",
32
32
  timestamp,
33
33
  children: () => /* @__PURE__ */ jsxs(Fragment, { children: [timestamp.toLocaleTimeString([], {
34
34
  hour: "2-digit",
@@ -1 +1 @@
1
- {"version":3,"file":"timeline-message-item.js","names":["PrimitiveTimelineItem"],"sources":["../../../src/support/components/timeline-message-item.tsx"],"sourcesContent":["import type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport type React from \"react\";\nimport {\n\tTimelineItem as PrimitiveTimelineItem,\n\tTimelineItemContent,\n\tTimelineItemTimestamp,\n} from \"../../primitives/timeline-item\";\nimport { useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\n\nexport type TimelineMessageItemProps = {\n\titem: TimelineItem;\n\tisLast?: boolean;\n\tisSentByViewer?: boolean;\n};\n\n/**\n * Message bubble renderer that adapts layout depending on whether the visitor\n * or an agent sent the message.\n */\nexport function TimelineMessageItem({\n\titem,\n\tisLast = false,\n\tisSentByViewer = false,\n}: TimelineMessageItemProps): React.ReactElement {\n\tconst text = useSupportText();\n\treturn (\n\t\t<PrimitiveTimelineItem item={item}>\n\t\t\t{({ isAI, timestamp }) => {\n\t\t\t\t// isSentByViewer defaults to false, meaning messages are treated as received\n\t\t\t\t// (left side with background) unless explicitly marked as sent by viewer\n\t\t\t\tconst isSentByViewerFinal = isSentByViewer;\n\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"flex w-full gap-2\",\n\t\t\t\t\t\t\tisSentByViewerFinal && \"flex-row-reverse\",\n\t\t\t\t\t\t\t!isSentByViewerFinal && \"flex-row\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex w-full flex-1 flex-col gap-1\",\n\t\t\t\t\t\t\t\tisSentByViewerFinal && \"items-end\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TimelineItemContent\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"block w-max max-w-[300px] rounded-lg px-3.5 py-2.5 text-sm\",\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"bg-background-300 text-foreground dark:bg-background-600\":\n\t\t\t\t\t\t\t\t\t\t\t!isSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"bg-primary text-primary-foreground\": isSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"rounded-br-sm\": isLast && isSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"rounded-bl-sm\": isLast && !isSentByViewerFinal,\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\trenderMarkdown\n\t\t\t\t\t\t\t\ttext={item.text}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{isLast && (\n\t\t\t\t\t\t\t\t<TimelineItemTimestamp\n\t\t\t\t\t\t\t\t\tclassName=\"px-1 text-muted-foreground text-xs\"\n\t\t\t\t\t\t\t\t\ttimestamp={timestamp}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{() => (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{timestamp.toLocaleTimeString([], {\n\t\t\t\t\t\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t{isAI &&\n\t\t\t\t\t\t\t\t\t\t\t\t` ${text(\"component.message.timestamp.aiIndicator\")}`}\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TimelineItemTimestamp>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}}\n\t\t</PrimitiveTimelineItem>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,oBAAoB,EACnC,MACA,SAAS,OACT,iBAAiB,SAC+B;CAChD,MAAM,OAAO,gBAAgB;AAC7B,QACC,oBAACA;EAA4B;aAC1B,EAAE,MAAM,gBAAgB;GAGzB,MAAM,sBAAsB;AAE5B,UACC,oBAAC;IACA,WAAW,GACV,qBACA,uBAAuB,oBACvB,CAAC,uBAAuB,WACxB;cAED,qBAAC;KACA,WAAW,GACV,qCACA,uBAAuB,YACvB;gBAED,oBAAC;MACA,WAAW,GACV,8DACA;OACC,4DACC,CAAC;OACF,sCAAsC;OACtC,iBAAiB,UAAU;OAC3B,iBAAiB,UAAU,CAAC;OAC5B,CACD;MACD;MACA,MAAM,KAAK;OACV,EACD,UACA,oBAAC;MACA,WAAU;MACC;sBAGV,4CACE,UAAU,mBAAmB,EAAE,EAAE;OACjC,MAAM;OACN,QAAQ;OACR,CAAC,EACD,QACA,IAAI,KAAK,0CAA0C,MAClD;OAEmB;MAEpB;KACD;;GAGe"}
1
+ {"version":3,"file":"timeline-message-item.js","names":["PrimitiveTimelineItem"],"sources":["../../../src/support/components/timeline-message-item.tsx"],"sourcesContent":["import type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport type React from \"react\";\nimport {\n\tTimelineItem as PrimitiveTimelineItem,\n\tTimelineItemContent,\n\tTimelineItemTimestamp,\n} from \"../../primitives/timeline-item\";\nimport { useSupportText } from \"../text\";\nimport { cn } from \"../utils\";\n\nexport type TimelineMessageItemProps = {\n\titem: TimelineItem;\n\tisLast?: boolean;\n\tisSentByViewer?: boolean;\n};\n\n/**\n * Message bubble renderer that adapts layout depending on whether the visitor\n * or an agent sent the message.\n */\nexport function TimelineMessageItem({\n\titem,\n\tisLast = false,\n\tisSentByViewer = false,\n}: TimelineMessageItemProps): React.ReactElement {\n\tconst text = useSupportText();\n\treturn (\n\t\t<PrimitiveTimelineItem item={item}>\n\t\t\t{({ isAI, timestamp }) => {\n\t\t\t\t// isSentByViewer defaults to false, meaning messages are treated as received\n\t\t\t\t// (left side with background) unless explicitly marked as sent by viewer\n\t\t\t\tconst isSentByViewerFinal = isSentByViewer;\n\n\t\t\t\treturn (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\"flex w-full gap-2\",\n\t\t\t\t\t\t\tisSentByViewerFinal && \"flex-row-reverse\",\n\t\t\t\t\t\t\t!isSentByViewerFinal && \"flex-row\"\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\"flex w-full flex-1 flex-col gap-1\",\n\t\t\t\t\t\t\t\tisSentByViewerFinal && \"items-end\"\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<TimelineItemContent\n\t\t\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t\t\t\"block w-max max-w-[300px] rounded-lg px-3.5 py-2.5 text-sm\",\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\"bg-co-background-300 text-co-foreground dark:bg-co-background-600\":\n\t\t\t\t\t\t\t\t\t\t\t!isSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"bg-co-primary text-co-primary-foreground\":\n\t\t\t\t\t\t\t\t\t\t\tisSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"rounded-br-sm\": isLast && isSentByViewerFinal,\n\t\t\t\t\t\t\t\t\t\t\"rounded-bl-sm\": isLast && !isSentByViewerFinal,\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\trenderMarkdown\n\t\t\t\t\t\t\t\ttext={item.text}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{isLast && (\n\t\t\t\t\t\t\t\t<TimelineItemTimestamp\n\t\t\t\t\t\t\t\t\tclassName=\"px-1 text-co-muted-foreground text-xs\"\n\t\t\t\t\t\t\t\t\ttimestamp={timestamp}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{() => (\n\t\t\t\t\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t\t\t\t\t{timestamp.toLocaleTimeString([], {\n\t\t\t\t\t\t\t\t\t\t\t\thour: \"2-digit\",\n\t\t\t\t\t\t\t\t\t\t\t\tminute: \"2-digit\",\n\t\t\t\t\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t\t\t\t\t{isAI &&\n\t\t\t\t\t\t\t\t\t\t\t\t` ${text(\"component.message.timestamp.aiIndicator\")}`}\n\t\t\t\t\t\t\t\t\t\t</>\n\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t</TimelineItemTimestamp>\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t);\n\t\t\t}}\n\t\t</PrimitiveTimelineItem>\n\t);\n}\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,oBAAoB,EACnC,MACA,SAAS,OACT,iBAAiB,SAC+B;CAChD,MAAM,OAAO,gBAAgB;AAC7B,QACC,oBAACA;EAA4B;aAC1B,EAAE,MAAM,gBAAgB;GAGzB,MAAM,sBAAsB;AAE5B,UACC,oBAAC;IACA,WAAW,GACV,qBACA,uBAAuB,oBACvB,CAAC,uBAAuB,WACxB;cAED,qBAAC;KACA,WAAW,GACV,qCACA,uBAAuB,YACvB;gBAED,oBAAC;MACA,WAAW,GACV,8DACA;OACC,qEACC,CAAC;OACF,4CACC;OACD,iBAAiB,UAAU;OAC3B,iBAAiB,UAAU,CAAC;OAC5B,CACD;MACD;MACA,MAAM,KAAK;OACV,EACD,UACA,oBAAC;MACA,WAAU;MACC;sBAGV,4CACE,UAAU,mBAAmB,EAAE,EAAE;OACjC,MAAM;OACN,QAAQ;OACR,CAAC,EACD,QACA,IAAI,KAAK,0CAA0C,MAClD;OAEmB;MAEpB;KACD;;GAGe"}
@@ -1 +1 @@
1
- {"version":3,"file":"typing-indicator.d.ts","names":[],"sources":["../../../src/support/components/typing-indicator.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,qBAAA;KAEA,iBAAA;EAFA,EAAA,EAAA,MAAA;EAEA,IAAA,EAEL,qBAFsB;AAK7B,CAAA;AAAwD,KAA5C,oBAAA,GAAuB,OAAA,CAAM,cAAe,CAAA,cAAA,CAAA,GAAA;EAArB,YAAM,EAC1B,iBAD0B,EAAA;EAC1B,iBAAA,CAAA,EACM,gBADN,EAAA;EACM,oBAAA,CAAA,EACG,mBADH,EAAA;EACG,WAAA,CAAA,EAAA,OAAA;CAAmB;AAI9B,cAAA,YAAgB,EAAA,CAAA;EAAA;CAInB,EAAA;EAuBG,SAAA,CAAA,EAAA,MAuDZ;CAvD2B,EAAA,GAvBxB,OAAA,CAAM,YAuBkB;AAAA,cAAf,eAAe,EAAA,OAAA,CAAA,yBAAA,CAAA,OAAA,CAAA,cAAA,CAAA,cAAA,CAAA,GAAA;EAjCb,YAAA,EAAA,iBAAA,EAAA;EACM,iBAAA,CAAA,EAAA,gBAAA,EAAA;EACG,oBAAA,CAAA,EAAA,mBAAA,EAAA"}
1
+ {"version":3,"file":"typing-indicator.d.ts","names":[],"sources":["../../../src/support/components/typing-indicator.tsx"],"sourcesContent":[],"mappings":";;;;KAKY,qBAAA;KAEA,iBAAA;EAFA,EAAA,EAAA,MAAA;EAEA,IAAA,EAEL,qBAFsB;AAK7B,CAAA;AAAwD,KAA5C,oBAAA,GAAuB,OAAA,CAAM,cAAe,CAAA,cAAA,CAAA,GAAA;EAArB,YAAM,EAC1B,iBAD0B,EAAA;EAC1B,iBAAA,CAAA,EACM,gBADN,EAAA;EACM,oBAAA,CAAA,EACG,mBADH,EAAA;EACG,WAAA,CAAA,EAAA,OAAA;CAAmB;AAI9B,cAAA,YAAgB,EAAA,CAAA;EAAA;CAIzB,EAAM;EAuBG,SAAA,CAAA,EAAA,MAuDZ;CAvD2B,EAAA,GAvBxB,OAAA,CAAM,YAuBkB;AAAA,cAAf,eAAe,EAAA,OAAA,CAAA,yBAAA,CAAA,OAAA,CAAA,cAAA,CAAA,cAAA,CAAA,GAAA;EAjCb,YAAA,EAAA,iBAAA,EAAA;EACM,iBAAA,CAAA,EAAA,gBAAA,EAAA;EACG,oBAAA,CAAA,EAAA,mBAAA,EAAA"}
@@ -10,24 +10,24 @@ const ArticlesPage = () => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PUR
10
10
  className: "flex flex-col gap-5",
11
11
  children: [
12
12
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
13
- className: "mb-2 font-medium text-base text-primary",
13
+ className: "mb-2 font-medium text-base text-co-primary",
14
14
  children: "How do I start a conversation?"
15
15
  }), /* @__PURE__ */ jsx("p", {
16
- className: "text-primary/60 text-sm leading-relaxed",
16
+ className: "text-co-primary/60 text-sm leading-relaxed",
17
17
  children: "Click the \"Start New Conversation\" button on the home page to begin chatting with our support team."
18
18
  })] }),
19
19
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
20
- className: "mb-2 font-medium text-base text-primary",
20
+ className: "mb-2 font-medium text-base text-co-primary",
21
21
  children: "Can I view previous conversations?"
22
22
  }), /* @__PURE__ */ jsx("p", {
23
- className: "text-primary/60 text-sm leading-relaxed",
23
+ className: "text-co-primary/60 text-sm leading-relaxed",
24
24
  children: "Yes! Navigate to the Conversation History page to see all your past conversations."
25
25
  })] }),
26
26
  /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
27
- className: "mb-2 font-medium text-base text-primary",
27
+ className: "mb-2 font-medium text-base text-co-primary",
28
28
  children: "How quickly will I get a response?"
29
29
  }), /* @__PURE__ */ jsx("p", {
30
- className: "text-primary/60 text-sm leading-relaxed",
30
+ className: "text-co-primary/60 text-sm leading-relaxed",
31
31
  children: "Our team typically responds within a few minutes during business hours."
32
32
  })] })
33
33
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"articles.js","names":["ArticlesPage: React.FC"],"sources":["../../../src/support/pages/articles.tsx"],"sourcesContent":["import type React from \"react\";\nimport { Container } from \"../components/container\";\nimport { Header } from \"../components/header\";\nimport { NavigationTab } from \"../components/navigation-tab\";\n\nexport const ArticlesPage: React.FC = () => (\n\t<>\n\t\t<Header>\n\t\t\t<NavigationTab />\n\t\t</Header>\n\t\t<Container>\n\t\t\t<div className=\"p-2\">\n\t\t\t\t<div className=\"flex flex-col gap-5\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-primary\">\n\t\t\t\t\t\t\tHow do I start a conversation?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tClick the \"Start New Conversation\" button on the home page to\n\t\t\t\t\t\t\tbegin chatting with our support team.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-primary\">\n\t\t\t\t\t\t\tCan I view previous conversations?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tYes! Navigate to the Conversation History page to see all your\n\t\t\t\t\t\t\tpast conversations.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-primary\">\n\t\t\t\t\t\t\tHow quickly will I get a response?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tOur team typically responds within a few minutes during business\n\t\t\t\t\t\t\thours.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Container>\n\t</>\n);\n"],"mappings":";;;;;;AAKA,MAAaA,qBACZ,4CACC,oBAAC,oBACA,oBAAC,kBAAgB,GACT,EACT,oBAAC,uBACA,oBAAC;CAAI,WAAU;WACd,qBAAC;EAAI,WAAU;;GACd,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA0C;KAEnD,EACL,oBAAC;IAAE,WAAU;cAA0C;KAGnD,IACC;GACN,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA0C;KAEnD,EACL,oBAAC;IAAE,WAAU;cAA0C;KAGnD,IACC;GACN,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA0C;KAEnD,EACL,oBAAC;IAAE,WAAU;cAA0C;KAGnD,IACC;;GACD;EACD,GACK,IACV"}
1
+ {"version":3,"file":"articles.js","names":["ArticlesPage: React.FC"],"sources":["../../../src/support/pages/articles.tsx"],"sourcesContent":["import type React from \"react\";\nimport { Container } from \"../components/container\";\nimport { Header } from \"../components/header\";\nimport { NavigationTab } from \"../components/navigation-tab\";\n\nexport const ArticlesPage: React.FC = () => (\n\t<>\n\t\t<Header>\n\t\t\t<NavigationTab />\n\t\t</Header>\n\t\t<Container>\n\t\t\t<div className=\"p-2\">\n\t\t\t\t<div className=\"flex flex-col gap-5\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-co-primary\">\n\t\t\t\t\t\t\tHow do I start a conversation?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-co-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tClick the \"Start New Conversation\" button on the home page to\n\t\t\t\t\t\t\tbegin chatting with our support team.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-co-primary\">\n\t\t\t\t\t\t\tCan I view previous conversations?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-co-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tYes! Navigate to the Conversation History page to see all your\n\t\t\t\t\t\t\tpast conversations.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<h3 className=\"mb-2 font-medium text-base text-co-primary\">\n\t\t\t\t\t\t\tHow quickly will I get a response?\n\t\t\t\t\t\t</h3>\n\t\t\t\t\t\t<p className=\"text-co-primary/60 text-sm leading-relaxed\">\n\t\t\t\t\t\t\tOur team typically responds within a few minutes during business\n\t\t\t\t\t\t\thours.\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</Container>\n\t</>\n);\n"],"mappings":";;;;;;AAKA,MAAaA,qBACZ,4CACC,oBAAC,oBACA,oBAAC,kBAAgB,GACT,EACT,oBAAC,uBACA,oBAAC;CAAI,WAAU;WACd,qBAAC;EAAI,WAAU;;GACd,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA6C;KAEtD,EACL,oBAAC;IAAE,WAAU;cAA6C;KAGtD,IACC;GACN,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA6C;KAEtD,EACL,oBAAC;IAAE,WAAU;cAA6C;KAGtD,IACC;GACN,qBAAC,oBACA,oBAAC;IAAG,WAAU;cAA6C;KAEtD,EACL,oBAAC;IAAE,WAAU;cAA6C;KAGtD,IACC;;GACD;EACD,GACK,IACV"}
@@ -1,6 +1,6 @@
1
1
  import { AvatarStack } from "../components/avatar-stack.js";
2
2
  import { useSupportNavigation } from "../store/support-store.js";
3
- import { Button } from "../components/button.js";
3
+ import { CoButton } from "../components/button.js";
4
4
  import icons_default from "../components/icons.js";
5
5
  import { Header } from "../components/header.js";
6
6
  import { Text, useSupportText } from "../text/index.js";
@@ -77,7 +77,7 @@ const ConversationHistoryPage = () => {
77
77
  conversation,
78
78
  onClick: () => history.openConversation(conversation.id)
79
79
  }, conversation.id))
80
- }), history.hasMore && /* @__PURE__ */ jsx(Button, {
80
+ }), history.hasMore && /* @__PURE__ */ jsx(CoButton, {
81
81
  className: "relative mt-6 w-full text-co-primary/40 text-xs hover:text-co-primary",
82
82
  onClick: history.showAll,
83
83
  variant: "ghost",
@@ -89,7 +89,7 @@ const ConversationHistoryPage = () => {
89
89
  })]
90
90
  }), /* @__PURE__ */ jsxs("div", {
91
91
  className: "sticky bottom-4 z-10 flex w-full flex-col items-center gap-2",
92
- children: [/* @__PURE__ */ jsxs(Button, {
92
+ children: [/* @__PURE__ */ jsxs(CoButton, {
93
93
  className: "relative w-full justify-between",
94
94
  onClick: () => history.startConversation(),
95
95
  size: "large",
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-history.js","names":["ConversationHistoryPage: React.FC","Icon"],"sources":["../../../src/support/pages/conversation-history.tsx"],"sourcesContent":["import { useSupport } from \"@cossistant/react\";\nimport { PENDING_CONVERSATION_ID } from \"@cossistant/react/utils/id\";\nimport type React from \"react\";\nimport { useConversationHistoryPage } from \"../../hooks/use-conversation-history-page\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { Button } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { TextEffect } from \"../components/text-effect\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\n/**\n * Conversation history page component.\n *\n * Displays:\n * - List of all conversations\n * - Pagination controls\n * - Button to start new conversation\n *\n * All logic is handled by the useConversationHistoryPage hook.\n */\nexport const ConversationHistoryPage: React.FC = () => {\n\tconst { goBack, canGoBack, navigate } = useSupportNavigation();\n\tconst { availableAIAgents, availableHumanAgents } = useSupport();\n\tconst text = useSupportText();\n\n\tconst history = useConversationHistoryPage({\n\t\tinitialVisibleCount: 4,\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t});\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({\n\t\t\t\tpage: \"HOME\",\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans text-md leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.conversationHistory.title\")}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<div className=\"flex flex-1 flex-col items-center justify-between gap-2 px-6 pb-4\">\n\t\t\t\t{history.conversations.length > 0 && (\n\t\t\t\t\t<div className=\"flex flex-col items-center justify-between gap-2 pt-10\">\n\t\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t\t{history.visibleConversations.map((conversation) => (\n\t\t\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\t\t\tconversation={conversation}\n\t\t\t\t\t\t\t\t\tkey={conversation.id}\n\t\t\t\t\t\t\t\t\tonClick={() => history.openConversation(conversation.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{history.hasMore && (\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tclassName=\"relative mt-6 w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\t\t\tonClick={history.showAll}\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\t\ttextKey=\"page.conversationHistory.showMore\"\n\t\t\t\t\t\t\t\t\tvariables={{ count: history.remainingCount }}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => history.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\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\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-2\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAaA,gCAA0C;CACtD,MAAM,EAAE,QAAQ,WAAW,aAAa,sBAAsB;CAC9D,MAAM,EAAE,mBAAmB,yBAAyB,YAAY;CAChE,MAAM,OAAO,gBAAgB;CAE7B,MAAM,UAAU,2BAA2B;EAC1C,qBAAqB;EACrB,qBAAqB,mBAAmB;AACvC,YAAS;IACR,MAAM;IACN,QAAQ,EACP,gBACA;IACD,CAAC;;EAEH,sBAAsB,mBAAmB;AACxC,YAAS;IACR,MAAM;IACN,QAAQ;KACP,gBAAgB;KAChB;KACA;IACD,CAAC;;EAEH,CAAC;CAEF,MAAM,qBAAqB;AAC1B,MAAI,UACH,SAAQ;MAER,UAAS,EACR,MAAM,QACN,CAAC;;AAIJ,QACC,4CACC,oBAAC;EAAO,UAAU;YACjB,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACd,oBAAC;KAAG,WAAU;eACZ,KAAK,iCAAiC;MACnC;KACA,EACN,oBAAC;IACA,UAAU;IACV,UAAU;IACV,aAAa;IACb,MAAM;IACN,SAAS;KACR;IACG;GACE,EAET,qBAAC;EAAI,WAAU;aACb,QAAQ,cAAc,SAAS,KAC/B,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACb,QAAQ,qBAAqB,KAAK,iBAClC,oBAAC;KACA,WAAU;KACI;KAEd,eAAe,QAAQ,iBAAiB,aAAa,GAAG;OADnD,aAAa,GAEjB,CACD;KACG,EACL,QAAQ,WACR,oBAAC;IACA,WAAU;IACV,SAAS,QAAQ;IACjB,SAAQ;cAER,oBAAC;KACA,IAAG;KACH,SAAQ;KACR,WAAW,EAAE,OAAO,QAAQ,gBAAgB;MAC3C;KACM;IAEL,EAGP,qBAAC;GAAI,WAAU;cACd,qBAAC;IACA,WAAU;IACV,eAAe,QAAQ,mBAAmB;IAC1C,MAAK;IACL,SAAQ;eAER,oBAACC;KACA,WAAU;KACV,MAAK;KACL,SAAQ;MACP,EACF,oBAAC;KAAK,IAAG;KAAO,SAAQ;MAA+B;KAC/C,EACT,oBAAC,aAAU,WAAU,cAAc;IAC9B;GACD,IACJ"}
1
+ {"version":3,"file":"conversation-history.js","names":["ConversationHistoryPage: React.FC","Icon"],"sources":["../../../src/support/pages/conversation-history.tsx"],"sourcesContent":["import { useSupport } from \"@cossistant/react\";\nimport { PENDING_CONVERSATION_ID } from \"@cossistant/react/utils/id\";\nimport type React from \"react\";\nimport { useConversationHistoryPage } from \"../../hooks/use-conversation-history-page\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { TextEffect } from \"../components/text-effect\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\n/**\n * Conversation history page component.\n *\n * Displays:\n * - List of all conversations\n * - Pagination controls\n * - Button to start new conversation\n *\n * All logic is handled by the useConversationHistoryPage hook.\n */\nexport const ConversationHistoryPage: React.FC = () => {\n\tconst { goBack, canGoBack, navigate } = useSupportNavigation();\n\tconst { availableAIAgents, availableHumanAgents } = useSupport();\n\tconst text = useSupportText();\n\n\tconst history = useConversationHistoryPage({\n\t\tinitialVisibleCount: 4,\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t});\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({\n\t\t\t\tpage: \"HOME\",\n\t\t\t});\n\t\t}\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans text-md leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.conversationHistory.title\")}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<div className=\"flex flex-1 flex-col items-center justify-between gap-2 px-6 pb-4\">\n\t\t\t\t{history.conversations.length > 0 && (\n\t\t\t\t\t<div className=\"flex flex-col items-center justify-between gap-2 pt-10\">\n\t\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t\t{history.visibleConversations.map((conversation) => (\n\t\t\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\t\t\tconversation={conversation}\n\t\t\t\t\t\t\t\t\tkey={conversation.id}\n\t\t\t\t\t\t\t\t\tonClick={() => history.openConversation(conversation.id)}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{history.hasMore && (\n\t\t\t\t\t\t\t<CoButton\n\t\t\t\t\t\t\t\tclassName=\"relative mt-6 w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\t\t\tonClick={history.showAll}\n\t\t\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\t\t\ttextKey=\"page.conversationHistory.showMore\"\n\t\t\t\t\t\t\t\t\tvariables={{ count: history.remainingCount }}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => history.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\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\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</CoButton>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-2\" />\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAaA,gCAA0C;CACtD,MAAM,EAAE,QAAQ,WAAW,aAAa,sBAAsB;CAC9D,MAAM,EAAE,mBAAmB,yBAAyB,YAAY;CAChE,MAAM,OAAO,gBAAgB;CAE7B,MAAM,UAAU,2BAA2B;EAC1C,qBAAqB;EACrB,qBAAqB,mBAAmB;AACvC,YAAS;IACR,MAAM;IACN,QAAQ,EACP,gBACA;IACD,CAAC;;EAEH,sBAAsB,mBAAmB;AACxC,YAAS;IACR,MAAM;IACN,QAAQ;KACP,gBAAgB;KAChB;KACA;IACD,CAAC;;EAEH,CAAC;CAEF,MAAM,qBAAqB;AAC1B,MAAI,UACH,SAAQ;MAER,UAAS,EACR,MAAM,QACN,CAAC;;AAIJ,QACC,4CACC,oBAAC;EAAO,UAAU;YACjB,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACd,oBAAC;KAAG,WAAU;eACZ,KAAK,iCAAiC;MACnC;KACA,EACN,oBAAC;IACA,UAAU;IACV,UAAU;IACV,aAAa;IACb,MAAM;IACN,SAAS;KACR;IACG;GACE,EAET,qBAAC;EAAI,WAAU;aACb,QAAQ,cAAc,SAAS,KAC/B,qBAAC;GAAI,WAAU;cACd,oBAAC;IAAI,WAAU;cACb,QAAQ,qBAAqB,KAAK,iBAClC,oBAAC;KACA,WAAU;KACI;KAEd,eAAe,QAAQ,iBAAiB,aAAa,GAAG;OADnD,aAAa,GAEjB,CACD;KACG,EACL,QAAQ,WACR,oBAAC;IACA,WAAU;IACV,SAAS,QAAQ;IACjB,SAAQ;cAER,oBAAC;KACA,IAAG;KACH,SAAQ;KACR,WAAW,EAAE,OAAO,QAAQ,gBAAgB;MAC3C;KACQ;IAEP,EAGP,qBAAC;GAAI,WAAU;cACd,qBAAC;IACA,WAAU;IACV,eAAe,QAAQ,mBAAmB;IAC1C,MAAK;IACL,SAAQ;eAER,oBAACC;KACA,WAAU;KACV,MAAK;KACL,SAAQ;MACP,EACF,oBAAC;KAAK,IAAG;KAAO,SAAQ;MAA+B;KAC7C,EACX,oBAAC,aAAU,WAAU,cAAc;IAC9B;GACD,IACJ"}
@@ -51,7 +51,7 @@ const ConversationPage = ({ conversationId: initialConversationId, initialMessag
51
51
  children: website?.name
52
52
  }), /* @__PURE__ */ jsx(Text, {
53
53
  as: "p",
54
- className: "text-muted-foreground text-sm",
54
+ className: "text-co-muted-foreground text-sm",
55
55
  textKey: "common.labels.supportOnline"
56
56
  })]
57
57
  }), /* @__PURE__ */ jsx(AvatarStack, {
@@ -73,7 +73,7 @@ const ConversationPage = ({ conversationId: initialConversationId, initialMessag
73
73
  tools: timelineTools
74
74
  }),
75
75
  isConversationClosed ? /* @__PURE__ */ jsx("div", {
76
- className: "m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-muted-foreground text-sm",
76
+ className: "m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-co-muted-foreground text-sm",
77
77
  children: /* @__PURE__ */ jsx(Text, {
78
78
  as: "p",
79
79
  textKey: "component.conversationPage.closedMessage"
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useMemo } from \"react\";\nimport { useConversation } from \"../../hooks/use-conversation\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t */\n\tconversationId: string;\n\n\t/**\n\t * Optional initial message to send when opening the conversation.\n\t */\n\tinitialMessage?: string;\n\n\t/**\n\t * Optional timeline items to display (for optimistic updates or initial state).\n\t */\n\titems?: TimelineItem[];\n};\n\n/**\n * Main conversation page component.\n *\n * All conversation logic is handled by the useConversationPage hook,\n * making this component focused purely on rendering and user interaction.\n */\ntype ConversationPageComponent = (props: ConversationPageProps) => ReactElement;\n\nexport const ConversationPage: ConversationPageComponent = ({\n\tconversationId: initialConversationId,\n\tinitialMessage,\n\titems: passedItems = [],\n}: ConversationPageProps) => {\n\tconst { website, availableAIAgents, availableHumanAgents, visitor } =\n\t\tuseSupport();\n\tconst { navigate, replace, goBack, canGoBack } = useSupportNavigation();\n\tconst { isOpen } = useSupportConfig();\n\tconst text = useSupportText();\n\n\tconst timelineTools = useMemo(\n\t\t() => ({\n\t\t\tidentification: { component: IdentificationTimelineTool },\n\t\t}),\n\t\t[]\n\t);\n\n\t// Main conversation hook - handles all logic\n\tconst conversation = useConversationPage({\n\t\tconversationId: initialConversationId,\n\t\titems: passedItems,\n\t\tinitialMessage,\n\t\tautoSeenEnabled: isOpen,\n\t\tonConversationIdChange: (newConversationId) => {\n\t\t\t// Update navigation when conversation is created\n\t\t\treplace({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: { conversationId: newConversationId },\n\t\t\t});\n\t\t},\n\t});\n\n\tconst { conversation: activeConversation } = useConversation(\n\t\tconversation.isPending ? null : conversation.conversationId,\n\t\t{ enabled: !conversation.isPending }\n\t);\n\n\tconst isConversationClosed = Boolean(\n\t\tactiveConversation &&\n\t\t\t(activeConversation.status === ConversationStatus.RESOLVED ||\n\t\t\t\tactiveConversation.status === ConversationStatus.SPAM ||\n\t\t\t\tactiveConversation.deletedAt)\n\t);\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({ page: \"HOME\" });\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex h-full flex-col gap-0 overflow-hidden\">\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<p className=\"font-medium text-sm\">{website?.name}</p>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"text-muted-foreground text-sm\"\n\t\t\t\t\t\t\ttextKey=\"common.labels.supportOnline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<ConversationTimelineList\n\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\tclassName=\"min-h-0 flex-1 px-4\"\n\t\t\t\tconversationId={conversation.conversationId}\n\t\t\t\tcurrentVisitorId={visitor?.id}\n\t\t\t\titems={conversation.items}\n\t\t\t\ttools={timelineTools}\n\t\t\t/>\n\n\t\t\t{isConversationClosed ? (\n\t\t\t\t<div className=\"m-4 flex items-center justify-center text-balance px-4 pb-6 text-center font-medium text-muted-foreground text-sm\">\n\t\t\t\t\t<Text as=\"p\" textKey=\"component.conversationPage.closedMessage\" />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex-shrink-0 p-1\">\n\t\t\t\t\t<MultimodalInput\n\t\t\t\t\t\tdisabled={conversation.composer.isSubmitting}\n\t\t\t\t\t\terror={conversation.error}\n\t\t\t\t\t\tfiles={conversation.composer.files}\n\t\t\t\t\t\tisSubmitting={conversation.composer.isSubmitting}\n\t\t\t\t\t\tonChange={conversation.composer.setMessage}\n\t\t\t\t\t\tonFileSelect={conversation.composer.addFiles}\n\t\t\t\t\t\tonRemoveFile={conversation.composer.removeFile}\n\t\t\t\t\t\tonSubmit={conversation.composer.submit}\n\t\t\t\t\t\tplaceholder={text(\"component.multimodalInput.placeholder\")}\n\t\t\t\t\t\tvalue={conversation.composer.message}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;AAuCA,MAAaA,oBAA+C,EAC3D,gBAAgB,uBAChB,gBACA,OAAO,cAAc,EAAE,OACK;CAC5B,MAAM,EAAE,SAAS,mBAAmB,sBAAsB,YACzD,YAAY;CACb,MAAM,EAAE,UAAU,SAAS,QAAQ,cAAc,sBAAsB;CACvE,MAAM,EAAE,WAAW,kBAAkB;CACrC,MAAM,OAAO,gBAAgB;CAE7B,MAAM,gBAAgB,eACd,EACN,gBAAgB,EAAE,WAAW,4BAA4B,E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AC1D,OAAO,aAAa,SAAS;MAC5B;KACG;;GAEF"}
1
+ {"version":3,"file":"conversation.js","names":["ConversationPage: ConversationPageComponent"],"sources":["../../../src/support/pages/conversation.tsx"],"sourcesContent":["import { ConversationStatus } from \"@cossistant/types\";\nimport type { TimelineItem } from \"@cossistant/types/api/timeline-item\";\nimport { type ReactElement, useMemo } from \"react\";\nimport { useConversation } from \"../../hooks/use-conversation\";\nimport { useConversationPage } from \"../../hooks/use-conversation-page\";\nimport { useSupport } from \"../../provider\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { ConversationTimelineList } from \"../components/conversation-timeline\";\nimport { Header } from \"../components/header\";\nimport { MultimodalInput } from \"../components/multimodal-input\";\nimport { IdentificationTimelineTool } from \"../components/timeline-identification-tool\";\nimport { useSupportConfig, useSupportNavigation } from \"../store\";\nimport { Text, useSupportText } from \"../text\";\n\ntype ConversationPageProps = {\n\t/**\n\t * The conversation ID to display (can be PENDING_CONVERSATION_ID or a real ID).\n\t */\n\tconversationId: string;\n\n\t/**\n\t * Optional initial message to send when opening the conversation.\n\t */\n\tinitialMessage?: string;\n\n\t/**\n\t * Optional timeline items to display (for optimistic updates or initial state).\n\t */\n\titems?: TimelineItem[];\n};\n\n/**\n * Main conversation page component.\n *\n * All conversation logic is handled by the useConversationPage hook,\n * making this component focused purely on rendering and user interaction.\n */\ntype ConversationPageComponent = (props: ConversationPageProps) => ReactElement;\n\nexport const ConversationPage: ConversationPageComponent = ({\n\tconversationId: initialConversationId,\n\tinitialMessage,\n\titems: passedItems = [],\n}: ConversationPageProps) => {\n\tconst { website, availableAIAgents, availableHumanAgents, visitor } =\n\t\tuseSupport();\n\tconst { navigate, replace, goBack, canGoBack } = useSupportNavigation();\n\tconst { isOpen } = useSupportConfig();\n\tconst text = useSupportText();\n\n\tconst timelineTools = useMemo(\n\t\t() => ({\n\t\t\tidentification: { component: IdentificationTimelineTool },\n\t\t}),\n\t\t[]\n\t);\n\n\t// Main conversation hook - handles all logic\n\tconst conversation = useConversationPage({\n\t\tconversationId: initialConversationId,\n\t\titems: passedItems,\n\t\tinitialMessage,\n\t\tautoSeenEnabled: isOpen,\n\t\tonConversationIdChange: (newConversationId) => {\n\t\t\t// Update navigation when conversation is created\n\t\t\treplace({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: { conversationId: newConversationId },\n\t\t\t});\n\t\t},\n\t});\n\n\tconst { conversation: activeConversation } = useConversation(\n\t\tconversation.isPending ? null : conversation.conversationId,\n\t\t{ enabled: !conversation.isPending }\n\t);\n\n\tconst isConversationClosed = Boolean(\n\t\tactiveConversation &&\n\t\t\t(activeConversation.status === ConversationStatus.RESOLVED ||\n\t\t\t\tactiveConversation.status === ConversationStatus.SPAM ||\n\t\t\t\tactiveConversation.deletedAt)\n\t);\n\n\tconst handleGoBack = () => {\n\t\tif (canGoBack) {\n\t\t\tgoBack();\n\t\t} else {\n\t\t\tnavigate({ page: \"HOME\" });\n\t\t}\n\t};\n\n\treturn (\n\t\t<div className=\"flex h-full flex-col gap-0 overflow-hidden\">\n\t\t\t<Header onGoBack={handleGoBack}>\n\t\t\t\t<div className=\"flex w-full items-center justify-between gap-2 py-3\">\n\t\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t\t<p className=\"font-medium text-sm\">{website?.name}</p>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"text-co-muted-foreground text-sm\"\n\t\t\t\t\t\t\ttextKey=\"common.labels.supportOnline\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\taiAgents={availableAIAgents}\n\t\t\t\t\t\tgapWidth={2}\n\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\tsize={32}\n\t\t\t\t\t\tspacing={28}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</Header>\n\n\t\t\t<ConversationTimelineList\n\t\t\t\tavailableAIAgents={availableAIAgents}\n\t\t\t\tavailableHumanAgents={availableHumanAgents}\n\t\t\t\tclassName=\"min-h-0 flex-1 px-4\"\n\t\t\t\tconversationId={conversation.conversationId}\n\t\t\t\tcurrentVisitorId={visitor?.id}\n\t\t\t\titems={conversation.items}\n\t\t\t\ttools={timelineTools}\n\t\t\t/>\n\n\t\t\t{isConversationClosed ? (\n\t\t\t\t<div className=\"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\t<Text as=\"p\" textKey=\"component.conversationPage.closedMessage\" />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex-shrink-0 p-1\">\n\t\t\t\t\t<MultimodalInput\n\t\t\t\t\t\tdisabled={conversation.composer.isSubmitting}\n\t\t\t\t\t\terror={conversation.error}\n\t\t\t\t\t\tfiles={conversation.composer.files}\n\t\t\t\t\t\tisSubmitting={conversation.composer.isSubmitting}\n\t\t\t\t\t\tonChange={conversation.composer.setMessage}\n\t\t\t\t\t\tonFileSelect={conversation.composer.addFiles}\n\t\t\t\t\t\tonRemoveFile={conversation.composer.removeFile}\n\t\t\t\t\t\tonSubmit={conversation.composer.submit}\n\t\t\t\t\t\tplaceholder={text(\"component.multimodalInput.placeholder\")}\n\t\t\t\t\t\tvalue={conversation.composer.message}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;AAuCA,MAAaA,oBAA+C,EAC3D,gBAAgB,uBAChB,gBACA,OAAO,cAAc,EAAE,OACK;CAC5B,MAAM,EAAE,SAAS,mBAAmB,sBAAsB,YACzD,YAAY;CACb,MAAM,EAAE,UAAU,SAAS,QAAQ,cAAc,sBAAsB;CACvE,MAAM,EAAE,WAAW,kBAAkB;CACrC,MAAM,OAAO,gBAAgB;CAE7B,MAAM,gBAAgB,eACd,EACN,gBAAgB,EAAE,WAAW,4BAA4B,EACzD,GACD,EA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aAAa,SAAS;MAC5B;KACG;;GAEF"}
@@ -1,6 +1,6 @@
1
1
  import { AvatarStack } from "../components/avatar-stack.js";
2
2
  import { useSupportNavigation } from "../store/support-store.js";
3
- import { Button } from "../components/button.js";
3
+ import { CoButton } from "../components/button.js";
4
4
  import icons_default from "../components/icons.js";
5
5
  import { Header } from "../components/header.js";
6
6
  import { Text, useSupportText } from "../text/index.js";
@@ -110,7 +110,7 @@ const HomePage = () => {
110
110
  filter: "blur(12px)"
111
111
  }
112
112
  },
113
- children: quickOptions?.map((option) => /* @__PURE__ */ jsx(Button, {
113
+ children: quickOptions?.map((option) => /* @__PURE__ */ jsx(CoButton, {
114
114
  className: "inline-flex w-fit rounded-lg border-dashed px-2",
115
115
  onClick: () => home.startConversation(option),
116
116
  size: "default",
@@ -123,7 +123,7 @@ const HomePage = () => {
123
123
  /* @__PURE__ */ jsxs("div", {
124
124
  className: "flex flex-shrink-0 flex-col items-center justify-center gap-2 px-6 pb-4",
125
125
  children: [
126
- home.availableConversationsCount > 0 && /* @__PURE__ */ jsx(Button, {
126
+ home.availableConversationsCount > 0 && /* @__PURE__ */ jsx(CoButton, {
127
127
  className: "relative w-full text-co-primary/40 text-xs hover:text-co-primary",
128
128
  onClick: home.openConversationHistory,
129
129
  variant: "ghost",
@@ -145,7 +145,7 @@ const HomePage = () => {
145
145
  }),
146
146
  /* @__PURE__ */ jsxs("div", {
147
147
  className: "sticky bottom-4 z-10 flex w-full flex-col items-center gap-2",
148
- children: [/* @__PURE__ */ jsxs(Button, {
148
+ children: [/* @__PURE__ */ jsxs(CoButton, {
149
149
  className: "relative w-full justify-between",
150
150
  onClick: () => home.startConversation(),
151
151
  size: "large",
@@ -1 +1 @@
1
- {"version":3,"file":"home.js","names":["Icon"],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":["import { motion } from \"motion/react\";\nimport type { ReactElement } from \"react\";\nimport { useHomePage } from \"../../hooks/use-home-page\";\nimport { useSupport } from \"../../provider\";\nimport { PENDING_CONVERSATION_ID } from \"../../utils/id\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { Button } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { TextEffect } from \"../components/text-effect\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\n/**\n * Home page component for the support widget.\n *\n * Displays:\n * - Welcome message with available agents\n * - Quick action buttons\n * - Last open conversation (if any)\n * - Button to start new conversation\n * - Link to conversation history\n *\n * All logic is handled by the useHomePage hook.\n */\nexport const HomePage = (): ReactElement => {\n\tconst { website, availableHumanAgents, visitor, quickOptions } = useSupport();\n\tconst { navigate } = useSupportNavigation();\n\tconst text = useSupportText();\n\n\t// Main home page hook - handles all logic\n\tconst home = useHomePage({\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversationHistory: () => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION_HISTORY\",\n\t\t\t});\n\t\t},\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t<Header>{/* <NavigationTab /> */}</Header>\n\t\t\t<div className=\"sticky top-0 flex flex-1 px-6\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\tclassName=\"flex flex-col gap-2\"\n\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\t\taiAgents={website?.availableAIAgents || []}\n\t\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tsize={44}\n\t\t\t\t\t\t\tspacing={32}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans font-medium text-2xl leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.home.greeting\", {\n\t\t\t\t\t\t\t\tvisitorName: visitor?.contact?.name?.split(\" \")[0] ?? undefined,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t{quickOptions.length > 0 && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\tclassName=\"mt-6 space-x-2 space-y-2\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{quickOptions?.map((option) => (\n\t\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\t\tclassName=\"inline-flex w-fit rounded-lg border-dashed px-2\"\n\t\t\t\t\t\t\t\t\tkey={option}\n\t\t\t\t\t\t\t\t\tonClick={() => home.startConversation(option)}\n\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{option}\n\t\t\t\t\t\t\t\t</Button>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-shrink-0 flex-col items-center justify-center gap-2 px-6 pb-4\">\n\t\t\t\t{home.availableConversationsCount > 0 && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"relative w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\tonClick={home.openConversationHistory}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\ttextKey=\"page.home.history.more\"\n\t\t\t\t\t\t\tvariables={{ count: home.availableConversationsCount }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\n\t\t\t\t{home.lastOpenConversation && (\n\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\tconversation={home.lastOpenConversation}\n\t\t\t\t\t\t\tkey={home.lastOpenConversation.id}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tif (home.lastOpenConversation) {\n\t\t\t\t\t\t\t\t\thome.openConversation(home.lastOpenConversation.id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => home.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\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\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</Button>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-0\" />\n\t\t\t\t</div>\n\t\t\t\t<div />\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,iBAA+B;CAC3C,MAAM,EAAE,SAAS,sBAAsB,SAAS,iBAAiB,YAAY;CAC7E,MAAM,EAAE,aAAa,sBAAsB;CAC3C,MAAM,OAAO,gBAAgB;CAG7B,MAAM,OAAO,YAAY;EACxB,sBAAsB,mBAAmB;AACxC,YAAS;IACR,MAAM;IACN,QAAQ;KACP,gBAAgB;KAChB;KACA;IACD,CAAC;;EAEH,qBAAqB,mBAAmB;AACvC,YAAS;IACR,MAAM;IACN,QAAQ,EACP,gBACA;IACD,CAAC;;EAEH,iCAAiC;AAChC,YAAS,EACR,MAAM,wBACN,CAAC;;EAEH,CAAC;AAEF,QACC;EACC,oBAAC,WAAyC;EAC1C,oBAAC;GAAI,WAAU;aACd,qBAAC;IAAI,WAAU;eACd,qBAAC,OAAO;KAC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,qBAAqB,GAM9B;MACG;IAGP,qBAAC;KAAI,WAAU;gBACd,qBAAC;MACA,WAAU;MACV,eAAe,KAAK,mBAAmB;MACvC,MAAK;MACL,SAAQ;iBAER,oBAACA;OACA,WAAU;OACV,MAAK;OACL,SAAQ;QACP,EACF,oBAAC;OAAK,IAAG;OAAO,SAAQ;QAA+B;OAC/C,EACT,oBAAC,aAAU,WAAU,cAAc;MAC9B;IACN,oBAAC,UAAM;;IACF;KACJ"}
1
+ {"version":3,"file":"home.js","names":["Icon"],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":["import { motion } from \"motion/react\";\nimport type { ReactElement } from \"react\";\nimport { useHomePage } from \"../../hooks/use-home-page\";\nimport { useSupport } from \"../../provider\";\nimport { PENDING_CONVERSATION_ID } from \"../../utils/id\";\nimport { AvatarStack } from \"../components/avatar-stack\";\nimport { CoButton } from \"../components/button\";\nimport { ConversationButtonLink } from \"../components/conversation-button-link\";\nimport { Header } from \"../components/header\";\nimport Icon from \"../components/icons\";\nimport { TextEffect } from \"../components/text-effect\";\nimport { Watermark } from \"../components/watermark\";\nimport { useSupportNavigation } from \"../store/support-store\";\nimport { Text, useSupportText } from \"../text\";\n\n/**\n * Home page component for the support widget.\n *\n * Displays:\n * - Welcome message with available agents\n * - Quick action buttons\n * - Last open conversation (if any)\n * - Button to start new conversation\n * - Link to conversation history\n *\n * All logic is handled by the useHomePage hook.\n */\nexport const HomePage = (): ReactElement => {\n\tconst { website, availableHumanAgents, visitor, quickOptions } = useSupport();\n\tconst { navigate } = useSupportNavigation();\n\tconst text = useSupportText();\n\n\t// Main home page hook - handles all logic\n\tconst home = useHomePage({\n\t\tonStartConversation: (initialMessage) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId: PENDING_CONVERSATION_ID,\n\t\t\t\t\tinitialMessage,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversation: (conversationId) => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION\",\n\t\t\t\tparams: {\n\t\t\t\t\tconversationId,\n\t\t\t\t},\n\t\t\t});\n\t\t},\n\t\tonOpenConversationHistory: () => {\n\t\t\tnavigate({\n\t\t\t\tpage: \"CONVERSATION_HISTORY\",\n\t\t\t});\n\t\t},\n\t});\n\n\treturn (\n\t\t<>\n\t\t\t<Header>{/* <NavigationTab /> */}</Header>\n\t\t\t<div className=\"sticky top-0 flex flex-1 px-6\">\n\t\t\t\t<div className=\"flex flex-col gap-2\">\n\t\t\t\t\t<motion.div\n\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\tclassName=\"flex flex-col gap-2\"\n\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<AvatarStack\n\t\t\t\t\t\t\taiAgents={website?.availableAIAgents || []}\n\t\t\t\t\t\t\thumanAgents={availableHumanAgents}\n\t\t\t\t\t\t\tsize={44}\n\t\t\t\t\t\t\tspacing={32}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<h2 className=\"max-w-xs text-balance font-co-sans font-medium text-2xl leading-normal\">\n\t\t\t\t\t\t\t{text(\"page.home.greeting\", {\n\t\t\t\t\t\t\t\tvisitorName: visitor?.contact?.name?.split(\" \")[0] ?? undefined,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t</h2>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t{quickOptions.length > 0 && (\n\t\t\t\t\t\t<motion.div\n\t\t\t\t\t\t\tanimate=\"visible\"\n\t\t\t\t\t\t\tclassName=\"mt-6 space-x-2 space-y-2\"\n\t\t\t\t\t\t\texit=\"exit\"\n\t\t\t\t\t\t\tinitial=\"hidden\"\n\t\t\t\t\t\t\ttransition={{\n\t\t\t\t\t\t\t\tdelay: 0.1,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\tvariants={{\n\t\t\t\t\t\t\t\thidden: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t\tvisible: { opacity: 1, y: 0, filter: \"blur(0px)\" },\n\t\t\t\t\t\t\t\texit: { opacity: 0, y: 20, filter: \"blur(12px)\" },\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{quickOptions?.map((option) => (\n\t\t\t\t\t\t\t\t<CoButton\n\t\t\t\t\t\t\t\t\tclassName=\"inline-flex w-fit rounded-lg border-dashed px-2\"\n\t\t\t\t\t\t\t\t\tkey={option}\n\t\t\t\t\t\t\t\t\tonClick={() => home.startConversation(option)}\n\t\t\t\t\t\t\t\t\tsize=\"default\"\n\t\t\t\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{option}\n\t\t\t\t\t\t\t\t</CoButton>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</motion.div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"flex flex-shrink-0 flex-col items-center justify-center gap-2 px-6 pb-4\">\n\t\t\t\t{home.availableConversationsCount > 0 && (\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full text-co-primary/40 text-xs hover:text-co-primary\"\n\t\t\t\t\t\tonClick={home.openConversationHistory}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Text\n\t\t\t\t\t\t\tas=\"span\"\n\t\t\t\t\t\t\ttextKey=\"page.home.history.more\"\n\t\t\t\t\t\t\tvariables={{ count: home.availableConversationsCount }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</CoButton>\n\t\t\t\t)}\n\n\t\t\t\t{home.lastOpenConversation && (\n\t\t\t\t\t<div className=\"flex w-full flex-col overflow-clip rounded-md border border-co-border/80\">\n\t\t\t\t\t\t<ConversationButtonLink\n\t\t\t\t\t\t\tclassName=\"rounded-none\"\n\t\t\t\t\t\t\tconversation={home.lastOpenConversation}\n\t\t\t\t\t\t\tkey={home.lastOpenConversation.id}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tif (home.lastOpenConversation) {\n\t\t\t\t\t\t\t\t\thome.openConversation(home.lastOpenConversation.id);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\n\t\t\t\t<div className=\"sticky bottom-4 z-10 flex w-full flex-col items-center gap-2\">\n\t\t\t\t\t<CoButton\n\t\t\t\t\t\tclassName=\"relative w-full justify-between\"\n\t\t\t\t\t\tonClick={() => home.startConversation()}\n\t\t\t\t\t\tsize=\"large\"\n\t\t\t\t\t\tvariant=\"secondary\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon\n\t\t\t\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\t\t\t\tname=\"arrow-right\"\n\t\t\t\t\t\t\tvariant=\"default\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<Text as=\"span\" textKey=\"common.actions.askQuestion\" />\n\t\t\t\t\t</CoButton>\n\t\t\t\t\t<Watermark className=\"mt-4 mb-0\" />\n\t\t\t\t</div>\n\t\t\t\t<div />\n\t\t\t</div>\n\t\t</>\n\t);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,MAAa,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c;MACjD;eAEA,cAAc,KAAK,WACnB,oBAAC;MACA,WAAU;MAEV,eAAe,KAAK,kBAAkB,OAAO;MAC7C,MAAK;MACL,SAAQ;gBAEP;QALI,OAMK,CACV;MACU;KAET;IACD;EACN,qBAAC;GAAI,WAAU;;IACb,KAAK,8BAA8B,KACnC,oBAAC;KACA,WAAU;KACV,SAAS,KAAK;KACd,SAAQ;eAER,oBAAC;MACA,IAAG;MACH,SAAQ;MACR,WAAW,EAAE,OAAO,KAAK,6BAA6B;OACrD;MACQ;IAGX,KAAK,wBACL,oBAAC;KAAI,WAAU;eACd,oBAAC;MACA,WAAU;MACV,cAAc,KAAK;MAEnB,eAAe;AACd,WAAI,KAAK,qBACR,MAAK,iBAAiB,KAAK,qBAAqB,GAAG;;QAHhD,KAAK,qBAAqB,GAM9B;MACG;IAGP,qBAAC;KAAI,WAAU;gBACd,qBAAC;MACA,WAAU;MACV,eAAe,KAAK,mBAAmB;MACvC,MAAK;MACL,SAAQ;iBAER,oBAACA;OACA,WAAU;OACV,MAAK;OACL,SAAQ;QACP,EACF,oBAAC;OAAK,IAAG;OAAO,SAAQ;QAA+B;OAC7C,EACX,oBAAC,aAAU,WAAU,cAAc;MAC9B;IACN,oBAAC,UAAM;;IACF;KACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,KAE1B,YAAA,GAAY,MAAS,GAAA,CAAI,iBAAA;AAAiB,KAE1C,SAAA,CAAA,KAAS,CAAA,GAAA,MAAA,GAAA,CAA4B,CAAA,KAAK,EAAL,KAAK,EAAA,GAAA,MAAA,CAAA;AAAA,KAE1C,QAAA,CAAA,KAAQ,EAAA,KAAA,CAAA,GAAA,CAAA,KAAA,EACL,KADK,EAAA,KAAA,EAEL,KAFK,EAAA,GAGR,OAAA,CAAM,YAHE;KAKR,WAJG,CAAA,KAAA,EAAA,YAI4B,YAJ5B,CAAA,GAA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