File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
packages/vite-plugin-svelte-inspector/src/runtime Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @sveltejs/vite-plugin-svelte-inspector ' : patch
3+ ---
4+
5+ fix(inspector): migrate client component to runes and force runes mode"
Original file line number Diff line number Diff line change 1+ <svelte:options runes ={true } />
2+
13<script >
24 // do not use TS here so that this component works in non-ts projects too
35 import { onMount } from ' svelte' ;
810 const nav_keys = Object .values (options .navKeys ).map ((k ) => k? .toLowerCase ());
911 const open_key = options .openKey ? .toLowerCase ();
1012
11- let enabled = false ;
12- let has_opened = false ;
13+ let enabled = $state ( false ) ;
14+ let has_opened = $state ( false ) ;
1315
1416 const icon = ` data:image/svg+xml;base64,${ btoa (
1517 `
2426 )} ` ;
2527
2628 // location of code in file
27- let file_loc;
29+ let file_loc = $state () ;
2830 // cursor pos and width for file_loc overlay positioning
29- let x, y, w;
31+ let x = $state (),
32+ y = $state (),
33+ w = $state ();
3034
31- let active_el;
35+ let active_el = $state () ;
3236
33- let hold_start_ts;
37+ let hold_start_ts = $state () ;
3438
35- $ : show_toggle =
36- // eslint-disable-next-line svelte/valid-compile
37- options . showToggleButton === ' always ' || ( options . showToggleButton === ' active ' && enabled );
39+ const show_toggle = $derived (
40+ options . showToggleButton === ' always ' || ( options . showToggleButton === ' active ' && enabled)
41+ );
3842
3943 function mousemove (e ) {
4044 x = e .x ;
You can’t perform that action at this time.
0 commit comments