From 19279174e679ff97443b1887b7bf636eaf092140 Mon Sep 17 00:00:00 2001 From: clawdbot Date: Wed, 28 Jan 2026 21:17:20 +0800 Subject: [PATCH] sdk: broaden goView url detection for iframe/video --- packages/sdk/src/core/widgets/urlLike.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/sdk/src/core/widgets/urlLike.ts b/packages/sdk/src/core/widgets/urlLike.ts index f9b3ea0..e0d9d57 100644 --- a/packages/sdk/src/core/widgets/urlLike.ts +++ b/packages/sdk/src/core/widgets/urlLike.ts @@ -72,14 +72,26 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'path', 'source', 'address', + + // snake_case aliases seen in some exporters + 'src_url', + 'source_url', + 'play_url', + 'iframe_url', + 'iframe_src', + 'video_url', + 'video_src', + // some editors use page-ish naming 'pageUrl', 'pageSrc', 'page', 'documentUrl', + // iframe-ish HTML-in-URL fields (handled by iframe widget converter) 'srcdoc', 'srcDoc', + // common aliases 'srcUrl', 'sourceUrl', @@ -87,6 +99,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'file', 'fileUrl', 'fileSrc', + // iframe-ish 'iframeUrl', 'iframeSrc', @@ -95,9 +108,11 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'frameSrc', 'htmlUrl', 'htmlSrc', + // generic web-ish 'webUrl', 'webSrc', + // video-ish 'videoUrl', 'videoSrc', @@ -106,6 +121,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'mp4', 'm3u8', 'flv', + // other streaming-ish keys 'hls', 'hlsUrl', @@ -115,6 +131,7 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'rtspUrl', 'rtmp', 'rtmpUrl', + // camera-ish 'cameraUrl', 'cameraSrc', @@ -133,8 +150,12 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'option', 'options', 'props', + 'style', + 'attr', + 'attrs', 'source', 'media', + // common list-ish wrappers for media sources 'sources', 'sourceList', @@ -142,12 +163,14 @@ function pickUrlLikeInner(input: unknown, depth: number): string { 'srcList', 'playList', 'playlist', + // other list-ish wrappers seen in low-code exports 'items', 'list', 'videos', 'videoList', 'iframelist', + // widget-ish wrappers seen in exports 'iframe', 'video',