A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
< script setup lang = "ts" >
A public library of components: publish yours, add everybody's
"Publish to the library…" in the menu on a circuit's name (or Space)
sends the component with every component it uses and their connector
types, under your leaderboard name. The server checks it like any
project, refuses what is missing, inside itself, nested too deep or too
big to run, and counts its transistors and pins itself. Publishing again
from the same browser makes the next version of the same entry; only that
browser holds the entry's key, so only it can update or remove it.
Challenge circuits and puzzle solutions stay private.
The Library (Components in the bottom bar, Space, the main menu) lists
every entry, newest first, searchable by name, description and author,
with a picture of its box, its transistors, pins and what comes along.
Add brings an entry into the open project and starts placing it: what the
project has in exactly that form already is used as it is, the rest comes
with new ids, a taken name gets a number, connector types join one with
the same lines. The This panel says where a component came from and
offers a newer version, which replaces it in place. A campaign only adds
what is built from parts it has earned, and its challenges take nothing
from the library.
Components keep an optional "from" mark; projects without it load and
compute as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:14:46 +00:00
// "This": what the circuit you are in is. Its name, where it came from (the
// library, with a newer version to get) and health on top, four numbers
// (the transistors open their breakdown), its truth table and how it
BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is
A jump is drawn once more over every line, so a cable that arches over
another is never hidden under it, whatever order they are drawn in. Cable
labels sit on the longest stretch no other line crosses.
The circuit's name in the top bar opens what can be done with it: tidy
its wires or every circuit's, design its box, duplicate, delete, print,
export SVG, publish as a puzzle. The This panel keeps what the circuit is:
its health, its numbers (the transistors tile opens their breakdown), its
truth table and how it looks as a part. Unused components are a tab of
the Components list in the parts bar, with a delete button on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 13:12:43 +00:00
// looks as a part. Things to do with it are in the menu on its name in the
// top bar; unused components are with the components in the parts bar.
import { TRANSISTORS _PER _NAND } from '~/lib/logic/analyze'
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
import { transistorBreakdown } from '~/lib/logic/bulk'
import { chipPins } from '~/lib/logic/geometry'
BF library: no solutions inside, nothing into a campaign, marks only from the entry, a small listing, updates clear what they replace
A component with a challenge or puzzle solution anywhere inside stays
private, not only a challenge circuit itself, so wrapping a solution in a
part of its own no longer publishes it.
A campaign takes nothing from the library: Add and "Get version" are off
there, with a line saying why. A library part could be duplicated,
published again or taken apart into a solution, so a check on placing was
not enough.
Library marks come only from the entry being added. The server drops the
marks a publisher sends, and whether an entry is yours depends only on the
key this browser keeps for that project and component, so a part claiming
to be someone's entry can't be published over it.
The listing keeps pin counts and the first 16 pin names a side, short, and
a group of 40 characters at most, so it stays small whatever is sent.
"Get version" clears away what came along with the old version once
nothing else uses it, and the new parts take its names. Adding never
reuses another entry's component, so updating one entry leaves the others
as they were.
Wire corner points that aren't number pairs are dropped when a project,
link or library entry is read, so a circuit can always be drawn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:44:13 +00:00
import { importProblem } from '~/lib/logic/library'
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
import { usages } from '~/lib/logic/ops'
import type { SymbolKind } from '~/lib/logic/types'
const ed = useEditor ( )
const def = ed . def
const SYMBOLS : { value : SymbolKind ; label : string } [ ] = [
{ value : 'box' , label : 'Box with name' } ,
{ value : 'and' , label : 'AND gate' } ,
{ value : 'or' , label : 'OR gate' } ,
{ value : 'xor' , label : 'XOR gate' } ,
{ value : 'not' , label : 'NOT gate' } ,
{ value : 'buf' , label : 'Buffer' } ,
{ value : 'nand' , label : 'NAND gate' } ,
{ value : 'nor' , label : 'NOR gate' } ,
{ value : 'xnor' , label : 'XNOR gate' } ,
]
const nameInput = ref < HTMLInputElement > ( )
watch (
( ) => ed . labelFocus . value ,
( ) =>
nextTick ( ( ) => {
if ( ed . selection . value . length ) return
nameInput . value ? . focus ( )
nameInput . value ? . select ( )
} ) ,
)
const pins = computed ( ( ) => chipPins ( def . value ) )
const users = computed ( ( ) => usages ( ed . project . value , def . value . id ) )
const groupNames = computed ( ( ) => [ ... new Set ( ed . project . value . components . map ( d => d . group ) . filter ( Boolean ) ) ] )
const hasFace = computed ( ( ) => def . value . nodes . some ( n => n . kind === 'lamp' || n . kind === 'hex' || n . kind === 'pixel' ) )
const total = computed ( ( ) => ed . transistors ( def . value . id ) )
const breakdown = computed ( ( ) => transistorBreakdown ( def . value , ed . nands . value , ed . getDef . value ) )
A public library of components: publish yours, add everybody's
"Publish to the library…" in the menu on a circuit's name (or Space)
sends the component with every component it uses and their connector
types, under your leaderboard name. The server checks it like any
project, refuses what is missing, inside itself, nested too deep or too
big to run, and counts its transistors and pins itself. Publishing again
from the same browser makes the next version of the same entry; only that
browser holds the entry's key, so only it can update or remove it.
Challenge circuits and puzzle solutions stay private.
The Library (Components in the bottom bar, Space, the main menu) lists
every entry, newest first, searchable by name, description and author,
with a picture of its box, its transistors, pins and what comes along.
Add brings an entry into the open project and starts placing it: what the
project has in exactly that form already is used as it is, the rest comes
with new ids, a taken name gets a number, connector types join one with
the same lines. The This panel says where a component came from and
offers a newer version, which replaces it in place. A campaign only adds
what is built from parts it has earned, and its challenges take nothing
from the library.
Components keep an optional "from" mark; projects without it load and
compute as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:14:46 +00:00
// ── From the library ────────────────────────────────────────────────
/** Where it came from, when it is in the library. */
const origin = computed ( ( ) => {
const f = def . value . from
if ( ed . ownEntry ( def . value ) ) return f ? ` In the library as version ${ f . version } , published from here ` : 'In the library, published from here'
if ( ! f ) return ''
return f . inside ? ` Came along with a component from the library by ${ f . author || 'Anonymous' } ` : ` From the library by ${ f . author || 'Anonymous' } , version ${ f . version } `
} )
BF library: no solutions inside, nothing into a campaign, marks only from the entry, a small listing, updates clear what they replace
A component with a challenge or puzzle solution anywhere inside stays
private, not only a challenge circuit itself, so wrapping a solution in a
part of its own no longer publishes it.
A campaign takes nothing from the library: Add and "Get version" are off
there, with a line saying why. A library part could be duplicated,
published again or taken apart into a solution, so a check on placing was
not enough.
Library marks come only from the entry being added. The server drops the
marks a publisher sends, and whether an entry is yours depends only on the
key this browser keeps for that project and component, so a part claiming
to be someone's entry can't be published over it.
The listing keeps pin counts and the first 16 pin names a side, short, and
a group of 40 characters at most, so it stays small whatever is sent.
"Get version" clears away what came along with the old version once
nothing else uses it, and the new parts take its names. Adding never
reuses another entry's component, so updating one entry leaves the others
as they were.
Wire corner points that aren't number pairs are dropped when a project,
link or library entry is read, so a circuit can always be drawn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:44:13 +00:00
/** A newer version of it in the library, to update to (not in a campaign, which takes nothing from the library). */
A public library of components: publish yours, add everybody's
"Publish to the library…" in the menu on a circuit's name (or Space)
sends the component with every component it uses and their connector
types, under your leaderboard name. The server checks it like any
project, refuses what is missing, inside itself, nested too deep or too
big to run, and counts its transistors and pins itself. Publishing again
from the same browser makes the next version of the same entry; only that
browser holds the entry's key, so only it can update or remove it.
Challenge circuits and puzzle solutions stay private.
The Library (Components in the bottom bar, Space, the main menu) lists
every entry, newest first, searchable by name, description and author,
with a picture of its box, its transistors, pins and what comes along.
Add brings an entry into the open project and starts placing it: what the
project has in exactly that form already is used as it is, the rest comes
with new ids, a taken name gets a number, connector types join one with
the same lines. The This panel says where a component came from and
offers a newer version, which replaces it in place. A campaign only adds
what is built from parts it has earned, and its challenges take nothing
from the library.
Components keep an optional "from" mark; projects without it load and
compute as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:14:46 +00:00
const newer = ref < number | null > ( null )
watch (
( ) => [ def . value . id , def . value . from ] as const ,
async ( [ id , f ] ) => {
newer . value = null
BF library: no solutions inside, nothing into a campaign, marks only from the entry, a small listing, updates clear what they replace
A component with a challenge or puzzle solution anywhere inside stays
private, not only a challenge circuit itself, so wrapping a solution in a
part of its own no longer publishes it.
A campaign takes nothing from the library: Add and "Get version" are off
there, with a line saying why. A library part could be duplicated,
published again or taken apart into a solution, so a check on placing was
not enough.
Library marks come only from the entry being added. The server drops the
marks a publisher sends, and whether an entry is yours depends only on the
key this browser keeps for that project and component, so a part claiming
to be someone's entry can't be published over it.
The listing keeps pin counts and the first 16 pin names a side, short, and
a group of 40 characters at most, so it stays small whatever is sent.
"Get version" clears away what came along with the old version once
nothing else uses it, and the new parts take its names. Adding never
reuses another entry's component, so updating one entry leaves the others
as they were.
Wire corner points that aren't number pairs are dropped when a project,
link or library entry is read, so a circuit can always be drawn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:44:13 +00:00
if ( ! f || f . inside || ed . ownEntry ( def . value ) || importProblem ( ed . project . value ) ) return
A public library of components: publish yours, add everybody's
"Publish to the library…" in the menu on a circuit's name (or Space)
sends the component with every component it uses and their connector
types, under your leaderboard name. The server checks it like any
project, refuses what is missing, inside itself, nested too deep or too
big to run, and counts its transistors and pins itself. Publishing again
from the same browser makes the next version of the same entry; only that
browser holds the entry's key, so only it can update or remove it.
Challenge circuits and puzzle solutions stay private.
The Library (Components in the bottom bar, Space, the main menu) lists
every entry, newest first, searchable by name, description and author,
with a picture of its box, its transistors, pins and what comes along.
Add brings an entry into the open project and starts placing it: what the
project has in exactly that form already is used as it is, the rest comes
with new ids, a taken name gets a number, connector types join one with
the same lines. The This panel says where a component came from and
offers a newer version, which replaces it in place. A campaign only adds
what is built from parts it has earned, and its challenges take nothing
from the library.
Components keep an optional "from" mark; projects without it load and
compute as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:14:46 +00:00
const v = await ed . libraryVersion ( f . id )
if ( def . value . id === id && v !== null && v > f . version ) newer . value = v
} ,
{ immediate : true } ,
)
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
function toggleFace ( e : Event ) {
def . value . face = ( e . target as HTMLInputElement ) . checked
ed . commit ( false )
}
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
// ── Problems ────────────────────────────────────────────────────────
const LEVEL _ICON = { error : 'lucide:circle-x' , warn : 'lucide:triangle-alert' , info : 'lucide:info' } as const
const showInfo = ref ( false )
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
const problems = computed ( ( ) => ed . issues . value . filter ( i => i . level !== 'info' ) )
const worst = computed < 'error' | 'warn' | 'ok' > ( ( ) => ( problems . value . some ( i => i . level === 'error' ) ? 'error' : problems . value . length ? 'warn' : 'ok' ) )
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
const shownIssues = computed ( ( ) => ed . issues . value . filter ( i => showInfo . value || i . level !== 'info' ) )
const infoCount = computed ( ( ) => ed . issues . value . filter ( i => i . level === 'info' ) . length )
BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is
A jump is drawn once more over every line, so a cable that arches over
another is never hidden under it, whatever order they are drawn in. Cable
labels sit on the longest stretch no other line crosses.
The circuit's name in the top bar opens what can be done with it: tidy
its wires or every circuit's, design its box, duplicate, delete, print,
export SVG, publish as a puzzle. The This panel keeps what the circuit is:
its health, its numbers (the transistors tile opens their breakdown), its
truth table and how it looks as a part. Unused components are a tab of
the Components list in the parts bar, with a delete button on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 13:12:43 +00:00
/** The transistors tile shows where they are. */
const showCost = ref ( false )
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
< / script >
< template >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< section class = "this-head" >
< input
ref = "nameInput"
v - model = "def.name"
class = "title-input"
title = "Rename this circuit"
spellcheck = "false"
@ change = "ed.commit(false)"
@ keydown . enter = "($event.target as HTMLInputElement).blur()"
/ >
< p class = "this-sub" >
< template v-if ="users.length" >
Used in
< template v-for ="(u, i) in users" :key="u.id" >
< a href = "#" @click.prevent ="ed.open(u.id)" > { { u . name } } < / a > < template v-if ="i < users.length - 1" > , < / template >
< / template >
< / template >
< template v-else > {{ def.id = = = ed.mainId.value ? ' The main circuit ' : ' Not used in another circuit ' }} < / template >
< / p >
A public library of components: publish yours, add everybody's
"Publish to the library…" in the menu on a circuit's name (or Space)
sends the component with every component it uses and their connector
types, under your leaderboard name. The server checks it like any
project, refuses what is missing, inside itself, nested too deep or too
big to run, and counts its transistors and pins itself. Publishing again
from the same browser makes the next version of the same entry; only that
browser holds the entry's key, so only it can update or remove it.
Challenge circuits and puzzle solutions stay private.
The Library (Components in the bottom bar, Space, the main menu) lists
every entry, newest first, searchable by name, description and author,
with a picture of its box, its transistors, pins and what comes along.
Add brings an entry into the open project and starts placing it: what the
project has in exactly that form already is used as it is, the rest comes
with new ids, a taken name gets a number, connector types join one with
the same lines. The This panel says where a component came from and
offers a newer version, which replaces it in place. A campaign only adds
what is built from parts it has earned, and its challenges take nothing
from the library.
Components keep an optional "from" mark; projects without it load and
compute as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 17:14:46 +00:00
< p v-if ="origin" class="lib-origin" >
< Icon name = "lucide:library-big" class = "size-3.5 shrink-0" / >
< span class = "grow" > { { origin } } < / span >
< button v-if ="newer" class="btn-sm" title="Replace it here with the newer version, wherever it is used (Ctrl+Z goes back)" @click="ed.updateFromLibrary(def.id)" >
Get version { { newer } }
< / button >
< / p >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< div class = "health" :class ="worst" >
< Icon : name = "worst === 'ok' ? 'lucide:circle-check' : LEVEL_ICON[worst]" class = "size-4 shrink-0" / >
< span class = "grow" > { { worst === 'ok' ? 'All good' : ` ${ problems . length } ${ problems . length === 1 ? 'problem' : 'problems' } ` } } < / span >
< label v-if ="infoCount" class="health-notes" title="Show notes too: things that work but may not be meant" >
< input v -model = " showInfo " type = "checkbox" / > { { infoCount } } { { infoCount === 1 ? 'note' : 'notes' } }
< / label >
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 >
< ul v-if ="shownIssues.length" class="issue-list" >
< li v-for ="(i, k) in shownIssues.slice(0, 40)" :key ="k" >
< button class = "issue" :class ="i.level" :disabled ="!i.nodes.length" @click ="ed.showIssue(i.nodes)" >
< Icon :name ="LEVEL_ICON[i.level]" class = "issue-icon size-4 shrink-0" / >
< span > { { i . text } } < / span >
< / button >
< / li >
< / ul >
< p v-if ="shownIssues.length > 40" class="hint" > and {{ shownIssues.length - 40 }} more < / p >
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
< p v-for ="err in ed.errors.value" :key="err" class="result fail" >
< Icon name = "lucide:triangle-alert" class = "size-4 shrink-0" / > { { err } }
< / p >
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
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< div class = "tiles" >
< button class = "tile" title = "List and rename them" @ click = "ed.panelTab.value = 'pins'" >
< span class = "tile-label" > Inputs < / span >
< span class = "tile-value" > { { pins . inputs . length } } < / span >
< / button >
< button class = "tile" title = "List and rename them" @ click = "ed.panelTab.value = 'pins'" >
< span class = "tile-label" > Outputs < / span >
< span class = "tile-value" > { { pins . outputs . length } } < / span >
< / button >
BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is
A jump is drawn once more over every line, so a cable that arches over
another is never hidden under it, whatever order they are drawn in. Cable
labels sit on the longest stretch no other line crosses.
The circuit's name in the top bar opens what can be done with it: tidy
its wires or every circuit's, design its box, duplicate, delete, print,
export SVG, publish as a puzzle. The This panel keeps what the circuit is:
its health, its numbers (the transistors tile opens their breakdown), its
truth table and how it looks as a part. Unused components are a tab of
the Components list in the parts bar, with a delete button on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 13:12:43 +00:00
< button class = "tile" : class = "{ active: showCost }" :aria-expanded ="showCost" title = "CMOS: 4 per NAND gate, at every depth. Click for where they are" @ click = "showCost = !showCost" >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< span class = "tile-label" > Transistors < / span >
< span class = "tile-value" > { { total . toLocaleString ( ) } } < / span >
< span class = "tile-note" > { { ed . circuitStats . value . nands . toLocaleString ( ) } } NAND < / span >
BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is
A jump is drawn once more over every line, so a cable that arches over
another is never hidden under it, whatever order they are drawn in. Cable
labels sit on the longest stretch no other line crosses.
The circuit's name in the top bar opens what can be done with it: tidy
its wires or every circuit's, design its box, duplicate, delete, print,
export SVG, publish as a puzzle. The This panel keeps what the circuit is:
its health, its numbers (the transistors tile opens their breakdown), its
truth table and how it looks as a part. Unused components are a tab of
the Components list in the parts bar, with a delete button on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 13:12:43 +00:00
< / button >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< div class = "tile" : title = "ed.circuitStats.value.sequential ? 'It has feedback loops, so it can hold state' : 'Longest path from an input to an output'" >
< span class = "tile-label" > { { ed . circuitStats . value . sequential ? 'Memory' : 'Delay' } } < / span >
< span class = "tile-value" > { { ed . circuitStats . value . sequential ? 'Yes' : ed . circuitStats . value . delay } } < / span >
< span class = "tile-note" > { { ed . circuitStats . value . sequential ? 'feedback loops' : 'gates deep' } } < / span >
< / div >
< / div >
BF jumps always on top of what they cross; R circuit commands in a menu on its name, the side panel only says what it is
A jump is drawn once more over every line, so a cable that arches over
another is never hidden under it, whatever order they are drawn in. Cable
labels sit on the longest stretch no other line crosses.
The circuit's name in the top bar opens what can be done with it: tidy
its wires or every circuit's, design its box, duplicate, delete, print,
export SVG, publish as a puzzle. The This panel keeps what the circuit is:
its health, its numbers (the transistors tile opens their breakdown), its
truth table and how it looks as a part. Unused components are a tab of
the Components list in the parts bar, with a delete button on each.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-23 13:12:43 +00:00
< template v-if ="showCost" >
< p v-if ="!breakdown.length" class="hint mt-2" > No gates here yet. Switches , lamps , displays and cables need no transistors. < / p >
< ul v -else class = "cost-list mt-2" >
< li v-for ="l in breakdown" :key="l.key" title="Select these parts" @click="ed.selectOnly(l.ids)" >
< span class = "cost-name" >
< span class = "truncate" > { { l . name } } < / span >
< span class = "cost-each" > { { l . count } } × { { l . each . toLocaleString ( ) } } < / span >
< / span >
< span class = "cost-total" > { { l . total . toLocaleString ( ) } } < / span >
< / li >
< li class = "cost-sum" >
< span class = "cost-name" >
< span > Total < / span >
< span class = "cost-each" > { { ( total / TRANSISTORS _PER _NAND ) . toLocaleString ( ) } } NAND × 4 < / span >
< / span >
< span class = "cost-total" > { { total . toLocaleString ( ) } } < / span >
< / li >
< / ul >
< / template >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< / section >
< section class = "folds" >
R Panels: This and Pins on the left, the selection on the right
The left panel is about the circuit you are in: This (challenge and
Check on top, problems, name, statistics, truth table, as a component,
transistors, tools) and Pins. The selection gets its own panel on the
right, there only while something is selected, with its settings and
actions such as making a component out of it. The bars follow the
canvas width and drop labels when it gets narrow.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:38:17 +00:00
< EditorFold id = "circuit-table" title = "Truth table" >
< EditorTestPane part = "table" / >
< / EditorFold >
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 = "circuit-component" title = "As a component" : note = "def.group || ''" >
< label class = "field" >
< span > Description < / span >
< textarea v -model = " def.description " rows = "2" placeholder = "What does it do?" @change ="ed.commit(false)" / >
< / label >
R This tab: title, health, four tiles, tidy folds
The circuit name is the panel's title, edited in place, with where it is
used below. One line says whether all is good or how many problems
there are; inputs, outputs, transistors and delay sit in tiles. The rest
folds away with plain titles: truth table, as a component (fields one
under another), transistors (name, count × each, total), unused
components (only when there are any) and tools. The tabs are a
segmented control with the hide button beside it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:53:43 +00:00
< label class = "field" >
< span > Drawn as < / span >
< select v-model ="def.symbol" @change="ed.commit(false)" >
< option v-for ="s in SYMBOLS" :key="s.value" :value="s.value" > {{ s.label }} < / option >
< / select >
< / label >
< label class = "field" >
< span > Group in the parts list < / span >
< input v -model = " def.group " list = "groups" placeholder = "My components" @change ="ed.commit(false)" / >
< datalist id = "groups" >
< option v -for = " g in groupNames " :key ="g" :value ="g" / >
< / datalist >
< / label >
< label v-if ="hasFace" class="check mb-3" >
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
< input type = "checkbox" : checked = "def.face !== false" @change ="toggleFace" / >
Show its lamps and displays on the box
< / label >
< button class = "btn w-full" : title = "`How it looks when placed: ${def.design ? 'drawn by hand' : 'laid out automatically'}`" @click ="ed.designFace(def.id)" >
< Icon name = "lucide:pen-tool" class = "size-4" / > Design the box
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
< / EditorFold >
A right panel in tabs, Pins list, bulk editing, transistor breakdown, Settings dialog
- Right panel tabs: Selection, Circuit, Pins, Test. Display and sound
preferences move to a Settings dialog (gear in the top bar).
- Pins tab: every input and output in pin order with live values; rename in
place (Enter goes to the next), number a whole side from a pattern, flag
duplicate names, centre the canvas on a part.
- Several selected parts: narrow by type, swap all, rename all from a
pattern, set switches to 0/1 or flip, shared colour/frequency/size, align
and spread.
- Transistors on every part (NAND 4, switches and lamps 0), NAND 4T in the
palette, and a per-part breakdown of the circuit. Test: the count equals
4 x the gates the simulator builds, for every example and wide gate.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 07:29:55 +00:00
< / section >
< / template >