Converts the mode to a JSON map.
The resulting map matches Figma's API format and can be used for serialization or API requests.
Map<String, dynamic> toJson() => { 'modeId': modeId, 'name': name, };