diff --git a/app/assets/css/main.css b/app/assets/css/main.css index 001ae04..02f9e37 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -755,6 +755,28 @@ kbd { stroke: var(--w-on); } +/* A wire end being moved, and the wire a dragged wire would drop onto. */ +.wire.moving .wire-line { + opacity: 0.3; + stroke-dasharray: 4 4; +} + +.wire.drop-target .wire-line { + stroke: var(--on); + stroke-width: 3.5; +} + +.wire-grip { + fill: var(--bg); + stroke: var(--accent); + stroke-width: 1.5; + cursor: grab; +} + +.wire-grip:hover { + fill: var(--accent); +} + .wire.hover .wire-line { stroke-width: 3; } @@ -788,6 +810,15 @@ kbd { font-weight: 600; } +.cable-mark .cable-value { + fill: var(--muted); + font-weight: 500; +} + +.wire.on .cable-mark .cable-value { + fill: var(--on); +} + /* Bundle and split: the ends of a cable. */ .node .body.cable-end { fill: #2a3240; @@ -847,6 +878,192 @@ kbd { fill: var(--muted); } +.invert-pins { + display: flex; + flex-wrap: wrap; + gap: 4px; +} + +.invert-pin { + display: inline-flex; + align-items: center; + gap: 5px; + height: 24px; + padding: 0 8px 0 6px; + border: 1px solid var(--border); + border-radius: 6px; + background: var(--panel-2); + color: var(--muted); + font-family: var(--font-mono); + font-size: 11px; +} + +.invert-pin .dot { + width: 9px; + height: 9px; + border: 1.5px solid currentColor; + border-radius: 50%; +} + +.invert-pin.on { + border-color: var(--accent); + color: var(--text); +} + +.invert-pin.on .dot { + background: var(--bg); + border-color: var(--accent); +} + +/* + and − under a selected gate. */ +.widen-btn { + cursor: pointer; +} + +.widen-btn circle { + fill: var(--panel-2); + stroke: var(--accent); + stroke-width: 1.2; +} + +.widen-btn path { + stroke: var(--text); + stroke-width: 1.6; + stroke-linecap: round; +} + +.widen-btn:hover circle { + fill: var(--accent); +} + +.widen-btn:hover path { + stroke: #0e1116; +} + +/* An input with no wire (reads 0). */ +.node .open-pin { + fill: #e8a23a; + opacity: 0.85; + pointer-events: none; +} + +/* Check: problems in the open circuit. */ +.problems-head { + display: flex; + align-items: center; + gap: 8px; + margin-bottom: 6px; +} + +.problems-head h3 { + margin: 0; +} + +.problems-head .ok { + display: inline-flex; + align-items: center; + gap: 4px; + color: var(--on); + font-size: 12px; +} + +.problems-head .check { + font-size: 11px; +} + +.issue-list { + display: grid; + gap: 2px; +} + +.issue { + display: flex; + align-items: flex-start; + gap: 7px; + width: 100%; + padding: 4px 6px; + border-radius: 5px; + color: var(--text); + font-size: 12px; + line-height: 1.35; + text-align: left; +} + +.issue:hover:not(:disabled) { + background: var(--panel-2); +} + +.issue:disabled { + cursor: default; +} + +.issue.error .issue-icon { color: #ff7a7a; } +.issue.warn .issue-icon { color: #e8a23a; } +.issue.info .issue-icon { color: var(--muted); } +.issue.info { color: var(--muted); } + +.unused-row { + display: flex; + align-items: center; + gap: 6px; + padding: 2px 6px; + font-size: 12px; +} + +.btn-sm.danger { + border-color: rgb(255 107 107 / 0.5); + color: #ff8787; +} + +.itabs .badge.warn { + background: #e8a23a; + color: #14181f; +} + +/* An inverted input: the classic bubble. */ +.node .invert-bubble { + fill: var(--bg); + stroke: var(--chip-stroke); + stroke-width: 1.5; + pointer-events: none; +} + +/* Signal tags and references: a flag with the name. */ +.node .signal-flag { + fill: #1d2430; + stroke: #8a7bd8; + stroke-width: 1.5; + stroke-linejoin: round; +} + +.node .signal-flag.use { + fill: #191f29; +} + +.node .signal-flag.on { + fill: rgb(61 220 132 / 0.2); + stroke: var(--on); +} + +.node .signal-flag.orphan { + stroke: #e8a23a; + stroke-dasharray: 3 2; +} + +.node .signal-flag.linked { + stroke: #c9bfff; + stroke-width: 2.5; + filter: drop-shadow(0 0 4px rgb(138 123 216 / 0.8)); +} + +.node .signal-name { + fill: var(--text); + font-family: var(--font-mono); + font-size: 10px; + font-weight: 600; + pointer-events: none; +} + /* Pixel and pixel screens. */ .node .pixel { fill: #141a22; @@ -2697,3 +2914,92 @@ kbd { border-color: var(--accent); outline: none; } + +/* ── Search (Ctrl+F) ────────────────────────────────────────────── */ +.search-backdrop { + align-items: start; + padding-top: 12vh; +} + +.modal.search-modal { + width: min(600px, 100%); + padding: 0; + overflow: hidden; +} + +.search-field { + display: flex; + align-items: center; + gap: 10px; + padding: 12px 14px; + border-bottom: 1px solid var(--border); + color: var(--muted); +} + +.search-field input { + flex: 1; + min-width: 0; + border: 0; + background: transparent; + color: var(--text); + font-size: 15px; + outline: none; +} + +.search-empty { + padding: 14px 16px; +} + +.search-results { + max-height: 60vh; + overflow-y: auto; + padding: 4px 6px 10px; +} + +.search-results h3 { + margin: 10px 8px 4px; +} + +.search-hit { + display: block; + width: 100%; + border-radius: 6px; +} + +.search-hit.active { + background: var(--panel-2); +} + +.search-main { + display: flex; + align-items: center; + gap: 9px; + width: 100%; + min-height: 32px; + padding: 0 10px; + color: var(--text); + font-size: 13px; + text-align: left; +} + +.search-main .iconify, +.search-main > svg { + color: var(--muted); +} + +.search-where { + color: var(--muted); + font-size: 12px; + white-space: nowrap; +} + +.search-uses { + display: flex; + flex-wrap: wrap; + gap: 4px; + padding: 0 10px 8px 35px; +} + +.search-results .muted { + color: var(--muted); +} diff --git a/app/components/editor/App.vue b/app/components/editor/App.vue index 82bcdc8..042fb2b 100644 --- a/app/components/editor/App.vue +++ b/app/components/editor/App.vue @@ -53,5 +53,6 @@ onMounted(() => { + diff --git a/app/components/editor/Canvas.vue b/app/components/editor/Canvas.vue index 4ba0856..78effc3 100644 --- a/app/components/editor/Canvas.vue +++ b/app/components/editor/Canvas.vue @@ -1,14 +1,17 @@