@@ -55,10 +55,19 @@ export class LivematePanel extends ReactDevToolsViewBase {
5555 const toolbarContainer = document . createElement ( 'div' ) ;
5656 toolbarContainer . setAttribute ( 'style' , 'display: flex; flex-direction: column; padding: 20px; gap: 12px; max-width: 800px; width: 100%; margin: 0 20px; border: 1px solid var(--sys-color-divider); border-radius: 8px; background: var(--sys-color-surface);' ) ;
5757
58- // First row: breadcrumb
58+ // First row: pick component button and breadcrumb
5959 const topRow = document . createElement ( 'div' ) ;
6060 topRow . setAttribute ( 'style' , 'display: flex; align-items: center; gap: 8px;' ) ;
6161
62+ // Pick component button
63+ const pickComponentButton = document . createElement ( 'button' ) ;
64+ pickComponentButton . textContent = 'Pick component' ;
65+ pickComponentButton . setAttribute ( 'style' , 'padding: 4px 12px; cursor: pointer;' ) ;
66+ pickComponentButton . addEventListener ( 'click' , ( ) => {
67+ ( bridge as unknown as { send : ( event : string ) => void } ) . send ( 'startInspector' ) ;
68+ } ) ;
69+ topRow . appendChild ( pickComponentButton ) ;
70+
6271 // Breadcrumb view
6372 const breadcrumb = document . createElement ( 'div' ) ;
6473 breadcrumb . setAttribute ( 'style' , 'flex: 1; font-family: monospace; font-size: 12px; color: var(--sys-color-on-surface); display: flex; align-items: center; gap: 4px; flex-wrap: wrap;' ) ;
@@ -80,10 +89,10 @@ export class LivematePanel extends ReactDevToolsViewBase {
8089 }
8190
8291 // Set the selected component to the first one (most specific)
83- selectedComponentBox . textContent = components [ 0 ] . name ;
92+ // selectedComponentBox.textContent = components[0].name;
8493
8594 // Show remaining components as breadcrumb (skip the first since it's in the selected box)
86- const breadcrumbComponents = components . slice ( 1 ) ;
95+ const breadcrumbComponents = components . slice ( - 5 ) ;
8796
8897 breadcrumbComponents . forEach ( ( component , index ) => {
8998 const componentSpan = document . createElement ( 'span' ) ;
0 commit comments