@katechat/ui 1.0.5 → 1.0.7

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.
package/README.md CHANGED
@@ -72,25 +72,30 @@ The package automatically uses the correct build format based on your bundler an
72
72
  ### Components
73
73
 
74
74
  #### Chat Components (`./components/chat`)
75
+
75
76
  - **ChatMessagesContainer** - Container component for chat messages with scrolling behavior
76
77
  - **ChatMessagesList** - List component for rendering chat messages
77
78
  - **Chat Input** - Input components for user messages
78
79
  - **Chat Message** - Individual message display components
79
80
 
80
81
  #### Modal Components (`./components/modal`)
82
+
81
83
  - **ImagePopup** - Modal for displaying images in fullscreen
82
84
 
83
85
  #### Icon Components (`./components/icons`)
86
+
84
87
  - **ProviderIcon** - Icons for different AI providers (OpenAI, Anthropic, etc.)
85
88
 
86
89
  ### Controls
87
90
 
88
91
  #### File Controls (`./controls`)
92
+
89
93
  - **FileDropzone** - Drag-and-drop file upload component
90
94
 
91
95
  ### Core Types & Utilities (`./core`)
92
96
 
93
97
  Type definitions and utilities for:
98
+
94
99
  - **Message Types** - Chat message structures and interfaces
95
100
  - **Model Types** - AI model configurations and metadata
96
101
  - **User Types** - User profile and authentication types
@@ -99,6 +104,7 @@ Type definitions and utilities for:
99
104
  ### Hooks (`./hooks`)
100
105
 
101
106
  Custom React hooks:
107
+
102
108
  - **useIntersectionObserver** - Detect element visibility for lazy loading and infinite scroll
103
109
  - **useTheme** - Access and manage application theme
104
110
 
@@ -130,19 +136,13 @@ import "@katechat/ui/styles.css";
130
136
  ### Basic Import
131
137
 
132
138
  ```typescript
133
- import {
134
- ChatMessagesContainer,
135
- ChatMessagesList,
136
- FileDropzone,
137
- useTheme,
138
- useIntersectionObserver
139
- } from '@katechat/ui';
139
+ import { ChatMessagesContainer, ChatMessagesList, FileDropzone, useTheme, useIntersectionObserver } from "@katechat/ui";
140
140
  ```
141
141
 
142
142
  ### Using Chat Components
143
143
 
144
144
  ```tsx
145
- import { ChatMessagesContainer, ChatMessagesList } from '@katechat/ui';
145
+ import { ChatMessagesContainer, ChatMessagesList } from "@katechat/ui";
146
146
 
147
147
  function ChatView({ messages }) {
148
148
  return (
@@ -156,11 +156,11 @@ function ChatView({ messages }) {
156
156
  ### Using File Upload
157
157
 
158
158
  ```tsx
159
- import { FileDropzone } from '@katechat/ui';
159
+ import { FileDropzone } from "@katechat/ui";
160
160
 
161
161
  function UploadArea() {
162
162
  const handleFileDrop = (files: File[]) => {
163
- console.log('Files uploaded:', files);
163
+ console.log("Files uploaded:", files);
164
164
  };
165
165
 
166
166
  return <FileDropzone onDrop={handleFileDrop} />;
@@ -170,31 +170,27 @@ function UploadArea() {
170
170
  ### Using Custom Hooks
171
171
 
172
172
  ```tsx
173
- import { useTheme, useIntersectionObserver } from '@katechat/ui';
173
+ import { useTheme, useIntersectionObserver } from "@katechat/ui";
174
174
 
175
175
  function MyComponent() {
176
176
  const { theme, setTheme } = useTheme();
177
-
177
+
178
178
  const { ref, isIntersecting } = useIntersectionObserver({
179
- threshold: 0.5
179
+ threshold: 0.5,
180
180
  });
181
181
 
182
- return (
183
- <div ref={ref}>
184
- {isIntersecting && <div>Element is visible!</div>}
185
- </div>
186
- );
182
+ return <div ref={ref}>{isIntersecting && <div>Element is visible!</div>}</div>;
187
183
  }
188
184
  ```
189
185
 
190
186
  ### Using Markdown Parser
191
187
 
192
188
  ```tsx
193
- import { parseMarkdown } from '@katechat/ui';
189
+ import { parseMarkdown } from "@katechat/ui";
194
190
 
195
191
  function MessageRenderer({ content }) {
196
192
  const html = parseMarkdown(content);
197
-
193
+
198
194
  return <div dangerouslySetInnerHTML={{ __html: html }} />;
199
195
  }
200
196
  ```