docs(product): commit design references under docs/product/reference/
Copy the founder's design handoff bundle (.proto/design/) into docs/product/reference/ byte-for-byte so dispatch agents running in git worktrees can read the HTML prototypes, veect-codebase/ prototype, upload PNGs, and remaining bundle files (ADR-029: reference only, never vendored into packages/). Ignore-list entries so whole-codebase auditors and formatters skip reference material: .prettierignore (byte preservation through lint-staged), .fallowrc.json ignorePatterns, root ESLint ignores, and the coverage:diff allowlist in scripts/coverage/diff.mjs (+ unit test). .DS_Store files skipped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016j8z4VHjedXDTjEDNg7qHK
This commit is contained in:
48
docs/product/reference/project/veect-codebase/src/App.tsx
Normal file
48
docs/product/reference/project/veect-codebase/src/App.tsx
Normal file
@@ -0,0 +1,48 @@
|
||||
import { useEffect } from 'react';
|
||||
import { EditorPage } from '@/pages/EditorPage';
|
||||
import { HomePage } from '@/pages/HomePage';
|
||||
import { OnboardingPage } from '@/pages/OnboardingPage';
|
||||
import { ProfilePage } from '@/pages/ProfilePage';
|
||||
import { SettingsPage } from '@/pages/SettingsPage';
|
||||
import { SignInPage } from '@/pages/SignInPage';
|
||||
import { SystemUpdatePage } from '@/pages/SystemUpdatePage';
|
||||
import { useVeect } from '@/store/veect';
|
||||
import type { Screen } from '@/types';
|
||||
|
||||
const PAGES: Record<Screen, () => JSX.Element> = {
|
||||
signin: SignInPage,
|
||||
home: HomePage,
|
||||
onboarding: OnboardingPage,
|
||||
editor: EditorPage,
|
||||
settings: SettingsPage,
|
||||
profile: ProfilePage,
|
||||
sysupdate: SystemUpdatePage,
|
||||
};
|
||||
|
||||
export default function App() {
|
||||
const screen = useVeect((s) => s.screen);
|
||||
const undo = useVeect((s) => s.undo);
|
||||
const redo = useVeect((s) => s.redo);
|
||||
const select = useVeect((s) => s.select);
|
||||
|
||||
useEffect(() => {
|
||||
const onKey = (e: KeyboardEvent) => {
|
||||
const typing = ['INPUT', 'TEXTAREA'].includes((e.target as HTMLElement).tagName);
|
||||
if (e.key === 'Escape') return select(null);
|
||||
if (typing) return;
|
||||
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === 'z') {
|
||||
e.preventDefault();
|
||||
(e.shiftKey ? redo : undo)();
|
||||
}
|
||||
};
|
||||
window.addEventListener('keydown', onKey);
|
||||
return () => window.removeEventListener('keydown', onKey);
|
||||
}, [redo, select, undo]);
|
||||
|
||||
const Page = PAGES[screen];
|
||||
return (
|
||||
<div className="fixed inset-0 flex flex-col overflow-hidden bg-bg text-ink">
|
||||
<Page />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user