Commit Graph

32 Commits

Author SHA1 Message Date
Fabian @ Blax Software a29215162c A buttons beside the selection, a plug without a cable, bounds on split ports
- Round buttons on the canvas next to what is selected: split a component's
  connector port into wires or join it (beside each socket), pull a cable out
  of a plug, plug a cable end in or out, split a cable into single wires,
  bundle selected wires.
- The cable button on a component's pins puts just a plug there. Drag the
  cable out of its pin (or press Pull the cable out and click): the other end
  goes where it is let go, and on a part's pins its wires land on them.
- A split port's wires on the box are marked off by a line above and below
  in the connector's colour.
- A split plug with no cable yet is named after the pins it drives.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 22:45:47 +01:00
Fabian @ Blax Software ab47235e38 Merge branch 'feat/responsive'
# Conflicts:
#	app/components/editor/Help.vue
2026-10-26 18:54:49 +01:00
Fabian @ Blax Software bacc6af17e Merge branch 'feat/library'
# Conflicts:
#	README.md
#	app/composables/useEditor.ts
#	app/lib/logic/project.ts
2026-10-26 18:54:44 +01:00
Fabian @ Blax Software ef9a4a2a6b Merge branch 'feat/drag' 2026-10-26 18:54:28 +01:00
Fabian @ Blax Software 313f1849f4 Merge branch 'feat/ports' 2026-10-26 18:54:28 +01:00
Fabian @ Blax Software 596dc6827e BF memory: a newer save brings its own bits, bits reach the account when you leave, room for them
A project that comes in with the same circuit open (a newer save from
another computer, a savegame restored in place, a shared link opened
again) now runs from the bits it brings. Before, the running circuit
went on with this computer's old bits and wrote them over the newer ones
at the next save, and a savegame could not undo Power off and on.

Bits changed only by buttons or a clock are sent to the account when the
page is hidden or closed, when you leave the project, and before signing
out, so they are no longer lost by "remove from this browser" and reach
the other computer. A running clock alone still sends nothing. Bits alone
keep the project's save time, so an edit saved on another computer wins
over them and they end up in its savegames.

What circuits hold has its own room of 500 KB per project on top of the
2 MB limit, in the browser, the account and share links. When it is full,
the circuits left longest ago start from 0; a circuit that holds more than
that on its own says so once. A project can no longer become too large to
load because of its memory.

A savegame opened as a copy saves the project it leaves first, like every
other way of switching projects.

Tests now run the editor itself (in a stand-in browser with an account
server) for going into components and back, reloads, two projects, other
computers, savegames, signing out and the room limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:44:43 +01:00
Fabian @ Blax Software b823e8fef9 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 18:44:13 +01:00
Fabian @ Blax Software 049f84eb64 BF split ports: no wire against the cable, pins that stay put, lines kept on unpack
A wire dropped on a socket with a cable in it only takes a line coming
out; the lines going in are the cable's, so it no longer drives one
against the cable. Wired by hand anyway, the check calls that an error,
like a signal sent by two parts. A line going in with neither a wire nor
a cable gets the usual "not connected (reads 0)" warning and marker.

While a wire is drawn over a socket it ends on the socket, where it goes
when let go, not on the pin below. Splitting or joining a port no longer
moves the pins on the other side of the box. Pins on their usual edge
come first, so a wire dropped on the box body takes those, and the cable
button only offers pins whose cable end sits outside the box.

Unpacking a component joins wires on its split lines to the parts that
used the line inside; wires that had nowhere to go are counted in a
notice. Docked panels line up with the moved ports when a project is
opened, not at the next edit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:38:32 +01:00
Fabian @ Blax Software d5a9447bf9 BF moving parts: bends that would run over a part or along another signal let go, the rest stays
Hand-placed bends stayed where they were when parts moved, and the router
takes such wires as fixed lines. So a wire to a moved part was joined to
its old bends by a straight piece that could cross that part (into its pin
from the wrong side) or other parts, run along another signal or over
someone else's pin; a part put down on a wire's bends lay right over it;
and wires of the same signal branched off those lines. The arrow keys also
froze picked wires into bends and shifted them even when one end stayed.

Now a drag and the arrow keys move parts the same way (move.ts), always
from where they started. Wires between parts that move together keep
their bends, moved along. A wire to a part that stays keeps the bends on
that side as long as the way through them is clear by the router's own
rules (a cable by its full width) and lets go of the others, which the
router lays out around the parts; a wire a moved part now lies on does
the same. Only these wires are looked at. What shows while dragging is
what stays, and the drop, a plug or latch included, is one undo step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:21:34 +01:00
Fabian @ Blax Software 7d6b0f8fad 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 18:14:46 +01:00
Fabian @ Blax Software 588165236c R bars and panels fit small windows, Main always in reach; A Space search opens components
The top and bottom bars keep their steady centred width on wide windows,
but never get narrower than 760px as far as the panels leave room, and
move off the centre rather than under a panel. On a narrow bar the words
go first, the names between Main and the open component fold into "…"
(a menu back to each), and sound, settings and help, then undo, redo and
share, then challenges and search move into a "⋯" menu. Main keeps its
house at every width; before, the rule that hid its label hid the icons
too, and on a squeezed bar the crumbs, Main with them, were cut off.

