@relayfile/file-observer 0.1.0
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/next-env.d.ts +5 -0
- package/next.config.js +10 -0
- package/package.json +62 -0
- package/postcss.config.mjs +5 -0
- package/src/app/globals.css +45 -0
- package/src/app/layout.tsx +25 -0
- package/src/app/page.tsx +1520 -0
- package/src/components/FileDetails.tsx +442 -0
- package/src/components/FileTree.tsx +490 -0
- package/src/components/WorkspaceSelector.tsx +127 -0
- package/src/hooks/useFileEvents.ts +267 -0
- package/src/hooks/useFileTree.ts +124 -0
- package/src/lib/relayfile-client.ts +459 -0
- package/tsconfig.json +23 -0
- package/wrangler.file-observer.toml +10 -0
package/next-env.d.ts
ADDED
package/next.config.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** @type {import('next').NextConfig} */
|
|
2
|
+
const basePath = process.env.FILE_OBSERVER_BASE_PATH || process.env.NEXT_PUBLIC_FILE_OBSERVER_BASE_PATH || '';
|
|
3
|
+
|
|
4
|
+
const nextConfig = {
|
|
5
|
+
reactStrictMode: true,
|
|
6
|
+
output: 'export',
|
|
7
|
+
...(basePath ? { basePath } : {}),
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
module.exports = nextConfig;
|
package/package.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@relayfile/file-observer",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "RelayFile observer dashboard for browsing synced workspace files and metadata",
|
|
5
|
+
"files": [
|
|
6
|
+
"src",
|
|
7
|
+
"next-env.d.ts",
|
|
8
|
+
"next.config.js",
|
|
9
|
+
"postcss.config.mjs",
|
|
10
|
+
"tsconfig.json",
|
|
11
|
+
"wrangler.file-observer.toml"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"dev": "next dev --port 3101",
|
|
15
|
+
"build": "next build",
|
|
16
|
+
"pages:build": "next build",
|
|
17
|
+
"start": "next start",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"prepublishOnly": "npm run pages:build"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"class-variance-authority": "^0.7.0",
|
|
23
|
+
"clsx": "^2.1.0",
|
|
24
|
+
"lucide-react": "^0.400.0",
|
|
25
|
+
"next": "^14.2.0",
|
|
26
|
+
"react": "^18.3.0",
|
|
27
|
+
"react-dom": "^18.3.0",
|
|
28
|
+
"tailwind-merge": "^2.3.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@tailwindcss/postcss": "^4.0.0",
|
|
32
|
+
"@testing-library/react": "^16.0.0",
|
|
33
|
+
"@types/node": "^22.0.0",
|
|
34
|
+
"@types/react": "^18.3.0",
|
|
35
|
+
"@types/react-dom": "^18.3.0",
|
|
36
|
+
"jsdom": "^29.0.2",
|
|
37
|
+
"postcss": "^8.5.0",
|
|
38
|
+
"tailwindcss": "^4.0.0",
|
|
39
|
+
"typescript": "^5.7.0",
|
|
40
|
+
"vitest": "^2.0.0"
|
|
41
|
+
},
|
|
42
|
+
"publishConfig": {
|
|
43
|
+
"access": "public"
|
|
44
|
+
},
|
|
45
|
+
"repository": {
|
|
46
|
+
"type": "git",
|
|
47
|
+
"url": "https://github.com/AgentWorkforce/relayfile",
|
|
48
|
+
"directory": "packages/file-observer"
|
|
49
|
+
},
|
|
50
|
+
"license": "MIT",
|
|
51
|
+
"keywords": [
|
|
52
|
+
"relayfile",
|
|
53
|
+
"observer",
|
|
54
|
+
"dashboard",
|
|
55
|
+
"filesystem",
|
|
56
|
+
"sync",
|
|
57
|
+
"agent"
|
|
58
|
+
],
|
|
59
|
+
"engines": {
|
|
60
|
+
"node": ">=18"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--background: #0a0a0b;
|
|
5
|
+
--foreground: #fafafa;
|
|
6
|
+
--surface-soft: #18181b;
|
|
7
|
+
--surface-muted: #27272a;
|
|
8
|
+
--border-default: #3f3f46;
|
|
9
|
+
--border-strong: #52525b;
|
|
10
|
+
--brand-primary: #6366f1;
|
|
11
|
+
--brand-primary-faint: rgba(99, 102, 241, 0.1);
|
|
12
|
+
--text-secondary: #a1a1aa;
|
|
13
|
+
--status-warning: #f59e0b;
|
|
14
|
+
--status-success: #10b981;
|
|
15
|
+
--status-error: #ef4444;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
* {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
body {
|
|
23
|
+
background: var(--background);
|
|
24
|
+
color: var(--foreground);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.brand-grid {
|
|
28
|
+
background-image:
|
|
29
|
+
linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
|
|
30
|
+
linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
|
|
31
|
+
background-size: 40px 40px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.brand-glass {
|
|
35
|
+
background: rgba(24, 24, 27, 0.8);
|
|
36
|
+
backdrop-filter: blur(12px);
|
|
37
|
+
border: 1px solid var(--border-default);
|
|
38
|
+
border-radius: 12px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.brand-card {
|
|
42
|
+
background: var(--surface-soft);
|
|
43
|
+
border: 1px solid var(--border-default);
|
|
44
|
+
border-radius: 12px;
|
|
45
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import './globals.css';
|
|
2
|
+
|
|
3
|
+
export const metadata = {
|
|
4
|
+
title: 'RelayFile Observer',
|
|
5
|
+
description: 'File observer dashboard for relayfile workspaces',
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function RootLayout({
|
|
9
|
+
children,
|
|
10
|
+
}: {
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
}) {
|
|
13
|
+
return (
|
|
14
|
+
<html lang="en">
|
|
15
|
+
<body className="bg-[#0a0a0b] text-[#fafafa] antialiased">
|
|
16
|
+
<div className="min-h-screen">
|
|
17
|
+
<header className="border-b border-[#27272a] px-6 py-4">
|
|
18
|
+
<h1 className="text-xl font-semibold text-[#fafafa]">RelayFile Observer</h1>
|
|
19
|
+
</header>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
</body>
|
|
23
|
+
</html>
|
|
24
|
+
);
|
|
25
|
+
}
|