R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< script setup lang = "ts" >
// The floating bar at the bottom of the canvas, like Figma's toolbar: one
// button per kind of part. Pointing at one opens its parts above it; click
// a part to place it (or drag it onto the canvas), pin it to keep it on the
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
// bar itself. Components and your connector types have their own buttons.
2026-10-23 10:33:47 +00:00
// Parts and components show as drawn tiles in a strip, like a city
// builder's: the mouse wheel scrolls it sideways.
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
import { shortCount } from '~/lib/logic/analyze'
import { BASIC _GROUPS } from '~/composables/useParts'
import type { ComponentDef , NodeKind } from '~/lib/logic/types'
const ed = useEditor ( )
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
const { place , dragStart , dragEnd , isPinned , togglePin , pinned , unpin } = usePlace ( )
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
const { componentGroups } = useParts ( )
const ICONS : Record < string , string > = {
Logic : 'lucide:square-function' ,
Inputs : 'lucide:toggle-left' ,
Outputs : 'lucide:lightbulb' ,
Wiring : 'lucide:spline' ,
Notes : 'lucide:sticky-note' ,
}
type Cat = { id : string ; label : string ; icon : string }
const cats = computed < Cat [ ] > ( ( ) => [
... BASIC _GROUPS . map ( g => ( { id : g . name , label : g . name , icon : ICONS [ g . name ] ? ? 'lucide:shapes' } ) ) ,
{ id : 'connectors' , label : 'Connectors' , icon : 'lucide:plug' } ,
{ id : 'components' , label : 'Components' , icon : 'lucide:boxes' } ,
] )
// ── Flyout: opens on pointing, stays while the pointer is over it ──
const open = ref < string | null > ( null )
let timer : ReturnType < typeof setTimeout > | undefined
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
const dock = ref < HTMLElement > ( )
2026-10-23 10:33:47 +00:00
const fly = ref < HTMLElement > ( )
/** Pointer position along the dock, the dock's width and the flyout's, in px. */
const at = ref ( { x : 0 , dock : 0 , fly : 250 } )
/** Where the flyout opens: centred above the pointer, kept inside the canvas. */
const anchor = computed ( ( ) => {
const half = at . value . fly / 2
return Math . min ( Math . max ( at . value . x , half ) , Math . max ( half , at . value . dock - half ) )
} )
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
function anchorAt ( x : number ) {
const r = dock . value ! . getBoundingClientRect ( )
2026-10-23 10:33:47 +00:00
at . value = { ... at . value , x : x - r . left , dock : r . width }
}
function measure ( ) {
if ( fly . value ) at . value = { ... at . value , fly : fly . value . offsetWidth }
const el = strip . value
edges . value = el ? { left : el . scrollLeft > 4 , right : el . scrollLeft + el . clientWidth < el . scrollWidth - 4 } : { left : false , right : false }
}
// ── The strip of tiles: sideways with the wheel, arrows at the ends ──
const strip = ref < HTMLElement > ( )
const edges = ref ( { left : false , right : false } )
function onWheel ( e : WheelEvent ) {
const el = strip . value
if ( ! el || Math . abs ( e . deltaX ) > Math . abs ( e . deltaY ) ) return
e . preventDefault ( )
el . scrollLeft += e . deltaY
}
function page ( dir : number ) {
strip . value ? . scrollBy ( { left : dir * strip . value . clientWidth * 0.8 , behavior : 'smooth' } )
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
}
2026-10-23 10:33:47 +00:00
const placeable = ( d : ComponentDef ) => d . id !== ed . def . value . id && ed . canPlace ( d . id )
/** The component group shown; your own components first. */
const compTab = ref ( '' )
const compGroup = computed (
( ) =>
componentGroups . value . find ( g => g . name === compTab . value ) ? ?
// Untouched: the first group with something that can go in here.
componentGroups . value . find ( g => g . defs . some ( placeable ) ) ? ?
componentGroups . value [ 0 ] ,
)
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
function show ( id : string , e : PointerEvent ) {
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
clearTimeout ( timer )
const go = ( ) => {
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
if ( open . value !== id ) anchorAt ( e . clientX )
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
open . value = id
}
// Moving along the bar switches at once; the first one waits a moment.
if ( open . value ) go ( )
else timer = setTimeout ( go , 110 )
}
function leave ( ) {
clearTimeout ( timer )
2026-10-23 10:33:47 +00:00
// While a part is dragged out of it, the flyout stays (it closes when the drag ends).
if ( ed . dragPart . value ) return
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
timer = setTimeout ( ( ) => ( open . value = null ) , 220 )
}
function stay ( ) {
clearTimeout ( timer )
}
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
function toggle ( id : string , e : MouseEvent ) {
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
if ( open . value === id ) open . value = null
else {
clearTimeout ( timer )
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
anchorAt ( e . clientX )
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
open . value = id
}
}
function pick ( kind : NodeKind , chip ? : string , conn ? : string ) {
place ( kind , chip , conn )
open . value = null
}
2026-10-23 10:33:47 +00:00
function endDrag ( ) {
dragEnd ( )
open . value = null
}
watch ( [ open , compTab , ( ) => compGroup . value ? . defs . length ] , ( ) => nextTick ( measure ) )
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
/** Which button the part being placed belongs to, to show it as active. */
const activeCat = computed ( ( ) => {
const p = ed . placing . value
if ( ! p ) return null
if ( p . kind === 'chip' ) return 'components'
if ( p . kind === 'portin' || p . kind === 'portout' ) return 'connectors'
return BASIC _GROUPS . find ( g => g . parts . some ( x => x . kind === p . kind ) ) ? . name ? ? null
} )
const group = computed ( ( ) => BASIC _GROUPS . find ( g => g . name === open . value ) )
const connectors = computed ( ( ) => ed . project . value . connectors ? ? [ ] )
const portsOk = computed ( ( ) => ed . canPlaceKind ( 'portin' ) )
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
// Pinned parts sit on the bar; a pinned component this project lacks is left out.
const shown = computed ( ( ) => pinned . value . filter ( p => p . kind !== 'chip' || p . chip ) )
const named = ( p : { kind : NodeKind } ) => p . kind === 'chip' || p . kind === 'nand'
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
function onKey ( e : KeyboardEvent ) {
if ( e . key === 'Escape' && open . value ) {
open . value = null
e . stopPropagation ( )
}
}
onMounted ( ( ) => window . addEventListener ( 'keydown' , onKey , true ) )
onBeforeUnmount ( ( ) => window . removeEventListener ( 'keydown' , onKey , true ) )
< / script >
< template >
R Packed panels, Tab adds rows, flyouts at the pointer, steady top bar
Combining switches, buttons, lamps or outputs into a panel, and merging
panels, puts the rows right under each other (space 0). Tab in the last
row's name of a panel, or the last line of a connector type, adds the
next one once it is filled in. The bottom bar's lists open centred above
the pointer. The top bar keeps the width it has with both panels open,
centred, so it no longer grows and shrinks with the panels.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:47:38 +00:00
< div ref = "dock" class = "bottom-dock" @ pointerdown.stop >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< Transition name = "flyout" >
2026-10-23 10:33:47 +00:00
< div v-if ="open" ref="fly" class="flyout" :class="{ 'part-flyout': open !== 'connectors' }" :style="{ left: `${anchor}px` }" @pointerenter="stay" @pointerleave="leave" >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
<!-- Built - in parts -- >
< template v-if ="group" >
< p class = "flyout-head" > { { group . name } } < / p >
2026-10-23 10:33:47 +00:00
< div class = "strip-wrap" >
< button v-if ="edges.left" class="strip-arrow left" title="Scroll left" @click="page(-1)" > < Icon name = "lucide:chevron-left" class = "size-4" / > < / button >
< div ref = "strip" class = "part-strip" @wheel ="onWheel" @scroll ="measure" >
< div v-for ="p in group.parts" :key="p.kind" class="part-slot" >
< button
class = "part-tile"
: class = "{ blocked: !ed.canPlaceKind(p.kind), active: ed.placing.value?.kind === p.kind && !ed.placing.value?.chip }"
: title = "p.hint"
draggable = "true"
@ click = "pick(p.kind)"
@ dragstart = "dragStart($event, p.kind)"
@ dragend = "endDrag"
>
< span class = "part-art" > < EditorPartThumb :kind ="p.kind" / > < / span >
< span class = "part-name" > { { p . name } } < / span >
< kbd v-if ="p.key" class="part-key" > {{ p.key }} < / kbd >
< Icon v -if = " ! ed.canPlaceKind ( p.kind ) " name = "lucide:lock" class = "part-lock size-3.5" / >
< / button >
< button class = "pin-btn" : class = "{ on: isPinned(p.kind) }" : title = "isPinned(p.kind) ? 'Unpin from the bar' : 'Pin to the bar, to have it at hand'" @click ="togglePin(p.kind)" >
< Icon : name = "isPinned(p.kind) ? 'lucide:pin-off' : 'lucide:pin'" class = "size-3.5" / >
< / button >
< / div >
< / div >
< button v-if ="edges.right" class="strip-arrow right" title="Scroll right" @click="page(1)" > < Icon name = "lucide:chevron-right" class = "size-4" / > < / button >
< / div >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< / template >
<!-- Connector types -- >
< template v -else -if = " open = = = ' connectors ' " >
< p class = "flyout-head" > Connectors < / p >
< p v-if ="!connectors.length" class="flyout-empty" > Make a cable type of your own : HDMI , RJ45 , a bus. It gets an Out and an In port. < / p >
< ul class = "flyout-list" >
< li v-for ="c in connectors" :key="c.id" >
< span class = "flyout-item static" >
< span class = "conn-swatch" : class = "c.color ? `c-${c.color}` : ''" / >
< span class = "grow truncate" > { { c . name } } < / span >
< span class = "flyout-note" > { { c . lines . length } } lines < / span >
< / span >
< button
v - for = "side in ['portout', 'portin'] as const"
: key = "side"
class = "btn-sm"
: disabled = "!portsOk"
draggable = "true"
: title = "side === 'portout' ? `Where a ${c.name} cable leaves this circuit` : `Where a ${c.name} cable comes in`"
@ click = "pick(side, undefined, c.id)"
@ dragstart = "dragStart($event, side, undefined, c.id)"
@ dragend = "dragEnd"
>
{ { side === 'portout' ? 'Out' : 'In' } }
< / button >
< button class = "pin-btn" title = "Edit its name, colour and lines" @ click = "ed.editConnector(c.id), (open = null)" > < Icon name = "lucide:pencil" class = "size-3.5" / > < / button >
< / li >
< / ul >
< button class = "flyout-new" :disabled ="!portsOk" @ click = "ed.addConnector(), (open = null)" > < Icon name = "lucide:plus" class = "size-4" / > New connector type < / button >
< / template >
<!-- Components , by group -- >
< template v -else -if = " open = = = ' components ' " >
2026-10-23 10:33:47 +00:00
< div v-if ="componentGroups.length > 1" class="part-tabs" role="tablist" >
< button
v - for = "g in componentGroups"
: key = "g.name"
role = "tab"
: aria - selected = "compGroup?.name === g.name"
: class = "{ active: compGroup?.name === g.name }"
@ click = "compTab = g.name"
>
{ { g . name } } < span class = "count" > { { g . defs . length } } < / span >
< / button >
< / div >
< p v -else class = "flyout-head" > { { compGroup ? . name ? ? 'Components' } } < / p >
< div class = "strip-wrap" >
< button v-if ="edges.left" class="strip-arrow left" title="Scroll left" @click="page(-1)" > < Icon name = "lucide:chevron-left" class = "size-4" / > < / button >
< div ref = "strip" class = "part-strip" @wheel ="onWheel" @scroll ="measure" >
< div v-for ="d in compGroup?.defs ?? []" :key="d.id" class="part-slot" >
< button
class = "part-tile"
: class = "{ blocked: !placeable(d), active: ed.placing.value?.chip === d.id }"
: title = "d.id === ed.def.value.id ? 'You are editing this one' : d.description || ''"
: draggable = "placeable(d)"
@ click = "pick('chip', d.id)"
@ dragstart = "dragStart($event, 'chip', d.id)"
@ dragend = "endDrag"
>
< span class = "part-art" > < EditorPartThumb kind = "chip" :chip ="d.id" / > < / span >
< span class = "part-name" > { { d . name } } < / span >
< span v-if ="d.id === ed.def.value.id" class="part-meta" > editing < / span >
< span v -else -if = " ed.transistors ( d.id ) " class = "part-meta" > { { shortCount ( ed . transistors ( d . id ) ) } } transistors < / span >
< / button >
< button class = "pin-btn" : class = "{ on: isPinned('chip', d) }" : title = "isPinned('chip', d) ? 'Unpin from the bar' : 'Pin to the bar'" @ click = "togglePin('chip', d)" >
< Icon : name = "isPinned('chip', d) ? 'lucide:pin-off' : 'lucide:pin'" class = "size-3.5" / >
< / button >
< button v-if ="d.id !== ed.def.value.id" class="pin-btn edit" title="Open it and edit inside (or double-click it on the canvas)" @click="ed.open(d.id), (open = null)" >
< Icon name = "lucide:pencil" class = "size-3.5" / >
< / button >
< / div >
< / div >
< button v-if ="edges.right" class="strip-arrow right" title="Scroll right" @click="page(1)" > < Icon name = "lucide:chevron-right" class = "size-4" / > < / button >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< / div >
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
< div class = "flex gap-1" >
< button class = "flyout-new grow" @ click = "ed.createComponent(), (open = null)" > < Icon name = "lucide:plus" class = "size-4" / > New component < / button >
< button class = "flyout-new" title = "NOT, AND, … up to a 4-bit counter, all built from NAND" @ click = "ed.loadExamples(), (open = null)" > < Icon name = "lucide:book-open" class = "size-4" / > Examples < / button >
< / div >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< / template >
< / div >
< / Transition >
< nav class = "bottom-bar" aria -label = " Parts " @pointerleave ="leave" >
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
< template v-if ="shown.length" >
< button
v - for = "p in shown"
: key = "p.pin"
class = "bar-btn pinned-part"
: class = "{ blocked: p.missing, active: ed.placing.value?.kind === p.kind && ed.placing.value?.chip === p.chip }"
: title = "`${p.name}${p.key ? ` (${p.key})` : ''}: click to place, drag onto the canvas. Right-click to unpin`"
: draggable = "!p.missing"
@ pointerenter = "leave"
@ click = "pick(p.kind, p.chip)"
@ contextmenu . prevent = "unpin(p.pin)"
@ dragstart = "dragStart($event, p.kind, p.chip)"
@ dragend = "dragEnd"
>
<!-- Gates and components by name , the rest ( switch , lamp , clock ) by icon . -- >
< Icon v -if = " ! named ( p ) " :name ="p.icon" class = "size-[18px]" / >
< span v-else > {{ p.name }} < / span >
< / button >
< span class = "bar-sep" / >
< / template >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< button
v - for = "c in cats"
: key = "c.id"
class = "bar-btn"
: class = "{ open: open === c.id, active: activeCat === c.id }"
: title = "c.label"
@ pointerenter = "show(c.id, $event)"
@ click = "toggle(c.id, $event)"
>
< Icon :name ="c.icon" class = "size-[18px]" / >
< span class = "bar-label" > { { c . label } } < / span >
< / button >
< span class = "bar-sep" / >
R Top bar like the parts bar, no left panel
The parts panel on the left is gone: pinned parts sit at the start of the
bottom bar, components open from the pencil in its Components list (or a
double-click), examples load from there too. The side panel moved to the
left. The top bar floats across the whole width: menu with the project,
Main and the way into the open component instead of the circuit
selector, Challenges in a drop-down, clock, search, undo, settings,
share and account. / and the bar's search open quick add.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:17:41 +00:00
< button class = "bar-btn" title = "Find a part (/)" @click ="ed.partSearch.value++" >
R a Figma-like workspace: a floating bottom bar of part kinds with flyouts, pinned parts on the left
- Bottom bar over the canvas: Logic, Inputs, Outputs, Wiring, Notes,
Connectors, Components (and search). Pointing at one opens its parts
above it: click to place, drag onto the canvas, pin to the left.
Connectors offer Out/In, edit and new type; components come grouped
with their transistor counts.
- Left panel: pinned parts first (NAND, AND, OR, NOT, XOR, input,
output, lamp, clock to start with; kept per browser, components by
name so they follow you into every project), then the circuits list.
The long list of built-in parts and the connector list moved to the
bar.
- Slimmer top bar and side panels; notices sit above the bar.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:04:43 +00:00
< Icon name = "lucide:search" class = "size-[18px]" / >
< / button >
< / nav >
< / div >
< / template >