2026-10-17 10:49:38 +00:00
< script setup lang = "ts" >
import { gateDrawing , sevenSegment } from '~/lib/draw'
2026-10-21 09:59:17 +00:00
import { LANE , nameTags , RIBBON _MAX } 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 { baseOf , gateFamily , inputCount , MAX _GATE _INPUTS } from '~/lib/logic/wide'
2026-10-28 11:51:09 +00:00
import { faceTransform , GRID as G , noteLines , noteScale , PANEL _CONTROL _W , portLines , rgbHex , shapeTransform , type Shape } from '~/lib/logic/geometry'
2026-10-28 12:30:07 +00:00
import { benchLayout } from '~/lib/logic/benchLayout'
2026-10-28 12:05:57 +00:00
import { keyLabel , TERMINAL _COLS , TERMINAL _LINES } from '~/lib/logic/devices'
2026-10-17 10:49:38 +00:00
import type { CircuitNode } from '~/lib/logic/types'
const props = defineProps < {
node : CircuitNode
shape : Shape
selected : boolean
ghost ? : boolean
2026-10-20 18:09:23 +00:00
/** The pass-through pin of a lamp or output is wired: its label moves out of the wire's way. */
through ? : boolean
2026-10-20 18:15:38 +00:00
/** Name of the pin this part is wired to, shown dimmed while it has no name of its own. */
hint ? : string
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 tag or reference of the signal selected: shown highlighted. */
linked ? : boolean
/** Inputs with no wire: a small orange marker says they read 0. */
open ? : Set < string >
2026-10-17 10:49:38 +00:00
} > ( )
const ed = useEditor ( )
const style = computed ( ( ) => ed . project . value . settings . symbols )
const gate = computed ( ( ) => ( props . shape . gate ? gateDrawing ( props . shape , style . value ) : null ) )
const chipDef = computed ( ( ) => ( props . node . chip ? ed . getDef . value ( props . node . chip ) : undefined ) )
const b = computed ( ( ) => props . shape . body )
2026-10-22 16:59:56 +00:00
// Connector ports: their type, lines and colour.
const CONN _HEX : Record < string , string > = { red : '#ff5c5c' , orange : '#ff9f43' , yellow : '#ffd93d' , green : '#3ddc84' , blue : '#4dabff' , purple : '#b388ff' , pink : '#ff7ac6' }
const connColor = ( id ? : string ) => {
const c = id ? ed . getDef . value . conn ? . ( id ) ? . color : undefined
return c ? CONN _HEX [ c ] ? ? '#8592a3' : '#8592a3'
}
const connType = computed ( ( ) => ( props . node . conn ? ed . getDef . value . conn ? . ( props . node . conn ) : undefined ) )
const connName = computed ( ( ) => connType . value ? . name ? ? 'Port' )
const lines = computed ( ( ) => ( props . node . kind === 'portin' || props . node . kind === 'portout' ? portLines ( props . node , ed . getDef . 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 rows = computed ( ( ) => props . node . rows ? ? [ ] )
2026-10-20 18:15:38 +00:00
// A name typed by hand shows as is. Otherwise the name of the pin the part is
// wired to, or its automatic name, shows dimmed.
const own = computed ( ( ) => ( props . node . autoLabel ? '' : ( props . node . label ? . trim ( ) ? ? '' ) ) )
const ioText = computed ( ( ) => own . value || props . hint || props . node . label ? . trim ( ) || '' )
const ghosted = computed ( ( ) => ! own . value && ! ! ioText . value )
2026-10-17 10:49:38 +00:00
2026-10-21 09:59:17 +00:00
const cableEnd = computed ( ( ) => props . node . kind === 'bundle' || props . node . kind === 'split' )
2026-10-21 09:51:45 +00:00
2026-10-21 09:59:17 +00:00
/** What is wired to a cable end: which single wires, in which colour, whether the cable is, and the names to show. */
const cableLinks = computed ( ( ) => {
if ( ! cableEnd . value || props . ghost ) return null
const d = ed . def . value
const id = props . node . id
const inward = props . node . kind === 'bundle'
const linked = new Set < string > ( )
const colors = new Map < string , string > ( )
let bus = false
for ( const w of d . wires ) {
const single = inward ? w . to . node === id && w . to . pin : w . from . node === id && w . from . pin
if ( single ) {
linked . add ( single )
if ( w . color && ! colors . has ( single ) ) colors . set ( single , w . color )
}
if ( inward ? w . from . node === id : w . to . node === id ) bus = true
}
return { linked , colors , bus , tags : nameTags ( d , props . node , ed . getDef . value ) }
} )
/ * *
* Each single wire of a cable end runs on into its own line of the ribbon :
* a short straight piece at the pin , then over to its lane at the cable pin .
* /
const harness = computed ( ( ) => {
2026-10-20 17:29:16 +00:00
const s = props . shape
2026-10-21 09:59:17 +00:00
const bus = [ ... s . inputs , ... s . outputs ] . find ( p => p . bus )
const singles = props . node . kind === 'bundle' ? s . inputs : s . outputs
if ( ! bus ) return [ ]
const n = singles . length
const lane = n <= RIBBON _MAX ? LANE : 0
const dir = props . node . kind === 'bundle' ? 1 : - 1
return singles . map ( ( p , i ) => {
const x = p . dx * G
const bx = bus . dx * G
const y = ( bus . dy + ( i - ( n - 1 ) / 2 ) * lane ) * G
return { key : p . key , d : ` M ${ x } ${ p . dy * G } H ${ x + dir * 0.2 * G } L ${ bx - dir * 0.2 * G } ${ y } H ${ bx } ` }
} )
2026-10-20 17:29:16 +00:00
} )
2026-10-21 09:59:17 +00:00
/** Free cable ends hide the dots where wires join them, so the wires run straight on. */
function dot ( key : string ) : boolean {
const c = cableLinks . value
if ( ! c || props . node . plug ) return true
return key === 'q' || key === 'a' ? ! c . bus : ! c . linked . has ( 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
/** A signal's flag: pointing right; a reference has a notch at its tail. */
function flag ( x0 : number , w : number , notch : boolean ) {
const x1 = ( x0 + w ) * G
const a = x0 * G
return ` M ${ a } ${ - 0.6 * G } H ${ x1 - 0.45 * G } L ${ x1 } 0L ${ x1 - 0.45 * G } ${ 0.6 * G } H ${ a } ${ notch ? ` L ${ a + 0.35 * G } 0 ` : '' } Z `
}
/** A reference whose name no tag in this circuit sends. */
const orphan = computed ( ( ) => {
if ( props . node . kind !== 'ref' || props . ghost ) return false
const name = props . node . label ? . trim ( )
return ! name || ! ed . def . value . nodes . some ( n => n . kind === 'tag' && n . label ? . trim ( ) === name )
} )
/** A selected gate that can take more inputs gets + and − below it. */
const widen = computed ( ( ) => {
if ( ! props . selected || props . ghost || ! props . shape . gate ) return null
const get = ed . getDef . value
const base = baseOf ( props . node , get )
if ( ! base || ! gateFamily ( get , base ) ) return null
const n = inputCount ( props . node , get )
return { n , more : n < MAX _GATE _INPUTS , less : n > 2 }
} )
/** Bubbles on inverted inputs: on the stub of a gate or lamp, just outside a component's box. */
const bubbles = computed ( ( ) => {
const inv = new Set ( props . node . invert ? ? [ ] )
if ( ! inv . size ) return [ ]
const dx = props . node . kind === 'chip' && ! props . shape . gate ? - 0.3 : 0.28
return props . shape . inputs . filter ( p => inv . has ( p . key ) ) . map ( p => ( { key : p . key , x : ( p . dx + dx ) * G , y : p . dy * G } ) )
} )
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
/** Pin names on a component's box, each on its own edge; the lines of a split port sit in a little from their socket. */
const boxLabels = computed ( ( ) =>
[ ... props . shape . inputs , ... props . shape . outputs ] . map ( p => {
const left = p . dx === 0
const inset = p . port ? 11 : 5
return { key : p . key , label : p . label , y : p . dy * G + 3.5 , x : left ? inset : p . dx * G - inset , anchor : left ? 'start' : 'end' }
} ) ,
)
2026-10-26 21:45:47 +00:00
/ * *
* Split ports on a component 's box, in the type' s colour : a bar from the
* socket down along its lines , and a line above and below them that marks
* off which pins are its wires , from the pin tips to past their names .
* /
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
const portBars = computed ( ( ) => {
const pins = [ ... props . shape . inputs , ... props . shape . outputs ]
return pins . flatMap ( p => {
const lines = p . conn ? pins . filter ( l => l . port === p . key ) : [ ]
if ( ! lines . length ) return [ ]
const inward = p . dx === 0 ? 1 : - 1
const x = p . dx * G
2026-10-26 21:45:47 +00:00
const top = ( Math . min ( ... lines . map ( l => l . dy ) ) - 0.5 ) * G
const bottom = ( Math . max ( ... lines . map ( l => l . dy ) ) + 0.5 ) * G
const outer = x - inward * 9
const inner = x + inward * Math . min ( 15 + Math . max ( ... lines . map ( l => l . label . length ) ) * 5.6 , ( props . shape . body . w * G ) / 2 )
return [
{
key : p . key ,
conn : p . conn ,
// From the socket's inner corner, down between the line pins and their names.
bar : ` M ${ x + inward * 4 } ${ p . dy * G + 5 } H ${ x + inward * 7 } V ${ bottom } ` ,
bounds : ` M ${ outer } ${ top } H ${ inner } M ${ outer } ${ bottom } H ${ inner } ` ,
} ,
]
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
} )
} )
2026-10-21 09:51:45 +00:00
/** The edge a plugged cable end touches its part with. */
const seam = computed ( ( ) => ( props . node . kind === 'bundle' ? 0 : G ) )
2026-10-17 10:49:38 +00:00
const v = ( pin : string ) => ( props . ghost ? 0 : ed . val ( props . node . id , pin ) )
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
/** Value inside this chip, for its lamps and displays. */
const fv = ( inner : string , pin : string ) => ( props . ghost ? 0 : ed . faceVal ( props . node . id , inner , pin ) )
const faceHex = ( inner : string ) => sevenSegment ( [ 0 , 1 , 2 , 3 ] . reduce ( ( n , i ) => n + ( fv ( inner , ` b ${ i } ` ) << i ) , 0 ) )
2026-10-28 11:51:09 +00:00
/** The colour of an RGB pixel inside this chip ('' while off). */
const facePx = ( inner : string ) => rgbHex ( fv ( inner , 'r' ) , fv ( inner , 'g' ) , fv ( inner , 'b' ) )
const rgbNow = computed ( ( ) => ( props . node . rgb ? rgbHex ( v ( 'r' ) , v ( 'g' ) , v ( 'b' ) ) : '' ) )
2026-10-28 12:30:07 +00:00
// Test bench: the layout of its box, its rows and how they went.
interface BenchRowView {
i : number
state : string
live : boolean
cells : { key : string ; x : number ; text : string ; cls : string } [ ]
title : string
}
const bl = computed ( ( ) => benchLayout ( props . node ) )
const benchTitleW = computed ( ( ) => ( ( props . node . label ? . trim ( ) || 'Test bench' ) . length * 6.4 + 10 ) )
const bench = computed ( ( ) => {
const n = props . node
const empty = { state : 'idle' , line : '' , cols : false , rows : [ ] as BenchRowView [ ] , right : 0 }
if ( n . kind !== 'bench' ) return empty
const l = bl . value
const right = l . x + Math . max ( l . tableW , 9 )
const cols = ! ! n . bench ? . cols ? . length
if ( ! cols ) return { ... empty , right }
const r = props . ghost ? undefined : ed . benchResults . value . get ( n . id )
const live = props . ghost ? undefined : ed . benchLive . value . get ( n . id )
const rows : BenchRowView [ ] = ( n . bench ? . rows ? ? [ ] ) . slice ( 0 , l . shown ) . map ( ( row , i ) => {
const res = r ? . rows [ i ]
const state = res ? . ok === false ? 'fail' : res ? . ok ? 'pass' : ''
const cells = l . cols . map ( c => {
if ( c . col === '#' ) return { key : c . key , x : c . x , text : String ( i + 1 ) , cls : 'num' }
if ( c . col === 'ticks' ) return { key : c . key , x : c . x , text : row . ticks ? ? '' , cls : 'num' }
if ( c . col === 'state' ) return { key : c . key , x : c . x , text : res ? . ok === false ? '✗' : res ? . ok ? '✓' : '' , cls : state }
if ( c . drive ) return { key : c . key , x : c . x , text : row . set ? . [ c . col ] ? ? '' , cls : 'drive' }
const want = row . expect ? . [ c . col ] ? ? ''
const got = res ? . got [ c . col ]
const wrong = res ? . ok === false && want !== '' && got !== undefined && Number ( want ) !== got
return { key : c . key , x : c . x , text : want || ( got !== undefined ? String ( got ) : '' ) , cls : wrong ? 'wrong' : want ? '' : 'got' }
} )
const gotText = res ? Object . entries ( res . got ) . map ( ( [ id , v ] ) => ` ${ n . bench ? . cols ? . find ( c => c . id === id ) ? . name ? ? id } = ${ v } ` ) . join ( ', ' ) : ''
return { i , state , live : live === i , cells , title : [ res ? . error , gotText && ` Reads ${ gotText } ` , 'Click: put this row on the circuit' ] . filter ( Boolean ) . join ( '\n' ) }
} )
const line = ! n . bench ? . rows . length ? 'no rows yet: double-click' : ! r ? '' : r . error && ! r . fail ? r . error : r . fail ? ` ✗ ${ r . fail } failing ` : r . pass ? ` ✓ ${ r . pass } pass ` : ''
return { state : r ? . fail || ( r ? . error && ! r . pass ) ? 'fail' : r ? . pass ? 'pass' : 'idle' , line , cols , rows , right }
2026-10-28 12:12:43 +00:00
} )
2026-10-28 12:05:57 +00:00
// Terminal and keyboard: what the store keeps for this part.
const TERM _CHAR = 6.6
const termLines = computed ( ( ) => {
if ( props . node . kind !== 'terminal' || props . ghost ) return [ ]
void ed . devVersion . value
return ( ed . screens . value . get ( props . node . id ) ? ? [ '' ] ) . slice ( - TERMINAL _LINES )
} )
const termCursor = computed ( ( ) => {
const lines = termLines . value . length ? termLines . value : [ '' ]
return { x : Math . min ( TERMINAL _COLS - 1 , lines [ lines . length - 1 ] ! . length ) , y : lines . length - 1 }
} )
const kbTyping = computed ( ( ) => ed . typingInto . value === props . node . id )
const kbWaiting = computed ( ( ) => {
if ( props . node . kind !== 'keyboard' || props . ghost ) return [ ]
void ed . devVersion . value
return [ ... ( ed . keyQueues . value . get ( props . node . id ) ? ? [ ] ) ]
} )
const kbQueue = computed ( ( ) => kbWaiting . value . slice ( 0 , 6 ) . map ( keyLabel ) . join ( '' ) )
const kbCount = computed ( ( ) => ( kbWaiting . value . length ? ` ${ kbWaiting . value . length } waiting ` : '' ) )
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
const FACE _SCALE = 0.6
2026-10-17 10:49:38 +00:00
const hexValue = computed ( ( ) => [ 0 , 1 , 2 , 3 ] . reduce ( ( n , i ) => n + ( v ( ` b ${ i } ` ) << i ) , 0 ) )
const segments = computed ( ( ) => sevenSegment ( hexValue . value ) )
2026-10-23 10:27:12 +00:00
// Lamps and outputs show what they pass on (q): with a bubble, that is the inverted wire.
const lit = computed ( ( ) => v ( props . node . kind === 'pixel' ? 'a' : 'q' ) === 1 )
2026-10-17 10:49:38 +00:00
const title = computed ( ( ) => {
if ( props . node . kind === 'chip' ) return chipDef . value ? ` ${ chipDef . value . name } ${ chipDef . value . description ? ` : ${ chipDef . value . description } ` : '' } \ nDouble-click to open ` : 'Missing component'
return undefined
} )
< / script >
< template >
< g
: transform = "`translate(${node.x * G} ${node.y * G})`"
: data - node = "node.id"
class = "node"
: class = "{ selected, ghost, [`kind-${node.kind}`]: true }"
>
< title v-if ="title" > {{ title }} < / title >
<!-- Logic gate symbol ( NAND , or a component drawn as a gate ) -- >
< template v-if ="gate" >
< path :d ="gate.stubs" class = "stub" / >
< path :d ="gate.body" class = "body" : class = "{ prim: node.kind === 'nand' }" / >
< path v -if = " gate.extra " :d ="gate.extra" class = "stroke-only" / >
< circle v -if = " gate.bubble " v -bind = " gate.bubble " class = "body" / >
< text v-if ="gate.label" :x="gate.label.x" :y="gate.label.y" class="gate-label" text-anchor="middle" > {{ gate.label.text }} < / text >
< / template >
<!-- Component box -- >
< template v -else -if = " node.kind = = = ' chip ' " >
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
< text v-if ="node.label" :x="(b.w * G) / 2" :y="b.y * G - 5" text-anchor="middle" class="instance-label" > {{ node.label }} < / text >
2026-10-17 10:49:38 +00:00
< rect :x ="0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body chip" : class = "{ missing: !chipDef }" / >
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
<!-- Drawings on a hand - drawn box , under its lamps and displays -- >
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
< g v-for ="d in shape.drawing" :key="d.id" :transform="shapeTransform(d)" >
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
< line v -if = " d.kind = = = ' line ' " : x1 = "d.x * G" : y1 = "d.y * G" : x2 = "(d.x + d.w) * G" : y2 = "(d.y + d.h) * G" class = "face-ink" : class = "`ink-${d.ink ?? 'muted'}`" / >
< rect
v - else - if = "d.kind === 'rect'"
: x = "Math.min(d.x, d.x + d.w) * G"
: y = "Math.min(d.y, d.y + d.h) * G"
: width = "Math.abs(d.w) * G"
: height = "Math.abs(d.h) * G"
rx = "2"
class = "face-ink"
: class = "[`ink-${d.ink ?? 'muted'}`, { filled: d.fill }]"
/ >
< ellipse
v - else - if = "d.kind === 'ellipse'"
: cx = "(d.x + d.w / 2) * G"
: cy = "(d.y + d.h / 2) * G"
: rx = "(Math.abs(d.w) / 2) * G"
: ry = "(Math.abs(d.h) / 2) * G"
class = "face-ink"
: class = "[`ink-${d.ink ?? 'muted'}`, { filled: d.fill }]"
/ >
< text
v - else
: x = "d.x * G"
: y = "(d.y + 0.75 * (d.size ?? 1)) * G"
class = "face-text"
: class = "`ink-${d.ink ?? 'text'}`"
: style = "{ fontSize: `${11 * (d.size ?? 1)}px` }"
> { { d . text } } < / text >
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
< / g >
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
< text
v - if = "shape.nameAt !== null"
: x = "(shape.nameAt?.x ?? b.w / 2) * G"
: y = "(shape.nameAt?.y ?? shape.nameY ?? b.y + b.h / 2) * G + 4"
text - anchor = "middle"
class = "chip-name"
> { { chipDef ? . name ? ? 'Missing' } } < / text >
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
< g v-for ="f in shape.face" :key="f.id" :transform="faceTransform(f)" >
R box designer: size by the corner, reorder pins, pick and move several, pixels one by one, fitted boxes, displays from inside in free spots
- A picked lamp, display or screen has a size grip on its corner.
- A pin dragged onto or past its neighbour swaps places with it (the
order is kept in the design; boxes designed before keep theirs).
- Shift + click, or a box around things, picks several: dragged or moved
with the arrow keys together, drawings among them deleted together.
- A screen can be split into its pixels, each placed on its own (they
start where they sat, sized and turned as the screen was), or joined.
- New designs fit the box to what is on it (Fit, on and off): it shrinks
as well as grows. A size typed in turns it off.
- A display of a part inside lands in the first free spot inside the box
instead of under it, and keeps the size and turn its own box gives it.
- Pointing at a display from a part inside (in the designer and on the
placed box) says which part it is from.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 12:54:30 +00:00
< title v-if ="f.from" > {{ f.label | | ( f.kind = = = ' screen ' ? ' Screen ' : f.kind = = = ' hex ' ? ' Display ' : ' Lamp ' ) }} from {{ f.from }} < / title >
2026-10-20 17:29:16 +00:00
< template v-if ="f.kind === 'screen'" >
< rect : x = "f.x * G - 2" : y = "f.y * G - 2" : width = "f.w * G + 4" : height = "f.h * G + 4" rx = "2" class = "screen-bg" / >
< rect
v - for = "p in f.pixels"
: key = "p.id"
: x = "(f.x + p.col * f.px!) * G"
: y = "(f.y + p.row * f.px!) * G"
: width = "f.px! * G - 0.5"
: height = "f.px! * G - 0.5"
class = "screen-px"
2026-10-28 11:51:09 +00:00
: class = "p.rgb ? { on: !!facePx(p.id) } : [p.color ? `px-${p.color}` : '', { on: fv(p.id, 'a') === 1 }]"
: style = "p.rgb && facePx(p.id) ? { '--px': facePx(p.id) } : undefined"
2026-10-20 17:29:16 +00:00
/ >
< / template >
< template v -else -if = " f.kind = = = ' lamp ' " >
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
< circle : cx = "(f.x + f.w / 2) * G" : cy = "(f.y + 0.6) * G" : r = "0.42 * G" class = "lamp" : class = "[f.color ? `l-${f.color}` : '', { on: fv(f.id, 'a') === 1 }]" / >
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
< / template >
< template v-else >
< rect : x = "(f.x + f.w / 2 - 0.62) * G" : y = "f.y * G" : width = "1.24 * G" : height = "2.2 * G" rx = "2" class = "display" / >
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
< g : transform = "`translate(${(f.x + f.w / 2) * G - 1.75 * G * FACE_SCALE} ${(f.y + 0.16) * G}) scale(${FACE_SCALE})`" : class = "f.color ? `l-${f.color}` : ''" >
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
< path v -for = " ( s , i ) in faceHex ( f.id ) " :key ="i" :d ="s.d" class = "seg" : class = "{ on: s.on }" / >
< / g >
< / template >
< text v-if ="f.label" :x="(f.x + f.w / 2) * G" :y="(f.y + f.h - 0.15) * G" text-anchor="middle" class="face-label" > {{ f.label }} < / text >
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
< / g >
2026-10-26 21:45:47 +00:00
< template v-for ="g in portBars" :key="`bar-${g.key}`" >
< path :d ="g.bar" class = "port-bar" : style = "{ stroke: connColor(g.conn) }" / >
< path :d ="g.bounds" class = "port-bounds" : style = "{ stroke: connColor(g.conn) }" / >
< / template >
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
< text v-for ="p in boxLabels" :key="p.key" :x="p.x" :y="p.y" :text-anchor="p.anchor" class="pin-label" > {{ p.label }} < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Switch ( input pin ) -- >
< template v -else -if = " node.kind = = = ' input ' " >
2026-10-20 18:15:38 +00:00
< text :x ="-6" :y ="4" text -anchor = " end " class = "io-label" : class = "{ ghosted }" > { { ioText } } < / text >
2026-10-17 10:49:38 +00:00
< rect x = "0" : y = "-0.6 * G" : width = "2 * G" : height = "1.2 * G" : rx = "0.6 * G" class = "switch" : class = "{ on: lit }" / >
< circle : cx = "lit ? 1.4 * G : 0.6 * G" cy = "0" : r = "0.42 * G" class = "knob" / >
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
< text v-if ="node.key" :x="G" :y="1.45 * G" text-anchor="middle" class="key-badge" > {{ node.key.toUpperCase ( ) }} < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Output pin -- >
< template v -else -if = " node.kind = = = ' output ' " >
< path : d = "`M0 0H${0.4 * G}`" class = "stub" / >
< path : d = "`M${0.4 * G} ${-0.6 * G}H${1.5 * G}L${2 * G} 0L${1.5 * G} ${0.6 * G}H${0.4 * G}Z`" class = "terminal" : class = "{ on: lit }" / >
2026-10-20 18:15:38 +00:00
< text : x = "through ? G : 2 * G + 6" : y = "through ? -0.75 * G - 4 : 4" : text -anchor = " through ? ' middle ' : ' start ' " class = "io-label" : class = "{ ghosted }" > { { ioText } } < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Lamp : IEC symbol , circle with a cross -- >
< template v -else -if = " node.kind = = = ' lamp ' " >
< path : d = "`M0 0H${0.35 * G}`" class = "stub" / >
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
< circle :cx ="G" cy = "0" : r = "0.65 * G" class = "lamp" : class = "[node.color ? `l-${node.color}` : '', { on: lit }]" / >
2026-10-17 10:49:38 +00:00
< path : d = "`M${G - 0.46 * G} ${-0.46 * G}L${G + 0.46 * G} ${0.46 * G}M${G + 0.46 * G} ${-0.46 * G}L${G - 0.46 * G} ${0.46 * G}`" class = "lamp-cross" : class = "{ on: lit }" / >
2026-10-20 18:15:38 +00:00
< text v-if ="ioText" :x="through ? G : 2 * G + 4" :y="through ? -0.75 * G - 4 : 4" :text-anchor="through ? 'middle' : 'start'" class="io-label" :class="{ ghosted }" > {{ ioText }} < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Constant 1 -- >
< template v -else -if = " node.kind = = = ' high ' " >
< rect x = "0" : y = "-0.6 * G" : width = "1.5 * G" : height = "1.2 * G" rx = "2" class = "body" / >
< text : x = "0.75 * G" y = "4" text -anchor = " middle " class = "const on" > 1 < / text >
< path : d = "`M${1.5 * G} 0H${2 * G}`" class = "stub" / >
< / template >
<!-- Constant 0 : ground symbol -- >
< template v -else -if = " node.kind = = = ' low ' " >
< path : d = "`M${2 * G} 0H${1.1 * G}M${1.1 * G} ${-0.6 * G}V${0.6 * G}M${0.75 * G} ${-0.4 * G}V${0.4 * G}M${0.4 * G} ${-0.2 * G}V${0.2 * G}`" class = "ground" / >
< rect x = "0" : y = "-0.7 * G" : width = "2 * G" : height = "1.4 * G" fill = "transparent" / >
< / template >
<!-- Clock -- >
< template v -else -if = " node.kind = = = ' clock ' " >
< rect x = "0" : y = "-0.7 * G" : width = "2.5 * G" : height = "1.4 * G" rx = "2" class = "body" / >
< path : d = "`M${0.35 * G} ${0.35 * G}H${0.8 * G}V${-0.35 * G}H${1.3 * G}V${0.35 * G}H${1.8 * G}V${-0.35 * G}H${2.15 * G}`" class = "wave" : class = "{ on: lit }" / >
< path : d = "`M${2.5 * G} 0H${3 * G}`" class = "stub" / >
2026-10-20 18:15:38 +00:00
< text : x = "1.25 * G" : y = "1.55 * G" text -anchor = " middle " class = "face-label" : class = "{ ghosted }" > { { ioText || ( node . hz ? ` ${ node . hz } Hz ` : '' ) } } < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Push button -- >
< template v -else -if = " node.kind = = = ' button ' " >
2026-10-20 18:15:38 +00:00
< text v-if ="ioText" :x="-6" :y="4" text-anchor="end" class="io-label" :class="{ ghosted }" > {{ ioText }} < / text >
2026-10-17 10:49:38 +00:00
< rect x = "0" : y = "-0.7 * G" : width = "1.6 * G" : height = "1.4 * G" rx = "3" class = "body" / >
< circle : cx = "0.8 * G" cy = "0" : r = "0.45 * G" class = "button" : class = "{ on: lit }" / >
< path : d = "`M${1.6 * G} 0H${2 * G}`" class = "stub" / >
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
< text v-if ="node.key" :x="0.8 * G" :y="1.55 * G" text-anchor="middle" class="key-badge" > {{ node.key.toUpperCase ( ) }} < / text >
2026-10-17 10:49:38 +00:00
< / template >
<!-- Hex display -- >
< template v -else -if = " node.kind = = = ' hex ' " >
< rect x = "0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body display" / >
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
< g : class = "node.color ? `l-${node.color}` : ''" >
< path v -for = " ( s , i ) in segments " :key ="i" :d ="s.d" class = "seg" : class = "{ on: s.on }" / >
< / g >
2026-10-17 10:49:38 +00:00
< text v-for ="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny" > {{ p.label }} < / text >
A component faces, project library with share links, fine-grained wire editing
- Lamps and hex displays inside a component show on its box with their
labels, lit by that instance's state; Counter 4 example shows its count.
- Several projects per browser; share links at /p/<id> that the creator's
edits save to automatically, others get their own copy. Export, open a
file as project, or add a file's components to the open project.
- Wires: drag any segment or corner, Alt+drag for a new bend, Ctrl+drag to
branch, double-click selects the whole signal, multi-select, arrow keys,
colour tags.
- Share-link API (POST/GET/PUT /api/p) on Nitro fs storage in data/, mounted
as a volume on edgerealm.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 11:21:49 +00:00
< text v-if ="node.label" :x="(b.w * G) / 2" :y="(b.y + b.h) * G + 12" text-anchor="middle" class="face-label" > {{ node.label }} < / text >
2026-10-17 10:49:38 +00:00
< / template >
2026-10-20 17:29:16 +00:00
<!-- Cable ends : a bundle gathers wires into one cable , a split fans it out -- >
2026-10-21 09:59:17 +00:00
< template v -else -if = " cableEnd " >
< rect v -if = " node.plug " : x = "b.x * G" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "2" class = "body cable-end plugged" / >
< rect v -else : x = "b.x * G - 2" : y = "b.y * G" : width = "b.w * G + 4" : height = "b.h * G" rx = "3" class = "cable-hit" / >
< path
v - for = "h in harness"
: key = "h.key"
: d = "h.d"
class = "harness"
: class = "[cableLinks?.colors.get(h.key) ? `c-${cableLinks.colors.get(h.key)}` : '', { on: v(h.key) === 1 }]"
/ >
< template v-if ="cableLinks?.tags.length" >
2026-10-21 09:51:45 +00:00
< text
v - for = "(p, i) in node.kind === 'bundle' ? shape.inputs : shape.outputs"
: key = "p.key"
2026-10-21 09:59:17 +00:00
: x = "node.kind === 'bundle' ? -4 : G + 4"
: y = "p.dy * G - 3"
: text - anchor = "node.kind === 'bundle' ? 'end' : 'start'"
2026-10-21 09:51:45 +00:00
class = "pin-label cable-name"
2026-10-21 09:59:17 +00:00
> { { cableLinks . tags [ i ] } } < / text >
2026-10-21 09:51:45 +00:00
< / template >
<!-- Plugged in : a contact strip along the part ' s edge , held by a latch at each end -- >
< g v-if ="node.plug" class="latch" >
< path : d = "`M${seam} ${b.y * G + 2}V${(b.y + b.h) * G - 2}`" class = "contact" / >
< rect : x = "seam - 0.3 * G" : y = "b.y * G - 3" : width = "0.6 * G" :height ="5" rx = "1.5" / >
< rect : x = "seam - 0.3 * G" : y = "(b.y + b.h) * G - 2" : width = "0.6 * G" :height ="5" rx = "1.5" / >
< / g >
2026-10-20 17:29:16 +00:00
< / 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
<!-- Signals : a tag names the wire into it , a reference carries that signal anywhere -- >
< template v -else -if = " node.kind = = = ' tag ' " >
< path : d = "`M0 0H${0.5 * G}`" class = "stub" / >
< path : d = "flag(0.5, b.w, false)" class = "signal-flag" : class = "{ on: v('a') === 1, linked }" / >
< text : x = "(0.5 + (b.w - 0.45) / 2) * G" y = "3.5" text -anchor = " middle " class = "signal-name" > { { node . label ? . trim ( ) || '?' } } < / text >
< / template >
< template v -else -if = " node.kind = = = ' ref ' " >
< path : d = "flag(0, b.w, true)" class = "signal-flag use" : class = "{ on: v('q') === 1, linked, orphan }" / >
< text : x = "(0.18 + (b.w - 0.45) / 2) * G" y = "3.5" text -anchor = " middle " class = "signal-name" > { { node . label ? . trim ( ) || '?' } } < / text >
< path : d = "`M${b.w * G} 0H${(b.w + 0.5) * G}`" class = "stub" / >
< / template >
2026-10-22 16:59:56 +00:00
<!-- Connector port : the type on top , its lines along the inner side -- >
< template v -else -if = " node.kind = = = ' portin ' | | node.kind = = = ' portout ' " >
< rect :x ="0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body port" / >
< rect :x ="0" : y = "b.y * G" : width = "b.w * G" : height = "0.95 * G" rx = "3" class = "port-head" : style = "{ fill: connColor(node.conn) }" / >
< text : x = "(b.w * G) / 2" : y = "b.y * G + 0.68 * G" text -anchor = " middle " class = "port-title" >
{ { connName } } { { node . kind === 'portin' ? 'in' : 'out' } } < template v-if ="node.label?.trim()" > · {{ node.label.trim ( ) }} < / template >
< / text >
< text
v - for = "l in lines"
: key = "l.key"
: x = "node.kind === 'portin' ? b.w * G - 7 : 7"
: y = "(Number(l.key.slice(1)) + 1) * G + 3.5"
: text - anchor = "node.kind === 'portin' ? 'end' : 'start'"
class = "pin-label port-line"
>
< template v-if ="node.kind === 'portin'" > {{ l.name }} {{ l.enters ? ' → ' : ' ← ' }} < / template >
< template v-else > {{ l.enters ? ' ← ' : ' → ' }} {{ l.name }} < / template >
< / text >
< text v-if ="!lines.length" :x="(b.w * G) / 2" :y="G + 3.5" text-anchor="middle" class="pin-label" > {{ node.conn & & ! connType ? ' type missing ' : ' no lines ' }} < / text >
< / template >
2026-10-28 12:30:07 +00:00
<!-- Test bench : its table on the box , run button in the title bar -- >
2026-10-28 12:12:43 +00:00
< template v -else -if = " node.kind = = = ' bench ' " >
2026-10-28 12:30:07 +00:00
< rect x = "0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "4" class = "body bench-body" :class ="bench.state" / >
< text : x = "bl.x * G + 2" : y = "0.45 * G" class = "bench-title" > { { node . label ? . trim ( ) || 'Test bench' } } < / text >
< text : x = "bl.x * G + 2 + benchTitleW" : y = "0.45 * G" class = "bench-line" :class ="bench.state" > { { bench . line } } < / text >
< g v-if ="bench.cols" data-bench-run class="bench-run" :transform="`translate(${(bench.right - 0.75) * G} ${0.2 * G})`" >
< title > Run the tests < / title >
< circle r = "7" / >
< path d = "M-2.2 -3.6 L3.8 0 L-2.2 3.6 Z" / >
< / g >
< template v-if ="bench.cols" >
< text v-for ="c in bl.cols" :key="c.key" :x="(c.x + 0.25) * G" :y="(bl.top + 0.72) * G" class="bench-head" :class="{ drive: c.drive }" > {{ c.head }} < / text >
< g v-for ="r in bench.rows" :key="r.i" :data-bench-row="r.i" class="bench-row" :class="[r.state, { live: r.live }]" >
< title > { { r . title } } < / title >
< rect : x = "bl.x * G" : y = "(bl.top + 1 + r.i) * G + 0.5" : width = "bl.tableW * G" : height = "G - 1" rx = "2" class = "bench-row-bg" / >
< text v-for ="c in r.cells" :key="c.key" :x="(c.x + 0.25) * G" :y="(bl.top + 1.72 + r.i) * G" class="bench-cell-text" :class="c.cls" > {{ c.text }} < / text >
< / g >
< text v-if ="bl.more" :x="bl.x * G + 4" :y="(bl.top + 1.72 + bl.shown) * G" class="bench-line" > + {{ bl.more }} more rows ( double -click ) < / text >
< / template >
< text v -else : x = "bl.x * G + 2" : y = "(bl.top + 0.8) * G" class = "bench-line" > Drop on a component , or double - click to set up < / text >
< text v-for ="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny" > {{ p.label }} < / text >
< text v-for ="p in shape.outputs" :key="p.key" :x="b.w * G - 4" :y="p.dy * G + 3" text-anchor="end" class="pin-label tiny" > {{ p.label }} < / text >
2026-10-28 12:12:43 +00:00
< / template >
2026-10-28 12:05:57 +00:00
<!-- Terminal : a text screen the circuit writes to -- >
< template v -else -if = " node.kind = = = ' terminal ' " >
< rect x = "0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body display" / >
< rect : x = "1.9 * G" : y = "b.y * G + 3" : width = "(b.w - 2.2) * G" : height = "b.h * G - 6" rx = "2" class = "term-screen" / >
< text v-for ="(line, i) in termLines" :key="i" :x="2.1 * G" :y="i * G + 4" class="term-text" > {{ line }} < / text >
< rect : x = "2.1 * G + termCursor.x * TERM_CHAR" : y = "termCursor.y * G - 5" :width ="TERM_CHAR" height = "10" class = "term-cursor" / >
< text v-for ="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny" > {{ p.label }} < / text >
< text v-if ="node.label" :x="(b.w * G) / 2" :y="(b.y + b.h) * G + 12" text-anchor="middle" class="face-label" > {{ node.label }} < / text >
< / template >
<!-- Keyboard : the keys you type , one at a time -- >
< template v -else -if = " node.kind = = = ' keyboard ' " >
< rect x = "0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body kb-body" : class = "{ typing: kbTyping }" / >
< g : transform = "`translate(${1.85 * G} ${0.4 * G})`" class = "kb-keys" >
< rect v -for = " k in 9 " :key ="k" : x = "((k - 1) % 3) * 0.75 * G" : y = "Math.floor((k - 1) / 3) * 0.75 * G" : width = "0.6 * G" : height = "0.6 * G" rx = "1.5" / >
< / g >
< text : x = "2.9 * G" : y = "3.4 * G" text -anchor = " middle " class = "kb-state" > { { kbTyping ? 'typing' : 'click, type' } } < / text >
< text : x = "2.9 * G" : y = "4.6 * G" text -anchor = " middle " class = "kb-queue" > { { kbQueue } } < / text >
< text : x = "2.9 * G" : y = "5.6 * G" text -anchor = " middle " class = "pin-label tiny" > { { kbCount } } < / text >
< text v-for ="p in shape.outputs" :key="p.key" :x="b.w * G - 4" :y="p.dy * G + 3" text-anchor="end" class="pin-label tiny" > {{ p.label }} < / text >
< text v-for ="p in shape.inputs" :key="p.key" :x="4" :y="p.dy * G + 3" class="pin-label tiny" > {{ p.label }} < / text >
< text v-if ="node.label" :x="(b.w * G) / 2" :y="(b.y + b.h) * G + 12" text-anchor="middle" class="face-label" > {{ node.label }} < / text >
< / template >
2026-10-20 17:29:16 +00:00
<!-- Pixel : one square of a screen -- >
< template v -else -if = " node.kind = = = ' pixel ' " >
2026-10-28 11:51:09 +00:00
< template v-if ="node.rgb" >
< rect x = "1" : y = "b.y * G + 1" : width = "G - 2" : height = "b.h * G - 2" rx = "1" class = "pixel" : class = "{ on: !!rgbNow }" : style = "rgbNow ? { '--px': rgbNow } : undefined" / >
< text v-for ="(c, i) in 'RGB'" :key="c" :x="G / 2" :y="i * G + 3" class="pixel-rgb" :class="{ dark: !!rgbNow }" > {{ c }} < / text >
< / template >
< rect v -else x = "1" : y = "b.y * G + 1" : width = "G - 2" : height = "G - 2" rx = "1" class = "pixel" : class = "[node.color ? `px-${node.color}` : '', { on: v('a') === 1 }]" / >
2026-10-20 17:29:16 +00:00
< / 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
<!-- Input panel : a switch , button or clock per row -- >
< template v -else -if = " node.kind = = = ' panel ' " >
< text v-if ="node.label" :x="(b.w * G) / 2" :y="b.y * G - 5" text-anchor="middle" class="instance-label" > {{ node.label }} < / text >
< rect :x ="0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body panel" : class = "{ docked: !!node.attach }" / >
< g v-for ="(p, i) in shape.outputs" :key="p.key" :data-row="p.key" class="panel-row" :transform="`translate(0 ${p.dy * G})`" >
< rect :x ="0" : y = "-0.5 * G" : width = "b.w * G" :height ="G" class = "row-hit" / >
< text :x ="5" y = "3.5" class = "pin-label" : class = "{ named: !!rows[i]?.label || !!rows[i]?.name }" > { { p . label } } < / text >
< g : transform = "`translate(${(b.w - PANEL_CONTROL_W) * G} 0)`" >
2026-10-21 09:51:45 +00:00
< text v-if ="rows[i]?.key" x="-3" y="3" text-anchor="end" class="key-badge" > {{ rows [ i ] ! .key ! .toUpperCase ( ) }} < / text >
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
< template v-if ="rows[i]?.type === 'button'" >
< rect x = "2" : y = "-0.4 * G" : width = "1.3 * G" : height = "0.8 * G" rx = "2" class = "body" / >
2026-10-21 09:51:45 +00:00
< circle : cx = "2 + 0.65 * G" cy = "0" : r = "0.27 * G" class = "button" : class = "[rows[i]?.color ? `l-${rows[i]!.color}` : '', { on: v(p.key) === 1 }]" / >
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
< / template >
< path
v - else - if = "rows[i]?.type === 'clock'"
: d = "`M2 ${0.25 * G}H${0.4 * G}V${-0.25 * G}H${0.75 * G}V${0.25 * G}H${1.1 * G}V${-0.25 * G}H${1.4 * G}`"
class = "wave"
: class = "{ on: v(p.key) === 1 }"
/ >
< template v-else >
2026-10-21 09:51:45 +00:00
< rect x = "2" : y = "-0.38 * G" : width = "1.3 * G" : height = "0.76 * G" : rx = "0.38 * G" class = "switch" : class = "[rows[i]?.color ? `l-${rows[i]!.color}` : '', { on: v(p.key) === 1 }]" / >
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
< circle : cx = "v(p.key) === 1 ? 2 + 0.92 * G : 2 + 0.38 * G" cy = "0" : r = "0.27 * G" class = "knob" / >
< / template >
< path : d = "`M${1.55 * G} 0H${PANEL_CONTROL_W * G}`" class = "stub" / >
< / g >
< / g >
< / template >
2026-10-21 12:38:59 +00:00
<!-- Output panel : a lamp per row -- >
< template v -else -if = " node.kind = = = ' outpanel ' " >
< text v-if ="node.label" :x="(b.w * G) / 2" :y="b.y * G - 5" text-anchor="middle" class="instance-label" > {{ node.label }} < / text >
< rect :x ="0" : y = "b.y * G" : width = "b.w * G" : height = "b.h * G" rx = "3" class = "body panel" : class = "{ docked: !!node.attach }" / >
< g v-for ="(p, i) in shape.inputs" :key="p.key" :transform="`translate(0 ${p.dy * G})`" >
< path : d = "`M0 0H${0.4 * G}`" class = "stub" / >
< circle : cx = "0.95 * G" cy = "0" : r = "0.36 * G" class = "lamp" : class = "[rows[i]?.color ? `l-${rows[i]!.color}` : '', { on: v(p.key) === 1 }]" / >
< text : x = "1.6 * G" y = "3.5" class = "pin-label" : class = "{ named: !!rows[i]?.label || !!rows[i]?.name }" > { { p . label } } < / text >
< path : d = "`M${(b.w - 0.35) * G} 0H${b.w * G}`" class = "stub" / >
< / g >
< / template >
2026-10-17 10:49:38 +00:00
<!-- Note -- >
< template v -else -if = " node.kind = = = ' note ' " >
< rect :x ="-4" : y = "b.y * G" : width = "b.w * G + 8" : height = "b.h * G" rx = "3" class = "note-bg" / >
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
< text
v - for = "(line, i) in noteLines(node)"
: key = "i"
x = "0"
: y = "i * G * noteScale(node) + 4 * noteScale(node)"
class = "note"
: style = "{ fontSize: `${12 * noteScale(node)}px` }"
> { { line } } < / text >
2026-10-17 10:49:38 +00:00
< / template >
< rect
v - if = "selected"
: x = "b.x * G - 4"
: y = "b.y * G - 4"
: width = "b.w * G + 8"
: height = "b.h * G + 8"
rx = "5"
class = "sel-outline"
/ >
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
< circle v -for = " bb in bubbles " :key ="`inv-${bb.key}`" :cx ="bb.x" :cy ="bb.y" : r = "0.24 * G" class = "invert-bubble" / >
< g v-if ="widen" class="widen" :transform="`translate(${(b.x + b.w / 2) * G} ${(b.y + b.h) * G + 13})`" >
< g v-if ="widen.less" data-inputs="-1" class="widen-btn" transform="translate(-11 0)" >
< title > One input less ( { { widen . n - 1 } } ) < / title >
< circle r = "7.5" / >
< path d = "M-3.5 0H3.5" / >
< / g >
< g v-if ="widen.more" data-inputs="1" class="widen-btn" :transform="`translate(${widen.less ? 11 : 0} 0)`" >
< title > One more input ( { { widen . n + 1 } } ) < / title >
< circle r = "7.5" / >
< path d = "M-3.5 0H3.5M0 -3.5V3.5" / >
< / g >
< / g >
2026-10-17 10:49:38 +00:00
< template v-if ="!ghost" >
< g v-for ="p in shape.inputs" :key="`i-${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
< path v -if = " open ? .has ( p.key ) " : d = "`M${p.dx * G - 8} ${p.dy * G - 3.5}L${p.dx * G - 3} ${p.dy * G}L${p.dx * G - 8} ${p.dy * G + 3.5}Z`" class = "open-pin" / >
2026-10-17 10:49:38 +00:00
< circle : cx = "p.dx * G" : cy = "p.dy * G" r = "7" class = "pin-hit" :data-node ="node.id" :data-pin ="p.key" data -dir = " in " / >
2026-10-22 16:59:56 +00:00
< rect v -if = " p.conn " : x = "p.dx * G - 4" : y = "p.dy * G - 5" width = "8" height = "10" rx = "2" class = "port-socket" : style = "{ fill: connColor(p.conn) }" / >
< circle v -else -if = " dot ( p.key ) " : cx = "p.dx * G" : cy = "p.dy * G" r = "2.6" class = "pin" : class = "{ on: v(p.key) === 1 }" / >
2026-10-17 10:49:38 +00:00
< / g >
< g v-for ="p in shape.outputs" :key="`o-${p.key}`" >
< circle : cx = "p.dx * G" : cy = "p.dy * G" r = "7" class = "pin-hit" :data-node ="node.id" :data-pin ="p.key" data -dir = " out " / >
2026-10-22 16:59:56 +00:00
< rect v -if = " p.conn " : x = "p.dx * G - 4" : y = "p.dy * G - 5" width = "8" height = "10" rx = "2" class = "port-socket" : style = "{ fill: connColor(p.conn) }" / >
< circle v -else -if = " dot ( p.key ) " : cx = "p.dx * G" : cy = "p.dy * G" r = "2.6" class = "pin" : class = "{ on: v(p.key) === 1 }" / >
2026-10-17 10:49:38 +00:00
< / g >
< / template >
< / g >
< / template >