@@ -8,7 +8,11 @@ import TreeView, {
88} from 'react-accessible-treeview' ;
99import { ChevronDownIcon , ChevronRightIcon } from '@heroicons/react/16/solid' ;
1010import { useCallback , useEffect , useState } from 'react' ;
11- import { GlobeAltIcon } from '@heroicons/react/24/outline' ;
11+ import {
12+ GlobeAltIcon ,
13+ MagnifyingGlassIcon ,
14+ ViewfinderCircleIcon ,
15+ } from '@heroicons/react/24/outline' ;
1216import { IFlatMetadata } from 'react-accessible-treeview/dist/TreeView/utils' ;
1317
1418function ArrowIcon ( { isOpen, ...props } : any ) {
@@ -25,6 +29,8 @@ const BasicTreeView = function BasicTreeView({
2529 onViewHovered,
2630 selectedView,
2731 searchTerm,
32+ showTargetSize,
33+ overlappingViews,
2834} : any ) {
2935 const [ key , setKey ] = useState ( 0 ) ;
3036 const [ expandedIds , setExpandedIds ] = useState (
@@ -171,13 +177,19 @@ const BasicTreeView = function BasicTreeView({
171177 } )
172178 ? 'search-term'
173179 : ''
174- } `}
180+ } ${ element . name . includes ( 'WebView' ) && 'webview' } `}
175181 >
176- < span className = "indicator-item badge badge-warning badge-sm top-[5px]" />
182+ < span
183+ aria-hidden = "true"
184+ title = "search term found"
185+ className = "indicator-item badge badge-warning badge-sm top-[5px]"
186+ >
187+ < MagnifyingGlassIcon className = "h-4 text-warning-content stroke-2" />
188+ </ span >
177189 < div
178190 // eslint-disable-next-line react/jsx-props-no-spreading
179191 { ...getNodeProps ( { } ) }
180- className = { `${ ! isBranch ? 'ml-1' : '' } pl-[10px] my-1 ${ element . name . includes ( 'WebView' ) && 'webview' } ` }
192+ className = { `${ ! isBranch ? 'ml-1' : '' } pl-[10px] my-1` }
181193 onMouseOver = { ( ) => {
182194 viewHovered ( element ) ;
183195 } }
@@ -193,6 +205,20 @@ const BasicTreeView = function BasicTreeView({
193205 aria-label = "search term found"
194206 className = "search-term-label"
195207 />
208+
209+ { showTargetSize &&
210+ overlappingViews . find ( ( item : any ) => {
211+ return item . id === element . id ;
212+ } ) ? (
213+ < span
214+ role = "img"
215+ aria-label = "possible target size overlap"
216+ title = "possible target size overlap"
217+ className = "indicator indicator-item badge badge-error badge-sm top-[5px] left-[4px] !flex"
218+ >
219+ < ViewfinderCircleIcon className = "h-4 text-error-content stroke-2" />
220+ </ span >
221+ ) : null }
196222 { isBranch && (
197223 < ArrowIcon
198224 isOpen = { isExpanded }
0 commit comments