updated readme
This commit is contained in:
26
CLAUDE.md
26
CLAUDE.md
@@ -13,7 +13,10 @@ src/
|
||||
__init__.py
|
||||
base.py # AsyncElement base class
|
||||
elements.py # Pre-built async element types
|
||||
chat_input.py # ChatInput component (to be moved into package)
|
||||
components/
|
||||
__init__.py
|
||||
file_drop.py # FileDrop and ImageDrop components
|
||||
chat_input.py # ChatInput component
|
||||
```
|
||||
|
||||
## Key Components
|
||||
@@ -28,12 +31,27 @@ Provides async-aware UI elements that can perform async operations during initia
|
||||
- AsyncExpansion, AsyncCarousel, AsyncMenu
|
||||
- And more...
|
||||
|
||||
### 2. ChatInput Component
|
||||
### 2. Components (`niceguiex.components`)
|
||||
|
||||
#### ChatInput
|
||||
A textarea component optimized for chat interfaces:
|
||||
- Enter to send message
|
||||
- Shift+Enter for new line
|
||||
- Callback-based message handling
|
||||
- Currently in `chat_input.py`, should be moved to package structure
|
||||
|
||||
#### FileDrop
|
||||
Drag-and-drop file upload component:
|
||||
- Visual drag-over feedback
|
||||
- Click to browse or drag & drop functionality
|
||||
- Async callback support with file name, type, and content
|
||||
- Support for single or multiple file uploads
|
||||
- Customizable file type filtering
|
||||
|
||||
#### ImageDrop
|
||||
Specialized FileDrop for images:
|
||||
- Returns PIL Image objects
|
||||
- Handles image-specific processing
|
||||
- Support for single or multiple image uploads
|
||||
|
||||
## Import Convention
|
||||
|
||||
@@ -41,7 +59,7 @@ The package uses a submodule structure to organize different types of extensions
|
||||
|
||||
```python
|
||||
from niceguiex.async_elements import AsyncColumn, AsyncCard
|
||||
from chat_input import ChatInput # To be: from niceguiex.inputs import ChatInput
|
||||
from niceguiex.components import ChatInput, FileDrop, ImageDrop
|
||||
```
|
||||
|
||||
## Technical Notes
|
||||
|
||||
Reference in New Issue
Block a user