hazo_chat 2.0.13 → 2.0.14
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
|
@@ -9,7 +9,7 @@ A full-featured React chat component library for 1-1 communication with document
|
|
|
9
9
|
- 📱 **Responsive Design** - Works on desktop and mobile with adaptive layout
|
|
10
10
|
- 💬 **Real-time Messaging** - Polling or manual refresh modes for message updates with optimistic UI
|
|
11
11
|
- 📎 **File Attachments** - Support for documents and images with preview
|
|
12
|
-
- 📄 **Document Viewer** - Built-in PDF and image viewer with expand/collapse toggle
|
|
12
|
+
- 📄 **Document Viewer** - Built-in PDF and image viewer with expand/collapse toggle, download, and open in new tab actions
|
|
13
13
|
- 👤 **User Profiles** - Avatar display and user information
|
|
14
14
|
- 🔄 **Infinite Scroll** - Cursor-based pagination for message history
|
|
15
15
|
- ✅ **Read Receipts** - Track message read status
|
|
@@ -102,7 +102,54 @@ const config: Config = {
|
|
|
102
102
|
],
|
|
103
103
|
theme: {
|
|
104
104
|
extend: {
|
|
105
|
-
//
|
|
105
|
+
// Required: Font family configuration for consistent typography
|
|
106
|
+
fontFamily: {
|
|
107
|
+
sans: ['var(--font-sans)', 'system-ui', 'sans-serif'],
|
|
108
|
+
mono: ['var(--font-mono)', 'monospace'],
|
|
109
|
+
},
|
|
110
|
+
// Required: Color variables for shadcn/ui compatibility
|
|
111
|
+
colors: {
|
|
112
|
+
background: 'var(--background)',
|
|
113
|
+
foreground: 'var(--foreground)',
|
|
114
|
+
card: {
|
|
115
|
+
DEFAULT: 'var(--card)',
|
|
116
|
+
foreground: 'var(--card-foreground)',
|
|
117
|
+
},
|
|
118
|
+
popover: {
|
|
119
|
+
DEFAULT: 'var(--popover)',
|
|
120
|
+
foreground: 'var(--popover-foreground)',
|
|
121
|
+
},
|
|
122
|
+
primary: {
|
|
123
|
+
DEFAULT: 'var(--primary)',
|
|
124
|
+
foreground: 'var(--primary-foreground)',
|
|
125
|
+
},
|
|
126
|
+
secondary: {
|
|
127
|
+
DEFAULT: 'var(--secondary)',
|
|
128
|
+
foreground: 'var(--secondary-foreground)',
|
|
129
|
+
},
|
|
130
|
+
muted: {
|
|
131
|
+
DEFAULT: 'var(--muted)',
|
|
132
|
+
foreground: 'var(--muted-foreground)',
|
|
133
|
+
},
|
|
134
|
+
accent: {
|
|
135
|
+
DEFAULT: 'var(--accent)',
|
|
136
|
+
foreground: 'var(--accent-foreground)',
|
|
137
|
+
},
|
|
138
|
+
destructive: {
|
|
139
|
+
DEFAULT: 'var(--destructive)',
|
|
140
|
+
foreground: 'var(--destructive-foreground)',
|
|
141
|
+
},
|
|
142
|
+
border: 'var(--border)',
|
|
143
|
+
input: 'var(--input)',
|
|
144
|
+
ring: 'var(--ring)',
|
|
145
|
+
},
|
|
146
|
+
// Required: Border radius configuration
|
|
147
|
+
borderRadius: {
|
|
148
|
+
lg: 'var(--radius)',
|
|
149
|
+
md: 'calc(var(--radius) - 2px)',
|
|
150
|
+
sm: 'calc(var(--radius) - 4px)',
|
|
151
|
+
},
|
|
152
|
+
// Your additional theme extensions can go here
|
|
106
153
|
},
|
|
107
154
|
},
|
|
108
155
|
plugins: [],
|
|
@@ -111,6 +158,18 @@ const config: Config = {
|
|
|
111
158
|
export default config;
|
|
112
159
|
```
|
|
113
160
|
|
|
161
|
+
**Important Theme Extensions:**
|
|
162
|
+
|
|
163
|
+
The `hazo_chat` component relies on specific Tailwind theme extensions to ensure consistent styling:
|
|
164
|
+
|
|
165
|
+
1. **Font Families:** The `font-sans` and `font-mono` utilities must map to CSS variables for consistent typography across all consuming applications.
|
|
166
|
+
|
|
167
|
+
2. **Color Variables:** All color utilities (e.g., `bg-background`, `text-foreground`, `border-border`) must map to CSS variables defined in your `globals.css`.
|
|
168
|
+
|
|
169
|
+
3. **Border Radius:** The component uses `rounded-lg`, `rounded-md`, and `rounded-sm` which must map to your CSS `--radius` variable.
|
|
170
|
+
|
|
171
|
+
**Note:** If you're using shadcn/ui in your project, your Tailwind config likely already includes these extensions. Simply add the `hazo_chat` package path to the `content` array.
|
|
172
|
+
|
|
114
173
|
**Why This Is Required:**
|
|
115
174
|
|
|
116
175
|
The `hazo_chat` component library uses Tailwind CSS utility classes (e.g., `flex`, `h-full`, `bg-background`, `p-4`) for all styling. These classes are not compiled into CSS by default. By adding the package path to your Tailwind `content` array, Tailwind will:
|
|
@@ -910,6 +969,8 @@ interface ChatReferenceItem {
|
|
|
910
969
|
}
|
|
911
970
|
```
|
|
912
971
|
|
|
972
|
+
**Note on MIME Type:** The `mime_type` property is optional. If not provided, the component will automatically infer the MIME type from the file extension (e.g., `.jpg` → `image/jpeg`, `.pdf` → `application/pdf`). This ensures document preview works even when `mime_type` is not explicitly set. Supported file extensions for inference include: `pdf`, `png`, `jpg`, `jpeg`, `gif`, `webp`, `txt`, `doc`, `docx`.
|
|
973
|
+
|
|
913
974
|
## Database Schema
|
|
914
975
|
|
|
915
976
|
### hazo_chat Table
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_chat_document_viewer.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_chat/hazo_chat_document_viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,2BAA2B,
|
|
1
|
+
{"version":3,"file":"hazo_chat_document_viewer.d.ts","sourceRoot":"","sources":["../../../src/components/hazo_chat/hazo_chat_document_viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,2BAA2B,EAAqB,MAAM,sBAAsB,CAAC;AAiQ3F,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,SAAS,EACV,EAAE,2BAA2B,2CAuD7B;yBA1De,sBAAsB"}
|
|
@@ -10,13 +10,30 @@
|
|
|
10
10
|
'use client';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
import React, { useMemo } from 'react';
|
|
13
|
-
import { IoDocumentOutline, IoDownloadOutline } from 'react-icons/io5';
|
|
13
|
+
import { IoDocumentOutline, IoDownloadOutline, IoOpenOutline } from 'react-icons/io5';
|
|
14
14
|
import { cn } from '../../lib/utils.js';
|
|
15
|
-
import { PREVIEWABLE_TYPES } from '../../lib/constants.js';
|
|
15
|
+
import { PREVIEWABLE_TYPES, MIME_TYPE_MAP } from '../../lib/constants.js';
|
|
16
16
|
import { LoadingSkeleton } from '../ui/loading_skeleton.js';
|
|
17
|
+
import { Button } from '../ui/button.js';
|
|
17
18
|
// ============================================================================
|
|
18
19
|
// Helper Functions
|
|
19
20
|
// ============================================================================
|
|
21
|
+
/**
|
|
22
|
+
* Infer MIME type from file name extension
|
|
23
|
+
*/
|
|
24
|
+
function infer_mime_type(reference) {
|
|
25
|
+
// If mime_type is already provided, use it
|
|
26
|
+
if (reference.mime_type) {
|
|
27
|
+
return reference.mime_type;
|
|
28
|
+
}
|
|
29
|
+
// Try to infer from file name extension
|
|
30
|
+
const name = reference.name || reference.url || '';
|
|
31
|
+
const extension = name.split('.').pop()?.toLowerCase();
|
|
32
|
+
if (extension && MIME_TYPE_MAP[extension]) {
|
|
33
|
+
return MIME_TYPE_MAP[extension];
|
|
34
|
+
}
|
|
35
|
+
return undefined;
|
|
36
|
+
}
|
|
20
37
|
/**
|
|
21
38
|
* Check if file is previewable as image
|
|
22
39
|
*/
|
|
@@ -41,6 +58,12 @@ function is_text(mime_type) {
|
|
|
41
58
|
return false;
|
|
42
59
|
return PREVIEWABLE_TYPES.text.includes(mime_type);
|
|
43
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Wrapper component that adds download and open in new tab buttons to viewers
|
|
63
|
+
*/
|
|
64
|
+
function ViewerWithActions({ url, name, children }) {
|
|
65
|
+
return (_jsxs("div", { className: "relative w-full h-full", children: [_jsxs("div", { className: "absolute top-3 right-3 z-10 flex items-center gap-2", children: [_jsx("a", { href: url, download: name, "aria-label": `Download ${name}`, children: _jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 bg-background/60 backdrop-blur-sm hover:bg-background/80", children: _jsx(IoDownloadOutline, { className: "h-4 w-4" }) }) }), _jsx(Button, { variant: "outline", size: "icon", className: "h-8 w-8 bg-background/60 backdrop-blur-sm hover:bg-background/80", onClick: () => window.open(url, '_blank'), "aria-label": `Open ${name} in a new tab`, children: _jsx(IoOpenOutline, { className: "h-4 w-4" }) })] }), _jsx("div", { className: "w-full h-full", children: children })] }));
|
|
66
|
+
}
|
|
44
67
|
function PdfViewer({ url, name }) {
|
|
45
68
|
// Note: In production, this would use hazo_pdf component
|
|
46
69
|
// For now, we use an iframe fallback
|
|
@@ -93,19 +116,25 @@ function EmptyState() {
|
|
|
93
116
|
// Main Component
|
|
94
117
|
// ============================================================================
|
|
95
118
|
export function HazoChatDocumentViewer({ reference, className }) {
|
|
96
|
-
//
|
|
119
|
+
// Infer MIME type from reference (use provided or infer from filename)
|
|
120
|
+
const inferred_mime_type = useMemo(() => {
|
|
121
|
+
if (!reference)
|
|
122
|
+
return undefined;
|
|
123
|
+
return infer_mime_type(reference);
|
|
124
|
+
}, [reference]);
|
|
125
|
+
// Determine viewer type based on inferred mime_type
|
|
97
126
|
const viewer_type = useMemo(() => {
|
|
98
127
|
if (!reference)
|
|
99
128
|
return 'empty';
|
|
100
|
-
if (is_pdf(
|
|
129
|
+
if (is_pdf(inferred_mime_type))
|
|
101
130
|
return 'pdf';
|
|
102
|
-
if (is_image(
|
|
131
|
+
if (is_image(inferred_mime_type))
|
|
103
132
|
return 'image';
|
|
104
|
-
if (is_text(
|
|
133
|
+
if (is_text(inferred_mime_type))
|
|
105
134
|
return 'text';
|
|
106
135
|
return 'download';
|
|
107
|
-
}, [reference]);
|
|
108
|
-
return (_jsxs("div", { className: cn('cls_hazo_chat_document_viewer', 'flex-1 bg-muted/30 rounded-lg overflow-hidden', className), role: "region", "aria-label": "Document viewer", children: [viewer_type === 'empty' && _jsx(EmptyState, {}), viewer_type === 'pdf' && reference && (_jsx(PdfViewer, { url: reference.url, name: reference.name })), viewer_type === 'image' && reference && (_jsx(ImageViewer, { url: reference.url, name: reference.name })), viewer_type === 'text' && reference && (_jsx(TextViewer, { url: reference.url, name: reference.name })), viewer_type === 'download' && reference && (_jsx(DownloadFallback, { url: reference.url, name: reference.name, mime_type: reference.mime_type }))] }));
|
|
136
|
+
}, [reference, inferred_mime_type]);
|
|
137
|
+
return (_jsxs("div", { className: cn('cls_hazo_chat_document_viewer', 'flex-1 bg-muted/30 rounded-lg overflow-hidden', className), role: "region", "aria-label": "Document viewer", children: [viewer_type === 'empty' && _jsx(EmptyState, {}), viewer_type === 'pdf' && reference && (_jsx(ViewerWithActions, { url: reference.url, name: reference.name, children: _jsx(PdfViewer, { url: reference.url, name: reference.name }) })), viewer_type === 'image' && reference && (_jsx(ViewerWithActions, { url: reference.url, name: reference.name, children: _jsx(ImageViewer, { url: reference.url, name: reference.name }) })), viewer_type === 'text' && reference && (_jsx(ViewerWithActions, { url: reference.url, name: reference.name, children: _jsx(TextViewer, { url: reference.url, name: reference.name }) })), viewer_type === 'download' && reference && (_jsx(DownloadFallback, { url: reference.url, name: reference.name, mime_type: reference.mime_type }))] }));
|
|
109
138
|
}
|
|
110
139
|
HazoChatDocumentViewer.displayName = 'HazoChatDocumentViewer';
|
|
111
140
|
//# sourceMappingURL=hazo_chat_document_viewer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_chat_document_viewer.js","sourceRoot":"","sources":["../../../src/components/hazo_chat/hazo_chat_document_viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,YAAY,CAAC;;AAEb,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"hazo_chat_document_viewer.js","sourceRoot":"","sources":["../../../src/components/hazo_chat/hazo_chat_document_viewer.tsx"],"names":[],"mapp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