diff --git a/packages/sdk/src/core/goview/convert.ts b/packages/sdk/src/core/goview/convert.ts index 022d56d..17bd3fb 100644 --- a/packages/sdk/src/core/goview/convert.ts +++ b/packages/sdk/src/core/goview/convert.ts @@ -459,23 +459,29 @@ export function convertGoViewProjectToScreen(input: GoViewProjectLike | GoViewSt // Prefer evidence from the option payload over the widget key. // Some goView/fork widgets mislabel embedded platforms (YouTube/Vimeo/etc) as "Video" even // though they are best represented as an iframe. + const optionSaysImage = looksLikeImageOption(option); const optionSaysVideo = looksLikeVideoOption(option); const optionSaysIframe = looksLikeIframeOption(option); + // Prefer evidence from the option payload over the widget key. + // Many forks mislabel widget keys (e.g. "Text*" / "Image*"), but the option payload + // clearly indicates iframe/video/image. const inferredType: 'text' | 'image' | 'iframe' | 'video' | undefined = - isImage(c) || looksLikeImageOption(option) - ? 'image' - : optionSaysIframe - ? 'iframe' - : optionSaysVideo - ? 'video' + optionSaysIframe + ? 'iframe' + : optionSaysVideo + ? 'video' + : optionSaysImage + ? 'image' : isIframe(c) ? 'iframe' : isVideo(c) ? 'video' - : isTextCommon(c) - ? 'text' - : undefined; + : isImage(c) + ? 'image' + : isTextCommon(c) + ? 'text' + : undefined; const defaults = inferredType === 'text'