(node: Protocol)
| 87 | * Detect which rendering modes are used in this frame |
| 88 | */ |
| 89 | export function detectRenderingModes(node: Protocol): { |
| 90 | hasStates: boolean; |
| 91 | hasIndependentChildren: boolean; |
| 92 | } { |
| 93 | const hasStates = !!node.data.states?.length; |
| 94 | |
| 95 | let hasIndependentChildren = false; |
| 96 | |
| 97 | (node.children || []).forEach(child => { |
| 98 | if (!child.data.componentName) { |
| 99 | hasIndependentChildren = true; |
| 100 | } |
| 101 | }); |
| 102 | |
| 103 | return { hasStates, hasIndependentChildren }; |
| 104 | } |
| 105 | |
| 106 | /** |
| 107 | * Generate a frame/container component |
no outgoing calls
no test coverage detected