(w io.Writer, surfaceID string, rootChildren []string, cardID, colID, roleID, contentID, dataKey, roleLabel string)
| 436 | } |
| 437 | |
| 438 | func emitMessageShell(w io.Writer, surfaceID string, rootChildren []string, cardID, colID, roleID, contentID, dataKey, roleLabel string) error { |
| 439 | return emit(w, Message{ |
| 440 | SurfaceUpdate: &SurfaceUpdateMsg{ |
| 441 | SurfaceID: surfaceID, |
| 442 | Components: []Component{ |
| 443 | {ID: "root-col", Component: ComponentValue{Column: &ColumnComp{Children: append([]string{}, rootChildren...)}}}, |
| 444 | {ID: cardID, Component: ComponentValue{Card: &CardComp{Children: []string{colID}}}}, |
| 445 | {ID: colID, Component: ComponentValue{Column: &ColumnComp{Children: []string{roleID, contentID}}}}, |
| 446 | {ID: roleID, Component: ComponentValue{Text: &TextComp{Value: roleLabel, UsageHint: "caption"}}}, |
| 447 | {ID: contentID, Component: ComponentValue{Text: &TextComp{DataKey: dataKey, UsageHint: "body"}}}, |
| 448 | }, |
| 449 | }, |
| 450 | }) |
| 451 | } |
| 452 | |
| 453 | func emitDataUpdate(w io.Writer, surfaceID, dataKey, content string) error { |
| 454 | return emit(w, Message{ |
no test coverage detected