feat: shift+drag to cut wires and create bus connectors

Hold Shift and drag across wires to create a BUS gate that groups
them together. The cut line shows a live preview with wire count.
BUS gates are pass-through (each input maps to its output) and
render as a thin cyan bar with ports on each side.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Jose Luis
2026-03-20 04:39:00 +01:00
parent 89d118f738
commit 99f0fefe5c
6 changed files with 376 additions and 14 deletions

View File

@@ -7,7 +7,8 @@ export const PORT_R = 7;
export const GATE_COLORS = {
AND: '#00e599', OR: '#3388ff', NOT: '#ff6644',
NAND: '#e5cc00', NOR: '#cc44ff', XOR: '#ff44aa',
INPUT: '#3388ff', CLOCK: '#ff44aa', OUTPUT: '#ff8833'
INPUT: '#3388ff', CLOCK: '#ff44aa', OUTPUT: '#ff8833',
BUS: '#44ddff'
};
export const SIGNAL_COLORS = [