@mrpatronz/nexusflow 0.2.19 → 1.3.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/README.md +37 -7
- package/dist/analyzers/index.d.ts +23 -0
- package/dist/analyzers/index.d.ts.map +1 -1
- package/dist/analyzers/index.js +62 -0
- package/dist/analyzers/index.js.map +1 -1
- package/dist/commands/add-repo.d.ts +9 -0
- package/dist/commands/add-repo.d.ts.map +1 -1
- package/dist/commands/add-repo.js +12 -1
- package/dist/commands/add-repo.js.map +1 -1
- package/dist/commands/add-repo.test.d.ts +2 -0
- package/dist/commands/add-repo.test.d.ts.map +1 -0
- package/dist/commands/add-repo.test.js +30 -0
- package/dist/commands/add-repo.test.js.map +1 -0
- package/dist/commands/commands.test.js +26 -6
- package/dist/commands/commands.test.js.map +1 -1
- package/dist/commands/commit.d.ts +7 -1
- package/dist/commands/commit.d.ts.map +1 -1
- package/dist/commands/commit.js +31 -8
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/commit.test.d.ts +2 -0
- package/dist/commands/commit.test.d.ts.map +1 -0
- package/dist/commands/commit.test.js +54 -0
- package/dist/commands/commit.test.js.map +1 -0
- package/dist/commands/diff.d.ts +9 -2
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +36 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +16 -20
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/handoff.d.ts.map +1 -1
- package/dist/commands/handoff.js +11 -15
- package/dist/commands/handoff.js.map +1 -1
- package/dist/commands/refresh.d.ts +4 -2
- package/dist/commands/refresh.d.ts.map +1 -1
- package/dist/commands/refresh.js +20 -36
- package/dist/commands/refresh.js.map +1 -1
- package/dist/commands/schedule.d.ts +35 -0
- package/dist/commands/schedule.d.ts.map +1 -0
- package/dist/commands/schedule.js +151 -0
- package/dist/commands/schedule.js.map +1 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +28 -7
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/tui.js +1 -1
- package/dist/commands/tui.js.map +1 -1
- package/dist/commands/ui.d.ts +1 -0
- package/dist/commands/ui.d.ts.map +1 -1
- package/dist/commands/ui.js +5 -2
- package/dist/commands/ui.js.map +1 -1
- package/dist/core/adapters/local-storage.d.ts +7 -0
- package/dist/core/adapters/local-storage.d.ts.map +1 -1
- package/dist/core/adapters/local-storage.js +13 -4
- package/dist/core/adapters/local-storage.js.map +1 -1
- package/dist/core/adapters/storage.test.js +18 -0
- package/dist/core/adapters/storage.test.js.map +1 -1
- package/dist/core/analysis-cache.d.ts +58 -0
- package/dist/core/analysis-cache.d.ts.map +1 -0
- package/dist/core/analysis-cache.js +116 -0
- package/dist/core/analysis-cache.js.map +1 -0
- package/dist/core/analysis-cache.test.d.ts +2 -0
- package/dist/core/analysis-cache.test.d.ts.map +1 -0
- package/dist/core/analysis-cache.test.js +108 -0
- package/dist/core/analysis-cache.test.js.map +1 -0
- package/dist/core/refresh.d.ts +41 -0
- package/dist/core/refresh.d.ts.map +1 -0
- package/dist/core/refresh.js +56 -0
- package/dist/core/refresh.js.map +1 -0
- package/dist/core/scheduler.d.ts +117 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +361 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/scheduler.test.d.ts +2 -0
- package/dist/core/scheduler.test.d.ts.map +1 -0
- package/dist/core/scheduler.test.js +163 -0
- package/dist/core/scheduler.test.js.map +1 -0
- package/dist/core/sync.d.ts +6 -0
- package/dist/core/sync.d.ts.map +1 -1
- package/dist/core/sync.js +17 -12
- package/dist/core/sync.js.map +1 -1
- package/dist/core/workspace.d.ts +6 -0
- package/dist/core/workspace.d.ts.map +1 -1
- package/dist/core/workspace.js +32 -15
- package/dist/core/workspace.js.map +1 -1
- package/dist/core/workspace.test.d.ts +2 -0
- package/dist/core/workspace.test.d.ts.map +1 -0
- package/dist/core/workspace.test.js +42 -0
- package/dist/core/workspace.test.js.map +1 -0
- package/dist/generators/index.d.ts +7 -1
- package/dist/generators/index.d.ts.map +1 -1
- package/dist/generators/index.js +14 -1
- package/dist/generators/index.js.map +1 -1
- package/dist/generators/map-generator.d.ts.map +1 -1
- package/dist/generators/map-generator.js +4 -3
- package/dist/generators/map-generator.js.map +1 -1
- package/dist/generators/map-generator.test.js +4 -2
- package/dist/generators/map-generator.test.js.map +1 -1
- package/dist/gui/assets/index-ElroPpSP.js +26 -0
- package/dist/gui/index.html +1 -1
- package/dist/index.js +108 -4
- package/dist/index.js.map +1 -1
- package/dist/orchestration/index.d.ts +1 -1
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +1 -1
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/runner.d.ts +16 -1
- package/dist/orchestration/runner.d.ts.map +1 -1
- package/dist/orchestration/runner.js +41 -5
- package/dist/orchestration/runner.js.map +1 -1
- package/dist/orchestration/runner.test.d.ts +2 -0
- package/dist/orchestration/runner.test.d.ts.map +1 -0
- package/dist/orchestration/runner.test.js +71 -0
- package/dist/orchestration/runner.test.js.map +1 -0
- package/dist/server.d.ts +17 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +275 -114
- package/dist/server.js.map +1 -1
- package/dist/server.test.js +158 -1
- package/dist/server.test.js.map +1 -1
- package/dist/utils/multi-git.d.ts +21 -0
- package/dist/utils/multi-git.d.ts.map +1 -1
- package/dist/utils/multi-git.js +40 -4
- package/dist/utils/multi-git.js.map +1 -1
- package/dist/utils/prompts.d.ts.map +1 -1
- package/dist/utils/prompts.js +8 -2
- package/dist/utils/prompts.js.map +1 -1
- package/package.json +13 -1
- package/.agents/skills/ccc/SKILL.md +0 -71
- package/.agents/skills/ccc/references/management.md +0 -110
- package/.agents/skills/ccc/references/settings.md +0 -126
- package/.github/dependabot.yml +0 -52
- package/.github/workflows/ci.yml +0 -44
- package/.github/workflows/dependabot-merge.yml +0 -53
- package/.github/workflows/release-desktop.yml +0 -67
- package/.github/workflows/release-npm.yml +0 -65
- package/.github/workflows/release-vscode.yml +0 -61
- package/.vscode/launch.json +0 -17
- package/.vscode/tasks.json +0 -17
- package/GETTING_STARTED.md +0 -114
- package/desktop/build-installer.js +0 -228
- package/desktop/build.js +0 -118
- package/desktop/installer/nexusflow.iss +0 -35
- package/desktop/neutralino.config.json +0 -39
- package/desktop/package-lock.json +0 -1060
- package/desktop/package.json +0 -14
- package/dist/gui/assets/index-D8iJPvnk.js +0 -26
- package/extension/media/icon.svg +0 -1
- package/extension/package-lock.json +0 -6044
- package/extension/package.json +0 -117
- package/extension/src/extension.ts +0 -653
- package/extension/tsconfig.json +0 -21
- package/gui/README.md +0 -73
- package/gui/e2e/dashboard.spec.ts +0 -61
- package/gui/e2e/wizard.spec.ts +0 -346
- package/gui/eslint.config.js +0 -26
- package/gui/index.html +0 -17
- package/gui/package-lock.json +0 -3137
- package/gui/package.json +0 -37
- package/gui/playwright.config.ts +0 -41
- package/gui/public/app_logo.png +0 -0
- package/gui/public/favicon.svg +0 -1
- package/gui/public/icons.svg +0 -24
- package/gui/src/App.css +0 -1
- package/gui/src/App.tsx +0 -3573
- package/gui/src/app/AppSidebar.tsx +0 -69
- package/gui/src/assets/hero.png +0 -0
- package/gui/src/assets/react.svg +0 -1
- package/gui/src/assets/vite.svg +0 -1
- package/gui/src/components/AddRepoPicker.tsx +0 -81
- package/gui/src/components/ui/Button.tsx +0 -40
- package/gui/src/components/ui/Card.tsx +0 -6
- package/gui/src/components/ui/EmptyState.tsx +0 -22
- package/gui/src/components/ui/Input.tsx +0 -21
- package/gui/src/components/ui/Menu.tsx +0 -71
- package/gui/src/components/ui/Modal.tsx +0 -39
- package/gui/src/components/ui/PageHeader.tsx +0 -21
- package/gui/src/components/ui/RepoStatusStrip.tsx +0 -33
- package/gui/src/components/ui/Skeleton.tsx +0 -5
- package/gui/src/components/ui/StatusPill.tsx +0 -36
- package/gui/src/components/ui/Tabs.tsx +0 -40
- package/gui/src/components/ui/cn.ts +0 -4
- package/gui/src/components/ui/index.ts +0 -16
- package/gui/src/features/changes/ChangesViewer.tsx +0 -388
- package/gui/src/features/knowledge/KnowledgeBase.tsx +0 -84
- package/gui/src/features/onboarding/OnboardingWizard.tsx +0 -230
- package/gui/src/features/plan/ImplementationPlan.tsx +0 -32
- package/gui/src/features/services/ServiceConsole.tsx +0 -215
- package/gui/src/features/sessions/SessionHistory.tsx +0 -195
- package/gui/src/index.css +0 -167
- package/gui/src/lib/status.ts +0 -24
- package/gui/src/main.tsx +0 -94
- package/gui/src/pages/DashboardPage.tsx +0 -129
- package/gui/src/pages/WorkspacesPage.tsx +0 -352
- package/gui/src/types.ts +0 -81
- package/gui/tsconfig.app.json +0 -25
- package/gui/tsconfig.json +0 -7
- package/gui/tsconfig.node.json +0 -24
- package/gui/vite.config.ts +0 -12
- package/resources/workflows/plan-implement-review.md +0 -8
- package/resources/workflows/research-verify.md +0 -6
- package/resources/workflows/solo-developer.md +0 -3
- package/scripts/simulate-workspaces.ts +0 -55
- package/skills-lock.json +0 -11
- package/src/analyzers/detect-apis.ts +0 -290
- package/src/analyzers/detect-deps.ts +0 -315
- package/src/analyzers/detect-existing.ts +0 -74
- package/src/analyzers/detect-ports.ts +0 -110
- package/src/analyzers/index.ts +0 -97
- package/src/analyzers/messaging-analyzer.ts +0 -254
- package/src/analyzers/readme-summarizer.ts +0 -102
- package/src/analyzers/run-analyzer.ts +0 -269
- package/src/analyzers/tech-stack.ts +0 -283
- package/src/commands/adapter.ts +0 -348
- package/src/commands/add-repo.ts +0 -156
- package/src/commands/commands.test.ts +0 -156
- package/src/commands/commit.ts +0 -131
- package/src/commands/config.ts +0 -52
- package/src/commands/create.ts +0 -204
- package/src/commands/desktop.ts +0 -128
- package/src/commands/diff.ts +0 -125
- package/src/commands/doctor.ts +0 -370
- package/src/commands/handoff.ts +0 -266
- package/src/commands/init.ts +0 -134
- package/src/commands/list.ts +0 -46
- package/src/commands/logs.ts +0 -63
- package/src/commands/mcp.ts +0 -94
- package/src/commands/open.ts +0 -129
- package/src/commands/refresh.ts +0 -137
- package/src/commands/remove.ts +0 -98
- package/src/commands/start.ts +0 -117
- package/src/commands/status.ts +0 -54
- package/src/commands/stop.ts +0 -55
- package/src/commands/sync.ts +0 -125
- package/src/commands/tui.ts +0 -484
- package/src/commands/ui.ts +0 -111
- package/src/core/adapters/local-storage.ts +0 -66
- package/src/core/adapters/obsidian-storage.ts +0 -151
- package/src/core/adapters/registry.ts +0 -44
- package/src/core/adapters/storage.test.ts +0 -174
- package/src/core/adapters/vault-storage.ts +0 -86
- package/src/core/config.test.ts +0 -96
- package/src/core/config.ts +0 -140
- package/src/core/graph.ts +0 -344
- package/src/core/plugins/index.ts +0 -17
- package/src/core/plugins/loader.ts +0 -36
- package/src/core/ports/storage.ts +0 -71
- package/src/core/scanner.test.ts +0 -61
- package/src/core/scanner.ts +0 -91
- package/src/core/storage.ts +0 -37
- package/src/core/sync.ts +0 -121
- package/src/core/workspace-state.test.ts +0 -108
- package/src/core/workspace-state.ts +0 -130
- package/src/core/workspace.ts +0 -487
- package/src/core/worktree.ts +0 -120
- package/src/generators/antigravity.ts +0 -32
- package/src/generators/base.ts +0 -243
- package/src/generators/claude.ts +0 -34
- package/src/generators/codex.ts +0 -48
- package/src/generators/copilot.ts +0 -56
- package/src/generators/cursor.ts +0 -44
- package/src/generators/diff-context.ts +0 -75
- package/src/generators/index.ts +0 -322
- package/src/generators/map-generator.test.ts +0 -159
- package/src/generators/map-generator.ts +0 -539
- package/src/generators/plan-generator.ts +0 -483
- package/src/generators/skills-generator.ts +0 -259
- package/src/index.ts +0 -539
- package/src/mcp/server.ts +0 -338
- package/src/orchestration/detect.ts +0 -313
- package/src/orchestration/index.ts +0 -7
- package/src/orchestration/runner.ts +0 -283
- package/src/server.test.ts +0 -618
- package/src/server.ts +0 -1402
- package/src/types.ts +0 -451
- package/src/utils/detect-ai.test.ts +0 -44
- package/src/utils/detect-ai.ts +0 -84
- package/src/utils/detect-editors.test.ts +0 -48
- package/src/utils/detect-editors.ts +0 -57
- package/src/utils/git.test.ts +0 -74
- package/src/utils/git.ts +0 -117
- package/src/utils/local-ai.test.ts +0 -130
- package/src/utils/local-ai.ts +0 -116
- package/src/utils/multi-git.test.ts +0 -158
- package/src/utils/multi-git.ts +0 -405
- package/src/utils/prompts.ts +0 -209
- package/src/utils/session-finder.ts +0 -483
- package/src/utils/system-scanner.test.ts +0 -89
- package/src/utils/system-scanner.ts +0 -96
- package/src/utils/update-check.ts +0 -286
- package/src/utils/workflow-advisor.ts +0 -118
- package/src/utils/workflows.test.ts +0 -114
- package/src/utils/workflows.ts +0 -178
- package/tsconfig.json +0 -19
- package/vitest.config.ts +0 -14
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { LayoutDashboard, FolderGit2, Workflow, Settings as SettingsIcon, BookOpen, Plus, type LucideIcon } from 'lucide-react';
|
|
2
|
-
import { cn } from '../components/ui/index.js';
|
|
3
|
-
|
|
4
|
-
interface NavItem {
|
|
5
|
-
label: string;
|
|
6
|
-
to: string;
|
|
7
|
-
icon: LucideIcon;
|
|
8
|
-
match: (p: string) => boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const ITEMS: NavItem[] = [
|
|
12
|
-
{ label: 'Overview', to: '/', icon: LayoutDashboard, match: (p) => p === '/' },
|
|
13
|
-
{ label: 'Workspaces', to: '/workspaces', icon: FolderGit2, match: (p) => p.startsWith('/workspaces') },
|
|
14
|
-
{ label: 'Strategies', to: '/strategies', icon: Workflow, match: (p) => p.startsWith('/strategies') },
|
|
15
|
-
{ label: 'Settings', to: '/settings', icon: SettingsIcon, match: (p) => p.startsWith('/settings') },
|
|
16
|
-
];
|
|
17
|
-
|
|
18
|
-
export function AppSidebar({
|
|
19
|
-
pathname,
|
|
20
|
-
appVersion,
|
|
21
|
-
onNavigate,
|
|
22
|
-
onNewWorkspace,
|
|
23
|
-
}: {
|
|
24
|
-
pathname: string;
|
|
25
|
-
appVersion: string;
|
|
26
|
-
onNavigate: (to: string) => void;
|
|
27
|
-
onNewWorkspace: () => void;
|
|
28
|
-
}) {
|
|
29
|
-
const linkClass = (active: boolean) =>
|
|
30
|
-
cn(
|
|
31
|
-
'flex items-center gap-2.5 rounded-md px-3 py-2 text-sm font-medium transition-colors cursor-pointer',
|
|
32
|
-
active ? 'bg-accent-soft text-accent' : 'text-content-muted hover:bg-raised hover:text-content',
|
|
33
|
-
);
|
|
34
|
-
|
|
35
|
-
return (
|
|
36
|
-
<aside className="flex w-60 shrink-0 flex-col border-r border-hairline bg-surface/40 p-4">
|
|
37
|
-
<div className="mb-5 flex items-center gap-2.5 px-2 py-1">
|
|
38
|
-
<div className="grid h-8 w-8 place-items-center rounded-md bg-accent font-display text-sm font-bold text-white">NF</div>
|
|
39
|
-
<span className="font-display text-sm font-semibold text-content">NexusFlow</span>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<button
|
|
43
|
-
onClick={onNewWorkspace}
|
|
44
|
-
className="mb-5 inline-flex items-center justify-center gap-2 rounded-md bg-accent px-3 py-2 text-sm font-medium text-white transition-colors hover:bg-accent-hover cursor-pointer"
|
|
45
|
-
>
|
|
46
|
-
<Plus size={16} /> New workspace
|
|
47
|
-
</button>
|
|
48
|
-
|
|
49
|
-
<nav className="flex flex-1 flex-col gap-1">
|
|
50
|
-
{ITEMS.map((it) => {
|
|
51
|
-
const Icon = it.icon;
|
|
52
|
-
return (
|
|
53
|
-
<button key={it.to} onClick={() => onNavigate(it.to)} className={linkClass(it.match(pathname))}>
|
|
54
|
-
<Icon size={16} /> {it.label}
|
|
55
|
-
</button>
|
|
56
|
-
);
|
|
57
|
-
})}
|
|
58
|
-
</nav>
|
|
59
|
-
|
|
60
|
-
<button onClick={() => onNavigate('/guide')} className={linkClass(pathname.startsWith('/guide'))}>
|
|
61
|
-
<BookOpen size={16} /> Getting started
|
|
62
|
-
</button>
|
|
63
|
-
|
|
64
|
-
<div className="mt-3 border-t border-hairline pt-3 text-center text-[10px] font-medium uppercase tracking-wider text-content-faint">
|
|
65
|
-
NexusFlow v{appVersion}
|
|
66
|
-
</div>
|
|
67
|
-
</aside>
|
|
68
|
-
);
|
|
69
|
-
}
|
package/gui/src/assets/hero.png
DELETED
|
Binary file
|
package/gui/src/assets/react.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
|
package/gui/src/assets/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="77" height="47" fill="none" aria-labelledby="vite-logo-title" viewBox="0 0 77 47"><title id="vite-logo-title">Vite</title><style>.parenthesis{fill:#000}@media (prefers-color-scheme:dark){.parenthesis{fill:#fff}}</style><path fill="#9135ff" d="M40.151 45.71c-.663.844-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.493c-.92 0-1.457-1.04-.92-1.788l7.479-10.471c1.07-1.498 0-3.578-1.842-3.578H15.443c-.92 0-1.456-1.04-.92-1.788l9.696-13.576c.213-.297.556-.474.92-.474h28.894c.92 0 1.456 1.04.92 1.788l-7.48 10.472c-1.07 1.497 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.087.89 1.83L40.153 45.712z"/><mask id="a" width="48" height="47" x="14" y="0" maskUnits="userSpaceOnUse" style="mask-type:alpha"><path fill="#000" d="M40.047 45.71c-.663.843-2.02.374-2.02-.699V34.708a2.26 2.26 0 0 0-2.262-2.262H24.389c-.92 0-1.457-1.04-.92-1.788l7.479-10.472c1.07-1.497 0-3.578-1.842-3.578H15.34c-.92 0-1.456-1.04-.92-1.788l9.696-13.575c.213-.297.556-.474.92-.474H53.93c.92 0 1.456 1.04.92 1.788L47.37 13.03c-1.07 1.498 0 3.578 1.842 3.578h11.376c.944 0 1.474 1.088.89 1.831L40.049 45.712z"/></mask><g mask="url(#a)"><g filter="url(#b)"><ellipse cx="5.508" cy="14.704" fill="#eee6ff" rx="5.508" ry="14.704" transform="rotate(269.814 20.96 11.29)scale(-1 1)"/></g><g filter="url(#c)"><ellipse cx="10.399" cy="29.851" fill="#eee6ff" rx="10.399" ry="29.851" transform="rotate(89.814 -16.902 -8.275)scale(1 -1)"/></g><g filter="url(#d)"><ellipse cx="5.508" cy="30.487" fill="#8900ff" rx="5.508" ry="30.487" transform="rotate(89.814 -19.197 -7.127)scale(1 -1)"/></g><g filter="url(#e)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.928 4.177)scale(1 -1)"/></g><g filter="url(#f)"><ellipse cx="5.508" cy="30.599" fill="#8900ff" rx="5.508" ry="30.599" transform="rotate(89.814 -25.738 5.52)scale(1 -1)"/></g><g filter="url(#g)"><ellipse cx="14.072" cy="22.078" fill="#eee6ff" rx="14.072" ry="22.078" transform="rotate(93.35 31.245 55.578)scale(-1 1)"/></g><g filter="url(#h)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#i)"><ellipse cx="3.47" cy="21.501" fill="#8900ff" rx="3.47" ry="21.501" transform="rotate(89.009 35.419 55.202)scale(-1 1)"/></g><g filter="url(#j)"><ellipse cx="14.592" cy="9.743" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(39.51 14.592 9.743)"/></g><g filter="url(#k)"><ellipse cx="61.728" cy="-5.321" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 61.728 -5.32)"/></g><g filter="url(#l)"><ellipse cx="55.618" cy="7.104" fill="#00c2ff" rx="5.971" ry="9.665" transform="rotate(37.892 55.618 7.104)"/></g><g filter="url(#m)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#n)"><ellipse cx="12.326" cy="39.103" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 12.326 39.103)"/></g><g filter="url(#o)"><ellipse cx="49.857" cy="30.678" fill="#8900ff" rx="4.407" ry="29.108" transform="rotate(37.892 49.857 30.678)"/></g><g filter="url(#p)"><ellipse cx="52.623" cy="33.171" fill="#00c2ff" rx="5.971" ry="15.297" transform="rotate(37.892 52.623 33.17)"/></g></g><path d="M6.919 0c-9.198 13.166-9.252 33.575 0 46.789h6.215c-9.25-13.214-9.196-33.623 0-46.789zm62.424 0h-6.215c9.198 13.166 9.252 33.575 0 46.789h6.215c9.25-13.214 9.196-33.623 0-46.789" class="parenthesis"/><defs><filter id="b" width="60.045" height="41.654" x="-5.564" y="16.92" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="c" width="90.34" height="51.437" x="-40.407" y="-6.762" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="d" width="79.355" height="29.4" x="-35.435" y="2.801" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="e" width="79.579" height="29.4" x="-30.84" y="20.8" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="f" width="79.579" height="29.4" x="-29.307" y="21.949" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="g" width="74.749" height="58.852" x="29.961" y="-17.13" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="7.659"/></filter><filter id="h" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="i" width="61.377" height="25.362" x="37.754" y="3.055" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="j" width="56.045" height="63.649" x="-13.43" y="-22.082" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="k" width="54.814" height="64.646" x="34.321" y="-37.644" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="l" width="33.541" height="35.313" x="38.847" y="-10.552" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="m" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="n" width="54.814" height="64.646" x="-15.081" y="6.78" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="o" width="54.814" height="64.646" x="22.45" y="-1.645" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter><filter id="p" width="39.409" height="43.623" x="32.919" y="11.36" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur result="effect1_foregroundBlur_2002_17286" stdDeviation="4.596"/></filter></defs></svg>
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { useMemo, useState } from 'react';
|
|
2
|
-
import { Plus, Search } from 'lucide-react';
|
|
3
|
-
import type { RepoInfo } from '../types.js';
|
|
4
|
-
import { Input } from './ui/index.js';
|
|
5
|
-
|
|
6
|
-
/** A searchable popover for attaching another repository to a workspace. */
|
|
7
|
-
export function AddRepoPicker({
|
|
8
|
-
repos,
|
|
9
|
-
disabled,
|
|
10
|
-
onAdd,
|
|
11
|
-
}: {
|
|
12
|
-
repos: RepoInfo[];
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
onAdd: (repoPath: string) => void;
|
|
15
|
-
}) {
|
|
16
|
-
const [open, setOpen] = useState(false);
|
|
17
|
-
const [query, setQuery] = useState('');
|
|
18
|
-
|
|
19
|
-
const filtered = useMemo(() => {
|
|
20
|
-
const q = query.trim().toLowerCase();
|
|
21
|
-
if (!q) return repos;
|
|
22
|
-
return repos.filter((r) => r.name.toLowerCase().includes(q) || r.path.toLowerCase().includes(q));
|
|
23
|
-
}, [repos, query]);
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<div className="relative">
|
|
27
|
-
<button
|
|
28
|
-
type="button"
|
|
29
|
-
disabled={disabled}
|
|
30
|
-
aria-haspopup="listbox"
|
|
31
|
-
aria-expanded={open}
|
|
32
|
-
onClick={() => {
|
|
33
|
-
setQuery('');
|
|
34
|
-
setOpen((o) => !o);
|
|
35
|
-
}}
|
|
36
|
-
className="inline-flex items-center gap-1.5 rounded-md border border-hairline bg-surface px-3 py-1.5 text-xs font-medium text-content-muted transition-colors hover:bg-raised hover:text-content disabled:cursor-not-allowed disabled:opacity-40 cursor-pointer"
|
|
37
|
-
>
|
|
38
|
-
<Plus size={14} /> Add repository
|
|
39
|
-
</button>
|
|
40
|
-
|
|
41
|
-
{open && (
|
|
42
|
-
<>
|
|
43
|
-
<div className="fixed inset-0 z-40" aria-hidden="true" onClick={() => setOpen(false)} />
|
|
44
|
-
<div className="absolute right-0 z-50 mt-1.5 w-72 overflow-hidden rounded-lg border border-hairline bg-raised shadow-xl animate-fade-in">
|
|
45
|
-
<div className="relative border-b border-hairline p-2">
|
|
46
|
-
<Search size={14} className="pointer-events-none absolute left-4 top-1/2 -translate-y-1/2 text-content-faint" />
|
|
47
|
-
<Input
|
|
48
|
-
autoFocus
|
|
49
|
-
value={query}
|
|
50
|
-
onChange={(e) => setQuery(e.target.value)}
|
|
51
|
-
placeholder="Search repositories"
|
|
52
|
-
className="pl-8"
|
|
53
|
-
/>
|
|
54
|
-
</div>
|
|
55
|
-
<div role="listbox" className="max-h-64 overflow-y-auto py-1">
|
|
56
|
-
{filtered.length === 0 ? (
|
|
57
|
-
<div className="px-3 py-4 text-center text-xs text-content-faint">No repositories found.</div>
|
|
58
|
-
) : (
|
|
59
|
-
filtered.map((r) => (
|
|
60
|
-
<button
|
|
61
|
-
key={r.path}
|
|
62
|
-
role="option"
|
|
63
|
-
aria-selected={false}
|
|
64
|
-
onClick={() => {
|
|
65
|
-
setOpen(false);
|
|
66
|
-
onAdd(r.path);
|
|
67
|
-
}}
|
|
68
|
-
className="flex w-full flex-col items-start gap-0.5 px-3 py-2 text-left transition-colors hover:bg-surface cursor-pointer"
|
|
69
|
-
>
|
|
70
|
-
<span className="font-mono text-xs font-semibold text-content">{r.name}</span>
|
|
71
|
-
<span className="w-full truncate text-[10px] text-content-faint">{r.path}</span>
|
|
72
|
-
</button>
|
|
73
|
-
))
|
|
74
|
-
)}
|
|
75
|
-
</div>
|
|
76
|
-
</div>
|
|
77
|
-
</>
|
|
78
|
-
)}
|
|
79
|
-
</div>
|
|
80
|
-
);
|
|
81
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
import { cn } from './cn.js';
|
|
3
|
-
|
|
4
|
-
type Variant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
5
|
-
type Size = 'sm' | 'md';
|
|
6
|
-
|
|
7
|
-
interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
8
|
-
variant?: Variant;
|
|
9
|
-
size?: Size;
|
|
10
|
-
icon?: ReactNode;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const VARIANTS: Record<Variant, string> = {
|
|
14
|
-
primary: 'bg-accent text-white hover:bg-accent-hover border border-transparent',
|
|
15
|
-
secondary: 'bg-surface text-content border border-hairline hover:bg-raised hover:border-hairline-strong',
|
|
16
|
-
ghost: 'bg-transparent text-content-muted hover:text-content hover:bg-raised border border-transparent',
|
|
17
|
-
danger: 'bg-transparent text-danger border border-danger/40 hover:bg-danger/10',
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
const SIZES: Record<Size, string> = {
|
|
21
|
-
sm: 'text-xs px-2.5 py-1.5 gap-1.5 rounded-md',
|
|
22
|
-
md: 'text-sm px-3.5 py-2 gap-2 rounded-md',
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export function Button({ variant = 'secondary', size = 'md', icon, className, children, ...rest }: ButtonProps) {
|
|
26
|
-
return (
|
|
27
|
-
<button
|
|
28
|
-
className={cn(
|
|
29
|
-
'inline-flex items-center justify-center font-medium transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed',
|
|
30
|
-
VARIANTS[variant],
|
|
31
|
-
SIZES[size],
|
|
32
|
-
className,
|
|
33
|
-
)}
|
|
34
|
-
{...rest}
|
|
35
|
-
>
|
|
36
|
-
{icon}
|
|
37
|
-
{children}
|
|
38
|
-
</button>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export function EmptyState({
|
|
4
|
-
icon,
|
|
5
|
-
title,
|
|
6
|
-
description,
|
|
7
|
-
action,
|
|
8
|
-
}: {
|
|
9
|
-
icon?: ReactNode;
|
|
10
|
-
title: string;
|
|
11
|
-
description?: string;
|
|
12
|
-
action?: ReactNode;
|
|
13
|
-
}) {
|
|
14
|
-
return (
|
|
15
|
-
<div className="flex flex-col items-center justify-center px-6 py-16 text-center">
|
|
16
|
-
{icon && <div className="mb-3 text-content-faint">{icon}</div>}
|
|
17
|
-
<h3 className="font-display text-lg font-semibold text-content">{title}</h3>
|
|
18
|
-
{description && <p className="mt-1 max-w-sm text-sm text-content-muted">{description}</p>}
|
|
19
|
-
{action && <div className="mt-4">{action}</div>}
|
|
20
|
-
</div>
|
|
21
|
-
);
|
|
22
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
|
-
import { cn } from './cn.js';
|
|
3
|
-
|
|
4
|
-
const base =
|
|
5
|
-
'w-full bg-base border border-hairline rounded-md px-3 py-2 text-sm text-content placeholder:text-content-faint outline-none focus:border-accent transition-colors disabled:opacity-50 disabled:cursor-not-allowed';
|
|
6
|
-
|
|
7
|
-
export function Input({ className, ...rest }: InputHTMLAttributes<HTMLInputElement>) {
|
|
8
|
-
return <input className={cn(base, className)} {...rest} />;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function Textarea({ className, ...rest }: TextareaHTMLAttributes<HTMLTextAreaElement>) {
|
|
12
|
-
return <textarea className={cn(base, 'resize-y leading-relaxed', className)} {...rest} />;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function Select({ className, children, ...rest }: SelectHTMLAttributes<HTMLSelectElement>) {
|
|
16
|
-
return (
|
|
17
|
-
<select className={cn(base, 'cursor-pointer', className)} {...rest}>
|
|
18
|
-
{children}
|
|
19
|
-
</select>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { useState, type ReactNode } from 'react';
|
|
2
|
-
import { cn } from './cn.js';
|
|
3
|
-
|
|
4
|
-
export interface MenuItem {
|
|
5
|
-
label: string;
|
|
6
|
-
icon?: ReactNode;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
danger?: boolean;
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export function Menu({
|
|
13
|
-
trigger,
|
|
14
|
-
items,
|
|
15
|
-
align = 'right',
|
|
16
|
-
label,
|
|
17
|
-
}: {
|
|
18
|
-
trigger: ReactNode;
|
|
19
|
-
items: MenuItem[];
|
|
20
|
-
align?: 'left' | 'right';
|
|
21
|
-
label?: string;
|
|
22
|
-
}) {
|
|
23
|
-
const [open, setOpen] = useState(false);
|
|
24
|
-
return (
|
|
25
|
-
<div className="relative">
|
|
26
|
-
<button
|
|
27
|
-
type="button"
|
|
28
|
-
aria-haspopup="menu"
|
|
29
|
-
aria-expanded={open}
|
|
30
|
-
aria-label={label}
|
|
31
|
-
onClick={() => setOpen((o) => !o)}
|
|
32
|
-
className="inline-flex items-center justify-center cursor-pointer"
|
|
33
|
-
>
|
|
34
|
-
{trigger}
|
|
35
|
-
</button>
|
|
36
|
-
{open && (
|
|
37
|
-
<>
|
|
38
|
-
<div className="fixed inset-0 z-40" aria-hidden="true" onClick={() => setOpen(false)} />
|
|
39
|
-
<div
|
|
40
|
-
role="menu"
|
|
41
|
-
className={cn(
|
|
42
|
-
'absolute z-50 mt-1.5 min-w-48 rounded-lg border border-hairline bg-raised py-1 shadow-xl animate-fade-in',
|
|
43
|
-
align === 'right' ? 'right-0' : 'left-0',
|
|
44
|
-
)}
|
|
45
|
-
>
|
|
46
|
-
{items.map((it, i) => (
|
|
47
|
-
<div key={i}>
|
|
48
|
-
{it.danger && <div className="my-1 h-px bg-hairline" />}
|
|
49
|
-
<button
|
|
50
|
-
role="menuitem"
|
|
51
|
-
disabled={it.disabled}
|
|
52
|
-
onClick={() => {
|
|
53
|
-
setOpen(false);
|
|
54
|
-
it.onClick();
|
|
55
|
-
}}
|
|
56
|
-
className={cn(
|
|
57
|
-
'flex w-full items-center gap-2.5 px-3 py-2 text-sm font-medium transition-colors cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed',
|
|
58
|
-
it.danger ? 'text-danger hover:bg-danger/10' : 'text-content-muted hover:bg-surface hover:text-content',
|
|
59
|
-
)}
|
|
60
|
-
>
|
|
61
|
-
{it.icon}
|
|
62
|
-
{it.label}
|
|
63
|
-
</button>
|
|
64
|
-
</div>
|
|
65
|
-
))}
|
|
66
|
-
</div>
|
|
67
|
-
</>
|
|
68
|
-
)}
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { X } from 'lucide-react';
|
|
3
|
-
import { cn } from './cn.js';
|
|
4
|
-
|
|
5
|
-
export function Modal({
|
|
6
|
-
open,
|
|
7
|
-
onClose,
|
|
8
|
-
title,
|
|
9
|
-
children,
|
|
10
|
-
className,
|
|
11
|
-
}: {
|
|
12
|
-
open: boolean;
|
|
13
|
-
onClose: () => void;
|
|
14
|
-
title?: ReactNode;
|
|
15
|
-
children: ReactNode;
|
|
16
|
-
className?: string;
|
|
17
|
-
}) {
|
|
18
|
-
if (!open) return null;
|
|
19
|
-
return (
|
|
20
|
-
<div className="fixed inset-0 z-50 flex items-center justify-center p-4">
|
|
21
|
-
<div className="absolute inset-0 bg-black/70" onClick={onClose} aria-hidden="true" />
|
|
22
|
-
<div
|
|
23
|
-
role="dialog"
|
|
24
|
-
aria-modal="true"
|
|
25
|
-
className={cn('relative z-10 w-full max-w-lg rounded-lg border border-hairline bg-surface shadow-2xl animate-rise', className)}
|
|
26
|
-
>
|
|
27
|
-
{title && (
|
|
28
|
-
<div className="flex items-center justify-between border-b border-hairline px-5 py-3.5">
|
|
29
|
-
<h3 className="font-display font-semibold text-content">{title}</h3>
|
|
30
|
-
<button onClick={onClose} className="cursor-pointer text-content-faint hover:text-content" aria-label="Close">
|
|
31
|
-
<X size={16} />
|
|
32
|
-
</button>
|
|
33
|
-
</div>
|
|
34
|
-
)}
|
|
35
|
-
{children}
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
);
|
|
39
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
export function PageHeader({
|
|
4
|
-
title,
|
|
5
|
-
subtitle,
|
|
6
|
-
actions,
|
|
7
|
-
}: {
|
|
8
|
-
title: ReactNode;
|
|
9
|
-
subtitle?: ReactNode;
|
|
10
|
-
actions?: ReactNode;
|
|
11
|
-
}) {
|
|
12
|
-
return (
|
|
13
|
-
<div className="mb-6 flex items-start justify-between gap-4">
|
|
14
|
-
<div className="min-w-0">
|
|
15
|
-
<h1 className="font-display text-2xl font-bold tracking-tight text-content">{title}</h1>
|
|
16
|
-
{subtitle && <p className="mt-1 text-sm text-content-muted">{subtitle}</p>}
|
|
17
|
-
</div>
|
|
18
|
-
{actions && <div className="flex shrink-0 items-center gap-2">{actions}</div>}
|
|
19
|
-
</div>
|
|
20
|
-
);
|
|
21
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { cn } from './cn.js';
|
|
2
|
-
|
|
3
|
-
export type RepoState = 'clean' | 'changes' | 'conflict' | 'unknown';
|
|
4
|
-
|
|
5
|
-
const STATE_DOT: Record<RepoState, string> = {
|
|
6
|
-
clean: 'bg-success',
|
|
7
|
-
changes: 'bg-warning',
|
|
8
|
-
conflict: 'bg-danger',
|
|
9
|
-
unknown: 'bg-idle',
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export interface RepoDot {
|
|
13
|
-
name: string;
|
|
14
|
-
state?: RepoState;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/** Signature element: a row of per-repo status dots, reused across dashboard, list and detail. */
|
|
18
|
-
export function RepoStatusStrip({ repos, className }: { repos: RepoDot[]; className?: string }) {
|
|
19
|
-
return (
|
|
20
|
-
<div className={cn('flex flex-wrap items-center gap-1.5', className)}>
|
|
21
|
-
{repos.map((r) => (
|
|
22
|
-
<span
|
|
23
|
-
key={r.name}
|
|
24
|
-
title={`${r.name}${r.state ? ` · ${r.state}` : ''}`}
|
|
25
|
-
className="inline-flex items-center gap-1.5 rounded border border-hairline bg-base px-2 py-0.5 font-mono text-[11px] font-medium text-content-muted"
|
|
26
|
-
>
|
|
27
|
-
<span className={cn('h-1.5 w-1.5 rounded-full', STATE_DOT[r.state ?? 'unknown'])} />
|
|
28
|
-
{r.name}
|
|
29
|
-
</span>
|
|
30
|
-
))}
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { cn } from './cn.js';
|
|
3
|
-
|
|
4
|
-
export type Tone = 'success' | 'warning' | 'danger' | 'running' | 'idle' | 'accent' | 'neutral';
|
|
5
|
-
|
|
6
|
-
const TONES: Record<Tone, string> = {
|
|
7
|
-
success: 'text-success border-success/30 bg-success/10',
|
|
8
|
-
warning: 'text-warning border-warning/30 bg-warning/10',
|
|
9
|
-
danger: 'text-danger border-danger/30 bg-danger/10',
|
|
10
|
-
running: 'text-running border-running/30 bg-running/10',
|
|
11
|
-
idle: 'text-content-faint border-hairline bg-surface',
|
|
12
|
-
accent: 'text-accent border-accent/30 bg-accent-soft',
|
|
13
|
-
neutral: 'text-content-muted border-hairline bg-raised',
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export function StatusPill({
|
|
17
|
-
tone = 'neutral',
|
|
18
|
-
dot,
|
|
19
|
-
title,
|
|
20
|
-
children,
|
|
21
|
-
}: {
|
|
22
|
-
tone?: Tone;
|
|
23
|
-
dot?: boolean;
|
|
24
|
-
title?: string;
|
|
25
|
-
children: ReactNode;
|
|
26
|
-
}) {
|
|
27
|
-
return (
|
|
28
|
-
<span
|
|
29
|
-
title={title}
|
|
30
|
-
className={cn('inline-flex items-center gap-1.5 text-[11px] font-medium px-2 py-0.5 rounded-md border whitespace-nowrap', TONES[tone])}
|
|
31
|
-
>
|
|
32
|
-
{dot && <span className="h-1.5 w-1.5 rounded-full bg-current" />}
|
|
33
|
-
{children}
|
|
34
|
-
</span>
|
|
35
|
-
);
|
|
36
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { cn } from './cn.js';
|
|
2
|
-
|
|
3
|
-
export interface TabItem {
|
|
4
|
-
value: string;
|
|
5
|
-
label: string;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export function Tabs({
|
|
9
|
-
items,
|
|
10
|
-
value,
|
|
11
|
-
onChange,
|
|
12
|
-
className,
|
|
13
|
-
}: {
|
|
14
|
-
items: TabItem[];
|
|
15
|
-
value: string;
|
|
16
|
-
onChange: (v: string) => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
}) {
|
|
19
|
-
return (
|
|
20
|
-
<div role="tablist" className={cn('flex items-center gap-1 border-b border-hairline overflow-x-auto', className)}>
|
|
21
|
-
{items.map((it) => {
|
|
22
|
-
const active = it.value === value;
|
|
23
|
-
return (
|
|
24
|
-
<button
|
|
25
|
-
key={it.value}
|
|
26
|
-
role="tab"
|
|
27
|
-
aria-selected={active}
|
|
28
|
-
onClick={() => onChange(it.value)}
|
|
29
|
-
className={cn(
|
|
30
|
-
'-mb-px whitespace-nowrap border-b-2 px-3 py-2 text-sm font-medium transition-colors cursor-pointer',
|
|
31
|
-
active ? 'text-content border-accent' : 'text-content-faint border-transparent hover:text-content',
|
|
32
|
-
)}
|
|
33
|
-
>
|
|
34
|
-
{it.label}
|
|
35
|
-
</button>
|
|
36
|
-
);
|
|
37
|
-
})}
|
|
38
|
-
</div>
|
|
39
|
-
);
|
|
40
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export { cn } from './cn.js';
|
|
2
|
-
export { Button } from './Button.js';
|
|
3
|
-
export { Card } from './Card.js';
|
|
4
|
-
export { StatusPill } from './StatusPill.js';
|
|
5
|
-
export type { Tone } from './StatusPill.js';
|
|
6
|
-
export { Tabs } from './Tabs.js';
|
|
7
|
-
export type { TabItem } from './Tabs.js';
|
|
8
|
-
export { Input, Textarea, Select } from './Input.js';
|
|
9
|
-
export { Menu } from './Menu.js';
|
|
10
|
-
export type { MenuItem } from './Menu.js';
|
|
11
|
-
export { Modal } from './Modal.js';
|
|
12
|
-
export { Skeleton } from './Skeleton.js';
|
|
13
|
-
export { EmptyState } from './EmptyState.js';
|
|
14
|
-
export { PageHeader } from './PageHeader.js';
|
|
15
|
-
export { RepoStatusStrip } from './RepoStatusStrip.js';
|
|
16
|
-
export type { RepoDot, RepoState } from './RepoStatusStrip.js';
|