@cossistant/react 0.0.4 → 0.0.5

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 (319) hide show
  1. package/_virtual/rolldown_runtime.js +19 -0
  2. package/conversation.d.ts +26 -3
  3. package/conversation.d.ts.map +1 -1
  4. package/hooks/index.d.ts +5 -3
  5. package/hooks/index.js +7 -5
  6. package/hooks/private/store/use-conversations-store.d.ts +8 -0
  7. package/hooks/private/store/use-conversations-store.d.ts.map +1 -1
  8. package/hooks/private/store/use-conversations-store.js +8 -0
  9. package/hooks/private/store/use-conversations-store.js.map +1 -1
  10. package/hooks/private/store/use-store-selector.d.ts +4 -0
  11. package/hooks/private/store/use-store-selector.d.ts.map +1 -1
  12. package/hooks/private/store/use-store-selector.js +5 -2
  13. package/hooks/private/store/use-store-selector.js.map +1 -1
  14. package/hooks/private/store/use-website-store.d.ts +4 -0
  15. package/hooks/private/store/use-website-store.d.ts.map +1 -1
  16. package/hooks/private/store/use-website-store.js +6 -3
  17. package/hooks/private/store/use-website-store.js.map +1 -1
  18. package/hooks/private/typing.d.ts +35 -0
  19. package/hooks/private/typing.d.ts.map +1 -0
  20. package/hooks/private/typing.js +49 -0
  21. package/hooks/private/typing.js.map +1 -0
  22. package/hooks/private/use-client-query.d.ts +5 -0
  23. package/hooks/private/use-client-query.d.ts.map +1 -1
  24. package/hooks/private/use-client-query.js +5 -0
  25. package/hooks/private/use-client-query.js.map +1 -1
  26. package/hooks/private/use-grouped-messages.d.ts +10 -4
  27. package/hooks/private/use-grouped-messages.d.ts.map +1 -1
  28. package/hooks/private/use-grouped-messages.js +24 -4
  29. package/hooks/private/use-grouped-messages.js.map +1 -1
  30. package/hooks/private/use-multimodal-input.d.ts.map +1 -1
  31. package/hooks/private/use-rest-client.d.ts.map +1 -1
  32. package/hooks/private/use-visitor-typing-reporter.d.ts +6 -0
  33. package/hooks/private/use-visitor-typing-reporter.d.ts.map +1 -1
  34. package/hooks/private/use-visitor-typing-reporter.js +6 -0
  35. package/hooks/private/use-visitor-typing-reporter.js.map +1 -1
  36. package/hooks/use-composer-refocus.d.ts.map +1 -1
  37. package/hooks/use-conversation-auto-seen.d.ts +9 -0
  38. package/hooks/use-conversation-auto-seen.d.ts.map +1 -1
  39. package/hooks/use-conversation-auto-seen.js +44 -3
  40. package/hooks/use-conversation-auto-seen.js.map +1 -1
  41. package/hooks/use-conversation-history-page.d.ts.map +1 -1
  42. package/hooks/use-conversation-history-page.js +16 -18
  43. package/hooks/use-conversation-history-page.js.map +1 -1
  44. package/hooks/use-conversation-lifecycle.d.ts.map +1 -1
  45. package/hooks/use-conversation-lifecycle.js +2 -4
  46. package/hooks/use-conversation-lifecycle.js.map +1 -1
  47. package/hooks/use-conversation-page.d.ts +6 -0
  48. package/hooks/use-conversation-page.d.ts.map +1 -1
  49. package/hooks/use-conversation-page.js +41 -3
  50. package/hooks/use-conversation-page.js.map +1 -1
  51. package/hooks/use-conversation-preview.d.ts +61 -0
  52. package/hooks/use-conversation-preview.d.ts.map +1 -0
  53. package/hooks/use-conversation-preview.js +173 -0
  54. package/hooks/use-conversation-preview.js.map +1 -0
  55. package/hooks/use-conversation-seen.d.ts +4 -0
  56. package/hooks/use-conversation-seen.d.ts.map +1 -1
  57. package/hooks/use-conversation-seen.js +4 -0
  58. package/hooks/use-conversation-seen.js.map +1 -1
  59. package/hooks/use-conversation-timeline-items.d.ts +4 -0
  60. package/hooks/use-conversation-timeline-items.d.ts.map +1 -1
  61. package/hooks/use-conversation-timeline-items.js +4 -0
  62. package/hooks/use-conversation-timeline-items.js.map +1 -1
  63. package/hooks/use-conversation-timeline.d.ts +32 -0
  64. package/hooks/use-conversation-timeline.d.ts.map +1 -0
  65. package/hooks/use-conversation-timeline.js +41 -0
  66. package/hooks/use-conversation-timeline.js.map +1 -0
  67. package/hooks/use-conversation-typing.d.ts +4 -0
  68. package/hooks/use-conversation-typing.d.ts.map +1 -1
  69. package/hooks/use-conversation-typing.js +4 -0
  70. package/hooks/use-conversation-typing.js.map +1 -1
  71. package/hooks/use-conversation.d.ts +11 -0
  72. package/hooks/use-conversation.d.ts.map +1 -1
  73. package/hooks/use-conversation.js +11 -0
  74. package/hooks/use-conversation.js.map +1 -1
  75. package/hooks/use-conversations.d.ts +12 -0
  76. package/hooks/use-conversations.d.ts.map +1 -1
  77. package/hooks/use-conversations.js +12 -0
  78. package/hooks/use-conversations.js.map +1 -1
  79. package/hooks/use-create-conversation.d.ts +5 -0
  80. package/hooks/use-create-conversation.d.ts.map +1 -1
  81. package/hooks/use-create-conversation.js +12 -9
  82. package/hooks/use-create-conversation.js.map +1 -1
  83. package/hooks/use-home-page.d.ts.map +1 -1
  84. package/hooks/use-home-page.js +6 -4
  85. package/hooks/use-home-page.js.map +1 -1
  86. package/hooks/use-message-composer.d.ts.map +1 -1
  87. package/hooks/use-realtime-support.d.ts.map +1 -1
  88. package/hooks/use-send-message.d.ts +9 -0
  89. package/hooks/use-send-message.d.ts.map +1 -1
  90. package/hooks/use-send-message.js +15 -13
  91. package/hooks/use-send-message.js.map +1 -1
  92. package/hooks/use-visitor.d.ts.map +1 -1
  93. package/hooks/use-visitor.js +28 -30
  94. package/hooks/use-visitor.js.map +1 -1
  95. package/hooks/use-window-visibility-focus.d.ts +4 -0
  96. package/hooks/use-window-visibility-focus.d.ts.map +1 -1
  97. package/hooks/use-window-visibility-focus.js +5 -2
  98. package/hooks/use-window-visibility-focus.js.map +1 -1
  99. package/identify-visitor.d.ts +12 -3
  100. package/identify-visitor.d.ts.map +1 -1
  101. package/identify-visitor.js +58 -9
  102. package/identify-visitor.js.map +1 -1
  103. package/index.d.ts +10 -7
  104. package/index.js +10 -9
  105. package/package.json +11 -16
  106. package/primitives/avatar/avatar.d.ts.map +1 -1
  107. package/primitives/avatar/fallback.d.ts.map +1 -1
  108. package/primitives/avatar/fallback.js +1 -3
  109. package/primitives/avatar/fallback.js.map +1 -1
  110. package/primitives/avatar/image.d.ts.map +1 -1
  111. package/primitives/avatar/index.d.ts +1 -0
  112. package/primitives/bubble.d.ts +2 -0
  113. package/primitives/bubble.d.ts.map +1 -1
  114. package/primitives/bubble.js +8 -2
  115. package/primitives/bubble.js.map +1 -1
  116. package/primitives/button.d.ts.map +1 -1
  117. package/primitives/conversation-timeline.d.ts.map +1 -1
  118. package/primitives/conversation-timeline.js +58 -5
  119. package/primitives/conversation-timeline.js.map +1 -1
  120. package/primitives/index.d.ts +1 -0
  121. package/primitives/index.parts.d.ts +1 -0
  122. package/primitives/multimodal-input.d.ts.map +1 -1
  123. package/primitives/timeline-item-group.d.ts +7 -7
  124. package/primitives/timeline-item-group.d.ts.map +1 -1
  125. package/primitives/timeline-item-group.js.map +1 -1
  126. package/primitives/timeline-item.d.ts +1 -1
  127. package/primitives/timeline-item.d.ts.map +1 -1
  128. package/primitives/timeline-item.js +7 -1
  129. package/primitives/timeline-item.js.map +1 -1
  130. package/primitives/window.d.ts +1 -1
  131. package/primitives/window.d.ts.map +1 -1
  132. package/primitives/window.js +4 -4
  133. package/primitives/window.js.map +1 -1
  134. package/provider.d.ts +23 -43
  135. package/provider.d.ts.map +1 -1
  136. package/provider.js +152 -49
  137. package/provider.js.map +1 -1
  138. package/realtime/event-filter.d.ts +4 -0
  139. package/realtime/event-filter.d.ts.map +1 -1
  140. package/realtime/event-filter.js +4 -0
  141. package/realtime/event-filter.js.map +1 -1
  142. package/realtime/index.js +1 -1
  143. package/realtime/provider.d.ts +7 -2
  144. package/realtime/provider.d.ts.map +1 -1
  145. package/realtime/provider.js +23 -1
  146. package/realtime/provider.js.map +1 -1
  147. package/realtime/seen-store.d.ts +13 -0
  148. package/realtime/seen-store.d.ts.map +1 -1
  149. package/realtime/seen-store.js +14 -2
  150. package/realtime/seen-store.js.map +1 -1
  151. package/realtime/support-provider.d.ts +1 -2
  152. package/realtime/support-provider.d.ts.map +1 -1
  153. package/realtime/support-provider.js +19 -20
  154. package/realtime/support-provider.js.map +1 -1
  155. package/realtime/typing-store.d.ts +18 -0
  156. package/realtime/typing-store.d.ts.map +1 -1
  157. package/realtime/typing-store.js +19 -2
  158. package/realtime/typing-store.js.map +1 -1
  159. package/realtime/use-realtime.d.ts +8 -4
  160. package/realtime/use-realtime.d.ts.map +1 -1
  161. package/realtime/use-realtime.js +4 -0
  162. package/realtime/use-realtime.js.map +1 -1
  163. package/realtime-events.d.ts +17 -3
  164. package/realtime-events.d.ts.map +1 -1
  165. package/schemas.d.ts +7 -1
  166. package/schemas.d.ts.map +1 -1
  167. package/support/components/avatar-stack.d.ts +8 -4
  168. package/support/components/avatar-stack.d.ts.map +1 -1
  169. package/support/components/avatar-stack.js +4 -0
  170. package/support/components/avatar-stack.js.map +1 -1
  171. package/support/components/avatar.d.ts +11 -6
  172. package/support/components/avatar.d.ts.map +1 -1
  173. package/support/components/avatar.js +4 -0
  174. package/support/components/avatar.js.map +1 -1
  175. package/support/components/bubble.d.ts.map +1 -1
  176. package/support/components/bubble.js +29 -6
  177. package/support/components/bubble.js.map +1 -1
  178. package/support/components/button.d.ts +8 -5
  179. package/support/components/button.d.ts.map +1 -1
  180. package/support/components/button.js +5 -1
  181. package/support/components/button.js.map +1 -1
  182. package/support/components/container.d.ts +0 -1
  183. package/support/components/container.d.ts.map +1 -1
  184. package/support/components/container.js +2 -8
  185. package/support/components/container.js.map +1 -1
  186. package/support/components/conversation-button-link.d.ts +8 -21
  187. package/support/components/conversation-button-link.d.ts.map +1 -1
  188. package/support/components/conversation-button-link.js +62 -178
  189. package/support/components/conversation-button-link.js.map +1 -1
  190. package/support/components/conversation-event.d.ts.map +1 -1
  191. package/support/components/conversation-event.js +4 -0
  192. package/support/components/conversation-event.js.map +1 -1
  193. package/support/components/conversation-timeline.d.ts +10 -1
  194. package/support/components/conversation-timeline.d.ts.map +1 -1
  195. package/support/components/conversation-timeline.js +63 -57
  196. package/support/components/conversation-timeline.js.map +1 -1
  197. package/support/components/cossistant-branding.d.ts +5 -2
  198. package/support/components/cossistant-branding.d.ts.map +1 -1
  199. package/support/components/cossistant-branding.js +3 -0
  200. package/support/components/cossistant-branding.js.map +1 -1
  201. package/support/components/header.d.ts.map +1 -1
  202. package/support/components/header.js +2 -2
  203. package/support/components/header.js.map +1 -1
  204. package/support/components/icons.d.ts.map +1 -1
  205. package/support/components/multimodal-input.d.ts.map +1 -1
  206. package/support/components/multimodal-input.js +5 -24
  207. package/support/components/multimodal-input.js.map +1 -1
  208. package/support/components/navigation-tab.d.ts +7 -2
  209. package/support/components/navigation-tab.d.ts.map +1 -1
  210. package/support/components/navigation-tab.js +4 -0
  211. package/support/components/navigation-tab.js.map +1 -1
  212. package/support/components/support-content.d.ts +1 -1
  213. package/support/components/support-content.d.ts.map +1 -1
  214. package/support/components/support-content.js +7 -10
  215. package/support/components/support-content.js.map +1 -1
  216. package/support/components/text-effect.d.ts +5 -2
  217. package/support/components/text-effect.d.ts.map +1 -1
  218. package/support/components/text-effect.js +4 -0
  219. package/support/components/text-effect.js.map +1 -1
  220. package/support/components/timeline-identification-tool.d.ts +7 -0
  221. package/support/components/timeline-identification-tool.d.ts.map +1 -0
  222. package/support/components/timeline-identification-tool.js +139 -0
  223. package/support/components/timeline-identification-tool.js.map +1 -0
  224. package/support/components/timeline-message-group.d.ts +2 -1
  225. package/support/components/timeline-message-group.d.ts.map +1 -1
  226. package/support/components/timeline-message-group.js +4 -19
  227. package/support/components/timeline-message-group.js.map +1 -1
  228. package/support/components/timeline-message-item.d.ts +6 -2
  229. package/support/components/timeline-message-item.d.ts.map +1 -1
  230. package/support/components/timeline-message-item.js +8 -4
  231. package/support/components/timeline-message-item.js.map +1 -1
  232. package/support/components/typing-indicator.d.ts +5 -2
  233. package/support/components/typing-indicator.d.ts.map +1 -1
  234. package/support/components/typing-indicator.js +4 -4
  235. package/support/components/typing-indicator.js.map +1 -1
  236. package/support/components/watermark.d.ts.map +1 -1
  237. package/support/context/websocket.d.ts +8 -0
  238. package/support/context/websocket.d.ts.map +1 -1
  239. package/support/context/websocket.js +12 -6
  240. package/support/context/websocket.js.map +1 -1
  241. package/support/index.d.ts +8 -8
  242. package/support/index.d.ts.map +1 -1
  243. package/support/index.js +18 -18
  244. package/support/index.js.map +1 -1
  245. package/support/pages/conversation-history.js +46 -54
  246. package/support/pages/conversation-history.js.map +1 -1
  247. package/support/pages/conversation.d.ts +3 -6
  248. package/support/pages/conversation.d.ts.map +1 -1
  249. package/support/pages/conversation.js +19 -9
  250. package/support/pages/conversation.js.map +1 -1
  251. package/support/pages/home.d.ts +2 -2
  252. package/support/pages/home.d.ts.map +1 -1
  253. package/support/pages/home.js +64 -77
  254. package/support/pages/home.js.map +1 -1
  255. package/support/store/support-store.d.ts +18 -2
  256. package/support/store/support-store.d.ts.map +1 -1
  257. package/support/store/support-store.js +20 -5
  258. package/support/store/support-store.js.map +1 -1
  259. package/support/{support-CMoDLQoC.css → support-Ck4jy29i.css} +1 -2
  260. package/support/support-Ck4jy29i.css.map +1 -0
  261. package/support/text/index.d.ts +15 -2
  262. package/support/text/index.d.ts.map +1 -1
  263. package/support/text/index.js +15 -2
  264. package/support/text/index.js.map +1 -1
  265. package/support/text/locales/en.js +22 -4
  266. package/support/text/locales/en.js.map +1 -1
  267. package/support/text/locales/es.js +18 -0
  268. package/support/text/locales/es.js.map +1 -1
  269. package/support/text/locales/fr.js +18 -0
  270. package/support/text/locales/fr.js.map +1 -1
  271. package/support/text/locales/keys.d.ts +69 -9
  272. package/support/text/locales/keys.d.ts.map +1 -1
  273. package/support/text/locales/keys.js +18 -0
  274. package/support/text/locales/keys.js.map +1 -1
  275. package/support/text/runtime.d.ts +21 -0
  276. package/support/text/runtime.d.ts.map +1 -1
  277. package/support/text/runtime.js +21 -0
  278. package/support/text/runtime.js.map +1 -1
  279. package/support/utils/index.d.ts +4 -0
  280. package/support/utils/index.d.ts.map +1 -1
  281. package/support/utils/index.js +4 -1
  282. package/support/utils/index.js.map +1 -1
  283. package/support/utils/time.d.ts +3 -0
  284. package/support/utils/time.d.ts.map +1 -1
  285. package/support/utils/time.js +3 -0
  286. package/support/utils/time.js.map +1 -1
  287. package/support-config.d.ts +2 -1
  288. package/support-config.d.ts.map +1 -1
  289. package/support-config.js.map +1 -1
  290. package/support.css +2 -2
  291. package/timeline-item.d.ts +10 -0
  292. package/timeline-item.d.ts.map +1 -1
  293. package/utils/conversation.d.ts +7 -0
  294. package/utils/conversation.d.ts.map +1 -0
  295. package/utils/conversation.js +18 -0
  296. package/utils/conversation.js.map +1 -0
  297. package/utils/id.d.ts +3 -0
  298. package/utils/id.d.ts.map +1 -1
  299. package/utils/id.js +3 -0
  300. package/utils/id.js.map +1 -1
  301. package/utils/index.d.ts +2 -1
  302. package/utils/index.js +2 -1
  303. package/utils/metadata-hash.d.ts +12 -0
  304. package/utils/metadata-hash.d.ts.map +1 -0
  305. package/utils/metadata-hash.js +26 -0
  306. package/utils/metadata-hash.js.map +1 -0
  307. package/utils/text.d.ts +3 -0
  308. package/utils/text.d.ts.map +1 -1
  309. package/utils/text.js +3 -0
  310. package/utils/text.js.map +1 -1
  311. package/utils/use-render-element.d.ts +3 -0
  312. package/utils/use-render-element.d.ts.map +1 -1
  313. package/utils/use-render-element.js +3 -0
  314. package/utils/use-render-element.js.map +1 -1
  315. package/support/context/config.d.ts +0 -32
  316. package/support/context/config.d.ts.map +0 -1
  317. package/support/context/config.js +0 -27
  318. package/support/context/config.js.map +0 -1
  319. package/support/support-CMoDLQoC.css.map +0 -1
