reachat 2.1.2 → 3.0.0

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 (65) hide show
  1. package/dist/{CSVFileRenderer-DXI8PDqR.js → CSVFileRenderer-C2tuexJf.js} +2 -2
  2. package/dist/{CSVFileRenderer-DXI8PDqR.js.map → CSVFileRenderer-C2tuexJf.js.map} +1 -1
  3. package/dist/Chat.d.ts +12 -0
  4. package/dist/{Markdown/charts/ChartError.d.ts → ComponentCatalog/ComponentError.d.ts} +2 -2
  5. package/dist/ComponentCatalog/ComponentPre.d.ts +18 -0
  6. package/dist/ComponentCatalog/ComponentRenderer.d.ts +17 -0
  7. package/dist/ComponentCatalog/chartComponentDef.d.ts +36 -0
  8. package/dist/ComponentCatalog/componentCatalog.d.ts +44 -0
  9. package/dist/ComponentCatalog/componentCatalog.spec.d.ts +1 -0
  10. package/dist/ComponentCatalog/generatePrompt.d.ts +9 -0
  11. package/dist/ComponentCatalog/generatePrompt.spec.d.ts +1 -0
  12. package/dist/ComponentCatalog/index.d.ts +9 -0
  13. package/dist/ComponentCatalog/types.d.ts +108 -0
  14. package/dist/ComponentCatalog/validateSpec.d.ts +17 -0
  15. package/dist/ComponentCatalog/validateSpec.spec.d.ts +1 -0
  16. package/dist/{DefaultFileRenderer-Bi8LNDio.js → DefaultFileRenderer-CJ3jwiQa.js} +3 -3
  17. package/dist/{DefaultFileRenderer-Bi8LNDio.js.map → DefaultFileRenderer-CJ3jwiQa.js.map} +1 -1
  18. package/dist/Markdown/charts/ChartRenderer.d.ts +1 -1
  19. package/dist/Markdown/charts/ComponentError.d.ts +1 -0
  20. package/dist/Markdown/charts/index.d.ts +2 -6
  21. package/dist/Markdown/charts/types.d.ts +21 -0
  22. package/dist/Markdown/plugins/index.d.ts +3 -1
  23. package/dist/Markdown/plugins/redactMatchers.d.ts +21 -0
  24. package/dist/Markdown/plugins/remarkComponent.d.ts +27 -0
  25. package/dist/Markdown/plugins/remarkRedact.d.ts +37 -0
  26. package/dist/SessionMessages/SessionMessage/MessageActions.d.ts +2 -2
  27. package/dist/SessionMessages/SessionMessage/MessageFiles.d.ts +2 -2
  28. package/dist/SessionMessages/SessionMessage/MessageQuestion.d.ts +2 -2
  29. package/dist/SessionMessages/SessionMessage/MessageResponse.d.ts +2 -2
  30. package/dist/SessionMessages/SessionMessage/MessageSources.d.ts +2 -2
  31. package/dist/SessionMessages/SessionMessage/SessionMessage.d.ts +2 -2
  32. package/dist/SessionsList/SessionListItem.d.ts +2 -2
  33. package/dist/docs.json +264 -90
  34. package/dist/{index-CBHNcMyR.js → index-8tlsyFe-.js} +1224 -1576
  35. package/dist/index-8tlsyFe-.js.map +1 -0
  36. package/dist/index.css +32 -1
  37. package/dist/index.d.ts +2 -0
  38. package/dist/index.js +53 -46
  39. package/dist/index.umd.cjs +1220 -1574
  40. package/dist/index.umd.cjs.map +1 -1
  41. package/dist/stories/AgUi.stories.tsx +118 -0
  42. package/dist/stories/Charts.stories.tsx +118 -130
  43. package/dist/stories/Chat.stories.tsx +6 -1
  44. package/dist/stories/ChatSuggestions.stories.tsx +9 -81
  45. package/dist/stories/Companion.stories.tsx +7 -1
  46. package/dist/stories/ComponentCatalog.stories.tsx +509 -0
  47. package/dist/stories/{ChartError.stories.tsx → ComponentError.stories.tsx} +14 -11
  48. package/dist/stories/Console.stories.tsx +66 -21
  49. package/dist/stories/EnhancedInput.stories.tsx +7 -1
  50. package/dist/stories/Redact.stories.tsx +175 -0
  51. package/dist/stories/examples.ts +31 -0
  52. package/dist/theme.d.ts +3 -0
  53. package/dist/useAgUi/index.d.ts +4 -0
  54. package/dist/useAgUi/types.d.ts +157 -0
  55. package/dist/useAgUi/useAgUi.d.ts +119 -0
  56. package/dist/useAgUi/useAgUi.spec.d.ts +1 -0
  57. package/dist/utils/getChildText.d.ts +10 -0
  58. package/dist/utils/getChildText.spec.d.ts +1 -0
  59. package/package.json +6 -6
  60. package/dist/Markdown/charts/ChartPre.d.ts +0 -6
  61. package/dist/Markdown/charts/chartHelpers.d.ts +0 -40
  62. package/dist/Markdown/plugins/remarkChart.d.ts +0 -59
  63. package/dist/index-CBHNcMyR.js.map +0 -1
  64. package/dist/stories/Integration.stories.tsx +0 -312
  65. /package/dist/{Markdown/charts/chartHelpers.spec.d.ts → ComponentCatalog/chartComponentDef.spec.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { FC, PropsWithChildren, ReactElement } from 'react';
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
2
  import { Session } from '../types';
3
3
  export interface SessionListItemProps extends PropsWithChildren {
4
4
  /**
@@ -22,4 +22,4 @@ export interface SessionListItemProps extends PropsWithChildren {
22
22
  */
23
23
  limit?: number;
24
24
  }
25
- export declare const SessionListItem: FC<SessionListItemProps>;
25
+ export declare const SessionListItem: import('react').NamedExoticComponent<SessionListItemProps>;
package/dist/docs.json CHANGED
@@ -105,7 +105,7 @@
105
105
  },
