| 163 | * @returns {Object|null} Help content object or null if not found |
| 164 | */ |
| 165 | export function getHelpContent(key) { |
| 166 | const keys = key.split('.') |
| 167 | let content = helpContent |
| 168 | |
| 169 | for (const k of keys) { |
| 170 | if (content && typeof content === 'object' && k in content) { |
| 171 | content = content[k] |
| 172 | } else { |
| 173 | // Return null for missing content instead of fallback |
| 174 | return null |
| 175 | } |
| 176 | } |
| 177 | |
| 178 | // Ensure we return an object with at least a description |
| 179 | if (typeof content === 'string') { |
| 180 | return { description: content } |
| 181 | } |
| 182 | |
| 183 | return content || null |
| 184 | } |
| 185 | |
| 186 | /** |
| 187 | * Get node-specific help content based on node type |