@@ -7,7 +7,6 @@ import { Text, useSupportText } from "../text/index.js";
7
7
  import { PENDING_CONVERSATION_ID } from "../../utils/id.js";
8
8
  import { Watermark } from "../components/watermark.js";
9
9
  import { ConversationButtonLink } from "../components/conversation-button-link.js";
10
- import { TextEffect } from "../components/text-effect.js";
11
10
  import { useHomePage } from "../../hooks/use-home-page.js";
12
11
  import { useSupport } from "../../provider.js";
13
12
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -53,84 +52,72 @@ const HomePage = () => {
53
52
  return /* @__PURE__ */ jsxs(Fragment, { children: [
54
53
  /* @__PURE__ */ jsx(Header, {}),
55
54
  /* @__PURE__ */ jsx("div", {
56
- className: "sticky top-4 flex flex-1 items-center justify-center",
55
+ className: "sticky top-0 flex flex-1 px-6",
57
56
  children: /* @__PURE__ */ jsxs("div", {
58
- className: "flex flex-col items-center gap-2",
59
- children: [
60
- /* @__PURE__ */ jsxs(motion.div, {
61
- animate: "visible",
62
- className: "flex flex-col items-center justify-center gap-2",
63
- exit: "exit",
64
- initial: "hidden",
65
- transition: { delay: .1 },
66
- variants: {
67
- hidden: {
68
- opacity: 0,
69
- y: 20,
70
- filter: "blur(12px)"
71
- },
72
- visible: {
73
- opacity: 1,
74
- y: 0,
75
- filter: "blur(0px)"
76
- },
77
- exit: {
78
- opacity: 0,
79
- y: 20,
80
- filter: "blur(12px)"
81
- }
57
+ className: "flex flex-col gap-2",
58
+ children: [/* @__PURE__ */ jsxs(motion.div, {
59
+ animate: "visible",
60
+ className: "flex flex-col gap-2",
61
+ exit: "exit",
62
+ initial: "hidden",
63
+ transition: { delay: .1 },
64
+ variants: {
65
+ hidden: {
66
+ opacity: 0,
67
+ y: 20,
68
+ filter: "blur(12px)"
82
69
  },
83
- children: [/* @__PURE__ */ jsx(AvatarStack, {
84
- aiAgents: website?.availableAIAgents || [],
85
- humanAgents: availableHumanAgents,
86
- size: 44,
87
- spacing: 32
88
- }), /* @__PURE__ */ jsx(Text, {
89
- as: "p",
90
- className: "mb-4 text-co-primary/80 text-sm",
91
- textKey: "page.home.tagline",
92
- variables: { websiteName: website?.name ?? null }
93
- })]
94
- }),
95
- /* @__PURE__ */ jsx(TextEffect, {
96
- as: "h2",
97
- className: "max-w-xs text-balance text-center font-co-sans text-2xl leading-normal",
98
- delay: .5,
99
- preset: "fade-in-blur",
100
- children: text("page.home.greeting", { visitorName: visitor?.contact?.name ?? void 0 })
101
- }),
102
- quickOptions.length > 0 && /* @__PURE__ */ jsx(motion.div, {
103
- animate: "visible",
104
- className: "mt-6 inline-flex gap-2",
105
- exit: "exit",
106
- initial: "hidden",
107
- transition: { delay: 1.3 },
108
- variants: {
109
- hidden: {
110
- opacity: 0,
111
- y: 20,
112
- filter: "blur(12px)"
113
- },
114
- visible: {
115
- opacity: 1,
116
- y: 0,
117
- filter: "blur(0px)"
118
- },
119
- exit: {
120
- opacity: 0,
121
- y: 20,
122
- filter: "blur(12px)"
123
- }
70
+ visible: {
71
+ opacity: 1,
72
+ y: 0,
73
+ filter: "blur(0px)"
124
74
  },
125
- children: quickOptions?.map((option) => /* @__PURE__ */ jsx(Button, {
126
- className: "rounded-full border-dashed",
127
- onClick: () => home.startConversation(option),
128
- size: "default",
129
- variant: "outline",
130
- children: option
131
- }, option))
132
- })
133
- ]
75
+ exit: {
76
+ opacity: 0,
77
+ y: 20,
78
+ filter: "blur(12px)"
79
+ }
80
+ },
81
+ children: [/* @__PURE__ */ jsx(AvatarStack, {
82
+ aiAgents: website?.availableAIAgents || [],
83
+ humanAgents: availableHumanAgents,
84
+ size: 44,
85
+ spacing: 32
86
+ }), /* @__PURE__ */ jsx("h2", {
87
+ className: "max-w-xs text-balance font-co-sans font-medium text-2xl leading-normal",
88
+ children: text("page.home.greeting", { visitorName: visitor?.contact?.name?.split(" ")[0] ?? void 0 })
89
+ })]
90
+ }), quickOptions.length > 0 && /* @__PURE__ */ jsx(motion.div, {
91
+ animate: "visible",
92
+ className: "mt-6 space-x-2 space-y-2",
93
+ exit: "exit",
94
+ initial: "hidden",
95
+ transition: { delay: .1 },
96
+ variants: {
97
+ hidden: {
98
+ opacity: 0,
99
+ y: 20,
100
+ filter: "blur(12px)"
101
+ },
102
+ visible: {
103
+ opacity: 1,
104
+ y: 0,
105
+ filter: "blur(0px)"
106
+ },
107
+ exit: {
108
+ opacity: 0,
109
+ y: 20,
110
+ filter: "blur(12px)"
111
+ }
112
+ },
113
+ children: quickOptions?.map((option) => /* @__PURE__ */ jsx(Button, {
114
+ className: "inline-flex w-fit rounded-lg border-dashed px-2",
115
+ onClick: () => home.startConversation(option),
116
+ size: "default",
117
+ variant: "outline",
118
+ children: option
119
+ }, option))
120
+ })]
134
121
  })
135
122
  }),
136
123
  /* @__PURE__ */ jsxs("div", {
@@ -171,7 +158,7 @@ const HomePage = () => {
171
158
  as: "span",
172
159
  textKey: "common.actions.askQuestion"
173
160
  })]
174
- }), /* @__PURE__ */ jsx(Watermark, { className: "mt-4 mb-2" })]
161
+ }), /* @__PURE__ */ jsx(Watermark, { className: "mt-4 mb-0" })]
175
162
  }),