106
106
  "theme": {
107
107
  "defaultValue": {
108
- "value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n }\n}"
108
+ "value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
109
109
  },
110
110
  "description": "Custom theme for the chat.",
111
111
  "name": "theme",
@@ -142,7 +142,7 @@
142
142
  ],
143
143
  "required": false,
144
144
  "type": {
145
- "name": "Plugin<[], Node, Node>[]"
145
+ "name": "Plugin[]"
146
146
  }
147
147
  },
148
148
  "markdownComponents": {
@@ -164,6 +164,25 @@
164
164
  "name": "Components"
165
165
  }
166
166
  },
167
+ "components": {
168
+ "defaultValue": null,
169
+ "description": "A component catalog created via `componentCatalog()`.\nEnables dynamic component rendering from LLM responses using\nfenced code blocks (e.g. ```component).\n\nThis automatically wires in the necessary remark plugin and\nmarkdown component overrides. For advanced control, use the\ncatalog's `remarkPlugin` and `components` properties directly\nvia the `remarkPlugins` and `markdownComponents` props instead.",
170
+ "name": "components",
171
+ "parent": {
172
+ "fileName": "src/Chat.tsx",
173
+ "name": "ChatProps"
174
+ },
175
+ "declarations": [
176
+ {
177
+ "fileName": "src/Chat.tsx",
178
+ "name": "ChatProps"
179
+ }
180
+ ],
181
+ "required": false,
182
+ "type": {
183
+ "name": "ComponentCatalog"
184
+ }
185
+ },
167
186
  "isLoading": {
168
187
  "defaultValue": null,
169
188
  "description": "Whether to display a loading state.",
@@ -346,7 +365,7 @@
346
365
  },
