+ {/* ── Header ─────────────────────────────────────────────────── */}
+
+
+ {label}
+
+
+ {mode === 'form' && (
+
+ {rows.length}
+
+ )}
+
+
+
+
+
+
+
+ {/* ── Switch error (raw → form failed) ──────────────────────── */}
+ {switchError && (
+
+
+
+ Cannot switch to Form: {switchError}
+
+
+ )}
+
+ {/* ── Form mode ──────────────────────────────────────────────── */}
+ {mode === 'form' && (
+ <>
+ {rows.length === 0 ? (
+
+
No parameters yet.
+
+
+ ) : (
+ <>
+
+
+
+ >
+ )}
+ >
+ )}
+
+ {/* ── Raw JSON mode ──────────────────────────────────────────── */}
+ {mode === 'raw' && (
+
+
+
+
+ {/* Inline status for raw mode */}
+
+ {rawValidation.status === 'ok' && (
+
+
+ Valid JSON
+
+ )}
+ {rawValidation.status === 'error' && (
+
+
+
+ JSON syntax error: {rawValidation.message}
+
+
+ )}
+
+
+ )}
+
+ >
+ );
+}
diff --git a/src/index.css b/src/index.css
index 67d5bf4..5564ba8 100644
--- a/src/index.css
+++ b/src/index.css
@@ -4601,3 +4601,30 @@ code,
gap: 6px;
margin-left: 8px;
}
+
+/* ── ParamsBuilder grid row styles ──────────────────────────────────────
+ Token-driven borders; mirrors the scoped styles in ParamsBuilder.tsx but
+ allows global overrides (e.g. print media) without specificity wars. */
+.params-builder__row {
+ display: grid;
+ grid-template-columns: 1fr auto 1fr auto;
+ gap: 6px;
+ align-items: center;
+ padding: 6px 8px;
+ border: 1.5px solid var(--line);
+ border-radius: 10px;
+ background: var(--surface-soft);
+ transition: border-color var(--transition-speed, 240ms);
+}
+
+.params-builder__row:focus-within {
+ border-color: var(--accent);
+}
+
+/* Responsive: stack key/value on narrow viewports */
+@media (max-width: 480px) {
+ .params-builder__row {
+ grid-template-columns: 1fr auto;
+ grid-template-rows: auto auto;
+ }
+}