File tree Expand file tree Collapse file tree 4 files changed +9
-7
lines changed
Expand file tree Collapse file tree 4 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @solid-devtools/debugger " : minor
3+ ---
4+
5+ Remove element field from SourceCodeData
Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ export function createLocator<TEl extends object>(props: {
165165 }
166166
167167 let source_code_data = comp . location
168- ? locator . getSourceCodeData ( comp . location , comp . element as any )
168+ ? locator . getSourceCodeData ( comp . location )
169169 : null
170170
171171 // intercept on-page components clicks and send them to the devtools overlay
@@ -210,14 +210,13 @@ export function createLocator<TEl extends object>(props: {
210210 setDevtoolsHighlightTarget ( target : locator . HighlightElementPayload ) {
211211 setDevtoolsTarget ( target )
212212 } ,
213- openElementSourceCode ( location : SourceLocation , element : locator . SourceCodeData [ 'element' ] ) {
213+ openElementSourceCode ( location : SourceLocation ) {
214214 if ( ! target_ide ) return warn ( 'Please set `targetIDE` it in useLocator options.' )
215215 const projectPath = locator . getProjectPath ( )
216216 if ( ! projectPath ) return warn ( 'projectPath is not set.' )
217217 locator . openSourceCode ( target_ide , {
218218 ...location ,
219219 projectPath,
220- element,
221220 } )
222221 } ,
223222 }
Original file line number Diff line number Diff line change @@ -28,7 +28,6 @@ export type TargetIDE = 'vscode' | 'webstorm' | 'atom' | 'vscode-insiders'
2828
2929export type SourceCodeData = SourceLocation & {
3030 projectPath : string
31- element : HTMLElement | string | undefined
3231}
3332
3433export type TargetURLFunction = ( data : SourceCodeData ) => string | void
@@ -65,13 +64,12 @@ export const getProjectPath = (): string | undefined => (window as any)[WINDOW_P
6564
6665export function getSourceCodeData (
6766 location : SourceLocation ,
68- element : SourceCodeData [ 'element' ] ,
6967) : SourceCodeData | undefined {
7068
7169 let projectPath : string | undefined = getProjectPath ( )
7270 if ( projectPath == null ) return
7371
74- return { ...location , projectPath, element }
72+ return { ...location , projectPath}
7573}
7674
7775/**
Original file line number Diff line number Diff line change @@ -208,7 +208,7 @@ function createDebugger<TEl extends object>(
208208 // Opens the source code of the inspected component
209209 function openInspectedNodeLocation ( ) {
210210 const details = inspector . getLastDetails ( )
211- details ?. location && locator . openElementSourceCode ( details . location , details . name )
211+ details ?. location && locator . openElementSourceCode ( details . location )
212212 }
213213
214214 // send the state of the client locator mode
You can’t perform that action at this time.
0 commit comments