@cossistant/react 0.0.28 → 0.0.30

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 (301) hide show
  1. package/README.md +1 -1
  2. package/_virtual/rolldown_runtime.js +9 -23
  3. package/hooks/index.d.ts +3 -3
  4. package/hooks/private/store/use-conversations-store.d.ts +2 -0
  5. package/hooks/private/store/use-conversations-store.d.ts.map +1 -1
  6. package/hooks/private/store/use-conversations-store.js +15 -8
  7. package/hooks/private/store/use-conversations-store.js.map +1 -1
  8. package/hooks/private/store/use-store-selector.d.ts +3 -0
  9. package/hooks/private/store/use-store-selector.d.ts.map +1 -1
  10. package/hooks/private/store/use-store-selector.js +4 -8
  11. package/hooks/private/store/use-store-selector.js.map +1 -1
  12. package/hooks/private/store/use-website-store.d.ts +3 -1
  13. package/hooks/private/store/use-website-store.d.ts.map +1 -1
  14. package/hooks/private/store/use-website-store.js +14 -6
  15. package/hooks/private/store/use-website-store.js.map +1 -1
  16. package/hooks/private/use-client-query.d.ts +1 -1
  17. package/hooks/private/use-client-query.d.ts.map +1 -1
  18. package/hooks/private/use-client-query.js +1 -0
  19. package/hooks/private/use-client-query.js.map +1 -1
  20. package/hooks/private/use-default-messages.d.ts +1 -1
  21. package/hooks/private/use-grouped-messages.d.ts +10 -7
  22. package/hooks/private/use-grouped-messages.d.ts.map +1 -1
  23. package/hooks/private/use-grouped-messages.js +44 -11
  24. package/hooks/private/use-grouped-messages.js.map +1 -1
  25. package/hooks/private/use-rest-client.d.ts +13 -3
  26. package/hooks/private/use-rest-client.d.ts.map +1 -1
  27. package/hooks/private/use-rest-client.js +49 -22
  28. package/hooks/private/use-rest-client.js.map +1 -1
  29. package/hooks/private/use-visitor-typing-reporter.d.ts +1 -1
  30. package/hooks/use-conversation-auto-seen.d.ts +1 -1
  31. package/hooks/use-conversation-page.d.ts +1 -1
  32. package/hooks/use-conversation-page.d.ts.map +1 -1
  33. package/hooks/use-conversation-page.js +10 -3
  34. package/hooks/use-conversation-page.js.map +1 -1
  35. package/hooks/use-conversation-preview.d.ts +3 -1
  36. package/hooks/use-conversation-preview.d.ts.map +1 -1
  37. package/hooks/use-conversation-preview.js +6 -3
  38. package/hooks/use-conversation-preview.js.map +1 -1
  39. package/hooks/use-conversation-seen.d.ts +1 -1
  40. package/hooks/use-conversation-seen.js +1 -1
  41. package/hooks/use-conversation-seen.js.map +1 -1
  42. package/hooks/use-conversation-timeline-items.d.ts +1 -1
  43. package/hooks/use-conversation-timeline-items.js +2 -3
  44. package/hooks/use-conversation-timeline-items.js.map +1 -1
  45. package/hooks/use-conversation-timeline.d.ts +1 -1
  46. package/hooks/use-conversation-timeline.d.ts.map +1 -1
  47. package/hooks/use-conversation-timeline.js +1 -3
  48. package/hooks/use-conversation-timeline.js.map +1 -1
  49. package/hooks/use-conversation.d.ts +1 -1
  50. package/hooks/use-conversation.js +2 -3
  51. package/hooks/use-conversation.js.map +1 -1
  52. package/hooks/use-conversations.d.ts +1 -1
  53. package/hooks/use-conversations.js +5 -3
  54. package/hooks/use-conversations.js.map +1 -1
  55. package/hooks/use-create-conversation.d.ts +3 -3
  56. package/hooks/use-create-conversation.js +1 -0
  57. package/hooks/use-create-conversation.js.map +1 -1
  58. package/hooks/use-file-upload.d.ts +1 -1
  59. package/hooks/use-file-upload.js +3 -3
  60. package/hooks/use-file-upload.js.map +1 -1
  61. package/hooks/use-home-page.js +3 -3
  62. package/hooks/use-home-page.js.map +1 -1
  63. package/hooks/use-message-composer.d.ts +10 -3
  64. package/hooks/use-message-composer.d.ts.map +1 -1
  65. package/hooks/use-message-composer.js +5 -2
  66. package/hooks/use-message-composer.js.map +1 -1
  67. package/hooks/use-realtime-support.d.ts +1 -1
  68. package/hooks/use-send-message.d.ts +8 -2
  69. package/hooks/use-send-message.d.ts.map +1 -1
  70. package/hooks/use-send-message.js +5 -3
  71. package/hooks/use-send-message.js.map +1 -1
  72. package/hooks/use-visitor.js +2 -2
  73. package/hooks/use-visitor.js.map +1 -1
  74. package/identify-visitor.d.ts.map +1 -1
  75. package/identify-visitor.js +15 -1
  76. package/identify-visitor.js.map +1 -1
  77. package/index.d.ts +3 -3
  78. package/index.js +1 -1
  79. package/package.json +5 -3
  80. package/{conversation.d.ts → packages/types/src/api/conversation.d.ts} +368 -64
  81. package/packages/types/src/api/conversation.d.ts.map +1 -0
  82. package/packages/types/src/api/timeline-item.d.ts +460 -0
  83. package/packages/types/src/api/timeline-item.d.ts.map +1 -0
  84. package/packages/types/src/realtime-events.d.ts +1004 -0
  85. package/packages/types/src/realtime-events.d.ts.map +1 -0
  86. package/{schemas3.d.ts → packages/types/src/schemas.d.ts} +95 -19
  87. package/packages/types/src/schemas.d.ts.map +1 -0
  88. package/primitives/avatar/avatar.js +1 -1
  89. package/primitives/avatar/avatar.js.map +1 -1
  90. package/primitives/avatar/fallback.d.ts.map +1 -1
  91. package/primitives/avatar/fallback.js +2 -2
  92. package/primitives/avatar/fallback.js.map +1 -1
  93. package/primitives/avatar/image.d.ts +1 -1
  94. package/primitives/avatar/image.js +1 -1
  95. package/primitives/avatar/image.js.map +1 -1
  96. package/primitives/button.js +1 -1
  97. package/primitives/button.js.map +1 -1
  98. package/primitives/conversation-timeline.d.ts +1 -1
  99. package/primitives/conversation-timeline.js +4 -4
  100. package/primitives/conversation-timeline.js.map +1 -1
  101. package/primitives/day-separator.d.ts +76 -0
  102. package/primitives/day-separator.d.ts.map +1 -0
  103. package/primitives/day-separator.js +111 -0
  104. package/primitives/day-separator.js.map +1 -0
  105. package/primitives/index.d.ts +3 -2
  106. package/primitives/index.js +6 -1
  107. package/primitives/index.parts.d.ts +2 -1
  108. package/primitives/index.parts.js +2 -1
  109. package/primitives/multimodal-input.d.ts +2 -2
  110. package/primitives/multimodal-input.d.ts.map +1 -1
  111. package/primitives/multimodal-input.js +2 -2
  112. package/primitives/multimodal-input.js.map +1 -1
  113. package/primitives/timeline-item-attachments.d.ts +1 -1
  114. package/primitives/timeline-item-attachments.js +6 -7
  115. package/primitives/timeline-item-attachments.js.map +1 -1
  116. package/primitives/timeline-item-group.d.ts +1 -1
  117. package/primitives/timeline-item-group.d.ts.map +1 -1
  118. package/primitives/timeline-item-group.js +8 -8
  119. package/primitives/timeline-item-group.js.map +1 -1
  120. package/primitives/timeline-item.d.ts +1 -1
  121. package/primitives/timeline-item.d.ts.map +1 -1
  122. package/primitives/timeline-item.js +33 -8
  123. package/primitives/timeline-item.js.map +1 -1
  124. package/primitives/trigger.js +1 -1
  125. package/primitives/trigger.js.map +1 -1
  126. package/primitives/window.js +1 -1
  127. package/primitives/window.js.map +1 -1
  128. package/provider.d.ts +4 -2
  129. package/provider.d.ts.map +1 -1
  130. package/provider.js +56 -8
  131. package/provider.js.map +1 -1
  132. package/realtime/event-filter.d.ts +4 -1
  133. package/realtime/event-filter.d.ts.map +1 -1
  134. package/realtime/event-filter.js +14 -0
  135. package/realtime/event-filter.js.map +1 -1
  136. package/realtime/provider.d.ts +1 -1
  137. package/realtime/provider.d.ts.map +1 -1
  138. package/realtime/provider.js +1 -2
  139. package/realtime/provider.js.map +1 -1
  140. package/realtime/seen-store.d.ts +2 -2
  141. package/realtime/support-provider.js +6 -1
  142. package/realtime/support-provider.js.map +1 -1
  143. package/realtime/typing-store.d.ts +1 -1
  144. package/realtime/use-realtime.d.ts +1 -1
  145. package/support/components/avatar-stack.d.ts.map +1 -1
  146. package/support/components/avatar-stack.js +32 -12
  147. package/support/components/avatar-stack.js.map +1 -1
  148. package/support/components/avatar.d.ts +34 -3
  149. package/support/components/avatar.d.ts.map +1 -1
  150. package/support/components/avatar.js +61 -8
  151. package/support/components/avatar.js.map +1 -1
  152. package/support/components/button.d.ts +4 -2
  153. package/support/components/button.d.ts.map +1 -1
  154. package/support/components/button.js +3 -3
  155. package/support/components/button.js.map +1 -1
  156. package/support/components/configuration-error.d.ts +16 -0
  157. package/support/components/configuration-error.d.ts.map +1 -0
  158. package/support/components/configuration-error.js +162 -0
  159. package/support/components/configuration-error.js.map +1 -0
  160. package/support/components/content.js +1 -2
  161. package/support/components/content.js.map +1 -1
  162. package/support/components/conversation-button-link.js +18 -23
  163. package/support/components/conversation-button-link.js.map +1 -1
  164. package/support/components/conversation-event.d.ts.map +1 -1
  165. package/support/components/conversation-event.js +7 -5
  166. package/support/components/conversation-event.js.map +1 -1
  167. package/support/components/conversation-timeline.d.ts +6 -1
  168. package/support/components/conversation-timeline.d.ts.map +1 -1
  169. package/support/components/conversation-timeline.js +22 -2
  170. package/support/components/conversation-timeline.js.map +1 -1
  171. package/support/components/header.js +1 -1
  172. package/support/components/image-lightbox.d.ts +1 -1
  173. package/support/components/image-lightbox.js +1 -2
  174. package/support/components/image-lightbox.js.map +1 -1
  175. package/support/components/index.js +1 -1
  176. package/support/components/multimodal-input.js +0 -1
  177. package/support/components/multimodal-input.js.map +1 -1
  178. package/support/components/navigation-tab.js +1 -1
  179. package/support/components/online-indicator.d.ts +50 -0
  180. package/support/components/online-indicator.d.ts.map +1 -0
  181. package/support/components/online-indicator.js +65 -0
  182. package/support/components/online-indicator.js.map +1 -0
  183. package/support/components/root.js +0 -1
  184. package/support/components/root.js.map +1 -1
  185. package/support/components/timeline-identification-tool.js +4 -4
  186. package/support/components/timeline-identification-tool.js.map +1 -1
  187. package/support/components/timeline-message-group.d.ts +1 -1
  188. package/support/components/timeline-message-group.d.ts.map +1 -1
  189. package/support/components/timeline-message-group.js +6 -4
  190. package/support/components/timeline-message-group.js.map +1 -1
  191. package/support/components/timeline-message-item.d.ts +1 -1
  192. package/support/components/timeline-message-item.js +4 -4
  193. package/support/components/timeline-message-item.js.map +1 -1
  194. package/support/components/trigger.js +1 -2
  195. package/support/components/trigger.js.map +1 -1
  196. package/support/components/typing-indicator.js +1 -1
  197. package/support/components/typing-indicator.js.map +1 -1
  198. package/support/context/controlled-state.js +0 -1
  199. package/support/context/controlled-state.js.map +1 -1
  200. package/support/context/events.d.ts +1 -1
  201. package/support/context/events.js +0 -1
  202. package/support/context/events.js.map +1 -1
  203. package/support/context/handle.js +0 -1
  204. package/support/context/handle.js.map +1 -1
  205. package/support/context/identification.d.ts +33 -0
  206. package/support/context/identification.d.ts.map +1 -0
  207. package/support/context/identification.js +34 -0
  208. package/support/context/identification.js.map +1 -0
  209. package/support/context/positioning.js +0 -1
  210. package/support/context/positioning.js.map +1 -1
  211. package/support/context/slots.js +0 -1
  212. package/support/context/slots.js.map +1 -1
  213. package/support/context/websocket.d.ts +1 -1
  214. package/support/context/websocket.js +0 -1
  215. package/support/context/websocket.js.map +1 -1
  216. package/support/index.d.ts.map +1 -1
  217. package/support/index.js +51 -18
  218. package/support/index.js.map +1 -1
  219. package/support/pages/conversation-history.js +2 -1
  220. package/support/pages/conversation-history.js.map +1 -1
  221. package/support/pages/conversation.d.ts +1 -1
  222. package/support/pages/conversation.js +1 -1
  223. package/support/pages/conversation.js.map +1 -1
  224. package/support/pages/home.js +5 -3
  225. package/support/pages/home.js.map +1 -1
  226. package/support/router.d.ts.map +1 -1
  227. package/support/router.js +4 -0
  228. package/support/router.js.map +1 -1
  229. package/support/store/support-store.js +0 -1
  230. package/support/store/support-store.js.map +1 -1
  231. package/support/{support-C7Xaw-N6.css → support-DmViRaga.css} +2 -2
  232. package/support/{support-C7Xaw-N6.css.map → support-DmViRaga.css.map} +1 -1
  233. package/support/text/index.d.ts +1 -1
  234. package/support/text/index.d.ts.map +1 -1
  235. package/support/text/index.js +1 -1
  236. package/support/text/index.js.map +1 -1
  237. package/support/text/locales/en.js +1 -1
  238. package/support/text/locales/en.js.map +1 -1
  239. package/support/text/locales/es.js +1 -1
  240. package/support/text/locales/es.js.map +1 -1
  241. package/support/text/locales/fr.js +1 -1
  242. package/support/text/locales/fr.js.map +1 -1
  243. package/support/utils/index.d.ts +1 -1
  244. package/support-config.js +0 -1
  245. package/support-config.js.map +1 -1
  246. package/support.css +1 -1
  247. package/tailwind.css +1 -1
  248. package/utils/conversation.d.ts.map +1 -1
  249. package/utils/conversation.js +1 -3
  250. package/utils/conversation.js.map +1 -1
  251. package/utils/use-render-element.d.ts.map +1 -1
  252. package/utils/use-render-element.js +20 -5
  253. package/utils/use-render-element.js.map +1 -1
  254. package/api.d.ts +0 -71
  255. package/api.d.ts.map +0 -1
  256. package/checks.d.ts +0 -189
  257. package/checks.d.ts.map +0 -1
  258. package/clsx.d.ts +0 -7
  259. package/clsx.d.ts.map +0 -1
  260. package/coerce.d.ts +0 -9
  261. package/coerce.d.ts.map +0 -1
  262. package/conversation.d.ts.map +0 -1
  263. package/core.d.ts +0 -35
  264. package/core.d.ts.map +0 -1
  265. package/errors.d.ts +0 -121
  266. package/errors.d.ts.map +0 -1
  267. package/errors2.d.ts +0 -24
  268. package/errors2.d.ts.map +0 -1
  269. package/index2.d.ts +0 -4
  270. package/index3.d.ts +0 -1
  271. package/metadata.d.ts +0 -1
  272. package/openapi-generator.d.ts +0 -1
  273. package/openapi-generator2.d.ts +0 -1
  274. package/openapi-generator3.d.ts +0 -1
  275. package/openapi30.d.ts +0 -125
  276. package/openapi30.d.ts.map +0 -1
  277. package/openapi31.d.ts +0 -131
  278. package/openapi31.d.ts.map +0 -1
  279. package/parse.d.ts +0 -17
  280. package/parse.d.ts.map +0 -1
  281. package/realtime-events.d.ts +0 -482
  282. package/realtime-events.d.ts.map +0 -1
  283. package/registries.d.ts +0 -32
  284. package/registries.d.ts.map +0 -1
  285. package/schemas.d.ts +0 -673
  286. package/schemas.d.ts.map +0 -1
  287. package/schemas2.d.ts +0 -320
  288. package/schemas2.d.ts.map +0 -1
  289. package/schemas3.d.ts.map +0 -1
  290. package/specification-extension.d.ts +0 -9
  291. package/specification-extension.d.ts.map +0 -1
  292. package/standard-schema.d.ts +0 -59
  293. package/standard-schema.d.ts.map +0 -1
  294. package/timeline-item.d.ts +0 -227
  295. package/timeline-item.d.ts.map +0 -1
  296. package/util.d.ts +0 -41
  297. package/util.d.ts.map +0 -1
  298. package/versions.d.ts +0 -9
  299. package/versions.d.ts.map +0 -1
  300. package/zod-extensions.d.ts +0 -39
  301. package/zod-extensions.d.ts.map +0 -1
