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
< script setup lang = "ts" >
const ed = useEditor ( )
const fileInput = ref < HTMLInputElement > ( )
const renaming = ref < string | null > ( null )
const renameText = ref ( '' )
const confirmDelete = ref < string | null > ( null )
const close = ( ) => ( ed . dialog . value = null )
2026-10-20 11:20:55 +00:00
const showTrash = ref ( false )
const trash = ref < { id : string ; name : string ; deleted : number ; v : number } [ ] | null > ( null )
async function toggleTrash ( ) {
showTrash . value = ! showTrash . value
if ( showTrash . value ) trash . value = await ed . listTrash ( ) . catch ( ( ) => [ ] )
}
async function restoreDeleted ( t : { id : string ; v : number } ) {
await ed . restoreDeleted ( t )
close ( )
}
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 when = ( t : number ) => new Intl . DateTimeFormat ( undefined , { dateStyle : 'medium' , timeStyle : 'short' } ) . format ( t )
function open ( id : string ) {
ed . switchProject ( id )
close ( )
}
function startRename ( id : string , name : string ) {
renaming . value = id
renameText . value = name
nextTick ( ( ) => document . querySelector < HTMLInputElement > ( '.project-list input' ) ? . select ( ) )
}
function finishRename ( ) {
if ( renaming . value ) ed . renameProject ( renaming . value , renameText . value )
renaming . value = null
}
function onFile ( e : Event ) {
const file = ( e . target as HTMLInputElement ) . files ? . [ 0 ]
if ( file ) ed . importAsProject ( file ) . then ( close )
; ( e . target as HTMLInputElement ) . value = ''
}
< / script >
< template >
< div class = "modal-backdrop" @click.self ="close" >
< div class = "modal" role = "dialog" aria -labelledby = " projects -title " >
< div class = "flex items-start justify-between gap-4" >
< h2 id = "projects-title" > Projects < / h2 >
< button class = "tb-btn" title = "Close" @click ="close" > < Icon name = "lucide:x" class = "size-4" / > < / button >
< / div >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< p class = "hint mt-1" >
Saved in this browser as you work .
< template v-if ="ed.account.value" > Also kept in your account , so they are on every computer you sign in on. < / template >
< a v -else href = "#" @ click.prevent = " ed.dialog.value = ' account ' " > Sign in to have them on every computer . < / a >
< / p >
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
< ul class = "project-list" >
< li v-for ="m in ed.projects.value" :key="m.id" :class="{ current: m.id === ed.meta.value.id }" >
< input
v - if = "renaming === m.id"
v - model = "renameText"
class = "rename"
@ keydown . enter = "finishRename"
@ keydown . esc = "renaming = null"
@ blur = "finishRename"
/ >
< button v -else class = "pick" @click ="open(m.id)" >
< span class = "name" >
{ { m . name } }
< span v-if ="m.id === ed.meta.value.id" class="badge" > open < / span >
< / span >
< span class = "meta" >
{ { when ( m . updated ) } }
< template v-if ="m.link" > · < Icon name = "lucide:link" class = "size-3" / > { { m . link . key ? 'your link' : 'from a link' } } < / template >
A settings for every part, overlap-free wiring with crossing styles, accounts with sync
- Clicking anything opens its settings: swap parts in place (wires stay on
matching pins), clock frequency per clock, keyboard keys for switches and
buttons, lamp/display colours, note sizes, component names on the canvas,
position, unlink all wires, unpack a component, make an independent copy.
- Wires of different signals never share a line: auto routes pick free
columns or detours, remaining clashes go on separate lanes. Crossings drawn
as bow, triangle, bridge, gap or plain.
- Accounts (email + scrypt password, httpOnly session) with two-way project
sync and conflict copies; per-account limits; cross-site writes refused.
- Compatibility suite: a project and both browser-storage layouts from
release a241adc must load and compute identically.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 11:09:37 +00:00
< template v-if ="ed.account.value && m.cloud?.owner === ed.account.value.id" >
· < Icon : name = "m.dirty ? 'lucide:cloud-upload' : 'lucide:cloud-check'" class = "size-3" / > { { m . dirty ? 'saving to account' : 'in your account' } }
< / template >
< template v -else -if = " ed.account.value & & ! m.cloud " > · < Icon name = "lucide:cloud-upload" class = "size-3" / > uploading < / template >
< template v -else -if = " ! ed.account.value " > · < Icon name = "lucide:laptop" class = "size-3" / > this browser only < / template >
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
< / span >
< / button >
2026-10-20 11:20:55 +00:00
< button
v - if = "ed.account.value && m.cloud?.owner === ed.account.value.id"
class = "icon-btn"
title = "Savegames: earlier versions"
@ click = "ed.versionsFor.value = m.id; ed.dialog.value = 'versions'"
>
< Icon name = "lucide:history" class = "size-3.5" / >
< / button >
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
< button class = "icon-btn" title = "Rename" @ click = "startRename(m.id, m.name)" > < Icon name = "lucide:pencil" class = "size-3.5" / > < / button >
< button class = "icon-btn" title = "Duplicate" @ click = "ed.duplicateProject(m.id); close()" > < Icon name = "lucide:copy" class = "size-3.5" / > < / button >
< button v-if ="confirmDelete !== m.id" class="icon-btn" title="Delete" @click="confirmDelete = m.id" > < Icon name = "lucide:trash-2" class = "size-3.5" / > < / button >
< button v -else class = "btn-sm btn-danger" @ click = "ed.deleteProject(m.id); confirmDelete = null" > Delete ? < / button >
< / li >
< / ul >
2026-10-20 11:20:55 +00:00
< template v-if ="ed.account.value" >
< button class = "section-toggle mt-4" @click ="toggleTrash" >
< Icon : name = "showTrash ? 'lucide:chevron-down' : 'lucide:chevron-right'" class = "size-4" / >
Recently deleted
< / button >
< template v-if ="showTrash" >
< p v-if ="!trash" class="hint mt-2" > Loading … < / p >
< p v -else -if = " ! trash.length " class = "hint mt-2" > Nothing deleted in the last 30 days . < / p >
< ul v -else class = "project-list" >
< li v-for ="t in trash" :key="t.id" >
< div class = "pick" >
< span class = "name" > { { t . name } } < / span >
< span class = "meta" > deleted { { when ( t . deleted ) } } < / span >
< / div >
< button class = "btn-sm" @click ="restoreDeleted(t)" > Restore < / button >
< / li >
< / ul >
< / template >
< / template >
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
< div class = "mt-4 flex flex-wrap gap-2" >
A campaign with unlocks, synthesised sound, puzzles and the puzzle of the week
- Campaign projects start with NAND only; challenges open along a
dependency chain, each solution becomes a usable part, and basic parts
unlock on the way. Locked parts and challenges say what opens them.
- Sound effects made with Web Audio: place, connect, switches, buttons,
delete, clock ticks (opt-in), solve, fail, unlock, record. Mute and
volume in the top bar and Display settings.
- Publish any circuit as a puzzle link; only its behaviour is shared.
The server re-runs the checks on submitted solutions, counts their
transistors and keeps each player's best; the board shows a histogram
and your place. A generated puzzle of the week for everyone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 17:54:57 +00:00
< button class = "btn btn-primary" title = "Start with NAND only and earn every other part by solving challenges" @ click = "ed.newProject(false, true); close()" >
< Icon name = "lucide:trophy" class = "size-4" / > New campaign
< / button >
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
< button class = "btn" @ click = "ed.newProject(false); close()" > < Icon name = "lucide:file" class = "size-4" / > New ( NAND only ) < / button >
< button class = "btn" @ click = "ed.newProject(true); close()" > < Icon name = "lucide:file-plus" class = "size-4" / > New with examples < / button >
< button class = "btn" @click ="fileInput?.click()" > < Icon name = "lucide:folder-open" class = "size-4" / > Open file < / button >
< input ref = "fileInput" type = "file" accept = "application/json,.json" class = "hidden" @change ="onFile" / >
< / div >
< / div >
< / div >
< / template >