176
163
  /* @__PURE__ */ jsx("div", {})
177
164
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"home.js","names":["Icon"],"sources":["../../../src/support/pages/home.tsx"],"sourcesContent":["import { motion } from \"motion/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 = () => {\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-4 flex flex-1 items-center justify-center\">\n\t\t\t\t<div className=\"flex flex-col items-center 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 items-center justify-center 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<Text\n\t\t\t\t\t\t\tas=\"p\"\n\t\t\t\t\t\t\tclassName=\"mb-4 text-co-primary/80 text-sm\"\n\t\t\t\t\t\t\ttextKey=\"page.home.tagline\"\n\t\t\t\t\t\t\tvariables={{ websiteName: website?.name ?? null }}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</motion.div>\n\n\t\t\t\t\t<TextEffect\n\t\t\t\t\t\tas=\"h2\"\n\t\t\t\t\t\tclassName=\"max-w-xs text-balance text-center font-co-sans text-2xl leading-normal\"\n\t\t\t\t\t\tdelay={0.5}\n\t\t\t\t\t\tpreset=\"fade-in-blur\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{text(\"page.home.greeting\", {\n\t\t\t\t\t\t\tvisitorName: visitor?.contact?.name ?? undefined,\n\t\t\t\t\t\t})}\n\t\t\t\t\t</TextEffect>\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 inline-flex gap-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: 1.3,\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=\"rounded-full border-dashed\"\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-2\" />\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAa,iBAAiB;CAC7B,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;;KACd,qBAAC,OAAO;MACP,SAAQ;MACR,WAAU;MACV,MAAK;MACL,SAAQ;MACR,YAAY,EACX,OAAO,IACP;MACD,UAAU;OACT,QAAQ;QAAE,SAAS;QAAG,GAAG;QAAI,QAAQ;QAAc;OACnD,SAAS;QAAE,SAAS;QAAG,GAAG;QAAG,QAAQ;QAAa;OAClD,MAAM;QAAE,SAAS;QAAG,GAAG;QAAI,QAAQ;QAAc;OACjD;iBAED,oBAAC;OACA,UAAU,SAAS,qBAAqB,EAAE;OAC1C,aAAa;OACb,MAAM;OACN,SAAS;QACR,EACF,oBAAC;OACA,IAAG;OACH,WAAU;OACV,SAAQ;OACR,WAAW,EAAE,aAAa,SAAS,QAAQ,MAAM;QAChD;OACU;KAEb,oBAAC;M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.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,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U;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;OAC/C,EACT,oBAAC,aAAU,WAAU,cAAc;MAC9B;IACN,oBAAC,UAAM;;IACF;KACJ"}
@@ -3,12 +3,20 @@ import { SupportConfig, SupportStore, SupportStoreState } from "@cossistant/core
3
3
 
4
4
  //#region src/support/store/support-store.d.ts
5
5
  type UseSupportStoreResult = SupportStoreState & Pick<SupportStore, "navigate" | "replace" | "goBack" | "open" | "close" | "toggle" | "updateConfig" | "reset">;
6
+ /**
7
+ * React hook wrapper around the shared support widget store. Exposes both the
8
+ * raw state and imperative actions so UI components can drive navigation or
9
+ * change configuration without importing the store singleton directly.
10
+ */
6
11
  declare function useSupportStore(): UseSupportStoreResult;
12
+ /**
13
+ * Shortcut hook that returns the persisted widget configuration along with
14
+ * open/close/toggle helpers for common UI bindings.
15
+ */
7
16
  declare const useSupportConfig: () => {
8
17
  open: () => void;
9
18
  close: () => void;
10
19
  toggle: () => void;
11
- mode: "floating" | "responsive";
12
20
  size: "normal" | "larger";
13
21
  isOpen: boolean;
14
22
  content: {
@@ -19,6 +27,10 @@ declare const useSupportConfig: () => {
19
27
  };
20
28
  };
21
29
  };