347
366
  "theme": {
348
367
  "defaultValue": {
349
- "value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n }\n}"
368
+ "value": "{\n base: 'dark:text-white text-gray-500',\n console: 'flex w-full gap-4 h-full',\n companion: 'w-full h-full overflow-hidden',\n empty: 'text-center flex-1',\n appbar: 'flex p-5',\n status: {\n base: 'py-2 px-3 rounded-lg bg-gray-100/50 dark:bg-gray-800/30',\n header: 'flex items-center gap-2',\n icon: {\n base: 'flex-shrink-0 w-4 h-4',\n loading: 'text-blue-500 dark:text-blue-400',\n complete: 'text-green-500 dark:text-green-400',\n error: 'text-red-500 dark:text-red-400'\n },\n text: {\n base: 'text-sm',\n loading: 'text-gray-600 dark:text-gray-400',\n complete: 'text-gray-600 dark:text-gray-400',\n error: 'text-red-600 dark:text-red-400'\n },\n steps: {\n base: 'mt-1 ml-6 space-y-0.5',\n step: {\n base: 'flex items-center gap-2',\n icon: 'flex-shrink-0 w-3.5 h-3.5',\n text: 'text-sm',\n loading: 'text-gray-500 dark:text-gray-500',\n complete: 'text-gray-500 dark:text-gray-500',\n error: 'text-red-500 dark:text-red-400'\n }\n }\n },\n sessions: {\n base: 'overflow-auto',\n console:\n 'min-w-[150px] w-[30%] max-w-[300px] dark:bg-[#11111F] bg-[#F2F3F7] p-5 rounded-3xl',\n companion: 'w-full h-full',\n group:\n 'text-xs dart:text-gray-400 text-gray-700 mt-4 hover:bg-transparent mb-1',\n create: 'relative mb-4 rounded-[10px] text-white',\n session: {\n base: [\n 'group my-1 rounded-[10px] p-2 text-gray-500 border border-transparent hover:bg-gray-300 hover:border-gray-400 [&_svg]:text-gray-500',\n 'dark:text-typography dark:text-gray-400 dark:hover:bg-gray-800/50 dark:hover:border-gray-700/50 dark:[&_svg]:text-gray-200'\n ].join(' '),\n active: [\n 'border border-gray-300 hover:border-gray-400 text-gray-700 bg-gray-200 hover:bg-gray-300 ',\n 'dark:text-gray-500 dark:bg-gray-800/70 dark:border-gray-700/50 dark:text-white dark:border-gray-700/70 dark:hover:bg-gray-800/50',\n '[&_button]:opacity-100!'\n ].join(' '),\n delete: '[&>svg]:w-4 [&>svg]:h-4 opacity-0 group-hover:opacity-50!'\n }\n },\n messages: {\n base: '',\n console: 'flex flex-col mx-5 flex-1 min-h-0',\n companion: 'flex w-full h-full',\n back: 'self-start p-0 my-2',\n inner: 'flex-1 h-full flex flex-col',\n title: ['text-base font-bold text-gray-500', 'dark:text-gray-200'].join(\n ' '\n ),\n date: 'text-xs whitespace-nowrap text-gray-400',\n content: [\n 'mt-2 flex-1 overflow-auto [&_hr]:bg-gray-200',\n 'dark:[&_hr]:bg-gray-800/60'\n ].join(' '),\n header: 'flex justify-between items-center gap-2',\n showMore: 'mb-4',\n message: {\n base: 'mt-4 mb-4 flex flex-col p-0 rounded-sm border-none bg-transparent',\n question: [\n 'relative font-semibold mb-4 px-4 py-4 pb-2 rounded-3xl rounded-br-none text-typography border bg-gray-200 border-gray-300 text-gray-900',\n 'dark:bg-gray-900/60 dark:border-gray-700/50 dark:text-gray-100'\n ].join(' '),\n response: [\n 'relative data-[compact=false]:px-4 text-gray-900',\n 'dark:text-gray-100'\n ].join(' '),\n overlay:\n \"overflow-y-hidden max-h-[350px] after:content-[''] after:absolute after:inset-x-0 after:bottom-0 after:h-16 after:bg-linear-to-b after:from-transparent dark:after:to-gray-900 after:to-gray-200\",\n cursor: 'inline-block w-1 h-4 bg-current',\n expand: 'absolute bottom-1 right-1 z-10',\n scrollToBottom: {\n container: 'absolute bottom-2 left-1/2 transform -translate-x-1/2 z-10',\n button: 'rounded-full p-2 shadow-lg'\n },\n files: {\n base: 'mb-2 flex flex-wrap gap-3 ',\n file: {\n base: [\n 'flex items-center gap-2 border border-gray-300 px-3 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n name: ['text-sm text-gray-500', 'dark:text-gray-200'].join(' ')\n }\n },\n sources: {\n base: 'my-4 flex flex-wrap gap-3',\n source: {\n base: [\n 'flex gap-2 border border-gray-200 px-4 py-2 rounded-lg cursor-pointer',\n 'dark:border-gray-700'\n ].join(' '),\n companion: 'flex-1 px-3 py-1.5',\n image: 'max-w-10 max-h-10 rounded-md w-full h-fit self-center',\n title: 'text-md block',\n url: 'text-sm text-blue-400 underline'\n }\n },\n markdown: {\n copy: 'sticky py-1 [&>svg]:w-4 [&>svg]:h-4 opacity-50',\n p: 'mb-2',\n a: 'text-blue-400 underline',\n table: 'table-auto w-full m-2',\n th: 'px-4 py-2 text-left font-bold border-b border-gray-500',\n td: 'px-4 py-2',\n code: 'm-2 rounded-b relative',\n toolbar:\n 'text-xs dark:bg-gray-700/50 flex items-center justify-between px-2 py-1 rounded-t sticky top-0 backdrop-blur-md bg-gray-200 ',\n li: 'mb-2 ml-6',\n ul: 'mb-4 list-disc',\n ol: 'mb-4 list-decimal'\n },\n footer: {\n base: 'mt-3 flex gap-1.5',\n copy: [\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-200 hover:text-gray-500',\n 'dark:hover:bg-gray-800 dark:hover:text-white text-gray-400'\n ].join(' '),\n upvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n downvote:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400',\n refresh:\n 'p-3 rounded-[10px] [&>svg]:w-4 [&>svg]:h-4 opacity-50 hover:opacity-100! hover:bg-gray-700/40 hover:text-white text-gray-400'\n }\n }\n },\n input: {\n base: 'flex mt-4 relative',\n upload: ['px-5 py-2 text-gray-400 size-10', 'dark:gray-500'].join(' '),\n input: [\n 'w-full border rounded-3xl px-3 py-2 pr-16 text-gray-500 border-gray-200 hover:bg-blue-100 hover:border-blue-500 after:hidden after:mx-10! bg-white [&>textarea]:w-full [&>textarea]:flex-none',\n 'dark:border-gray-700/50 dark:text-gray-200 dark:bg-gray-950 dark:hover:bg-blue-950/40'\n ].join(' '),\n actions: {\n base: 'absolute flex gap-2 items-center right-5 inset-y-1/2 -translate-y-1/2 z-10',\n send: [\n 'px-3 py-3 hover:bg-primary-hover rounded-full bg-gray-200 hover:bg-gray-300 text-gray-500',\n 'dark:text-white light:text-gray-500 dark:bg-gray-800 dark:hover:bg-gray-700'\n ].join(' '),\n stop: 'px-2 py-2 bg-red-500 text-white rounded-full hover:bg-red-700 '\n },\n popup: {\n base: [\n 'bg-white border border-gray-200 rounded-lg shadow-lg overflow-hidden min-w-[200px] max-w-[300px]',\n 'dark:bg-gray-900 dark:border-gray-700'\n ].join(' '),\n content: 'overflow-y-auto max-h-[250px]',\n item: [\n 'flex items-center gap-2 px-3 py-2 cursor-pointer transition-colors',\n 'hover:bg-gray-100 dark:hover:bg-gray-800'\n ].join(' '),\n itemHighlighted: 'bg-gray-100 dark:bg-gray-800',\n itemIcon: [\n 'flex-shrink-0 w-5 h-5 text-gray-500 [&>svg]:w-full [&>svg]:h-full',\n 'dark:text-gray-400'\n ].join(' '),\n itemContent: 'flex flex-col min-w-0 flex-1',\n itemLabel: [\n 'text-sm font-medium text-gray-900 truncate',\n 'dark:text-gray-100'\n ].join(' '),\n itemDescription: 'text-xs text-gray-500 dark:text-gray-400 truncate',\n itemShortcut: 'text-xs text-gray-400 dark:text-gray-500 ml-auto',\n empty: 'px-3 py-4 text-sm text-center text-gray-500 dark:text-gray-400',\n loading: [\n 'flex items-center justify-center gap-2 px-3 py-4 text-gray-500',\n 'dark:text-gray-400'\n ].join(' ')\n },\n tag: {\n base: [\n 'inline-flex items-center px-1.5 py-0.5 mx-0.5 rounded',\n 'font-medium text-sm leading-[1.2] relative top-[1px]'\n ].join(' '),\n mention: [\n 'bg-blue-100 dark:bg-blue-900/30',\n 'text-blue-700 dark:text-blue-300'\n ].join(' '),\n command: [\n 'bg-purple-100 dark:bg-purple-900/30',\n 'text-purple-700 dark:text-purple-300'\n ].join(' ')\n },\n editor: {\n base: [\n 'outline-none w-full overflow-y-auto',\n 'text-inherit font-inherit',\n '[&_.tiptap-paragraph]:m-0'\n ].join(' '),\n container: 'px-3 py-2 pr-16',\n placeholder: [\n '[&_.is-editor-empty]:before:content-[attr(data-placeholder)]',\n '[&_.is-editor-empty]:before:text-gray-400',\n '[&_.is-editor-empty]:before:dark:text-gray-500',\n '[&_.is-editor-empty]:before:float-left',\n '[&_.is-editor-empty]:before:h-0',\n '[&_.is-editor-empty]:before:pointer-events-none'\n ].join(' ')\n }\n },\n suggestions: {\n base: 'flex flex-wrap gap-2 mt-4',\n item: {\n base: [\n 'rounded-full! max-w-full py-2 px-4',\n 'bg-gray-100 border-gray-200 hover:bg-gray-200 hover:border-gray-300 text-gray-700',\n 'dark:bg-gray-800/50 dark:border-gray-700 dark:hover:bg-gray-700/70 dark:hover:border-gray-600 dark:text-gray-200',\n '[&>svg]:w-4 [&>svg]:h-4 [&>svg]:text-blue-500 [&>svg]:dark:text-blue-400 [&>svg]:flex-shrink-0'\n ].join(' '),\n icon: 'w-4 h-4 text-blue-500 dark:text-blue-400 flex-shrink-0',\n text: 'text-sm truncate'\n }\n },\n chart: {\n base: 'my-6',\n title: 'text-sm font-medium mb-2 text-gray-600 dark:text-gray-400',\n content: 'flex items-center justify-center',\n error: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-red-300 bg-red-50 text-red-500',\n 'dark:border-red-700 dark:bg-red-900/20'\n ].join(' '),\n title: 'text-red-600 dark:text-red-400 text-sm font-medium mb-2',\n code: 'text-xs overflow-auto'\n },\n warning: {\n base: [\n 'my-4 p-4 border rounded',\n 'border-yellow-300 bg-yellow-50 text-yellow-600',\n 'dark:border-yellow-700 dark:bg-yellow-900/20 dark:text-yellow-400'\n ].join(' '),\n title: 'text-yellow-600 dark:text-yellow-400 text-sm font-medium mb-2'\n }\n },\n component: {\n base: 'my-4'\n }\n}"
350
369
  },
351
370
  "description": "Custom theme for the appbar",
352
371
  "name": "theme",
@@ -1296,6 +1315,177 @@
1296
1315
  }
