(node: TextSurfaceNode)
| 8 | }; |
| 9 | |
| 10 | export function extractReadableText(node: TextSurfaceNode): string { |
| 11 | const label = trimText(node.label); |
| 12 | const value = trimText(node.value); |
| 13 | const identifier = trimText(node.identifier); |
| 14 | const fallbackIdentifier = isMeaningfulReadableIdentifier(identifier) ? identifier : ''; |
| 15 | if (prefersValueForReadableText(node.type ?? '')) { |
| 16 | return value || label || fallbackIdentifier; |
| 17 | } |
| 18 | return label || value || fallbackIdentifier; |
| 19 | } |
| 20 | |
| 21 | function isLargeTextSurface(node: TextSurfaceNode, displayType?: string): boolean { |
| 22 | if (displayType === 'text-view' || displayType === 'text-field' || displayType === 'search') { |
no test coverage detected