@@ -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\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: Omit<TextProps<K, As>, \"ref\">,\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"],"mappings":";;;;;;;;;AA8BA,MAAM,4BACL,MAAM,cAA+C,KAAK;;;;;;AAO3D,SAAgB,oBAA2D,EAC1E,UACA,QACA,WACwD;CACxD,MAAM,EAAE,SAAS,sBAAsB,mBAAmB,YACzD,YAAY;CACb,MAAM,CAAC,YAAY,i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AAO,MAAM,cAAc,WAAW;EACrC,GAAG;EACH,KAAK;EACL,iBAAiB;EACjB,UAAU;EACV,CAAC;;;;;;;AAQH,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>(props: Omit<TextProps<K, As>, \"ref\">, forwardedRef: React.Ref<Element>) {\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.Ref<Element> }\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;;;;;;AAO3D,SAAgB,oBAA2D,EAC1E,UACA,QACA,WACwD;CACx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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;;;;;;;AAQH,MAAa,OAAO,MAAM,WAAW,UAAU;AAO/C,AAAC,KAAkC,cAAc"}
@@ -49,7 +49,7 @@ const en = {
49
49
  "component.conversationEvent.default": ({ variables }) => `${variables.actorName} performed an action`,
50
50
  "component.conversationEvent.participantJoined": ({ variables }) => `${variables.actorName} joined the conversation`,
51
51
  "component.conversationEvent.participantLeft": ({ variables }) => `${variables.actorName} left the conversation`,
52
- "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} requested to join`,
52
+ "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} requested a team member to join`,
53
53
  "component.conversationEvent.priorityChanged": ({ variables }) => `${variables.actorName} changed the priority`,
54
54
  "component.conversationEvent.reopened": ({ variables }) => `${variables.actorName} reopened the conversation`,
55
55
  "component.conversationEvent.resolved": ({ variables }) => `${variables.actorName} resolved the conversation`,
@@ -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 `${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,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EACxD,MAAM,SAAS,MAAM,WAAW;EAChC,MAAMC,UAA+C;GACpD,SAAS;GACT,WAAW;GACX,SAAS;GACT;EACD,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,QAAQ,OAAO,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAExE,2BAA2B,EAAE,WAAW,YAAY;EACnD,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,MAAM,UAAU,OAAO;GACnC,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,KAAK,MAAM,aAAa,MAAM,CAAC,QAAQ;;CAE/C,sBAAsB,EAAE,WAAW,SAAS,YAAY;EACvD,MAAM,cAAc,WAAW,eAAe,QAAQ,SAAS,QAAQ;AAIvE,SAHkB,cACf,GAAG,MAAM,UAAU,YAAY,CAAC,YAChC;;CAGJ,kDAAkD;CAClD,uDAAuD,EAAE,gBACxD,GAAG,UAAU,KAAK,KAAK,UAAU;CAClC,yDAAyD,EAAE,gBAC1D,SAAS,UAAU;CACpB,4CAA4C,EAAE,gBAC7C,GAAG,UAAU,KAAK;CACnB,gDAAgD;CAChD,oDAAoD;CACpD,gDAAgD;CAChD,kDAAkD;CAClD,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,wCAAwC,EAAE,gBACzC,GAAG,UAAU,UAAU;CACxB,kDAAkD,EAAE,gBACnD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,qDAAqD,EAAE,gBACtD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,8CAA8C,EAAE,gBAC/C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,+CAA+C,EAAE,gBAChD,GAAG,UAAU,UAAU;CACxB,iDAAiD,EAAE,gBAClD,GAAG,UAAU,UAAU;CACxB,uDACC;CACD,sCAAsC;CACtC,4CACC;CACD,oCAAoC;CACpC,wCAAwC;CACxC,wCACC;CACD,sCACC;CACD,2CACC;CACD,iDAAiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,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 a team member 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,wBAAwB;CACxB,kCAAkC;CAClC,+BAA+B;CAC/B,sCAAsC,EAAE,WAAW,YAClD,IAAI,MAAM,aAAa,UAAU,MAAM,CAAC;CACzC,kCAAkC;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EACxD,MAAM,SAAS,MAAM,WAAW;EAChC,MAAMC,UAA+C;GACpD,SAAS;GACT,WAAW;GACX,SAAS;GACT;EACD,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS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EAAE,gBAClD,GAAG,UAAU,UAAU;CACxB,uDACC;CACD,sCAAsC;CACtC,4CACC;CACD,oCAAoC;CACpC,wCAAwC;CACxC,wCACC;CACD,sCACC;CACD,2CACC;CACD,iDAAiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,UAAU,UAAU;CACrB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
@@ -47,7 +47,7 @@ const es = {
47
47
  "component.conversationEvent.default": ({ variables }) => `${variables.actorName} realizó una acción`,
48
48
  "component.conversationEvent.participantJoined": ({ variables }) => `${variables.actorName} se unió a la conversación`,
49
49
  "component.conversationEvent.participantLeft": ({ variables }) => `${variables.actorName} salió de la conversación`,
50
- "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} solicitó unirse`,
50
+ "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} solicitó que un miembro del equipo se uniera`,
51
51
  "component.conversationEvent.priorityChanged": ({ variables }) => `${variables.actorName} cambió la prioridad`,
52
52
  "component.conversationEvent.reopened": ({ variables }) => `${variables.actorName} reabrió la conversación`,
53
53
  "component.conversationEvent.resolved": ({ variables }) => `${variables.actorName} resolvió la conversación`,
@@ -1 +1 @@
1
- {"version":3,"file":"es.js","names":["es: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/es.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst es: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Haznos una pregunta\",\n\t\"common.actions.attachFiles\": \"Adjuntar archivos\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Impulsado por\",\n\t\"common.fallbacks.aiAssistant\": \"Asistente de IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Alguien\",\n\t\"common.fallbacks.supportTeam\": \"Soporte\",\n\t\"common.fallbacks.unknown\": \"Desconocido\",\n\t\"common.fallbacks.you\": \"Tú\",\n\t\"common.labels.aiAgentIndicator\": \"Agente IA\",\n\t\"common.labels.supportOnline\": \"Soporte en línea\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} más`,\n\t\"page.conversationHistory.title\": \"Historial de conversaciones\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Buenos días\",\n\t\t\tafternoon: \"Buenas tardes\",\n\t\t\tevening: \"Buenas noches\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, ¿en qué podemos ayudarte?`;\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: \"conversación más\",\n\t\t\tother: \"conversaciones más\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Soporte ${utils.titleCase(websiteName)}` : \"Soporte\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversación sin título\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Tú - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} está escribiendo...`,\n\t\"component.conversationButtonLink.status.open\": \"Abierta\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resuelta\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} asignó la conversación`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} retiró la asignación de la conversación`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} realizó una acción`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} se unió a la conversación`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} salió de la conversación`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} solicitó unirse`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió la prioridad`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reabrió la conversación`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolvió la conversación`,\n\t\"component.conversationButtonLink.status.closed\": \"Cerrada\",\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió el estado`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} agregó una etiqueta`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} quitó una etiqueta`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} bloqueó al visitante`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} desbloqueó al visitante`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Detalles de contacto confirmados\",\n\t\"component.identificationTool.title\": \"Comparte tu correo\",\n\t\"component.identificationTool.description\":\n\t\t\"Déjanos tu correo electrónico para que podamos continuar la conversación.\",\n\t\"component.identificationTool.cta\": \"Compartir correo\",\n\t\"component.identificationTool.loading\": \"Guardando...\",\n\t\"component.identificationTool.success\":\n\t\t\"¡Gracias! Usaremos este correo si necesitamos contactarte.\",\n\t\"component.identificationTool.error\":\n\t\t\"No pudimos guardar tu correo. Inténtalo de nuevo.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Ingresa un correo electrónico para continuar.\",\n\t\"component.identificationTool.inputPlaceholder\": \"tu@ejemplo.com\",\n\t\"component.identificationTool.inputLabel\": \"Correo electrónico\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"El visitante confirmó su correo electrónico\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Esta conversación está cerrada, inicia una nueva para hablar con nosotros\",\n\t\"component.multimodalInput.placeholder\": \"Escribe tu mensaje...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Artículos\",\n\t\"component.navigation.home\": \"Inicio\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agente IA\",\n};\n\nexport default es;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,YAAY,UAAU;CACvB,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;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EAOxD,MAAM,SALgD;GACrD,SAAS;GACT,WAAW;GACX,SAAS;GACT,CALc,MAAM,WAAW,CAMD;EAC/B,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAEzD,2BAA2B,EAAE,WAAW,YAAY;EACnD,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,MAAM,UAAU,O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;CACD,4CACC;CACD,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,YAAY,UAAU;CACvB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
1
+ {"version":3,"file":"es.js","names":["es: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/es.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst es: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Haznos una pregunta\",\n\t\"common.actions.attachFiles\": \"Adjuntar archivos\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Impulsado por\",\n\t\"common.fallbacks.aiAssistant\": \"Asistente de IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Alguien\",\n\t\"common.fallbacks.supportTeam\": \"Soporte\",\n\t\"common.fallbacks.unknown\": \"Desconocido\",\n\t\"common.fallbacks.you\": \"Tú\",\n\t\"common.labels.aiAgentIndicator\": \"Agente IA\",\n\t\"common.labels.supportOnline\": \"Soporte en línea\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} más`,\n\t\"page.conversationHistory.title\": \"Historial de conversaciones\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Buenos días\",\n\t\t\tafternoon: \"Buenas tardes\",\n\t\t\tevening: \"Buenas noches\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, ¿en qué podemos ayudarte?`;\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: \"conversación más\",\n\t\t\tother: \"conversaciones más\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Soporte ${utils.titleCase(websiteName)}` : \"Soporte\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversación sin título\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Tú - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} está escribiendo...`,\n\t\"component.conversationButtonLink.status.open\": \"Abierta\",\n\t\"component.conversationButtonLink.status.resolved\": \"Resuelta\",\n\t\"component.conversationButtonLink.status.spam\": \"Spam\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} asignó la conversación`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} retiró la asignación de la conversación`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} realizó una acción`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} se unió a la conversación`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} salió de la conversación`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} solicitó que un miembro del equipo se uniera`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió la prioridad`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} reabrió la conversación`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} resolvió la conversación`,\n\t\"component.conversationButtonLink.status.closed\": \"Cerrada\",\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} cambió el estado`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} agregó una etiqueta`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} quitó una etiqueta`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} bloqueó al visitante`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} desbloqueó al visitante`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Detalles de contacto confirmados\",\n\t\"component.identificationTool.title\": \"Comparte tu correo\",\n\t\"component.identificationTool.description\":\n\t\t\"Déjanos tu correo electrónico para que podamos continuar la conversación.\",\n\t\"component.identificationTool.cta\": \"Compartir correo\",\n\t\"component.identificationTool.loading\": \"Guardando...\",\n\t\"component.identificationTool.success\":\n\t\t\"¡Gracias! Usaremos este correo si necesitamos contactarte.\",\n\t\"component.identificationTool.error\":\n\t\t\"No pudimos guardar tu correo. Inténtalo de nuevo.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Ingresa un correo electrónico para continuar.\",\n\t\"component.identificationTool.inputPlaceholder\": \"tu@ejemplo.com\",\n\t\"component.identificationTool.inputLabel\": \"Correo electrónico\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"El visitante confirmó su correo electrónico\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Esta conversación está cerrada, inicia una nueva para hablar con nosotros\",\n\t\"component.multimodalInput.placeholder\": \"Escribe tu mensaje...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Eliminar ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Artículos\",\n\t\"component.navigation.home\": \"Inicio\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agente IA\",\n};\n\nexport default es;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;C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CACxB,qDAAqD,EAAE,gBACtD,GAAG,UAAU,UAAU;CACxB,gDAAgD,EAAE,gBACjD,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,kDAAkD;CAClD,8CAA8C,EAAE,gBAC/C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,+CAA+C,EAAE,gBAChD,GAAG,UAAU,UAAU;CACxB,iDAAiD,EAAE,gBAClD,GAAG,UAAU,UAAU;CACxB,uDACC;CACD,sCAAsC;CACtC,4CACC;CACD,oCAAoC;CACpC,wCAAwC;CACxC,wCACC;CACD,sCACC;CACD,2CACC;CACD,iDAAiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,YAAY,UAAU;CACvB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
@@ -48,7 +48,7 @@ const fr = {
48
48
  "component.conversationEvent.default": ({ variables }) => `${variables.actorName} a effectué une action`,
49
49
  "component.conversationEvent.participantJoined": ({ variables }) => `${variables.actorName} a rejoint la conversation`,
50
50
  "component.conversationEvent.participantLeft": ({ variables }) => `${variables.actorName} a quitté la conversation`,
51
- "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} a demandé à rejoindre`,
51
+ "component.conversationEvent.participantRequested": ({ variables }) => `${variables.actorName} a demandé à un membre de l'équipe de rejoindre`,
52
52
  "component.conversationEvent.priorityChanged": ({ variables }) => `${variables.actorName} a modifié la priorité`,
53
53
  "component.conversationEvent.reopened": ({ variables }) => `${variables.actorName} a rouvert la conversation`,
54
54
  "component.conversationEvent.resolved": ({ variables }) => `${variables.actorName} a résolu la conversation`,
@@ -1 +1 @@
1
- {"version":3,"file":"fr.js","names":["fr: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/fr.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst fr: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Posez-nous une question\",\n\t\"common.actions.attachFiles\": \"Joindre des fichiers\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Propulsé par\",\n\t\"common.fallbacks.aiAssistant\": \"Assistant IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Quelqu'un\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Inconnu\",\n\t\"common.fallbacks.you\": \"Vous\",\n\t\"common.labels.aiAgentIndicator\": \"Agent IA\",\n\t\"common.labels.supportOnline\": \"Support en ligne\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} de plus`,\n\t\"page.conversationHistory.title\": \"Historique des conversations\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Bonjour\",\n\t\t\tafternoon: \"Bon après-midi\",\n\t\t\tevening: \"Bonsoir\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, comment pouvons-nous vous aider ?`;\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 supplémentaire\",\n\t\t\tother: \"conversations supplémentaires\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Support ${utils.titleCase(websiteName)}` : \"Support\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversation sans titre\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Vous - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} est en train d'écrire...`,\n\t\"component.conversationButtonLink.status.open\": \"Ouverte\",\n\t\"component.conversationButtonLink.status.resolved\": \"Résolue\",\n\t\"component.conversationButtonLink.status.closed\": \"Fermée\",\n\t\"component.conversationButtonLink.status.spam\": \"Indésirable\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} a attribué la conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré l'attribution de la conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} a effectué une action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} a rejoint la conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} a quitté la conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} a demandé à rejoindre`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié la priorité`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} a rouvert la conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} a résolu la conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié le statut`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} a ajouté une étiquette`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré une étiquette`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} a bloqué le visiteur`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} a débloqué le visiteur`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Coordonnées confirmées\",\n\t\"component.identificationTool.title\": \"Partagez votre e-mail\",\n\t\"component.identificationTool.description\":\n\t\t\"Laissez-nous votre adresse e-mail afin que nous puissions vous recontacter.\",\n\t\"component.identificationTool.cta\": \"Partager l'e-mail\",\n\t\"component.identificationTool.loading\": \"Enregistrement...\",\n\t\"component.identificationTool.success\":\n\t\t\"Merci ! Nous utiliserons cette adresse si nous devons vous recontacter.\",\n\t\"component.identificationTool.error\":\n\t\t\"Impossible d'enregistrer votre e-mail. Veuillez réessayer.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Veuillez saisir une adresse e-mail pour continuer.\",\n\t\"component.identificationTool.inputPlaceholder\": \"vous@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Adresse e-mail\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Le visiteur a confirmé son adresse e-mail\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Cette conversation est close, commencez-en une nouvelle pour discuter avec nous\",\n\t\"component.multimodalInput.placeholder\": \"Écrivez votre message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Accueil\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agent IA\",\n};\n\nexport default fr;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,aAAa,UAAU;CACxB,0BAA0B;CAC1B,gCAAgC;CAChC,+BAA+B;CAC/B,4BAA4B;CAC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CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,8CAA8C,EAAE,gBAC/C,GAAG,UAAU,UAAU;CACxB,yCAAyC,EAAE,gBAC1C,GAAG,UAAU,UAAU;CACxB,2CAA2C,EAAE,gBAC5C,GAAG,UAAU,UAAU;CACxB,+CAA+C,EAAE,gBAChD,GAAG,UAAU,UAAU;CACxB,iDAAiD,EAAE,gBAClD,GAAG,UAAU,UAAU;CACxB,uDACC;CACD,sCAAsC;CACtC,4CACC;CACD,oCAAoC;CACpC,wCAAwC;CACxC,wCACC;CACD,sCACC;CACD,2CACC;CACD,iDAAiD;CACjD,2CAA2C;CAC3C,yCACC;CACD,4CACC;CACD,yCAAyC;CACzC,qCAAqC,EAAE,gBACtC,aAAa,UAAU;CACxB,iCAAiC;CACjC,6BAA6B;CAC7B,2CAA2C;CAC3C;AAED,iBAAe"}
1
+ {"version":3,"file":"fr.js","names":["fr: SupportLocaleMessages"],"sources":["../../../../src/support/text/locales/fr.tsx"],"sourcesContent":["import type { SupportLocaleMessages } from \"./keys\";\n\nconst fr: SupportLocaleMessages = {\n\t\"common.actions.askQuestion\": \"Posez-nous une question\",\n\t\"common.actions.attachFiles\": \"Joindre des fichiers\",\n\t\"common.actions.removeFile\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"common.brand.watermark\": \"Propulsé par\",\n\t\"common.fallbacks.aiAssistant\": \"Assistant IA\",\n\t\"common.fallbacks.cossistant\": \"Cossistant\",\n\t\"common.fallbacks.someone\": \"Quelqu'un\",\n\t\"common.fallbacks.supportTeam\": \"Support\",\n\t\"common.fallbacks.unknown\": \"Inconnu\",\n\t\"common.fallbacks.you\": \"Vous\",\n\t\"common.labels.aiAgentIndicator\": \"Agent IA\",\n\t\"common.labels.supportOnline\": \"Support en ligne\",\n\t\"page.conversationHistory.showMore\": ({ variables, utils }) =>\n\t\t`+${utils.formatNumber(variables.count)} de plus`,\n\t\"page.conversationHistory.title\": \"Historique des conversations\",\n\t\"page.home.greeting\": ({ variables, context, utils }) => {\n\t\tconst period = utils.timeOfDay();\n\t\tconst prefixes: Record<typeof period.token, string> = {\n\t\t\tmorning: \"Bonjour\",\n\t\t\tafternoon: \"Bon après-midi\",\n\t\t\tevening: \"Bonsoir\",\n\t\t};\n\t\tconst prefix = prefixes[period.token];\n\t\tconst visitorName =\n\t\t\tvariables?.visitorName || context.visitor?.contact?.name;\n\t\treturn `${prefix}${visitorName ? ` ${visitorName}` : \"\"}, comment pouvons-nous vous aider ?`;\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 supplémentaire\",\n\t\t\tother: \"conversations supplémentaires\",\n\t\t});\n\t\treturn `+ ${utils.formatNumber(count)} ${noun}`;\n\t},\n\t\"page.home.tagline\": ({ variables, context, utils }) => {\n\t\tconst websiteName = variables?.websiteName || context.website?.name || \"\";\n\t\treturn websiteName ? `Support ${utils.titleCase(websiteName)}` : \"Support\";\n\t},\n\t\"component.conversationButtonLink.fallbackTitle\": \"Conversation sans titre\",\n\t\"component.conversationButtonLink.lastMessage.agent\": ({ variables }) =>\n\t\t`${variables.name} - ${variables.time}`,\n\t\"component.conversationButtonLink.lastMessage.visitor\": ({ variables }) =>\n\t\t`Vous - ${variables.time}`,\n\t\"component.conversationButtonLink.typing\": ({ variables }) =>\n\t\t`${variables.name} est en train d'écrire...`,\n\t\"component.conversationButtonLink.status.open\": \"Ouverte\",\n\t\"component.conversationButtonLink.status.resolved\": \"Résolue\",\n\t\"component.conversationButtonLink.status.closed\": \"Fermée\",\n\t\"component.conversationButtonLink.status.spam\": \"Indésirable\",\n\t\"component.conversationEvent.assigned\": ({ variables }) =>\n\t\t`${variables.actorName} a attribué la conversation`,\n\t\"component.conversationEvent.unassigned\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré l'attribution de la conversation`,\n\t\"component.conversationEvent.default\": ({ variables }) =>\n\t\t`${variables.actorName} a effectué une action`,\n\t\"component.conversationEvent.participantJoined\": ({ variables }) =>\n\t\t`${variables.actorName} a rejoint la conversation`,\n\t\"component.conversationEvent.participantLeft\": ({ variables }) =>\n\t\t`${variables.actorName} a quitté la conversation`,\n\t\"component.conversationEvent.participantRequested\": ({ variables }) =>\n\t\t`${variables.actorName} a demandé à un membre de l'équipe de rejoindre`,\n\t\"component.conversationEvent.priorityChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié la priorité`,\n\t\"component.conversationEvent.reopened\": ({ variables }) =>\n\t\t`${variables.actorName} a rouvert la conversation`,\n\t\"component.conversationEvent.resolved\": ({ variables }) =>\n\t\t`${variables.actorName} a résolu la conversation`,\n\t\"component.conversationEvent.statusChanged\": ({ variables }) =>\n\t\t`${variables.actorName} a modifié le statut`,\n\t\"component.conversationEvent.tagAdded\": ({ variables }) =>\n\t\t`${variables.actorName} a ajouté une étiquette`,\n\t\"component.conversationEvent.tagRemoved\": ({ variables }) =>\n\t\t`${variables.actorName} a retiré une étiquette`,\n\t\"component.conversationEvent.visitorBlocked\": ({ variables }) =>\n\t\t`${variables.actorName} a bloqué le visiteur`,\n\t\"component.conversationEvent.visitorUnblocked\": ({ variables }) =>\n\t\t`${variables.actorName} a débloqué le visiteur`,\n\t\"component.conversationEvent.visitorIdentified\": () =>\n\t\t\"Coordonnées confirmées\",\n\t\"component.identificationTool.title\": \"Partagez votre e-mail\",\n\t\"component.identificationTool.description\":\n\t\t\"Laissez-nous votre adresse e-mail afin que nous puissions vous recontacter.\",\n\t\"component.identificationTool.cta\": \"Partager l'e-mail\",\n\t\"component.identificationTool.loading\": \"Enregistrement...\",\n\t\"component.identificationTool.success\":\n\t\t\"Merci ! Nous utiliserons cette adresse si nous devons vous recontacter.\",\n\t\"component.identificationTool.error\":\n\t\t\"Impossible d'enregistrer votre e-mail. Veuillez réessayer.\",\n\t\"component.identificationTool.validation\":\n\t\t\"Veuillez saisir une adresse e-mail pour continuer.\",\n\t\"component.identificationTool.inputPlaceholder\": \"vous@example.com\",\n\t\"component.identificationTool.inputLabel\": \"Adresse e-mail\",\n\t\"component.identificationTool.eventLog\":\n\t\t\"Le visiteur a confirmé son adresse e-mail\",\n\t\"component.conversationPage.closedMessage\":\n\t\t\"Cette conversation est close, commencez-en une nouvelle pour discuter avec nous\",\n\t\"component.multimodalInput.placeholder\": \"Écrivez votre message...\",\n\t\"component.multimodalInput.remove\": ({ variables }) =>\n\t\t`Supprimer ${variables.fileName}`,\n\t\"component.navigation.articles\": \"Articles\",\n\t\"component.navigation.home\": \"Accueil\",\n\t\"component.message.timestamp.aiIndicator\": \"• Agent IA\",\n};\n\nexport default fr;\n"],"mappings":";AAEA,MAAMA,KAA4B;CACjC,8BAA8B;CAC9B,8BAA8B;CAC9B,8BAA8B,EAAE,gBAC/B,aAAa,UAAU;CACxB,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;CAClC,uBAAuB,EAAE,WAAW,SAAS,YAAY;EAOxD,MAAM,SALgD;GACrD,SAAS;GACT,WAAW;GACX,SAAS;GACT,CALc,MAAM,WAAW,CAMD;EAC/B,MAAM,cACL,WAAW,eAAe,QAAQ,SAAS,SAAS;AACrD,SAAO,GAAG,SAAS,cAAc,IAAI,gBAAgB,GAAG;;CAEzD,2BAA2B,EAAE,WAAW,YAAY;EACnD,MAAM,QAAQ,UAAU;EACxB,MAAM,OAAO,MAAM,UAAU,OAAO;GACnC,KAAK;GACL,OAAO;GACP,CAAC;AACF,SAAO,KAAK,MAAM,aAAa,MAAM,CAAC,GAAG;;CAE1C,sBAAsB,EAAE,WAAW,SAAS,YAAY;EACvD,MAAM,cAAc,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 @@
1
- import { ClassValue } from "../../clsx.js";
1
+ import { ClassValue } from "../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/clsx.js";
2
2
 
3
3
  //#region src/support/utils/index.d.ts
4
4
 
package/support-config.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use client";
2
2
 
3
-
4
3
  import { useSupport } from "./provider.js";
5
4
  import * as React$1 from "react";
6
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"support-config.js","names":[],"sources":["../src/support-config.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DefaultMessage } from \"@cossistant/types\";\nimport * as React from \"react\";\nimport { useSupport } from \"./provider\";\n\nexport type SupportConfigProps = {\n\tdefaultMessages?: DefaultMessage[];\n\tquickOptions?: string[];\n};\n\n/**\n * Component exposed by Cossistant allowing you to change the support widget default messages and quick response whenever rendered.\n */\nexport const SupportConfig = ({\n\tdefaultMessages,\n\tquickOptions,\n}: SupportConfigProps): React.ReactElement | null => {\n\tconst { setDefaultMessages, setQuickOptions } = useSupport();\n\n\t// Only update when the arrays actually change content\n\tReact.useEffect(() => {\n\t\tif (defaultMessages) {\n\t\t\tsetDefaultMessages(defaultMessages);\n\t\t}\n\t}, [defaultMessages, setDefaultMessages]);\n\n\tReact.useEffect(() => {\n\t\tif (quickOptions) {\n\t\t\tsetQuickOptions(quickOptions);\n\t\t}\n\t}, [quickOptions, setQuickOptions]);\n\n\treturn null;\n};\n\nSupportConfig.displayName = \"SupportConfig\";\n"],"mappings":";;;;;;;;;;AAcA,MAAa,iBAAiB,EAC7B,iBACA,mBACoD;CACpD,MAAM,EAAE,oBAAoB,oBAAoB,YAAY;AAG5D,SAAM,gBAAgB;AACrB,MAAI,gBACH,oBAAmB,gBAAgB;IAElC,CAAC,iBAAiB,mBAAmB,CAAC;AAEzC,SAAM,gBAAgB;AACrB,MAAI,aACH,iBAAgB,aAAa;IAE5B,CAAC,cAAc,gBAAgB,CAAC;AAEnC,QAAO;;AAGR,cAAc,cAAc"}
1
+ {"version":3,"file":"support-config.js","names":[],"sources":["../src/support-config.tsx"],"sourcesContent":["\"use client\";\n\nimport type { DefaultMessage } from \"@cossistant/types\";\nimport * as React from \"react\";\nimport { useSupport } from \"./provider\";\n\nexport type SupportConfigProps = {\n\tdefaultMessages?: DefaultMessage[];\n\tquickOptions?: string[];\n};\n\n/**\n * Component exposed by Cossistant allowing you to change the support widget default messages and quick response whenever rendered.\n */\nexport const SupportConfig = ({\n\tdefaultMessages,\n\tquickOptions,\n}: SupportConfigProps): React.ReactElement | null => {\n\tconst { setDefaultMessages, setQuickOptions } = useSupport();\n\n\t// Only update when the arrays actually change content\n\tReact.useEffect(() => {\n\t\tif (defaultMessages) {\n\t\t\tsetDefaultMessages(defaultMessages);\n\t\t}\n\t}, [defaultMessages, setDefaultMessages]);\n\n\tReact.useEffect(() => {\n\t\tif (quickOptions) {\n\t\t\tsetQuickOptions(quickOptions);\n\t\t}\n\t}, [quickOptions, setQuickOptions]);\n\n\treturn null;\n};\n\nSupportConfig.displayName = \"SupportConfig\";\n"],"mappings":";;;;;;;;;AAcA,MAAa,iBAAiB,EAC7B,iBACA,mBACoD;CACpD,MAAM,EAAE,oBAAoB,oBAAoB,YAAY;AAG5D,SAAM,gBAAgB;AACrB,MAAI,gBACH,oBAAmB,gBAAgB;IAElC,CAAC,iBAAiB,mBAAmB,CAAC;AAEzC,SAAM,gBAAgB;AACrB,MAAI,aACH,iBAAgB,aAAa;IAE5B,CAAC,cAAc,gBAAgB,CAAC;AAEnC,QAAO;;AAGR,cAAc,cAAc"}
package/support.css CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */
2
- @layer base{.cossistant{color:var(--co-primary);color-scheme:normal;--co-font-sans:var(--co-theme-font-sans,"Geist","Inter",sans-serif);--co-font-mono:var(--co-theme-font-mono,"Geist Mono","Inter Mono",monospace);--co-radius:var(--co-theme-radius,.625rem);--co-background-base:var(--co-theme-background,oklch(99% 0 0));--co-foreground-base:var(--co-theme-foreground,oklch(20.5% 0 0));--co-popover-base:var(--co-theme-popover,var(--co-background-base));--co-popover-foreground-base:var(--co-theme-popover-foreground,var(--co-foreground-base));--co-primary-base:var(--co-theme-primary,oklch(14.5% 0 0));--co-primary-foreground-base:var(--co-theme-primary-foreground,oklch(98.5% 0 0));--co-secondary-base:var(--co-theme-secondary,oklch(97% 0 0));--co-secondary-foreground-base:var(--co-theme-secondary-foreground,oklch(14.5% 0 0));--co-border-base:var(--co-theme-border,oklch(92.2% 0 0));--co-input-base:var(--co-theme-input,oklch(92.2% 0 0));--co-ring-base:var(--co-theme-ring,var(--co-primary-base));--co-accent-base:var(--co-theme-accent,var(--co-primary-base));--co-accent-foreground-base:var(--co-theme-accent-foreground,var(--co-primary-foreground-base));--co-background-50-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-50-mix:color-mix(in oklch,var(--co-background-base)98%,var(--co-foreground-base))}}.cossistant{--co-background-100-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-100-mix:color-mix(in oklch,var(--co-background-base)97%,var(--co-foreground-base))}}.cossistant{--co-background-200-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-200-mix:color-mix(in oklch,var(--co-background-base)96%,var(--co-foreground-base))}}.cossistant{--co-background-300-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-300-mix:color-mix(in oklch,var(--co-background-base)95%,var(--co-foreground-base))}}.cossistant{--co-background-400-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-400-mix:color-mix(in oklch,var(--co-background-base)94%,var(--co-foreground-base))}}.cossistant{--co-background-500-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-500-mix:color-mix(in oklch,var(--co-background-base)93%,var(--co-foreground-base))}}.cossistant{--co-background-600-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-600-mix:color-mix(in oklch,var(--co-background-base)92%,var(--co-foreground-base))}}.cossistant{--co-muted-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-muted-mix:color-mix(in oklch,var(--co-background-base)85%,var(--co-foreground-base))}}.cossistant{--co-muted-foreground-mix:var(--co-foreground-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-muted-foreground-mix:color-mix(in oklch,var(--co-foreground-base)70%,white)}}.cossistant{--co-background:var(--co-background-base);--co-background-50:var(--co-theme-background-50,var(--co-background-50-mix,oklch(92% 0 0)));--co-background-100:var(--co-theme-background-100,var(--co-background-100-mix,oklch(93% 0 0)));--co-background-200:var(--co-theme-background-200,var(--co-background-200-mix,oklch(94% 0 0)));--co-background-300:var(--co-theme-background-300,var(--co-background-300-mix,oklch(95% 0 0)));--co-background-400:var(--co-theme-background-400,var(--co-background-400-mix,oklch(96% 0 0)));--co-background-500:var(--co-theme-background-500,var(--co-background-500-mix,oklch(97% 0 0)));--co-background-600:var(--co-theme-background-600,var(--co-background-600-mix,oklch(98% 0 0)));--co-foreground:var(--co-foreground-base);--co-popover:var(--co-popover-base);--co-popover-foreground:var(--co-popover-foreground-base);--co-primary:var(--co-primary-base);--co-primary-foreground:var(--co-primary-foreground-base);--co-secondary:var(--co-secondary-base);--co-secondary-foreground:var(--co-secondary-foreground-base);--co-muted:var(--co-theme-muted,var(--co-muted-mix,oklch(97% 0 0)));--co-muted-foreground:var(--co-theme-muted-foreground,var(--co-muted-foreground-mix,oklch(55.6% 0 0)));--co-border:var(--co-border-base);--co-input:var(--co-input-base);--co-ring:var(--co-ring-base);--co-accent:var(--co-accent-base);--co-accent-foreground:var(--co-accent-foreground-base);--co-pink:var(--co-theme-pink,oklch(76.3% .152 354));--co-yellow:var(--co-theme-yellow,oklch(86.4% .144 99));--co-blue:var(--co-theme-blue,oklch(72.5% .132 241));--co-orange:var(--co-theme-orange,oklch(74.5% .166 50));--co-destructive:var(--co-theme-destructive,oklch(57.7% .245 27.325));--co-destructive-foreground:var(--co-theme-destructive-foreground,oklch(57.7% .245 27.325));--co-success:var(--co-theme-success,oklch(71.7% .18 142));--co-success-foreground:var(--co-theme-success-foreground,oklch(26.5% .052 142.7));--co-neutral:var(--co-theme-neutral,oklch(60.8% 0 0));--co-neutral-foreground:var(--co-theme-neutral-foreground,oklch(25.6% 0 0));--co-warning:var(--co-theme-warning,oklch(86.4% .144 99));--co-warning-foreground:var(--co-theme-warning-foreground,oklch(41.4% .071 99))}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-base:var(--co-theme-background,oklch(15.5% 0 0));--co-foreground-base:var(--co-theme-foreground,oklch(95% 0 0));--co-popover-base:var(--co-theme-popover,oklch(14.5% 0 0));--co-popover-foreground-base:var(--co-theme-popover-foreground,oklch(95% 0 0));--co-primary-base:var(--co-theme-primary,oklch(98.5% 0 0));--co-primary-foreground-base:var(--co-theme-primary-foreground,oklch(14.5% 0 0));--co-secondary-base:var(--co-theme-secondary,oklch(26.9% 0 0));--co-secondary-foreground-base:var(--co-theme-secondary-foreground,oklch(95% 0 0));--co-border-base:var(--co-theme-border,oklch(26.9% 0 0));--co-input-base:var(--co-theme-input,oklch(26.9% 0 0));--co-ring-base:var(--co-theme-ring,var(--co-primary-base));--co-accent-base:var(--co-theme-accent,var(--co-primary-base));--co-accent-foreground-base:var(--co-theme-accent-foreground,var(--co-primary-foreground-base));--co-muted-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-mix:color-mix(in oklch,var(--co-background-base)55%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-foreground-mix:var(--co-foreground-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-foreground-mix:color-mix(in oklch,var(--co-foreground-base)65%,white)}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-50-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-50-mix:color-mix(in oklch,var(--co-background-base)98%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-100-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-100-mix:color-mix(in oklch,var(--co-background-base)96%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-200-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-200-mix:color-mix(in oklch,var(--co-background-base)94%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-300-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-300-mix:color-mix(in oklch,var(--co-background-base)92%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-400-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-400-mix:color-mix(in oklch,var(--co-background-base)90%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-500-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-500-mix:color-mix(in oklch,var(--co-background-base)88%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-600-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-600-mix:color-mix(in oklch,var(--co-background-base)86%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-pink:var(--co-theme-pink,oklch(84.2% .109 354));--co-yellow:var(--co-theme-yellow,oklch(90.3% .111 99));--co-blue:var(--co-theme-blue,oklch(79.8% .089 241));--co-orange:var(--co-theme-orange,oklch(68.2% .194 50));--co-destructive:var(--co-theme-destructive,oklch(39.6% .141 25.723));--co-destructive-foreground:var(--co-theme-destructive-foreground,oklch(63.7% .237 25.331));--co-success:var(--co-theme-success,oklch(60% .15 142));--co-success-foreground:var(--co-theme-success-foreground,oklch(85% .12 142));--co-neutral:var(--co-theme-neutral,oklch(50% 0 0));--co-neutral-foreground:var(--co-theme-neutral-foreground,oklch(85% 0 0));--co-warning:var(--co-theme-warning,oklch(90.3% .111 99));--co-warning-foreground:var(--co-theme-warning-foreground,oklch(85% .1 99))}}@layer utilities{.cossistant .co-scrollbar-thin{scrollbar-width:thin;scrollbar-color:oklch(from var(--co-primary)l c h/.3)transparent}.cossistant .co-scrollbar-thin::-webkit-scrollbar{width:8px;height:8px}.cossistant .co-scrollbar-thin::-webkit-scrollbar-track{background:0 0}.cossistant .co-scrollbar-thin::-webkit-scrollbar-thumb{background-color:oklch(from var(--co-primary)l c h/.3);border-radius:4px}.cossistant .co-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:oklch(from var(--co-primary)l c h/.5)}.cossistant .animation-delay-0{animation-delay:0s}.cossistant .animation-delay-200{animation-delay:.2s}.cossistant .animation-delay-400{animation-delay:.4s}.cossistant .dot-bounce-1{animation:1.4s infinite bounce-dot}.cossistant .dot-bounce-2{animation:1.4s .16s infinite bounce-dot}.cossistant .dot-bounce-3{animation:1.4s .32s infinite bounce-dot}}
2
+ @layer base{.cossistant{color:var(--co-primary);color-scheme:normal;--co-font-sans:var(--co-theme-font-sans,"Geist","Inter",sans-serif);--co-font-mono:var(--co-theme-font-mono,"Geist Mono","Inter Mono",monospace);--co-radius:var(--co-theme-radius,.375rem);--co-background-base:var(--co-theme-background,oklch(99% 0 0));--co-foreground-base:var(--co-theme-foreground,oklch(20.5% 0 0));--co-popover-base:var(--co-theme-popover,var(--co-background-base));--co-popover-foreground-base:var(--co-theme-popover-foreground,var(--co-foreground-base));--co-primary-base:var(--co-theme-primary,oklch(14.5% 0 0));--co-primary-foreground-base:var(--co-theme-primary-foreground,oklch(98.5% 0 0));--co-secondary-base:var(--co-theme-secondary,oklch(97% 0 0));--co-secondary-foreground-base:var(--co-theme-secondary-foreground,oklch(14.5% 0 0));--co-border-base:var(--co-theme-border,oklch(92.2% 0 0));--co-input-base:var(--co-theme-input,oklch(92.2% 0 0));--co-ring-base:var(--co-theme-ring,var(--co-primary-base));--co-accent-base:var(--co-theme-accent,var(--co-primary-base));--co-accent-foreground-base:var(--co-theme-accent-foreground,var(--co-primary-foreground-base));--co-background-50-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-50-mix:color-mix(in oklch,var(--co-background-base)98%,var(--co-foreground-base))}}.cossistant{--co-background-100-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-100-mix:color-mix(in oklch,var(--co-background-base)97%,var(--co-foreground-base))}}.cossistant{--co-background-200-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-200-mix:color-mix(in oklch,var(--co-background-base)96%,var(--co-foreground-base))}}.cossistant{--co-background-300-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-300-mix:color-mix(in oklch,var(--co-background-base)95%,var(--co-foreground-base))}}.cossistant{--co-background-400-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-400-mix:color-mix(in oklch,var(--co-background-base)94%,var(--co-foreground-base))}}.cossistant{--co-background-500-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-500-mix:color-mix(in oklch,var(--co-background-base)93%,var(--co-foreground-base))}}.cossistant{--co-background-600-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-background-600-mix:color-mix(in oklch,var(--co-background-base)92%,var(--co-foreground-base))}}.cossistant{--co-muted-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-muted-mix:color-mix(in oklch,var(--co-background-base)85%,var(--co-foreground-base))}}.cossistant{--co-muted-foreground-mix:var(--co-foreground-base)}@supports (color:color-mix(in lab, red, red)){.cossistant{--co-muted-foreground-mix:color-mix(in oklch,var(--co-foreground-base)70%,white)}}.cossistant{--co-background:var(--co-background-base);--co-background-50:var(--co-theme-background-50,var(--co-background-50-mix,oklch(92% 0 0)));--co-background-100:var(--co-theme-background-100,var(--co-background-100-mix,oklch(93% 0 0)));--co-background-200:var(--co-theme-background-200,var(--co-background-200-mix,oklch(94% 0 0)));--co-background-300:var(--co-theme-background-300,var(--co-background-300-mix,oklch(95% 0 0)));--co-background-400:var(--co-theme-background-400,var(--co-background-400-mix,oklch(96% 0 0)));--co-background-500:var(--co-theme-background-500,var(--co-background-500-mix,oklch(97% 0 0)));--co-background-600:var(--co-theme-background-600,var(--co-background-600-mix,oklch(98% 0 0)));--co-foreground:var(--co-foreground-base);--co-popover:var(--co-popover-base);--co-popover-foreground:var(--co-popover-foreground-base);--co-primary:var(--co-primary-base);--co-primary-foreground:var(--co-primary-foreground-base);--co-secondary:var(--co-secondary-base);--co-secondary-foreground:var(--co-secondary-foreground-base);--co-muted:var(--co-theme-muted,var(--co-muted-mix,oklch(97% 0 0)));--co-muted-foreground:var(--co-theme-muted-foreground,var(--co-muted-foreground-mix,oklch(55.6% 0 0)));--co-border:var(--co-border-base);--co-input:var(--co-input-base);--co-ring:var(--co-ring-base);--co-accent:var(--co-accent-base);--co-accent-foreground:var(--co-accent-foreground-base);--co-pink:var(--co-theme-pink,oklch(76.3% .152 354));--co-yellow:var(--co-theme-yellow,oklch(86.4% .144 99));--co-blue:var(--co-theme-blue,oklch(72.5% .132 241));--co-orange:var(--co-theme-orange,oklch(74.5% .166 50));--co-destructive:var(--co-theme-destructive,oklch(57.7% .245 27.325));--co-destructive-foreground:var(--co-theme-destructive-foreground,oklch(57.7% .245 27.325));--co-success:var(--co-theme-success,oklch(71.7% .18 142));--co-success-foreground:var(--co-theme-success-foreground,oklch(26.5% .052 142.7));--co-neutral:var(--co-theme-neutral,oklch(60.8% 0 0));--co-neutral-foreground:var(--co-theme-neutral-foreground,oklch(25.6% 0 0));--co-warning:var(--co-theme-warning,oklch(86.4% .144 99));--co-warning-foreground:var(--co-theme-warning-foreground,oklch(41.4% .071 99))}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-base:var(--co-theme-background,oklch(15.5% 0 0));--co-foreground-base:var(--co-theme-foreground,oklch(95% 0 0));--co-popover-base:var(--co-theme-popover,oklch(14.5% 0 0));--co-popover-foreground-base:var(--co-theme-popover-foreground,oklch(95% 0 0));--co-primary-base:var(--co-theme-primary,oklch(98.5% 0 0));--co-primary-foreground-base:var(--co-theme-primary-foreground,oklch(14.5% 0 0));--co-secondary-base:var(--co-theme-secondary,oklch(26.9% 0 0));--co-secondary-foreground-base:var(--co-theme-secondary-foreground,oklch(95% 0 0));--co-border-base:var(--co-theme-border,oklch(26.9% 0 0));--co-input-base:var(--co-theme-input,oklch(26.9% 0 0));--co-ring-base:var(--co-theme-ring,var(--co-primary-base));--co-accent-base:var(--co-theme-accent,var(--co-primary-base));--co-accent-foreground-base:var(--co-theme-accent-foreground,var(--co-primary-foreground-base));--co-muted-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-mix:color-mix(in oklch,var(--co-background-base)55%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-foreground-mix:var(--co-foreground-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-muted-foreground-mix:color-mix(in oklch,var(--co-foreground-base)65%,white)}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-50-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-50-mix:color-mix(in oklch,var(--co-background-base)98%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-100-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-100-mix:color-mix(in oklch,var(--co-background-base)96%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-200-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-200-mix:color-mix(in oklch,var(--co-background-base)94%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-300-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-300-mix:color-mix(in oklch,var(--co-background-base)92%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-400-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-400-mix:color-mix(in oklch,var(--co-background-base)90%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-500-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-500-mix:color-mix(in oklch,var(--co-background-base)88%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-600-mix:var(--co-background-base)}@supports (color:color-mix(in lab, red, red)){.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-background-600-mix:color-mix(in oklch,var(--co-background-base)86%,var(--co-foreground-base))}}.dark .cossistant,.cossistant[data-color-scheme=dark]{--co-pink:var(--co-theme-pink,oklch(84.2% .109 354));--co-yellow:var(--co-theme-yellow,oklch(90.3% .111 99));--co-blue:var(--co-theme-blue,oklch(79.8% .089 241));--co-orange:var(--co-theme-orange,oklch(68.2% .194 50));--co-destructive:var(--co-theme-destructive,oklch(39.6% .141 25.723));--co-destructive-foreground:var(--co-theme-destructive-foreground,oklch(63.7% .237 25.331));--co-success:var(--co-theme-success,oklch(60% .15 142));--co-success-foreground:var(--co-theme-success-foreground,oklch(85% .12 142));--co-neutral:var(--co-theme-neutral,oklch(50% 0 0));--co-neutral-foreground:var(--co-theme-neutral-foreground,oklch(85% 0 0));--co-warning:var(--co-theme-warning,oklch(90.3% .111 99));--co-warning-foreground:var(--co-theme-warning-foreground,oklch(85% .1 99))}}@layer utilities{.cossistant .co-scrollbar-thin{scrollbar-width:thin;scrollbar-color:oklch(from var(--co-primary)l c h/.3)transparent}.cossistant .co-scrollbar-thin::-webkit-scrollbar{width:8px;height:8px}.cossistant .co-scrollbar-thin::-webkit-scrollbar-track{background:0 0}.cossistant .co-scrollbar-thin::-webkit-scrollbar-thumb{background-color:oklch(from var(--co-primary)l c h/.3);border-radius:4px}.cossistant .co-scrollbar-thin::-webkit-scrollbar-thumb:hover{background-color:oklch(from var(--co-primary)l c h/.5)}.cossistant .animation-delay-0{animation-delay:0s}.cossistant .animation-delay-200{animation-delay:.2s}.cossistant .animation-delay-400{animation-delay:.4s}.cossistant .dot-bounce-1{animation:1.4s infinite bounce-dot}.cossistant .dot-bounce-2{animation:1.4s .16s infinite bounce-dot}.cossistant .dot-bounce-3{animation:1.4s .32s infinite bounce-dot}}
package/tailwind.css CHANGED
@@ -21,7 +21,7 @@
21
21
  );
22
22
 
23
23
  /* Core surfaces */
24
- --co-radius: var(--co-theme-radius, 0.625rem);
24
+ --co-radius: var(--co-theme-radius, 0.375rem);
25
25
  --co-background-base: var(--co-theme-background, oklch(99% 0 0));
26
26
  --co-foreground-base: var(--co-theme-foreground, oklch(20.5% 0 0));
27
27
  --co-popover-base: var(--co-theme-popover, var(--co-background-base));
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/utils/conversation.ts"],"sourcesContent":[],"mappings":";;;iBAmBgB,yBAAA,eAAwC"}
1
+ {"version":3,"file":"conversation.d.ts","names":[],"sources":["../../src/utils/conversation.ts"],"sourcesContent":[],"mappings":";;;iBAgBgB,yBAAA,eAAwC"}
@@ -1,7 +1,5 @@
1
- import { ConversationStatus } from "@cossistant/types";
2
-
3
1
  //#region src/utils/conversation.ts
4
- const HIDDEN_STATUSES = new Set([ConversationStatus.RESOLVED, "closed"]);
2
+ const HIDDEN_STATUSES = new Set(["closed"]);
5
3
  function hasDisplayableTitle(conversation) {
6
4
  const title = conversation.title?.trim();
7
5
  if (title && title.length > 0) return true;
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.js","names":[],"sources":["../../src/utils/conversation.ts"],"sourcesContent":["import { type Conversation, ConversationStatus } from \"@cossistant/types\";\n\nconst HIDDEN_STATUSES = new Set<ConversationStatus | \"closed\">([\n\tConversationStatus.RESOLVED,\n\t\"closed\",\n]);\n\nfunction hasDisplayableTitle(conversation: Conversation): boolean {\n\tconst title = conversation.title?.trim();\n\n\tif (title && title.length > 0) {\n\t\treturn true;\n\t}\n\n\t// Allow conversations with messages even if no explicit title\n\tconst lastMessageText = conversation.lastTimelineItem?.text?.trim();\n\treturn Boolean(lastMessageText && lastMessageText.length > 0);\n}\n\nexport function shouldDisplayConversation(conversation: Conversation): boolean {\n\tif (!hasDisplayableTitle(conversation)) {\n\t\treturn false;\n\t}\n\n\tif (conversation.deletedAt) {\n\t\treturn false;\n\t}\n\n\tif (HIDDEN_STATUSES.has(conversation.status)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n"],"mappings":";;;AAEA,MAAM,kBAAkB,IAAI,IAAmC,CAC9D,mBAAmB,UACnB,SACA,CAAC;AAEF,SAAS,oBAAoB,cAAqC;CACjE,MAAM,QAAQ,aAAa,OAAO,MAAM;AAExC,KAAI,SAAS,MAAM,SAAS,EAC3B,QAAO;CAIR,MAAM,kBAAkB,aAAa,kBAAkB,MAAM,MAAM;AACnE,QAAO,QAAQ,mBAAmB,gBAAgB,SAAS,EAAE;;AAG9D,SAAgB,0BAA0B,cAAqC;AAC9E,KAAI,CAAC,oBAAoB,aAAa,CACrC,QAAO;AAGR,KAAI,aAAa,UAChB,QAAO;AAGR,KAAI,gBAAgB,IAAI,aAAa,OAAO,CAC3C,QAAO;AAGR,QAAO"}
1
+ {"version":3,"file":"conversation.js","names":[],"sources":["../../src/utils/conversation.ts"],"sourcesContent":["import type { Conversation, ConversationStatus } from \"@cossistant/types\";\n\nconst HIDDEN_STATUSES = new Set<ConversationStatus | \"closed\">([\"closed\"]);\n\nfunction hasDisplayableTitle(conversation: Conversation): boolean {\n\tconst title = conversation.title?.trim();\n\n\tif (title && title.length > 0) {\n\t\treturn true;\n\t}\n\n\t// Allow conversations with messages even if no explicit title\n\tconst lastMessageText = conversation.lastTimelineItem?.text?.trim();\n\treturn Boolean(lastMessageText && lastMessageText.length > 0);\n}\n\nexport function shouldDisplayConversation(conversation: Conversation): boolean {\n\tif (!hasDisplayableTitle(conversation)) {\n\t\treturn false;\n\t}\n\n\tif (conversation.deletedAt) {\n\t\treturn false;\n\t}\n\n\tif (HIDDEN_STATUSES.has(conversation.status)) {\n\t\treturn false;\n\t}\n\n\treturn true;\n}\n"],"mappings":";AAEA,MAAM,kBAAkB,IAAI,IAAmC,CAAC,SAAS,CAAC;AAE1E,SAAS,oBAAoB,cAAqC;CACjE,MAAM,QAAQ,aAAa,OAAO,MAAM;AAExC,KAAI,SAAS,MAAM,SAAS,EAC3B,QAAO;CAIR,MAAM,kBAAkB,aAAa,kBAAkB,MAAM,MAAM;AACnE,QAAO,QAAQ,mBAAmB,gBAAgB,SAAS,EAAE;;AAG9D,SAAgB,0BAA0B,cAAqC;AAC9E,KAAI,CAAC,oBAAoB,aAAa,CACrC,QAAO;AAGR,KAAI,aAAa,UAChB,QAAO;AAGR,KAAI,gBAAgB,IAAI,aAAa,OAAO,CAC3C,QAAO;AAGR,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"use-render-element.d.ts","names":[],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":[],"mappings":";;;;AAI+B,KAG1B,YAA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
7
+ * Gets the ref from a React element in a way that's compatible with both React 18 and React 19.
8
+ *
9
+ * - Before React 19: accessing `element.props.ref` throws a warning, use `element.ref`
10
+ * - After React 19: accessing `element.ref` throws a warning, use `element.props.ref`
11
+ *
12
+ * This function detects which version of React is being used by checking for the
13
+ * `isReactWarning` property descriptor that React adds in DEV mode.
14
+ *
15
+ * @see https://github.com/radix-ui/primitives/pull/2811
16
+ */
17
+ function getElementRef(element) {
18
+ const getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
19
+ if (getter && "isReactWarning" in getter && getter.isReactWarning) return element.ref;
20
+ return element.props.ref ?? element.ref;
21
+ }
22
+ /**
7
23
  * Slot component that properly forwards refs when using asChild pattern.
8
24
  * Uses forwardRef to receive the ref and merges it with any existing ref on the child.
9
25
  */
10
- const Slot = React$1.forwardRef(({ children,...props }, forwardedRef) => {
11
- const childRef = children.ref;
12
- const mergedRef = mergeRefs([forwardedRef, childRef]);
26
+ const Slot = React$1.forwardRef(({ children, ...props }, forwardedRef) => {
27
+ const mergedRef = mergeRefs([forwardedRef, getElementRef(children)]);
13
28
  return React$1.cloneElement(children, {
14
29
  ...props,
15
30
  ref: mergedRef,
@@ -33,10 +48,10 @@ function useRenderElement(tag, componentProps, params) {
33
48
  if (typeof render === "function") return render(mergedProps, state);
34
49
  if (React$1.isValidElement(render)) return React$1.cloneElement(render, {
35
50
  ...mergedProps,
36
- ref: render.ref || ref
51
+ ref: getElementRef(render) || ref
37
52
  });
38
53
  if (asChild && React$1.isValidElement(propsWithClassName.children)) {
39
- const { ref: slotRef,...restMergedProps } = mergedProps;
54
+ const { ref: slotRef, ...restMergedProps } = mergedProps;
40
55
  return /* @__PURE__ */ jsx(Slot, {
41
56
  ref: slotRef,
42
57
  ...restMergedProps,
@@ -1 +1 @@
1
- {"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\nimport { mergeRefs } from \"./merge-refs\";\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\ntype SlotProps = {\n\tchildren: React.ReactElement;\n\t[key: string]: any;\n};\n\n/**\n * Slot component that properly forwards refs when using asChild pattern.\n * Uses forwardRef to receive the ref and merges it with any existing ref on the child.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\n\t({ children, ...props }, forwardedRef) => {\n\t\t// Get the child's existing ref (if any)\n\t\tconst childRef = (children as any).ref;\n\n\t\t// Merge the forwarded ref with the child's ref\n\t\tconst mergedRef = mergeRefs([forwardedRef, childRef]);\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...props,\n\t\t\tref: mergedRef,\n\t\t\tclassName: [(children.props as any).className, props.className]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\" \"),\n\t\t} as any);\n\t}\n);\n\n/**\n * Utility hook to support slot-style component overrides.\n */\nexport function useRenderElement<\n\tState extends Record<string, any>,\n\tTag extends IntrinsicTag,\n>(\n\ttag: Tag,\n\tcomponentProps: RenderProps<State, Tag>,\n\tparams?: RenderParams<State, Tag>\n): React.ReactElement | null {\n\tconst { render, className: classNameProp, asChild = false } = componentProps;\n\n\tconst {\n\t\tstate = {} as State,\n\t\tref,\n\t\tprops = {} as Partial<JSX.IntrinsicElements[Tag]>,\n\t\tenabled = true,\n\t} = params || {};\n\n\tif (!enabled) {\n\t\treturn null;\n\t}\n\n\tconst computedClassName =\n\t\ttypeof classNameProp === \"function\" ? classNameProp(state) : classNameProp;\n\n\tconst propsWithClassName = props as {\n\t\tclassName?: string;\n\t\tchildren?: React.ReactNode;\n\t};\n\tconst mergedProps = {\n\t\t...props,\n\t\tclassName: [propsWithClassName.className, computedClassName]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \"),\n\t\tref,\n\t};\n\n\tif (typeof render === \"function\") {\n\t\treturn render(mergedProps as JSX.IntrinsicElements[Tag], state);\n\t}\n\n\tif (React.isValidElement(render)) {\n\t\treturn React.cloneElement(render, {\n\t\t\t...mergedProps,\n\t\t\tref: (render as any).ref || ref,\n\t\t});\n\t}\n\n\tif (asChild && React.isValidElement(propsWithClassName.children)) {\n\t\t// Extract ref to pass explicitly to the forwardRef Slot component\n\t\t// React extracts ref from spread props, so we must pass it separately\n\t\tconst { ref: slotRef, ...restMergedProps } = mergedProps;\n\t\treturn (\n\t\t\t<Slot ref={slotRef} {...restMergedProps}>\n\t\t\t\t{propsWithClassName.children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn React.createElement(tag, mergedProps as any);\n}\n"],"mappings":";;;;;;;;;AAsCA,MAAM,OAAOA,QAAM,YACjB,EAAE,SAAU,GAAG,SAAS,iBAAiB;CAEzC,MAAM,WAAY,SAAiB;CAGnC,MAAM,YAAY,UAAU,CAAC,cAAc,SAAS,CAAC;AAErD,QAAOA,QAAM,aAAa,UAAU;EACnC,GAAG;EACH,KAAK;EACL,WAAW,CAAE,SAAS,MAAc,WAAW,MAAM,UAAU,CAC7D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX,CAAQ;EAEV;;;;AAKD,SAAgB,iBAIf,KACA,gBACA,QAC4B;CAC5B,MAAM,EAAE,QAAQ,WAAW,eAAe,UAAU,UAAU;CAE9D,MAAM,EACL,QAAQ,EAAE,EACV,KACA,QAAQ,EAAE,EACV,UAAU,SACP,UAAU,EAAE;AAEhB,KAAI,CAAC,QACJ,QAAO;CAGR,MAAM,oBACL,OAAO,kBAAkB,aAAa,cAAc,MAAM,GAAG;CAE9D,MAAM,qBAAqB;CAI3B,MAAM,cAAc;EACnB,GAAG;EACH,WAAW,CAAC,mBAAmB,WAAW,kBAAkB,CAC1D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX;EACA;AAED,KAAI,OAAO,WAAW,WACrB,QAAO,OAAO,aAA2C,MAAM;AAGhE,KAAIA,QAAM,eAAe,OAAO,CAC/B,QAAOA,QAAM,aAAa,QAAQ;EACjC,GAAG;EACH,KAAM,OAAe,OAAO;EAC5B,CAAC;AAGH,KAAI,WAAWA,QAAM,eAAe,mBAAmB,SAAS,EAAE;EAGjE,MAAM,EAAE,KAAK,QAAS,GAAG,oBAAoB;AAC7C,SACC,oBAAC;GAAK,KAAK;GAAS,GAAI;aACtB,mBAAmB;IACd;;AAIT,QAAOA,QAAM,cAAc,KAAK,YAAmB"}
1
+ {"version":3,"file":"use-render-element.js","names":["React"],"sources":["../../src/utils/use-render-element.tsx"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noExplicitAny: works well here */\n/** biome-ignore-all lint/nursery/noUnnecessaryConditions: ok */\n\nimport type { JSX } from \"react\";\nimport * as React from \"react\";\nimport { mergeRefs } from \"./merge-refs\";\n\n/**\n * Gets the ref from a React element in a way that's compatible with both React 18 and React 19.\n *\n * - Before React 19: accessing `element.props.ref` throws a warning, use `element.ref`\n * - After React 19: accessing `element.ref` throws a warning, use `element.props.ref`\n *\n * This function detects which version of React is being used by checking for the\n * `isReactWarning` property descriptor that React adds in DEV mode.\n *\n * @see https://github.com/radix-ui/primitives/pull/2811\n */\nfunction getElementRef(element: React.ReactElement): React.Ref<unknown> | null {\n\t// React 18 in DEV mode will throw a warning when accessing `element.props.ref`\n\t// and suggest using `element.ref` instead.\n\t// We detect this by checking for the `isReactWarning` getter on `props.ref`.\n\tconst getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n\tconst mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n\n\tif (mayWarn) {\n\t\t// React 18: use element.ref\n\t\treturn (element as any).ref;\n\t}\n\n\t// React 19 or production: prefer props.ref, fallback to element.ref for older versions\n\treturn (element.props as any).ref ?? (element as any).ref;\n}\n\ntype IntrinsicTag = keyof JSX.IntrinsicElements;\n\ntype ClassName<State> = string | ((state: State) => string);\n\ntype RenderFn<Props, State> = (\n\tprops: Props,\n\tstate: State\n) => React.ReactElement;\n\ntype RenderProps<State, Tag extends IntrinsicTag> = {\n\trender?: React.ReactElement | RenderFn<JSX.IntrinsicElements[Tag], State>;\n\tclassName?: ClassName<State>;\n\tasChild?: boolean;\n};\n\ntype RenderParams<State, Tag extends IntrinsicTag> = {\n\tstate?: State;\n\tref?: React.Ref<any>;\n\tprops?: Partial<JSX.IntrinsicElements[Tag]>;\n\tenabled?: boolean;\n};\n\ntype SlotProps = {\n\tchildren: React.ReactElement;\n\t[key: string]: any;\n};\n\n/**\n * Slot component that properly forwards refs when using asChild pattern.\n * Uses forwardRef to receive the ref and merges it with any existing ref on the child.\n */\nconst Slot = React.forwardRef<HTMLElement, SlotProps>(\n\t({ children, ...props }, forwardedRef) => {\n\t\t// Get the child's existing ref using React 18/19 compatible helper\n\t\tconst childRef = getElementRef(children);\n\n\t\t// Merge the forwarded ref with the child's ref\n\t\tconst mergedRef = mergeRefs([forwardedRef, childRef]);\n\n\t\treturn React.cloneElement(children, {\n\t\t\t...props,\n\t\t\tref: mergedRef,\n\t\t\tclassName: [(children.props as any).className, props.className]\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\" \"),\n\t\t} as any);\n\t}\n);\n\n/**\n * Utility hook to support slot-style component overrides.\n */\nexport function useRenderElement<\n\tState extends Record<string, any>,\n\tTag extends IntrinsicTag,\n>(\n\ttag: Tag,\n\tcomponentProps: RenderProps<State, Tag>,\n\tparams?: RenderParams<State, Tag>\n): React.ReactElement | null {\n\tconst { render, className: classNameProp, asChild = false } = componentProps;\n\n\tconst {\n\t\tstate = {} as State,\n\t\tref,\n\t\tprops = {} as Partial<JSX.IntrinsicElements[Tag]>,\n\t\tenabled = true,\n\t} = params || {};\n\n\tif (!enabled) {\n\t\treturn null;\n\t}\n\n\tconst computedClassName =\n\t\ttypeof classNameProp === \"function\" ? classNameProp(state) : classNameProp;\n\n\tconst propsWithClassName = props as {\n\t\tclassName?: string;\n\t\tchildren?: React.ReactNode;\n\t};\n\tconst mergedProps = {\n\t\t...props,\n\t\tclassName: [propsWithClassName.className, computedClassName]\n\t\t\t.filter(Boolean)\n\t\t\t.join(\" \"),\n\t\tref,\n\t};\n\n\tif (typeof render === \"function\") {\n\t\treturn render(mergedProps as JSX.IntrinsicElements[Tag], state);\n\t}\n\n\tif (React.isValidElement(render)) {\n\t\treturn React.cloneElement(render, {\n\t\t\t...mergedProps,\n\t\t\tref: getElementRef(render) || ref,\n\t\t});\n\t}\n\n\tif (asChild && React.isValidElement(propsWithClassName.children)) {\n\t\t// Extract ref to pass explicitly to the forwardRef Slot component\n\t\t// React extracts ref from spread props, so we must pass it separately\n\t\tconst { ref: slotRef, ...restMergedProps } = mergedProps;\n\t\treturn (\n\t\t\t<Slot ref={slotRef} {...restMergedProps}>\n\t\t\t\t{propsWithClassName.children}\n\t\t\t</Slot>\n\t\t);\n\t}\n\n\treturn React.createElement(tag, mergedProps as any);\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,SAAS,cAAc,SAAwD;CAI9E,MAAM,SAAS,OAAO,yBAAyB,QAAQ,OAAO,MAAM,EAAE;AAGtE,KAFgB,UAAU,oBAAoB,UAAU,OAAO,eAI9D,QAAQ,QAAgB;AAIzB,QAAQ,QAAQ,MAAc,OAAQ,QAAgB;;;;;;AAkCvD,MAAM,OAAOA,QAAM,YACjB,EAAE,UAAU,GAAG,SAAS,iBAAiB;CAKzC,MAAM,YAAY,UAAU,CAAC,cAHZ,cAAc,SAAS,CAGY,CAAC;AAErD,QAAOA,QAAM,aAAa,UAAU;EACnC,GAAG;EACH,KAAK;EACL,WAAW,CAAE,SAAS,MAAc,WAAW,MAAM,UAAU,CAC7D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX,CAAQ;EAEV;;;;AAKD,SAAgB,iBAIf,KACA,gBACA,QAC4B;CAC5B,MAAM,EAAE,QAAQ,WAAW,eAAe,UAAU,UAAU;CAE9D,MAAM,EACL,QAAQ,EAAE,EACV,KACA,QAAQ,EAAE,EACV,UAAU,SACP,UAAU,EAAE;AAEhB,KAAI,CAAC,QACJ,QAAO;CAGR,MAAM,oBACL,OAAO,kBAAkB,aAAa,cAAc,MAAM,GAAG;CAE9D,MAAM,qBAAqB;CAI3B,MAAM,cAAc;EACnB,GAAG;EACH,WAAW,CAAC,mBAAmB,WAAW,kBAAkB,CAC1D,OAAO,QAAQ,CACf,KAAK,IAAI;EACX;EACA;AAED,KAAI,OAAO,WAAW,WACrB,QAAO,OAAO,aAA2C,MAAM;AAGhE,KAAIA,QAAM,eAAe,OAAO,CAC/B,QAAOA,QAAM,aAAa,QAAQ;EACjC,GAAG;EACH,KAAK,cAAc,OAAO,IAAI;EAC9B,CAAC;AAGH,KAAI,WAAWA,QAAM,eAAe,mBAAmB,SAAS,EAAE;EAGjE,MAAM,EAAE,KAAK,SAAS,GAAG,oBAAoB;AAC7C,SACC,oBAAC;GAAK,KAAK;GAAS,GAAI;aACtB,mBAAmB;IACd;;AAIT,QAAOA,QAAM,cAAc,KAAK,YAAmB"}
package/api.d.ts DELETED
@@ -1,71 +0,0 @@
1
- import { EmptyToNever, Flatten, MakePartial } from "./util.js";
2
- import { $ZodBase64, $ZodBase64URL, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCustom, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodJWT, $ZodKSUID, $ZodNanoID, $ZodNonOptional, $ZodStringFormat, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodXID, ParsePayload } from "./schemas.js";
3
- import { $ZodCheck, $ZodCheckEndsWith, $ZodCheckGreaterThan, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLessThan, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMinLength, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckRegex, $ZodCheckStartsWith, $ZodCheckUpperCase } from "./checks.js";
4
- import { $ZodErrorMap, $ZodIssue, $ZodIssueBase } from "./errors.js";
5
-
6
- //#region ../../node_modules/zod/v4/core/api.d.cts
7
- type Params<T extends $ZodType | $ZodCheck, IssueTypes extends $ZodIssueBase, OmitKeys extends keyof T["_zod"]["def"] = never> = Flatten<Partial<EmptyToNever<Omit<T["_zod"]["def"], OmitKeys> & ([IssueTypes] extends [never] ? {} : {
8
- error?: string | $ZodErrorMap<IssueTypes> | undefined;
9
- /** @deprecated This parameter is deprecated. Use `error` instead. */
10
- message?: string | undefined;
11
- })>>>;
12
- type TypeParams<T extends $ZodType = $ZodType & {
13
- _isst: never;
14
- }, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error"> = never> = Params<T, NonNullable<T["_zod"]["isst"]>, "type" | "checks" | "error" | AlsoOmit>;
15
- type CheckParams<T extends $ZodCheck = $ZodCheck,
16
- // & { _issc: never },
17
- AlsoOmit extends Exclude<keyof T["_zod"]["def"], "check" | "error"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "check" | "error" | AlsoOmit>;
18
- type CheckStringFormatParams<T extends $ZodStringFormat = $ZodStringFormat, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "coerce" | "checks" | "error" | "check" | "format"> = never> = Params<T, NonNullable<T["_zod"]["issc"]>, "type" | "coerce" | "checks" | "error" | "check" | "format" | AlsoOmit>;
19
- type CheckTypeParams<T extends $ZodType & $ZodCheck = $ZodType & $ZodCheck, AlsoOmit extends Exclude<keyof T["_zod"]["def"], "type" | "checks" | "error" | "check"> = never> = Params<T, NonNullable<T["_zod"]["isst"] | T["_zod"]["issc"]>, "type" | "checks" | "error" | "check" | AlsoOmit>;
20
- type $ZodCheckEmailParams = CheckStringFormatParams<$ZodEmail, "when">;
21
- type $ZodCheckGUIDParams = CheckStringFormatParams<$ZodGUID, "pattern" | "when">;
22
- type $ZodCheckUUIDParams = CheckStringFormatParams<$ZodUUID, "pattern" | "when">;
23
- type $ZodCheckURLParams = CheckStringFormatParams<$ZodURL, "when">;
24
- type $ZodCheckEmojiParams = CheckStringFormatParams<$ZodEmoji, "when">;
25
- type $ZodCheckNanoIDParams = CheckStringFormatParams<$ZodNanoID, "when">;
26
- type $ZodCheckCUIDParams = CheckStringFormatParams<$ZodCUID, "when">;
27
- type $ZodCheckCUID2Params = CheckStringFormatParams<$ZodCUID2, "when">;
28
- type $ZodCheckULIDParams = CheckStringFormatParams<$ZodULID, "when">;
29
- type $ZodCheckXIDParams = CheckStringFormatParams<$ZodXID, "when">;
30
- type $ZodCheckKSUIDParams = CheckStringFormatParams<$ZodKSUID, "when">;
31
- type $ZodCheckIPv4Params = CheckStringFormatParams<$ZodIPv4, "pattern" | "when" | "version">;
32
- type $ZodCheckIPv6Params = CheckStringFormatParams<$ZodIPv6, "pattern" | "when" | "version">;
33
- type $ZodCheckCIDRv4Params = CheckStringFormatParams<$ZodCIDRv4, "pattern" | "when">;
34
- type $ZodCheckCIDRv6Params = CheckStringFormatParams<$ZodCIDRv6, "pattern" | "when">;
35
- type $ZodCheckBase64Params = CheckStringFormatParams<$ZodBase64, "pattern" | "when">;
36
- type $ZodCheckBase64URLParams = CheckStringFormatParams<$ZodBase64URL, "pattern" | "when">;
37
- type $ZodCheckE164Params = CheckStringFormatParams<$ZodE164, "when">;
38
- type $ZodCheckJWTParams = CheckStringFormatParams<$ZodJWT, "pattern" | "when">;
39
- type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "pattern" | "when">;
40
- type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
41
- type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
42
- type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
43
- type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
44
- type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
45
- type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
46
- type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
47
- type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
48
- type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
49
- type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
50
- type $ZodCheckRegexParams = CheckParams<$ZodCheckRegex, "format" | "pattern" | "when">;
51
- type $ZodCheckLowerCaseParams = CheckParams<$ZodCheckLowerCase, "format" | "when">;
52
- type $ZodCheckUpperCaseParams = CheckParams<$ZodCheckUpperCase, "format" | "when">;
53
- type $ZodCheckIncludesParams = CheckParams<$ZodCheckIncludes, "includes" | "format" | "when" | "pattern">;
54
- type $ZodCheckStartsWithParams = CheckParams<$ZodCheckStartsWith, "prefix" | "format" | "when" | "pattern">;
55
- type $ZodCheckEndsWithParams = CheckParams<$ZodCheckEndsWith, "suffix" | "format" | "pattern" | "when">;
56
- type $ZodEnumParams = TypeParams<$ZodEnum, "entries">;
57
- type $ZodNonOptionalParams = TypeParams<$ZodNonOptional, "innerType">;
58
- type $ZodCustomParams = CheckTypeParams<$ZodCustom, "fn">;
59
- type $ZodSuperRefineIssue<T extends $ZodIssueBase = $ZodIssue> = T extends any ? RawIssue<T> : never;
60
- type RawIssue<T extends $ZodIssueBase> = T extends any ? Flatten<MakePartial<T, "message" | "path"> & {
61
- /** The schema or check that originated this issue. */
62
- readonly inst?: $ZodType | $ZodCheck;
63
- /** If `true`, Zod will execute subsequent checks/refinements instead of immediately aborting */
64
- readonly continue?: boolean | undefined;
65
- } & Record<string, unknown>> : never;
66
- interface $RefinementCtx<T = unknown> extends ParsePayload<T> {
67
- addIssue(arg: string | $ZodSuperRefineIssue): void;
68
- }
69
- //#endregion
70
- export { $RefinementCtx, $ZodCheckBase64Params, $ZodCheckBase64URLParams, $ZodCheckCIDRv4Params, $ZodCheckCIDRv6Params, $ZodCheckCUID2Params, $ZodCheckCUIDParams, $ZodCheckE164Params, $ZodCheckEmailParams, $ZodCheckEmojiParams, $ZodCheckEndsWithParams, $ZodCheckGUIDParams, $ZodCheckGreaterThanParams, $ZodCheckIPv4Params, $ZodCheckIPv6Params, $ZodCheckISODateParams, $ZodCheckISODateTimeParams, $ZodCheckISODurationParams, $ZodCheckISOTimeParams, $ZodCheckIncludesParams, $ZodCheckJWTParams, $ZodCheckKSUIDParams, $ZodCheckLengthEqualsParams, $ZodCheckLessThanParams, $ZodCheckLowerCaseParams, $ZodCheckMaxLengthParams, $ZodCheckMinLengthParams, $ZodCheckMultipleOfParams, $ZodCheckNanoIDParams, $ZodCheckNumberFormatParams, $ZodCheckRegexParams, $ZodCheckStartsWithParams, $ZodCheckULIDParams, $ZodCheckURLParams, $ZodCheckUUIDParams, $ZodCheckUpperCaseParams, $ZodCheckXIDParams, $ZodCustomParams, $ZodEnumParams, $ZodNonOptionalParams };
71
- //# sourceMappingURL=api.d.ts.map