reifyui 0.16.0 → 0.16.1
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/dist/agent-chat.cjs +2 -2
- package/dist/agent-chat.cjs.map +1 -1
- package/dist/agent-chat.d.ts +2 -0
- package/dist/agent-chat.js +1 -1
- package/dist/{chunk-4SVQGVJH.js → chunk-UP3CNKZR.js} +3 -3
- package/dist/{chunk-4SVQGVJH.js.map → chunk-UP3CNKZR.js.map} +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/agent-chat/index.d.ts +2 -0
- package/src/components/FileCard.jsx +4 -2
- package/styles/file.css +2 -0
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reifyui",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.1",
|
|
4
4
|
"description": "The open-source rendering & interaction layer for agentic applications. Stream and render any agent's output as polished, application-native UI — model-agnostic, framework-agnostic, design-system-native. The foundation for building generative-UI and agent products.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -214,6 +214,8 @@ export interface FileCardProps {
|
|
|
214
214
|
onCopy?: () => Promise<void> | void;
|
|
215
215
|
/** the file open in the preview */
|
|
216
216
|
active?: boolean;
|
|
217
|
+
/** an image's own picture (a url the browser can load, e.g. an object url) instead of its kind's icon */
|
|
218
|
+
thumb?: string;
|
|
217
219
|
className?: string;
|
|
218
220
|
}
|
|
219
221
|
export function FileCard(props: FileCardProps): ReactElement;
|
|
@@ -30,7 +30,7 @@ export function bytesLabel(n) {
|
|
|
30
30
|
return `${(n / 1048576).toFixed(1)} MB`;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export function FileCard({ name, origin = 'output', bytes, onPreview, onDownload, onCopy, active = false, className = '' }) {
|
|
33
|
+
export function FileCard({ name, origin = 'output', bytes, onPreview, onDownload, onCopy, active = false, thumb, className = '' }) {
|
|
34
34
|
// Copy: the host copies the file's text (it owns the read); the card says it did, briefly.
|
|
35
35
|
const [copied, setCopied] = useState('');
|
|
36
36
|
useEffect(() => { if (!copied) return undefined; const t = setTimeout(() => setCopied(''), 1600); return () => clearTimeout(t); }, [copied]);
|
|
@@ -45,7 +45,9 @@ export function FileCard({ name, origin = 'output', bytes, onPreview, onDownload
|
|
|
45
45
|
tabIndex={open ? 0 : undefined}
|
|
46
46
|
onKeyDown={open ? (e) => { if (e.key === 'Enter' || e.key === ' ') { e.preventDefault(); open(e); } } : undefined}
|
|
47
47
|
title={name}>
|
|
48
|
-
|
|
48
|
+
{/* an image shows itself (the host hands a url it can read, e.g. an object url); else its kind */}
|
|
49
|
+
{thumb ? <span className="uic-filecard-thumb"><img src={thumb} alt="" /></span>
|
|
50
|
+
: <span className="uic-filecard-ic"><FileTypeIcon name={name} size={32} /></span>}
|
|
49
51
|
<span className="uic-filecard-meta">
|
|
50
52
|
<span className="uic-filecard-name">{name}</span>
|
|
51
53
|
<span className="uic-filecard-sub">{subtitle(name, origin, bytes)}</span>
|
package/styles/file.css
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
/* the file open in a preview beside the conversation */
|
|
17
17
|
.uic-filecard.is-active { border-color: var(--uic-brand, #285AFF); box-shadow: 0 0 0 3px var(--uic-focus-ring, rgba(40, 90, 255, .14)); }
|
|
18
18
|
.uic-filecard-ic { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
|
|
19
|
+
.uic-filecard-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--uic-surface-2, #F7F8FA); border: 1px solid var(--uic-line, #DDDFE6); }
|
|
20
|
+
.uic-filecard-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
|
|
19
21
|
.uic-filecard-meta { flex: 1 1 auto; min-width: 0; }
|
|
20
22
|
.uic-filecard-name {
|
|
21
23
|
display: block; font-size: 13.5px; font-weight: 600; color: var(--uic-ink, #111317);
|