From 3b8c6540e1b14df49ab6edb00622f1cba9a83b98 Mon Sep 17 00:00:00 2001 From: Martino Ferrari Date: Wed, 24 Jun 2026 10:50:06 +0200 Subject: [PATCH] feat(logic): add array fields to StateVar type Co-Authored-By: Claude Opus 4.6 --- web/src/lib/types.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/web/src/lib/types.ts b/web/src/lib/types.ts index dee3ab8..96a9f5b 100644 --- a/web/src/lib/types.ts +++ b/web/src/lib/types.ts @@ -68,11 +68,15 @@ export type PlotLayout = // via ds 'local'. export interface StateVar { name: string; - type?: 'number' | 'bool' | 'string'; // default 'number' + type?: 'number' | 'bool' | 'string' | 'array'; // default 'number' initial: string; // initial value, stored as a string unit?: string; low?: number; high?: number; + // array-only (present when type === 'array'): + elem?: 'number' | 'bool' | 'array'; + sizing?: 'dynamic' | 'capped' | 'fixed'; + capacity?: number; } // ── Panel logic (Node-RED–style flow graph) ──────────────────────────────────