1297
1316
  }
1298
1317
  },
1318
+ {
1319
+ "tags": {},
1320
+ "filePath": "src/ComponentCatalog/ComponentError.tsx",
1321
+ "description": "",
1322
+ "displayName": "ComponentError",
1323
+ "methods": [],
1324
+ "props": {
1325
+ "variant": {
1326
+ "defaultValue": {
1327
+ "value": "error"
1328
+ },
1329
+ "description": "The visual style variant of the error display.\nDefaults to 'error'.",
1330
+ "name": "variant",
1331
+ "parent": {
1332
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1333
+ "name": "ComponentErrorProps"
1334
+ },
1335
+ "declarations": [
1336
+ {
1337
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1338
+ "name": "ComponentErrorProps"
1339
+ }
1340
+ ],
1341
+ "required": false,
1342
+ "type": {
1343
+ "name": "\"error\" | \"warning\""
1344
+ }
1345
+ },
1346
+ "title": {
1347
+ "defaultValue": null,
1348
+ "description": "The heading text displayed at the top of the error.",
1349
+ "name": "title",
1350
+ "parent": {
1351
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1352
+ "name": "ComponentErrorProps"
1353
+ },
1354
+ "declarations": [
1355
+ {
1356
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1357
+ "name": "ComponentErrorProps"
1358
+ }
1359
+ ],
1360
+ "required": false,
1361
+ "type": {
1362
+ "name": "string"
1363
+ }
1364
+ },
1365
+ "message": {
1366
+ "defaultValue": null,
1367
+ "description": "The descriptive message explaining the error or warning.",
1368
+ "name": "message",
1369
+ "parent": {
1370
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1371
+ "name": "ComponentErrorProps"
1372
+ },
1373
+ "declarations": [
1374
+ {
1375
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1376
+ "name": "ComponentErrorProps"
1377
+ }
1378
+ ],
1379
+ "required": false,
1380
+ "type": {
1381
+ "name": "string"
1382
+ }
1383
+ },
1384
+ "code": {
1385
+ "defaultValue": null,
1386
+ "description": "The raw code or data that caused the error, displayed in a code block.",
1387
+ "name": "code",
1388
+ "parent": {
1389
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1390
+ "name": "ComponentErrorProps"
1391
+ },
1392
+ "declarations": [
1393
+ {
1394
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
1395
+ "name": "ComponentErrorProps"
1396
+ }
1397
+ ],
1398
+ "required": false,
1399
+ "type": {
1400
+ "name": "string"
1401
+ }
1402
+ }
1403
+ }
1404
+ },
1405
+ {
1406
+ "tags": {},
1407
+ "filePath": "src/ComponentCatalog/ComponentPre.tsx",
1408
+ "description": "Creates a `pre` component override for react-markdown that intercepts\nfenced code blocks with the configured language tag and renders them\nvia the ComponentRenderer.\n\nChecks for a `language-{tag}` className on the nested `<code>` element\nand, if matched, extracts the text content and hands it off to the\nrenderer.\n\nAny non-matching `<pre>` blocks are passed through as-is.",
1409
+ "displayName": "createComponentPre",
1410
+ "methods": [],
1411
+ "props": {}
1412
+ },
1413
+ {
1414
+ "tags": {},
1415
+ "filePath": "src/ComponentCatalog/ComponentRenderer.tsx",
1416
+ "description": "",
1417
+ "displayName": "ComponentRenderer",
1418
+ "methods": [],
1419
+ "props": {
1420
+ "raw": {
1421
+ "defaultValue": null,
1422
+ "description": "The raw JSON string from the ```component code block.",
1423
+ "name": "raw",
1424
+ "parent": {
1425
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1426
+ "name": "ComponentRendererProps"
1427
+ },
1428
+ "declarations": [
1429
+ {
1430
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1431
+ "name": "ComponentRendererProps"
1432
+ }
1433
+ ],
1434
+ "required": true,
1435
+ "type": {
1436
+ "name": "string"
1437
+ }
1438
+ },
1439
+ "definitions": {
1440
+ "defaultValue": null,
1441
+ "description": "The component definitions from the catalog.",
1442
+ "name": "definitions",
1443
+ "parent": {
1444
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1445
+ "name": "ComponentRendererProps"
1446
+ },
1447
+ "declarations": [
1448
+ {
1449
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1450
+ "name": "ComponentRendererProps"
1451
+ }
1452
+ ],
1453
+ "required": true,
1454
+ "type": {
1455
+ "name": "ComponentDefinitions"
1456
+ }
1457
+ },
1458
+ "options": {
1459
+ "defaultValue": null,
1460
+ "description": "Optional catalog options (for onError callback).",
1461
+ "name": "options",
1462
+ "parent": {
1463
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1464
+ "name": "ComponentRendererProps"
1465
+ },
1466
+ "declarations": [
1467
+ {
1468
+ "fileName": "src/ComponentCatalog/ComponentRenderer.tsx",
1469
+ "name": "ComponentRendererProps"
1470
+ }
1471
+ ],
1472
+ "required": false,
1473
+ "type": {
1474
+ "name": "ComponentCatalogOptions"
1475
+ }
1476
+ }
1477
+ }
1478
+ },
1479
+ {
1480
+ "tags": {
1481
+ "example": "```tsx\nimport { componentCatalog, createChartComponentDef } from 'reachat';\n\nconst catalog = componentCatalog({\n Chart: createChartComponentDef(),\n // ... other components\n});\n```\n\nThe LLM can then output:\n```component\n{\n \"type\": \"Chart\",\n \"props\": {\n \"type\": \"bar\",\n \"data\": [{ \"key\": \"A\", \"data\": 10 }, { \"key\": \"B\", \"data\": 20 }],\n \"title\": \"My Chart\"\n }\n}\n```"
1482
+ },
1483
+ "filePath": "src/ComponentCatalog/chartComponentDef.tsx",
1484
+ "description": "Wraps `ChartRenderer` as a component definition so charts can\nbe registered in a `componentCatalog()`.\n\nThe adapter renders a `ChartRenderer` internally using the same\nconfig-based API, with reaviz as the underlying chart library.\n\nBecause reaviz is an optional peer dependency, this adapter is\nfully tree-shakeable — it only loads reaviz code when imported.\n\nBoth `zod` and `reaviz` are required when this helper is used.",
1485
+ "displayName": "createChartComponentDef",
1486
+ "methods": [],
1487
+ "props": {}
1488
+ },
1299
1489
  {
1300
1490
  "tags": {},
1301
1491
  "filePath": "src/Markdown/CodeHighlighter.tsx",
@@ -1446,12 +1636,12 @@
1446
1636
  ],
