@@ -20,8 +20,7 @@ import {
2020 Show ,
2121 For ,
2222 createMemo ,
23- JSX ,
24- batch
23+ JSX
2524} from "solid-js" ;
2625import type * as Monaco from "monaco-editor" ;
2726import {
@@ -33,7 +32,6 @@ import {
3332 createDefaultSearchHistory ,
3433 findAllMatches ,
3534 findNextMatch ,
36- findPrevMatch ,
3735 replaceMatch ,
3836 replaceAllMatches ,
3937 addToSearchHistory ,
@@ -80,7 +78,7 @@ const MAX_HISTORY_ITEMS = 20;
8078// Styles
8179// ============================================================================
8280
83- const containerStyle = ( isVisible : boolean , showReplace : boolean ) : JSX . CSSProperties => ( {
81+ const containerStyle = ( isVisible : boolean , _showReplace : boolean ) : JSX . CSSProperties => ( {
8482 position : "absolute" ,
8583 top : "0" ,
8684 right : "20px" ,
@@ -97,7 +95,8 @@ const containerStyle = (isVisible: boolean, showReplace: boolean): JSX.CSSProper
9795 "pointer-events" : isVisible ? "auto" : "none" ,
9896} ) ;
9997
100- const headerStyle : JSX . CSSProperties = {
98+ // Reserved for future header styling
99+ const _headerStyle : JSX . CSSProperties = {
101100 display : "flex" ,
102101 "align-items" : "center" ,
103102 padding : "6px 8px" ,
@@ -323,7 +322,8 @@ const CloseIcon = () => (
323322 </ svg >
324323) ;
325324
326- const HistoryIcon = ( ) => (
325+ // Reserved for future history dropdown feature
326+ const _HistoryIcon = ( ) => (
327327 < svg width = "12" height = "12" viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
328328 < circle cx = "12" cy = "12" r = "10" />
329329 < polyline points = "12 6 12 12 16 14" />
@@ -614,9 +614,9 @@ export function FindReplaceWidget(props: FindReplaceWidgetProps) {
614614 const state = findState ( ) ;
615615 const match = allMatches [ idx ] ;
616616
617- // Perform replacement
617+ // Perform replacement (we use executeEdits below, so just call for validation)
618618 const text = model . getValue ( ) ;
619- const { newText } = replaceMatch ( text , match , state . replaceString , {
619+ replaceMatch ( text , match , state . replaceString , {
620620 isRegex : state . isRegex ,
621621 preserveCase : state . preserveCase ,
622622 } ) ;
@@ -876,8 +876,8 @@ export function FindReplaceWidget(props: FindReplaceWidgetProps) {
876876
877877 // Effects
878878 createEffect ( ( ) => {
879- // Re-search when options change
880- const state = findState ( ) ;
879+ // Re-search when options change (access state to create reactive dependency)
880+ const _state = findState ( ) ;
881881 performSearch ( ) ;
882882 } ) ;
883883
0 commit comments