@hanzo/rooms 0.1.8 → 0.1.9
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/Drive.js +4 -4
- package/package.json +1 -1
package/dist/Drive.js
CHANGED
|
@@ -435,10 +435,10 @@ export function Drive() {
|
|
|
435
435
|
setNaming(null);
|
|
436
436
|
if (e.key === 'Enter')
|
|
437
437
|
handleCreateFolder(naming.value);
|
|
438
|
-
}, placeholder: "Folder name", "aria-label": "Folder name" }), ...BARE }), _jsx(Button, { variant: "primary", size: "sm", onClick: () => handleCreateFolder(naming.value), children: "Create" }), _jsx(Button, { variant: "ghost", size: "sm", color: "$soft", onClick: () => setNaming(null), children: "Cancel" })] })) : null, busy ? (_jsxs(Text, { fontSize: "$2", color: "$soft", children: [busy, "\u2026"] })) : null, bucket || prefix ? (_jsx(YStack, { gap: "$2", children: _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: 8, overflowX: "auto", overflowY: "hidden", children: [_jsxs(View, { display: "grid", gridTemplateColumns: FILES, px: 16, py: 10, borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { ...HEAD, children: "NAME" }), _jsx(Text, { ...HEAD, children: "TYPE" }), _jsx(Text, { ...HEAD, children: "UPDATED \u2193" }), _jsx(Text, { ...HEAD, children: "SIZE" }), _jsx(View, {})] }), !filteredEntries || filteredEntries.length === 0 ? (_jsx(Text, { py: 36, px: 16, text: "center", fontSize: "$2", color: "$faint", children: "None" })) : (filteredEntries.map((e) => {
|
|
438
|
+
}, placeholder: "Folder name", "aria-label": "Folder name" }), ...BARE }), _jsx(Button, { variant: "primary", size: "sm", onClick: () => handleCreateFolder(naming.value), children: "Create" }), _jsx(Button, { variant: "ghost", size: "sm", color: "$soft", onClick: () => setNaming(null), children: "Cancel" })] })) : null, busy ? (_jsxs(Text, { fontSize: "$2", color: "$soft", children: [busy, "\u2026"] })) : null, bucket || prefix ? (_jsx(YStack, { gap: "$2", children: _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: 8, overflowX: "auto", overflowY: "hidden", children: [_jsxs(View, { display: "grid", gridTemplateColumns: FILES, minW: "min-content", px: 16, py: 10, borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { ...HEAD, children: "NAME" }), _jsx(Text, { ...HEAD, children: "TYPE" }), _jsx(Text, { ...HEAD, children: "UPDATED \u2193" }), _jsx(Text, { ...HEAD, children: "SIZE" }), _jsx(View, {})] }), !filteredEntries || filteredEntries.length === 0 ? (_jsx(Text, { py: 36, px: 16, text: "center", fontSize: "$2", color: "$faint", children: "None" })) : (filteredEntries.map((e) => {
|
|
439
439
|
const isFolder = e.isDir || e.key.endsWith('/');
|
|
440
440
|
const cleanName = e.key.replace(/\/+$/, '');
|
|
441
|
-
return (_jsxs(View, { display: "grid", gridTemplateColumns: FILES, px: 16, py: 11, items: "center", cursor: "pointer", borderBottomWidth: 1, borderColor: "$borderColor", transition: "100ms", hoverStyle: { bg: '$hover' }, onClick: () => {
|
|
441
|
+
return (_jsxs(View, { display: "grid", gridTemplateColumns: FILES, minW: "min-content", px: 16, py: 11, items: "center", cursor: "pointer", borderBottomWidth: 1, borderColor: "$borderColor", transition: "100ms", hoverStyle: { bg: '$hover' }, onClick: () => {
|
|
442
442
|
if (isFolder) {
|
|
443
443
|
setPrefix(`${prefix}${cleanName}/`);
|
|
444
444
|
}
|
|
@@ -458,9 +458,9 @@ export function Drive() {
|
|
|
458
458
|
}))] }) })) : (_jsxs(_Fragment, { children: [_jsxs(YStack, { gap: "$2.5", children: [_jsx(Text, { fontSize: 12, fontWeight: "600", color: "$soft", children: "Storage Buckets" }), _jsx(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: 8, overflowX: "auto", overflowY: "hidden", children: failed ? (_jsxs(Text, { ...NOTE, children: [failed, _jsx(Button, { size: "sm", mx: "auto", mt: 10, onClick: () => {
|
|
459
459
|
setFailed(null);
|
|
460
460
|
setReload((n) => n + 1);
|
|
461
|
-
}, children: "Try again" })] })) : !buckets ? (_jsx(Text, { ...NOTE, children: "Reading your storage\u2026" })) : buckets.length === 0 ? (_jsx(Text, { ...NOTE, children: "No buckets yet." })) : (buckets.map((b) => (_jsxs(XStack, { onClick: () => openBucket(b.name), items: "center", justify: "space-between", px: 16, py: 12, cursor: "pointer", bg: "transparent", transition: "100ms", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { items: "center", gap: "$2.5", children: [_jsx(Folder, { size: 17, color: "var(--foreground)" }), _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: getBucketDisplayName(b) })] }), _jsxs(XStack, { items: "center", gap: "$4", children: [_jsx(Text, { fontSize: "$2", color: "$faint", children: when(b.createdAt) }), _jsx(More, { onPress: (e) => e.stopPropagation() })] })] }, b.name)))) })] }), _jsxs(YStack, { gap: "$2.5", children: [_jsx(Text, { fontSize: 12, fontWeight: "600", color: "$soft", children: "Projects (Unified VFS)" }), _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: 8, overflowX: "auto", overflowY: "hidden", children: [_jsxs(View, { display: "grid", gridTemplateColumns: PROJECTS, px: 16, py: 10, borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { ...HEAD, children: "NAME" }), _jsx(Text, { ...HEAD, children: "TYPE" }), _jsx(Text, { ...HEAD, children: "UPDATED \u2193" }), _jsx(Text, { ...HEAD, children: "SIZE" }), _jsx(View, {})] }), filteredProjects.length === 0 ? (_jsx(Text, { py: 36, px: 16, text: "center", fontSize: "$2", color: "$faint", children: "None" })) : (filteredProjects.map((p) => (_jsxs(View, { onClick: () => {
|
|
461
|
+
}, children: "Try again" })] })) : !buckets ? (_jsx(Text, { ...NOTE, children: "Reading your storage\u2026" })) : buckets.length === 0 ? (_jsx(Text, { ...NOTE, children: "No buckets yet." })) : (buckets.map((b) => (_jsxs(XStack, { onClick: () => openBucket(b.name), items: "center", justify: "space-between", px: 16, py: 12, cursor: "pointer", bg: "transparent", transition: "100ms", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { items: "center", gap: "$2.5", children: [_jsx(Folder, { size: 17, color: "var(--foreground)" }), _jsx(Text, { fontSize: "$2", fontWeight: "500", color: "$ink", children: getBucketDisplayName(b) })] }), _jsxs(XStack, { items: "center", gap: "$4", children: [_jsx(Text, { fontSize: "$2", color: "$faint", children: when(b.createdAt) }), _jsx(More, { onPress: (e) => e.stopPropagation() })] })] }, b.name)))) })] }), _jsxs(YStack, { gap: "$2.5", children: [_jsx(Text, { fontSize: 12, fontWeight: "600", color: "$soft", children: "Projects (Unified VFS)" }), _jsxs(YStack, { borderWidth: 1, borderColor: "$borderColor", rounded: 8, overflowX: "auto", overflowY: "hidden", children: [_jsxs(View, { display: "grid", gridTemplateColumns: PROJECTS, minW: "min-content", px: 16, py: 10, borderBottomWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { ...HEAD, children: "NAME" }), _jsx(Text, { ...HEAD, children: "TYPE" }), _jsx(Text, { ...HEAD, children: "UPDATED \u2193" }), _jsx(Text, { ...HEAD, children: "SIZE" }), _jsx(View, {})] }), filteredProjects.length === 0 ? (_jsx(Text, { py: 36, px: 16, text: "center", fontSize: "$2", color: "$faint", children: "None" })) : (filteredProjects.map((p) => (_jsxs(View, { onClick: () => {
|
|
462
462
|
const targetBucket = buckets[0]?.name || 'hanzo';
|
|
463
463
|
openBucket(targetBucket);
|
|
464
464
|
setPrefix(`projects/${p.name || p.id}/`);
|
|
465
|
-
}, display: "grid", gridTemplateColumns: PROJECTS, px: 16, py: 11, items: "center", cursor: "pointer", borderBottomWidth: 1, borderColor: "$borderColor", transition: "100ms", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { items: "center", gap: "$2.5", minW: 0, children: [_jsx(Folder, { size: 16, color: "var(--foreground)" }), _jsx(Text, { ...NAME, children: p.name })] }), _jsx(View, { items: "flex-start", children: _jsx(Text, { ...CHIP, children: p.type }) }), _jsx(Text, { ...CELL, children: p.updated }), _jsx(Text, { ...CELL, children: p.size }), _jsx(View, { items: "flex-start", children: _jsx(More, { onPress: (e) => e.stopPropagation() }) })] }, p.id))))] })] })] }))] })] }), over ? (_jsx(Box, { position: "absolute", t: 0, l: 0, r: 0, b: 0, z: 1000, bg: VEIL, borderWidth: 2, borderStyle: "dashed", borderColor: "var(--ring)", rounded: "$3", display: "flex", items: "center", justify: "center", pointerEvents: "none", children: _jsxs(YStack, { items: "center", gap: "$2", children: [_jsx(Upload, { size: 36, color: "currentColor" }), _jsxs(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: ["Drop files to upload to ", bucket || workspace] })] }) })) : null] }));
|
|
465
|
+
}, display: "grid", gridTemplateColumns: PROJECTS, minW: "min-content", px: 16, py: 11, items: "center", cursor: "pointer", borderBottomWidth: 1, borderColor: "$borderColor", transition: "100ms", hoverStyle: { bg: '$hover' }, children: [_jsxs(XStack, { items: "center", gap: "$2.5", minW: 0, children: [_jsx(Folder, { size: 16, color: "var(--foreground)" }), _jsx(Text, { ...NAME, children: p.name })] }), _jsx(View, { items: "flex-start", children: _jsx(Text, { ...CHIP, children: p.type }) }), _jsx(Text, { ...CELL, children: p.updated }), _jsx(Text, { ...CELL, children: p.size }), _jsx(View, { items: "flex-start", children: _jsx(More, { onPress: (e) => e.stopPropagation() }) })] }, p.id))))] })] })] }))] })] }), over ? (_jsx(Box, { position: "absolute", t: 0, l: 0, r: 0, b: 0, z: 1000, bg: VEIL, borderWidth: 2, borderStyle: "dashed", borderColor: "var(--ring)", rounded: "$3", display: "flex", items: "center", justify: "center", pointerEvents: "none", children: _jsxs(YStack, { items: "center", gap: "$2", children: [_jsx(Upload, { size: 36, color: "currentColor" }), _jsxs(Text, { fontSize: "$4", fontWeight: "600", color: "$ink", children: ["Drop files to upload to ", bucket || workspace] })] }) })) : null] }));
|
|
466
466
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/rooms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "The workspace rooms — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board, Work, Bots — and the frame that holds them, once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|