1447
1637
  "required": false,
1448
1638
  "type": {
1449
- "name": "Plugin<[], Node, Node>[]"
1639
+ "name": "Plugin[]"
1450
1640
  }
1451
1641
  },
1452
1642
  "rehypePlugins": {
1453
1643
  "defaultValue": {
1454
- "value": "[rehypeKatex]"
1644
+ "value": "[rehypeRaw, rehypeKatex]"
1455
1645
  },
1456
1646
  "description": "Rehype plugins to apply to the markdown content.",
1457
1647
  "name": "rehypePlugins",
@@ -1467,7 +1657,7 @@
1467
1657
  ],
1468
1658
  "required": false,
1469
1659
  "type": {
1470
- "name": "Plugin<[], Node, Node>[]"
1660
+ "name": "Plugin[]"
1471
1661
  }
1472
1662
  },
1473
1663
  "customComponents": {
@@ -1956,9 +2146,7 @@
1956
2146
  }
1957
2147
  },
1958
2148
  "deletable": {
1959
- "defaultValue": {
1960
- "value": "true"
1961
- },
2149
+ "defaultValue": null,
1962
2150
  "description": "Indicates whether the session is deletable.",
1963
2151
  "name": "deletable",
1964
2152
  "parent": {
@@ -1977,9 +2165,7 @@
1977
2165
  }
1978
2166
  },
