A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< script setup lang = "ts" >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
import type { MenuEntry } from '~/composables/useMenu'
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
import { stats } from '~/lib/logic/analyze'
import { compile } from '~/lib/logic/compile'
2026-10-20 17:29:16 +00:00
import { cableOf } from '~/lib/logic/cables'
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
import { INVERTIBLE } from '~/lib/logic/compile'
A ports on top of the box, split into lines to wire by hand
On a component's box every connector port now sits at the very top of its
side, above the single pins, in auto and hand-drawn boxes alike. A port
can be split on one placed component (its settings or right click: Split
… into lines): right below the socket the box then gets a pin per line,
named after the line, so lines can be wired by hand without an adapter.
Lines going into the component are inputs, lines coming out outputs, each
facing out of its side; a bar in the type's colour ties them to the
socket. A cable still plugs into the socket at the same time. Dropping a
single wire on a socket (or clicking one while connecting) splits the
port and takes the first free line that runs that way. Join … lines
takes the line pins and their wires away again, as one undo step.
A line wired by hand joins the same net the cable's line reaches inside;
a wire and a cable on one line both drive it, and the check says so.
Line pins are left out of the open-input warning, docked panels and
bubbles; docked panels no longer get a row for a port's socket either.
Saved as an optional list on the placed component (splitPorts); without
it a box only has its ports moved to the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:08:27 +00:00
import { cableBits , cableOffsets , chipPins , MAX _BITS , panelOffsets , portName , rowLabel } from '~/lib/logic/geometry'
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
import { SINK _KINDS , SOURCE _KINDS } from '~/lib/logic/ops'
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
import { KIND _NAMES } from '~/lib/logic/progress'
2026-10-20 18:09:23 +00:00
import { baseOf , gateFamily , inputCount , MAX _GATE _INPUTS } from '~/lib/logic/wide'
2026-10-21 08:39:54 +00:00
import { LAMP _COLORS , WIRE _COLORS , type CircuitNode , type NodeKind , type PanelControl , type PanelRow } from '~/lib/logic/types'
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
const props = defineProps < { node : CircuitNode } > ( )
const ed = useEditor ( )
2026-10-23 10:59:16 +00:00
const CONTROLS : { value : PanelControl ; label : string ; icon : string } [ ] = [
{ value : 'switch' , label : 'Switch' , icon : 'lucide:toggle-left' } ,
{ value : 'button' , label : 'Button' , icon : 'lucide:circle-dot' } ,
{ value : 'clock' , label : 'Clock' , icon : 'lucide:audio-waveform' } ,
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
]
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
const HINTS : Record < string , string > = {
input : 'Click it on the canvas to flip it. Inside a component it becomes an input pin; pins are ordered top to bottom.' ,
output : 'Inside a component it becomes an output pin; pins are ordered top to bottom.' ,
nand : 'Output is 0 only when both inputs are 1. Every other part can be built from this one.' ,
high : 'Always 1, like the supply rail.' ,
low : 'Always 0, like ground.' ,
button : 'Gives 1 while held down with the mouse or its key.' ,
lamp : 'Lights up at 1. Inside a component it also shows on the component box.' ,
hex : 'Shows inputs 1, 2, 4, 8 as one hex digit. Inside a component it also shows on the component box.' ,
2026-10-21 09:51:45 +00:00
bundle : 'Wire 0 (top) to the last on the left go into the cable on the right. Run the cable to a split, which gives them back in the same order. The wires are named after what drives them, or else what they drive.' ,
split : 'Takes a cable from a bundle and gives its wires back in the same order, top to bottom, with their names.' ,
2026-10-20 17:29:16 +00:00
pixel : 'Lights at 1. Inside a component, all its pixels show on the component box as one screen, without gaps: space them out inside to wire them, every column and row they sit on becomes a column and row of the screen.' ,
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
tag : 'Wire a signal into it and give it a name. Every "Use signal" with that name in this circuit carries the same signal, without a wire. Names stay inside this circuit.' ,
ref : 'Carries the signal of the "Send signal" with the same name in this circuit. Select it to see all places that signal goes.' ,
2026-10-21 12:38:59 +00:00
outpanel : 'A lamp per row, named after what it shows. Inside a component its rows are output pins, top to bottom with the other outputs. Each row passes its signal on to the right.' ,
2026-10-23 10:59:16 +00:00
panel : 'Click a row on the canvas to flip its switch or hold its button, or press its key. Rows without a name take the name of the pin they are wired to. Drag a row by its grip to move it; point between two rows to add one there or change the space.' ,
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
}
const n = computed ( ( ) => props . node )
const chipDef = computed ( ( ) => ( n . value . chip ? ed . getDef . value ( n . value . chip ) : undefined ) )
const chipStats = computed ( ( ) => ( chipDef . value ? stats ( compile ( ed . getDef . value , chipDef . value . id ) ) : null ) )
const title = computed ( ( ) => ( n . value . kind === 'chip' ? chipDef . value ? . name ? ? 'Missing component' : KIND _NAMES [ n . value . kind ] ) )
const logic = computed ( ( ) => n . value . kind === 'nand' || n . value . kind === 'chip' )
const family = computed < NodeKind [ ] > ( ( ) => ( SOURCE _KINDS . includes ( n . value . kind ) ? SOURCE _KINDS : SINK _KINDS . includes ( n . value . kind ) ? SINK _KINDS : [ ] ) )
const currentType = computed ( ( ) => ( n . value . kind === 'chip' ? ` chip: ${ n . value . chip } ` : n . value . kind ) )
const wired = computed ( ( ) => ed . def . value . wires . some ( w => w . from . node === n . value . id || w . to . node === n . value . id ) )
/** Components grouped like the palette, with their pin counts. */
const swapGroups = computed ( ( ) => {
const groups = new Map < string , { id : string ; label : string ; ok : boolean } [ ] > ( )
for ( const d of ed . project . value . components ) {
const p = chipPins ( d )
const g = d . group ? . trim ( ) || 'My components'
if ( ! groups . has ( g ) ) groups . set ( g , [ ] )
groups . get ( g ) ! . push ( { id : d . id , label : ` ${ d . name } ( ${ p . inputs . length } → ${ p . outputs . length } ) ` , ok : ed . canPlace ( d . id ) } )
}
return [ ... groups . entries ( ) ]
} )
function onSwap ( e : Event ) {
const v = ( e . target as HTMLSelectElement ) . value
if ( v === currentType . value ) return
if ( v . startsWith ( 'chip:' ) ) ed . swap ( n . value . id , { kind : 'chip' , chip : v . slice ( 5 ) } )
else ed . swap ( n . value . id , { kind : v as NodeKind } )
}
const labelInput = ref < HTMLInputElement | HTMLTextAreaElement > ( )
watch (
( ) => ed . labelFocus . value ,
( ) =>
nextTick ( ( ) => {
labelInput . value ? . focus ( )
labelInput . value ? . select ( )
} ) ,
)
2026-10-20 17:29:16 +00:00
const hasLabel = computed ( ( ) => ! [ 'high' , 'low' , 'nand' , 'bundle' , 'split' , 'pixel' ] . includes ( n . value . kind ) )
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
function setHz ( e : Event ) {
const v = Number ( ( e . target as HTMLInputElement ) . value )
if ( v > 0 && v <= 1000 ) n . value . hz = v
else delete n . value . hz
ed . commit ( )
}
function followTopBar ( e : Event ) {
if ( ( e . target as HTMLInputElement ) . checked ) delete n . value . hz
else n . value . hz = ed . hz . value > 0 ? ed . hz . value : 2
ed . commit ( )
}
function setKey ( e : KeyboardEvent ) {
if ( e . key === 'Tab' ) return
e . preventDefault ( )
if ( e . key === 'Backspace' || e . key === 'Delete' || e . key === 'Escape' ) delete n . value . key
else if ( e . key . length === 1 && e . key !== ' ' ) n . value . key = e . key . toLowerCase ( )
else return
ed . commit ( false )
; ( e . target as HTMLInputElement ) . blur ( )
}
function setColor ( c : ( typeof LAMP _COLORS ) [ number ] | undefined ) {
if ( c ) n . value . color = c
else delete n . value . color
ed . commit ( false )
}
function setSize ( size : 'sm' | 'md' | 'lg' ) {
if ( size === 'md' ) delete n . value . size
else n . value . size = size
ed . commit ( false )
}
function setOn ( on : boolean ) {
if ( ! ! n . value . on !== on ) ed . toggleInput ( n . value )
}
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
/** A name typed by hand is kept from then on; clearing it lets connections name the part again. */
function onLabel ( ) {
delete n . value . autoLabel
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
// A signal's name decides what it connects to.
ed . commit ( n . value . kind === 'tag' || n . value . kind === 'ref' )
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
}
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
// ── Signals ─────────────────────────────────────────────────────────
const signal = computed ( ( ) => n . value . label ? . trim ( ) ? ? '' )
const signalNames = computed ( ( ) => [ ... new Set ( ed . def . value . nodes . filter ( x => x . kind === 'tag' && x . label ? . trim ( ) ) . map ( x => x . label ! . trim ( ) ) ) ] . sort ( ) )
const senders = computed ( ( ) => ed . def . value . nodes . filter ( x => x . kind === 'tag' && ! ! signal . value && x . label ? . trim ( ) === signal . value ) )
const uses = computed ( ( ) => ed . def . value . nodes . filter ( x => x . kind === 'ref' && ! ! signal . value && x . label ? . trim ( ) === signal . value ) )
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
const dock = computed ( ( ) => {
const id = n . value . attach
const chip = id ? ed . def . value . nodes . find ( x => x . id === id ) : undefined
return chip ? chip . label ? . trim ( ) || ( chip . chip ? ed . getDef . value ( chip . chip ) ? . name : undefined ) || 'component' : null
} )
2026-10-20 18:09:23 +00:00
/** Gates that can take more inputs (AND, OR, XOR, NAND, NOR and their wide versions). */
const widens = computed ( ( ) => {
const base = baseOf ( n . value , ed . getDef . value )
return ! ! base && ! ! gateFamily ( ed . getDef . value , base )
} )
const inputs = computed ( ( ) => inputCount ( n . value , ed . getDef . value ) )
A finer component boxes, a regrouped parts list with keyboard search, a real green for wires and cables
- Box designer: drag pins up or down to open gaps between groups; size (+/−) and turn (R) lamps, displays, screens and drawings; pixels belong to named screens, each placed on its own; displays of the components inside can be shown on the box (off unless ticked); a list of everything the box can show, each optional; the box grows to hold what it shows
- Lamps and displays deep inside placed components light up on the box
- Parts list: one search box for parts and components (letters in order match too), recently placed parts first, grouped Logic / Inputs / Outputs / Wiring / Notes, then components by group; groups fold away
- Keys: / searches the parts list (Enter starts placing), Shift+A or Ctrl+K adds a part at the mouse
- Wires and cables get a green; the default swatch shows grey, as the default really is
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-22 04:48:42 +00:00
/** Screen names used by the pixels of this circuit. */
const screenNames = computed ( ( ) => [ ... new Set ( ed . def . value . nodes . filter ( x => x . kind === 'pixel' && x . screen ) . map ( x => x . screen ! ) ) ] . sort ( ) )
2026-10-21 12:13:24 +00:00
/** Groups of pins a new cable can plug onto. */
const cables = computed ( ( ) => ed . cableChoices ( n . value ) )
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
/** Inputs that can carry a bubble, with their names. */
const invertible = computed ( ( ) => {
if ( ! INVERTIBLE . has ( n . value . kind ) ) return [ ]
const inv = new Set ( n . value . invert ? ? [ ] )
A ports on top of the box, split into lines to wire by hand
On a component's box every connector port now sits at the very top of its
side, above the single pins, in auto and hand-drawn boxes alike. A port
can be split on one placed component (its settings or right click: Split
… into lines): right below the socket the box then gets a pin per line,
named after the line, so lines can be wired by hand without an adapter.
Lines going into the component are inputs, lines coming out outputs, each
facing out of its side; a bar in the type's colour ties them to the
socket. A cable still plugs into the socket at the same time. Dropping a
single wire on a socket (or clicking one while connecting) splits the
port and takes the first free line that runs that way. Join … lines
takes the line pins and their wires away again, as one undo step.
A line wired by hand joins the same net the cable's line reaches inside;
a wire and a cable on one line both drive it, and the check says so.
Line pins are left out of the open-input warning, docked panels and
bubbles; docked panels no longer get a row for a port's socket either.
Saved as an optional list on the placed component (splitPorts); without
it a box only has its ports moved to the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:08:27 +00:00
return ed . shape ( n . value ) . inputs . filter ( p => ! p . bus && ! p . port ) . map ( ( p , i ) => ( { key : p . key , label : p . label || ( n . value . kind === 'nand' ? 'AB' [ i ] ! : 'In' ) , on : inv . has ( p . key ) } ) )
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
} )
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
const inverted = computed ( ( ) => invertible . value . filter ( p => p . on ) . length )
const transistors = computed ( ( ) => ed . transistorsOfNode ( n . value ) )
const transistorNote = computed ( ( ) =>
n . value . kind === 'nand'
? 'CMOS NAND: 2 transistors in parallel to the supply, 2 in series to ground'
: transistors . value
? ` ${ ( transistors . value / 4 ) . toLocaleString ( ) } NAND gates inside, 4 transistors each `
: 'No logic gate inside' ,
)
2026-10-22 16:59:56 +00:00
// Connector ports: which type, and which side of the box.
const connTypes = computed ( ( ) => ed . project . value . connectors ? ? [ ] )
function setConn ( id : string ) {
if ( ! id || id === n . value . conn ) return
n . value . conn = id
ed . commit ( )
}
function setSide ( kind : 'portin' | 'portout' ) {
if ( kind === n . value . kind ) return
n . value . kind = kind
ed . commit ( )
}
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
// The "more" button opens the same list as a right click on the part.
const menu = useMenu ( )
const more = ref < { x : number ; y : number ; entries : MenuEntry [ ] } | null > ( null )
let closedAt = 0
function openMore ( e : MouseEvent ) {
// A click on the button while the menu is open closes it (the press already did).
if ( performance . now ( ) - closedAt < 300 ) return
const r = ( e . currentTarget as HTMLElement ) . getBoundingClientRect ( )
more . value = { x : r . right - 220 , y : r . bottom + 4 , entries : menu . build ( { kind : 'selection' } , { fit : ( ) => { } , place : ( ) => { } } ) }
}
2026-10-20 17:29:16 +00:00
/** The bundle of the cable this bundle or split belongs to. */
const cableBundle = computed ( ( ) => {
if ( n . value . kind === 'bundle' ) return n . value
if ( n . value . kind !== 'split' ) return undefined
const feed = ed . def . value . wires . find ( w => w . to . node === n . value . id )
return feed ? cableOf ( ed . def . value , feed ) : undefined
} )
2026-10-21 08:39:54 +00:00
const sleeveColor = computed ( ( ) => ( cableBundle . value ? ed . def . value . wires . find ( w => w . from . node === cableBundle . value ! . id ) ? . color : undefined ) )
A ports on top of the box, split into lines to wire by hand
On a component's box every connector port now sits at the very top of its
side, above the single pins, in auto and hand-drawn boxes alike. A port
can be split on one placed component (its settings or right click: Split
… into lines): right below the socket the box then gets a pin per line,
named after the line, so lines can be wired by hand without an adapter.
Lines going into the component are inputs, lines coming out outputs, each
facing out of its side; a bar in the type's colour ties them to the
socket. A cable still plugs into the socket at the same time. Dropping a
single wire on a socket (or clicking one while connecting) splits the
port and takes the first free line that runs that way. Join … lines
takes the line pins and their wires away again, as one undo step.
A line wired by hand joins the same net the cable's line reaches inside;
a wire and a cable on one line both drive it, and the check says so.
Line pins are left out of the open-input warning, docked panels and
bubbles; docked panels no longer get a row for a port's socket either.
Saved as an optional list on the placed component (splitPorts); without
it a box only has its ports moved to the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:08:27 +00:00
/** Connector ports on the component's box: each one can show its lines as pins on this box. */
const boxPorts = computed ( ( ) =>
( chipDef . value ? ( chipPins ( chipDef . value ) . ports ? ? [ ] ) : [ ] ) . map ( p => ( { key : p . key , name : portName ( p , ed . getDef . value ) , split : ! ! n . value . splitPorts ? . includes ( p . key ) } ) ) ,
)
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
const chipInputs = computed ( ( ) => ( chipDef . value ? chipPins ( chipDef . value ) . inputs . length : 0 ) )
const chipOutputs = computed ( ( ) => ( chipDef . value ? chipPins ( chipDef . value ) . outputs . length : 0 ) )
const hasPanel = computed ( ( ) => ed . def . value . nodes . some ( x => x . kind === 'panel' && x . attach === n . value . id ) )
2026-10-21 12:38:59 +00:00
const hasOutPanel = computed ( ( ) => ed . def . value . nodes . some ( x => x . kind === 'outpanel' && x . attach === n . value . id ) )
const outPanel = computed ( ( ) => n . value . kind === 'outpanel' )
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
function setRowLabel ( row : PanelRow , e : Event ) {
const v = ( e . target as HTMLInputElement ) . value . trim ( )
if ( v ) row . label = v
else delete row . label
ed . commit ( )
}
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
/** Tab in the last row's name, once it is filled in, adds a row and goes on to it. */
function tabOn ( row : PanelRow , i : number , e : KeyboardEvent ) {
const input = e . target as HTMLInputElement
if ( e . shiftKey || n . value . attach || i !== ( n . value . rows ? . length ? ? 0 ) - 1 || ! input . value . trim ( ) ) return
e . preventDefault ( )
setRowLabel ( row , e )
2026-10-23 10:59:16 +00:00
addAt ( n . value . rows ? . length ? ? 0 )
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
}
2026-10-23 10:59:16 +00:00
const rowList = ref < HTMLElement > ( )
const focusRow = ( id : string ) => nextTick ( ( ) => rowList . value ? . querySelector < HTMLInputElement > ( ` [data-row-id=" ${ id } "] .row-name ` ) ? . focus ( ) )
/** A new row at a place in the order, its name ready to type. */
function addAt ( index : number ) {
const row = ed . insertRow ( n . value , index )
if ( row ) focusRow ( row . id )
}
/** The row's colour: a click takes the next one, Shift + click the one before. */
function nextColor ( row : PanelRow , e : MouseEvent ) {
const order = [ undefined , ... LAMP _COLORS ]
const k = order . indexOf ( row . color )
ed . setRowColor ( row , order [ ( k + ( e . shiftKey ? - 1 : 1 ) + order . length ) % order . length ] )
}
/** Alt + ↑/↓ in a row's name moves the row. */
function moveByKey ( i : number , e : KeyboardEvent ) {
if ( ! e . altKey || n . value . attach ) return
const to = i + ( e . key === 'ArrowUp' ? - 1 : 1 )
const row = n . value . rows ? . [ i ]
if ( ! row || to < 0 || to >= ( n . value . rows ? . length ? ? 0 ) ) return
e . preventDefault ( )
ed . moveRowTo ( n . value , i , to )
focusRow ( row . id )
2026-10-21 09:51:45 +00:00
}
2026-10-23 10:59:16 +00:00
// Dragging a row by its grip: a line shows where it goes; dropping moves it there.
const rowDrag = ref < { from : number ; before : number } | null > ( null )
function startRowDrag ( from : number , e : PointerEvent ) {
if ( n . value . attach ) return
e . preventDefault ( )
rowDrag . value = { from , before : from }
const move = ( ev : PointerEvent ) => {
const items = [ ... ( rowList . value ? . querySelectorAll < HTMLElement > ( 'li.row' ) ? ? [ ] ) ]
let before = items . length
for ( let k = 0 ; k < items . length ; k ++ ) {
const r = items [ k ] ! . getBoundingClientRect ( )
if ( ev . clientY < r . top + r . height / 2 ) {
before = k
break
}
}
rowDrag . value = { from , before }
}
const up = ( ) => {
window . removeEventListener ( 'pointermove' , move )
window . removeEventListener ( 'pointerup' , up )
const d = rowDrag . value
rowDrag . value = null
if ( d ) ed . moveRowTo ( n . value , d . from , d . before > d . from ? d . before - 1 : d . before )
}
window . addEventListener ( 'pointermove' , move )
window . addEventListener ( 'pointerup' , up )
}
/** Where the drop line shows: above row k, or (k = rows) below the last. */
const dropAt = computed ( ( ) => {
const d = rowDrag . value
return d && d . before !== d . from && d . before !== d . from + 1 ? d . before : null
} )
2026-10-21 09:51:45 +00:00
const rowGaps = computed ( ( ) => {
const at = panelOffsets ( n . value . rows ? ? [ ] )
return at . map ( ( y , i ) => ( i ? y - at [ i - 1 ] ! - 1 : 0 ) )
} )
function setRowKey ( row : PanelRow , e : KeyboardEvent ) {
if ( e . key === 'Tab' ) return
e . preventDefault ( )
if ( e . key === 'Backspace' || e . key === 'Delete' || e . key === 'Escape' ) ed . setRowKey ( row , undefined )
else if ( e . key . length === 1 && e . key !== ' ' ) ed . setRowKey ( row , e . key . toLowerCase ( ) )
else return
; ( e . target as HTMLInputElement ) . blur ( )
}
/** What a part is called in messages: its label, its component's name, or its kind. */
function partName ( id : string | undefined ) : string {
const p = id ? ed . def . value . nodes . find ( x => x . id === id ) : undefined
if ( ! p ) return 'part'
if ( p . label ? . trim ( ) && ! p . autoLabel ) return p . label . trim ( )
if ( p . kind === 'chip' ) return ( p . chip ? ed . getDef . value ( p . chip ) ? . name : undefined ) ? ? 'component'
if ( p . kind === 'panel' ) return 'the input panel'
return ( KIND _NAMES [ p . kind ] ? ? p . kind ) . toLowerCase ( )
}
const isCableEnd = computed ( ( ) => n . value . kind === 'bundle' || n . value . kind === 'split' )
2026-10-23 13:34:36 +00:00
/** The part this one fits straight onto (its pins line up with the ones it is wired to). */
const latchHost = computed ( ( ) => ( isCableEnd . value ? undefined : ed . latchTargetOf ( n . value ) ) )
2026-10-21 09:51:45 +00:00
const plugPart = computed ( ( ) => ( isCableEnd . value && ! n . value . plug ? ed . plugTarget ( n . value ) : undefined ) )
const pitch = computed ( ( ) => {
const o = cableOffsets ( n . value )
return o . every ( ( v , i ) => v === i * ( o [ 1 ] ? ? 1 ) ) ? ( o [ 1 ] ? ? 1 ) : null
} )
const undriven = computed ( ( ) => {
if ( n . value . kind !== 'bundle' ) return 0
const fed = new Set ( ed . def . value . wires . filter ( w => w . to . node === n . value . id ) . map ( w => w . to . pin ) )
return cableBits ( n . value ) - fed . size
} )
BF input panels are component inputs, cable ends plug in more reliably; A merge panels, hex pass-through, design a component's box
- Inside a component, the switch and button rows of its input panels are now input pins (in order with the other inputs, named after the rows); "Rows are component inputs" can be turned off per panel to keep the old fixed switches
- Select input panels, Merge: one panel with all rows, spacing and wires kept; circuits that place this one keep their wires
- Cable ends plug in more often: bundling orders the wires by the part a side runs to, an end with only some wires on a part still plugs, an end placed by hand next to the pins plugs, and dragging an end near its part shows green rings and plugs it on drop
- Hex displays pass their four bits on (outputs on the right), so they can sit in the middle of a bus
- Design the box: move lamps, displays, the screen and the name on a component's box, draw lines, boxes, circles and text in six colours, size it, leave things off; every placed copy shows it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:49:29 +00:00
function setInner ( inner : boolean ) {
if ( inner ) n . value . inner = true
else delete n . value . inner
ed . commit ( )
}
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
function setRowHz ( row : PanelRow , e : Event ) {
const v = Number ( ( e . target as HTMLInputElement ) . value )
if ( v > 0 && v <= 1000 ) row . hz = v
else delete row . hz
ed . commit ( )
}
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< / script >
< template >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< section class = "sel" >
<!-- What it is , and the everyday actions -- >
< header class = "sel-head" >
< div class = "sel-title" >
< h3 : title = "HINTS[n.kind] ?? ''" > { { title } } < / h3 >
< span class = "sel-t" :title ="transistorNote" > { { transistors . toLocaleString ( ) } } T < / span >
< / div >
< div class = "sel-actions" >
< button v-if ="n.kind === 'chip' && chipDef" class="icon-btn" title="Open component (Enter)" @click="ed.open(chipDef.id)" >
< Icon name = "lucide:log-in" class = "size-4" / >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
< / button >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< button class = "icon-btn" title = "Duplicate (Ctrl+D)" @click ="ed.duplicate()" > < Icon name = "lucide:copy" class = "size-4" / > < / button >
< button class = "icon-btn" :disabled ="!wired" title = "Unlink all its wires" @click ="ed.unlink([n.id])" > < Icon name = "lucide:unlink" class = "size-4" / > < / button >
< button class = "icon-btn danger" title = "Delete (Del)" @click ="ed.deleteSelected()" > < Icon name = "lucide:trash-2" class = "size-4" / > < / button >
< button class = "icon-btn" title = "Everything else you can do with it (also on right click)" @click ="openMore" > < Icon name = "lucide:ellipsis" class = "size-4" / > < / button >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
< / div >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< / header >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
<!-- The few settings that matter for this kind of part -- >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< label v-if ="hasLabel" class="field" >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< span > { { n . kind === 'note' ? 'Text' : n . kind === 'chip' ? 'Name on the canvas' : n . kind === 'tag' ? 'Signal name' : n . kind === 'ref' ? 'Signal' : 'Name' } } < / span >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< textarea v -if = " n.kind = = = ' note ' " ref = "labelInput" v -model = " n.label " rows = "3" @change ="ed.commit(false)" / >
< input
v - else
ref = "labelInput"
v - model = "n.label"
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
: class = "{ 'auto-name': n.autoLabel }"
: title = "n.autoLabel ? 'Named automatically; typing a name keeps it' : ''"
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
: placeholder = "n.kind === 'chip' ? 'e.g. U1, ALU' : n.kind === 'panel' ? 'Shown above the panel' : n.kind === 'tag' || n.kind === 'ref' ? 'e.g. CLK, RESET' : ''"
: list = "n.kind === 'ref' ? 'signal-names' : undefined"
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
@ change = "onLabel"
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
@ keydown . enter = "($event.target as HTMLInputElement).blur()"
/ >
< / label >
2026-10-22 16:59:56 +00:00
< template v-if ="n.kind === 'portin' || n.kind === 'portout'" >
< div class = "sel-row" >
< label class = "field grow" title = "Changing it unplugs cables of the old type" >
< span > Connector type < / span >
< select : value = "n.conn ?? ''" @ change = "setConn(($event.target as HTMLSelectElement).value)" >
< option v -if = " ! n.conn | | ! connTypes.some ( c = > c . id === n . conn ) " value=" " disabled > Pick a type < / option >
< option v-for ="c in connTypes" :key="c.id" :value="c.id" > {{ c.name }} ( {{ c.lines.length }} lines ) < / option >
< / select >
< / label >
< label class = "field narrow" title = "In: a cable comes in here (the port sits on the left of the box). Out: a cable leaves here (on the right)." >
< span > Side < / span >
< select :value ="n.kind" @ change = "setSide(($event.target as HTMLSelectElement).value as 'portin' | 'portout')" >
< option value = "portin" > In < / option >
< option value = "portout" > Out < / option >
< / select >
< / label >
< / div >
< button class = "btn mb-2 w-full" :disabled ="!n.conn" @click ="ed.editConnector(n.conn!)" >
< Icon name = "lucide:cable" class = "size-4" / > Edit the type ' s lines
< / button >
< / template >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
< datalist id = "signal-names" >
< option v -for = " name in signalNames " :key ="name" :value ="name" / >
< / datalist >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< div v-if ="logic || family.length || widens" class="sel-row" >
< label v-if ="logic" class="field grow" title="Swapping keeps the wires on the pins in the same position" >
< span > Part < / span >
< select :value ="currentType" @change ="onSwap" >
< option value = "nand" > NAND ( 2 → 1 ) < / option >
< optgroup v-for ="[g, defs] in swapGroups" :key="g" :label ="g" >
< option v-for ="d in defs" :key="d.id" :value="`chip:${d.id}`" :disabled="!d.ok" > {{ d.label }} < / option >
< / optgroup >
< / select >
< / label >
< label v -else -if = " family.length " class = "field grow" title = "Swapping keeps the wires on the pins in the same position" >
< span > Type < / span >
< select :value ="currentType" @change ="onSwap" >
< option v-for ="k in family" :key="k" :value ="k" > {{ KIND_NAMES [ k ] }} < / option >
< / select >
< / label >
< label v-if ="widens" class="field narrow" :title="inputs > 2 ? `Built from ${inputs - 1} two-input gates in a tree, so the transistors count honestly` : 'Up to 16 inputs'" >
< span > Inputs < / span >
< input type = "number" min = "2" :max ="MAX_GATE_INPUTS" step = "1" :value ="inputs" @ change = "ed.setInputs(n, Number(($event.target as HTMLInputElement).value))" / >
< / label >
< / div >
< div v-if ="n.kind === 'input'" class="field" >
< span > Value < / span >
< div class = "seg" >
< button : class = "{ active: !n.on }" @click ="setOn(false)" > 0 < / button >
< button : class = "{ active: n.on }" @click ="setOn(true)" > 1 < / button >
< / div >
< / div >
< template v-if ="n.kind === 'clock'" >
< label class = "check" >
< input type = "checkbox" : checked = "n.hz === undefined" @change ="followTopBar" / >
Follow the speed in the top bar
< / label >
< label v-if ="n.hz !== undefined" class="field" >
< span > Frequency ( Hz ) < / span >
< input type = "number" min = "0.1" max = "1000" step = "any" :value ="n.hz" list = "hz-presets" @change ="setHz" / >
< datalist id = "hz-presets" >
< option v -for = " v in [ 0.5 , 1 , 2 , 5 , 10 , 30 , 100 ] " :key ="v" :value ="v" / >
< / datalist >
< / label >
< / template >
< div v-if ="n.kind === 'lamp' || n.kind === 'hex' || n.kind === 'pixel'" class="field" >
< span > Colour < / span >
< div class = "swatches" >
< button class = "swatch lamp-swatch default" : class = "{ active: !n.color, hex: n.kind === 'hex' }" title = "Default" @click ="setColor(undefined)" / >
< button
v - for = "c in LAMP_COLORS"
: key = "c"
class = "swatch lamp-swatch"
: class = "[`l-${c}`, { active: n.color === c }]"
: title = "c"
@ click = "setColor(c)"
/ >
< / div >
< / div >
< div v-if ="n.kind === 'note'" class="field" >
< span > Size < / span >
< div class = "seg" >
< button : class = "{ active: n.size === 'sm' }" @click ="setSize('sm')" > Small < / button >
< button : class = "{ active: !n.size }" @click ="setSize('md')" > Normal < / button >
< button : class = "{ active: n.size === 'lg' }" @click ="setSize('lg')" > Large < / button >
< / div >
< / div >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
<!-- Signals -- >
< template v-if ="n.kind === 'tag'" >
< p v-if ="senders.length > 1" class="result fail" >
< Icon name = "lucide:triangle-alert" class = "size-4 shrink-0" / >
< span > { { senders . length } } "Send signal" parts use this name : they all drive it , like a short . < / span >
< / p >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< div class = "sel-row" >
< button class = "btn grow" :disabled ="!signal" title = "A 'Use signal' for it, placed next to it" @click ="ed.useSignal(n)" > < Icon name = "lucide:tag" class = "size-4" / > Use it < / button >
< button class = "btn grow" :disabled ="!uses.length" : title = "uses.length ? `Used in ${uses.length} place${uses.length === 1 ? '' : 's'}` : 'Not used anywhere yet'" @click ="ed.selectSignal(signal)" >
< Icon name = "lucide:scan-search" class = "size-4" / > { { uses . length } } uses
< / button >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
< / div >
< / template >
< template v-if ="n.kind === 'ref'" >
< p v-if ="!senders.length" class="result fail" >
< Icon name = "lucide:triangle-alert" class = "size-4 shrink-0" / >
< span > { { signal ? ` Nothing sends " ${ signal } " in this circuit, so it reads 0. ` : 'Pick the signal it carries.' } } < / span >
< / p >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< div v -else class = "sel-row" >
< button class = "btn grow" @click ="ed.focusNode(senders[0]!.id)" > < Icon name = "lucide:locate-fixed" class = "size-4" / > Go to source < / button >
< button class = "btn grow" @click ="ed.selectSignal(signal)" > < Icon name = "lucide:scan-search" class = "size-4" / > Select all < / button >
A Loxone-style working aids: named signals, inverted inputs, a project check, values on cables, search, printable sheets; wire ends move by dragging
- Send signal / Use signal: name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire; selecting one lights up all of them, a use with no sender shows dashed
- Inverted inputs: Alt + click an input (or the menu/settings) puts a bubble on it; it reads the signal inverted through one NAND, counted in every transistor total
- Check (Circuit tab): open inputs, parts that drive nothing, duplicate pin names, unsent or doubly sent signals, loops that never settle; click one to show it. Open inputs get an orange marker on the canvas. Components no other circuit uses are listed with a delete
- Cables show the number they carry (= 13 · 0x0D); hovering a wire tells where it runs and its value
- Ctrl+F finds parts, signals, panel rows, notes and components in every circuit, with where each component is used
- Ctrl+P prints the circuit as a sheet with a title block on white paper (or save as PDF); also as an SVG file
- + and − under a selected gate change its number of inputs; swaps keep bubbles in place
- Drag a wire by its end to move that end to another pin; drop a dragged wire on another wire to tap its signal or feed what it fed
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:26:59 +00:00
< / div >
< / template >
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
2026-10-21 12:38:59 +00:00
<!-- Panel rows : switches , buttons and clocks , or lamps -- >
< template v-if ="n.kind === 'panel' || n.kind === 'outpanel'" >
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
< p v-if ="dock" class="result pass" >
< Icon name = "lucide:link" class = "size-4 shrink-0" / >
2026-10-21 12:38:59 +00:00
< span class = "grow" > Attached to { { dock } } . It moves with it and gets a row for each new { { outPanel ? 'output' : 'input' } } . < / span >
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
< button class = "btn-sm" title = "Keep the panel and its wires, but stop following the component" @click ="ed.undock(n)" > Detach < / button >
< / p >
< div class = "field" >
2026-10-23 10:59:16 +00:00
< div class = "rows-head" >
< span > Rows < / span >
< span v-if ="!outPanel && (n.rows?.length ?? 0) > 1" class="rows-all" >
all
< button v-for ="c in CONTROLS" :key="c.value" class="kind-btn" :title="`Every row a ${c.label.toLowerCase()}`" @click="ed.setRowsType(n, c.value)" >
< Icon :name ="c.icon" class = "size-3.5" / >
2026-10-21 09:51:45 +00:00
< / button >
2026-10-23 10:59:16 +00:00
< / span >
< / div >
< ul ref = "rowList" class = "panel-rows" : class = "{ dragging: !!rowDrag }" >
< template v-for ="(r, i) in n.rows ?? []" :key="r.id" >
<!-- Between two rows : add one here , or more or less empty space -- >
< li
v - if = "!n.attach"
class = "row-between"
: class = "{ spaced: i > 0 && rowGaps[i]! > 0 }"
: style = "i > 0 && rowGaps[i] ? { '--gap': Math.min(rowGaps[i]!, 5) } : undefined"
>
< span v-if ="i > 0 && rowGaps[i]" class="gap-label" > {{ rowGaps [ i ] }} empty < / span >
< span class = "between-tools" >
< button : title = "i === 0 ? 'Add a row above the first' : 'Add a row here'" @click ="addAt(i)" > < Icon name = "lucide:plus" class = "size-3" / > Row < / button >
< template v-if ="i > 0" >
< button title = "One empty row more here" @ click = "ed.setRowGap(n, i, rowGaps[i]! + 1)" > < Icon name = "lucide:plus" class = "size-3" / > Space < / button >
< button v-if ="rowGaps[i]" title="One empty row less here" @click="ed.setRowGap(n, i, rowGaps[i]! - 1)" > < Icon name = "lucide:minus" class = "size-3" / > Space < / button >
< / template >
2026-10-21 09:51:45 +00:00
< / span >
2026-10-23 10:59:16 +00:00
< / li >
< li class = "row" :data-row-id ="r.id" : class = "{ lifted: rowDrag?.from === i, 'drop-above': dropAt === i, 'drop-below': dropAt === (n.rows?.length ?? 0) && i === (n.rows?.length ?? 0) - 1 }" >
< span v-if ="!n.attach" class="row-grip" title="Drag to move (or Alt + ↑ ↓ in the name)" @pointerdown="startRowDrag(i, $event)" >
< Icon name = "lucide:grip-vertical" class = "size-3.5" / >
< / span >
< button
v - if = "r.type !== 'clock' || outPanel"
class = "row-color lamp-swatch"
: class = "r.color ? `l-${r.color}` : [outPanel ? 'default' : 'default-on', { button: r.type === 'button' && !outPanel }]"
: title = "`Colour while on: ${r.color ?? 'default'}. Click for the next, Shift + click for the one before`"
@ click = "nextColor(r, $event)"
/ >
< span v -else class = "row-color none" / >
< input
class = "row-name"
: value = "r.label ?? ''"
: placeholder = "rowLabel({ ...r, label: undefined }, i)"
title = "Name"
@ change = "setRowLabel(r, $event)"
@ keydown . tab = "tabOn(r, i, $event)"
@ keydown . up = "moveByKey(i, $event)"
@ keydown . down = "moveByKey(i, $event)"
/ >
< span v-if ="!outPanel" class="kind-toggle" role="radiogroup" aria-label="Kind" >
2026-10-21 09:51:45 +00:00
< button
2026-10-23 10:59:16 +00:00
v - for = "c in CONTROLS"
: key = "c.value"
role = "radio"
: aria - checked = "r.type === c.value"
: class = "{ on: r.type === c.value }"
: title = "c.label"
@ click = "ed.setRowType(r, c.value)"
>
< Icon :name ="c.icon" class = "size-3.5" / >
< / button >
< / span >
< input
v - if = "r.type === 'clock' && !outPanel"
type = "number"
min = "0.1"
max = "1000"
step = "any"
class = "row-side hz"
: value = "r.hz ?? ''"
placeholder = "Hz"
title = "Frequency in Hz; empty follows the top bar"
@ change = "setRowHz(r, $event)"
/ >
< input
v - else - if = "!outPanel"
class = "row-side key-input"
: value = "r.key?.toUpperCase() ?? ''"
readonly
placeholder = "key"
title = "Keyboard key: click, then press it (Backspace clears)"
@ keydown = "setRowKey(r, $event)"
/ >
< button class = "icon-btn" title = "Remove this row" @ click = "ed.dropRow(n, r.id)" > < Icon name = "lucide:x" class = "size-3.5" / > < / button >
< / li >
< / template >
< li v-if ="!n.attach" class="row-between end" >
< button class = "add-row" title = "Add a row below the last (or Tab in the last name)" @ click = "addAt(n.rows?.length ?? 0)" >
< Icon name = "lucide:plus" class = "size-3.5" / > Add row
< / button >
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
< / li >
< / ul >
< / div >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< EditorFold id = "panel-options" title = "Panel options" >
< button class = "btn w-full" :disabled ="!n.rows?.length" @ click = "ed.startLinking([n.id], outPanel ? 'in' : 'out')" >
< Icon name = "lucide:cable" class = "size-4" / > Wire rows one by one
< / button >
< label
class = "check mt-2"
: title = "outPanel ? 'Used as a component, its rows are output pins (top to bottom, with the other outputs).' : 'Used as a component, its switch and button rows are its input pins (top to bottom, with the other inputs). Clock rows stay inside.'"
>
< input type = "checkbox" :checked ="!n.inner" @ change = "setInner(!($event.target as HTMLInputElement).checked)" / >
Rows are component { { outPanel ? 'outputs' : 'inputs' } }
< / label >
< / EditorFold >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< / template >
2026-10-23 13:34:36 +00:00
<!-- Latched straight onto another part , or able to -- >
< p v-if ="n.latch" class="result pass" >
< Icon name = "lucide:link" class = "size-4 shrink-0" / >
< span class = "grow" > Latched onto { { partName ( n . latch ) } } : it moves with it < / span >
< button class = "btn-sm" title = "Let go: it steps aside and its wires show again" @click ="ed.unlatch(n)" > Unlatch < / button >
< / p >
< button v -else -if = " latchHost " class = "btn mb-2 w-full" : title = "`Sit straight on the pins of ${partName(latchHost.id)}, without wires in between, and move along with it`" @click ="ed.latchPart(n)" >
< Icon name = "lucide:link" class = "size-4" / > Latch onto { { partName ( latchHost . id ) } }
< / button >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
<!-- Cable ends -- >
2026-10-20 17:29:16 +00:00
< template v-if ="n.kind === 'bundle' || n.kind === 'split'" >
2026-10-21 09:51:45 +00:00
< p v-if ="n.plug" class="result pass" >
< Icon name = "lucide:plug-zap" class = "size-4 shrink-0" / >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< span class = "grow" > Plugged into { { partName ( n . plug ) } } < / span >
2026-10-21 09:51:45 +00:00
< button class = "btn-sm" title = "Pull it out: it steps aside and its wires show again" @click ="ed.unplugEnd(n)" > Unplug < / button >
< / p >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< button v -else -if = " plugPart " class = "btn mb-2 w-full" : title = "`Sit straight on the pins of ${partName(plugPart.id)}, without wires in between`" @click ="ed.plugEnd(n)" >
2026-10-21 09:51:45 +00:00
< Icon name = "lucide:plug" class = "size-4" / > Plug into { { partName ( plugPart . id ) } }
< / button >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< div class = "sel-row" >
< label class = "field grow" >
2026-10-21 09:51:45 +00:00
< span > Wires < / span >
< input type = "number" min = "2" :max ="MAX_BITS" step = "1" :value ="cableBits(n)" @ change = "ed.setBits(n, Number(($event.target as HTMLInputElement).value))" / >
< / label >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< label class = "field grow" : title = "n.plug ? 'Set by the pins it is plugged into' : 'Rows from one wire to the next, to line up with pins further apart'" >
2026-10-21 09:51:45 +00:00
< span > Spacing < / span >
< input
type = "number"
min = "1"
max = "8"
step = "1"
: value = "pitch ?? ''"
: placeholder = "pitch ? '' : 'as plugged'"
: disabled = "!!n.plug"
@ change = "ed.setPitch(n, Number(($event.target as HTMLInputElement).value))"
/ >
< / label >
< / div >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< EditorFold id = "cable-more" title = "Cable" : note = "n.names?.some(Boolean) ? n.names.map((x, i) => x || i).join(', ') : ''" >
< div v-if ="cableBundle" class="field" >
< span > Sleeve colour < / span >
< div class = "swatches" >
< button class = "swatch none" : class = "{ active: !sleeveColor }" title = "Default: grey" @ click = "ed.setCableColor(cableBundle.id, undefined)" / >
< button
v - for = "c in WIRE_COLORS"
: key = "c"
class = "swatch"
: class = "[`c-${c}`, { active: sleeveColor === c }]"
: title = "c"
@ click = "ed.setCableColor(cableBundle.id, c)"
/ >
< / div >
2026-10-21 08:39:54 +00:00
< / div >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< button
v - if = "n.kind === 'bundle' && undriven && !n.plug"
class = "btn mb-2 w-full"
title = "A switch for every wire nothing drives yet; the cable plugs into it"
@ click = "ed.addCablePanel(n.id)"
>
< Icon name = "lucide:sliders-vertical" class = "size-4" / > Attach input panel
< / button >
< button v-if ="cableBundle" class="btn w-full" title="Take the cable apart again into single wires" @click="ed.removeCable(cableBundle.id)" >
< Icon name = "lucide:split" class = "size-4" / > Remove cable
< / button >
< / EditorFold >
2026-10-20 17:29:16 +00:00
< / template >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
<!-- Less used , folded away -- >
< EditorFold v-if ="n.kind === 'input' || n.kind === 'button'" id="keyboard" title="Keyboard key" :note="n.key?.toUpperCase() ?? ''" >
< input : value = "n.key ?? ''" readonly placeholder = "Click, then press a key" class = "key-input field-input" @keydown ="setKey" / >
< / EditorFold >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< EditorFold v-if ="n.kind === 'pixel'" id="pixel-screen" title="Screen on the box" :note="n.screen ?? ''" >
< input
class = "field-input"
: value = "n.screen ?? ''"
list = "screen-names"
placeholder = "Main screen"
title = "Pixels with the same screen name make one screen on the component's box"
@ change = "ed.setScreen([n.id], ($event.target as HTMLInputElement).value)"
@ keydown . enter = "($event.target as HTMLInputElement).blur()"
/ >
< datalist id = "screen-names" >
< option v -for = " name in screenNames " :key ="name" :value ="name" / >
< / datalist >
< / EditorFold >
< EditorFold v-if ="invertible.length || cables.out.length || cables.in.length || chipInputs || chipOutputs" id="pins" title="Pins" :note="inverted ? `${inverted} inverted` : ''" >
< div v-if ="invertible.length" class="field" >
< span > Inverted inputs ( Alt + click a pin ) < / span >
< div class = "invert-pins" >
< button
v - for = "p in invertible"
: key = "p.key"
class = "invert-pin"
: class = "{ on: p.on }"
: title = "p.on ? 'Inverted: one NAND, 4 transistors. Click to take the bubble off.' : 'Invert this input'"
@ click = "ed.toggleInvert(n, p.key)"
>
< span class = "dot" / > { { p . label } }
< / button >
< / div >
< / div >
< div v-if ="cables.out.length || cables.in.length" class="field cable-choices" >
< span > Plug a cable onto its pins < / span >
< div v-if ="cables.out.length" class="cable-row" >
< span class = "hint" > From outputs < / span >
< button v-for ="g in cables.out" :key="g.label" class="btn-sm" :title="`A cable with ${g.pins.length} wires out of these pins`" @click="ed.cableOut(n.id, g.pins)" > {{ g.label }} < / button >
< / div >
< div v-if ="cables.in.length" class="cable-row" >
< span class = "hint" > Into inputs < / span >
< button v-for ="g in cables.in" :key="g.label" class="btn-sm" :title="`A cable with ${g.pins.length} wires into these pins`" @click="ed.cableIn(n.id, g.pins)" > {{ g.label }} < / button >
< / div >
< / div >
< div v-if ="chipInputs || chipOutputs" class="field mb-0" >
< span > Wire one by one < / span >
< div class = "sel-row" >
< button class = "btn grow" :disabled ="!chipInputs" title = "Click the source for each input in turn" @ click = "ed.startLinking([n.id], 'in')" >
< Icon name = "lucide:cable" class = "size-4" / > Inputs
< / button >
< button class = "btn grow" :disabled ="!chipOutputs" title = "Click the target for each output in turn" @ click = "ed.startLinking([n.id], 'out')" >
< Icon name = "lucide:cable" class = "size-4" / > Outputs
< / button >
< / div >
< / div >
< / EditorFold >
< EditorFold v-if ="n.kind === 'chip' && chipDef" id="component" title="Component" >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< p v-if ="chipDef.description" class="hint" > {{ chipDef.description }} < / p >
< dl v-if ="chipStats" class="stats" >
< dt > { { chipStats . sequential ? 'Memory' : 'Delay' } } < / dt >
< dd > { { chipStats . sequential ? 'yes (feedback)' : ` ${ chipStats . delay } gates ` } } < / dd >
< / dl >
< div class = "grid gap-2" >
BF input panels are component inputs, cable ends plug in more reliably; A merge panels, hex pass-through, design a component's box
- Inside a component, the switch and button rows of its input panels are now input pins (in order with the other inputs, named after the rows); "Rows are component inputs" can be turned off per panel to keep the old fixed switches
- Select input panels, Merge: one panel with all rows, spacing and wires kept; circuits that place this one keep their wires
- Cable ends plug in more often: bundling orders the wires by the part a side runs to, an end with only some wires on a part still plugs, an end placed by hand next to the pins plugs, and dragging an end near its part shows green rings and plugs it on drop
- Hex displays pass their four bits on (outputs on the right), so they can sit in the middle of a bus
- Design the box: move lamps, displays, the screen and the name on a component's box, draw lines, boxes, circles and text in six colours, size it, leave things off; every placed copy shows it
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:49:29 +00:00
< button class = "btn w-full" title = "Move its lamps and displays, draw on it, size it: for every copy" @click ="ed.designFace(chipDef.id)" >
< Icon name = "lucide:pen-tool" class = "size-4" / > Design its box
< / button >
A ports on top of the box, split into lines to wire by hand
On a component's box every connector port now sits at the very top of its
side, above the single pins, in auto and hand-drawn boxes alike. A port
can be split on one placed component (its settings or right click: Split
… into lines): right below the socket the box then gets a pin per line,
named after the line, so lines can be wired by hand without an adapter.
Lines going into the component are inputs, lines coming out outputs, each
facing out of its side; a bar in the type's colour ties them to the
socket. A cable still plugs into the socket at the same time. Dropping a
single wire on a socket (or clicking one while connecting) splits the
port and takes the first free line that runs that way. Join … lines
takes the line pins and their wires away again, as one undo step.
A line wired by hand joins the same net the cable's line reaches inside;
a wire and a cable on one line both drive it, and the check says so.
Line pins are left out of the open-input warning, docked panels and
bubbles; docked panels no longer get a row for a port's socket either.
Saved as an optional list on the placed component (splitPorts); without
it a box only has its ports moved to the top.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:08:27 +00:00
< button
v - for = "p in boxPorts"
: key = "p.key"
class = "btn w-full"
: title = "p.split ? 'Only the socket again; wires on its lines are removed' : 'A pin per line below the socket, to wire lines by hand; a cable still plugs into the socket'"
@ click = "ed.toggleSplit(n, p.key)"
>
< Icon : name = "p.split ? 'lucide:merge' : 'lucide:split'" class = "size-4" / > { { p . split ? ` Join ${ p . name } lines ` : ` Split ${ p . name } into lines ` } }
< / button >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< div v-if ="(chipInputs && !hasPanel) || (chipOutputs && !hasOutPanel)" class="sel-row" >
< button v-if ="chipInputs && !hasPanel" class="btn grow" title="A switch for every free input, docked to the left" @click="ed.addPanel(n.id)" >
< Icon name = "lucide:sliders-vertical" class = "size-4" / > Input panel
< / button >
< button v-if ="chipOutputs && !hasOutPanel" class="btn grow" title="A lamp for every output, docked to the right" @click="ed.addPanel(n.id, 'out')" >
< Icon name = "lucide:list-checks" class = "size-4" / > Output panel
< / button >
< / div >
< div class = "sel-row" >
< button class = "btn grow" title = "Replace it with the parts inside; outside wires join them directly" @click ="ed.unpack(n.id)" >
< Icon name = "lucide:ungroup" class = "size-4" / > Unpack
< / button >
< button class = "btn grow" title = "Give this one its own copy, so changing it leaves the others alone" @click ="ed.makeIndependent(n.id)" >
< Icon name = "lucide:copy-plus" class = "size-4" / > Own copy
< / button >
A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
panel" docks one to a component with a row per free input; it moves
with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
switches, lamps and pins take the name of the component pin they are
wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
free pin, click-then-click works, and "Connect one by one" (W) wires a
selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
highlighted.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:17:25 +00:00
< / div >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< / div >
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< / EditorFold >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
R saves like a game: one save per project on every device, Load game in the menu, a pause menu, and a lean side panel
- Sync: when two devices changed the same project, the newer save wins
everywhere and the other becomes a savegame of it (new endpoint to keep
a savegame without replacing the save), never an "(other device)" copy.
A first visit keeps its starter unsaved until something changes, and
the main menu waits for the account's saves before anything starts.
- Main menu: Load game lists every save. In the editor, Esc with nothing
selected (or the project button) opens a pause menu: Resume, Save,
Save as copy, Load, Settings, How to play, Main menu. The projects
dialog is gone.
- Selection tab: name and transistors on top, one icon row (open,
duplicate, unlink, delete, more = the right-click menu), only the
settings that matter for the part; pins, component tools, keys, cable
and panel options fold away and remember it. X/Y fields removed.
The Circuit tab folds its component settings, transistor breakdown
and tools the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 16:36:17 +00:00
< EditorContextMenu v -if = " more " :x ="more.x" :y ="more.y" :entries ="more.entries" @ close = "more = null" / >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< / section >
< / template >