11import {
2+ BitArray ,
23 BitListType ,
34 BitVectorType ,
45 BooleanType ,
@@ -12,7 +13,6 @@ import {
1213 UintNumberType ,
1314 VectorBasicType ,
1415 VectorCompositeType ,
15- BitArray ,
1616} from "@chainsafe/ssz" ;
1717import { useState } from "react" ;
1818import { getCategory , getTypeName } from "../structure-view/utils" ;
@@ -81,7 +81,11 @@ export function FieldInput({type, value, onChange, fieldName, depth = 0}: FieldI
8181 onChange = { ( e ) => {
8282 const v = e . target . value ;
8383 if ( type instanceof UintBigintType ) {
84- try { onChange ( BigInt ( v ) ) ; } catch { /* invalid */ }
84+ try {
85+ onChange ( BigInt ( v ) ) ;
86+ } catch {
87+ /* invalid */
88+ }
8589 } else {
8690 const n = Number ( v ) ;
8791 if ( ! Number . isNaN ( n ) ) onChange ( n ) ;
@@ -108,7 +112,9 @@ export function FieldInput({type, value, onChange, fieldName, depth = 0}: FieldI
108112 const bytes = fromHex ( e . target . value ) ;
109113 if ( expectedLen && bytes . length !== expectedLen ) return ;
110114 onChange ( bytes ) ;
111- } catch { /* invalid hex */ }
115+ } catch {
116+ /* invalid hex */
117+ }
112118 } }
113119 placeholder = { expectedLen ? `0x...(${ expectedLen } bytes)` : "0x..." }
114120 className = "bg-[var(--color-surface)] border border-[var(--color-border)] rounded-md px-2 py-0.5 text-[11px] font-mono text-[var(--color-text-primary)] focus:border-[var(--color-border-focus)] focus:outline-none w-full transition-colors"
@@ -183,7 +189,7 @@ function LeafRow({
183189 fieldName : string ;
184190 typeName : string ;
185191 category : string ;
186- children : React . ReactNode ;
192+ children : import ( "react" ) . ReactNode ;
187193} ) {
188194 return (
189195 < div className = "flex items-center gap-2 py-[3px] min-h-[28px]" >
@@ -224,7 +230,9 @@ function ContainerField({
224230 className = "flex items-center gap-1.5 py-[3px] cursor-pointer hover:bg-[var(--color-surface-overlay)]/40 rounded px-1 -mx-1"
225231 onClick = { ( ) => setExpanded ( ! expanded ) }
226232 >
227- < span className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` } >
233+ < span
234+ className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` }
235+ >
228236 ▶
229237 </ span >
230238 < span className = "text-[12px] font-mono text-[var(--color-text-primary)]" > { fieldName } </ span >
@@ -293,7 +301,9 @@ function ListField({
293301 className = "flex items-center gap-1.5 py-[3px] cursor-pointer hover:bg-[var(--color-surface-overlay)]/40 rounded px-1 -mx-1"
294302 onClick = { ( ) => setExpanded ( ! expanded ) }
295303 >
296- < span className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` } >
304+ < span
305+ className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` }
306+ >
297307 ▶
298308 </ span >
299309 < span className = "text-[12px] font-mono text-[var(--color-text-primary)]" > { fieldName } </ span >
@@ -315,7 +325,10 @@ function ListField({
315325 </ div >
316326 { ! isFixed && (
317327 < button
318- onClick = { ( e ) => { e . stopPropagation ( ) ; removeItem ( i ) ; } }
328+ onClick = { ( e ) => {
329+ e . stopPropagation ( ) ;
330+ removeItem ( i ) ;
331+ } }
319332 className = "mt-1 px-1 text-[10px] text-red-400/40 hover:text-red-400 opacity-0 group-hover/item:opacity-100 transition-all"
320333 >
321334 ×
@@ -402,7 +415,9 @@ function BitField({
402415 className = "flex items-center gap-1.5 py-[3px] cursor-pointer hover:bg-[var(--color-surface-overlay)]/40 rounded px-1 -mx-1"
403416 onClick = { ( ) => setExpanded ( ! expanded ) }
404417 >
405- < span className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` } >
418+ < span
419+ className = { `text-[10px] transition-transform duration-150 text-[var(--color-text-muted)] select-none ${ expanded ? "rotate-90" : "" } ` }
420+ >
406421 ▶
407422 </ span >
408423 < span className = "text-[12px] font-mono text-[var(--color-text-primary)]" > { fieldName } </ span >
0 commit comments