30
+ /**
31
+ * Provides the current navigation entry, the stack history and helpers to
32
+ * transition between screens inside the support widget.
33
+ */
22
34
  declare const useSupportNavigation: () => {
23
35
  current: _cossistant_core0.NavigationState;
24
36
  page: "HOME" | "ARTICLES" | "CONVERSATION" | "CONVERSATION_HISTORY";
@@ -32,8 +44,12 @@ declare const useSupportNavigation: () => {
32
44
  goBack: () => void;
33
45
  canGoBack: boolean;
34
46
  };
47
+ /**
48
+ * Applies initial configuration derived from provider props or server state to
49
+ * the singleton support store. Call this once during bootstrapping so that the
50
+ * UI renders with the expected open state.
51
+ */
35
52
  declare const initializeSupportStore: (props: {
36
- mode?: SupportConfig["mode"];
37
53
  size?: SupportConfig["size"];
38
54
  defaultOpen?: boolean;
39
55
  }) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"support-store.d.ts","names":[],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":[],"mappings":";;;;KA8CY,qBAAA,GAAwB,oBACnC,KACC;iBAWc,eAAA,CAAA,GAAmB;cAmBtB;EAhCD,IAAA,EAAA,GAAA,GAAA,IAAA;EAAqB,KAAA,EAAA,GAAA,GAAA,IAAA;QAAG,EAAA,GAAA,GAAA,IAAA;MAElC,EAAA,UAAA,GAAA,YAAA;MADD,EAAA,QAAA,GAAA,QAAA;EAAI,MAAA,EAAA,OAAA;EAYW,OAAA,EAAA;IAmBH,IAAA,CAAA,EAAA;MAcA,MAAA,CAAA,EAAA,MAiBZ;MAAA,SAAA,CAAA,EAAA,MAAA;MAAA,QAAA,CAAA,EAAA,MAAA;;;;cAjBY;EAmBA,OAAA,EAFZ,iBAAA,CAAA,eAwBA;EAAA,IAAA,EAAA,MAAA,GAAA,UAAA,GAAA,cAAA,GAAA,sBAAA;QArBO,EAAA;IACA,cAAA,EAAA,MAAA;IAAa,cAAA,CAAA,EAAA,MAAA;;;;;;;;cAFR;SACL;SACA"}
1
+ {"version":3,"file":"support-store.d.ts","names":[],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":[],"mappings":";;;;KA8CY,qBAAA,GAAwB,oBACnC,KACC;;;AAFF;;;AACC,iBAiBe,eAAA,CAAA,CAjBf,EAiBkC,qBAjBlC;;AAiBD;AAuBA;AAkBA;AAiBC,cAnCY,gBAmCZ,EAAA,GAAA,GAAA;;;;;EAOY,MAAA,EAAA,OAAA;;;;;;;;;;;;;cAxBA;WAiBZ,iBAAA,CAAA;;;;;;;;;;;;;;;;;cAOY;SACL"}
@@ -5,18 +5,21 @@ import { useMemo, useRef, useSyncExternalStore } from "react";
5
5
  import { createSupportStore } from "@cossistant/core";
6
6
 
7
7
  //#region src/support/store/support-store.ts
8
- const storage = typeof window !== "undefined" ? window.localStorage : void 0;
9
- const store = createSupportStore({ storage });
8
+ const store = createSupportStore({ storage: typeof window !== "undefined" ? window.localStorage : void 0 });
10
9
  function useSelector(selector, isEqual = Object.is) {
11
10
  const selectionRef = useRef(void 0);
12
11
  const subscribe = (onStoreChange) => store.subscribe(() => {
13
12
  onStoreChange();
14
13
  });
15
- const snapshot = useSyncExternalStore(subscribe, store.getState, store.getState);
16
- const selected = selector(snapshot);
14
+ const selected = selector(useSyncExternalStore(subscribe, store.getState, store.getState));
17
15
  if (selectionRef.current === void 0 || !isEqual(selectionRef.current, selected)) selectionRef.current = selected;
18
16
  return selectionRef.current;
19
17
  }
18
+ /**
19
+ * React hook wrapper around the shared support widget store. Exposes both the
20
+ * raw state and imperative actions so UI components can drive navigation or
21
+ * change configuration without importing the store singleton directly.
22
+ */
20
23
  function useSupportStore() {
21
24
  const state = useSelector((current) => current);
22
25
  return useMemo(() => ({
@@ -31,6 +34,10 @@ function useSupportStore() {
31
34
  reset: store.reset
32
35
  }), [state]);
33
36
  }
37
+ /**
38
+ * Shortcut hook that returns the persisted widget configuration along with
39
+ * open/close/toggle helpers for common UI bindings.
40
+ */
34
41
  const useSupportConfig = () => {
35
42
  const config = useSelector((state) => state.config);
36
43
  return useMemo(() => ({
@@ -40,6 +47,10 @@ const useSupportConfig = () => {
40
47
  toggle: store.toggle
41
48
  }), [config]);
42
49
  };
50
+ /**
51
+ * Provides the current navigation entry, the stack history and helpers to
52
+ * transition between screens inside the support widget.
53
+ */
43
54
  const useSupportNavigation = () => {
44
55
  const { current, previousPages } = useSelector((state) => state.navigation);
45
56
  return useMemo(() => ({
@@ -53,9 +64,13 @@ const useSupportNavigation = () => {
53
64
  canGoBack: previousPages.length > 0
54
65
  }), [current, previousPages]);
55
66
  };
67
+ /**
68
+ * Applies initial configuration derived from provider props or server state to
69
+ * the singleton support store. Call this once during bootstrapping so that the
70
+ * UI renders with the expected open state.
71
+ */
56
72
  const initializeSupportStore = (props) => {
57
73
  const patch = {};
58
- if (props.mode !== void 0) patch.mode = props.mode;
59
74
  if (props.size !== void 0) patch.size = props.size;
60
75
  if (props.defaultOpen !== void 0) patch.isOpen = props.defaultOpen;
61
76
  if (Object.keys(patch).length > 0) store.updateConfig(patch);
@@ -1 +1 @@
1
- {"version":3,"file":"support-store.js","names":["patch: Partial<SupportConfig>"],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":["\"use client\";\n\nimport {\n\tcreateSupportStore,\n\ttype SupportConfig,\n\ttype SupportStore,\n\ttype SupportStoreState,\n} from \"@cossistant/core\";\nimport { useMemo, useRef, useSyncExternalStore } from \"react\";\n\nconst storage = typeof window !== \"undefined\" ? window.localStorage : undefined;\nconst store = createSupportStore({ storage });\n\ntype Selector<T> = (state: SupportStoreState) => T;\n\ntype EqualityChecker<T> = (previous: T, next: T) => boolean;\n\nfunction useSelector<TSelected>(\n\tselector: Selector<TSelected>,\n\tisEqual: EqualityChecker<TSelected> = Object.is\n): TSelected {\n\tconst selectionRef = useRef<TSelected>(undefined);\n\n\tconst subscribe = (onStoreChange: () => void) =>\n\t\tstore.subscribe(() => {\n\t\t\tonStoreChange();\n\t\t});\n\n\tconst snapshot = useSyncExternalStore(\n\t\tsubscribe,\n\t\tstore.getState,\n\t\tstore.getState\n\t);\n\n\tconst selected = selector(snapshot);\n\n\tif (\n\t\tselectionRef.current === undefined ||\n\t\t!isEqual(selectionRef.current, selected)\n\t) {\n\t\tselectionRef.current = selected;\n\t}\n\n\treturn selectionRef.current as TSelected;\n}\n\nexport type UseSupportStoreResult = SupportStoreState &\n\tPick<\n\t\tSupportStore,\n\t\t| \"navigate\"\n\t\t| \"replace\"\n\t\t| \"goBack\"\n\t\t| \"open\"\n\t\t| \"close\"\n\t\t| \"toggle\"\n\t\t| \"updateConfig\"\n\t\t| \"reset\"\n\t>;\n\nexport function useSupportStore(): UseSupportStoreResult {\n\tconst state = useSelector((current) => current);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...state,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t\tupdateConfig: store.updateConfig,\n\t\t\treset: store.reset,\n\t\t}),\n\t\t[state]\n\t);\n}\n\nexport const useSupportConfig = () => {\n\tconst config = useSelector((state) => state.config);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...config,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t}),\n\t\t[config]\n\t);\n};\n\nexport const useSupportNavigation = () => {\n\tconst navigation = useSelector((state) => state.navigation);\n\tconst { current, previousPages } = navigation;\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\tcurrent,\n\t\t\tpage: current.page,\n\t\t\tparams: current.params,\n\t\t\tpreviousPages,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\tcanGoBack: previousPages.length > 0,\n\t\t}),\n\t\t[current, previousPages]\n\t);\n};\n\nexport const initializeSupportStore = (props: {\n\tmode?: SupportConfig[\"mode\"];\n\tsize?: SupportConfig[\"size\"];\n\tdefaultOpen?: boolean;\n}) => {\n\tconst patch: Partial<SupportConfig> = {};\n\n\tif (props.mode !== undefined) {\n\t\tpatch.mode = props.mode;\n\t}\n\n\tif (props.size !== undefined) {\n\t\tpatch.size = props.size;\n\t}\n\n\tif (props.defaultOpen !== undefined) {\n\t\tpatch.isOpen = props.defaultOpen;\n\t}\n\n\tif (Object.keys(patch).length > 0) {\n\t\tstore.updateConfig(patch);\n\t}\n};\n"],"mappings":";;;;;;;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AAO,MAAM;AAGpB,KAAI,MAAM,gBAAgB,OACzB,OAAM,SAAS,MAAM;AAGtB,KAAI,OAAO,KAAK,MAAM,CAAC,SAAS,EAC/B,OAAM,aAAa,MAAM"}
1
+ {"version":3,"file":"support-store.js","names":["patch: Partial<SupportConfig>"],"sources":["../../../src/support/store/support-store.ts"],"sourcesContent":["\"use client\";\n\nimport {\n\tcreateSupportStore,\n\ttype SupportConfig,\n\ttype SupportStore,\n\ttype SupportStoreState,\n} from \"@cossistant/core\";\nimport { useMemo, useRef, useSyncExternalStore } from \"react\";\n\nconst storage = typeof window !== \"undefined\" ? window.localStorage : undefined;\nconst store = createSupportStore({ storage });\n\ntype Selector<T> = (state: SupportStoreState) => T;\n\ntype EqualityChecker<T> = (previous: T, next: T) => boolean;\n\nfunction useSelector<TSelected>(\n\tselector: Selector<TSelected>,\n\tisEqual: EqualityChecker<TSelected> = Object.is\n): TSelected {\n\tconst selectionRef = useRef<TSelected>(undefined);\n\n\tconst subscribe = (onStoreChange: () => void) =>\n\t\tstore.subscribe(() => {\n\t\t\tonStoreChange();\n\t\t});\n\n\tconst snapshot = useSyncExternalStore(\n\t\tsubscribe,\n\t\tstore.getState,\n\t\tstore.getState\n\t);\n\n\tconst selected = selector(snapshot);\n\n\tif (\n\t\tselectionRef.current === undefined ||\n\t\t!isEqual(selectionRef.current, selected)\n\t) {\n\t\tselectionRef.current = selected;\n\t}\n\n\treturn selectionRef.current as TSelected;\n}\n\nexport type UseSupportStoreResult = SupportStoreState &\n\tPick<\n\t\tSupportStore,\n\t\t| \"navigate\"\n\t\t| \"replace\"\n\t\t| \"goBack\"\n\t\t| \"open\"\n\t\t| \"close\"\n\t\t| \"toggle\"\n\t\t| \"updateConfig\"\n\t\t| \"reset\"\n\t>;\n\n/**\n * React hook wrapper around the shared support widget store. Exposes both the\n * raw state and imperative actions so UI components can drive navigation or\n * change configuration without importing the store singleton directly.\n */\nexport function useSupportStore(): UseSupportStoreResult {\n\tconst state = useSelector((current) => current);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...state,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t\tupdateConfig: store.updateConfig,\n\t\t\treset: store.reset,\n\t\t}),\n\t\t[state]\n\t);\n}\n\n/**\n * Shortcut hook that returns the persisted widget configuration along with\n * open/close/toggle helpers for common UI bindings.\n */\nexport const useSupportConfig = () => {\n\tconst config = useSelector((state) => state.config);\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\t...config,\n\t\t\topen: store.open,\n\t\t\tclose: store.close,\n\t\t\ttoggle: store.toggle,\n\t\t}),\n\t\t[config]\n\t);\n};\n\n/**\n * Provides the current navigation entry, the stack history and helpers to\n * transition between screens inside the support widget.\n */\nexport const useSupportNavigation = () => {\n\tconst navigation = useSelector((state) => state.navigation);\n\tconst { current, previousPages } = navigation;\n\n\treturn useMemo(\n\t\t() => ({\n\t\t\tcurrent,\n\t\t\tpage: current.page,\n\t\t\tparams: current.params,\n\t\t\tpreviousPages,\n\t\t\tnavigate: store.navigate,\n\t\t\treplace: store.replace,\n\t\t\tgoBack: store.goBack,\n\t\t\tcanGoBack: previousPages.length > 0,\n\t\t}),\n\t\t[current, previousPages]\n\t);\n};\n\n/**\n * Applies initial configuration derived from provider props or server state to\n * the singleton support store. Call this once during bootstrapping so that the\n * UI renders with the expected open state.\n */\nexport const initializeSupportStore = (props: {\n\tsize?: SupportConfig[\"size\"];\n\tdefaultOpen?: boolean;\n}) => {\n\tconst patch: Partial<SupportConfig> = {};\n\n\tif (props.size !== undefined) {\n\t\tpatch.size = props.size;\n\t}\n\n\tif (props.defaultOpen !== undefined) {\n\t\tpatch.isOpen = props.defaultOpen;\n\t}\n\n\tif (Object.keys(patch).length > 0) {\n\t\tstore.updateConfig(patch);\n\t}\n};\n"],"mappings":";;;;;;;AAWA,MAAM,QAAQ,mBAAmB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KAAK,MAAM,CAAC,SAAS,EAC/B,OAAM,aAAa,MAAM"}
@@ -1,4 +1,3 @@
1
-
2
1
  @custom-variant dark (&:is(.dark *));
3
2
 
4
3
  @layer base {
@@ -405,4 +404,4 @@
405
404
  }
406
405
 
407
406
 
408
- /*# sourceMappingURL=support-CMoDLQoC.css.map*/
407
+ /*# sourceMappingURL=support-Ck4jy29i.css.map*/
@@ -0,0 +1 @@
1
+ {"version":3,"file":"support-Ck4jy29i.css","names":[],"sources":["../../src/support/support.css"],"sourcesContent":["@custom-variant dark (&:is(.dark *));\n\n@layer base {\n\t.cossistant {\n\t\t@apply border-co-border;\n\t\t@apply scroll-smooth;\n\n\t\tcolor-scheme: inherit;\n\n\t\t/* Typeface tokens */\n\t\t--co-font-sans: var(\n\t\t\t--co-theme-font-sans,\n\t\t\tvar(--font-sans, \"Geist\", \"Inter\", sans-serif)\n\t\t);\n\t\t--co-font-mono: var(\n\t\t\t--co-theme-font-mono,\n\t\t\tvar(--font-mono, \"Geist Mono\", \"Inter Mono\", monospace)\n\t\t);\n\n\t\t--co-border-color: var(\n\t\t\t--co-theme-border-color,\n\t\t\tvar(--color-border, oklch(92.2% 0 0))\n\t\t);\n\n\t\t/* Core surfaces */\n\t\t--co-radius: var(--co-theme-radius, var(--radius, 0.625rem));\n\t\t--co-background-base: var(\n\t\t\t--co-theme-background,\n\t\t\tvar(--background, oklch(99% 0 0))\n\t\t);\n\t\t--co-foreground-base: var(\n\t\t\t--co-theme-foreground,\n\t\t\tvar(--foreground, oklch(14.5% 0 0))\n\t\t);\n\t\t--co-popover-base: var(\n\t\t\t--co-theme-popover,\n\t\t\tvar(--popover, var(--co-background-base))\n\t\t);\n\t\t--co-popover-foreground-base: var(\n\t\t\t--co-theme-popover-foreground,\n\t\t\tvar(--popover-foreground, var(--co-foreground-base))\n\t\t);\n\t\t--co-primary-base: var(\n\t\t\t--co-theme-primary,\n\t\t\tvar(--primary, oklch(20.5% 0 0))\n\t\t);\n\t\t--co-primary-foreground-base: var(\n\t\t\t--co-theme-primary-foreground,\n\t\t\tvar(--primary-foreground, oklch(98.5% 0 0))\n\t\t);\n\t\t--co-secondary-base: var(\n\t\t\t--co-theme-secondary,\n\t\t\tvar(--secondary, oklch(97% 0 0))\n\t\t);\n\t\t--co-secondary-foreground-base: var(\n\t\t\t--co-theme-secondary-foreground,\n\t\t\tvar(--secondary-foreground, oklch(20.5% 0 0))\n\t\t);\n\t\t--co-border-base: var(--co-theme-border, var(--border, oklch(92.2% 0 0)));\n\t\t--co-input-base: var(--co-theme-input, var(--input, oklch(92.2% 0 0)));\n\t\t--co-ring-base: var(--co-theme-ring, var(--ring, var(--co-primary-base)));\n\t\t--co-accent-base: var(\n\t\t\t--co-theme-accent,\n\t\t\tvar(--accent, var(--co-primary-base))\n\t\t);\n\t\t--co-accent-foreground-base: var(\n\t\t\t--co-theme-accent-foreground,\n\t\t\tvar(--accent-foreground, var(--co-primary-foreground-base))\n\t\t);\n\n\t\t/* Neutral shades derived from the background */\n\t\t--co-background-50-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 98%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-100-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 97%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-200-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 96%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-300-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 95%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-400-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 94%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-500-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 93%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-600-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 92%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\n\t\t/* Muted tones */\n\t\t--co-muted-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 85%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-muted-foreground-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-foreground-base) 70%,\n\t\t\twhite\n\t\t);\n\n\t\t/* Public tokens consumed by Tailwind theme */\n\t\t--co-background: var(--co-background-base);\n\t\t--co-background-50: var(\n\t\t\t--co-theme-background-50,\n\t\t\tvar(--co-background-50-mix, oklch(92% 0 0))\n\t\t);\n\t\t--co-background-100: var(\n\t\t\t--co-theme-background-100,\n\t\t\tvar(--co-background-100-mix, oklch(93% 0 0))\n\t\t);\n\t\t--co-background-200: var(\n\t\t\t--co-theme-background-200,\n\t\t\tvar(--co-background-200-mix, oklch(94% 0 0))\n\t\t);\n\t\t--co-background-300: var(\n\t\t\t--co-theme-background-300,\n\t\t\tvar(--co-background-300-mix, oklch(95% 0 0))\n\t\t);\n\t\t--co-background-400: var(\n\t\t\t--co-theme-background-400,\n\t\t\tvar(--co-background-400-mix, oklch(96% 0 0))\n\t\t);\n\t\t--co-background-500: var(\n\t\t\t--co-theme-background-500,\n\t\t\tvar(--co-background-500-mix, oklch(97% 0 0))\n\t\t);\n\t\t--co-background-600: var(\n\t\t\t--co-theme-background-600,\n\t\t\tvar(--co-background-600-mix, oklch(98% 0 0))\n\t\t);\n\n\t\t--co-foreground: var(--co-foreground-base);\n\t\t--co-popover: var(--co-popover-base);\n\t\t--co-popover-foreground: var(--co-popover-foreground-base);\n\t\t--co-primary: var(--co-primary-base);\n\t\t--co-primary-foreground: var(--co-primary-foreground-base);\n\t\t--co-secondary: var(--co-secondary-base);\n\t\t--co-secondary-foreground: var(--co-secondary-foreground-base);\n\t\t--co-muted: var(\n\t\t\t--co-theme-muted,\n\t\t\tvar(--muted, var(--co-muted-mix, oklch(97% 0 0)))\n\t\t);\n\t\t--co-muted-foreground: var(\n\t\t\t--co-theme-muted-foreground,\n\t\t\tvar(--muted-foreground, var(--co-muted-foreground-mix, oklch(55.6% 0 0)))\n\t\t);\n\t\t--co-border: var(--co-border-base);\n\t\t--co-input: var(--co-input-base);\n\t\t--co-ring: var(--co-ring-base);\n\t\t--co-accent: var(--co-accent-base);\n\t\t--co-accent-foreground: var(--co-accent-foreground-base);\n\n\t\t/* Accent palette */\n\t\t--co-pink: var(--co-theme-pink, oklch(76.3% 0.152 354));\n\t\t--co-yellow: var(--co-theme-yellow, oklch(86.4% 0.144 99));\n\t\t--co-blue: var(--co-theme-blue, oklch(72.5% 0.132 241));\n\t\t--co-orange: var(--co-theme-orange, oklch(74.5% 0.166 50));\n\n\t\t/* Status colors */\n\t\t--co-destructive: var(--co-theme-destructive, oklch(57.7% 0.245 27.325));\n\t\t--co-destructive-foreground: var(\n\t\t\t--co-theme-destructive-foreground,\n\t\t\toklch(57.7% 0.245 27.325)\n\t\t);\n\t\t--co-success: var(--co-theme-success, oklch(71.7% 0.18 142));\n\t\t--co-success-foreground: var(\n\t\t\t--co-theme-success-foreground,\n\t\t\toklch(26.5% 0.052 142.7)\n\t\t);\n\t\t--co-neutral: var(--co-theme-neutral, oklch(60.8% 0 0));\n\t\t--co-neutral-foreground: var(\n\t\t\t--co-theme-neutral-foreground,\n\t\t\toklch(25.6% 0 0)\n\t\t);\n\t\t--co-warning: var(--co-theme-warning, oklch(86.4% 0.144 99));\n\t\t--co-warning-foreground: var(\n\t\t\t--co-theme-warning-foreground,\n\t\t\toklch(41.4% 0.071 99)\n\t\t);\n\t}\n\n\t.dark .cossistant,\n\t.cossistant[data-color-scheme=\"dark\"] {\n\t\t/* Provide dark defaults without overriding host tokens */\n\t\t--co-background-base: var(\n\t\t\t--co-theme-background,\n\t\t\tvar(--background, oklch(15.5% 0 0))\n\t\t);\n\t\t--co-foreground-base: var(\n\t\t\t--co-theme-foreground,\n\t\t\tvar(--foreground, oklch(98.5% 0 0))\n\t\t);\n\t\t--co-border-color: var(\n\t\t\t--co-theme-border-color,\n\t\t\tvar(--color-border, oklch(26.9% 0 0))\n\t\t);\n\t\t--co-popover-base: var(\n\t\t\t--co-theme-popover,\n\t\t\tvar(--popover, oklch(14.5% 0 0))\n\t\t);\n\t\t--co-popover-foreground-base: var(\n\t\t\t--co-theme-popover-foreground,\n\t\t\tvar(--popover-foreground, oklch(98.5% 0 0))\n\t\t);\n\t\t--co-primary-base: var(\n\t\t\t--co-theme-primary,\n\t\t\tvar(--primary, oklch(98.5% 0 0))\n\t\t);\n\t\t--co-primary-foreground-base: var(\n\t\t\t--co-theme-primary-foreground,\n\t\t\tvar(--primary-foreground, oklch(20.5% 0 0))\n\t\t);\n\t\t--co-secondary-base: var(\n\t\t\t--co-theme-secondary,\n\t\t\tvar(--secondary, oklch(26.9% 0 0))\n\t\t);\n\t\t--co-secondary-foreground-base: var(\n\t\t\t--co-theme-secondary-foreground,\n\t\t\tvar(--secondary-foreground, oklch(98.5% 0 0))\n\t\t);\n\t\t--co-border-base: var(--co-theme-border, var(--border, oklch(26.9% 0 0)));\n\t\t--co-input-base: var(--co-theme-input, var(--input, oklch(26.9% 0 0)));\n\t\t--co-ring-base: var(--co-theme-ring, var(--ring, var(--co-primary-base)));\n\t\t--co-accent-base: var(\n\t\t\t--co-theme-accent,\n\t\t\tvar(--accent, var(--co-primary-base))\n\t\t);\n\t\t--co-accent-foreground-base: var(\n\t\t\t--co-theme-accent-foreground,\n\t\t\tvar(--accent-foreground, var(--co-primary-foreground-base))\n\t\t);\n\n\t\t--co-muted-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 55%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-muted-foreground-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-foreground-base) 65%,\n\t\t\twhite\n\t\t);\n\n\t\t--co-background-50-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 98%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-100-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 96%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-200-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 94%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-300-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 92%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-400-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 90%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-500-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 88%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\t\t--co-background-600-mix: color-mix(\n\t\t\tin oklch,\n\t\t\tvar(--co-background-base) 86%,\n\t\t\tvar(--co-foreground-base)\n\t\t);\n\n\t\t--co-pink: var(--co-theme-pink, oklch(84.2% 0.109 354));\n\t\t--co-yellow: var(--co-theme-yellow, oklch(90.3% 0.111 99));\n\t\t--co-blue: var(--co-theme-blue, oklch(79.8% 0.089 241));\n\t\t--co-orange: var(--co-theme-orange, oklch(68.2% 0.194 50));\n\n\t\t--co-destructive: var(--co-theme-destructive, oklch(39.6% 0.141 25.723));\n\t\t--co-destructive-foreground: var(\n\t\t\t--co-theme-destructive-foreground,\n\t\t\toklch(63.7% 0.237 25.331)\n\t\t);\n\t\t--co-success: var(--co-theme-success, oklch(60% 0.15 142));\n\t\t--co-success-foreground: var(\n\t\t\t--co-theme-success-foreground,\n\t\t\toklch(85% 0.12 142)\n\t\t);\n\t\t--co-neutral: var(--co-theme-neutral, oklch(50% 0 0));\n\t\t--co-neutral-foreground: var(--co-theme-neutral-foreground, oklch(85% 0 0));\n\t\t--co-warning: var(--co-theme-warning, oklch(90.3% 0.111 99));\n\t\t--co-warning-foreground: var(\n\t\t\t--co-theme-warning-foreground,\n\t\t\toklch(85% 0.1 99)\n\t\t);\n\t}\n}\n\n@theme inline {\n\t--font-co-sans: var(--co-font-sans);\n\t--font-co-mono: var(--co-font-mono);\n\t--color-co-background: var(--co-background);\n\t--color-co-background-50: var(--co-background-50);\n\t--color-co-background-100: var(--co-background-100);\n\t--color-co-background-200: var(--co-background-200);\n\t--color-co-background-300: var(--co-background-300);\n\t--color-co-background-400: var(--co-background-400);\n\t--color-co-background-500: var(--co-background-500);\n\t--color-co-background-600: var(--co-background-600);\n\n\t--color-co-foreground: var(--co-foreground);\n\n\t--color-co-primary: var(--co-primary);\n\t--color-co-primary-foreground: var(--co-primary-foreground);\n\t--color-co-secondary: var(--co-secondary);\n\t--color-co-secondary-foreground: var(--co-secondary-foreground);\n\t--color-co-muted: var(--co-muted);\n\t--color-co-muted-foreground: var(--co-muted-foreground);\n\t--color-co-border: var(--co-border);\n\t--color-co-input: var(--co-input);\n\t--color-co-ring: var(--co-ring);\n\t--radius-co: var(--co-radius);\n\n\t/* custom colors */\n\t--color-co-pink: var(--co-pink);\n\t--color-co-yellow: var(--co-yellow);\n\t--color-co-blue: var(--co-blue);\n\t--color-co-orange: var(--co-orange);\n\n\t/* status colors */\n\t--color-co-destructive: var(--co-destructive);\n\t--color-co-destructive-foreground: var(--co-destructive-foreground);\n\t--color-co-success: var(--co-success);\n\t--color-co-success-foreground: var(--co-success-foreground);\n\t--color-co-neutral: var(--co-neutral);\n\t--color-co-neutral-foreground: var(--co-neutral-foreground);\n\t--color-co-warning: var(--co-warning);\n\t--color-co-warning-foreground: var(--co-warning-foreground);\n}\n\n@layer utilities {\n\t.cossistant {\n\t\t.animation-delay-0 {\n\t\t\tanimation-delay: 0ms;\n\t\t}\n\t\t.animation-delay-200 {\n\t\t\tanimation-delay: 200ms;\n\t\t}\n\t\t.animation-delay-400 {\n\t\t\tanimation-delay: 400ms;\n\t\t}\n\n\t\t@keyframes bounce-dot {\n\t\t\t0%,\n\t\t\t80%,\n\t\t\t100% {\n\t\t\t\ttransform: translateY(0);\n\t\t\t}\n\t\t\t40% {\n\t\t\t\ttransform: translateY(-6px);\n\t\t\t}\n\t\t}\n\n\t\t.dot-bounce-1 {\n\t\t\tanimation: bounce-dot 1.4s infinite;\n\t\t\tanimation-delay: 0s;\n\t\t}\n\n\t\t.dot-bounce-2 {\n\t\t\tanimation: bounce-dot 1.4s infinite;\n\t\t\tanimation-delay: 0.16s;\n\t\t}\n\n\t\t.dot-bounce-3 {\n\t\t\tanimation: bounce-dot 1.4s infinite;\n\t\t\tanimation-delay: 0.32s;\n\t\t}\n\t}\n}\n"],"mappings":"AAAA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA"}
@@ -1,6 +1,5 @@
1
1
  import { SupportLocale, SupportTextContentOverrides, SupportTextDefinitions, SupportTextKey, SupportTextResolvedFormatter, SupportTextVariables } from "./locales/keys.js";
2
2
  import React from "react";
3
- import * as react_jsx_runtime12 from "react/jsx-runtime";
4
3
 
5
4
  //#region src/support/text/index.d.ts
6
5
  type SupportTextProviderProps<Locale extends string = SupportLocale> = {
@@ -8,11 +7,20 @@ type SupportTextProviderProps<Locale extends string = SupportLocale> = {
8
7
  locale?: Locale;
9
8
  content?: SupportTextContentOverrides<Locale>;
10
9
  };
10
+ /**
11
+ * Supplies localized copy and formatting helpers for the support widget. The
12
+ * provider merges bundled locale strings with optional runtime overrides and
13
+ * exposes a formatter that understands visitor/website context.
14
+ */
11
15
  declare function SupportTextProvider<Locale extends string = SupportLocale>({
12
16
  children,
13
17
  locale,
14
18
  content
15
- }: SupportTextProviderProps<Locale>): react_jsx_runtime12.JSX.Element;
19
+ }: SupportTextProviderProps<Locale>): React.ReactElement;
20
+ /**
21
+ * Returns the active text formatter for the support widget. Throws if used
22
+ * outside of `SupportTextProvider` to help catch integration mistakes.
23
+ */
16
24
  declare function useSupportText(): SupportTextResolvedFormatter;
17
25
  type OptionalVariablesProp<K extends SupportTextKey> = SupportTextDefinitions[K]["variables"] extends undefined ? {
18
26
  variables?: undefined;
@@ -27,6 +35,11 @@ type TextProps<K extends SupportTextKey, As extends keyof React.JSX.IntrinsicEle
27
35
  textKey: K;
28
36
  as?: As;
29
37
  } & Omit<React.ComponentPropsWithoutRef<As>, "children">;
38
+ /**
39
+ * Convenience component that renders localized support copy via the
40
+ * `SupportTextProvider` context while still allowing callers to customize the
41
+ * rendered HTML element.
42
+ */
30
43
  declare const Text: <K extends SupportTextKey, As extends keyof React.JSX.IntrinsicElements = "span">(props: TextProps<K, As> & {
31
44
  ref?: React.ComponentPropsWithRef<As>["ref"];
32
45
  }) => React.ReactElement | null;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/support/text/index.tsx"],"sourcesContent":[],"mappings":";;;;;KAwBK,iDAAiD;EAAjD,QAAA,EACM,KAAA,CAAM,SADZ;EAAwB,MAAA,CAAA,EAEnB,MAFmB;SAAyB,CAAA,E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,CARU;EACoB,EAAA,CAAA,EAQlC,EARkC;CAArB,GASf,IATe,CASV,KAAA,CAAM,wBATI,CASqB,EATrB,CAAA,EAAA,UAAA,CAAA;;;;AACmB;;AAId,cAkCX,IAlCe,EAAA,CAAA,UAmCjB,cAnCiB,EAAA,WAAA,MAoCV,KAAA,CAAM,GAAA,CAAI,iBApCA,GAAA,MAAA,CAAA,CAAA,KAAA,EAsCpB,SAtCoB,CAsCV,CAtCU,EAsCP,EAtCO,CAAA,GAAA;EACF,GAAA,CAAA,EAqCS,KAAA,CAAM,qBArCf,CAqCqC,EArCrC,CAAA,CAAA,KAAA,CAAA;CAAtB,EAAA,GAsCC,KAAA,CAAM,YAtCP,GAAA,IAAA"}
@@ -6,6 +6,11 @@ import { jsx } from "react/jsx-runtime";
6
6
 
7
7
  //#region src/support/text/index.tsx
8
8
  const SupportTextRuntimeContext = React.createContext(null);
9
+ /**
10
+ * Supplies localized copy and formatting helpers for the support widget. The
11
+ * provider merges bundled locale strings with optional runtime overrides and
12
+ * exposes a formatter that understands visitor/website context.
13
+ */
9
14
  function SupportTextProvider({ children, locale, content }) {
10
15
  const { website, availableHumanAgents, availableAIAgents, visitor } = useSupport();
11
16
  const [isHydrated, setIsHydrated] = React.useState(false);
@@ -29,8 +34,7 @@ function SupportTextProvider({ children, locale, content }) {
29
34
  const format = ((key, variables) => {
30
35
  const definition = supportTextDefinitions[key];
31
36
  if (definition.variables !== void 0 && !("optional" in definition && definition.optional === true) && variables === void 0) throw new Error(`Missing variables for text key "${key}".`);
32
- const resolved = resolveMessage(key, localeChain, normalizedOverrides);
33
- return evaluateMessage(key, resolved, variables, textContext, utils);
37
+ return evaluateMessage(key, resolveMessage(key, localeChain, normalizedOverrides), variables, textContext, utils);
34
38
  });
35
39
  const value = React.useMemo(() => ({
36
40
  format,
@@ -46,6 +50,10 @@ function SupportTextProvider({ children, locale, content }) {
46
50
  children
47
51
  });
48
52
  }
53
+ /**
54
+ * Returns the active text formatter for the support widget. Throws if used
55
+ * outside of `SupportTextProvider` to help catch integration mistakes.
56
+ */
49
57
  function useSupportText() {
50
58
  const context = React.useContext(SupportTextRuntimeContext);
51
59
  if (!context) throw new Error("useSupportText must be used within SupportTextProvider");
@@ -63,6 +71,11 @@ function TextInner(props, forwardedRef) {
63
71
  children: content
64
72
  });
65
73
  }
74
+ /**
75
+ * Convenience component that renders localized support copy via the
76
+ * `SupportTextProvider` context while still allowing callers to customize the
77
+ * rendered HTML element.
78
+ */
66
79
  const Text = React.forwardRef(TextInner);
67
80
  Text.displayName = "SupportText";
68
81
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/support/text/index.tsx"],"sourcesContent":["/** biome-ignore-all lint/correctness/useExhaustiveDependencies: dependencies are intentionally managed */\n/** biome-ignore-all lint/correctness/noChildrenProp: children prop is needed for React.createElement */\nimport React from \"react\";\n\nimport { useSupport } from \"../../provider\";\nimport {\n\ttype SupportLocale,\n\ttype SupportTextContentOverrides,\n\ttype SupportTextContext,\n\ttype SupportTextDefinitions,\n\ttype SupportTextKey,\n\ttype SupportTextProviderValue,\n\ttype SupportTextResolvedFormatter,\n\ttype SupportTextVariables,\n\tsupportTextDefinitions,\n} from \"./locales/keys\";\nimport {\n\tbuildLocaleChain,\n\tcreateTextUtils,\n\tevaluateMessage,\n\tnormalizeOverrides,\n\tresolveMessage,\n} from \"./runtime\";\n\ntype SupportTextProviderProps<Locale extends string = SupportLocale> = {\n\tchildren: React.ReactNode;\n\tlocale?: Locale;\n\tcontent?: SupportTextContentOverrides<Locale>;\n};\n\nconst SupportTextRuntimeContext =\n\tReact.createContext<SupportTextProviderValue | null>(null);\n\nexport function SupportTextProvider<Locale extends string = SupportLocale>({\n\tchildren,\n\tlocale,\n\tcontent,\n}: SupportTextProviderProps<Locale>) {\n\tconst { website, availableHumanAgents, availableAIAgents, visitor } =\n\t\tuseSupport();\n\tconst [isHydrated, setIsHydrated] = React.useState(false);\n\n\tReact.useEffect(() => {\n\t\tsetIsHydrated(true);\n\t}, []);\n\n\tconst localeChain = React.useMemo(\n\t\t() => buildLocaleChain([locale, visitor?.locale]),\n\t\t[locale, visitor?.locale]\n\t);\n\n\tconst normalizedOverrides = React.useMemo(\n\t\t() => normalizeOverrides(content),\n\t\t[content]\n\t);\n\n\tconst utils = React.useMemo(\n\t\t() => createTextUtils(localeChain[0] ?? \"en\", isHydrated),\n\t\t[localeChain, isHydrated]\n\t);\n\n\tconst textContext = React.useMemo<SupportTextContext>(\n\t\t() => ({\n\t\t\twebsite,\n\t\t\tvisitor: visitor ?? null,\n\t\t\thumanAgents: availableHumanAgents,\n\t\t\taiAgents: availableAIAgents,\n\t\t}),\n\t\t[website, visitor, availableHumanAgents, availableAIAgents]\n\t);\n\n\tconst format = ((key: SupportTextKey, variables?: unknown) => {\n\t\tconst definition = supportTextDefinitions[key];\n\t\tconst requiresVariables =\n\t\t\tdefinition.variables !== undefined &&\n\t\t\t!(\"optional\" in definition && definition.optional === true);\n\n\t\tif (requiresVariables && variables === undefined) {\n\t\t\tthrow new Error(`Missing variables for text key \"${key}\".`);\n\t\t}\n\n\t\tconst resolved = resolveMessage(key, localeChain, normalizedOverrides);\n\t\treturn evaluateMessage(\n\t\t\tkey,\n\t\t\tresolved,\n\t\t\tvariables as SupportTextVariables<typeof key>,\n\t\t\ttextContext,\n\t\t\tutils\n\t\t);\n\t}) as SupportTextResolvedFormatter;\n\n\tconst value = React.useMemo<SupportTextProviderValue>(\n\t\t() => ({\n\t\t\tformat,\n\t\t\tlocale: localeChain[0] ?? \"en\",\n\t\t}),\n\t\t[localeChain, normalizedOverrides, textContext, utils]\n\t);\n\n\treturn (\n\t\t<SupportTextRuntimeContext.Provider value={value}>\n\t\t\t{children}\n\t\t</SupportTextRuntimeContext.Provider>\n\t);\n}\n\nexport function useSupportText(): SupportTextResolvedFormatter {\n\tconst context = React.useContext(SupportTextRuntimeContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSupportText must be used within SupportTextProvider\");\n\t}\n\n\treturn context.format;\n}\n\ntype OptionalVariablesProp<K extends SupportTextKey> =\n\tSupportTextDefinitions[K][\"variables\"] extends undefined\n\t\t? { variables?: undefined }\n\t\t: \"optional\" extends keyof SupportTextDefinitions[K]\n\t\t\t? SupportTextDefinitions[K][\"optional\"] extends true\n\t\t\t\t? { variables?: SupportTextVariables<K> }\n\t\t\t\t: { variables: SupportTextVariables<K> }\n\t\t\t: { variables: SupportTextVariables<K> };\n\ntype TextProps<\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n> = OptionalVariablesProp<K> & {\n\ttextKey: K;\n\tas?: As;\n} & Omit<React.ComponentPropsWithoutRef<As>, \"children\">;\n\nfunction TextInner<\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n>(\n\tprops: TextProps<K, As>,\n\tforwardedRef: React.ComponentPropsWithRef<As>[\"ref\"]\n) {\n\tconst { textKey, variables, as, ...rest } = props as TextProps<K, As>;\n\tconst format = useSupportText();\n\tconst Component = (as ?? \"span\") as As;\n\tconst content =\n\t\tvariables !== undefined\n\t\t\t? format(textKey, variables as SupportTextVariables<K>)\n\t\t\t: format(textKey);\n\n\treturn React.createElement(Component, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\t\"data-key-name\": textKey,\n\t\tchildren: content,\n\t});\n}\n\nexport const Text = React.forwardRef(TextInner) as <\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n>(\n\tprops: TextProps<K, As> & { ref?: React.ComponentPropsWithRef<As>[\"ref\"] }\n) => React.ReactElement | null;\n\n(Text as { displayName?: string }).displayName = \"SupportText\";\n\nexport type {\n\tSupportLocale,\n\tSupportTextContentOverrides,\n\tSupportTextKey,\n\tSupportTextVariables,\n} from \"./locales/keys\";\n"],"mappings":";;;;;;;AA8BA,MAAM,4BACL,MAAM,cAA+C,KAAK;AAE3D,SAAgB,oBAA2D,EAC1E,UACA,QACA,WACoC;CACpC,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AAM;CACzB,MAAM,UACL,cAAc,SACX,OAAO,SAAS,UAAqC,GACrD,OAAO,QAAQ;AAEnB,QAAO,MAAM,cAAc,WAAW;EACrC,GAAG;EACH,KAAK;EACL,iBAAiB;EACjB,UAAU;EACV,CAAC;;AAGH,MAAa,OAAO,MAAM,WAAW,UAAU;AAO/C,AAAC,KAAkC,cAAc"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/support/text/index.tsx"],"sourcesContent":["/** biome-ignore-all lint/correctness/useExhaustiveDependencies: dependencies are intentionally managed */\n/** biome-ignore-all lint/correctness/noChildrenProp: children prop is needed for React.createElement */\nimport React from \"react\";\n\nimport { useSupport } from \"../../provider\";\nimport {\n\ttype SupportLocale,\n\ttype SupportTextContentOverrides,\n\ttype SupportTextContext,\n\ttype SupportTextDefinitions,\n\ttype SupportTextKey,\n\ttype SupportTextProviderValue,\n\ttype SupportTextResolvedFormatter,\n\ttype SupportTextVariables,\n\tsupportTextDefinitions,\n} from \"./locales/keys\";\nimport {\n\tbuildLocaleChain,\n\tcreateTextUtils,\n\tevaluateMessage,\n\tnormalizeOverrides,\n\tresolveMessage,\n} from \"./runtime\";\n\ntype SupportTextProviderProps<Locale extends string = SupportLocale> = {\n\tchildren: React.ReactNode;\n\tlocale?: Locale;\n\tcontent?: SupportTextContentOverrides<Locale>;\n};\n\nconst SupportTextRuntimeContext =\n\tReact.createContext<SupportTextProviderValue | null>(null);\n\n/**\n * Supplies localized copy and formatting helpers for the support widget. The\n * provider merges bundled locale strings with optional runtime overrides and\n * exposes a formatter that understands visitor/website context.\n */\nexport function SupportTextProvider<Locale extends string = SupportLocale>({\n\tchildren,\n\tlocale,\n\tcontent,\n}: SupportTextProviderProps<Locale>): React.ReactElement {\n\tconst { website, availableHumanAgents, availableAIAgents, visitor } =\n\t\tuseSupport();\n\tconst [isHydrated, setIsHydrated] = React.useState(false);\n\n\tReact.useEffect(() => {\n\t\tsetIsHydrated(true);\n\t}, []);\n\n\tconst localeChain = React.useMemo(\n\t\t() => buildLocaleChain([locale, visitor?.locale]),\n\t\t[locale, visitor?.locale]\n\t);\n\n\tconst normalizedOverrides = React.useMemo(\n\t\t() => normalizeOverrides(content),\n\t\t[content]\n\t);\n\n\tconst utils = React.useMemo(\n\t\t() => createTextUtils(localeChain[0] ?? \"en\", isHydrated),\n\t\t[localeChain, isHydrated]\n\t);\n\n\tconst textContext = React.useMemo<SupportTextContext>(\n\t\t() => ({\n\t\t\twebsite,\n\t\t\tvisitor: visitor ?? null,\n\t\t\thumanAgents: availableHumanAgents,\n\t\t\taiAgents: availableAIAgents,\n\t\t}),\n\t\t[website, visitor, availableHumanAgents, availableAIAgents]\n\t);\n\n\tconst format = ((key: SupportTextKey, variables?: unknown) => {\n\t\tconst definition = supportTextDefinitions[key];\n\t\tconst requiresVariables =\n\t\t\tdefinition.variables !== undefined &&\n\t\t\t!(\"optional\" in definition && definition.optional === true);\n\n\t\tif (requiresVariables && variables === undefined) {\n\t\t\tthrow new Error(`Missing variables for text key \"${key}\".`);\n\t\t}\n\n\t\tconst resolved = resolveMessage(key, localeChain, normalizedOverrides);\n\t\treturn evaluateMessage(\n\t\t\tkey,\n\t\t\tresolved,\n\t\t\tvariables as SupportTextVariables<typeof key>,\n\t\t\ttextContext,\n\t\t\tutils\n\t\t);\n\t}) as SupportTextResolvedFormatter;\n\n\tconst value = React.useMemo<SupportTextProviderValue>(\n\t\t() => ({\n\t\t\tformat,\n\t\t\tlocale: localeChain[0] ?? \"en\",\n\t\t}),\n\t\t[localeChain, normalizedOverrides, textContext, utils]\n\t);\n\n\treturn (\n\t\t<SupportTextRuntimeContext.Provider value={value}>\n\t\t\t{children}\n\t\t</SupportTextRuntimeContext.Provider>\n\t);\n}\n\n/**\n * Returns the active text formatter for the support widget. Throws if used\n * outside of `SupportTextProvider` to help catch integration mistakes.\n */\nexport function useSupportText(): SupportTextResolvedFormatter {\n\tconst context = React.useContext(SupportTextRuntimeContext);\n\tif (!context) {\n\t\tthrow new Error(\"useSupportText must be used within SupportTextProvider\");\n\t}\n\n\treturn context.format;\n}\n\ntype OptionalVariablesProp<K extends SupportTextKey> =\n\tSupportTextDefinitions[K][\"variables\"] extends undefined\n\t\t? { variables?: undefined }\n\t\t: \"optional\" extends keyof SupportTextDefinitions[K]\n\t\t\t? SupportTextDefinitions[K][\"optional\"] extends true\n\t\t\t\t? { variables?: SupportTextVariables<K> }\n\t\t\t\t: { variables: SupportTextVariables<K> }\n\t\t\t: { variables: SupportTextVariables<K> };\n\ntype TextProps<\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n> = OptionalVariablesProp<K> & {\n\ttextKey: K;\n\tas?: As;\n} & Omit<React.ComponentPropsWithoutRef<As>, \"children\">;\n\nfunction TextInner<\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n>(\n\tprops: TextProps<K, As>,\n\tforwardedRef: React.ComponentPropsWithRef<As>[\"ref\"]\n) {\n\tconst { textKey, variables, as, ...rest } = props as TextProps<K, As>;\n\tconst format = useSupportText();\n\tconst Component = (as ?? \"span\") as As;\n\tconst content =\n\t\tvariables !== undefined\n\t\t\t? format(textKey, variables as SupportTextVariables<K>)\n\t\t\t: format(textKey);\n\n\treturn React.createElement(Component, {\n\t\t...rest,\n\t\tref: forwardedRef,\n\t\t\"data-key-name\": textKey,\n\t\tchildren: content,\n\t});\n}\n\n/**\n * Convenience component that renders localized support copy via the\n * `SupportTextProvider` context while still allowing callers to customize the\n * rendered HTML element.\n */\nexport const Text = React.forwardRef(TextInner) as <\n\tK extends SupportTextKey,\n\tAs extends keyof React.JSX.IntrinsicElements = \"span\",\n>(\n\tprops: TextProps<K, As> & { ref?: React.ComponentPropsWithRef<As>[\"ref\"] }\n) => React.ReactElement | null;\n\n(Text as { displayName?: string }).displayName = \"SupportText\";\n\nexport type {\n\tSupportLocale,\n\tSupportTextContentOverrides,\n\tSupportTextKey,\n\tSupportTextVariables,\n} from \"./locales/keys\";\n"],"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,cACC;CACD,MAAM,EAAE,SAAS,WAAW,GAAI,GAAG,SAAS;CAC5C,MAAM,SAAS,gBAAgB;CAC/B,MAAM,YAAa,MAAM;CACzB,MAAM,UACL,cAAc,SACX,OAAO,SAAS,UAAqC,GACrD,OAAO,QAAQ;AAEnB,QAAO,MAAM,cAAc,WAAW;EACrC,GAAG;EACH,KAAK;EACL,iBAAiB;EACjB,UAAU;EACV,CAAC;;;;;;;AAQH,MAAa,OAAO,MAAM,WAAW,UAAU;AAO/C,AAAC,KAAkC,cAAc"}
@@ -17,12 +17,12 @@ const en = {
17
17
  "page.home.greeting": ({ variables, context, utils }) => {
18
18
  const period = utils.timeOfDay();
19
19
  const phrases = {
20
- morning: "morning",
21
- afternoon: "afternoon",
22
- evening: "evening"
20
+ morning: "Morning",
21
+ afternoon: "Afternoon",
22
+ evening: "Evening"
23
23
  };
24
24
  const visitorName = variables?.visitorName || context.visitor?.contact?.name;
25
- return `Good ${phrases[period.token]}${visitorName ? ` ${visitorName}` : ""}, How can we help?`;
25
+ return `${phrases[period.token]}${visitorName ? ` ${visitorName}` : ""}, how can we help?`;
26
26
  },
27
27
  "page.home.history.more": ({ variables, utils }) => {
28
28
  const count = variables.count;
@@ -40,6 +40,10 @@ const en = {
40
40
  "component.conversationButtonLink.lastMessage.agent": ({ variables }) => `${variables.name} - ${variables.time}`,
41
41
  "component.conversationButtonLink.lastMessage.visitor": ({ variables }) => `You - ${variables.time}`,
42
42
  "component.conversationButtonLink.typing": ({ variables }) => `${variables.name} is typing...`,
43
+ "component.conversationButtonLink.status.open": "Open",
44
+ "component.conversationButtonLink.status.resolved": "Resolved",
45
+ "component.conversationButtonLink.status.spam": "Spam",
46
+ "component.conversationButtonLink.status.closed": "closed",
43
47
  "component.conversationEvent.assigned": ({ variables }) => `${variables.actorName} assigned the conversation`,
44
48
  "component.conversationEvent.unassigned": ({ variables }) => `${variables.actorName} unassigned the conversation`,
45
49
  "component.conversationEvent.default": ({ variables }) => `${variables.actorName} performed an action`,
@@ -52,6 +56,20 @@ const en = {
52
56
  "component.conversationEvent.statusChanged": ({ variables }) => `${variables.actorName} changed the status`,
53
57
  "component.conversationEvent.tagAdded": ({ variables }) => `${variables.actorName} added a tag`,
54
58
  "component.conversationEvent.tagRemoved": ({ variables }) => `${variables.actorName} removed a tag`,
59
+ "component.conversationEvent.visitorBlocked": ({ variables }) => `${variables.actorName} blocked the visitor`,
60
+ "component.conversationEvent.visitorUnblocked": ({ variables }) => `${variables.actorName} unblocked the visitor`,
61
+ "component.conversationEvent.visitorIdentified": () => "Contact details confirmed",
62
+ "component.identificationTool.title": "Let us keep in touch",
63
+ "component.identificationTool.description": "Leave your email so we can follow up on this conversation.",
64
+ "component.identificationTool.cta": "Share email",
65
+ "component.identificationTool.loading": "Saving...",
66
+ "component.identificationTool.success": "Thanks! We'll reach out to you at this email if we need to.",
67
+ "component.identificationTool.error": "We couldn't save your email. Please try again.",
68
+ "component.identificationTool.validation": "Enter an email address to continue.",
69
+ "component.identificationTool.inputPlaceholder": "you@example.com",
70
+ "component.identificationTool.inputLabel": "Email address",
71
+ "component.identificationTool.eventLog": "Visitor confirmed their email address",
72
+ "component.conversationPage.closedMessage": "This conversation is closed, start a new one to talk with us",
55
73
  "component.multimodalInput.placeholder": "Type your message...",
56
74
  "component.multimodalInput.remove": ({ variables }) => `Remove ${variables.fileName}`,
57
75
  "component.navigation.articles": "Articles",
@@ -1 +1 @@
1
- {"version":3,"file":"en.js","names":["en: SupportLocaleMessages","phrases: Record<typeof period.token, string>"],"sources":["../../../../src/support/text/locales/en.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst en: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Ask us a question\",\n\t\"common.actions.attachFiles\": \"Attach files\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"common.brand.watermark\": \"We run on\",\n\t\"common.fallbacks.aiAssistant\": \"AI assistant\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Someone\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Unknown\",\n\t\"common.fallbacks.you\": \"You\",\n\t\"common.labels.aiAgentIndicator\": \"AI agent\",\n\t\"common.labels.supportOnline\": \"Support online\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} more`,\n\t\"page.conversationHistory.title\": \"Conversation history\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst phrases: Record<typeof period.token, string> = {\n\t\t\tmorning: \"morning\",\n\t\t\tafternoon: \"afternoon\",\n\t\t\tevening: \"evening\",\n\t\t};\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `Good ${phrases[period.token]}${visitorName ? ` ${visitorName}` : \"\"}, How can we help?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversation\",\n\t\t\tother: \"conversations\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} more ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\tconst formatted = websiteName\n\t\t\t? `${utils.titleCase(websiteName)} support`\n\t\t\t: \"Support\";\n\t\treturn formatted;\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Untitled conversation\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`You - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} is typing...`,\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} assigned the conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} unassigned the conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} performed an action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} joined the conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} left the conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} requested to join`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the priority`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reopened the conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolved the conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the status`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} added a tag`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} removed a tag`,\n\t\"component.multimodalInput.placeholder\": \"Type your message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Home\",\n\t\"component.message.timestamp.aiIndicator\": \"• AI agent\",\n};\n\nexport default en;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,UAAU,UAAU;CACrB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC5B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC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UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,UAAU,UAAU;CACrB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
1
+ {"version":3,"file":"en.js","names":["en: SupportLocaleMessages","phrases: Record<typeof period.token, string>"],"sources":["../../../../src/support/text/locales/en.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst en: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Ask us a question\",\n\t\"common.actions.attachFiles\": \"Attach files\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"common.brand.watermark\": \"We run on\",\n\t\"common.fallbacks.aiAssistant\": \"AI assistant\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Someone\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Unknown\",\n\t\"common.fallbacks.you\": \"You\",\n\t\"common.labels.aiAgentIndicator\": \"AI agent\",\n\t\"common.labels.supportOnline\": \"Support online\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} more`,\n\t\"page.conversationHistory.title\": \"Conversation history\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst phrases: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Morning\",\n\t\t\tafternoon: \"Afternoon\",\n\t\t\tevening: \"Evening\",\n\t\t};\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${phrases[period.token]}${visitorName ? ` ${visitorName}` : \"\"}, how can we help?`;\n\t},\n\t\"page.home.history.more\": ({ variables, utils }) => {\n\t\tconst count = variables.count;\n\t\tconst noun = utils.pluralize(count, {\n\t\t\tone: \"conversation\",\n\t\t\tother: \"conversations\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} more ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\tconst formatted = websiteName\n\t\t\t? `${utils.titleCase(websiteName)} support`\n\t\t\t: \"Support\";\n\t\treturn formatted;\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Untitled conversation\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`You - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} is typing...`,\n\t\"component.conversationButtonLink.status.open\": \"Open\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resolved\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationButtonLink.status.closed\": \"closed\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} assigned the conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} unassigned the conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} performed an action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} joined the conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} left the conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} requested to join`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the priority`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reopened the conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolved the conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} changed the status`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} added a tag`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} removed a tag`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} blocked the visitor`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} unblocked the visitor`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Contact details confirmed\",\n\t\"component.identificationTool.title\": \"Let us keep in touch\",\n\t\"component.identificationTool.description\":\n\t\t\"Leave your email so we can follow up on this conversation.\",\n\t\"component.identificationTool.cta\": \"Share email\",\n\t\"component.identificationTool.loading\": \"Saving...\",\n\t\"component.identificationTool.success\":\n\t\t\"Thanks! We'll reach out to you at this email if we need to.\",\n\t\"component.identificationTool.error\":\n\t\t\"We couldn't save your email. Please try again.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Enter an email address to continue.\",\n\t\"component.identificationTool.inputPlaceholder\": \"you@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Email address\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Visitor confirmed their email address\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"This conversation is closed, start a new one to talk with us\",\n\t\"component.multimodalInput.placeholder\": \"Type your message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Remove ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Home\",\n\t\"component.message.timestamp.aiIndicator\": \"• AI agent\",\n};\n\nexport default en;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,UAAU,UAAU;CACrB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC5B,gCAAgC;CAChC,4BAA4B;CAC5B,wBAAw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