1979
2167
  "deleteIcon": {
1980
- "defaultValue": {
1981
- "value": "<TrashIcon />"
1982
- },
2168
+ "defaultValue": null,
1983
2169
  "description": "Icon to show for delete.",
1984
2170
  "name": "deleteIcon",
1985
2171
  "parent": {
@@ -1998,9 +2184,7 @@
1998
2184
  }
1999
2185
  },
2000
2186
  "chatIcon": {
2001
- "defaultValue": {
2002
- "value": "<ChatIcon className=\"mr-2\" />"
2003
- },
2187
+ "defaultValue": null,
2004
2188
  "description": "Icon to show for chat.",
2005
2189
  "name": "chatIcon",
2006
2190
  "parent": {
@@ -2019,9 +2203,7 @@
2019
2203
  }
2020
2204
  },
2021
2205
  "limit": {
2022
- "defaultValue": {
2023
- "value": "100"
2024
- },
2206
+ "defaultValue": null,
2025
2207
  "description": "Limit for the ellipsis.",
2026
2208
  "name": "limit",
2027
2209
  "parent": {
@@ -2099,137 +2281,129 @@
2099
2281
  },
2100
2282
  {
2101
2283
  "tags": {},
2102
- "filePath": "src/Markdown/charts/ChartError.tsx",
2284
+ "filePath": "src/Markdown/charts/ChartRenderer.tsx",
2103
2285
  "description": "",
2104
- "displayName": "ChartError",
2286
+ "displayName": "ChartRenderer",
2105
2287
  "methods": [],
2106
2288
  "props": {
2107
- "variant": {
2108
- "defaultValue": {
2109
- "value": "error"
2110
- },
2111
- "description": "The visual style variant of the error display.\nDefaults to 'error'.",
2112
- "name": "variant",
2289
+ "config": {
2290
+ "defaultValue": null,
2291
+ "description": "The chart configuration.",
2292
+ "name": "config",
2113
2293
  "parent": {
2114
- "fileName": "src/Markdown/charts/ChartError.tsx",
2115
- "name": "ChartErrorProps"
2294
+ "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2295
+ "name": "ChartRendererProps"
2116
2296
  },
2117
2297
  "declarations": [
2118
2298
  {
2119
- "fileName": "src/Markdown/charts/ChartError.tsx",
2120
- "name": "ChartErrorProps"
2299
+ "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2300
+ "name": "ChartRendererProps"
2121
2301
  }
2122
2302
  ],
2123
- "required": false,
2303
+ "required": true,
2124
2304
  "type": {
2125
- "name": "\"error\" | \"warning\""
2305
+ "name": "ChartConfig"
2126
2306
  }
2127
2307
  },
2128
- "title": {
2308
+ "className": {
2129
2309
  "defaultValue": null,
2130
- "description": "The heading text displayed at the top of the error.",
2131
- "name": "title",
2310
+ "description": "The class name to apply to the chart container.",
2311
+ "name": "className",
2132
2312
  "parent": {
2133
- "fileName": "src/Markdown/charts/ChartError.tsx",
2134
- "name": "ChartErrorProps"
2313
+ "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2314
+ "name": "ChartRendererProps"
2135
2315
  },
2136
2316
  "declarations": [
2137
2317
  {
2138
- "fileName": "src/Markdown/charts/ChartError.tsx",
2139
- "name": "ChartErrorProps"
2318
+ "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2319
+ "name": "ChartRendererProps"
2140
2320
  }
2141
2321
  ],
2142
2322
  "required": false,
2143
2323
  "type": {
2144
2324
  "name": "string"
2145
2325
  }
2146
- },
2147
- "message": {
2148
- "defaultValue": null,
2149
- "description": "The descriptive message explaining the error or warning.",
2150
- "name": "message",
2326
+ }
2327
+ }
2328
+ },
2329
+ {
2330
+ "tags": {},
2331
+ "filePath": "src/Markdown/charts/ComponentError.tsx",
2332
+ "description": "",
2333
+ "displayName": "ComponentError",
2334
+ "methods": [],
2335
+ "props": {
2336
+ "variant": {
2337
+ "defaultValue": {
2338
+ "value": "error"
2339
+ },
2340
+ "description": "The visual style variant of the error display.\nDefaults to 'error'.",
2341
+ "name": "variant",
2151
2342
  "parent": {
2152
- "fileName": "src/Markdown/charts/ChartError.tsx",
2153
- "name": "ChartErrorProps"
2343
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2344
+ "name": "ComponentErrorProps"
2154
2345
  },
2155
2346
  "declarations": [
2156
2347
  {
2157
- "fileName": "src/Markdown/charts/ChartError.tsx",
2158
- "name": "ChartErrorProps"
2348
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2349
+ "name": "ComponentErrorProps"
2159
2350
  }
2160
2351
  ],
2161
2352
  "required": false,
2162
2353
  "type": {
2163
- "name": "string"
2354
+ "name": "\"error\" | \"warning\""
2164
2355
  }
2165
2356
  },
2166
- "code": {
2357
+ "title": {
2167
2358
  "defaultValue": null,
2168
- "description": "The raw code or data that caused the error, displayed in a code block.",
2169
- "name": "code",
2359
+ "description": "The heading text displayed at the top of the error.",
2360
+ "name": "title",
2170
2361
  "parent": {
2171
- "fileName": "src/Markdown/charts/ChartError.tsx",
2172
- "name": "ChartErrorProps"
2362
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2363
+ "name": "ComponentErrorProps"
2173
2364
  },
2174
2365
  "declarations": [
2175
2366
  {
2176
- "fileName": "src/Markdown/charts/ChartError.tsx",
2177
- "name": "ChartErrorProps"
2367
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2368
+ "name": "ComponentErrorProps"
2178
2369
  }
2179
2370
  ],
2180
2371
  "required": false,
2181
2372
  "type": {
2182
2373
  "name": "string"
2183
2374
  }
2184
- }
2185
- }
2186
- },
2187
- {
2188
- "tags": {},
2189
- "filePath": "src/Markdown/charts/ChartPre.tsx",
2190
- "description": "",
2191
- "displayName": "ChartPre",
2192
- "methods": [],
2193
- "props": {}
2194
- },
2195
- {
2196
- "tags": {},
2197
- "filePath": "src/Markdown/charts/ChartRenderer.tsx",
2198
- "description": "",
2199
- "displayName": "ChartRenderer",
2200
- "methods": [],
2201
- "props": {
2202
- "config": {
2375
+ },
2376
+ "message": {
2203
2377
  "defaultValue": null,
2204
- "description": "The chart configuration.",
2205
- "name": "config",
2378
+ "description": "The descriptive message explaining the error or warning.",
2379
+ "name": "message",
2206
2380
  "parent": {
2207
- "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2208
- "name": "ChartRendererProps"
2381
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2382
+ "name": "ComponentErrorProps"
2209
2383
  },
2210
2384
  "declarations": [
2211
2385
  {
2212
- "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2213
- "name": "ChartRendererProps"
2386
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2387
+ "name": "ComponentErrorProps"
2214
2388
  }
2215
2389
  ],
2216
- "required": true,
2390
+ "required": false,
2217
2391
  "type": {
2218
- "name": "ChartConfig"
2392
+ "name": "string"
2219
2393
  }
2220
2394
  },
2221
- "className": {
2395
+ "code": {
2222
2396
  "defaultValue": null,
2223
- "description": "The class name to apply to the chart container.",
2224
- "name": "className",
2397
+ "description": "The raw code or data that caused the error, displayed in a code block.",
2398
+ "name": "code",
2225
2399
  "parent": {
2226
- "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2227
- "name": "ChartRendererProps"
2400
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2401
+ "name": "ComponentErrorProps"
2228
2402
  },
2229
2403
  "declarations": [
2230
2404
  {
2231
- "fileName": "src/Markdown/charts/ChartRenderer.tsx",
2232
- "name": "ChartRendererProps"
2405
+ "fileName": "src/ComponentCatalog/ComponentError.tsx",
2406
+ "name": "ComponentErrorProps"
2233
2407
  }
2234
2408
  ],
2235
2409
  "required": false,