@@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from 'react';
33import TreeReconstructor from "../components/TreeReconstructor_d3" ;
44import ControlPanel from '../components/ControlPanel' ;
55import MessageLogPanel from '../components/MessageLogPanel' ;
6+ import LiveBrowserView from '../components/LiveBrowserView' ;
67
78// Define types for our messages
89interface Message {
@@ -389,33 +390,11 @@ const TreeSearchPlayground = () => {
389390 { /* Main content area - Resizable Split View */ }
390391 < div className = "flex-1 px-4 mt-4 overflow-hidden" >
391392 < div ref = { splitPaneRef } className = "relative h-[calc(100vh-270px)] rounded-lg overflow-hidden shadow-lg" >
392- { /* Browser View Container - Absolute positioned with percentage width */ }
393- < div
394- className = "absolute top-0 bottom-0 left-0 overflow-hidden bg-white dark:bg-slate-800 rounded-l-lg"
395- style = { { width : `${ splitPosition } %` } }
396- >
397- < div className = "p-3 border-b border-slate-200 dark:border-slate-700 bg-gradient-to-r from-sky-50 to-white dark:from-slate-900 dark:to-slate-800" >
398- < h2 className = "text-lg font-semibold text-sky-950 dark:text-sky-100 flex items-center" >
399- < svg xmlns = "http://www.w3.org/2000/svg" className = "h-5 w-5 mr-2 text-cyan-500" viewBox = "0 0 20 20" fill = "currentColor" >
400- < path fillRule = "evenodd" d = "M4.083 9h1.946c.089-1.546.383-2.97.837-4.118A6.004 6.004 0 004.083 9zM10 2a8 8 0 100 16 8 8 0 000-16zm0 2c-.076 0-.232.032-.465.262-.238.234-.497.623-.737 1.182-.389.907-.673 2.142-.766 3.556h3.936c-.093-1.414-.377-2.649-.766-3.556-.24-.56-.5-.948-.737-1.182C10.232 4.032 10.076 4 10 4zm3.971 5c-.089-1.546-.383-2.97-.837-4.118A6.004 6.004 0 0115.917 9h-1.946zm-2.003 2H8.032c.093 1.414.377 2.649.766 3.556.24.56.5.948.737 1.182.233.23.389.262.465.262.076 0 .232-.032.465-.262.238-.234.498-.623.737-1.182.389-.907.673-2.142.766-3.556zm1.166 4.118c.454-1.147.748-2.572.837-4.118h1.946a6.004 6.004 0 01-2.783 4.118zm-6.268 0C6.412 13.97 6.118 12.546 6.03 11H4.083a6.004 6.004 0 002.783 4.118z" clipRule = "evenodd" />
401- </ svg >
402- Live Browser View
403- </ h2 >
404- </ div >
405- < div className = "h-[calc(100%-48px)] w-full overflow-auto" >
406- { liveBrowserUrl ? (
407- < iframe
408- src = { liveBrowserUrl }
409- className = "w-full h-full"
410- title = "Live Browser View"
411- />
412- ) : (
413- < div className = "h-full w-full flex items-center justify-center bg-gradient-to-r from-sky-50 to-white dark:from-slate-900 dark:to-slate-800 text-slate-500 dark:text-slate-400" >
414- < p > Browser view will appear here when search starts</ p >
415- </ div >
416- ) }
417- </ div >
418- </ div >
393+ { /* Browser View Container */ }
394+ < LiveBrowserView
395+ liveBrowserUrl = { liveBrowserUrl }
396+ splitPosition = { splitPosition }
397+ />
419398
420399 { /* Resizable handle - Absolute positioned */ }
421400 < div
0 commit comments