From 821 to 1100px the selection's panel floats over the canvas edge
between the bars instead of narrowing the canvas. The zoom buttons sit
above the parts bar where it reaches them. The challenges drop-down, the
flyouts and the search box stay on screen.

In the Space search, Shift+Enter (or Ctrl+Enter, or the pencil on a
component's line) opens the component to edit it instead of placing it,
and typing a name lists "Open <name>" for every circuit of the project,
also those that cannot be placed here; the one you are in shows as where
you are. A circuit on the way here is reached by going back along it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:12:40 +01:00
Fabian @ Blax Software e55bd47310 A memory that stays: circuits keep their bits across visits and saves; Power off and on
What latches, flip-flops, registers and RAM built from NANDs hold is no
longer lost when you go into a component and come back, reload the page or
open the project on another computer. Leaving a circuit puts its bits in
the project, and opening it starts from them.

Only the gates on feedback loops can hold a bit, so only those that are 1
are kept, plus the clocks that are high: each node id once, each gate as
the path levels it shares with the gate before plus the rest. 1,024
flip-flops take about 30 KB. Restoring runs the gates in the order signals
flow, so the gates in front of a latch are right before it reads them;
gates that no longer exist after an edit are ignored.

The bits go with every save, file, share link and account upload. Between
saves (a clock running, a button pressed) they are put in this browser's
copy every 30 seconds and when the page is left, without counting as a
change: no sync, savegame or undo step of their own, and never over a save
made in another tab. Projects without them start from all zeros as before.

"Power off and on" in the menu on the circuit's name, or with Space,
starts the open circuit again from all zeros.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:09:18 +01:00
Fabian @ Blax Software 1be913bd24 A ports on top of the box, split into lines to wire by hand
On a component's box every connector port now sits at the very top of its
side, above the single pins, in auto and hand-drawn boxes alike. A port
can be split on one placed component (its settings or right click: Split
… into lines): right below the socket the box then gets a pin per line,
named after the line, so lines can be wired by hand without an adapter.
Lines going into the component are inputs, lines coming out outputs, each
facing out of its side; a bar in the type's colour ties them to the
socket. A cable still plugs into the socket at the same time. Dropping a
single wire on a socket (or clicking one while connecting) splits the
port and takes the first free line that runs that way. Join … lines
takes the line pins and their wires away again, as one undo step.

A line wired by hand joins the same net the cable's line reaches inside;
a wire and a cable on one line both drive it, and the check says so.
Line pins are left out of the open-input warning, docked panels and
bubbles; docked panels no longer get a row for a port's socket either.
Saved as an optional list on the placed component (splitPorts); without
it a box only has its ports moved to the top.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 18:08:27 +01:00
Fabian @ Blax Software c1b70a937f 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 20:38:17 +02:00
Fabian @ Blax Software 6e3405ae0c 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 20:17:41 +02:00
Fabian @ Blax Software 67e3d94d80 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 20:04:43 +02:00
Fabian @ Blax Software 8de4a81678 A connector types of your own: HDMI, RJ45 or any bus, with out and in ports and one cable that carries every line both ways
- A project keeps connector types: a name, a colour and lines that run
  out -> in or back. Made, edited and deleted (once unused) from the
  parts list's new Connectors group and a connector dialog.
- "<type> out" and "<type> in" ports: inside a component a pin per line
  on the inner side plus a cable pin to pass the whole cable on to a
  part inside; on the component's box one port, coloured like its type.
- One cable joins an out port to an in port of the same type; the
  compiler joins line by line, forward and back, at every depth. Ports
  of different types never join; mismatched cables are pruned.
- Pins can face the other way (the inner pins of ports); the router
  takes them out and in from the side they face.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 18:59:56 +02:00
Fabian @ Blax Software c5b67ee7c1 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 18:36:17 +02:00
Fabian @ Blax Software 4fddb8cd34 A one-click cable bundling with smarter placement, BF unlink keeps the cable
- "Bundle into cable" (Ctrl+G) places both ends itself again: right after
  the sources on their middle row, right before the targets on theirs, so
  the wires keep their flow; backwards wires get a backwards cable, and an
  end steps aside when a part is in the way. "Place the ends yourself…"
  (Ctrl+Shift+G) keeps the two-click placement.
- "Unlink all" on a bundle or split removes only the wires going in or out;
  the cable between them stays.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:21:35 +02:00
Fabian @ Blax Software cf24578248 A box selection picks up the wires and cables it crosses
A box that touches no parts selects every wire it crosses, so dragging
across the wires between parts marks them for bundling. Right to left
(green box) selects everything touched, parts and wires; left to right over
parts keeps selecting only wires fully inside, so Delete stays safe.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 11:08:32 +02:00
Fabian @ Blax Software 29c32026d7 A cables you place yourself, drawn as coloured ribbons
- Select wires (or a box of parts and wires), "Bundle into cable…" or
  Ctrl+G, then click where the cable starts and where it ends, with a
  preview; "place it for me" keeps the automatic placement.
- Up to 16 wires, a cable is a ribbon: one thin line per wire inside the
  sleeve, in that wire's colour, lit on its own.
- The sleeve starts neutral (no longer takes the first wire's colour) and
  has its own colour in the cable and bundle/split settings. Wide cables
  are clickable across their width; the width mark sits above the ribbon.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 10:39:54 +02:00
Fabian @ Blax Software f1b72b3e3c BF pin names editable again, A dense Pins list with toggles and panel groups, wire many at once, folding side panels, full zoom-out
- Pins list rows used the class "pin", which the canvas styles as
  unclickable: renaming and focusing pins did nothing. Renamed the class.
- One line per entry; click the value to flip a switch, hold for a button;
  panel rows framed under their panel.
- Drag one wire from a selected part to another part: all selected parts
  connect to its next pins in order; "Wire them all to" in the bulk panel.
- Both side panels fold to an icon strip ([ and ]), remembered per browser.
- Zoom out until the whole circuit fits (further for bigger circuits); grid
  dots hide when they would be too dense.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-21 10:09:43 +02:00
Fabian @ Blax Software 74b257ce6e 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 09:29:55 +02:00
Fabian @ Blax Software acb9620b2b A dimmed names from the connected pin on switches, lamps and outputs
Parts without a hand-typed name show the name of the component pin they
are wired to, dimmed and in italics, live as the wiring changes;
automatic names are dimmed too. Typed names show as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:15:38 +02:00
Fabian @ Blax Software 5663685505 A compact tidy wiring, pass-through lamps and outputs, gates with up to 16 inputs
- Tidy wiring orders all wires entering one column together and lays
  them out as one compact staircase a grid step apart, sliding only
  within that gap to avoid running along other signals. Separate
  bundles into the same part no longer cross each other.
- Lamps and output pins get a pin on the right that carries the same
  signal on; labels move above when it is wired.
- AND, OR, XOR, NAND and NOR (built in, examples or your own, detected
  from the truth table) take 2 to 16 inputs. The wide version is a
  balanced tree of the two-input gate, so transistors count honestly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 20:09:23 +02:00
Fabian @ Blax Software 2edb458372 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 19:54:57 +02:00
Fabian @ Blax Software 9754ecc0b4 A transistor counts and records, cables, pixels and screens
- Every component shows its transistors (CMOS, 4 per NAND, at every
  depth) in the palette, its settings and the stats. Challenges keep
  the fewest transistors of a passing solution and announce new records.
- Cables: bundle and split parts carry 2 to 32 wires as one thick cable
  with a width mark; "Bundle into cable" builds one from selected wires,
  "Remove cable" takes it apart. Cable ends only join cable ends.
- Pixel part; pixels inside a component show on its box as one screen
  without gaps. New examples: Screen 4x4 and Demo: Screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:29:16 +02:00
Fabian @ Blax Software 861b161c8b A input panels, automatic names, one-by-one wiring, tidy routing, truth table export
- Input panel part: rows of switches, buttons and clocks. "Attach input
  panel" docks one to a component with a row per free input; it moves
  with the component and follows its pins.
- Copies and new pins continue name series (D0 -> D1, A -> B); unnamed
  switches, lamps and pins take the name of the component pin they are
  wired to.
- Connecting: target pins are ringed, dropping on a part uses its next
  free pin, click-then-click works, and "Connect one by one" (W) wires a
  selection's pins in turn.
- Tidy wiring option and "Tidy all wires": sorted, evenly spaced columns
  per gap, one trunk per signal, fewer crossings.
- Truth table full screen, CSV download, copy as Markdown, current row
  highlighted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:17:25 +02:00
Fabian @ Blax Software 08b086a71e A crash-safe storage, savegames and daily backups
- Writes go to a flushed temporary file and are renamed into place; the last
  intact version stays as .bak and reads fall back to it, so a power cut
  never leaves a damaged save. Same file format as before.
- Savegames per account project (newest 30, one per day for 90 days), kept
  before restores and deletions; deleted projects restorable for 30 days.
  Projects dialog: savegames per project and "Recently deleted".
- Daily gzip backup of data/ into backups/ (14 newest + monthly), restore
  script scripts/restore-backup.mjs.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-20 13:20:55 +02:00
Fabian @ Blax Software 5e17826ba5 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 13:09:37 +02:00
Fabian @ Blax Software a241adc94e 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 13:21:49 +02:00
Fabian @ Blax Software 03a4d55834 A logigate: NAND-only logic editor and simulator with components, challenges and examples
Draw circuits from NAND gates, package them as components and reuse them.
Event-driven simulation runs live while drawing. IEC/ANSI symbols, truth
tables, 17 challenges, example library up to a 4-bit counter. Deploys to
edgerealm like autismus-spektrum (logicate.blax.at).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-17 12:49:38 +02:00