readAction function
The single-action view of an Action slot. A list collapses to a
sequence, which is what running them in order means — not to its
first entry, which would silently drop the rest.
Implementation
Map<String, dynamic>? readAction(dynamic raw, RenderContext context) {
final actions = readActions(raw, context);
if (actions.isEmpty) return null;
if (actions.length == 1) return actions.first;
return <String, dynamic>{'type': 'sequence', 'actions': actions};
}