From 09f945d2c5d250973114cb5b2bb46967b8276429 Mon Sep 17 00:00:00 2001 From: "Fabian @ Blax Software" Date: Wed, 21 Oct 2026 14:38:59 +0200 Subject: [PATCH] A output panels, and switches, buttons, clocks or lamps combined into one panel - Output panel: a column of named lamps, each passing its signal on; inside a component its rows are output pins (or kept inside); "Attach output panel" docks one to a component's outputs - Select switches, buttons and clocks: Combine into an input panel (names, states, keys and wires stay; spacing kept); "All rows" makes them all switches, buttons or clocks - Select lamps or output pins: Combine into an output panel - Unnamed panel rows take the name of the pin they are wired to; output panels merge like input panels; circuits that place this one keep their wires when pins move into a panel Co-Authored-By: Claude Opus 5.5 (1M context) --- app/components/editor/BulkSettings.vue | 16 ++- app/components/editor/Canvas.vue | 2 +- app/components/editor/Help.vue | 3 +- app/components/editor/NodeSettings.vue | 44 ++++++-- app/components/editor/NodeView.vue | 12 ++ app/components/editor/Palette.vue | 1 + app/components/editor/PinRow.vue | 2 +- app/components/editor/PinsPane.vue | 1 + app/composables/useEditor.ts | 59 +++++++--- app/composables/useMenu.ts | 34 +++++- app/lib/logic/bulk.ts | 15 ++- app/lib/logic/check.ts | 2 +- app/lib/logic/compile.ts | 11 ++ app/lib/logic/fit.ts | 2 +- app/lib/logic/geometry.ts | 30 ++++- app/lib/logic/labels.ts | 9 +- app/lib/logic/panels.ts | 146 ++++++++++++++++++++----- app/lib/logic/progress.ts | 2 + app/lib/logic/types.ts | 6 +- tests/panels.test.ts | 119 +++++++++++++++++++- 20 files changed, 445 insertions(+), 71 deletions(-) diff --git a/app/components/editor/BulkSettings.vue b/app/components/editor/BulkSettings.vue index 718c3db..02c26df 100644 --- a/app/components/editor/BulkSettings.vue +++ b/app/components/editor/BulkSettings.vue @@ -341,13 +341,25 @@ function pack() {

Or drag one wire from a selected part to a pin: the others follow onto the next pins.

-
-

Input panels

+
+

Panels

+
+

Panel

+ +
+

Make a component

Wires that cross the selection border become its pins.

diff --git a/app/components/editor/Canvas.vue b/app/components/editor/Canvas.vue index eeb870b..5dcfe06 100644 --- a/app/components/editor/Canvas.vue +++ b/app/components/editor/Canvas.vue @@ -871,7 +871,7 @@ function onPointerUp(e: PointerEvent) { function onDoubleClick(node: CircuitNode) { if (node.kind === 'chip' && node.chip) ed.open(node.chip) - else if (['input', 'output', 'lamp', 'button', 'note', 'hex', 'panel', 'tag', 'ref'].includes(node.kind)) { + else if (['input', 'output', 'lamp', 'button', 'note', 'hex', 'panel', 'outpanel', 'tag', 'ref'].includes(node.kind)) { ed.selection.value = [node.id] ed.labelFocus.value++ } diff --git a/app/components/editor/Help.vue b/app/components/editor/Help.vue index a127aab..b359f7c 100644 --- a/app/components/editor/Help.vue +++ b/app/components/editor/Help.vue @@ -33,7 +33,8 @@ const SHORTCUTS: [string, string][] = [ ['Send signal / Use signal', 'Name a signal (CLK, RESET) once and use it anywhere in the circuit without a wire'], ['Ctrl+F', 'Find a part, signal or component in every circuit, and where a component is used'], ['Ctrl+P', 'Print the circuit as a sheet with a title block, or save it as PDF'], - ['Select input panels, Merge', 'One panel with all their rows; inside a component its rows are input pins'], + ['Select switches or buttons, Combine', 'One input panel (all rows can become buttons); lamps or output pins combine into an output panel'], + ['Select panels, Merge', 'One panel with all their rows; inside a component input panel rows are inputs, output panel rows outputs'], ['Design the box (Circuit tab)', 'Move lamps, displays and the name on a component\'s box, draw lines, boxes, circles and text'], ['Select several lamps, pins or switches', 'Green boxes show free pins in a row they fit; point along one, click to wire them all'], ['Shift + click on canvas', 'Keep placing the same part'], diff --git a/app/components/editor/NodeSettings.vue b/app/components/editor/NodeSettings.vue index bc461bf..586b129 100644 --- a/app/components/editor/NodeSettings.vue +++ b/app/components/editor/NodeSettings.vue @@ -32,6 +32,7 @@ const HINTS: Record = { pixel: 'Lights at 1. Inside a component, all its pixels show on the component box as one screen, without gaps: space them out inside to wire them, every column and row they sit on becomes a column and row of the screen.', tag: 'Wire a signal into it and give it a name. Every "Use signal" with that name in this circuit carries the same signal, without a wire. Names stay inside this circuit.', ref: 'Carries the signal of the "Send signal" with the same name in this circuit. Select it to see all places that signal goes.', + outpanel: 'A lamp per row, named after what it shows. Inside a component its rows are output pins, top to bottom with the other outputs. Each row passes its signal on to the right.', panel: 'Click a row on the canvas to flip its switch or hold its button, or press its key. Rows without a name take the name of the pin they are wired to. Open a row (the arrow) for its key, colour, spacing and order.', } @@ -171,6 +172,8 @@ const sleeveColor = computed(() => (cableBundle.value ? ed.def.value.wires.find( const chipInputs = computed(() => (chipDef.value ? chipPins(chipDef.value).inputs.length : 0)) const chipOutputs = computed(() => (chipDef.value ? chipPins(chipDef.value).outputs.length : 0)) const hasPanel = computed(() => ed.def.value.nodes.some(x => x.kind === 'panel' && x.attach === n.value.id)) +const hasOutPanel = computed(() => ed.def.value.nodes.some(x => x.kind === 'outpanel' && x.attach === n.value.id)) +const outPanel = computed(() => n.value.kind === 'outpanel') function setRowLabel(row: PanelRow, e: Event) { const v = (e.target as HTMLInputElement).value.trim() @@ -335,11 +338,11 @@ function setRowHz(row: PanelRow, e: Event) { - - + + +