Initial commit: Industrial HMI system with component architecture

- Implement WebView2-based HMI frontend with React + TypeScript + Vite
- Add C# .NET backend with WebSocket communication layer
- Separate UI components into modular structure:
  * RecipePanel: Recipe selection and management
  * IOPanel: I/O monitoring and control (32 inputs/outputs)
  * MotionPanel: Servo control for X/Y/Z axes
  * CameraPanel: Vision system feed with HUD overlay
  * SettingsModal: System configuration management
- Create reusable UI components (CyberPanel, TechButton, PanelHeader)
- Implement dual-mode communication (WebView2 native + WebSocket fallback)
- Add 3D visualization with Three.js/React Three Fiber
- Fix JSON parsing bug in configuration save handler
- Include comprehensive .gitignore for .NET and Node.js projects

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-11-24 20:40:45 +09:00
commit 8dc6b0f921
78 changed files with 126978 additions and 0 deletions

73
frontend/types.ts Normal file
View File

@@ -0,0 +1,73 @@
export enum SystemState {
IDLE = 'IDLE',
RUNNING = 'RUNNING',
ERROR = 'ERROR',
PAUSED = 'PAUSED',
}
export interface AxisPosition {
id: string;
name: string;
axis: 'X' | 'Y' | 'Z';
value: number;
speed: number;
acc: number;
dec: number;
}
export interface Recipe {
id: string;
name: string;
lastModified: string;
}
export interface IOPoint {
id: number;
name: string;
type: 'input' | 'output';
state: boolean;
}
export interface LogEntry {
id: number;
timestamp: string;
message: string;
type: 'info' | 'warning' | 'error';
}
export interface RobotTarget {
x: number;
y: number;
z: number;
}
// WebView2 Native Bridge Types
export interface ConfigItem {
Key: string;
Value: string;
Group: string;
Type: 'String' | 'Number' | 'Boolean';
Description: string;
}
declare global {
interface Window {
chrome: {
webview: {
hostObjects: {
machine: {
MoveAxis(axis: string, value: number): Promise<void>;
SetIO(id: number, isInput: boolean, state: boolean): Promise<void>;
SystemControl(command: string): Promise<void>;
LoadRecipe(recipeId: string): Promise<void>;
GetConfig(): Promise<string>;
SaveConfig(configJson: string): Promise<void>;
}
};
addEventListener(type: string, listener: (event: any) => void): void;
removeEventListener(type: string, listener: (event: any) => void): void;
postMessage(message: any): void;
}
}
}
}